|
@@ -235,7 +235,7 @@ public class MerchantWechatPaymentStrategyImpl implements MerchantPaymentStrateg
|
|
|
|
|
|
|
|
order.setPaymentStatus(1);
|
|
order.setPaymentStatus(1);
|
|
|
order.setPayTime(now);
|
|
order.setPayTime(now);
|
|
|
- order.setPaymentMethod("微信支付");
|
|
|
|
|
|
|
+ order.setPaymentMethod("wechatPay");
|
|
|
order.setOrderStatus(1);
|
|
order.setOrderStatus(1);
|
|
|
if (StringUtils.isBlank(order.getVerificationCode())) {
|
|
if (StringUtils.isBlank(order.getVerificationCode())) {
|
|
|
order.setVerificationCode("YS" + UniqueRandomNumGenerator.generateUniqueCode(10));
|
|
order.setVerificationCode("YS" + UniqueRandomNumGenerator.generateUniqueCode(10));
|
|
@@ -306,7 +306,8 @@ public class MerchantWechatPaymentStrategyImpl implements MerchantPaymentStrateg
|
|
|
request.notifyUrl = StringUtils.isNotBlank(refundNotifyUrl) ? refundNotifyUrl : "";
|
|
request.notifyUrl = StringUtils.isNotBlank(refundNotifyUrl) ? refundNotifyUrl : "";
|
|
|
request.amount = new WeChatPaymentStrategyImpl.AmountReq();
|
|
request.amount = new WeChatPaymentStrategyImpl.AmountReq();
|
|
|
request.amount.refund = new BigDecimal(refundAmount).multiply(new BigDecimal(100)).longValue();
|
|
request.amount.refund = new BigDecimal(refundAmount).multiply(new BigDecimal(100)).longValue();
|
|
|
- request.amount.total = order.getDepositAmount().longValue();
|
|
|
|
|
|
|
+ // 微信 V3 amount.total 单位为分,depositAmount 为元,需 *100 转分
|
|
|
|
|
+ request.amount.total = order.getDepositAmount().multiply(new BigDecimal(100)).longValue();
|
|
|
request.amount.currency = "CNY";
|
|
request.amount.currency = "CNY";
|
|
|
|
|
|
|
|
WeChatPaymentStrategyImpl.Refund response = refundRun(config, privateKey, wechatPayPublicKey, request);
|
|
WeChatPaymentStrategyImpl.Refund response = refundRun(config, privateKey, wechatPayPublicKey, request);
|