|
@@ -430,30 +430,22 @@
|
|
|
|
|
|
//支付按钮点击
|
|
//支付按钮点击
|
|
$("#continuePayBtn").on(tap, async function () {
|
|
$("#continuePayBtn").on(tap, async function () {
|
|
- let left = (window.innerWidth - 600) / 2;
|
|
|
|
- var importantStuff = window.open('', '_blank',
|
|
|
|
- 'height=500,width=600,top=300,left=' + left + ',toolbar=no,menubar=no, scrollbars=no,resizable=no,location=no, status=no');
|
|
|
|
- importantStuff.document.write('Preparing payment...');
|
|
|
|
-
|
|
|
|
- loadingModelEle.show(0)
|
|
|
|
|
|
+ //popup new window to paypal
|
|
|
|
+ // let left = (window.innerWidth - 600) / 2;
|
|
|
|
+ // var importantStuff = window.open('', '_blank',
|
|
|
|
+ // 'height=500,width=600,top=300,left=' + left + ',toolbar=no,menubar=no, scrollbars=no,resizable=no,location=no, status=no');
|
|
|
|
+ // importantStuff.document.write('Preparing payment...');
|
|
|
|
+ //
|
|
|
|
+ // loadingModelEle.show(0)
|
|
|
|
+ window.document.write('Preparing payment...');
|
|
|
|
|
|
const params = {}
|
|
const params = {}
|
|
const res = await orderPayment(params)
|
|
const res = await orderPayment(params)
|
|
const {status, message, data} = res || {}
|
|
const {status, message, data} = res || {}
|
|
if (status === 200 || status === "200") {
|
|
if (status === 200 || status === "200") {
|
|
- //window.open(data.payment.approval_link, "_blank");
|
|
|
|
-/*
|
|
|
|
- let left = (window.innerWidth - 600) / 2;
|
|
|
|
- window.open(data.payment.approval_link, "PayPal",
|
|
|
|
- 'height=300,width=600,top=300,left='+left+',toolbar=no,menubar=no, scrollbars=no,resizable=no,location=no, status=no');
|
|
|
|
-*/
|
|
|
|
- importantStuff.location.href = data.payment.approval_link;
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- /* let uri = data.payment.approval_link;
|
|
|
|
- let id = "paypal"
|
|
|
|
- createSuperLabel(uri, id)*/
|
|
|
|
-
|
|
|
|
|
|
+ //popup new window to paypal
|
|
|
|
+ //importantStuff.location.href = data.payment.approval_link;
|
|
|
|
+ window.location.replace(data.payment.approval_link);
|
|
var interId = setInterval(function () {
|
|
var interId = setInterval(function () {
|
|
fetchOrder(interId);
|
|
fetchOrder(interId);
|
|
}, 3000)
|
|
}, 3000)
|