|
|
@@ -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);
|