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 9dc566fe5ec09498c6ea57a3c341e23faef835b8..2cabc836939d42602464ba232df1fd96ad24350d 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);