Guide on integrating Paytm with NativeScript

I have encountered an issue with the native-script-paytm integration plugin. Both GitHub repositories are not functioning properly and are throwing stack exceptions. As a result, I decided to create my own project which seems to be working somewhat fine. However, I still have numerous questions regarding obtaining 'mid', 'order id', etc.

If anyone could provide a detailed step-by-step guide for this process, it would be greatly appreciated.

const createViewModel = require("./main-view-model").createViewModel;
const Paytm = require("@nstudio/nativescript-paytm").Paytm;
const paytm = new Paytm();

exports.pageLoaded = function (args) {
    const page = args.object;
    page.bindingContext = createViewModel();
}

exports.onPayWithPaytm = function (args) {
    console.log("Paying");

    // Rest of the JavaScript code...

For visual reference, you can view the image here.

Answer №1

The plugin's guidelines in the ReadMe emphasize the importance of having a functional backend server for generating paytm orders.

It is reiterated that the order or checksum should not be generated within the app itself, as stated in the backend server documentation.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Images not showing in Vue.js

I have been working on setting up a carousel using bootstrap-vue. It is being generated dynamically through an array containing three objects with keys such as id, caption, text, and image path. The issue I am facing now is that while the caption and text ...

Mastering the art of completing a form using AJAX

I'm working on a checkbox that triggers AJAX to create a new log. It populates the necessary information and automatically clicks the "create" button. However, I'm facing an issue where the hour value is not changing. Any help on what I might be ...

Tips for running a JavaScript function that is returned in an AJAX response

I am facing an issue with executing a function after a successful Ajax request in my jQuery code. Here is the snippet of my code: $.ajax({ type: "POST", url: "https://www.example.com/create_chat.php", data: dataString, beforeSe ...

Validation of VAT numbers using JavaScript instead of PHP

I came across an interesting function at this link that is used for checking VAT numbers in the EU. However, I am struggling to integrate it with my registration form. I would like to convert it into a JavaScript function so that I can validate the number ...

Attempting to download an image through an axios fetch call

There is an issue I am facing while trying to retrieve an image from the website www.thispersondoesnotexit.com. function getImage() { axios({ method: 'get', url: 'https://www.thispersondoesnotexist.com/image' }) ...

Unable to display Boostrap modal upon clicking href link

Can someone help me troubleshoot why my pop modal is not displaying after a user clicks on a specific link on my webpage? I have attempted the following: <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js"></s ...

Anonymized Score Reporting through Google Analytics analytics.js

Recently, I've been working on setting up Google Analytics for tracking my web game. Everything seems to be working fine, except for one issue - when I check my custom report the next day after testing the game, I notice that all the scores have been ...

Error: Unable to apply filter on this.state.pokemon due to invalid function

My goal is to fetch data from the PokeAPI and iterate through the array of information that is returned. I begin by setting my state to an empty array, then proceed to make the API call and retrieve data from the response, adding it to my pokemon state. ...

What is the best approach for executing a series of ajax requests in sequence?

One of my buttons named button1 triggers a redirection to www.first.com upon clicking. This initial URL contains another redirect to www.second.com in its response. By intercepting the request with an AJAX call, I am able to redirect from www.first.com to ...

The subpage is not compatible with react-router 4

I've configured my router in the following way: <Switch> <PrivatePage key={index} {...opts} component={(props) => <Section {...props} pages={childRoutes} /> } /> <PrivatePage path='/accounts/:id' exact={t ...

Transfer a term to a different division - JavaScript Object Model

I am trying to achieve a specific task where I need to move one term under another in SharePoint. However, despite my efforts using JSOM and SharePoint 2013, I have not been able to find a direct method for moving terms. The code snippet I have used below ...

Divide the string by spaces

One of the challenges I am facing involves a textarea where users can input messages. The goal is to split the message into an array of words after detecting an '@' symbol, and then search for specific words in that array such as @person1 and @pe ...

Grabbing only the button element using jQuery when a click event occurs

HEY THERE! I have a simple question that I need help with. To better explain the issue, I've included a small code snippet below. The problem I'm facing is related to grabbing the id of a button. Everything works fine except when I click on any ...

Enforcing the autocompletion selection in jQuery UI

As I was working on my original question, I realized that I needed to ask a separate question because I didn't fully grasp what I was trying to achieve. I am currently utilizing the jquery Tag-it plugin available at https://github.com/aehlke/tag-it a ...

Utilizing API data as props within an Autocomplete component in Reactjs with Material-UI

New to Reactjs, I am currently exploring the implementation of the Autocomplete component from material-ui. My goal is to pass the API link as a prop to the element. However, I'm stuck on how to pass the json label name as a prop to be used in "getOpt ...

Is there a way for the window.onbeforeunload event to wait for an ongoing animation to finish

Exploring the JavaScript code below which utilizes an animation library (such as scriptaculous). window.onbeforeunload = function(event) { document.body.fade(); } When leaving the page, the animation does not finish before the page changes. This raise ...

Is it possible to toggle the content of a post within a "post" title on a webpage?

I am currently working on a project where I want to display all "posts" titles on a specific page. When someone clicks on a post title, the content should toggle below it. If the title is clicked again, the content should hide. With the help of the WP-Arc ...

What is the best way to showcase my React App.js in an HTML document?

Is there a way to display my React app file (App.Js) within my Index.html file? <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8" /> <link rel="icon" href="%PUBLIC_URL%/fav ...

The Fuel-ui module in Angular 2 fails to function properly when loaded from a different directory

We recently switched from ng-cli to Gulp for building our Angular2 project, and we are utilizing Fuel-ui. An unusual error has come up. We have incorporated Fuel-ui's alert component into one of our components. When referencing fuel-ui from node_mo ...

Zeroclipboard will fail to copy the text

I seem to be encountering an issue with the Zeroclipboard system. I suspect there might be an error in my code. Even though it indicates that the content has been copied, it actually hasn't been. The code I am currently using is as follows: <scri ...