razorpay / razorpay-pod

:iphone: CocoaPod implementation of Razorpay's Payment SDK. Refer for instructions:
https://docs.razorpay.com/v1/page/ios-integration
MIT License
21 stars 18 forks source link

Checkout View is not opening. #42

Closed Abishek10 closed 5 years ago

Abishek10 commented 5 years ago

The razorpay.open is not showing the checkout view at all. I get the following message when trying to open checkout view

/Users/travis/build/razorpay/razorpay-ios/RazorpayIOS/CheckoutOtpelf/RazorpayCheckoutVC.swift deinitialized

IDE Specs

Xcode 10.0 Razorpay 1.0.23 iOS 12.0

Retro Steps

Try to call the razorpay.open() function. Its not opening the checkout view. Try it in iOS 12 Devices.

Screenshots

Abishek10 commented 5 years ago

@iThink32 I was able to fix this by changing the rootViewController to UINavigationController. I was facing the issue similar to #38 . Now, I am able to open the Razorpay payment screen.

But, if I close the payment screen without completing the payment successfully, I am not able to go back from that screen. Please look into this issue.

iThink32 commented 5 years ago

@Abishek10 I am not able to understand what you are saying , i will send you the sample app you can verify with that.

iThink32 commented 5 years ago

@Abishek10 the next release will have the open(displayController:) method with which you can specify the viewController on which our Controller has to be displayed.

iThink32 commented 5 years ago

@Abishek10 a new version has been released , please update.

Abishek10 commented 5 years ago

ScreenRecording_10-03-2018 22-09-44.MP4.zip

Please look at this video. If the cancel the payment, my nav bar gets hidden and I am not able to go back. But this is not happening if I complete payment successfully. Please look into the problem.

Abishek10 commented 5 years ago

This happens with the latest release also.

iThink32 commented 5 years ago

@Abishek10 our SDK requires the nav bar to be hidden / shown appropriately , at the beginning the nav bar is hidden by us , the ideal fix would be to hide your nav bar before calling the open method and unhiding it when you any of our delegate methods get called.

This is a temporary fix , we will look into an appropriate solution in our next release.

Abishek10 commented 5 years ago

@iThink32 Thanks for the fix. It's working fine now.

Neeraj204 commented 4 years ago

I am getting the same error. @Abishek10 would you share your how it worked for you? Here is what I tried. Hide the navigation bar before opening its showing checkout page and then come back to my app.

self.navigationController?.isNavigationBarHidden = true
        razorpay.open(options)
kundanlal555 commented 4 years ago

enter amount more than 100 paise

let razorpay = Razorpay.initWithKey(PUBLIC_KEY_ID, andDelegate: self)

let options = [ "amount" : "2000" // paise 2000 it means Rupees 20 ] razorpay.open(options)

Jaydip2711 commented 2 years ago

@iThink32 I am getting this error

/Users/ramprasad.a/Documents/RamprasadA/project/razorpay-ios/RazorpayIOS/CheckoutOtpelf/Classes/RazorpayCheckout+JSBridge.swift:["Error : ", [:]] /Users/ramprasad.a/Documents/RamprasadA/project/razorpay-ios/RazorpayIOS/CheckoutOtpelf/Classes/InternalRazorpay.swift:["payment failed"] error: 1 Payment Failed - Unexpected Error /Users/ramprasad.a/Documents/RamprasadA/project/razorpay-ios/RazorpayIOS/CheckoutOtpelf/Classes/RazorpayCheckoutVC.swift deinitialized /Users/ramprasad.a/Documents/RamprasadA/project/razorpay-ios/RazorpayIOS/CheckoutOtpelf/Classes/RazorpayCheckoutWebView.swift:["/Users/ramprasad.a/Documents/RamprasadA/project/razorpay-ios/RazorpayIOS/CheckoutOtpelf/Classes/RazorpayCheckoutWebView.swift deinitialized"]

itsdeepak404 commented 2 years ago

getting this error:

[ViewportSizing] maximumViewportInset cannot be larger than frame 2022-07-17 14:45:04.000351+0530 HCH[32592:2328857] [ViewportSizing] minimumViewportInset cannot be larger than frame

https://user-images.githubusercontent.com/71662839/179392134-400202b4-0cea-4ef1-a61f-0f645eb6b2fe.mp4

--- I tried both in my viewwillAppear

razorpay?.open(options) razorpay.open(options, displayController: self)

but payment page, opens for a sec and going back

@iThink32

Plz check. thanks.