【问题标题】:Paypal does not return the actual total amountPaypal 不返回实际总金额
【发布时间】:2015-09-10 01:16:28
【问题描述】:

我使用 paypal 作为支付网关。我将商品添加到我的购物车中,它显示正确的信息,但总金额显示的不是实际总金额。任何人都可以在我的代码中找到错误?

提前致谢。

<form name="paypalForm" action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post">
 <input type="hidden" name="business" value="sumn2u@gmail.com">
 <input type="hidden" name="cmd" value="_cart">
 <input type="hidden" name="upload" value="1">
 <input type="hidden" name="item_name_1" value="Ice Age ">
 <input type="hidden" name="quantity_1" value="2">
 <input type="hidden" name="amount_1" value="23.95">
 <input type="hidden" name="shipping_1" value="1.75">
 <input type="hidden" name="return" value="http://localhost:8084/DVDAppp/return.jsp?success=true">
 <input name="notify_url" value="http://localhost:8084/DVDAppp/test.jsp" type="hidden">
 <input type="hidden" name="cancel_return" value="http://localhost:8084/WebEE/index.jsp">
 <input type="image" src="https://www.paypalobjects.com/en_US/i/btn/x-click-but6.gif" border="0" name="submit" alt="Make payments with PayPal - it" s="" fast,="" free="" and="" secure!'="">
</form>

【问题讨论】:

  • 图片中的文字很小,但对我来说看起来很合适。你说什么错了?
  • 好吧,我弄清楚我犯了什么错误,我没有将数量乘以项目中的价格,所以它给我带来了问题。另一件事我需要即时通知的实际网址吗?

标签: jsp paypal payment-gateway paypal-sandbox payment


【解决方案1】:

此代码中的总金额是正确的。至于 'notify_url' 部分,如果您不在 Live 模型中使用 PayPal IPN 功能并且仅出于测试目的,您可以将任何首选 URL 用于即时通知。更多关于PayPal IPN的信息,您可以参考下面的链接。

https://developer.paypal.com/webapps/developer/docs/classic/ipn/integration-guide/IPNIntro/

【讨论】:

    猜你喜欢
    • 2018-10-31
    • 1970-01-01
    • 2015-11-24
    • 2012-11-29
    • 2021-01-20
    • 2013-01-08
    • 2012-05-21
    • 2015-09-10
    相关资源
    最近更新 更多