zwhui před 7 měsíci
rodič
revize
afde6eaa88

+ 3 - 3
netflix-service/src/main/java/com/cyksj/service/paypal/PayPalService.java

@@ -131,7 +131,7 @@ public class PayPalService{
             throw BusinessRuntimeException.getInstance("暂不支持paypal购买该规格车票..");
         }
         redisService.set(RedisService.key.ABROAD_SUCCESS_URL.getName() + orderId,successUrl,RedisService.key.ABROAD_SUCCESS_URL.getTimeout());
-        BigDecimal money = orderDon.getMoney().divide(new BigDecimal(7),2,RoundingMode.HALF_DOWN);
+        BigDecimal money = orderDon.getMoney().divide(new BigDecimal(5),2,RoundingMode.HALF_DOWN);
         orderDon.setAbroadMoney(money);
         orderDon.setType(OrderDon.Type.PAYPAL);
         orderDonService.updateById(orderDon);
@@ -206,7 +206,7 @@ public class PayPalService{
 
 
     public Boolean refund(OrderRefundReq refundReq, OrderDon orderDon) throws PayPalRESTException {
-        BigDecimal net = refundReq.getRefundMoney().divide(new BigDecimal(7),2,RoundingMode.HALF_DOWN).subtract(orderDon.getAbroadTransactionFee());;
+        BigDecimal net = refundReq.getRefundMoney().divide(new BigDecimal(5),2,RoundingMode.HALF_DOWN).subtract(orderDon.getAbroadTransactionFee());;
         log.info("paypal return order:{},money:{}",orderDon.getId(),net);
         PaypalPayConfig paypalPayConfig = paypalPayConfigService.getById(1);
         APIContext apiContext = getAPIContext(paypalPayConfig.getClientId(), paypalPayConfig.getClientSecret(),paypalPayConfig.getMode());
@@ -226,7 +226,7 @@ public class PayPalService{
     public Payment createVipPayment(Long orderId, String successUrl) throws PayPalRESTException {
         VipOrderDon orderDon = vipOrderDonService.getById(orderId);
         redisService.set(RedisService.key.ABROAD_SUCCESS_URL.getName() + orderId,successUrl,RedisService.key.ABROAD_SUCCESS_URL.getTimeout());
-        BigDecimal money = orderDon.getMoney().divide(new BigDecimal(7),2,RoundingMode.HALF_DOWN);
+        BigDecimal money = orderDon.getMoney().divide(new BigDecimal(5),2,RoundingMode.HALF_DOWN);
         orderDon.setAbroadMoney(money);
         orderDon.setType(VipOrderDon.Type.PAYPAL);
         vipOrderDonService.updateById(orderDon);

+ 3 - 3
netflix-service/src/main/java/com/cyksj/service/stripe/StripeService.java

@@ -59,7 +59,7 @@ public class StripeService {
                 throw BusinessRuntimeException.getInstance("订单异常..");
             }
         }
-        BigDecimal money = orderDon.getMoney().divide(new BigDecimal(7),2,RoundingMode.HALF_DOWN);
+        BigDecimal money = orderDon.getMoney().divide(new BigDecimal(5),2,RoundingMode.HALF_DOWN);
         orderDon.setAbroadMoney(money);
         orderDon.setType(OrderDon.Type.STRIPE);
         orderDonService.updateById(orderDon);
@@ -131,7 +131,7 @@ public class StripeService {
 
 
     public Boolean refund(OrderRefundReq refundReq, OrderDon orderDon) throws StripeException {
-        BigDecimal net = refundReq.getRefundMoney().divide(new BigDecimal(7),2, RoundingMode.HALF_DOWN).subtract(orderDon.getAbroadTransactionFee());
+        BigDecimal net = refundReq.getRefundMoney().divide(new BigDecimal(5),2, RoundingMode.HALF_DOWN).subtract(orderDon.getAbroadTransactionFee());
         log.info("stripe return order:{},money:{}",orderDon.getId(),net);
         StripePayConfig stripePayConfig = stripePayConfigMapper.selectById(1);
         Stripe.apiKey = stripePayConfig.getApiKey();
@@ -151,7 +151,7 @@ public class StripeService {
     }
     public String checkOutStripeVip(Long orderId,String successUrl) throws Exception{
         VipOrderDon orderDon = vipOrderDonService.getById(orderId);
-        BigDecimal money = orderDon.getMoney().divide(new BigDecimal(7),2,RoundingMode.HALF_DOWN);
+        BigDecimal money = orderDon.getMoney().divide(new BigDecimal(5),2,RoundingMode.HALF_DOWN);
         orderDon.setAbroadMoney(money);
         orderDon.setType(VipOrderDon.Type.STRIPE);
         vipOrderDonService.updateById(orderDon);