Merge branch 'develop'

master
luoyang 5 years ago
commit 819c3b2456

@ -6,4 +6,8 @@ public interface ClientInfoCacheSupport {
void clearClientCache(int clientId);
void clearClientMonikerCache(String clientMoniker);
void clearClientConfigCache(int clientId);
void clearClientMonikerConfigCache(String clientMoniker);
}

@ -241,6 +241,8 @@ public interface ClientManager {
void changePaymentPage(JSONObject manager, String clientMoniker, String paypad_version);
void changeCBBankPaymentPage(JSONObject manager, String clientMoniker, String paypad_version);
void changePaymentSuccessPage(JSONObject manager, String clientMoniker, String paysuccess_version);
void switchChildEachRefund(JSONObject manager, String clientMoniker, boolean childEachRefund);
@ -251,6 +253,8 @@ public interface ClientManager {
void changePaymentPage(JSONObject account, String paypad_version);
void changeCBBankPaymentPage(JSONObject account, String paypad_version);
void changeManualSettle(JSONObject account , int client_id, boolean manual_settle,String operator_id,int type,String operation);
void changeQRCodePaySurcharge(JSONObject account, boolean paySurcharge);

@ -1,6 +1,7 @@
package au.com.royalpay.payment.manage.merchants.core.impls;
import au.com.royalpay.payment.manage.mappers.system.ClientAccountMapper;
import au.com.royalpay.payment.manage.mappers.system.ClientConfigMapper;
import au.com.royalpay.payment.manage.merchants.core.ClientInfoCacheSupport;
import au.com.royalpay.payment.manage.merchants.core.ClientManager;
import au.com.royalpay.payment.manage.signin.core.SignInAccountService;
@ -20,6 +21,8 @@ public class ClientInfoCacheSupportImpl implements ClientInfoCacheSupport{
@Resource
private ClientManager clientManager;
@Resource
private ClientConfigMapper clientConfigMapper;
@Resource
private ClientInfoCacheSupport clientInfoCacheSupport;
@Override
@ -39,4 +42,18 @@ public class ClientInfoCacheSupportImpl implements ClientInfoCacheSupport{
@CacheEvict(value = ":app_client_info_moniker:", key = "#clientMoniker")
public void clearClientMonikerCache(String clientMoniker) {
}
@Override
@CacheEvict(value = ":app_client_config_info:", key = "''+#clientId")
public void clearClientConfigCache(int clientId) {
JSONObject client = clientConfigMapper.find(clientId);
if(client!=null){
clientInfoCacheSupport.clearClientMonikerConfigCache(client.getString("client_moniker"));
}
}
@Override
@CacheEvict(value = ":app_client_config_info_moniker:", key = "#clientMoniker")
public void clearClientMonikerConfigCache(String clientMoniker) {
}
}

@ -3220,6 +3220,19 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
clientModifySupport.processClientConfigModify(new PaypadVersionModify(manager, clientMoniker, paypad_version));
}
@Override
public void changeCBBankPaymentPage(JSONObject manager, String clientMoniker, String paypad_version) {
JSONObject client = getClientInfoByMoniker(clientMoniker);
if (client == null) {
throw new InvalidShortIdException();
}
checkOrgPermission(manager, client);
JSONObject clientConfig = clientConfigMapper.find(client.getIntValue("client_id"));
clientConfig.put("cbbank_paypad_version", paypad_version);
clientConfigMapper.update(clientConfig);
clientInfoCacheSupport.clearClientMonikerConfigCache(clientMoniker);
}
@Override
public void changeGatewayVersion(JSONObject account, boolean enable_gateway_v2) {
int clientId = account.getIntValue("client_id");
@ -3328,6 +3341,19 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
}
@Override
public void changeCBBankPaymentPage(JSONObject account, String paypad_version) {
int clientId = account.getIntValue("client_id");
JSONObject client = getClientInfo(clientId);
if (client == null) {
throw new InvalidShortIdException();
}
JSONObject clientConfig = clientConfigMapper.find(client.getIntValue("client_id"));
clientConfig.put("cbbank_paypad_version", paypad_version);
clientConfigMapper.update(clientConfig);
clientInfoCacheSupport.clearClientMonikerConfigCache(client.getString("client_moniker"));
}
@Override
@Transactional
public void changeManualSettle(JSONObject account, int client_id, boolean manual_settle, String operator_id, int type, String operation) {

@ -0,0 +1,29 @@
package au.com.royalpay.payment.manage.merchants.entity.impls;
import au.com.royalpay.payment.manage.merchants.entity.ClientConfigModify;
import com.alibaba.fastjson.JSONObject;
/**
* Create by yixian at 2018-04-12 16:43
*/
public class CBBankPaypadVersionModify extends ClientConfigModify {
private String cbbank_paypad_version;
public CBBankPaypadVersionModify(JSONObject account, String clientMoniker, String paypad_version) {
super(account, clientMoniker);
this.cbbank_paypad_version = paypad_version;
}
@Override
protected String business() {
return "";
}
@Override
protected JSONObject getModifyResult() {
JSONObject modify = new JSONObject();
modify.put("cbbank_paypad_version", cbbank_paypad_version);
return modify;
}
}

@ -321,6 +321,11 @@ public class PartnerManageController {
clientManager.changePaymentPage(manager, clientMoniker, pass.getString("paypad_version"));
}
@ManagerMapping(value = "/{clientMoniker}/cbbank_payment_page_version", method = RequestMethod.PUT, role = {ManagerRole.OPERATOR, ManagerRole.BD_USER})
public void changeCBBankPaymentPage(@PathVariable String clientMoniker, @RequestBody JSONObject pass, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
clientManager.changeCBBankPaymentPage(manager, clientMoniker, pass.getString("cbbank_paypad_version"));
}
@ManagerMapping(value = "/{clientMoniker}/paysuccess_version", method = RequestMethod.PUT, role = {ManagerRole.OPERATOR, ManagerRole.BD_USER})
public void changePaymentSuccessPage(@PathVariable String clientMoniker, @RequestBody JSONObject pass, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
clientManager.changePaymentSuccessPage(manager, clientMoniker, pass.getString("paysuccess_version"));

@ -395,6 +395,12 @@ public class PartnerViewController {
clientManager.changePaymentPage(account, pass.getString("paypad_version"));
}
@PartnerMapping(value = "/cbbank_payment_page_version", method = RequestMethod.PUT)
@ResponseBody
public void changeCBBankPaymentPage(@RequestBody JSONObject pass, @ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject account) {
clientManager.changeCBBankPaymentPage(account, pass.getString("cbbank_paypad_version"));
}
@PartnerMapping(value = "/qrcode_surcharge", method = RequestMethod.PUT)
@ResponseBody
public void changeQRCodePaySurCharge(@RequestBody JSONObject pass, @ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject account) {

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

@ -2123,6 +2123,22 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
})
};
$scope.changeCBBankPaymentPage = function () {
if (!$scope.paymentInfo) {
return;
}
$http.put('/sys/partners/' + $scope.partner.client_moniker + '/cbbank_payment_page_version', {cbbank_paypad_version: $scope.paymentInfo.cbbank_paypad_version}).then(function () {
$scope.loadPartnerPaymentInfo();
}, function (resp) {
commonDialog.alert({
title: 'failed to change CBBank Payment Page Version',
content: resp.data.message,
type: 'error'
})
})
};
// 更改支付成功页
$scope.changePaySuccessPage = function () {
if (!$scope.paymentInfo) {

@ -758,6 +758,21 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload','uiBoot
})
})
};
$scope.changeCBBankPaymentPage = function () {
if (!$scope.paymentInfo) {
return;
}
$http.put('/client/partner_info/cbbank_payment_page_version', {cbbank_paypad_version: $scope.paymentInfo.cbbank_paypad_version}).then(function () {
// $scope.loadPartnerPaymentInfo();
}, function (resp) {
commonDialog.alert({
title: 'failed to change Payment Page Version',
content: resp.data.message,
type: 'error'
})
})
};
$scope.saveCustomerSurchargeRate = function (cofig) {
if (cofig != null && isNaN(cofig)) {

@ -311,7 +311,6 @@
</a>
</p>
</div>
<!--<div style="padding-top: 30px;padding-left: 20%;text-align: center">-->
<!--<img style="width: 220px;height: 150px;cursor: pointer" src="/static/images/hfpaylink_intro/pc_hf_pay_step1.png" class="img-responsive" ng-click="reset();toPcFirst();toPcShow()"/>-->
<!--<span style="font-size:9px;">微信/支付宝电脑端</span>-->
@ -365,6 +364,22 @@
<!--</span>-->
<!--</div>-->
</div>
<div class="form-group col-sm-6" ng-if="paymentInfo.enable_cb_bankpay">
<label class="col-sm-4 control-label">Select Version</label>
<div class="col-sm-6">
<select class="form-control" ng-change="changeCBBankPaymentPage()" ng-model="paymentInfo.cbbank_paypad_version" title="Payment Page">
<option value="v1">v1</option>
<option value="v2">v2</option>
</select>
</div>
<div class="col-sm-12">
<label class="col-sm-4 control-label"></label>
<div class="col-sm-8" style="margin-top: 10px;">
<img style="width: 200px" ng-if="paymentInfo.cbbank_paypad_version=='v1'" src="/static/images/cbbank_payment_page_v1.jpg">
<img style="width: 200px" ng-if="paymentInfo.cbbank_paypad_version=='v2'" src="/static/images/cbbank_payment_page_v2.jpg">
</div>
</div>
</div>
</div>
</div>
</div>

@ -450,6 +450,23 @@
</p>
</div>
</div>
<div class="form-group col-sm-6" ng-if="paymentInfo.enable_cb_bankpay">
<label class="col-sm-4 control-label">Select Version</label>
<div class="col-sm-6">
<select class="form-control" ng-change="changeCBBankPaymentPage()" ng-model="paymentInfo.cbbank_paypad_version" title="Payment Page">
<option value="v1">v1</option>
<option value="v2">v2</option>
</select>
</div>
<div class="col-sm-12">
<label class="col-sm-4 control-label"></label>
<div class="col-sm-8" style="margin-top: 10px;">
<img style="width: 200px" ng-if="paymentInfo.cbbank_paypad_version=='v1'" src="/static/images/cbbank_payment_page_v1.jpg">
<img style="width: 200px" ng-if="paymentInfo.cbbank_paypad_version=='v2'" src="/static/images/cbbank_payment_page_v2.jpg">
</div>
</div>
</div>
</div>
</div>
</div>

@ -0,0 +1,719 @@
.header-banner {
background: url(/static/images/pay_v4_banner.png) no-repeat;
background-size: 92% 100%;
background-position: center;
box-shadow: 0 0 10px #dddddd inset;
}
.merchant-title {
font-family: PingFang-SC-Medium;
font-size: 13px;
color: #4A4A4A;
letter-spacing: 0;
}
.line {
padding-left: 30px;
color: #FFD194;
}
body {
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
box-sizing: border-box;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
div, span, p, ul, li {
box-sizing: border-box;
}
.warning-sm {
color: red;
font-size: 10px;
transform-origin: left;
transform: scale(0.8);
}
.weui_grid {
padding: 7px;
height: 53px;
}
.ff.key {
position: relative;
}
.ff {
font-size: 26px;
color: #FFFFFF;
}
.ff img {
margin: 10px auto;
display: block;
width: 34px;
}
div.wait {
top: 0;
margin-left: auto;
margin-right: auto;
left: 0;
right: 0;
position: absolute;
vertical-align: middle;
text-align: center;
bottom: 0;
opacity: .5;
background-color: gray;
z-index: 10000;
}
.bisnam {
font-size: 16px;
color: #aaaaaa;
text-align: left;
padding: 0;
}
.rmbcurrency {
font-size: 13px;
color: #FFFFFF;
vertical-align: text-bottom;
line-height: 38px;
padding-left: 10px;
}
.static .rmbcurrency {
font-size: 14px;
line-height: 30px;
}
.rmbvalue {
font-size: 24px;
color: #FFFFFF;
vertical-align: text-bottom;
float: right;
}
.rmbvalue:before {
content: '≈¥';
font-size: 16px;
}
.paydetail {
float: right;
margin-top: 5px;
margin-left: 5px;
}
.static .rmbvalue {
font-size: 18px;
}
.currency {
font-size: 40px;
color: #FFFFFF;
/* line-height: 67px; */
vertical-align: text-bottom;
padding-left: 10px;
}
.static .currency {
color: #FFFFFF;
font-size: 25px;
}
.value {
font-size: 50px;
line-height: 66px;
color: #FFFFFF;
margin-left: -5px;
vertical-align: text-bottom;
padding-right: 10px;
}
.static .value {
color: #FFFFFF;
font-size: 24px;
}
input.value {
background: transparent;
border: none;
line-height: 50px;
}
input.value:active {
background: transparent;
}
input.value:focus {
border: none;
outline: none;
user-select: none;
-webkit-user-select: none;
-moz-user-select: none;
}
.pp {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
overflow-x: hidden;
background-color: #fbf9fe;
}
.new_year {
width: 100%;
height: 100%;
position: absolute;
top: 18%;
left: 0;
z-index: -1;
border-radius: 0 0 25px 25px;
}
.bankpay {
text-align: center;
padding: 20px;
color: #FFFFFF;
}
@media screen and (max-height: 520px) {
.bankpay {
text-align: center;
padding: 0;
color: #FFFFFF;
}
}
.row {
width: 100%;
padding: 0 20px;
}
.hidden {
display: none;
}
.hide-keyboard-btn {
width: 100%;
}
.hide-keyboard-btn:after {
content: '';
transform: rotate(45deg);
border-right: 2px solid #ccc;
border-bottom: 2px solid #ccc;
width: 30px;
height: 30px;
transform-origin: center;
display: block;
margin: auto;
}
.remark-box.visible {
display: block;
}
.remark-box.visible .remark-input {
font-size: 1.4em;
border: none;
background: #fff;
}
.white-box {
background: #fff;
width: 96%;
margin: 10px auto;
display: block;
position: relative;
padding: 0 10px;
box-sizing: border-box;
}
.white-box.full {
width: 100%;
}
.logo-box .banner {
width: 100%;
display: block;
}
.logo {
margin: auto;
display: block;
max-height: 60px;
max-width: 80%;
}
.logo-small {
max-height: 100px;
}
.currencyrow {
box-sizing: border-box;
margin-top: 0;
text-align: left;
margin-bottom: 0px;
position: relative;
}
@media screen and (max-height: 670px) {
.currencyrow {
box-sizing: border-box;
margin-top: 0;
text-align: left;
margin-bottom: 0px;
}
}
@media screen and (max-height: 520px) {
.currencyrow {
box-sizing: border-box;
margin-top: 20px;
text-align: center;
margin-bottom: 20px;
}
}
.currencyrow:after {
content: '';
display: block;
clear: both;
}
.currencyrow > * {
display: inline-block;
vertical-align: bottom;
margin-bottom: 0;
box-sizing: border-box;
}
.remark-input {
width: 100%;
font-size: 26px;
border-radius: 0;
outline: none;
}
.remark-box {
display: none;
}
.remark-box .remark-mask {
text-align: center;
height: 50px;
font-size: 0.9em;
line-height: 35px;
color: #ccc;
}
.remark-label {
position: absolute;
top: 5px;
right: 5px;
font-size: 20px;
z-index: 1;
font-weight: bold;
color: #0d6aad;
}
.coupons {
width: 100%;
}
.coupons > li {
display: block;
width: 100%;
float: none;
color: #888888;
border-bottom: 1px dashed #aaa;
padding: 5px 0px;
}
.coupons > li:after {
content: '';
clear: both;
display: block
}
.coupons > li:last-child {
border: none;
}
.coupons .title, .coupons .desc, .coupons label {
display: block;
}
.coupons .coupon-content {
display: block;
float: left;
}
.coupons .title {
font-weight: bold;
font-size: 1em;
}
.coupons .use-check {
position: relative;
display: block;
width: 25px;
background-repeat: no-repeat;
height: 25px;
background-size: contain;
float: right;
margin-right: 5px;
margin-top: 10px;
}
.coupons .use-check.checked {
background-image: url(/static/images/checkbox-checked.png);
}
.coupons .use-check.unchecked {
background-image: url(/static/images/checkbox-unchecked.png);
}
.coupons .use-check.disabled {
background-image: url(/static/images/checkbox-disabled.png) !important;
}
.coupons .desc {
font-size: 1em;
}
.weui-wepay-logos {
background: transparent;
}
.row.weui_grids:before, .row.weui_grids .weui_grid:before, .row.weui_grids .weui_grid:after {
display: none;
}
.button_sp_area {
display: block;
position: relative;
margin-top: 10px;
}
.button_sp_area:after {
content: '';
clear: both;
display: block;
}
.button_sp_area a {
height: 50px;
line-height: 50px;
padding: 0px;
font-family: Helvetica;
font-size: 20px;
float: left;
text-align: center;
border-radius: 0;
color: #fff;
}
.button_sp_area .paynow {
width: 65%;
background: #FEB900;
}
.button_sp_area.alipay .paynow {
background-color: #FEB900;
}
.button_sp_area.rpay .paynow {
background-color: #FEB900;
}
.button_sp_area .remark-btn {
width: 35%;
background: #FF9705
}
.pay-brands {
text-align: center;
line-height: 20px;
font-size: 24px;
margin-top: 64px;
color: #dddddd;
}
.pay-brands img {
height: 18px;
}
.pay-brands img.wechat-logo {
height: 14px;
}
.weui_dialog_bd .final {
font-weight: bold;
}
#coupon-box-toggle {
padding: 0 20px;
margin-bottom: 10px;
text-align: right;
color: #30af69;
font-size: 12px;
cursor: pointer;
}
.coupons-container {
position: fixed;
z-index: 1;
top: 0;
left: 0;
right: 0;
bottom: 0;
overflow: auto;
display: none;
}
.coupons-container.show {
display: block;
}
.coupons-container > .coupons-mask {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, .6);
z-index: 1;
}
.coupons-container > .coupon-box {
position: fixed;
z-index: 4;
left: 50%;
top: 50%;
width: 95%;
background: #fff;
padding: 10px;
transform: translate(-50%, -50%);
}
.coupons-container .coupon-box-title {
width: 100%;
display: block;
background: #fff;
padding: 0 10px 5px;
font-size: 14px;
border-bottom: 1px solid #d0d0d0;
}
.coupons-container .coupon-box-title:after {
content: '';
display: block;
clear: both;
}
.coupons-container .coupon-box-title > .title {
float: left;
display: block;
color: #0BB20C;
}
.coupons-container .coupon-box-title > #close-coupon-box {
color: #700;
float: right;
display: block;
cursor: pointer;
}
.actCharity-red {
color: #FB5252;
display: inline;
}
.actCharity {
display: inline;
font-family: PingFang-SC-Medium;
font-size: 13px;
color: #000000;
letter-spacing: 0;
text-align: center;
}
.remark-textarea {
font-size: 18px;
-webkit-appearance: none;
width: calc(100% - 24px);
height: 78px;
border: 1px solid #EBE8E8;
padding: 14px 12px;
margin-bottom: 24px;
}
.remark-textarea::-webkit-input-placeholder {
font-size: 13px;
color: #BCBCBC;
}
.paynow-button {
width: 245px;
display: block;
font-size: 16px;
color: #FFFFFF;
letter-spacing: 0;
text-align: center;
height: 48px;
line-height: 48px;
position: absolute;
bottom: -24px;
left: 50%;
transform: translateX(-50%);
background: #FF6600;
box-shadow: 0 2px 16px 0 rgba(0, 0, 0, 0.10);
border-radius: 24px;
}
.bankpay-button {
border: 1px solid #FF6600;
border-radius: 3px;
font-size: 16px;
color: #FF6600;
letter-spacing: 0;
text-align: center;
display: block;
height: 48px;
line-height: 48px;
background-color: white;
}
#coupon-box-toggle.canUse-coupon {
padding: 0 30px;
margin-bottom: 10px;
text-align: right;
color: #FF6600;
font-size: 12px;
cursor: pointer;
margin: 11px;
}
.pay-center-ctn {
margin-top: 30px;
background: #FFFFFF;
box-shadow: 0 2px 16px 0 rgba(0, 0, 0, 0.10);
border-radius: 2px;
padding: 20px;
position: relative;
}
.payment-input {
border-radius: 2px;
width: 54%;
height: 64px;
font-family: PingFang-SC-Heavy;
font-size: 25px;
color: #000000;
letter-spacing: 2.4px;
border-style:none;
}
.payment-input::-webkit-input-placeholder {
color: #000;
}
.paymengt-tips {
font-family: PingFang-SC-Medium;
font-size: 13px;
color: #000000;
letter-spacing: 0;
margin: 15px 7px;
}
.payment-pro-input {
font-size: 17px;
-webkit-appearance: none;
border: 1px solid #EBE8E8;
width: calc(100% - 24px);
height: 30px;
margin-bottom: 15px;
padding: 14px 12px
}
.payment-pro-input::-webkit-input-placeholder {
font-size: 12px;
color: #BCBCBC;
}
.pay-center-img {
display: inline-block;
vertical-align: middle;
width: 81px;
}
.pay-center-title {
display: inline-block;
vertical-align: middle;
margin-left: 11px;
}
.pay-center-dropdown {
width: 100px;
height: 64px;
background: #FF6600;
text-align: center;
line-height: 64px;
position: absolute;
right: 0;
}
.dropdown-icon {
background-image: url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/PjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+PHN2ZyB0PSIxNTYxMDgzNDM4ODM1IiBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHAtaWQ9IjMzNDciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMzIiIGhlaWdodD0iMzIiPjxkZWZzPjxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI+PC9zdHlsZT48L2RlZnM+PHBhdGggZD0iTTQ2NS4wOTQyMDIgODExLjk1MDQ5IDY5LjY0OTgwMSAzOTguNjQwMTg2Yy0xNC4xNzg5MzEtMTMuNTU5ODMtMTQuMTc4OTMxLTM1LjU1Mzc1MSAwLTQ5LjExOTcyMSAxNC4xNjU2MjgtMTMuNTY1OTcgMzcuMTMzNzM1LTEzLjU2NTk3IDUxLjMwNTUwMyAwbDM3MS42MTQ2NjkgMzg4LjQwMzAzMSAzNzEuNjIxODMyLTM4OC40MDMwMzFjMTQuMTczODE0LTEzLjU2NTk3IDM3LjE0MDg5OC0xMy41NjU5NyA1MS4zMTM2ODkgMCAxNC4xNzE3NjggMTMuNTY1OTcgMTQuMTcxNzY4IDM1LjU1OTg5IDAgNDkuMTE5NzIxTDUyMC4wNDY3NjggODExLjk1MDQ5Yy03LjU1NjA5MyA3LjIzMDY4Mi0xNy41ODU1MTcgMTAuMzIyMDktMjcuNDc2Nzk1IDkuODI3ODMzQzQ4Mi42Nzg2OTYgODIyLjI3MjU3OSA0NzIuNjQ5MjcyIDgxOS4xODIxOTQgNDY1LjA5NDIwMiA4MTEuOTUwNDl6IiBwLWlkPSIzMzQ4IiBmaWxsPSIjZmZmZmZmIj48L3BhdGg+PC9zdmc+");
background-size: 13px 13px;
width: 13px;
height: 13px;
display: inline-block;
margin-left: 5px;
}
.rotate-180 {
transform: rotate(180deg);
}
.pay-center-dropdown-ctn {
display: none;
background: #FF6600;
color: #fff;
}
.currency{
padding-left: 6px;
height: 52px;
width: 30px;
font-family: PingFang-SC-Heavy;
font-size: 25px;
color: #000000;
letter-spacing: 2.4px;
text-align: center;
}
.logo-div {
max-width: 34%;
display: inline-block;
max-height: 60px;
padding-top: 10px;
}
.merchant-div{
display: inline-block;
padding-left: 10px;
padding-top: 20px;
}

@ -0,0 +1,89 @@
var num = function (obj) {
obj.value = obj.value.replace(/[^\d.]/g, "");
obj.value = obj.value.replace(/^\./g, "");
obj.value = obj.value.replace(/\.{2,}/g, ".");
obj.value = obj.value.replace(".", "$#$").replace(/\./g, "").replace("$#$", ".");
obj.value = obj.value.replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3');
if(obj.value.indexOf(".")< 0 && obj.value !==""){
obj.value= parseFloat(obj.value);
}
var surchargeData = calculateSurcharge(obj.value - 0);
var surchargeAmount = Decimal.add(surchargeData.surcharge, surchargeData.tax);
var currency = '$';
if($('#select_currency').val()=='CNY'){
currency = '¥';
}
$('#surchargeAmount').html(currency+surchargeAmount+'');
$('#totalAmount').html(currency+surchargeData.newPrice+'');
if (surchargeAmount - 0 === 0 || !window.c4surcharge) {
$('.surcharge').hide();
} else {
$('.surcharge').show();
}
};
function onChange(str,num) {
return str.length === num;
}
$(document).ready(function () {
$('.surcharge').hide();
$('#commit-btn').click(function () {
var currency = $('#select_currency option:selected').val();
var price = $('#price').val();
var product = $('#product').val();
var remark = $('#remark').val();
if (price == null || onChange(price, 0)) {
alert('请填写订单金额');
return;
}
if (price - 0 === 0) {
alert('金额不能为0');
return;
}
if (product == null || product.length === 0) {
alert('请填写真实的商品名称');
return;
}
$('#commit-btn').addClass('hidden');
$('#commit-btn-loading').removeClass('hidden');
var jsonData = {
user_id: window.customer_id,
price: price,
currency: currency,
gateway_type: 8,
description:remark,
product_name:product
};
$.ajax({
url: '/api/v1.0/lakala_pay/partners/' + window.client_moniker + '/submit',
method: 'put',
data: JSON.stringify(jsonData),
contentType: 'application/json',
dataType: 'json',
success: function (res) {
if(res.return_code !== 'SUCCESS'){
alert(res.message);
$('#commit-btn').removeClass('hidden');
$('#commit-btn-loading').addClass('hidden');
}else {
location.href = res.pay_url+'?'+res.sign_url;
// const $form = $(res.formString);
// $('body').append($form);
// $form.submit();
// $('body').removeChildren($form);
}
},
error: function (jqXHR) {
alert(JSON.parse(jqXHR.responseText).message);
$('#commit-btn').removeClass('hidden');
$('#commit-btn-loading').addClass('hidden');
}
})
});
});

@ -0,0 +1,116 @@
var num = function (obj) {
obj.value = obj.value.replace(/[^\d.]/g, "");
obj.value = obj.value.replace(/^\./g, "");
obj.value = obj.value.replace(/\.{2,}/g, ".");
obj.value = obj.value.replace(".", "$#$").replace(/\./g, "").replace("$#$", ".");
obj.value = obj.value.replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3');
if(obj.value.indexOf(".")< 0 && obj.value !=""){
obj.value= parseFloat(obj.value);
}
var surchargeData = calculateSurcharge(obj.value - 0);
var surchargeAmount = Decimal.add(surchargeData.surcharge, surchargeData.tax);
var currency = '$';
if($('#select-display').text()=='CNY'){
currency = '¥';
}
$('#surchargeAmount').html(currency+surchargeAmount+'');
$('#totalAmount').html(currency+surchargeData.newPrice+'');
if (surchargeAmount - 0 == 0 || !window.c4surcharge) {
$('.surcharge').hide();
} else {
$('.surcharge').show();
}
};
var changeCurrencyCheckNum = function (obj) {
var surchargeData = calculateSurcharge(obj.val() - 0);
var surchargeAmount = Decimal.add(surchargeData.surcharge, surchargeData.tax);
var currency = '$';
if($('#select-display').text()=='CNY'){
currency = '¥';
}
$('#surchargeAmount').html(currency+surchargeAmount+'');
$('#totalAmount').html(currency+surchargeData.newPrice+'');
if (surchargeAmount - 0 == 0 || !window.c4surcharge) {
$('.surcharge').hide();
} else {
$('.surcharge').show();
}
};
function onChange(str,num) {
if (str.length == num) {
return true;
}
return false;
}
$(document).ready(function () {
$('.pay-center-dropdown-ctn').on('click', function () {
if ($('#select-change').text() == "CNY") {
$('#select-display').html("CNY");
$('#select-change').html("AUD");
$('.currency').html("¥");
changeCurrencyCheckNum($('#price'));
}else {
$('#select-display').html("AUD");
$('#select-change').html("CNY");
$('.currency').html("$");
changeCurrencyCheckNum($('#price'));
}
$('.pay-center-dropdown-ctn').toggle();
});
$('.surcharge').hide();
$('#commit-btn').click(function () {
var product = $('#product').val();
var price = $('#price').val();
var remark = $('#remark').val();
var currency = $('#select_currency option:selected').val();
if (price == null || onChange(price,0)) {
alert('请填写订单金额');
return;
}
if (price-0 ==0) {
alert('金额不能为0');
return;
}
$('#commit-btn').addClass('hidden');
$('#commit-btn-loading').removeClass('hidden');
var jsonData = {
user_id: window.customer_id,
price: price,
currency: currency,
product_name:product,
description:remark
};
$.ajax({
url: '/api/v1.0/yeepay/partners/' + window.client_moniker + '/share',
method: 'put',
data: JSON.stringify(jsonData),
contentType: 'application/json',
dataType: 'json',
success: function (res) {
if(res.return_code != 'SUCCESS'){
alert(res.message);
$('#commit-btn').removeClass('hidden');
$('#commit-btn-loading').addClass('hidden');
}else {
location.href = res.pay_url+'?'+res.sign_url;
}
},
error: function (jqXHR) {
alert(JSON.parse(jqXHR.responseText).message);
$('#commit-btn').removeClass('hidden');
$('#commit-btn-loading').addClass('hidden');
}
})
});
});

@ -245,15 +245,13 @@ input.value:focus {
.logo-box .banner {
width: 100%;
display: block;
}
.logo {
margin: auto;
display: block;
margin-top: 20px;
max-height: 60px;
max-width: 80%;
max-width: 100%;
}
.logo-small {
@ -622,3 +620,16 @@ input::-webkit-input-placeholder{
line-height: 60px;
vertical-align: text-bottom;
}
.logo-div {
max-width: 34%;
display: inline-block;
max-height: 60px;
padding-top: 10px;
}
.merchant-div{
display: inline-block;
padding-left: 10px;
padding-top: 20px;
}

Loading…
Cancel
Save