问题描述
我正在使用 @philly25/react-native-paytm 在使用 paytm 的 react native 中付款。但我收到无效:CHECKSUMHASH 的语法不正确。
这是代码
import React from "react";
import { Platform,View,Text,TouchableOpacity } from "react-native";
import { sha256 } from "react-native-sha256";
import Paytm from "@philly25/react-native-paytm";
import { order_req,checksum_req } from "./apirequest";
export default class Test extends React.Component {
constructor(props) {
super(props);
this.state = {
hash: "",};
}
pay = () => {
sha256("Test").then((hash) => {
console.log("thi sis hash" + hash);
this.setState({ hash: hash });
const details = {
mode: "Staging",// 'Staging' or 'Production'
MID: "xxxxxxxxxxxxx...",INDUSTRY_TYPE_ID: "Retail",WEBSITE: "APPSTAGING",CHANNEL_ID: "WAP",TXN_AMOUNT: "1",// String
ORDER_ID: "32546",// String
// EMAIL: email,// String
// MOBILE_NO: mobile,// String
CUST_ID: "CUSTOMER_1",// String
//CHECKSUMHASH: responseJson.data.checksum,//From your server using PayTM Checksum Utility
CHECKSUMHASH: `${hash}`,//From your server using PayTM Checksum Utility
CALLBACK_URL:
"https://securegw.paytm.in/theia/paytmCallback?ORDER_ID=" + "1",};
Paytm.startPayment(details);
console.log(details);
});
};
render() {
return (
<View>
<TouchableOpacity onPress={this.pay}>
<Text>philly full</Text>
</TouchableOpacity>
</View>
);
}
}
请忽略这一点 = 我使用 @philly25/react-native-paytm 在 react native 中使用 paytm 付款。但我收到无效:CHECKSUMHASH 的语法不正确。我使用@philly25/react-native-paytm 在使用paytm 的react native 中付款。但我收到无效:CHECKSUMHASH 的语法不正确。我使用@philly25/react-native-paytm 在使用paytm 的react native 中付款。但我收到无效:CHECKSUMHASH 的语法不正确。我使用@philly25/react-native-paytm 在使用paytm 的react native 中付款。但我收到无效:CHECKSUMHASH 的语法不正确。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)