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

master
ycfxx 4 years ago
commit 3c0f352a4b

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

@ -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
@ -867,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:

@ -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
@ -147,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
<img src="img/alipayOnline_en.png">
- name: CB Bank
description: |
@ -262,7 +260,7 @@ paths:
- SDK Payment
- CB Bank
- RetailPay
- AlipayOnline
- ChannelGateway
- CardPayment
- MiniProgram
- MobileH5
@ -290,7 +288,7 @@ paths:
- SDK Payment
- CB Bank
- RetailPay
- AlipayOnline
- ChannelGateway
- CardPayment
- MiniProgram
- MobileH5
@ -890,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
@ -1108,7 +1106,7 @@ paths:
- MobileH5
- MiniProgram
- CardPayment
- AlipayOnline
- ChannelGateway
- RetailPay
- CB Bank
- SDK Payment
@ -1153,7 +1151,7 @@ paths:
- MobileH5
- MiniProgram
- CardPayment
- AlipayOnline
- ChannelGateway
- RetailPay
- CB Bank
- SDK Payment
@ -1333,7 +1331,7 @@ paths:
- SDK Payment
- CB Bank
- RetailPay
- AlipayOnline
- ChannelGateway
- CardPayment
- MiniProgram
- MobileH5
@ -1378,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'

@ -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';
}
}
});

@ -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';
}
}
});

@ -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';
}
}
})

@ -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

@ -309,7 +309,7 @@
</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}">
<label class="control-label col-sm-2" for="certificat_expire_date_input">* Expiration Date of Registration Certificat</label>
<div class="col-sm-8">

@ -233,7 +233,7 @@
</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}">
<label class="control-label col-sm-2" for="certificat_expire_date_input">* Expiration Date of Registration Certificat</label>
<div class="col-sm-8">

@ -213,7 +213,7 @@
</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}">
<label class="control-label col-sm-3" for="company_register_no_input">* Company registration document No</label>
<div class="col-sm-8">
@ -227,7 +227,7 @@
</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}">
<label class="control-label col-sm-3" for="certificat_expire_date_input">* Expiration Date of Registration Certificat</label>
<div class="col-sm-8">

@ -330,7 +330,7 @@
</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}">
<label class="control-label col-sm-2" for="certificat_expire_date_input">* Expiration Date of Registration Certificat</label>
<div class="col-sm-8">

@ -223,7 +223,7 @@
</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}">
<label class="control-label col-sm-3" for="company_register_no_input">* Company registration document No </label>
<div class="col-sm-8">
@ -255,7 +255,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}">
<label class="control-label col-sm-3" for="certificat_expire_date_input">* Expiration Date of Registration Certificat</label>
<div class="col-sm-8">

@ -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',

@ -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',

@ -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',

@ -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.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