|
@@ -99,7 +99,7 @@ public class WebhookServiceImpl implements WebhookService {
|
|
|
private final PaddleClient paddleClient;
|
|
|
|
|
|
@Override
|
|
|
- public void handleSubsequentAutomaticDeduction(BigDecimal price, String thirdTradeNo, String thirdOrderId, OrdersVO orderByTradeNo, Integer payTime, String result) {
|
|
|
+ public void handleSubsequentAutomaticDeduction(BigDecimal price, String thirdTradeNo, String thirdOrderId, OrdersVO orderByTradeNo, Integer payTime, String result, BigDecimal oldPrice) {
|
|
|
log.info("自动订阅业务处理开始(非首期)订单id:{}", thirdOrderId);
|
|
|
String subId = CommonUtils.generateId();
|
|
|
String orderId = cn.kdan.cloud.pdf.office.payment.utils.CommonUtils.generateRightsId((long) ((Math.random() * 9999 + 1) * 10000));;
|
|
@@ -108,7 +108,11 @@ public class WebhookServiceImpl implements WebhookService {
|
|
|
BeanUtils.copyProperties(orderByTradeNo, createOrderManual);
|
|
|
createOrderManual.setPaymentMethod(PaymentMethodEnum.fromValue(orderByTradeNo.getPayment()));
|
|
|
// 设置实际扣费价格
|
|
|
- createOrderManual.setPrice(price);
|
|
|
+ if(ObjectUtils.isNotEmpty(oldPrice)){
|
|
|
+ createOrderManual.setPrice(oldPrice);
|
|
|
+ }else {
|
|
|
+ createOrderManual.setPrice(price);
|
|
|
+ }
|
|
|
createOrderManual.setReducedPrice(price);
|
|
|
if(!StringUtils.isEmpty(orderByTradeNo.getCurrency())){
|
|
|
createOrderManual.setCurrency(orderByTradeNo.getCurrency());
|