From e2fc55116913c2f5ad582ebc26481a7a985701ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A2=81=E5=85=88=E7=94=9F?= <523894408@qq.com> Date: Tue, 22 Feb 2022 01:05:03 +0000 Subject: [PATCH] =?UTF-8?q?paypal=20V2=20status=E7=8A=B6=E6=80=81=E5=88=A4?= =?UTF-8?q?=E6=96=AD=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/egzosn/pay/paypal/v2/api/PayPalPayService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pay-java-paypal/src/main/java/com/egzosn/pay/paypal/v2/api/PayPalPayService.java b/pay-java-paypal/src/main/java/com/egzosn/pay/paypal/v2/api/PayPalPayService.java index 9dc566f..2cabc83 100644 --- a/pay-java-paypal/src/main/java/com/egzosn/pay/paypal/v2/api/PayPalPayService.java +++ b/pay-java-paypal/src/main/java/com/egzosn/pay/paypal/v2/api/PayPalPayService.java @@ -297,7 +297,7 @@ public class PayPalPayService extends BasePayService implem header.addHeader(new BasicHeader("prefer", "return=representation")); entity.setHeaders(header); JSONObject resp = getHttpRequestTemplate().postForObject(getReqUrl(order.getTransactionType()), entity, JSONObject.class); - if ("created".equalsIgnoreCase(resp.getString("state")) && StringUtils.isNotEmpty(resp.getString("id"))) { + if ("created".equalsIgnoreCase(resp.getString("status")) && StringUtils.isNotEmpty(resp.getString("id"))) { order.setTradeNo(resp.getString("id")); } return preOrderHandler(resp, order); -- Gitee