Java getPaymentExecStatus()提供空值

Java getPaymentExecStatus()提供空值,java,paypal,paypal-sandbox,paypal-adaptive-payments,playframework-2.4,Java,Paypal,Paypal Sandbox,Paypal Adaptive Payments,Playframework 2.4,我正在尝试使用paypal java sdk中的自适应支付api,并调用getPaymentExecStatus(),给出null。这是我的密码 final PayRequest payRequest = new PayRequest(); final List<Receiver> receivers = new ArrayList<Receiver>(); final Receiver receiver = new Receiver();

我正在尝试使用paypal java sdk中的自适应支付api,并调用getPaymentExecStatus(),给出null。这是我的密码

    final PayRequest payRequest = new PayRequest();
    final List<Receiver> receivers = new ArrayList<Receiver>();
    final Receiver receiver = new Receiver();
    receiver.setAmount(ammount);
    receiver.setEmail("sandeepraju_123@yahoo.co.in");
    receivers.add(receiver);
    final ReceiverList receiverList = new ReceiverList(receivers);
    payRequest.setSenderEmail(Constants.PAYPAL_USER_ID);

    payRequest.setReceiverList(receiverList);

    final RequestEnvelope requestEnvelope = new RequestEnvelope("en_US");
    payRequest.setRequestEnvelope(requestEnvelope); 
    payRequest.setActionType("PAY");
    payRequest.setCancelUrl("https://devtools-paypal.com/guide/ap_implicit_payment?cancel=true");
    payRequest.setReturnUrl("https://devtools-paypal.com/guide/ap_implicit_payment?success=true");
    payRequest.setCurrencyCode("USD");
    payRequest.setIpnNotificationUrl("http://replaceIpnUrl.com");

    final Map<String, String> sdkConfig = new HashMap<String, String>();
    sdkConfig.put("mode", Constants.PAYPAL_MODE);
    sdkConfig.put("acct1.UserName", Constants.PAYPAL_USER_ID);
    sdkConfig.put("acct1.Password", Constants.PAYPAL_USER_PASSWORD);
    sdkConfig.put("acct1.Signature",Constants.PAYPAL_USER_SIGNATURE);
    sdkConfig.put("acct1.AppId",Constants.PAYPAL_APPID);
    Logger.debug("paypal"+Constants.PAYPAL_USER_ID+Constants.PAYPAL_USER_PASSWORD+Constants.PAYPAL_USER_SIGNATURE); 
    final AdaptivePaymentsService adaptivePaymentsService = new AdaptivePaymentsService(sdkConfig);
    try {
        final PayResponse payResponse = adaptivePaymentsService.pay(payRequest);
        Logger.error("error list"+payResponse.getError());
        Logger.debug("pay respose"+payResponse.toString());
        coachWithdrawl.withdrawlAmount = ammount;
        Logger.debug("payResponse"+payResponse.getPaymentExecStatus());
        coachWithdrawl.paymentExecStatus = payResponse.getPaymentExecStatus();
        coachWithdrawl.payKey = payResponse.getPayKey();
        payResponse.getPaymentExecStatus();
    } catch (SSLConfigurationException | InvalidCredentialException | HttpErrorException
            | InvalidResponseDataException | ClientActionRequiredException | MissingCredentialException
            | IOException | InterruptedException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    } catch (final com.paypal.sdk.exceptions.OAuthException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    }
final PayRequest PayRequest=new PayRequest();
最终列表接收者=新的ArrayList();
最终接收器=新接收器();
接收方。设置金额(amount);
receiver.setEmail(“sandeepraju_123@yahoo.co.in");
接收者。添加(接收者);
最终接管人=新接管人(接管人);
payRequest.SetSenderMail(常量.PAYPAL\u用户\u ID);
payRequest.setReceiverList(收款人列表);
最终RequestEnvelope RequestEnvelope=新的RequestEnvelope(“en_US”);
payRequest.setRequestEnvelope(请求信封);
payRequest.setActionType(“支付”);
payRequest.setCancelUrl(“https://devtools-paypal.com/guide/ap_implicit_payment?cancel=true");
payRequest.setReturnUrl(“https://devtools-paypal.com/guide/ap_implicit_payment?success=true");
payRequest.setCurrencyCode(“美元”);
payRequest.setIpnNotificationUrl(“http://replaceIpnUrl.com");
final Map sdkConfig=new HashMap();
sdkConfig.put(“模式”,常量.PAYPAL_模式);
sdkConfig.put(“acct1.UserName”,Constants.PAYPAL\u USER\u ID);
sdkConfig.put(“acct1.Password”,Constants.PAYPAL\u USER\u Password);
sdkConfig.put(“acct1.Signature”,Constants.PAYPAL\u USER\u Signature);
sdkConfig.put(“acct1.AppId”,Constants.PAYPAL\u AppId);
Logger.debug(“贝宝”+常量。贝宝用户ID+常量。贝宝用户密码+常量。贝宝用户签名);
最终自适应支付服务自适应支付服务=新自适应支付服务(sdkConfig);
试一试{
final PayResponse PayResponse=自适应支付服务支付(payRequest);
Logger.error(“错误列表”+payResponse.getError());
debug(“pay respose”+pay response.toString());
CoachDrawul.Drawlamount=amount;
debug(“payResponse”+payResponse.getPaymentExecStatus());
CoachDrumpl.paymentExecStatus=payResponse.getPaymentExecStatus();
CoachDrawll.payKey=payResponse.getPayKey();
payResponse.getPaymentExecStatus();
}catch(SSLConfigurationException | InvalidCredentialException | HttpErrorException
|InvalidResponseDataException | ClientActionRequiredException |缺少凭证例外
|IOException(中断异常e){
//TODO自动生成的捕捉块
e、 printStackTrace();
}捕获(最终com.paypal.sdk.exceptions.oautheexception e){
//TODO自动生成的捕捉块
e、 printStackTrace();
}
我从这里举了个例子 它处于沙箱模式,所以我可以从仪表板帐户选项卡获取凭据。
请帮助我找出响应和其他数据提交为空的原因。提前感谢。

我错误地使用了paypal用户id作为发件人id,因此它提供空以获取执行状态。不过,谢谢