diff --git a/src/main/ui/static/payment/partner/partner.js b/src/main/ui/static/payment/partner/partner.js index e4cdb0451..7096890c6 100644 --- a/src/main/ui/static/payment/partner/partner.js +++ b/src/main/ui/static/payment/partner/partner.js @@ -560,7 +560,7 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload'], funct }; }]); - app.controller('clientPaymentInfoCtrl', ['$scope', '$http', 'commonDialog', function ($scope, $http, commonDialog) { + app.controller('clientPaymentInfoCtrl', ['$scope', '$http', '$state', 'commonDialog', function ($scope, $http, $state, commonDialog) { $scope.paymentInfo = $scope.partner; $scope.old_customer_surcharge_rate = angular.copy($scope.partner.customer_surcharge_rate); $scope.qrConfig = {currency: 'AUD'}; @@ -829,7 +829,25 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload'], funct $scope.bankshow = false; }; - + // 新增需求,商户端刷新支付秘钥 + $scope.refreshCredential = function () { + commonDialog.confirm({ + title: 'Warning', + content: 'Refresh Credential will expire the current one, ' + + 'which will cause the current payment service disabled. ' + + 'Are you sure going on?' + }).then(function () { + $http.put('/sys/partners/' + $scope.partner.client_moniker + '/credential_code').then(function () { + $state.reload(); + }, function (resp) { + commonDialog.alert({ + title: 'Error', + content: resp.data.message, + type: 'error' + }) + }) + }) + }; }]); app.controller('clientPaymentMaterialCtrl', ['$scope', '$http', 'partner', function ($scope, $http, partner) { diff --git a/src/main/ui/static/payment/partner/templates/client_payment_info.html b/src/main/ui/static/payment/partner/templates/client_payment_info.html index 534d6ca61..ad9158a14 100644 --- a/src/main/ui/static/payment/partner/templates/client_payment_info.html +++ b/src/main/ui/static/payment/partner/templates/client_payment_info.html @@ -87,7 +87,15 @@
-

+

+ + + + +