diff --git a/pom.xml b/pom.xml index c3dae2efc..86ec70e85 100644 --- a/pom.xml +++ b/pom.xml @@ -9,10 +9,11 @@ 4.0.0 manage - 2.3.78 + 2.3.80 UTF-8 2.4.0 + 1.0.12 diff --git a/src/main/java/au/com/royalpay/payment/manage/merchants/core/impls/ClientManagerImpl.java b/src/main/java/au/com/royalpay/payment/manage/merchants/core/impls/ClientManagerImpl.java index e7a24b656..27f800cdd 100644 --- a/src/main/java/au/com/royalpay/payment/manage/merchants/core/impls/ClientManagerImpl.java +++ b/src/main/java/au/com/royalpay/payment/manage/merchants/core/impls/ClientManagerImpl.java @@ -327,7 +327,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid @Resource private SysClientUpayProfileMapper sysClientUpayProfileMapper; @Resource - private PaymentApi paymentApi; + private PaymentApi paymentApi; @Resource private MerchantChannelPermissionManager merchantChannelPermissionManager; @@ -551,7 +551,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid } client.put("enable_alipayplus", false); MerchantChannelPermissionResolver resolver = this.paymentApi.channelApi(PayChannel.ALIPAY_PLUS.getChannelCode()).getChannelPermissionResolver(); - if(!Objects.isNull(resolver)) { + if (!Objects.isNull(resolver)) { if (resolver.newOrderEnabled(client)) { client.put("enable_alipayplus", true); } @@ -1371,6 +1371,15 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid public void sendInitEmail(final JSONObject client, String username, String pwd, boolean isUpayAuditPass) { logger.debug("sending email after comply"); + // 配置了部分组织不发送邮件 + JSONObject sysConfig = sysConfigManager.getSysConfig(); + String[] orgs = sysConfig.getString("no_send_email_org").split(","); + for (String org : orgs) { + if (client.getString("org_id").equals(org)) { + logger.info("Merchant of organization does not send email.(org_id:" + org + ")"); + return; + } + } List bds = clientBDMapper.listClientBDInfoAvailable(client.getIntValue("client_id"), new Date()); Context ctx = new Context(); ctx.setVariable("bds", bds); @@ -1572,7 +1581,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid @Override public void switchChannelPermission(JSONObject manager, String clientMoniker, String channel, boolean allow) { for (PaymentChannelApi channelApi : paymentApi.channels()) { - if (channelApi.channel().equalsIgnoreCase(channel) ) { + if (channelApi.channel().equalsIgnoreCase(channel)) { JSONObject client = getClientInfoByMoniker(clientMoniker); if (client == null) { throw new NotFoundException("Client Not Exists"); @@ -1581,7 +1590,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid try { clientModifySupport.processModify(new SwitchPermissionModify(manager, clientMoniker, "enable_" + channel.toLowerCase(), allow)); } catch (Exception e) { - logger.error("Failed to change channel switch:{}" ,channel); + logger.error("Failed to change channel switch:{}", channel); } logger.info("{}({}) switched client {} channel {} to {}", manager.getString("display_name"), manager.getString("manager_id"), clientMoniker, channel, allow); if (allow && (StringUtils.equalsAnyIgnoreCase("Wechat", channel) || StringUtils.equalsAnyIgnoreCase("Alipay", channel))) { @@ -2004,14 +2013,33 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid configNewClientRate(config, clientId, "AlipayOnline", "alipayonline_rate_value", org, "min_alipayonline_rate"); configNewClientRate(config, clientId, "Rpay", "Rpay_rate_value", org, "min_Rpay_rate"); configNewClientRate(config, clientId, "CB_BankPay", "cb_bankpay_rate_value", org, "min_cb_bankpay_rate"); + addAlipayPlusRateConfig(config, clientId, PayChannel.ALIPAY_PLUS.getChannelCode()); + } + + private void addAlipayPlusRateConfig(JSONObject config, int clientId, String channel) { + if (config.getString("alipay_cn_retail") != null) { + config.put("pay_type", "alipay_cn_retail"); + configNewClientRate(config, clientId, channel, "alipay_cn_retail", null, null); + } + if (config.getString("alipay_cn_online") != null) { + config.put("pay_type", "alipay_cn_online"); + configNewClientRate(config, clientId, channel, "alipay_cn_online", null, null); + } + if (config.getString("alipay_other") != null) { + config.put("pay_type", "alipay_other"); + configNewClientRate(config, clientId, channel, "alipay_other", null, null); + } + config.remove("pay_type"); } + private void configNewClientRate(JSONObject config, int clientId, String channel, String rateKey, JSONObject org, String rateValueKey) { if (config.containsKey(rateKey)) { JSONObject newConfig = new JSONObject(); newConfig.putAll(config); newConfig.put("rate_value", config.getBigDecimal(rateKey)); newConfig.put("rate_name", channel); + newConfig.put("pay_type", config.getString("pay_type")); if (!clientRateMapper.listClientRatesForSaving(clientId, config.getDate("active_time"), config.getDate("expiry_time"), config.getBigDecimal("rate_value"), config.getInteger("clean_days"), channel).isEmpty()) { return; } @@ -2024,10 +2052,17 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid newConfig.put("ext_rates", extRateParams.toJSONString()); } else { List existRate = clientRateMapper.listCurrentClientRates(clientId, config.getDate("active_time"), channel); - for (JSONObject rateLog : existRate) { - rateLog.put("expiry_time", DateUtils.addDays(config.getDate("active_time"), -1)); - clientRateMapper.updateConfig(rateLog); - } + existRate.stream().filter(existConfig -> { + if (existConfig.getDate("active_time").equals(config.getDate("active_time")) && existConfig.getDate("expiry_time").equals(config.getDate("expiry_time"))) { + return false; + } + return true; + } + ) + .forEach((rateLog) -> { + rateLog.put("expiry_time", DateUtils.addDays(config.getDate("active_time"), -1)); + clientRateMapper.updateConfig(rateLog); + }); } if ("cb_bankpay".equalsIgnoreCase(channel)) { if (newConfig.getBigDecimal("cb_bankpay_rate_value") != null) { @@ -5800,16 +5835,16 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid throw new InvalidShortIdException(); } checkOrgPermission(manager, client); - AlipayMerchantEntity alipayMch = merchantChannelApplicationManager.getRegister(AlipayRetailApi.class).findMerchant(client); - Element resultElement = alipayMch.getRawResponseXml(); - if (!StringUtils.equalsIgnoreCase("T", resultElement.elementText("is_success"))) { - return "查询成功:" + resultElement.elementText("error"); + try { + AlipayMerchantEntity alipayMch = merchantChannelApplicationManager.getRegister(AlipayRetailApi.class).findMerchant(client); + Element responseElement = alipayMch.getRawResponseXml(); + String rejectReason = responseElement.elementText("reject_reason"); + return "查询成功:" + responseElement.elementText("secondary_merchant_id") + + "报备状态:" + responseElement.elementText("status") + StringUtils.defaultString(rejectReason, ""); + }catch (BadRequestException e){ + logger.error(e.getMessage(),e); + return e.getMessage(); } - Element responseElement = resultElement.element("response").element("alipay"); - String rejectReason = responseElement.elementText("reject_reason"); - return "查询成功:" + responseElement.elementText("secondary_merchant_id") + - "报备状态:" + responseElement.elementText("status") + StringUtils.defaultString(rejectReason, ""); - } @Override @@ -5940,17 +5975,17 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid if (client == null) { throw new InvalidShortIdException(); } - AlipayConfig.AlipayMerchant mch = AlipayEnvironment.getEnv().getAlipayOnlineMerchant(); - AlipayMerchantEntity entity = merchantChannelApplicationManager.getRegister(AlipayOnlineApi.class) - .findMerchant(client); - Element resultElement = entity.getRawResponseXml(); - if (!StringUtils.equalsIgnoreCase("T", resultElement.elementText("is_success"))) { - return "查询成功:" + resultElement.elementText("error"); - } - Element responseElement = resultElement.element("response").element("alipay"); - String rejectReason = responseElement.elementText("reject_reason"); - return "查询成功:" + responseElement.elementText("secondary_merchant_id") + - "报备状态:" + responseElement.elementText("status") + StringUtils.defaultString(rejectReason, ""); + try { + AlipayMerchantEntity entity = merchantChannelApplicationManager.getRegister(AlipayOnlineApi.class) + .findMerchant(client); + Element responseElement = entity.getRawResponseXml(); + String rejectReason = responseElement.elementText("reject_reason"); + return "查询成功:" + responseElement.elementText("secondary_merchant_id") + + "报备状态:" + responseElement.elementText("status") + StringUtils.defaultString(rejectReason, ""); + } catch (BadRequestException e) { + logger.error(e.getMessage(), e); + return e.getMessage(); + } } @Override diff --git a/src/main/java/au/com/royalpay/payment/manage/organizations/beans/DefaultClientProfile.java b/src/main/java/au/com/royalpay/payment/manage/organizations/beans/DefaultClientProfile.java index 08a049156..e6fa261f3 100644 --- a/src/main/java/au/com/royalpay/payment/manage/organizations/beans/DefaultClientProfile.java +++ b/src/main/java/au/com/royalpay/payment/manage/organizations/beans/DefaultClientProfile.java @@ -10,13 +10,18 @@ import com.yixsoft.support.mybatis.utils.FieldDescription; import org.apache.commons.lang3.ClassUtils; import org.apache.commons.lang3.ObjectUtils; import org.hibernate.validator.constraints.Range; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.core.annotation.AnnotatedElementUtils; +import java.lang.reflect.InvocationTargetException; import java.util.List; +import java.util.Objects; import java.util.stream.Collectors; @JSONType(naming = PropertyNamingStrategy.SnakeCase) public class DefaultClientProfile { + private final Logger logger = LoggerFactory.getLogger(getClass()); @ProfileDesc(value = "周末延迟清算", detail = "周末交易延迟到周二清算") private boolean weekendDelay = true; @ProfileDesc("手续费包含GST") @@ -35,40 +40,46 @@ public class DefaultClientProfile { return new ClassFieldsDescription<>(getClass()).getFields().stream() .filter(field -> !"class".equalsIgnoreCase(field.getFieldName())) .map(this::convertFieldInfo) + .filter(Objects::nonNull) .collect(Collectors.toList()); } private JSONObject convertFieldInfo(FieldDescription field) { - Object value = field.readField(this); - String fieldName = CaseFormat.LOWER_CAMEL.converterTo(CaseFormat.LOWER_UNDERSCORE).convert(field.getFieldName()); - JSONObject info = new JSONObject(); - info.put("field", fieldName); - info.put("value", value); - Class fieldType = field.getMethod().getReturnType(); - if (ClassUtils.isPrimitiveOrWrapper(fieldType)) { - if (ClassUtils.isPrimitiveWrapper(fieldType)) { - fieldType = ClassUtils.wrapperToPrimitive(fieldType); - } - if (fieldType.equals(boolean.class)) { - info.put("type", "checkbox"); + try { + Object value = field.readField(this); + String fieldName = CaseFormat.LOWER_CAMEL.converterTo(CaseFormat.LOWER_UNDERSCORE).convert(field.getFieldName()); + JSONObject info = new JSONObject(); + info.put("field", fieldName); + info.put("value", value); + Class fieldType = field.getMethod().getReturnType(); + if (ClassUtils.isPrimitiveOrWrapper(fieldType)) { + if (ClassUtils.isPrimitiveWrapper(fieldType)) { + fieldType = ClassUtils.wrapperToPrimitive(fieldType); + } + if (fieldType.equals(boolean.class)) { + info.put("type", "checkbox"); + } else { + info.put("type", "number"); + } } else { - info.put("type", "number"); + info.put("type", "text"); } - } else { - info.put("type", "text"); - } - ProfileDesc getterDesc = AnnotatedElementUtils.findMergedAnnotation(field.getMethod(), ProfileDesc.class); - try { - ProfileDesc fieldDesc = AnnotatedElementUtils.findMergedAnnotation(getClass().getDeclaredField(field.getFieldName()), ProfileDesc.class); - ProfileDesc desc = ObjectUtils.defaultIfNull(getterDesc, fieldDesc); - if (desc != null) { - info.put("title", desc.value()); - info.put("detail", desc.detail()); + ProfileDesc getterDesc = AnnotatedElementUtils.findMergedAnnotation(field.getMethod(), ProfileDesc.class); + try { + ProfileDesc fieldDesc = AnnotatedElementUtils.findMergedAnnotation(getClass().getDeclaredField(field.getFieldName()), ProfileDesc.class); + ProfileDesc desc = ObjectUtils.defaultIfNull(getterDesc, fieldDesc); + if (desc != null) { + info.put("title", desc.value()); + info.put("detail", desc.detail()); + } + } catch (NoSuchFieldException e) { } - } catch (NoSuchFieldException e) { + return info; + } catch (IllegalAccessException | InvocationTargetException e) { + logger.error("failed to access getter of field {}", field.getFieldName(), e); + return null; } - return info; } public void applyToClientConfig(JSONObject client) { diff --git a/src/main/java/au/com/royalpay/payment/manage/organizations/beans/OrgInfo.java b/src/main/java/au/com/royalpay/payment/manage/organizations/beans/OrgInfo.java index 43f8667fb..087bcd15c 100644 --- a/src/main/java/au/com/royalpay/payment/manage/organizations/beans/OrgInfo.java +++ b/src/main/java/au/com/royalpay/payment/manage/organizations/beans/OrgInfo.java @@ -27,6 +27,7 @@ public class OrgInfo { private Double alipay_rate_value; private Double wechat_rate_value; private Double alipayonline_rate_value; + private Double alipayplus_rate_value; private Double cb_bankpay_rate_value; // private Double rpaypmt_card_rate_value; //卡支付-国内卡费率配置 @@ -42,6 +43,7 @@ public class OrgInfo { private String org_id; private String commission_type; private Double min_wechat_rate; + private Double min_alipayplus_rate; private Double min_alipay_rate; private Double min_alipayonline_rate; private Double min_cb_bankpay_rate; @@ -79,6 +81,22 @@ public class OrgInfo { return param; } + public Double getAlipayplus_rate_value() { + return alipayplus_rate_value; + } + + public void setAlipayplus_rate_value(Double alipayplus_rate_value) { + this.alipayplus_rate_value = alipayplus_rate_value; + } + + public Double getMin_alipayplus_rate() { + return min_alipayplus_rate; + } + + public void setMin_alipayplus_rate(Double min_alipayplus_rate) { + this.min_alipayplus_rate = min_alipayplus_rate; + } + public int getIs_valid() { return is_valid; } diff --git a/src/main/ui/static/config/organizations/templates/org_detail.html b/src/main/ui/static/config/organizations/templates/org_detail.html index 7f95fc1b4..f5be4b635 100644 --- a/src/main/ui/static/config/organizations/templates/org_detail.html +++ b/src/main/ui/static/config/organizations/templates/org_detail.html @@ -1,149 +1,206 @@
-

- +

+
-
-
- - -
-
-
- -
- -
-
-
- -
-

- - - -

-
-
-
- -
- -
-
-
- -
- -
-
-
- -
- - - - - -
-
-
- -
- -
-
-
- -
- -
-
-
-
- -
- - % -
-
-
-
-
-
- -
- - % -
-
-
-
-
- -
- - % -
-
+
+
+ + + +
+
+ +
+ +
+
+
+ +
+

+ + + +

+
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ + + + + +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+ +
+ + % +
+
+
+
+
+
+ +
+ + % +
+
+
+
+
+ +
+ + % +
+
-
- -
- - % -
-
+
+ +
+ + % +
+
-
- -
- - % -
-
-
- -
- - % -
-
- - -
- -
- - % -
-
+ +
+ +
+ + % +
+
- -
- -
- - % -
-
+ +
+ +
+ + % +
+
-
- -
- - % -
-
-
+
+ +
+ + % +
+
+
+
+
+ +
+ + % +
+
+
+ +
+ + % +
+
-
-
- -
- - % -
-
-
- -
- - % -
-
+
+ +
+ + % +
+
-
- -
- - % -
-
-
- -
- - % -
-
- - -
- -
- - % -
-
- - -
- -
- - % -
-
- -
- -
- - % -
-
-
-
- -
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
-
- - Back -
- - -
-
-
- + +
+ +
+ + % +
+
-
-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - -
UsernameDisplay NameWechatCreate TimeEmailRolesOperation
{{manager.nickname}} - - - - - - - - - - - - Modify - | - Disable -
-
- -
-
-
+
+ +
+ + %
- - -
-
- -
-

- {{org.gateway_short_id||'初始化'}} - -

-
-
-
- - -
-
- - -
-
-
- -
-
- -
- -
-
-
-
- -
-
-
- 禁用 -   超期提醒   -   等待合规   -   绿色通道   -   通过   -
- - - - - - - - - - - - - - - - - - - - - - - - - -
Partner CodePartner NameSub Mch IDRegister TimeCompliance StatusOrganizationBDOperation
- - - - (已禁用) - - - - - 通过({{partner.approve_time}}) - 资料完善中 - (自助开通)资料完善中 - 自助开通试用中({{partner.approve_time}}~{{partner.expiry_time}}) - 不通过({{partner.approve_time}}) - 申请打回({{partner.refuse_remark|limitTo:15}}) - 等待合规 - 自助开通(等待合规) - 合同制作完成 - 等待BD上传材料审核 - 绿色通道申请中 - 等待合规 - - - Detail - -
+
+
+
-
- +
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+ + Back +
+ + +
+
+
+ +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + +
UsernameDisplay NameWechatCreate TimeEmailRolesOperation
+ {{manager.nickname}} + + + + + + + + + + + + + Modify + | + Disable +
+
+ +
+ + +
+
+ +
+

+ {{org.gateway_short_id||'初始化'}} + +

+
+
+
+ +
+ View +
+
+
+ + +
+
+
+ +
+
+ +
+ +
+
+
+
+ +
+
+
+ 禁用 +   超期提醒   +   等待合规   +   绿色通道   +   通过   +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Partner CodePartner NameSub Mch IDRegister TimeCompliance StatusOrganizationBDOperation
+ + + + (已禁用) + + + + + 通过({{partner.approve_time}}) + 资料完善中 + (自助开通)资料完善中 + 自助开通试用中({{partner.approve_time}}~{{partner.expiry_time}}) + 不通过({{partner.approve_time}}) + 申请打回({{partner.refuse_remark|limitTo:15}}) + 等待合规 + 自助开通(等待合规) + 合同制作完成 + 等待BD上传材料审核 + 绿色通道申请中 + 等待合规 + + + Detail + +
+
+ +
+
+ +
+
+
+
商户新增趋势
+
+
+
+
+
+
+
+
+
+
交易额趋势
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+ +
+ ~ +
+ +
-
+
+ Today +
+
+ Yesterday +
+ + + +
+ This Year +
+
+
- - -
-
合伙人提成
-
- - - - - - - - - - - - - - - - - - - - - - - - - -
名称时间交易金额商户总手续费Royalpay手续费合伙人提成提成分润支付渠道
- {{clientExtracts.year|limitTo:10}} - - - {{clientExtracts.month|limitTo:10}} - - - - - {{clientExtracts.channel}} -
-
- +
+
+
+
+
+
+
+
+ +
交易分布
+
+
+
+

组织总交易额

+
+ + + + + + + + + + + + + +
OrganizationAmount ($)
+ +
- - - -
-
- -
- -

-
-
-
- - -
- -
+
+

{{chooseOrg}} 合伙人商户交易量排名

+
+ + + + + + + + + + + + + + + + + + + + + +
RankingPartnerAUD AmountRankingPartnerAmount
+ + {{sale[0].client_moniker}} + + + + {{sale[1].client_moniker}} + +
+ +
+
+
+
+ +
+
+
+ + +
+
合伙人提成
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
名称时间交易金额商户总手续费Royalpay手续费合伙人提成提成分润支付渠道
{{clientExtracts.year|limitTo:10}} - {{clientExtracts.month|limitTo:10}} + + + + {{clientExtracts.channel}} +
+
+ +
+
+ +
+
+ +
+ +

+
+
+
+ + +
+
+
diff --git a/src/main/ui/static/payment/partner/partner-manage.js b/src/main/ui/static/payment/partner/partner-manage.js index e931128da..14568b25c 100644 --- a/src/main/ui/static/payment/partner/partner-manage.js +++ b/src/main/ui/static/payment/partner/partner-manage.js @@ -3404,6 +3404,97 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter } } $scope.complianceChangeCheck() + + // 是否为alipayplus + $scope.isAlipayCN = true + // 修改渠道 + $scope.changeAlipayPlusRateState = function (flag) { + $scope.isAlipayCN = flag + } + // 过滤渠道 + $scope.isAlipayPlus = function (item) { + if ($scope.isAlipayCN) { + return item.rate_name === 'AlipayPlus' && (item.pay_type === 'alipay_cn_retail' || item.pay_type === 'alipay_cn_online') + } else { + return item.rate_name === 'AlipayPlus' && item.pay_type === 'alipay_other' + } + } + // 新增alipay+费率 + $scope.newAlipayPlusRate = function () { + $uibModal + .open({ + templateUrl: '/static/payment/partner/templates/partner_new_alipayplus_rate.html', + resolve: { + rate: function () { + return { + rate_name: 'AlipayPlus', + clean_days: '3', + } + }, + sys_common_rate: function () { + return $http.get('/sys/partners/sys_rates') + }, + clientMoniker: function () { + return $scope.partner.client_moniker + }, + }, + controller: [ + '$scope', + '$http', + 'rate', + 'sys_common_rate', + 'clientMoniker', + function ($scope, $http, rate, sys_common_rate, clientMoniker) { + $scope.rate = angular.copy(rate) + $scope.sysRateConfig = angular.copy(sys_common_rate.data) + $scope.ctrl = { sending: false } + $scope.saveRate = function (form) { + if (form.$invalid) { + angular.forEach(form, function (item, key) { + if (key.indexOf('$') < 0) { + item.$dirty = true + } + }) + return + } + $scope.errmsg = null + $scope.ctrl.sending = true + $http.post('/sys/partners/' + clientMoniker + '/rates', $scope.rate).then( + function () { + $scope.ctrl.sending = false + $scope.$close() + }, + function (resp) { + $scope.ctrl.sending = false + $scope.errmsg = resp.data.message + } + ) + } + $scope.changeDays = function () { + // if ($scope.rate.clean_days) { + // switch ($scope.rate.clean_days) { + // case '1': { + // $scope.rate.alipayplus = parseFloat($scope.sysRateConfig.t1.AlipayPlus) + // break + // } + // case '2': { + // $scope.rate.alipayplus = parseFloat($scope.sysRateConfig.t2.AlipayPlus) + // break + // } + // case '3': { + // $scope.rate.alipayplus = parseFloat($scope.sysRateConfig.t3.AlipayPlus) + // break + // } + // } + // } + } + }, + ], + }) + .result.then(function () { + $scope.getRates() + }) + } }, ]) app.controller('surchargeAccountDetailCtrl', [ diff --git a/src/main/ui/static/payment/partner/templates/partner_bankaccounts.html b/src/main/ui/static/payment/partner/templates/partner_bankaccounts.html index edc8f9da8..ab0ad5e8a 100644 --- a/src/main/ui/static/payment/partner/templates/partner_bankaccounts.html +++ b/src/main/ui/static/payment/partner/templates/partner_bankaccounts.html @@ -8,7 +8,7 @@

Bank Account + ng-if="!bankCtrl.edit && (('11'|withRole)||((!partner.approve_result||partner.approve_result>4) && ('111'|withRole)))">

@@ -18,15 +18,15 @@

{{surcharge.balance|currency:'AUD'}}

+ style="font-size: 15px;color: #3c8dbc;cursor: pointer;padding-left: 15px" + ng-click="surchargeAccountDetail()">

+ switch-change="allowSurchargeCredit(partner.allow_surcharge_credit)">
@@ -34,12 +34,12 @@

balance - + distributed - +

启用到收支分离(distributed)模式,将使消费者支付手续费模式失效
@@ -52,28 +52,28 @@

+ switch-change="taxInSurcharge(partner.tax_in_surcharge)">
+ switch-change="customerTaxFree(partner.customer_tax_free)">
+ switch-change="skipClearing(partner.skip_clearing)">
+ switch-change="switchPreSettle(partner.enable_presettle)">
@@ -86,7 +86,7 @@ -
-
+
+

Rates - + ng-if="partner.rate_editable && (('11'|withRole)||((!partner.approve_result||partner.approve_result>4) && ('111'|withRole)))" + ng-click="newRate()"> +

- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Rate NameRate ValueDomestic Rate ValueInternational Rate ValueTransaction FeeActive TimeExpire Time - Clean Days - Update TimeOperatorRemarkOperation
- T+{{rate.clean_days}} - - - - (Promotional Offer) - - -
-
- check +
+
+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Rate NameRate ValueDomestic Rate ValueInternational Rate ValueTransaction FeeActive TimeExpire Time + Clean Days + Update TimeOperatorRemarkOperation
+ + T+{{rate.clean_days}} + + + + (Promotional Offer) + + +
+
+
+
+ +
+
+

AlipayPlus Rates + +

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Rate NameRate ValueTransaction FeeActive TimeExpire TimeClean DaysUpdate TimeOperatorRemarkOperation
T+{{rate.clean_days}} + + + (Promotional Offer) + + +
+
+
+ check +
-
-
+
\ No newline at end of file diff --git a/src/main/ui/static/payment/partner/templates/partner_new_alipayplus_rate.html b/src/main/ui/static/payment/partner/templates/partner_new_alipayplus_rate.html new file mode 100644 index 000000000..996cba8c1 --- /dev/null +++ b/src/main/ui/static/payment/partner/templates/partner_new_alipayplus_rate.html @@ -0,0 +1,150 @@ + + + \ No newline at end of file diff --git a/src/main/ui/static/templates/alipay/v1/bill_retail_jsapi.js b/src/main/ui/static/templates/alipay/v1/bill_retail_jsapi.js index 7e7290d52..4afadc43b 100644 --- a/src/main/ui/static/templates/alipay/v1/bill_retail_jsapi.js +++ b/src/main/ui/static/templates/alipay/v1/bill_retail_jsapi.js @@ -24,7 +24,7 @@ $(document).ready(function () { dataCache.paying = true; $.ajax({ - url: '/api/v1.0/alipay/partners/' + window.client_moniker + '/orders/'+window.order_id+'/order_params', + url: '../order_params', method: 'GET', dataType: 'json', success: function (pay) { @@ -32,6 +32,11 @@ $(document).ready(function () { location.href = window.redirect; return; } + if (pay.web_from) { + $('#alipay_plus').html(pay.web_from) + location.href = window.redirect; + return; + } if (window.AlipayJSBridge) { callPayment(); } else { diff --git a/src/main/ui/static/templates/alipay/v1/retail_jsapi.js b/src/main/ui/static/templates/alipay/v1/retail_jsapi.js index 6b74c75cf..6e1145907 100644 --- a/src/main/ui/static/templates/alipay/v1/retail_jsapi.js +++ b/src/main/ui/static/templates/alipay/v1/retail_jsapi.js @@ -24,7 +24,7 @@ $(document).ready(function () { dataCache.paying = true; $.ajax({ - url: '/api/v1.0/alipay/partners/' + window.client_moniker + '/orders/'+window.order_id+'/order_params', + url: './order_params', method: 'GET', dataType: 'json', success: function (pay) { @@ -32,6 +32,11 @@ $(document).ready(function () { location.href = window.redirect; return; } + if (pay.web_from) { + $('#alipay_plus').html(pay.web_from) + startCheckOrder(window.order_id, window.redirect); + return; + } if (window.AlipayJSBridge) { callPayment(); } else { @@ -88,6 +93,9 @@ $(document).ready(function () { } else { setTimeout(checkOrderStd, 500); } + }, + error:function (){ + setTimeout(checkOrderStd, 500); } }) } diff --git a/src/main/ui/static/templates/alipay/v5/payment.js b/src/main/ui/static/templates/alipay/v5/payment.js index c43709374..5c1498ad3 100644 --- a/src/main/ui/static/templates/alipay/v5/payment.js +++ b/src/main/ui/static/templates/alipay/v5/payment.js @@ -234,7 +234,7 @@ $(function () { $('.pay_button').css({"background-color":"#eee",}).attr('disabled',true); $('.bank_button').css({"background-color":"#eee",}).attr('disabled',true); }else{ - $('.pay_button').css({"background-color":"#19AD18",}).attr('disabled',false); + $('.pay_button').css({"background-color":"#108ee9",}).attr('disabled',false); $('.bank_button').css({"background-color":"#FF6600",}).attr('disabled',false); } }); diff --git a/src/main/ui/static/templates/payment/v1/gateway_jsapi.js b/src/main/ui/static/templates/payment/v1/gateway_jsapi.js index 6b76458a1..9b50c79b5 100644 --- a/src/main/ui/static/templates/payment/v1/gateway_jsapi.js +++ b/src/main/ui/static/templates/payment/v1/gateway_jsapi.js @@ -113,6 +113,9 @@ $(document).ready(function () { } else { setTimeout(checkOrderStd, 500); } + }, + error:function (){ + setTimeout(checkOrderStd, 500); } }) } diff --git a/uidocker/conf.d/default.conf b/uidocker/conf.d/default.conf index ea284d694..e3deafc4f 100644 --- a/uidocker/conf.d/default.conf +++ b/uidocker/conf.d/default.conf @@ -68,7 +68,7 @@ server { } - location ~ ^/api/v1.0/((alipay\w*)|(customs)|(rpay)|(yeepay)|(card_payment_view)|(lakala_pay)|(cb_bankpay)|(bestpay)|(hf)|(\w*gateway)|(micropay)|(retail_qrcode)|(share_code)|(payment))/ { + location ~ ^/api/v1.0/((alipay\w*)|(customs)|(rpay)|(yeepay)|(card_payment_view)|(lakala_pay)|(cb_bankpay)|(bestpay)|(hf)|(\w*gateway)|(micropay)|(retail_qrcode)|(share_code)|(payment)|(h5_payment))/ { proxy_pass http://rppaycenter; proxy_http_version 1.1;