diff --git a/src/main/ui/static/images/A+APS.png b/src/main/ui/static/images/A+APS.png new file mode 100644 index 000000000..a1aa74baa Binary files /dev/null and b/src/main/ui/static/images/A+APS.png differ diff --git a/src/main/ui/static/images/alipay_aps_big.svg b/src/main/ui/static/images/alipay_aps_big.svg new file mode 100644 index 000000000..a3fb65da3 --- /dev/null +++ b/src/main/ui/static/images/alipay_aps_big.svg @@ -0,0 +1,24 @@ + + \ No newline at end of file diff --git a/src/main/ui/static/images/aps_tip.png b/src/main/ui/static/images/aps_tip.png new file mode 100644 index 000000000..9b352eae7 Binary files /dev/null and b/src/main/ui/static/images/aps_tip.png differ diff --git a/src/main/ui/static/templates/alipay/v1/bill_retail_jsapi.js b/src/main/ui/static/templates/alipay/v1/bill_retail_jsapi.js index 4afadc43b..1b4a99494 100644 --- a/src/main/ui/static/templates/alipay/v1/bill_retail_jsapi.js +++ b/src/main/ui/static/templates/alipay/v1/bill_retail_jsapi.js @@ -37,6 +37,14 @@ $(document).ready(function () { location.href = window.redirect; return; } + if (pay.web_url) { + location.href = pay.web_url; + return; + } + if (pay.mweb_url) { + location.href = pay.mweb_url; + return; + } if (window.AlipayJSBridge) { callPayment(); } else { diff --git a/src/main/ui/static/templates/billCode/js/mobile_payment.js b/src/main/ui/static/templates/billCode/js/mobile_payment.js index 7a61910a8..8c63fdec4 100644 --- a/src/main/ui/static/templates/billCode/js/mobile_payment.js +++ b/src/main/ui/static/templates/billCode/js/mobile_payment.js @@ -9,9 +9,18 @@ $(document).ready(function () { if(window.openmobilefun == 'wechat'|| window.openmobilefun == 'other'){ paymentFun = 'Wechat' - }else{ + } + else if(window.openmobilefun == 'alipayaps'|| window.openmobilefun == 'alipayaps_cn'){ + paymentFun = 'AlipayAps' + $(".select_wechat").empty(); + $(".select_alipay_aps").append(selectPaymentHTML); + $(".select_alipay").empty(); + $(".select_bank").empty(); + } + else{ paymentFun = 'Alipay' $(".select_wechat").empty(); + $(".select_alipay_aps").empty(); $(".select_alipay").append(selectPaymentHTML); $(".select_bank").empty(); } @@ -35,6 +44,8 @@ $(document).ready(function () { paymentFun = 'Wechat' $(".select_wechat").append(selectPaymentHTML); $(".select_alipay").empty(); + $(".select_alipay_aps").empty(); + $(".select_bank").empty(); } }) @@ -42,15 +53,28 @@ $(document).ready(function () { if(paymentFun != 'Alipay'){ paymentFun = 'Alipay' $(".select_wechat").empty(); + $(".select_alipay_aps").empty(); + $(".select_alipay").append(selectPaymentHTML); $(".select_bank").empty(); } }) + $("#select_alipay_aps").click(function(){ + if(paymentFun != 'AlipayAps'){ + paymentFun = 'AlipayAps' + $(".select_wechat").empty(); + $(".select_alipay").empty(); + $(".select_alipay_aps").append(selectPaymentHTML); + $(".select_bank").empty(); + } + }) $("#select_bank").click(function(){ if(paymentFun != 'Bank'){ paymentFun = 'Bank' $(".select_wechat").empty(); $(".select_alipay").empty(); + $(".select_alipay_aps").empty(); + $(".select_bank").append(selectPaymentHTML); } }) @@ -81,6 +105,13 @@ $(document).ready(function () { redirectH5Payment(res.partner_order_id,res.client_moniker) } } + if(paymentFun == 'AlipayAps'){ + if(window.openmobilefun == 'alipayaps'){ + callPayment(res); + }else{ + redirectH5PaymentForAps(res.partner_order_id,res.client_moniker) + } + } if(paymentFun == 'Alipay'){ if(window.openmobilefun == 'alipay'){ callPayment(res); @@ -108,6 +139,9 @@ $(document).ready(function () { function redirectH5Payment(orderId,clientMoniker){ window.location.href='/api/v1.0/share_code/business/bills/'+clientMoniker+'/orders/'+orderId+'/pay'; } + function redirectH5PaymentForAps(orderId,clientMoniker){ + window.location.href='/api/v1.0/share_code/business/bills/'+clientMoniker+'/orders/'+orderId+'/alipayaps_pay'; + } function getShareLink(){ var paymentLink = '' @@ -127,6 +161,13 @@ $(document).ready(function () { paymentLink = '/api/v1.0/share_code/business/bills/'+window.billInfo.bill_code_id+'/alipay/mobile/redirectApp?priorityChannel=Alipay'; } } + if(paymentFun == 'AlipayAps'){ + if(window.openmobilefun == 'alipayaps'|| window.openmobilefun == 'alipayaps_cn'){ + paymentLink = '/api/v1.0/share_code/business/bills/'+window.billInfo.bill_code_id+'/alipay_aps/mobile'; + }else{ + paymentLink = '/api/v1.0/share_code/business/bills/'+window.billInfo.bill_code_id+'/alipay_aps/mobile/redirectApp?priorityChannel=AlipayAps'; + } + } if(paymentFun == 'Bank'){ paymentLink = '/api/v1.0/share_code/business/bills/'+window.billInfo.bill_code_id+'/cbbank/mobile?partner_moniker='+window.clientmoniker; } @@ -147,6 +188,14 @@ $(document).ready(function () { } } + if(paymentFun == 'AlipayAps'){ + if(window.openmobilefun == 'alipayaps'|| window.openmobilefun == 'alipayaps_cn'){ + paymentLink = '/api/v1.0/share_code/bills/payment/orders/'+window.billInfo.bill_code_id+'/alipay_aps/share_link' + }else{ + paymentLink = '/api/v1.0/share_code/bills/payment/'+window.billInfo.bill_code_id+'/alipay_aps/mobile/redirectApp?priorityChannel=AlipayAps'; + + } + } if(paymentFun == 'Bank'){ paymentLink = '/api/v1.0/share_code/bills/payment/orders/'+window.billInfo.bill_code_id+'/cbbank/share_link?partner_moniker='+window.clientmoniker; } @@ -187,7 +236,11 @@ $(document).ready(function () { function callPayment(paydata) { try { if(typeof paydata.trade_no == 'undefined'){ - window.location.href = paydata.mweb_url + if(paydata.mweb_url!=null){ + window.location.href = paydata.mweb_url + }else{ + window.location.href = paydata.web_url + } }else { AlipayJSBridge.call('tradePay', { tradeNO: paydata.trade_no diff --git a/src/main/ui/static/templates/billCode/js/pc_payment.js b/src/main/ui/static/templates/billCode/js/pc_payment.js index e69cdfa9f..feda74b2f 100644 --- a/src/main/ui/static/templates/billCode/js/pc_payment.js +++ b/src/main/ui/static/templates/billCode/js/pc_payment.js @@ -19,6 +19,9 @@ $(document).ready(function () { }else if(window.clientInfo.enable_cb_bankpay){ var paymentFun = 'Bank'; showQRcode(); + }else if(window.clientInfo.enable_alipayaps){ + var paymentFun = 'AlipayAps'; + showQRcode(); } startCheckOrder(); @@ -43,6 +46,8 @@ $(document).ready(function () { $("#select_wechat").removeClass("no-select-pay-fun").addClass("select-pay-fun"); $("#select_alipay").removeClass("select-pay-fun").addClass("no-select-pay-fun"); $("#select_bank").removeClass("select-pay-fun").addClass("no-select-pay-fun"); + $("#select_alipay_aps").removeClass("select-pay-fun").addClass("no-select-pay-fun"); + showQRcode(); } }) @@ -52,6 +57,18 @@ $(document).ready(function () { $("#select_wechat").removeClass("select-pay-fun").addClass("no-select-pay-fun"); $("#select_alipay").removeClass("no-select-pay-fun").addClass("select-pay-fun"); $("#select_bank").removeClass("select-pay-fun").addClass("no-select-pay-fun"); + $("#select_alipay_aps").removeClass("select-pay-fun").addClass("no-select-pay-fun"); + showQRcode(); + } + }) + $("#select_alipay_aps").click(function(){ + if(paymentFun != 'AlipayAps'){ + paymentFun = 'AlipayAps' + $("#select_wechat").removeClass("select-pay-fun").addClass("no-select-pay-fun"); + $("#select_alipay").removeClass("select-pay-fun").addClass("no-select-pay-fun"); + $("#select_bank").removeClass("select-pay-fun").addClass("no-select-pay-fun"); + $("#select_alipay_aps").removeClass("no-select-pay-fun").addClass("select-pay-fun"); + showQRcode(); } }) @@ -61,6 +78,7 @@ $(document).ready(function () { $("#select_wechat").removeClass("select-pay-fun").addClass("no-select-pay-fun"); $("#select_alipay").removeClass("select-pay-fun").addClass("no-select-pay-fun"); $("#select_bank").removeClass("no-select-pay-fun").addClass("select-pay-fun"); + $("#select_alipay_aps").removeClass("select-pay-fun").addClass("no-select-pay-fun"); showQRcode(); } }) @@ -85,7 +103,15 @@ $(document).ready(function () { "
请使用" + channelName + "客户端扫码支付
" + ""; $('#qrImg').append(selectPaymentHTML) - } else if (paymentFun == 'Bank') { + } + else if (paymentFun == 'AlipayAps') { + $('#qrImg').empty(); + document.getElementById("qrImg").style.display = 'block'; + var selectPaymentHTML = + "请使用" + channelName + "客户端扫码支付
" + + ""; + $('#qrImg').append(selectPaymentHTML) + }else if (paymentFun == 'Bank') { $('#qrImg').empty(); document.getElementById("qrImg").style.display = 'block'; if( hasPayment){ diff --git a/src/main/ui/static/templates/skip_wxbrowser.css b/src/main/ui/static/templates/skip_wxbrowser.css index e91cd1866..e9a832f30 100644 --- a/src/main/ui/static/templates/skip_wxbrowser.css +++ b/src/main/ui/static/templates/skip_wxbrowser.css @@ -59,6 +59,15 @@ body { background-size: contain; } +.result-alipayaps-logo { + width: 80px; + height: 80px; + margin: auto; + background-image: url(/static/images/alipay_aps_big.svg); + background-repeat: no-repeat; + background-size: contain; +} + .result-royalpay-logo { width: 70px; height: 98px;