razorpay / razorpay-pod

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

Bug after making payment through net banking #193

Open jonathanjr3 opened 1 year ago

jonathanjr3 commented 1 year ago

Description

A "Payment Successful" page shows up after making a payment through Netbanking which doesn't dismiss itself automatically:

WhatsApp Image 2023-07-21 at 12 54 19 PM

Clicking on "Cancel" here doesn't dismiss the page either:

WhatsApp Image 2023-07-21 at 12 54 16 PM

As a workaround we are getting the top most view controller and dismissing it manually inside the onPaymentSuccess delegate method of RazorpayPaymentCompletionProtocol

This workaround doesn't work when the "Success" button here is tapped twice quickly, the "Payment Successful" page just stays there:

WhatsApp Image 2023-07-21 at 12 54 22 PM

All of this were tested in testing environment, we haven't checked this in production yet. The payment itself is working fine, only the payment successful page is not getting dismissed automatically. This was working fine till razorpay version 1.3.2

Razorpay pod Version :

Version 1.3.3

Xcode Version :

14.3.1 (14E300c)

What you did:

What happened:

Steps To Reproduce

Provide a detailed list of steps that reproduce the issue.

  1. Intialize RazorpayCheckout object with RazorpayCheckout.initWithKey(razorpayAPIKey, andDelegate: self)
  2. Open payment view with razorpay.open(params, displayController: self)
  3. Choose 'Netbanking' for payment mode in the razorpay payment page
  4. Choose any bank
  5. Click on 'Success' in the demo bank page

Suggested solution:

Code example, screenshot, or link to a repository:

var param = [String: Any]()
param["name"] = "NameOfCompany"
param["currency"] = currencyvalue
param["order_id"] = orderId

var prefill = [String: Any]()
prefill["name"] = firstname
prefill["email"] = email
prefill["contact"] = mobile
param["prefill"] = prefill

var notes = [String: Any]()
notes["order_id"] = orderId
param["notes"] = notes

var theme = [String: Any]()
theme["image_frame"] = false
param["theme"] = theme
let razorpay = RazorpayCheckout.initWithKey(razorpayAPIKey, andDelegate: self)
razorpay.open(param, displayController: self)