Unable to open RazorpayCheckout when called from Modal in iOS - works in android
See original GitHub issueRazorpayCheckout does not open when tried to call inside a Modal. This works in android and not in iOS.
I checked by creating a new project with the following code
<View style={{marginTop: 22}}>
<Modal
animationType="slide"
transparent={false}
visible={this.state.modalVisible}
onRequestClose={() => {
Alert.alert('Modal has been closed.');
}}>
<TouchableHighlight style={{justifyContent : 'center', alignContent : 'center', paddingTop : 100}} onPress={() => {
var options = {
description: 'Credits towards consultation',
image: 'https://i.imgur.com/3g7nmJC.png',
currency: 'INR',
key: 'rzp_test_1DP5mmOlF5G5ag',
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",error)
alert(`Error: ${error.code} | ${error.description}`);
});
}}>
<Text>ClickMe</Text>
</TouchableHighlight>
</Modal>
<TouchableHighlight
onPress={() => {
this.setModalVisible(true);
}}>
<Text>Show Modal</Text>
</TouchableHighlight>
</View>
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
RazorPay Checkout open function not worked on both iOS ...
When call the Razor-pay open function, its wonts open a Razor-pay Amount page. · Opened the modal page then loading the page and...
Read more >Payment Gateway | Web Integration - Troubleshooting & FAQs
Mozilla Firefox users may not be able to open the bank page while making a netbanking payment on ... Yes, you can track...
Read more >android - Razorpay checkout form stuck on loading in webview
Here is a partially working solution. The main problem is that the Razorpay dialog tries to open a new window to show the...
Read more >react-native-razorpay - Yarn - Package Manager
Steps. Import RazorpayCheckout module to your component: import RazorpayCheckout from 'react-native-razorpay';. Call RazorpayCheckout.open method with the ...
Read more >react-native-razorpay - npm
Call RazorpayCheckout.open method with the payment options . The method returns a JS Promise where then part corresponds to a successful payment ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@meetyourdev updated the comment , pls check
@meetyourdev I actually tried to explain in terms of react-native anyway please use a new component and try opening react-native-razorpay on it. Moreover both the iOS / android implementations follow the same logic but the implementation is platform specific , so I suggest you to use the above approach as it will work for both android and iOS