card permission api

master
yixian 4 years ago
parent 7e84672e6d
commit 59987598ab

@ -1500,6 +1500,9 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
if (client == null) {
throw new InvalidShortIdException();
}
if (StringUtils.isEmpty(profileKey)) {
throw new BadRequestException("Key not provided");
}
clientModifySupport.processModify(new CustomSwitchModify(manager, clientMoniker, profileKey, allow, cli -> {
JSONObject profileUpdate = new JSONObject();
profileUpdate.put(profileKey, allow);
@ -7060,7 +7063,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
JSONObject upayProfileInfo = sysClientUpayProfileMapper.findInfo(clientId);
JSONObject info = new JSONObject();
info.put("down_date", formatter.print(new DateTime()));//下载文件日
info.put("letter_offer_sub_time",currentRate.getDate("active_time"));
info.put("letter_offer_sub_time", currentRate.getDate("active_time"));
info.put("bussiness_name", (client.containsKey("business_name") ? client.getString("business_name") : legalInfo.getString("representative_person")) + " " + client.getString("abn"));//商圈类型
info.put("partner_address", client.getString("address"));//商家店铺地址
info.put("partner_country", client.getString("country"));//国家

@ -1003,7 +1003,7 @@ public class PartnerManageController {
*/
@ManagerMapping(value = "/{clientMoniker}/payment_card_permission", method = RequestMethod.PUT, role = {ManagerRole.ADMIN, ManagerRole.OPERATOR})
public void switchInternationalCard(@PathVariable String clientMoniker, @RequestBody JSONObject pass, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
clientManager.modifyUPayProfile(manager, clientMoniker, "enable_international_card", pass.getBooleanValue("allow"));
clientManager.modifyUPayProfile(manager, clientMoniker, pass.getString("key"), pass.getBooleanValue("allow"));
}
}

@ -2252,7 +2252,32 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
$scope.init.enable_International_card = true;
return;
}
$http.put('/sys/partners/' + $scope.partner.client_moniker + '/payment_card_permission', {allow: $scope.paymentInfo.enable_international_card}).then(function () {
$http.put('/sys/partners/' + $scope.partner.client_moniker + '/payment_card_permission', {
key: 'enable_international_card',
allow: $scope.paymentInfo.enable_international_card
}).then(function () {
$scope.loadPartnerPaymentInfo();
}, function (resp) {
commonDialog.alert({
title: 'failed to change international card permission status',
content: resp.data.message,
type: 'error'
})
})
};
$scope.switchThreeDS = function () {
if (!$scope.paymentInfo) {
return;
}
if (!$scope.init.enable_threeds) {
$scope.init.enable_threeds = true;
return;
}
$http.put('/sys/partners/' + $scope.partner.client_moniker + '/payment_card_permission', {
allow: $scope.paymentInfo.enable_threeds,
'key': 'enable_threeds'
}).then(function () {
$scope.loadPartnerPaymentInfo();
}, function (resp) {
commonDialog.alert({

@ -470,6 +470,13 @@
switch-change="switchInternationalCard()">
</div>
</div>
<div class="form-group" ng-if="'111'|withRole">
<label class="col-sm-2 control-label">Enable 3DS</label>
<div class="col-sm-10">
<input type="checkbox" ng-model="paymentInfo.enable_threeds" bs-switch
switch-change="switchThreeDS()">
</div>
</div>
</div>
</div>
</div>

Loading…
Cancel
Save