[英]getting a payment failed unexpected error in razorpay in react native ios and android
我正在我的 React 本機應用程序中集成一個 razorpay 支付網關。 每當我嘗試打開 razorpay 結帳 UI 時,它首先打開一個帶有加載程序的彈出窗口,幾秒后它給出錯誤付款失敗意外錯誤,錯誤代碼為 1。下面是我的 razorpay 結帳 UI 代碼
var options = {
description: "Credits towards consultation",
image: "https://i.imgur.com/3g7nmJC.png",
currency: "INR",
key: "xxxxxxxxxxxxxxxx",
amount: "100", //`${amount}`,
name: "Gulb",
//order_id: order_id, //Replace this with an order_id created using Orders API.
theme: { color: "#53a20e" },
};
RazorpayCheckout.open(options)
.then(async (response) => {
console.log("this is payment id", response);
alert("Payment Successfull");
}.catch((error) => {
// handle failure
alert(`${error.description}`);
console.log("this is ", error);
});
我也從服務器獲得了正確的 order_id 但它仍然顯示相同的錯誤
對於 ios,它顯示 - 付款失敗意外錯誤 對於 android,它顯示 - 找不到合適的付款方式
在我的 react-native 應用程序上集成 razorpay 時,我也遇到了類似的問題。 但我只是重新生成了我的密鑰 ID 和密鑰秘密,然后再次重新運行我的應用程序。 這個問題神奇地消失了。
我希望你解決了你的問題。 但是把它留在這里以防將來其他人需要任何幫助。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.