|
|
|
@ -1079,6 +1079,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
$http.get('/sys/partners/' + $scope.partner.client_moniker).then(function (resp) {
|
|
|
|
|
$scope.paymentInfo = resp.data;
|
|
|
|
|
$scope.ctrl.editSubMerchant = false;
|
|
|
|
|
$scope.ctrl.editAliSubMerchant = false;
|
|
|
|
|
$scope.ctrl.editMaxOrderAmount = false;
|
|
|
|
|
$scope.ctrl.editOrderExpiryConfig = false;
|
|
|
|
|
})
|
|
|
|
@ -1209,6 +1210,18 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'})
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
$scope.saveAliSubMerchantId = function () {
|
|
|
|
|
$http.put('/sys/partners/' + $scope.partner.client_moniker + '/ali_sub_merchant_id', {ali_sub_merchant_id: $scope.paymentInfo.ali_sub_merchant_id}).then(function (resp) {
|
|
|
|
|
commonDialog.alert({
|
|
|
|
|
title: 'Success',
|
|
|
|
|
content: 'Modify Ali Sub Merchant ID successfully',
|
|
|
|
|
type: 'success'
|
|
|
|
|
});
|
|
|
|
|
$scope.loadPartnerPaymentInfo();
|
|
|
|
|
}, function (resp) {
|
|
|
|
|
commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'})
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
$scope.refreshCredential = function () {
|
|
|
|
|
commonDialog.confirm({
|
|
|
|
|
title: 'Warning',
|
|
|
|
@ -1221,7 +1234,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
};
|
|
|
|
|
$scope.init = {jsapi: false, gateway: false, offline: false, refund: false,common_sub_merchant_id:false, channel: {}};
|
|
|
|
|
$scope.init = {jsapi: false, gateway: false, offline: false, refund: false,common_sub_merchant_id:false, channel: {},gateway_alipay_online:false};
|
|
|
|
|
$scope.switchCommonSubMerchantId = function () {
|
|
|
|
|
if (!$scope.paymentInfo) {
|
|
|
|
|
return;
|
|
|
|
@ -1315,6 +1328,24 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
};
|
|
|
|
|
$scope.toggleGatewayAlipayOnline = function () {
|
|
|
|
|
if (!$scope.paymentInfo) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (!$scope.init.gateway_alipay_online) {
|
|
|
|
|
$scope.init.gateway_alipay_online = true;
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
$http.put('/sys/partners/' + $scope.partner.client_moniker + '/gateway_alipay_online', {gateway_alipay_online: $scope.paymentInfo.gateway_alipay_online}).then(function () {
|
|
|
|
|
$scope.loadPartnerPaymentInfo();
|
|
|
|
|
}, function (resp) {
|
|
|
|
|
commonDialog.alert({
|
|
|
|
|
title: 'failed to change Gateway Alipay Online status',
|
|
|
|
|
content: resp.data.message,
|
|
|
|
|
type: 'error'
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
};
|
|
|
|
|
$scope.toggleRefund = function () {
|
|
|
|
|
if (!$scope.paymentInfo) {
|
|
|
|
|
return;
|
|
|
|
|