|
@@ -10,6 +10,7 @@ import cn.kdan.cloud.pdf.office.payment.properties.AppStoreProperties;
|
|
|
import cn.kdan.cloud.pdf.office.payment.service.*;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
|
|
|
+import com.baomidou.mybatisplus.core.toolkit.StringUtils;
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.stereotype.Service;
|
|
@@ -44,7 +45,13 @@ public class AppStoreWebhookServiceImpl implements AppStoreWebhookService {
|
|
|
}
|
|
|
OrdersVO ordersVONew = ordersVOS.get(0);
|
|
|
ProductVO productVO = ordersService.getProduct(ordersVONew.getProductId());
|
|
|
- webhookService.handleSubsequentAutomaticDeduction(productVO.getPrice(), thirdTradeNo, thirdOrderId,ordersVONew,payTime);
|
|
|
+ BigDecimal price;
|
|
|
+ if(StringUtils.isNotEmpty(ordersVONew.getCurrency())&&ordersVONew.getCurrency().equals("USD")){
|
|
|
+ price = productVO.getPrice();
|
|
|
+ }else{
|
|
|
+ price = productVO.getCnyPrice();
|
|
|
+ }
|
|
|
+ webhookService.handleSubsequentAutomaticDeduction(price, thirdTradeNo, thirdOrderId,ordersVONew,payTime);
|
|
|
}
|
|
|
|
|
|
@Override
|