question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Razorpay Checkout not opening in IOS

See original GitHub issue

Description

Razorpay checkout not opening in mobile app, but only in ios. It works fine in android

Razorpay SDK Version :

Bundle version string : 1.2.13 react-native-razorpay": “^2.2.7”

Xcode Version :

Version 12.2 (12B45b)

What you did:

Tried to use checkout by clicking on a button in the app

What happened:

Nothing happens, the loader circles a little but other than that the checkout screen never opens. At least in simulator sometimes it pops up but in production on any device it doesn’t open.

Steps To Reproduce

https://www.loom.com/share/bf4b55f639de403baee817824fea837a

Suggested solution:

Code example, screenshot, or link to a repository:

fetch(https://api.razorpay.com/v1/orders, { method: ‘POST’, headers: new Headers({ Accept: ‘application/json’, ‘Content-Type’: ‘application/json’, ‘Authorization’: Bearer Key Here

  }),
  body: JSON.stringify({
    amount: 100,
    currency: currency,
    payment: {
      capture: "automatic",
      capture_options: {
        refund_speed: "normal"
      }
    },
    transfers: [
      {
        account: linkedAccount,
        amount: 100,
        currency: currency,
        notes: {
          name: '1',
          email: '1'
        },
        linked_account_notes: [name , email]
      },
    ]
  })
})
  .then((res) => {
    return res.json()
  })
  .then((payment) => {

    this.setState({ loading: false })

    // console.log("PAYMENT", payment)

    var options = {
      description: 'Kalzi Membership',
      image: 'jpg here',
      currency: currency,
      key: 'key here', // Your api key
      amount: 100,
      name: 'Hi',
      prefill: {
        email: 'email',
        name: 'name',
      },
      order_id: payment.id,
      theme: { color: 'blue' },
    }

    RazorpayCheckout.open(options).then().catch()
        
})
.catch()

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:13 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
ramprasadAnandcommented, Jul 14, 2021

Hi @varsh8th, Please refer our sample-app for your reference on SDK integration, we are not facing any problem on opening the checkout page. As per the video reference you shared, there is a loader showing up on tap of pay button. (The open checkout action is not async, it should open immediately on tap of button with options.)

0reactions
aditya-keri-betterhalfcommented, Mar 11, 2022

Same issue for me. showing following error and sometimes it opens but most of the time throwing this error Screenshot 2021-07-15 at 1 15 07 PM

I have faced similar issue in my project and have added a PR for the fix

I’ve tried adding the code you’ve mentioned in the PR in node_modules/react-native-razorpay/ios/RazorpayCheckout.m but still facing the same issue. Am I missing something here ?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Payment Gateway | iOS Integration - Troubleshooting & FAQs
3. I am getting an error Image not loaded: .dyld . What should I do? · Ensure that Razorpay. · Set Always Embed...
Read more >
Razorpay is not redirecting to checkout page - Stack Overflow
/Users/ramprasad.a/Documents/RamprasadA/project/razorpay-ios/RazorpayIOS/CheckoutOtpelf/Classes/RazorpayCheckoutVC.swift deinitialized.
Read more >
Developers - Razorpay Checkout not opening in IOS - - Bountysource
Razorpay Checkout not opening in IOS. razorpay. 13 July 2021 Posted by varsh8th. Description. Razorpay checkout not opening in mobile app, but only...
Read more >
razorpay_flutter | Flutter Package - Pub.dev
Android: https://razorpay.com/docs/checkout/android/. iOS: ... To change this, open ios/Podfile in your project and add/uncomment this line at the top:.
Read more >
React Native Razorpay Integration - Section.io
How to integrate Razorpay checkout to a React Native app. How to verify Razorpay payments. Prerequisites. In this tutorial, we'll be working on ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found