From 92d10e7f6430dc44337a478e74676fabbb30029a Mon Sep 17 00:00:00 2001 From: dalong306 <304592994@qq.com> Date: Mon, 13 Sep 2021 15:03:14 +0800 Subject: [PATCH] =?UTF-8?q?alipayplus=20aps=20=E5=95=86=E6=88=B7=E6=B3=A8?= =?UTF-8?q?=E5=86=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 2 +- .../manage/merchants/core/ClientManager.java | 9 + .../core/impls/ClientManagerImpl.java | 55 ++++ .../web/PartnerManageController.java | 25 ++ src/main/resources/application-alipay.yml | 67 ++++- .../templates/platform_settle_logs.html | 72 +++++ .../static/payment/partner/partner-manage.js | 190 +++++++++++- .../apply_alipayplus_sub_merchant_id.html | 284 ++++++++++++++++++ .../templates/sub_merchant_id_apply.html | 83 +++++ 9 files changed, 781 insertions(+), 6 deletions(-) create mode 100644 src/main/ui/static/payment/partner/templates/apply_alipayplus_sub_merchant_id.html diff --git a/pom.xml b/pom.xml index 2934cc261..d66c495f6 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ au.com.royalpay.payment payment-parent - 2.2.31 + 2.3.0 4.0.0 manage diff --git a/src/main/java/au/com/royalpay/payment/manage/merchants/core/ClientManager.java b/src/main/java/au/com/royalpay/payment/manage/merchants/core/ClientManager.java index f93d9ace8..cc2c54d13 100644 --- a/src/main/java/au/com/royalpay/payment/manage/merchants/core/ClientManager.java +++ b/src/main/java/au/com/royalpay/payment/manage/merchants/core/ClientManager.java @@ -1,7 +1,9 @@ package au.com.royalpay.payment.manage.merchants.core; +import au.com.royalpay.payment.channels.alipay.beans.plus.ApsMerchantApplication; import au.com.royalpay.payment.channels.rpaypaymentsvc.runtime.request.entities.RPayMerchantEntity; import au.com.royalpay.payment.core.beans.ChannelMerchantInfo; +import au.com.royalpay.payment.core.beans.MerchantApplicationResult; import au.com.royalpay.payment.core.exceptions.EmailException; import au.com.royalpay.payment.manage.appclient.beans.AppClientBean; import au.com.royalpay.payment.manage.appclient.beans.AppMerchantBean; @@ -604,4 +606,11 @@ public interface ClientManager { void selectBillCodeVersion(JSONObject manager, String clientMoniker, String version); + + MerchantApplicationResult alipayPlusRegisterMerchant(String clientMoniker, ApsMerchantApplication apsMerchantApplication, JSONObject manager);//alipayplus 注册商户 + + String queryAlipayPlusOnlineStatus(boolean isOffline,String clientMoniker, JSONObject manager); + + String queryAlipayPlusOfflineStatus(String clientMoniker, JSONObject manager); + } 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 209f609dc..396955860 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 @@ -1,9 +1,12 @@ package au.com.royalpay.payment.manage.merchants.core.impls; +import au.com.royalpay.payment.channels.alipay.beans.plus.AlipayPlusRegisterResult; +import au.com.royalpay.payment.channels.alipay.beans.plus.ApsMerchantApplication; import au.com.royalpay.payment.channels.alipay.config.AlipayConfig; import au.com.royalpay.payment.channels.alipay.config.AlipayEnvironment; import au.com.royalpay.payment.channels.alipay.runtime.AlipayOnlineApi; import au.com.royalpay.payment.channels.alipay.runtime.AlipayRetailApi; +import au.com.royalpay.payment.channels.alipay.runtime.alipayplus.AlipayApsMerchantRegister; import au.com.royalpay.payment.channels.alipay.runtime.entity.AlipayMerchantEntity; import au.com.royalpay.payment.channels.rpay.runtime.beans.SubRpayMerchantInfo; import au.com.royalpay.payment.channels.rpay.runtime.impls.RPayMerchantRegister; @@ -113,6 +116,7 @@ import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONException; import com.alibaba.fastjson.JSONObject; +import com.alipay.global.api.model.aps.ProductCodeType; import com.github.miemiedev.mybatis.paginator.domain.Order; import com.github.miemiedev.mybatis.paginator.domain.PageBounds; import com.github.miemiedev.mybatis.paginator.domain.PageList; @@ -7066,6 +7070,57 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid clientInfoCacheSupport.clearClientCache(client.getIntValue("client_id")); } + /** + * alipayplus(aps) 注册商户 + * @param clientMoniker + * @param apsMerchantApplication + * @param manager + * @return + */ + @Override + public MerchantApplicationResult alipayPlusRegisterMerchant(String clientMoniker, ApsMerchantApplication apsMerchantApplication, JSONObject manager) { + logger.info("====>getWebsiteType:"+apsMerchantApplication.getWebsiteType()); + logger.info("====>getProductCodes:"+apsMerchantApplication.getProductCodes().toString()); + boolean offline = apsMerchantApplication.getProductCodes().stream().allMatch(s->s.equalsIgnoreCase(ProductCodeType.IN_STORE_PAYMENT.toString())); + logger.info("====>offline:"+offline); + if(offline){ + //todo 测试需要 先都改成线上,上线此处需要改成线下 + apsMerchantApplication.setPid( AlipayEnvironment.getEnv().getAlipayPlusApsRetailConfig().getPid()); + }else{ + apsMerchantApplication.setPid( AlipayEnvironment.getEnv().getAlipayPlusApsOnlineConfig().getPid()); + } + apsMerchantApplication.setRegion("AU"); + + JSONObject client= sysClientMapper.findClientByMoniker(clientMoniker); + AlipayApsMerchantRegister alipayApsMerchantRegister = Optional.ofNullable(merchantChannelApplicationManager.getRegister(AlipayApsMerchantRegister.class)).orElseThrow(() -> new ServerErrorException("No AlipayAps registry found")); + + MerchantApplicationResult result=alipayApsMerchantRegister.apply(client,apsMerchantApplication,manager); + return result; + } + + @Override + public String queryAlipayPlusOnlineStatus(boolean isRetail,String clientMoniker, JSONObject manager) { + JSONObject client= sysClientMapper.findClientByMoniker(clientMoniker); + client.put("isRetail",isRetail); + String pid=""; + if(isRetail){ + //todo 测试需要 先都改成线上,上线此处需要改成线下 + pid= AlipayEnvironment.getEnv().getAlipayPlusApsRetailConfig().getPid(); + }else{ + pid= AlipayEnvironment.getEnv().getAlipayPlusApsOnlineConfig().getPid(); + + } + client.put("pid",pid); + AlipayApsMerchantRegister alipayApsMerchantRegister = Optional.ofNullable(merchantChannelApplicationManager.getRegister(AlipayApsMerchantRegister.class)).orElseThrow(() -> new ServerErrorException("No AlipayAps registry found")); + AlipayPlusRegisterResult alipayPlusRegisterResult= alipayApsMerchantRegister.findMerchant(client); + return alipayPlusRegisterResult.getRawResponse(); + } + + @Override + public String queryAlipayPlusOfflineStatus(String clientMoniker, JSONObject manager) { + return null; + } + private void exportLetterOfferPDF(String clientMoniker, JSONObject manage) { JSONObject info = convertClientLetterOfferInfo(clientMoniker); String pdfPath = this.getClass().getClassLoader().getResource("").getPath() + "/templates/pdf/letter_of_offer.pdf"; diff --git a/src/main/java/au/com/royalpay/payment/manage/merchants/web/PartnerManageController.java b/src/main/java/au/com/royalpay/payment/manage/merchants/web/PartnerManageController.java index 4d9179838..a299e427d 100644 --- a/src/main/java/au/com/royalpay/payment/manage/merchants/web/PartnerManageController.java +++ b/src/main/java/au/com/royalpay/payment/manage/merchants/web/PartnerManageController.java @@ -1,7 +1,9 @@ package au.com.royalpay.payment.manage.merchants.web; +import au.com.royalpay.payment.channels.alipay.beans.plus.ApsMerchantApplication; import au.com.royalpay.payment.channels.rpaypaymentsvc.runtime.request.entities.RPayMerchantEntity; import au.com.royalpay.payment.core.beans.ChannelMerchantInfo; +import au.com.royalpay.payment.core.beans.MerchantApplicationResult; import au.com.royalpay.payment.core.exceptions.InvalidShortIdException; import au.com.royalpay.payment.manage.dev.core.MerchantLocationService; import au.com.royalpay.payment.manage.merchants.beans.*; @@ -1057,4 +1059,27 @@ public class PartnerManageController { clientManager.modifyUPayProfile(manager, clientMoniker, pass.getString("key"), pass.getBooleanValue("allow")); } + /** + * alipayplus 商户注册 + * @param clientMoniker + * @param manager + * @return + */ + @ManagerMapping(value = "/{clientMoniker}/apply_alipayplus", method = RequestMethod.POST, role = {ManagerRole.OPERATOR, ManagerRole.ADMIN}) + public MerchantApplicationResult applyAlipayPlusMerchant(@PathVariable String clientMoniker, @RequestBody ApsMerchantApplication apsMerchantApplication, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) { + return clientManager.alipayPlusRegisterMerchant(clientMoniker,apsMerchantApplication,manager); + } + + @ManagerMapping(value = "/{clientMoniker}/query/alipay_aps_online", method = RequestMethod.GET, role = {ManagerRole.OPERATOR, ManagerRole.ADMIN}) + public JSONObject queryAlipayApsOnlineStatus(@PathVariable String clientMoniker, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) { + JSONObject result = new JSONObject(); + result.put("response_str", clientManager.queryAlipayPlusOnlineStatus(false,clientMoniker, manager)); + return result; + } + @ManagerMapping(value = "/{clientMoniker}/query/alipay_aps_retail", method = RequestMethod.GET, role = {ManagerRole.OPERATOR, ManagerRole.ADMIN}) + public JSONObject queryAlipayApsOfflineStatus(@PathVariable String clientMoniker, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) { + JSONObject result = new JSONObject(); + result.put("response_str", clientManager.queryAlipayPlusOnlineStatus(true,clientMoniker, manager)); + return result; + } } diff --git a/src/main/resources/application-alipay.yml b/src/main/resources/application-alipay.yml index a9ddd3791..254bb4235 100644 --- a/src/main/resources/application-alipay.yml +++ b/src/main/resources/application-alipay.yml @@ -2,16 +2,75 @@ app: alipay: host: https://mapi-hk.alipay.com/gateway.do merchants: - online: - key: hmwjrganlzb4aqgggdgdlod7l3lsjkn6 + - key: hmwjrganlzb4aqgggdgdlod7l3lsjkn6 pid: 2088821643021586 + pid-type: ONLINE + biz-type: ONLINE private-key: classpath:data/crypt/alipay_private.pem public-key: classpath:data/crypt/alipay_public.pem sftp-password: XNBB3S sftp-username: openvisePTY - retail: - key: jb5mt4vhtlzg1xlc0k967sib7v81sba6 + - key: jb5mt4vhtlzg1xlc0k967sib7v81sba6 pid: 2088721525235246 + pid-type: RETAIL + biz-type: RETAIL sftp-password: XNBB3S sftp-username: openvisePTY + - pid: SANDBOX_5Y2Z6G2Y6CD006426 + bill-pid: '' + pid-type: CONNECT + biz-type: RETAIL + api-prefix: /ams + private-key-string: |- + MIIEvwI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js2s2j1cCgYEAk6EOMYjSJq4eyzA+JT6iYdmBvNTCstvfJmhceH8R+rpMj2HSMXkhBOxKbnuTv9tK7BfYTVkv4Ti34MDW7JiBm1NxbsdN4H8av/BExTt2QOFVDAiL13+XV+TyTi5G+Xhw1zAULSPiEMzxMw1O9BqJ3butUkCKLCst6YBSS+0027kCgYEAn+BFiyzV4QZ5wkNs0aBYupRGcBLQOXvEUz+VNp6faZRogSZEp0jtEOCBQBQPS5xf6M3Wsj6G0V1+xQaLhsCjrMQAskUNR5+83w+nJLhv7EJb62euW3dQlNXb9ppZ+VbaAuwNU1Xx1qYShmOwNHw8H50c00rbXUlPiaXh/9lRABkCgYBC9cIcIEutg3hmOlGrRVSSNnuYVO2MuLAIK1KnQftpZHZ+euuCnhPaoC3ZOtenWoBwgS6qV4Mpxq30qcc/mUouErpqUcrNxawlVgWjTSwNd6rT2MBg1lcOxpqsR9ZWolBp4nHvnbLxhI+2KiXpRV9Y8Gbkw1jI8/tMYcSEJsOfEA== + public-key-string: |- + MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAqME6KAPZcMlFuy19J+RAj34PaS6iuyjINzQvdjR808IeVQAcLdUULMEgCTSQLshC606GFoGkN5nOouoMCZQmPv9hbZSWcDHMrPNNVYuAqwk0N80FSnASNPtlucoqzVjAaqgXD88hqjODCIS/b9LWrprCA3q3aAfVQu3eQLoFM1nn9EdznCp0uVClHgLtwj1rMRkjN+4CSwOW66/RNzsgnDJMkrTlRDeJCrbdXAs0Q3MWQEQv2z1fd34U1yyY2StkHbfKAVp2cCzhSl26K3LcCooDv9VDSv3BDH58sBQ8TIprIW0EsDA4jbLXEDEKXIjqIOaC/+x8jXyRpci17ZvRowIDAQAB + pid-host: https://open-sea.alipay.com + - pid: SANDBOX_5Y2Z6G2Y6CD006410 + bill-pid: '' + pid-type: APS + biz-type: RETAIL + api-prefix: /aps + private-key-string: |- + MIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlA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6iYdmBvNTCstvfJmhceH8R+rpMj2HSMXkhBOxKbnuTv9tK7BfYTVkv4Ti34MDW7JiBm1NxbsdN4H8av/BExTt2QOFVDAiL13+XV+TyTi5G+Xhw1zAULSPiEMzxMw1O9BqJ3butUkCKLCst6YBSS+0027kCgYEAn+BFiyzV4QZ5wkNs0aBYupRGcBLQOXvEUz+VNp6faZRogSZEp0jtEOCBQBQPS5xf6M3Wsj6G0V1+xQaLhsCjrMQAskUNR5+83w+nJLhv7EJb62euW3dQlNXb9ppZ+VbaAuwNU1Xx1qYShmOwNHw8H50c00rbXUlPiaXh/9lRABkCgYBC9cIcIEutg3hmOlGrRVSSNnuYVO2MuLAIK1KnQftpZHZ+euuCnhPaoC3ZOtenWoBwgS6qV4Mpxq30qcc/mUouErpqUcrNxawlVgWjTSwNd6rT2MBg1lcOxpqsR9ZWolBp4nHvnbLxhI+2KiXpRV9Y8Gbkw1jI8/tMYcSEJsOfEA== + public-key-string: |- + MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAqME6KAPZcMlFuy19J+RAj34PaS6iuyjINzQvdjR808IeVQAcLdUULMEgCTSQLshC606GFoGkN5nOouoMCZQmPv9hbZSWcDHMrPNNVYuAqwk0N80FSnASNPtlucoqzVjAaqgXD88hqjODCIS/b9LWrprCA3q3aAfVQu3eQLoFM1nn9EdznCp0uVClHgLtwj1rMRkjN+4CSwOW66/RNzsgnDJMkrTlRDeJCrbdXAs0Q3MWQEQv2z1fd34U1yyY2StkHbfKAVp2cCzhSl26K3LcCooDv9VDSv3BDH58sBQ8TIprIW0EsDA4jbLXEDEKXIjqIOaC/+x8jXyRpci17ZvRowIDAQAB + pid-host: https://open-sea.alipay.com + enabled: true + - pid: SANDBOX_5Y372Y2YBKQN02382 + bill-pid: '' + pid-type: APS + biz-type: ONLINE + api-prefix: /aps + private-key-string: |- + MIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQDWXsXs+dZPb/cd + BS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KazSkU2DVGNb43PEfLx2b5S + qVeLbFBMhyl8URDdGncbtm/n5kUtJFUCjt3KpDzZ/i+iZmT4Izbr00QJ7vvkLccB + pFX8C4EuGkLt3USfeQlrxifwnEbHBEUUbeVBDQQrTZZBspwRRMQK5esbAoGAT7bi + xSRJiyivYZCX3lWoqV0wyNx424YYOB297cQG4RM9epC2Zw04FpRSi5BKAIisNyze + yRyH3COeoQ+OH/7Wm9AlDEbGLWBkHUVemTtBHIA7DcXF4M1lYGJrDKqdOP9WOR66 + Xw1gloCceGj3251bblB/GfslxhqenZEjZsuCiXECgYAYSe9ZS2pK06NG/0qqEK2t + LktRAEZLMZNKoCfTZ73Tv/3RbIKOTih/0u1esAz8ZNDba1rCY/Yk7tEnn7TdBmh6 + tZ2ioys08F2bZingLcTGes1s86/ideNGeoKT2e+071dD/AfdTqchaFRZdYlyPrF7 + Geg8LExk9alI9NEyoD7cKA== + public-key-string: |- + MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAkuBPpcDeFpO12FUgi4UGHWCJ6OdPp0GVvYFUSJzJ+KNUodFpmgw306rNA+0Q5Bn/mw9aaqGCCmZYPpF4TnzGqQcLrAFABW+tpUfGj3WwNndhLyCBnqvp740iufsCaLvzlZyQplL8CBQ4AQPdIVa4YlCiX+AxJNq+kXsNvgUKK0iDLujYE6XzgjOCSq03tFfY3ry58DoEvf86WmS+fP7zAl77kmDf1CmJa5V06aviUlzmuyo/p8m3fUucB1Fv3WNF7qRpNPkMuL6jjHenb9LzWr1tieRTd7mZxOd9KOq75CJiX4XiTHhWbvd2pW/NIkDPZ9dAJPSK57mrh+e7zgT2pQIDAQAB + pid-host: https://open-sea.alipayplus.com + enabled: true sftp-host: sftp.alipay.com diff --git a/src/main/ui/static/config/platformrevenue/templates/platform_settle_logs.html b/src/main/ui/static/config/platformrevenue/templates/platform_settle_logs.html index b13f607be..8ce8f87e2 100644 --- a/src/main/ui/static/config/platformrevenue/templates/platform_settle_logs.html +++ b/src/main/ui/static/config/platformrevenue/templates/platform_settle_logs.html @@ -338,4 +338,76 @@ + +
+
+

AlipayPlus Logs

+
+
+

No Data

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Date StartDate EndSettle DatePay FeeRefund FeeNet FeePoundageSettlement FeeUnsettledValidation
{{log.net_fee}} +   (System:{{log.sys_net_fee}}) +   (System:{{log.sys_net_fee}}) + {{log.surcharge}} +   (System:{{log.sys_surcharge}}) +   (System:{{log.sys_surcharge}}) + {{log.settlement_fee}} +   (System:{{log.sys_settlement_fee}}) +   (System:{{log.sys_settlement_fee}}) +
+ +
+
diff --git a/src/main/ui/static/payment/partner/partner-manage.js b/src/main/ui/static/payment/partner/partner-manage.js index 4e63e0fb4..2f6369ab1 100644 --- a/src/main/ui/static/payment/partner/partner-manage.js +++ b/src/main/ui/static/payment/partner/partner-manage.js @@ -6385,6 +6385,67 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $scope.loadSubMerchantInfos() }) } + + $scope.applyAlipayPlusRetailMerchantId = function () { + $uibModal + .open({ + templateUrl: '/static/payment/partner/templates/apply_alipayplus_sub_merchant_id.html', + controller: 'applyAlipayPlusSubMerchantIdCtrl', + resolve: { + subMerchantInfo: function () { + return $scope.partner + }, + online: false, + }, + }) + .result.then(function () { + $scope.loadSubMerchantInfos() + }) + } + $scope.applyAlipayPlusOnlineMerchantId = function () { + $uibModal + .open({ + templateUrl: '/static/payment/partner/templates/apply_alipayplus_sub_merchant_id.html', + controller: 'applyAlipayPlusSubMerchantIdCtrl', + resolve: { + subMerchantInfo: function () { + return $scope.partner + }, + online: true, + }, + }) + .result.then(function () { + $scope.loadSubMerchantInfos() + }) + } + $scope.queryAlipayPlusApsOnline = function () { + $http.get('/sys/partners/' + $scope.partner.client_moniker + '/query/alipay_aps_online').then( + function (resp) { + commonDialog.alert({ + title: 'AlipayPlus Online Apply Status', + content: resp.data.response_str, + type: 'info', + }) + }, + function (resp) { + commonDialog.alert({ title: 'Error', content: '查询失败:' + resp.data.message, type: 'error' }) + } + ) + }; + $scope.queryAlipayPlusApsRetail = function () { + $http.get('/sys/partners/' + $scope.partner.client_moniker + '/query/alipay_aps_retail').then( + function (resp) { + commonDialog.alert({ + title: 'AlipayPlus Retail Apply Status', + content: resp.data.response_str, + type: 'info', + }) + }, + function (resp) { + commonDialog.alert({ title: 'Error', content: '查询失败:' + resp.data.message, type: 'error' }) + } + ) + }; // 刷新Wechat Sub Merchant Id $scope.queryWechatSubMerchantIdStatus = function () { $http.get('/sys/partners/' + $scope.partner.client_moniker + '/get_merchant_ids/' + $scope.partnerInfo.sub_merchant_id + '/status').then( @@ -6973,7 +7034,134 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter } }, ]) - app.controller('updateApplyWxSubMerchantIdCtrl', [ + /** + * 申请alipayplus + */ + app.controller('applyAlipayPlusSubMerchantIdCtrl', [ + '$scope', + '$http', + '$uibModal', + '$state', + 'subMerchantInfo', + '$filter', + 'commonDialog', + 'online', + function ($scope, $http, $uibModal, $state, subMerchantInfo, $filter, commonDialog,online) { + $scope.subMerchantInfo = angular.copy(subMerchantInfo) + $scope.subMerchantInfo.online=online; + $scope.subMerchantInfo.merchantDisplayName = $scope.subMerchantInfo.short_name; + $scope.subMerchantInfo.registrationAddress= $scope.subMerchantInfo.address; + + // if ($scope.subMerchantInfo.client_pay_type) { + // if ($scope.subMerchantInfo.client_pay_type.indexOf('1') >= 0 && $scope.subMerchantInfo.client_pay_type.indexOf('2') >= 0) { + // $scope.subMerchantInfo.payment_type_online = true; + // $scope.subMerchantInfo.business_type_offline = true; + // } else if ($scope.subMerchantInfo.client_pay_type.indexOf('1') >= 0) { + // $scope.subMerchantInfo.business_type_offline = true + // } else if ($scope.subMerchantInfo.client_pay_type.indexOf('2') >= 0) { + // $scope.subMerchantInfo.business_type_agreement = true + // } + // } else { + // $scope.subMerchantInfo.payment_type_online = true; + // $scope.subMerchantInfo.business_type_offline = true; + // } + if($scope.subMerchantInfo.online) { + $scope.title = "AlipayPlus-aps(Online)Registration"; + }else{ + $scope.title = "AlipayPlus-aps(Retail)Registration"; + } + $scope.subMerchantInfo.websiteType = 'WEB'; + $scope.subMerchantInfo.website= $scope.subMerchantInfo.company_website; + $scope.subMerchantInfo.legalName = $scope.subMerchantInfo.company_name; + $scope.subMerchantInfo.registrationType='OTHER_IDENTIFICATION_NO' + if ($scope.subMerchantInfo.business_structure) { + $scope.subMerchantInfo.businessType = $scope.subMerchantInfo.business_structure != 'Registered body(Sole Trader)' ? 'ENTERPRISE' : 'INDIVIDUAL' + } + $scope.subMerchantInfo.shareholderName= $scope.subMerchantInfo.representativeInfo.representative_person; + $scope.subMerchantInfo.representativeName= $scope.subMerchantInfo.representativeInfo.representative_person; + $scope.subMerchantInfo.storeAddress= $scope.subMerchantInfo.address; + $scope.subMerchantInfo.registrationNo= $scope. subMerchantInfo.acn ? $scope.subMerchantInfo.acn : $scope.subMerchantInfo.abn; + $scope.subMerchantInfo.storeMCC=$scope.subMerchantInfo.alipayindustry; + $scope.subMerchantInfo.storeName=$scope.subMerchantInfo.store_name; + + $scope.alipayMccCategory = {} + $scope.loadAlipayCategory = function () { + $http.get('/static/data/alipayMcc.json').then(function (resp) { + $scope.alipayMccCategory = resp.data + }) + } + $scope.loadAlipayCategory() + + $scope.onAlipayMccSelect = function (selectedItem) { + $scope.subMerchantInfo.alipay_category = selectedItem.label + $scope.subMerchantInfo.alipayindustry = selectedItem.mccCode + } + $scope.onAlipayStoreMccSelect = function (selectedItem) { + $scope.subMerchantInfo.storeMCC_category = selectedItem.label + $scope.subMerchantInfo.storeMCC = selectedItem.mccCode + } + $scope.saveAlipayApply = function (form) { + $scope.errmsg = null + if (form.$invalid) { + angular.forEach(form, function (item, key) { + if (key.indexOf('$') < 0) { + item.$dirty = true + } + }) + return; + } + var params = { + websiteType: $scope.subMerchantInfo.websiteType, + merchantDisplayName: $scope.subMerchantInfo.merchantDisplayName, + merchantMCC: $scope.subMerchantInfo.alipayindustry, + legalName: $scope.subMerchantInfo.legalName, + registrationType: $scope.subMerchantInfo.registrationType, + registrationNo: $scope.subMerchantInfo.registrationNo, + businessType: $scope.subMerchantInfo.businessType, + shareholderName: $scope.subMerchantInfo.shareholderName, + shareholderId: $scope.subMerchantInfo.shareholderId, + representativeName: $scope.subMerchantInfo.representativeName, + representativeId: $scope.subMerchantInfo.representativeId, + storeName: $scope.subMerchantInfo.storeName, + storeMCC: $scope.subMerchantInfo.storeMCC, + storeAddress: $scope.subMerchantInfo.storeAddress, + registrationAddress: $scope.subMerchantInfo.registrationAddress, + } + params.productCodes=[]; + if($scope.subMerchantInfo.online){ + params.productCodes.push('CASHIER_PAYMENT'); + }else{ + params.productCodes.push('IN_STORE_PAYMENT'); + } + params.websites=[] + if($scope.subMerchantInfo.online){ + params.websites.push($scope.subMerchantInfo.website); + } + + $http.post('/sys/partners/' + $scope.subMerchantInfo.client_moniker + '/apply_alipayplus', params).then( + function (resp) { + if(resp.data.success) { + commonDialog.alert({ title: 'Success', content: "注册成功!", type: 'success' }) + }else{ + commonDialog.alert({title: 'Error', content: "注册失败!", type: 'error'}) + } + + $scope.$close() + }, + function (resp) { + $scope.flag = false + commonDialog.alert({ title: 'Error', content: resp.data.message, type: 'error' }) + } + ) + + }; + + + }, + ]) + + + app.controller('updateApplyWxSubMerchantIdCtrl', [ '$scope', '$http', '$uibModal', diff --git a/src/main/ui/static/payment/partner/templates/apply_alipayplus_sub_merchant_id.html b/src/main/ui/static/payment/partner/templates/apply_alipayplus_sub_merchant_id.html new file mode 100644 index 000000000..41b8a3cfa --- /dev/null +++ b/src/main/ui/static/payment/partner/templates/apply_alipayplus_sub_merchant_id.html @@ -0,0 +1,284 @@ +
+
+
+
+
+
{{title}}
+
+
+ +
+ +
+ +
+

Required Field

+

Length is more than 50

+
+
+
+ + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+

Required + Field

+
+
+ +
+ + +
+ +
+ +
+

Required Field

+

Length is more than 1000

+
+
+
+ +
+ +
+
+ + +
+
+ + +
+
+
+ +
+ +
+ +
+

Required Field

+

Length is more than 256

+
+
+
+ +
+ +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+
+ + +
+ +
+ +
+

Required Field

+

Length is more than 64

+
+
+
+
+ +
+ +
+

Required Field

+

Length is more than 64

+
+
+
+ +
+ +
+ +
+

Required Field

+
+
+
+ +
+ +
+ +
+

Required Field

+

Length is more than 128

+
+
+
+
+ +
+ +
+

Required Field

+

Length is more than 128

+
+
+
+
+ +
+ +
+

Required Field

+

Length is more than 128

+
+
+
+
+ +
+ +
+

Required Field

+

Length is more than 128

+
+
+
+ + + + +
+ +
+ +
+

Required Field

+

Length is more than 256

+
+
+
+ +
+ +
+ +
+

Required + Field

+
+
+ +
+ + +
+ +
+ +
+

Required Field

+

Length is more than 256

+
+
+
+ + +
+
+
+ +
+ +
+
+
+
+
\ No newline at end of file diff --git a/src/main/ui/static/payment/partner/templates/sub_merchant_id_apply.html b/src/main/ui/static/payment/partner/templates/sub_merchant_id_apply.html index 439260e97..02bc04812 100644 --- a/src/main/ui/static/payment/partner/templates/sub_merchant_id_apply.html +++ b/src/main/ui/static/payment/partner/templates/sub_merchant_id_apply.html @@ -232,6 +232,89 @@ + +
+
+
+
+
+
+ +
+
+ +
+ AlipayPlus(Retail) : + none +
+ +
+
+ + + +
+
+
+
+
+ No Data +
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+ +
+ AlipayPlus(Online) : + none +
+ +
+
+ + + +
+
+
+
+
+ No Data +
+
+
+
+
+
+