paypal支付单号问题处理,新增回存方式。

This commit is contained in:
egan
2019-03-22 10:37:35 +08:00
parent cce231c961
commit 71b18c9a09
4 changed files with 30 additions and 4 deletions

View File

@@ -181,6 +181,9 @@ public class PayPalPayService extends BasePayService<PayPalConfigStorage>{
HttpStringEntity entity = new HttpStringEntity(JSON.toJSONString(payment), ContentType.APPLICATION_JSON);
entity.setHeaders(authHeader());
JSONObject resp = getHttpRequestTemplate().postForObject(getReqUrl(order.getTransactionType()), entity, JSONObject.class);
if ("created".equals(resp.getString("state")) && StringUtils.isNotEmpty(resp.getString("id"))){
order.setOutTradeNo(resp.getString("id"));
}
return resp;
}