Merge remote-tracking branch 'origin/production' into production

master
ycfxx 4 years ago
commit 3c0f352a4b

@ -5,11 +5,11 @@
<parent> <parent>
<groupId>au.com.royalpay.payment</groupId> <groupId>au.com.royalpay.payment</groupId>
<artifactId>payment-parent</artifactId> <artifactId>payment-parent</artifactId>
<version>2.3.6</version> <version>2.3.7</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>manage</artifactId> <artifactId>manage</artifactId>
<version>2.4.9</version> <version>2.4.12</version>
<properties> <properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<jib-maven-plugin.version>2.4.0</jib-maven-plugin.version> <jib-maven-plugin.version>2.4.0</jib-maven-plugin.version>

@ -99,8 +99,6 @@ servers:
description: production description: production
- url: https://au.rpaygroup.com/api/v1.0 - url: https://au.rpaygroup.com/api/v1.0
description: proxy description: proxy
- url: https://sandbox.royalpay.com.au/api/v1.0
description: sandbox
tags: tags:
- name: PublicApi - name: PublicApi
description: 公共API description: 公共API
@ -867,13 +865,13 @@ paths:
code_url: code_url:
type: string type: string
description: 付款码字符串,商户可自行生成二维码 # todo description: 付款码字符串,商户可自行生成二维码 # todo
/alipay/partners/{partner_code}/orders/{partner_order_id}: /web_gateway/partners/{partner_code}/orders/{partner_order_id}:
put: put:
summary: 渠道网关订单下单 summary: 渠道网关订单下单
x-sort-order: 0 x-sort-order: 0
description: | description: |
创建订单后跳转到返回的pay_url需附加签名参数和redirect参数随后进入支付宝支付页面完成支付 创建订单后跳转到返回的pay_url需附加签名参数和redirect参数随后进入渠道网关支付页面完成支付
该接口现仅支持支付宝 该接口现仅支持支付宝和Alipay+
tags: tags:
- ChannelGateway - ChannelGateway
parameters: parameters:

@ -97,8 +97,6 @@ info:
servers: servers:
- url: https://mpay.royalpay.com.au/api/v1.0 - url: https://mpay.royalpay.com.au/api/v1.0
description: production description: production
- url: https://sandbox.royalpay.com.au/api/v1.0
description: sandbox
tags: tags:
- name: PublicApi - name: PublicApi
description: Public API description: Public API
@ -147,10 +145,10 @@ tags:
Retail payment API for merchants has their own machine. Has 2 modes: Retail payment API for merchants has their own machine. Has 2 modes:
- Merchant scanner scan customer provided payment code.(B scan C) - Merchant scanner scan customer provided payment code.(B scan C)
- Customer scan merchant provided collection code. (C scan B) - Customer scan merchant provided collection code. (C scan B)
- name: AlipayOnline - name: ChannelGateway
description: | 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. 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 Channel only Alipay and AlipayPlus Channels only
<img src="img/alipayOnline_en.png"> <img src="img/alipayOnline_en.png">
- name: CB Bank - name: CB Bank
description: | description: |
@ -262,7 +260,7 @@ paths:
- SDK Payment - SDK Payment
- CB Bank - CB Bank
- RetailPay - RetailPay
- AlipayOnline - ChannelGateway
- CardPayment - CardPayment
- MiniProgram - MiniProgram
- MobileH5 - MobileH5
@ -290,7 +288,7 @@ paths:
- SDK Payment - SDK Payment
- CB Bank - CB Bank
- RetailPay - RetailPay
- AlipayOnline - ChannelGateway
- CardPayment - CardPayment
- MiniProgram - MiniProgram
- MobileH5 - MobileH5
@ -890,14 +888,14 @@ paths:
code_url: code_url:
type: string type: string
description: QR Code string. Partners can create the payment QR Code according to this value. 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: put:
summary: Alipay WEB Order summary: Channel WEB Order
description: | 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. 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 Channel Only. Alipay and AlipayPlus only at the moment.
tags: tags:
- AlipayOnline - ChannelGateway
parameters: parameters:
- name: partner_code - name: partner_code
in: path in: path
@ -1108,7 +1106,7 @@ paths:
- MobileH5 - MobileH5
- MiniProgram - MiniProgram
- CardPayment - CardPayment
- AlipayOnline - ChannelGateway
- RetailPay - RetailPay
- CB Bank - CB Bank
- SDK Payment - SDK Payment
@ -1153,7 +1151,7 @@ paths:
- MobileH5 - MobileH5
- MiniProgram - MiniProgram
- CardPayment - CardPayment
- AlipayOnline - ChannelGateway
- RetailPay - RetailPay
- CB Bank - CB Bank
- SDK Payment - SDK Payment
@ -1333,7 +1331,7 @@ paths:
- SDK Payment - SDK Payment
- CB Bank - CB Bank
- RetailPay - RetailPay
- AlipayOnline - ChannelGateway
- CardPayment - CardPayment
- MiniProgram - MiniProgram
- MobileH5 - MobileH5
@ -1378,7 +1376,7 @@ paths:
description: Currency, AUD description: Currency, AUD
channel: channel:
type: string type: string
description: Payment Channel Alipay, AlipayOnline, Wechat description: Payment Channel Alipay, AlipayOnline, Wechat, AlipayPlus
create_time: create_time:
type: string type: string
format: 'date-time' format: 'date-time'

@ -568,6 +568,9 @@ define(['angular', 'decimal', 'uiBootstrap', 'uiRouter', 'angularEcharts'], func
return '/static/images/card_payment_sign_lg.png'; return '/static/images/card_payment_sign_lg.png';
case 'rpaypmt_dd': case 'rpaypmt_dd':
return '/static/images/direct_debit_sign_lg.png'; return '/static/images/direct_debit_sign_lg.png';
case 'ApsInStore':
case 'ApsCashier':
return '/static/images/alipay_aps.jpg';
} }
} }
}); });

@ -121,6 +121,9 @@ define(['../app','decimal'], function (app,Decimal) {
return '/static/images/card_payment_sign_lg.png'; return '/static/images/card_payment_sign_lg.png';
case 'rpaypmt_dd': case 'rpaypmt_dd':
return '/static/images/direct_debit_sign_lg.png'; return '/static/images/direct_debit_sign_lg.png';
case 'ApsInStore':
case 'ApsCashier':
return '/static/images/alipay_aps.jpg';
} }
} }
}); });

@ -526,6 +526,9 @@ define(['angular', '../../analysis/bd/analysis-bd'], function (angular) {
return '/static/images/card_payment_sign_lg.png' return '/static/images/card_payment_sign_lg.png'
case 'rpaypmt_dd': case 'rpaypmt_dd':
return '/static/images/direct_debit_sign_lg.png' return '/static/images/direct_debit_sign_lg.png'
case 'ApsInStore':
case 'ApsCashier':
return '/static/images/alipay_aps.jpg';
} }
} }
}) })

@ -7143,7 +7143,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
params.company_website = null params.company_website = null
} }
if (params.merchant_type == 'ENTERPRISE') { // if (params.merchant_type == 'ENTERPRISE') {
params.director_name = $scope.subMerchantInfo.director_name params.director_name = $scope.subMerchantInfo.director_name
params.director_id_number = $scope.subMerchantInfo.director_id_number params.director_id_number = $scope.subMerchantInfo.director_id_number
params.company_register_no = $scope.subMerchantInfo.company_register_no 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') alert('Certificate expiration time is required')
return return
} }
} else { // } else {
params.principal_name = $scope.subMerchantInfo.principal_name // params.principal_name = $scope.subMerchantInfo.principal_name
params.principal_id_number = $scope.subMerchantInfo.principal_id_number // params.principal_id_number = $scope.subMerchantInfo.principal_id_number
} // }
$http.post('/sys/partners/' + $scope.subMerchantInfo.client_moniker + '/new_sub_apply', params).then( $http.post('/sys/partners/' + $scope.subMerchantInfo.client_moniker + '/new_sub_apply', params).then(
function (resp) { function (resp) {
@ -7334,7 +7334,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
// params.principal_name = $scope.subMerchantInfo.principal_name; // params.principal_name = $scope.subMerchantInfo.principal_name;
// params.principal_id_number = $scope.subMerchantInfo.principal_id_number; // 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.company_register_no = $scope.subMerchantInfo.company_register_no
params.certificat_expire_date = $scope.subMerchantInfo.certificat_expire_date params.certificat_expire_date = $scope.subMerchantInfo.certificat_expire_date
if ($scope.subMerchantInfo.certificat_expire_date_d) { 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') alert('Certificate expiration time is required')
return return
} }
} // }
$http.put('/sys/partners/' + $scope.merchantInfo.client_moniker + '/get_merchant_ids/' + $scope.subMerchantInfo.merchant_app_id, params).then( $http.put('/sys/partners/' + $scope.merchantInfo.client_moniker + '/get_merchant_ids/' + $scope.subMerchantInfo.merchant_app_id, params).then(
function (resp) { function (resp) {
$scope.apply_sub_merchant_id = resp.data $scope.apply_sub_merchant_id = resp.data

@ -309,7 +309,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="form-group" ng-if="partner.business_structure != null&&partner.business_structure!='Registered body(Sole Trader)'" <div class="form-group"
ng-class="{'has-error':partnerForm.certificat_expire_date.$invalid && partnerForm.certificat_expire_date.$dirty}"> ng-class="{'has-error':partnerForm.certificat_expire_date.$invalid && partnerForm.certificat_expire_date.$dirty}">
<label class="control-label col-sm-2" for="certificat_expire_date_input">* Expiration Date of Registration Certificat</label> <label class="control-label col-sm-2" for="certificat_expire_date_input">* Expiration Date of Registration Certificat</label>
<div class="col-sm-8"> <div class="col-sm-8">

@ -233,7 +233,7 @@
</div> </div>
</div> </div>
<div class="form-group" ng-if="partner.business_structure != null&&partner.business_structure!='Registered body(Sole Trader)'" <div class="form-group"
ng-class="{'has-error':partnerForm.certificat_expire_date.$invalid && partnerForm.certificat_expire_date.$dirty}"> ng-class="{'has-error':partnerForm.certificat_expire_date.$invalid && partnerForm.certificat_expire_date.$dirty}">
<label class="control-label col-sm-2" for="certificat_expire_date_input">* Expiration Date of Registration Certificat</label> <label class="control-label col-sm-2" for="certificat_expire_date_input">* Expiration Date of Registration Certificat</label>
<div class="col-sm-8"> <div class="col-sm-8">

@ -213,7 +213,7 @@
</div> </div>
</div> </div>
<!-- 公司注册号 --> <!-- 公司注册号 -->
<div class="form-group" ng-if="subMerchantInfo.merchant_type == 'ENTERPRISE'" <div class="form-group"
ng-class="{'has-error':subForm.company_register_no.$invalid && subForm.company_register_no.$dirty}"> ng-class="{'has-error':subForm.company_register_no.$invalid && subForm.company_register_no.$dirty}">
<label class="control-label col-sm-3" for="company_register_no_input">* Company registration document No</label> <label class="control-label col-sm-3" for="company_register_no_input">* Company registration document No</label>
<div class="col-sm-8"> <div class="col-sm-8">
@ -227,7 +227,7 @@
</div> </div>
<!-- 注册证书过期时间 --> <!-- 注册证书过期时间 -->
<div class="form-group" ng-if="subMerchantInfo.merchant_type == 'ENTERPRISE'" <div class="form-group"
ng-class="{'has-error':subForm.certificat_expire_date.$invalid && subForm.certificat_expire_date.$dirty}"> ng-class="{'has-error':subForm.certificat_expire_date.$invalid && subForm.certificat_expire_date.$dirty}">
<label class="control-label col-sm-3" for="certificat_expire_date_input">* Expiration Date of Registration Certificat</label> <label class="control-label col-sm-3" for="certificat_expire_date_input">* Expiration Date of Registration Certificat</label>
<div class="col-sm-8"> <div class="col-sm-8">

@ -330,7 +330,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="form-group" ng-if="partner.business_structure != null&&partner.business_structure!='Registered body(Sole Trader)'" <div class="form-group"
ng-class="{'has-error':partnerForm.certificat_expire_date.$invalid && partnerForm.certificat_expire_date.$dirty}"> ng-class="{'has-error':partnerForm.certificat_expire_date.$invalid && partnerForm.certificat_expire_date.$dirty}">
<label class="control-label col-sm-2" for="certificat_expire_date_input">* Expiration Date of Registration Certificat</label> <label class="control-label col-sm-2" for="certificat_expire_date_input">* Expiration Date of Registration Certificat</label>
<div class="col-sm-8"> <div class="col-sm-8">

@ -223,7 +223,7 @@
</div> </div>
</div> </div>
<!-- 公司注册号 --> <!-- 公司注册号 -->
<div class="form-group" ng-if="subMerchantInfo.merchant_type == 'ENTERPRISE'" <div class="form-group"
ng-class="{'has-error':subForm.company_register_no.$invalid && subForm.company_register_no.$dirty}"> ng-class="{'has-error':subForm.company_register_no.$invalid && subForm.company_register_no.$dirty}">
<label class="control-label col-sm-3" for="company_register_no_input">* Company registration document No </label> <label class="control-label col-sm-3" for="company_register_no_input">* Company registration document No </label>
<div class="col-sm-8"> <div class="col-sm-8">
@ -255,7 +255,7 @@
<!--</div>--> <!--</div>-->
<!--</div>--> <!--</div>-->
<!-- 注册证书过期时间 --> <!-- 注册证书过期时间 -->
<div class="form-group" ng-if="subMerchantInfo.merchant_type == 'ENTERPRISE'" <div class="form-group"
ng-class="{'has-error':subForm.certificat_expire_date.$invalid && subForm.certificat_expire_date.$dirty}"> ng-class="{'has-error':subForm.certificat_expire_date.$invalid && subForm.certificat_expire_date.$dirty}">
<label class="control-label col-sm-3" for="certificat_expire_date_input">* Expiration Date of Registration Certificat</label> <label class="control-label col-sm-3" for="certificat_expire_date_input">* Expiration Date of Registration Certificat</label>
<div class="col-sm-8"> <div class="col-sm-8">

@ -256,6 +256,7 @@ $(function () {
} }
data.coupons = dataCache.coupons; data.coupons = dataCache.coupons;
data.qrcodeVersion = window.qrcodeVersion; data.qrcodeVersion = window.qrcodeVersion;
data.apsoverseas = window.apsoverseas;
$.ajax({ $.ajax({
url: '/api/v1.0/alipay_aps/partners/' + window.client_moniker + '/orders', url: '/api/v1.0/alipay_aps/partners/' + window.client_moniker + '/orders',

@ -302,6 +302,8 @@ $(function () {
} }
data.coupons = dataCache.coupons; data.coupons = dataCache.coupons;
data.qrcodeVersion = window.qrcodeVersion; data.qrcodeVersion = window.qrcodeVersion;
data.apsoverseas = window.apsoverseas;
$.ajax({ $.ajax({
url: '/api/v1.0/alipay_aps/partners/' + window.client_moniker + '/orders', url: '/api/v1.0/alipay_aps/partners/' + window.client_moniker + '/orders',
method: 'POST', method: 'POST',

@ -265,6 +265,8 @@ $(function () {
} }
data.coupons = dataCache.coupons; data.coupons = dataCache.coupons;
data.qrcodeVersion = window.qrcodeVersion; data.qrcodeVersion = window.qrcodeVersion;
data.apsoverseas = window.apsoverseas;
$.ajax({ $.ajax({
url: '/api/v1.0/alipay_aps/partners/' + window.client_moniker + '/orders', url: '/api/v1.0/alipay_aps/partners/' + window.client_moniker + '/orders',
method: 'POST', method: 'POST',

@ -107,7 +107,7 @@ $(document).ready(function () {
} }
if(paymentFun == 'AlipayAps'){ if(paymentFun == 'AlipayAps'){
if(window.openmobilefun == 'alipayaps'){ if(window.openmobilefun == 'alipayaps'){
callPayment(res); callAlipayAps(res);
}else{ }else{
redirectH5PaymentForAps(res.partner_order_id,res.client_moniker) redirectH5PaymentForAps(res.partner_order_id,res.client_moniker)
} }
@ -297,4 +297,46 @@ $(document).ready(function () {
checkOrderStd(); 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.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')
}, () => {
alert('redirect failure')
})
}else {
location.href = order.web_url
}
}
}); });
Loading…
Cancel
Save