簡體   English   中英

貝寶交易已過期

[英]PayPal transaction has expired

我正在使用Paypal Rest API在Java Web應用程序中使用Paypal Express Checkout方法處理付款,並且當前應用程序指向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.

我在波紋管中獲取重定向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;
}

並且我得到類似於以下內容的重定向URL,

https://www.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=EC-6U3345417C9052027

這種行為的原因可能是什么? 有什么建議么?

謝謝。

我們也遇到了這個問題。 我們通過修改從Paypal回調中收到的返回網址來解決該問題,並在重定向之前將sandbox明確添加到了該網址。

收到的實際網址: https : //www.paypal.com/cgi-bin/webscr?cmd= _express-checkout &token=EC-6U3345417C9052027

修改后的網址: https : //www.sandbox.paypal.com/cgi-bin/webscr? cmd = _express-checkout & token = EC- 6U3345417C9052027

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM