razorpay / razorpay-ios-sample-app

:iphone: Sample app demonstrating integration of Razorpay iOS Framework
MIT License
14 stars 13 forks source link

I am not getting "razorpay_order_id" and "razorpay_signature" in the onPaymentSuccess method. #29

Open fend-dev opened 3 years ago

fend-dev commented 3 years ago

I am using Xcode 11.5 and using swift 5. I am using following code for the getting "razorpay_order_id" and "razorpay_signature".

`extension ViewController: RazorpayPaymentCompletionProtocolWithData {

func onPaymentError(_ code: Int32, description str: String, andData response: [AnyHashable : Any]?) {
    let paymentId = response!["razorpay_payment_id"]
    let orderId = response!["razorpay_order_id"]
    let signature = response!["razorpay_signature"]

    print("paymentID: ", paymentId!)
    print("Signature: ", signature!)
    print("OrderID: ", orderId!)
}

func onPaymentSuccess(_ payment_id: String, andData response: [AnyHashable : Any]?) {
    let paymentId = response!["razorpay_payment_id"]
    let orderId = response!["razorpay_order_id"]
    let signature = response!["razorpay_signature"]

    print("paymentID: ", paymentId!)
    print("Signature: ", signature!)
    print("OrderID: ", orderId!)
}

}`

I am able to get "razorpay_payment_id" in the success method of Razorpay but i am not able to get other two key values. And I am also only able to access Razorpay payment page when i am try it without an order id in checkout page.

Please help me out if i am doing wrong something.

Nautiyalsachin commented 3 years ago

Hi @fend-dev, we are working on this right now, we will be releasing these two keys in future SDK releases, I'll post you here on this issue whenever we add those changes.

DipakChhag149 commented 3 years ago

Hello @Nautiyalsachin Is this issue resolved? I also get the same issue in the latest version of Razorpay integration.

Albinzr commented 3 years ago

any update on getting razorpay_signature?