Java PayPal交易已过期

Java PayPal交易已过期,java,paypal,Java,Paypal,我正在使用paypal rest API在java web应用程序中使用paypal express签出方法处理付款,目前该应用程序是指向paypal沙箱的。直到最近,我们一直在测试事务,但现在突然不起作用,也没有做任何编码更改 现在,当重定向到paypal网站供用户审批时,总是会收到一个页面,上面写着 This transaction has expired. Please return to the recipient's website to complete your transact

我正在使用paypal rest API在java web应用程序中使用paypal express签出方法处理付款,目前该应用程序是指向paypal沙箱的。直到最近,我们一直在测试事务,但现在突然不起作用,也没有做任何编码更改

现在,当重定向到paypal网站供用户审批时,总是会收到一个页面,上面写着

This transaction has expired. Please return to the recipient's website  to complete your transaction using their regular checkout flow

We're sorry, but your session has ended. Your account hasn't been charged. Please go back to the merchant's site and check out again with PayPal.
我在java中获得重定向URL(批准URL),如下所示

private String getApprovalURL(Payment payment)
        throws UnsupportedEncodingException {
    String redirectUrl = null;
    List<Links> links = payment.getLinks();     
    for (Links l : links) {
        if (l.getRel().equalsIgnoreCase("approval_url")) {
            redirectUrl = URLDecoder.decode(l.getHref(), "UTF-8");
            break;
        }
    }
    return redirectUrl;
}
这种行为的原因可能是什么?有什么建议吗


谢谢。

我们也遇到了这个问题。我们通过修改从paypal回调收到的返回url来解决这个问题,并在重定向之前显式地将
沙盒添加到url中

收到的实际Url:

修改的Url:

谢谢,但我想知道这个问题的原因是什么,因为它工作正常
https://www.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=EC-6U3345417C9052027