razorpay / react-native-razorpay

React Native wrapper for Razorpay's mobile SDKs
https://www.npmjs.com/package/react-native-razorpay
MIT License
124 stars 107 forks source link

Not able to get razorpay_signature. #283

Closed Biplovkumar closed 4 years ago

Biplovkumar commented 4 years ago

Added demo code working fine but not able to get razorpay_signature.

Code:- <TouchableHighlight onPress={() => { var options = { description: 'Credits towards consultation', image: 'https://i.imgur.com/3g7nmJC.png', currency: 'INR', key: '', // Your api 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}); }); }}>

vivekshindhe commented 4 years ago

@Biplovkumar not sure if you have referenced the documentation, but I'd suggest that you should go through this once. Document for accepted options Coming to the problem, you can access the signature with {data.razorpay_signature}. Also, please keep in mind, you have to submit a key "order_id" with a valid order_id created with the Orders API in the options object to be able to get the signature value in the response. Let us know if you still face any issue regarding the same.

Thanks, Vivek Shindhe

vivekshindhe commented 4 years ago

@Biplovkumar I hope the issue was resolved for you. Closing the issue. You can raise a ticket if you have any other issues.

Thanks