4

I am trying to use react-native-paytm for payment gateway, I followed the steps what was there in react-native-paytm module, but it is not working for me, Even i don't Know the error and Don't Know how to resolve it Here is the code that what i have done

payNow(){
   // alert("payNow")
    var details = {
      generationUrl: "https://cinealerts.com/webservices/paytm/xxx.php",
      validationUrl: "https://cinealerts.com/webservices/paytm/xxx.php",
      mid: "my mid", // Prod
      industryType: "Retail", //Prod
      website: "APP_STAGING", //prod
      channel: "WAP",
      amount: "5",
      orderId: "12345678",
      requestType: "DEFAULT",
      email: "hussian@gmail.com",
      phone: "7777777777",
      theme: "merchant",
      custId: "9988344556",
    };
    paytm.startPayment(details);
  }

when i click on button it will call the paynow function, in payNow function one popUp is open and automatically it closed with out showing anything, I don't know how to resolve this issue, and even i don't know that what is the issue. Any one please give me suggestions that how to resolve this issue, Any help much appreciated.

Hussian Shaik
  • 2,559
  • 9
  • 37
  • 57

2 Answers2

0

A better documented fork: https://github.com/sujayjaju/react-native-paytm

It worked for me on Android. I still need to test on iOS

Indivision Dev
  • 1,097
  • 11
  • 16
0

Make sure you are using the correct values of paytm parameters.

In your code, you are using APP_STAGING in website parameter. It should be APPSTAGING.

To check the correct parameters value of website parameter, follow the steps :-

Also I need to add one more parameter to get it working i.e. mode:'stage'. I am sharing my code that worked fine for me in android.

var details = {
                        mid: "my_mid",
                        industryType: "Retail", //Prod
                        website: "APPSTAGING", //prod
                        channel: "WAP",
                        amount: 100,
                        orderId: "ORDER_12390",
                        email: "abc@gmail.com",
                        phone: 7777777777,
                        custId: "CUST-12879",
                        checksumhash: "checksum generated using paytm sdk",
                        callback: "my_call_back_url",
                        mode:'stage',
                    };
                    // alert(JSON.stringify(details));
                    paytm.startPayment(details);
rimmy
  • 245
  • 2
  • 11
  • https://stackoverflow.com/questions/51264762/react-native-paytm-not-working-for-android – rimmy Jul 10 '18 at 12:09