Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
fend-dev opened this issue Sep 1, 2020 · 4 comments

Comments

@fend-dev
Copy link

fend-dev commented Sep 1, 2020

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 openRazorpayCheckout(){
    //Register RazorpayTestKey
    razorpay = RazorpayCheckout.initWithKey(kRazorpayLiveKey, andDelegateWithData: self)
    let options: [String:Any] = [
        "description": ServerConfig.shared.businessDescription!,
        "order_id": viewModel.model.orderID!,
        "image": ServerConfig.shared.businessImage!,
        "name": ServerConfig.shared.businessName!,
        "prefill": [
            "contact": LoggedInUser.shared.phoneNumber!,
            "email": LoggedInUser.shared.email!
        ]
    ]
    
    if let rzp = razorpay {
        rzp.open(options)
    } else {
        print("Unable to initialize")
    }
}

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

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

}`

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.

@Prajwal625
Copy link

Hi Ankush, please provide the response for the requirement sent on the ticket "90956" so that we can have the use case checked.

@fend-dev
Copy link
Author

fend-dev commented Sep 2, 2020

Yes @Prajwal625 , I have already sent. Please check.

@Dev-iOS-Appbirds
Copy link

Dev-iOS-Appbirds commented Sep 3, 2020

check 'order_id' or all parameter in option.
i have faced same issue, and issue was in 'order_id'.

@Nautiyalsachin
Copy link
Contributor

Hey @Prajwal625, can you share the options here, in the form of data, I would suggest you to send the hardcoded data first and try with that, if that works then you can switch to your view modal. Let me know if it works for you.

For now closing this issue, feel free to either re-open or create a new issue if you have any additional queries.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants