gpt4 book ai didi

Paypal - 自动返回 Paypal 返回空对象

转载 作者:太空宇宙 更新时间:2023-11-03 16:34:50 25 4
gpt4 key购买 nike

我配置了 paypal 自动返回但它返回空对象但是当自动返回关闭时它工作正常意味着当用户点击“返回我的网站”按钮时它会给我所有我可以用来保存订单详细信息的值.

以下是我发布到paypal sendbox的表格

 <form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick-subscriptions">
<input type="hidden" name="cmd" value="_notify-synch">
<input type="hidden" name="business" value="${paypalAccount}">
<input type="hidden" name="item_name" value="OPP Plan">
<input type="hidden" name="item_number" value="${pid}">
<input type="hidden" name="groupId" value="1">
<input type="hidden" name="no_shipping" value="1">
<input type="hidden" name="return" value="${returnURL}">
<input type="hidden" name="rm" value="2">
<input type="hidden" name="cancel_return" value="${cancelURL}">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="a3" value="${price}.00">
<input type="hidden" name="p3" value="1">
<input type="hidden" name="t3" value="M">
<input type="hidden" name="src" value="1">
<input type="hidden" name="sra" value="1">
<input type="submit" value="Choose plan">

在我的 Controller 中,我正在读取类似的值

 @RequestMapping(value = "/confirmPayment")
public ModelAndView showPaymentDetail(Model model,
@ModelAttribute PaypalBean paypalBean) {
UserDetailedBean userLoggedIn = (UserDetailedBean) userService.getUserDetailFromSpringSecurity();

if (paypalBean != null && paypalBean.getPayer_status().equalsIgnoreCase("verified")){
//reading values here

}

如果还有其他需要,请告诉我。

最佳答案

当您启用自动返回时,您是否也启用了支付数据传输 (PDT)?启用 PDT 后,付款完成后返回到您站点的信息将是 GET。

在提供的代码中,您有 rm=2,这意味着您希望返回 POST 信息。如果那是您所期望的,您将无法在启用 PDT 的情况下获得它。

当您使用自动返回进行测试时,您是在等待重定向完成的时间,还是点击临时页面上的链接?

关于 Paypal - 自动返回 Paypal 返回空对象,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16795931/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com