From ceaf3394b8e8d6f6c450472a31eccec5b87a326a Mon Sep 17 00:00:00 2001 From: Yixian Date: Fri, 18 Feb 2022 09:56:39 +0800 Subject: [PATCH 1/7] document: remove sandbox --- src/document/openapi/cn/document.yml | 2 -- src/document/openapi/en/document.yml | 2 -- 2 files changed, 4 deletions(-) diff --git a/src/document/openapi/cn/document.yml b/src/document/openapi/cn/document.yml index b37985abd..990cf3488 100644 --- a/src/document/openapi/cn/document.yml +++ b/src/document/openapi/cn/document.yml @@ -99,8 +99,6 @@ servers: description: production - url: https://au.rpaygroup.com/api/v1.0 description: proxy - - url: https://sandbox.royalpay.com.au/api/v1.0 - description: sandbox tags: - name: PublicApi description: 公共API diff --git a/src/document/openapi/en/document.yml b/src/document/openapi/en/document.yml index ce45d3310..831f9cd80 100644 --- a/src/document/openapi/en/document.yml +++ b/src/document/openapi/en/document.yml @@ -97,8 +97,6 @@ info: servers: - url: https://mpay.royalpay.com.au/api/v1.0 description: production - - url: https://sandbox.royalpay.com.au/api/v1.0 - description: sandbox tags: - name: PublicApi description: Public API From 186f980ac0ce314afa16f21e29457f1b6480831e Mon Sep 17 00:00:00 2001 From: Todking Date: Mon, 28 Feb 2022 15:55:02 +0800 Subject: [PATCH 2/7] =?UTF-8?q?fix=20aps=E7=9B=B8=E5=85=B3=E5=9B=BE?= =?UTF-8?q?=E6=A0=87=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/ui/static/analysis/clearing-log.js | 3 +++ src/main/ui/static/commons/services/clearingDetailService.js | 3 +++ src/main/ui/static/config/bdprize/bdprize.js | 3 +++ 3 files changed, 9 insertions(+) diff --git a/src/main/ui/static/analysis/clearing-log.js b/src/main/ui/static/analysis/clearing-log.js index bfdde620b..de03c8a8f 100644 --- a/src/main/ui/static/analysis/clearing-log.js +++ b/src/main/ui/static/analysis/clearing-log.js @@ -568,6 +568,9 @@ define(['angular', 'decimal', 'uiBootstrap', 'uiRouter', 'angularEcharts'], func return '/static/images/card_payment_sign_lg.png'; case 'rpaypmt_dd': return '/static/images/direct_debit_sign_lg.png'; + case 'ApsInStore': + case 'ApsCashier': + return '/static/images/alipay_aps.jpg'; } } }); diff --git a/src/main/ui/static/commons/services/clearingDetailService.js b/src/main/ui/static/commons/services/clearingDetailService.js index 1acf1105a..8cdb197b3 100644 --- a/src/main/ui/static/commons/services/clearingDetailService.js +++ b/src/main/ui/static/commons/services/clearingDetailService.js @@ -121,6 +121,9 @@ define(['../app','decimal'], function (app,Decimal) { return '/static/images/card_payment_sign_lg.png'; case 'rpaypmt_dd': return '/static/images/direct_debit_sign_lg.png'; + case 'ApsInStore': + case 'ApsCashier': + return '/static/images/alipay_aps.jpg'; } } }); diff --git a/src/main/ui/static/config/bdprize/bdprize.js b/src/main/ui/static/config/bdprize/bdprize.js index 16a873dd7..e6446c99a 100644 --- a/src/main/ui/static/config/bdprize/bdprize.js +++ b/src/main/ui/static/config/bdprize/bdprize.js @@ -526,6 +526,9 @@ define(['angular', '../../analysis/bd/analysis-bd'], function (angular) { return '/static/images/card_payment_sign_lg.png' case 'rpaypmt_dd': return '/static/images/direct_debit_sign_lg.png' + case 'ApsInStore': + case 'ApsCashier': + return '/static/images/alipay_aps.jpg'; } } }) From 84cd9f30f4e8ea6e0a4db1b4a45dd7bc8015daac Mon Sep 17 00:00:00 2001 From: dalong306 <304592994@qq.com> Date: Mon, 7 Mar 2022 17:23:48 +0800 Subject: [PATCH 3/7] =?UTF-8?q?=E8=B4=A6=E5=8D=95=E7=A0=81=20js=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 2 +- .../templates/billCode/js/mobile_payment.js | 44 ++++++++++++++++++- 2 files changed, 44 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index c05d0c960..1e9190c3b 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ 4.0.0 manage - 2.4.9 + 2.4.10 UTF-8 2.4.0 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 ca4e81309..1cbd03e21 100644 --- a/src/main/ui/static/templates/billCode/js/mobile_payment.js +++ b/src/main/ui/static/templates/billCode/js/mobile_payment.js @@ -107,7 +107,7 @@ $(document).ready(function () { } if(paymentFun == 'AlipayAps'){ if(window.openmobilefun == 'alipayaps'){ - callPayment(res); + callAlipayAps(res); }else{ redirectH5PaymentForAps(res.partner_order_id,res.client_moniker) } @@ -297,4 +297,46 @@ $(document).ready(function () { checkOrderStd(); } + function callApp(scheme_seq, index, timeout) { + let timer, start = new Date().getTime() + let promise = new Promise(((resolve, reject) => { + location.href = scheme_seq[index] + window.addEventListener('visibilitychange', () => { + if (document.visibilityState === 'hidden') { + clearTimeout(timer); + resolve() + } + }); + timer = setTimeout(() => { + let end = new Date().getTime() + if (end - start > timeout + 1000) { + clearTimeout(timer) + resolve() + } else { + if (index + 1 < scheme_seq.length) { + callApp(scheme_seq, index + 1, timeout).then(resolve, reject) + } else { + reject() + } + } + }, timeout) + })) + return promise + } + function callAlipayAps(order) { + + if(order.jsapi){ + let try_sequence = [order.jsapi.scheme_url, order.jsapi.applink_url, order.jsapi.normal_url] + try_sequence = try_sequence.filter(v => v != null) + callApp(try_sequence, 0, 5000).then(() => { + alert('redirect success') + }, () => { + alert('redirect failure') + }) + }else { + location.href = order.web_url + } + } + + }); \ No newline at end of file From 14cfcd8bff9e96d686a29cf4d40bf7879b6740e2 Mon Sep 17 00:00:00 2001 From: dalong306 <304592994@qq.com> Date: Mon, 7 Mar 2022 18:06:26 +0800 Subject: [PATCH 4/7] =?UTF-8?q?order.jsapi.normal=5Furl=20=E6=94=BE?= =?UTF-8?q?=E5=9C=A8=E5=89=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/ui/static/templates/billCode/js/mobile_payment.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 1cbd03e21..9c4b57f94 100644 --- a/src/main/ui/static/templates/billCode/js/mobile_payment.js +++ b/src/main/ui/static/templates/billCode/js/mobile_payment.js @@ -326,7 +326,7 @@ $(document).ready(function () { function callAlipayAps(order) { if(order.jsapi){ - let try_sequence = [order.jsapi.scheme_url, order.jsapi.applink_url, order.jsapi.normal_url] + let try_sequence = [order.jsapi.normal_url,order.jsapi.scheme_url, order.jsapi.applink_url] try_sequence = try_sequence.filter(v => v != null) callApp(try_sequence, 0, 5000).then(() => { alert('redirect success') From 03afb1306e3b0ef6639982ae9cfffeaedeaefbf8 Mon Sep 17 00:00:00 2001 From: Yixian Date: Thu, 10 Mar 2022 14:32:25 +0800 Subject: [PATCH 5/7] documents update --- src/document/openapi/cn/document.yml | 6 +++--- src/document/openapi/en/document.yml | 28 ++++++++++++++-------------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/document/openapi/cn/document.yml b/src/document/openapi/cn/document.yml index 990cf3488..4bfbc5465 100644 --- a/src/document/openapi/cn/document.yml +++ b/src/document/openapi/cn/document.yml @@ -865,13 +865,13 @@ paths: code_url: type: string description: 付款码字符串,商户可自行生成二维码 # todo - /alipay/partners/{partner_code}/orders/{partner_order_id}: + /web_gateway/partners/{partner_code}/orders/{partner_order_id}: put: summary: 渠道网关订单下单 x-sort-order: 0 description: | - 创建订单后跳转到返回的pay_url(需附加签名参数和redirect参数),随后进入支付宝支付页面完成支付 - 该接口现仅支持支付宝。 + 创建订单后跳转到返回的pay_url(需附加签名参数和redirect参数),随后进入渠道网关支付页面完成支付 + 该接口现仅支持支付宝和Alipay+。 tags: - ChannelGateway parameters: diff --git a/src/document/openapi/en/document.yml b/src/document/openapi/en/document.yml index 831f9cd80..0665f2fa0 100644 --- a/src/document/openapi/en/document.yml +++ b/src/document/openapi/en/document.yml @@ -145,10 +145,10 @@ tags: Retail payment API for merchants has their own machine. Has 2 modes: - Merchant scanner scan customer provided payment code.(B scan C) - Customer scan merchant provided collection code. (C scan B) - - name: AlipayOnline + - name: ChannelGateway description: | - Use for Alipay Payment in PC Website. After create order, jump to the pay_url returned and attach sign params and redirect param. Then enter Alipay page to finish payment. - Alipay Channel only + Use for Channel Cashier Payment in PC Website. After create order, jump to the pay_url returned and attach sign params and redirect param. Then enter Channel cashier page to finish payment. + Alipay and AlipayPlus Channels only - name: CB Bank description: | @@ -260,7 +260,7 @@ paths: - SDK Payment - CB Bank - RetailPay - - AlipayOnline + - ChannelGateway - CardPayment - MiniProgram - MobileH5 @@ -288,7 +288,7 @@ paths: - SDK Payment - CB Bank - RetailPay - - AlipayOnline + - ChannelGateway - CardPayment - MiniProgram - MobileH5 @@ -888,14 +888,14 @@ paths: code_url: type: string description: QR Code string. Partners can create the payment QR Code according to this value. - /alipay/partners/{partner_code}/orders/{partner_order_id}: + /web_gateway/partners/{partner_code}/orders/{partner_order_id}: put: - summary: Alipay WEB Order + summary: Channel WEB Order description: | - Use for Alipay Payment in PC Website. After create order, jump to the pay_url returned and attach sign params and redirect param. Then enter Alipay page to finish payment. - Alipay Channel Only. + Use for Channel Payment Cashier in PC Website. After create order, jump to the pay_url returned and attach sign params and redirect param. Then enter Channel cashier page to finish payment. + Alipay and AlipayPlus only at the moment. tags: - - AlipayOnline + - ChannelGateway parameters: - name: partner_code in: path @@ -1106,7 +1106,7 @@ paths: - MobileH5 - MiniProgram - CardPayment - - AlipayOnline + - ChannelGateway - RetailPay - CB Bank - SDK Payment @@ -1151,7 +1151,7 @@ paths: - MobileH5 - MiniProgram - CardPayment - - AlipayOnline + - ChannelGateway - RetailPay - CB Bank - SDK Payment @@ -1331,7 +1331,7 @@ paths: - SDK Payment - CB Bank - RetailPay - - AlipayOnline + - ChannelGateway - CardPayment - MiniProgram - MobileH5 @@ -1376,7 +1376,7 @@ paths: description: Currency, AUD channel: type: string - description: Payment Channel Alipay, AlipayOnline, Wechat + description: Payment Channel Alipay, AlipayOnline, Wechat, AlipayPlus create_time: type: string format: 'date-time' From c2cc5a9bba3c436832522ad2c73cb932703d3f2c Mon Sep 17 00:00:00 2001 From: dalong306 <304592994@qq.com> Date: Fri, 11 Mar 2022 10:50:44 +0800 Subject: [PATCH 6/7] =?UTF-8?q?=E5=BE=AE=E4=BF=A1=E6=8A=A5=E5=A4=87?= =?UTF-8?q?=E4=B8=AA=E4=BA=BA=E4=B9=9F=E5=A2=9E=E5=8A=A0=E6=97=A5=E6=9C=9F?= =?UTF-8?q?=E5=92=8C=E8=AF=81=E4=B9=A6=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 4 ++-- .../ui/static/payment/partner/partner-manage.js | 14 +++++++------- .../payment/partner/templates/add_partner.html | 2 +- .../partner/templates/add_sub_partner_dialog.html | 2 +- .../templates/new_apply_wx_sub_merchant_id.html | 4 ++-- .../payment/partner/templates/partner_edit.html | 2 +- .../templates/update_apply_wx_sub_merchant_id.html | 4 ++-- 7 files changed, 16 insertions(+), 16 deletions(-) diff --git a/pom.xml b/pom.xml index 1e9190c3b..3b1cfe504 100644 --- a/pom.xml +++ b/pom.xml @@ -5,11 +5,11 @@ au.com.royalpay.payment payment-parent - 2.3.6 + 2.3.7 4.0.0 manage - 2.4.10 + 2.4.11 UTF-8 2.4.0 diff --git a/src/main/ui/static/payment/partner/partner-manage.js b/src/main/ui/static/payment/partner/partner-manage.js index 2c9e5aa1e..ee5562f0f 100644 --- a/src/main/ui/static/payment/partner/partner-manage.js +++ b/src/main/ui/static/payment/partner/partner-manage.js @@ -7143,7 +7143,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter params.company_website = null } - if (params.merchant_type == 'ENTERPRISE') { + // if (params.merchant_type == 'ENTERPRISE') { params.director_name = $scope.subMerchantInfo.director_name params.director_id_number = $scope.subMerchantInfo.director_id_number params.company_register_no = $scope.subMerchantInfo.company_register_no @@ -7159,10 +7159,10 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter alert('Certificate expiration time is required') return } - } else { - params.principal_name = $scope.subMerchantInfo.principal_name - params.principal_id_number = $scope.subMerchantInfo.principal_id_number - } + // } else { + // params.principal_name = $scope.subMerchantInfo.principal_name + // params.principal_id_number = $scope.subMerchantInfo.principal_id_number + // } $http.post('/sys/partners/' + $scope.subMerchantInfo.client_moniker + '/new_sub_apply', params).then( function (resp) { @@ -7334,7 +7334,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter // params.principal_name = $scope.subMerchantInfo.principal_name; // params.principal_id_number = $scope.subMerchantInfo.principal_id_number; // } - if (params.merchant_type == 'ENTERPRISE') { + // if (params.merchant_type == 'ENTERPRISE') { params.company_register_no = $scope.subMerchantInfo.company_register_no params.certificat_expire_date = $scope.subMerchantInfo.certificat_expire_date if ($scope.subMerchantInfo.certificat_expire_date_d) { @@ -7347,7 +7347,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter alert('Certificate expiration time is required') return } - } + // } $http.put('/sys/partners/' + $scope.merchantInfo.client_moniker + '/get_merchant_ids/' + $scope.subMerchantInfo.merchant_app_id, params).then( function (resp) { $scope.apply_sub_merchant_id = resp.data diff --git a/src/main/ui/static/payment/partner/templates/add_partner.html b/src/main/ui/static/payment/partner/templates/add_partner.html index 720d630d4..0bff4f0c3 100644 --- a/src/main/ui/static/payment/partner/templates/add_partner.html +++ b/src/main/ui/static/payment/partner/templates/add_partner.html @@ -309,7 +309,7 @@ -
diff --git a/src/main/ui/static/payment/partner/templates/add_sub_partner_dialog.html b/src/main/ui/static/payment/partner/templates/add_sub_partner_dialog.html index 350ef9e59..79bf783f4 100644 --- a/src/main/ui/static/payment/partner/templates/add_sub_partner_dialog.html +++ b/src/main/ui/static/payment/partner/templates/add_sub_partner_dialog.html @@ -233,7 +233,7 @@
-
diff --git a/src/main/ui/static/payment/partner/templates/new_apply_wx_sub_merchant_id.html b/src/main/ui/static/payment/partner/templates/new_apply_wx_sub_merchant_id.html index 8db9d696a..792d1860e 100644 --- a/src/main/ui/static/payment/partner/templates/new_apply_wx_sub_merchant_id.html +++ b/src/main/ui/static/payment/partner/templates/new_apply_wx_sub_merchant_id.html @@ -213,7 +213,7 @@
-
@@ -227,7 +227,7 @@
-
diff --git a/src/main/ui/static/payment/partner/templates/partner_edit.html b/src/main/ui/static/payment/partner/templates/partner_edit.html index 588de9045..755c05b7d 100644 --- a/src/main/ui/static/payment/partner/templates/partner_edit.html +++ b/src/main/ui/static/payment/partner/templates/partner_edit.html @@ -330,7 +330,7 @@
-
diff --git a/src/main/ui/static/payment/partner/templates/update_apply_wx_sub_merchant_id.html b/src/main/ui/static/payment/partner/templates/update_apply_wx_sub_merchant_id.html index 13a41048d..da11ac457 100644 --- a/src/main/ui/static/payment/partner/templates/update_apply_wx_sub_merchant_id.html +++ b/src/main/ui/static/payment/partner/templates/update_apply_wx_sub_merchant_id.html @@ -223,7 +223,7 @@
-
@@ -255,7 +255,7 @@ -
From a3e5a4beb7607c4ce8ef881693f4eca1caaaf693 Mon Sep 17 00:00:00 2001 From: dalong306 <304592994@qq.com> Date: Wed, 16 Mar 2022 11:04:07 +0800 Subject: [PATCH 7/7] =?UTF-8?q?a+=E6=B5=B7=E5=A4=96=E9=92=B1=E5=8C=85?= =?UTF-8?q?=E4=B8=8D=E8=B5=B0=E7=BA=BF=E4=B8=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 2 +- src/main/ui/static/templates/alipayaps/v1/payment.js | 1 + src/main/ui/static/templates/alipayaps/v4/payment.js | 2 ++ src/main/ui/static/templates/alipayaps/v5/payment.js | 2 ++ 4 files changed, 6 insertions(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 3b1cfe504..c44941411 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ 4.0.0 manage - 2.4.11 + 2.4.12 UTF-8 2.4.0 diff --git a/src/main/ui/static/templates/alipayaps/v1/payment.js b/src/main/ui/static/templates/alipayaps/v1/payment.js index 901912491..f38b16818 100644 --- a/src/main/ui/static/templates/alipayaps/v1/payment.js +++ b/src/main/ui/static/templates/alipayaps/v1/payment.js @@ -256,6 +256,7 @@ $(function () { } data.coupons = dataCache.coupons; data.qrcodeVersion = window.qrcodeVersion; + data.apsoverseas = window.apsoverseas; $.ajax({ url: '/api/v1.0/alipay_aps/partners/' + window.client_moniker + '/orders', diff --git a/src/main/ui/static/templates/alipayaps/v4/payment.js b/src/main/ui/static/templates/alipayaps/v4/payment.js index 19ed5b9ed..5f26928b8 100644 --- a/src/main/ui/static/templates/alipayaps/v4/payment.js +++ b/src/main/ui/static/templates/alipayaps/v4/payment.js @@ -302,6 +302,8 @@ $(function () { } data.coupons = dataCache.coupons; data.qrcodeVersion = window.qrcodeVersion; + data.apsoverseas = window.apsoverseas; + $.ajax({ url: '/api/v1.0/alipay_aps/partners/' + window.client_moniker + '/orders', method: 'POST', diff --git a/src/main/ui/static/templates/alipayaps/v5/payment.js b/src/main/ui/static/templates/alipayaps/v5/payment.js index f5d4c4543..60cd485e7 100644 --- a/src/main/ui/static/templates/alipayaps/v5/payment.js +++ b/src/main/ui/static/templates/alipayaps/v5/payment.js @@ -265,6 +265,8 @@ $(function () { } data.coupons = dataCache.coupons; data.qrcodeVersion = window.qrcodeVersion; + data.apsoverseas = window.apsoverseas; + $.ajax({ url: '/api/v1.0/alipay_aps/partners/' + window.client_moniker + '/orders', method: 'POST',