Closed Karthikmoback closed 3 years ago
@Sumit738 I have referred the same link, as i mentioned, i was able to get the payment id when i use RazorpayPaymentCompletionProtocol public func onPaymentSuccess(_ paymentid: String) But i need order id and signature. Which i can get by using (as per doc link) RazorpayPaymentCompletionProtocolWithData func onPaymentSuccess( payment_id: String, andData response: [AnyHashable : Any]?) , But this method is not getting called.
Hey @Karthikmoback, we have two initialising methods,
RazorpayCheckout.initWithKey(razorpayKey, andDelegate: self)
RazorpayCheckout.initWithKey(razorpayKey, andDelegateWithData: self)
If you use the second option then you will be able to invoke the data delegate functions.
@Nautiyalsachin Thanks that worked.
I have integrated Razorpay SDK using cocoapod for IOS app - pod 'razorpay-pod', '1.1.6' , also tried with 1.1.7 with swift 5.1+ and Xcode 11.6.
Using RazorpayPaymentCompletionProtocolWithData I am able to make the payment and on click on success, the view gets dismissed, But below method doesn't gets called func onPaymentSuccess(_ payment_id: String, andData response: [AnyHashable : Any]?)
whereas if i use RazorpayPaymentCompletionProtocol func onPaymentSuccess(_ payment_id: String) - works fine to get payment id But i need order id and signature to verify the transaction.
Here is my code
Here is the console logs, when razorpay screen closes /Users/sachinnautiyal/Documents/Razorpay/razorpay-ios/RazorpayIOS/CheckoutOtpelf/Classes/RazorpayCheckoutVC.swift deinitialized /Users/sachinnautiyal/Documents/Razorpay/razorpay-ios/RazorpayIOS/CheckoutOtpelf/Classes/RazorpayCheckoutWebView.swift:["/Users/sachinnautiyal/Documents/Razorpay/razorpay-ios/RazorpayIOS/CheckoutOtpelf/Classes/RazorpayCheckoutWebView.swift deinitialized"] 2020-10-13 16:57:01.345088+0530 MyApp[2153:1184634] [ProcessSuspension] 0x1146e2190 - ProcessAssertion::processAssertionWasInvalidated() 2020-10-13 16:57:01.350226+0530 MyApp[2153:1184634] [ProcessSuspension] 0x1146e21f0 - ProcessAssertion::processAssertionWasInvalidated()