|
|
@@ -281,6 +281,7 @@ public class RestApiPaypalService {
|
|
|
* 取消订阅
|
|
|
*/
|
|
|
public void cancelSubscriptions(PaypalConfig paypalConfig, String subscriptionsId) {
|
|
|
+ log.info("cancelSubscriptions-request:{}",subscriptionsId);
|
|
|
Map<String,String> map = new HashMap<>(4);
|
|
|
map.put("Content-Type","application/json");
|
|
|
map.put("Authorization",getToken(paypalConfig));
|
|
|
@@ -290,7 +291,8 @@ public class RestApiPaypalService {
|
|
|
.execute();
|
|
|
// 订阅正常创建
|
|
|
log.info("cancelSubscriptions-resp:{}",response);
|
|
|
- if(response.getStatus() != 204 && response.getStatus() != 404){
|
|
|
+ String resp = response.toString();
|
|
|
+ if(response.getStatus() != 204 && response.getStatus() != 404 && !resp.contains("SUBSCRIPTION STATUS INVALID")){
|
|
|
throw new BusinessException(ResultCode.CANCEL_SUBSCRIPTIONS_ERROR);
|
|
|
}
|
|
|
|