0
我使用paypal rest API在java web应用程序中使用paypal express checkout方法处理付款,目前应用程序指向paypal沙箱。当重定向到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;
}
和我得到重定向类似于下面的网址,
https://www.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=EC-6U3345417C9052027
这可能是导致此行为的原因?有什么建议么?
谢谢。
这工作的感谢,但我想知道什么是对这个问题的原因,因为这是工作的罚款 – Lakmal