1) ) In FlutterFlow enabled the Razor Pay Payments and Update the Test & Production API Credentials
2) Razorpay was configuted for payment and have UPI/credit/debit/QR code payment modes acticvated, tested with QR payments (earlier as well)
3) Razorpay : Have enabled TestMode and now the system shows that " YOU'RE IN TEST MODE"
4) I did try and look at the error and it's in this specific section of the code
5) In the front end the razorpay button is just in processing state for a long time.
The google cloud function testCreateOrder has a runtime of Nodejs 18
index.js
async function generateOrder(data, isProd) {
const razorpay = new Razorpay({
key_id: keyId(isProd),
key_secret: keySecret(isProd),
});
//console.log(data.amount, data.currency, data.receipt);
try {
const order = await razorpay.orders.create({
amount: data.amount,
currency: data.currency,
receipt: data.receipt,
});
return order;
} catch (err) {
//console.log(data.amount, data.currency, data.receipt);
console.error(`${err}`);
throw new functions.https.HttpsError(
"aborted",
"Could not create the order",
);
}
}
Logged and issue because i believed that this is an issue.
https://github.com/FlutterFlow/flutterflow-issues/issues/3006
References that i have read :
https://docs.flutterflow.io/actions/actions/integrations/razorpay-payment
https://docs.flutterflow.io/actions/actions/integrations/razorpay-payment
https://docs.flutterflow.io/settings-and-integrations/in-app-purchases-and-subscriptions/razorpay
https://razorpay.com/docs/payments/payments/test-upi-details/
https://razorpay.com/docs/api/orders/create/
https://blog.flutterflow.io/accept-payments-in-your-flutter-app-using-razorpay/