razorpay / react-native-razorpay

React Native wrapper for Razorpay's mobile SDKs
https://www.npmjs.com/package/react-native-razorpay
MIT License
124 stars 107 forks source link

amount not updating on RazorPayCheckout.open(options) #303

Closed Abhishek12345679 closed 3 years ago

Abhishek12345679 commented 3 years ago

Description

Please provide a clear and concise description of what the bug is. Include screenshots if needed. Please test using the latest React Native Razorpay plugin release to make sure your issue has not already been fixed.

Razorpay Package Version :

^2.2.1

Xcode Version (iOS) :

Version 11.3.1 (11C505)

Razorpay-pod version (iOS) : -

razorpay-pod (1.1.7)

What you did:

            const options = {
                description: `${drugs.length} Medicines you ordered.`, //product description
                image:
                  "https://media.npr.org/assets/img/2020/03/09/gettyimages-88160320_wide-27e22851a1aaf72f2e66e280f55d0c28c81ec7bb.jpg?s=1400", // product image
                currency: "INR",
                key: "rzp_test_JTQ6Nksjcb9tRj", // secure this key
                amount: total_checkout_amt * 100,
                name: ordername,
                order_id: id, // order_id recieved after
                prefill: {
                  email: email,
                  contact: contact,
                  name: name,
                  // method: "card", //default payment method
                },
                theme: { color: "#000" },
              };
              RazorpayCheckout.open(options)
                .then((data) => {
                  //code 
                  ).then((data) => {
                   //code
                })

What happened:

The Payment window just shows 500 instead of the actual dynamic amount

Moonubanna commented 3 years ago

Abhishek, I have a similar issue, what is your solution for this? Brother, can you help me? Due to multiple subscriptions(1Month, 2Month and 3Month), the value of the amount is not being updated.