瀏覽代碼

feat: enabled modal api in checkout

pull/2/head
Shivam Mishra 5 年之前
父節點
當前提交
6191163b53
共有 1 個檔案被更改,包括 6 行新增5 行删除
  1. +6
    -5
      payments/public/js/razorpay.js

+ 6
- 5
payments/public/js/razorpay.js 查看文件

@@ -71,11 +71,11 @@ frappe.require('https://checkout.razorpay.com/v1/checkout.js').then(() => {
}

show(callback=null) {
let razorpay = new Razorpay(this.options);
razorpay.once('ready', function(response) {
this.razorpay = new Razorpay(this.options);
this.razorpay.once('ready', (response) => {
this.onOpen && this.onOpen(response);
})
razorpay.open();
this.razorpay.open();
}

getKey() {
@@ -127,7 +127,8 @@ frappe.require('https://checkout.razorpay.com/v1/checkout.js').then(() => {
"image": this.image,
"order_id": this.order.id,
"prefill": this.prefill,
"theme": this.theme
"theme": this.theme,
"modal": this.modal
};
}

@@ -137,7 +138,7 @@ frappe.require('https://checkout.razorpay.com/v1/checkout.js').then(() => {
this.orderFail(response);
this.onFail && this.onFail(response);
}
if (response.razorpay_payment_id) {
else if (response.razorpay_payment_id) {
this.orderSuccess(response);
this.onSuccess && this.onSuccess(response);
}


Loading…
取消
儲存