我正在将Razor付款网关集成到Android的React native中,但是在单击付款按钮时始终会得到undefined | undefined。我正在使用react-native-razorpay
库,并为Android进行了手动链接。请帮助我解决这个问题。
这是我的代码-
_onPressButton() {
var options = {
description: 'Credits towards consultation',
image: 'https://i.imgur.com/3g7nmJC.png',
currency: 'INR',
key: 'Your razorpay key',
amount: '5000',
name: 'foo',
prefill: {
email: 'void@razorpay.com',
contact: '9191919191',
name: 'Razorpay Software'
},
theme: {color: '#F37254'}
}
RazorpayCheckout.open(options).then((data) => {
// handle success
alert(`Success: ${data.razorpay_payment_id}`);
}).catch((error) => {
// handle failure
alert(`Error: ${error.code} | ${error.description}`);
});
}