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

PAYMENT MODAL IS NOT OPENIN G #417

Open
aliMurtaja opened this issue Jul 7, 2024 · 0 comments
Open

PAYMENT MODAL IS NOT OPENIN G #417

aliMurtaja opened this issue Jul 7, 2024 · 0 comments

Comments

@aliMurtaja
Copy link

aliMurtaja commented Jul 7, 2024

Steps to reproduce the behavior

After running the code, a button will be shown.
After clicking the button, a checkout modal should be opened

Expected behavior

A payment modal is not opening saying
Oops something went wrong
Error in opening checkout

Actual behavior

A checkout modal should be opened.

Code snippets

Run this code

<html>
   <body>
      <button id="rzp-button">Authenticate</button>
      <script src="https://checkout.razorpay.com/v1/checkout.js"></script>
      <script>
         var options = {
           "key": [my_key]",
           "subscription_id": [my_subscription_id],
           "recurring": true,
           "name": "My Billing Label",
           "description": "Auth txn for sub_00000000000001",
           "handler": function (response){
             alert(response.razorpay_payment_id);
           }
         };
         var rzp1 = new Razorpay(options);
         document.getElementById('rzp-button').onclick = function(e){
           rzp1.open();
         }
      </script>
   </body>
</html>


This is Err is coming in console

{
    "error": {
        "code": "BAD_REQUEST_ERROR",
        "description": "Invalid request payload",
        "step": "NA",
        "reason": "NA",
        "source": "NA"
    }
}

if I didn't use use subscription_id parameter, it had not given any Err, and even checkout be opened

Node version

v18.14.1

Library version

https://checkout.razorpay.com/v1/checkout.js

Additional Information

No response

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

1 participant