razorpay / react-native-razorpay

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

Razorpay checkout is not opening on IOS #347

Closed akshaykatale99 closed 3 years ago

akshaykatale99 commented 3 years ago

Razorpay checkout is not opening on ios. throwing the following error when calling RazorpayCheckout.open.

Screenshot 2021-07-16 at 3 38 14 PM

Screenshot 2021-07-16 at 3 41 37 PM

React Native - ~0.63.3 react-native-razorpay - ^2.2.7 Xcode - 12.4

ramprasadAnand commented 3 years ago

@akshaykatale99 Can you share the sample payload you are passing to open checkout ?

akshaykatale99 commented 3 years ago

Hi @ramprasadAnand , we are using this payload.

            var options = {
                        description: "Online Shopping",
                        currency: "INR",
                        key: "rzp_test_RziHitfzp10iKh",
                        order_id: "order id recieved from razorpay",
                        prefill: {
                            email: checkoutData.customer.billing.email,
                            contact: checkoutData.customer.billing.phone,
                            name: `${checkoutData.customer?.billing.firstName} ${checkoutData.customer.billing.lastName}`
                        },
                        amount: "10000",
                        name: "Brand Name",
                        image: 'https://paxon.tech/wp-content/uploads/2021/06/Paxon-3-1.png',
                        theme: {color: theme.COLOR_PRIMARY}
                      }
ramprasadAnand commented 3 years ago

@akshaykatale99 Are you generating the order_id from your backend ?. And If you are showing a loader while calling the order_id API from the backed, can you try disabling the loader and try to open checkout ?

akshaykatale99 commented 3 years ago

@ramprasadAnand Yes. we are generating order id from backend and showing loader while api call. when i disable loader as per your suggestion its opening now.