在React Native中集成Paytm

时间:2019-05-21 04:56:59

标签: react-native

我正在使用react-native-paytm npm包,但是在调用paytm.startPayment(details)方法时遇到404 not found错误。

runTransaction(checkSum) {

      const details = {
          mode: "Staging", // 'Staging' or 'Production'
          mid: "CRmldF93384691886347",
          industryType: "Retail",
          website: "APPSTAGING",
          channel: "WAP",
          amount: "1.00", // String
          orderId: "ORDERJEE00001", // String
          email: "abc@gmail.com", // String
          phone: "7777777777", // String
          custId: "CUST0001", // String
          checksumhash: checkSum, //From your server using PayTM Checksum Utility 
          callback: "https://securegw-stage.paytm.in/theia/processTransaction?ORDER_ID=ORDERJEE00001&MID=CRmldF93384691886347",
      };

      try{
        paytm.startPayment(details);
      }
      catch(e){
        Alert.alert(e)
      }

  }

1 个答案:

答案 0 :(得分:0)

尝试以下方法:@philly25/react-native-paytm

它使用最新的SDK,还支持最新的React Native。