Closed virendrapatil0 closed 2 years ago
I am using pod 'razorpay-pod', '~> 1.1.12' Xcode 13.1, iOS deployment target - 12.0
extension PaymentDepositVC: RazorpayPaymentCompletionProtocolWithData {
func onPaymentError(_ code: Int32, description str: String, andData response: [AnyHashable : Any]?) {
print("error: ", code)
self.presentAlert(withTitle: "Alert", message: str)
}
func onPaymentSuccess(_ payment_id: String, andData response: [AnyHashable : Any]?) {
print("success: ", payment_id)
self.presentAlert(withTitle: "Success", message: "Payment Succeeded")
}
}
2 . Pass proper parameter payment form method and if payment success but not trigger in this Protocol method.
Hello Please let me know any changes
Hi @virendrapatil0 can you please share the code to know how you are initialising the razorpay instance ?
@virendrapatil0 if you want to get the callback to RazorpayPaymentCompletionProtocolWithData protocol methods you have to initialise our razorpay instance as given below.
razorpay = RazorpayCheckout.initWithKey("rzp_test_pNufDOOeGRM3hI", andDelegateWithData: self)
in your case you are delegating to RazorpayPaymentCompletionProtocol protocol, this is the reason you are not getting callback to RazorpayPaymentCompletionProtocolWithData methods.
Issue Solve Thanks
Closing the issue as it got resolved.
Description
Please provide a clear and concise description of what the bug is. Include screenshots if needed. Please test using the latest Razorpay pod release to make sure your issue has not already been fixed.
Razorpay pod Version :
Open
podfile
for checking the razorpay-pod version if it's not mentioned their then openpodfile.lock
and copy the pod version here.Xcode Version :
Open Xcode > Go to
About Xcode
> copy the Xcode version here.What you did:
What happened:
Steps To Reproduce
Provide a detailed list of steps that reproduce the issue.
1. 2.
Suggested solution:
Code example, screenshot, or link to a repository:
Please provide a link to a repository on GitHub, or provide a minimal code example that reproduces the problem. You may provide a screenshot of the application if you think it is relevant to your bug report. Here are some tips for providing a minimal example: https://stackoverflow.com/help/mcve