实施 paypal 的 Express checkout API 时遇到问题?
我正在做电子商务应用程序,其中实现了用于在线购物的 paypal 的 Expresscheckout API。我还创建了沙箱测试帐户。但如果我调用 setexpresscheckout API,我会收到订单总丢失错误:
这是我的代码片段
<form method="post" action="https://api-3t.sandbox.paypal.com/nvp">
<!-- UNPROTECTED VALUES. DO NOT USE IN PRODUCTION -->
<input type="hidden" name="USER" value="xxxxxxx.gmail.com">
<input type="hidden" name="PWD" value="tttttttt">
<input type="hidden" name="SIGNATURE" value="hidden">
<input type="hidden" name="VERSION" value="50.0">
<input type="hidden" name="PAYMENTREQUEST_0_PAYMENTACTION" value="sale">
<input name="PAYMENTREQUEST_0_AMT" value=19.95">
<input type="hidden" name="RETURNURL" value="http://www.xyz.com/">
<input type="hidden" name="CANCELURL" value="http://www.xyz.com/">
<input type="hidden" name="PAYMENTREQUEST_0_CURRENCYCODE" value="USD">
<input type="submit" name="METHOD" value="SetExpressCheckout">
</form>
如果有人知道如何解决此问题,请告诉我。
I'm doing e-commerce application, there m implementing paypal's Expresscheckout API for online shopping.I have created sandbox test account also. but if i call setexpresscheckout API I'm getting the order total missing error:
Here is my code snippets
<form method="post" action="https://api-3t.sandbox.paypal.com/nvp">
<!-- UNPROTECTED VALUES. DO NOT USE IN PRODUCTION -->
<input type="hidden" name="USER" value="xxxxxxx.gmail.com">
<input type="hidden" name="PWD" value="tttttttt">
<input type="hidden" name="SIGNATURE" value="hidden">
<input type="hidden" name="VERSION" value="50.0">
<input type="hidden" name="PAYMENTREQUEST_0_PAYMENTACTION" value="sale">
<input name="PAYMENTREQUEST_0_AMT" value=19.95">
<input type="hidden" name="RETURNURL" value="http://www.xyz.com/">
<input type="hidden" name="CANCELURL" value="http://www.xyz.com/">
<input type="hidden" name="PAYMENTREQUEST_0_CURRENCYCODE" value="USD">
<input type="submit" name="METHOD" value="SetExpressCheckout">
</form>
If anybody knows how to solve this, please let me know.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您正在使用 PAYMENTREQUEST_0_AMT,但是您的版本 (50.0) 非常旧,我认为它不支持多次付款。
尝试将版本升级到65.0或使用旧的指定金额的方式,我认为这只是“AMT”
You are using PAYMENTREQUEST_0_AMT however your version (50.0) is very old and I don't think that supports multiple payments.
try upping the version to 65.0 or use the old way of specifying amount, I think it is just "AMT"