|
|
@@ -432,17 +432,17 @@ public class PaypalService {
|
|
|
product.setName(order.getOrderType());
|
|
|
product.setDescription(order.getGoodsInfo().toJSONString());
|
|
|
product.setType("SERVICE");
|
|
|
- log.info("创建商品:"+product);
|
|
|
- String productId = restApiPaypalService.createProduct(paypalConfig, product);
|
|
|
|
|
|
+ String productId = restApiPaypalService.createProduct(paypalConfig, product);
|
|
|
+ log.info("创建商品:"+productId);
|
|
|
PlanVo plan = new PlanVo();
|
|
|
plan.setProductId(productId);
|
|
|
plan.setPlanName(order.getOrderType());
|
|
|
plan.setTimeUnit(order.getAutoPayTime());
|
|
|
plan.setCurrencyCode("USD");
|
|
|
plan.setPrice(order.getOrderMoney().multiply(new BigDecimal("100")).toString());
|
|
|
- log.info("创建订阅计划:"+plan);
|
|
|
String planId = restApiPaypalService.createPlan(paypalConfig, plan);
|
|
|
+ log.info("创建订阅计划:"+planId);
|
|
|
|
|
|
String subscription = restApiPaypalService.createSubscription(paypalConfig, planId);
|
|
|
log.info("创建订阅支付链接:"+subscription);
|