PayPal API 购物车和网络钩子?



我使用 PayPal 个按钮代码生成器创建了 2 个按钮。

  • 加入购物车
<form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="business" value="sb-3ghgk675036@business.example.com">
<input type="hidden" name="lc" value="US">
<input type="hidden" name="item_name" value="TestName">
<input type="hidden" name="item_number" value="TestID">
<input type="hidden" name="amount" value="50.00">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="button_subtype" value="products">
<input type="hidden" name="no_note" value="0">
<input type="hidden" name="tax_rate" value="0.000">
<input type="hidden" name="shipping" value="0.00">
<input type="hidden" name="add" value="1">
<input type="hidden" name="bn" value="PP-ShopCartBF:btn_cart_LG.gif:NonHostedGuest">
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_cart_LG.gif" border="0" name="submit"
alt="PayPal - The safer, easier way to pay online!">
<img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form>
  • 查看购物车
<form target="paypal" action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="business" value="ZAH44BSSBQT6G">
<input type="hidden" name="display" value="1">
<input type="image" src="https://www.sandbox.paypal.com/en_US/i/btn/btn_viewcart_LG.gif" border="0" name="submit"
alt="PayPal - The safer, easier way to pay online!">
<img alt="" border="0" src="https://www.sandbox.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form>

我需要知道是否可以传递应用程序client_id而不是(我的企业电子邮件或merchant_id(,以便我可以使用这些按钮触发服务器上的 Webhook? 如果不可能,有没有办法将PayPal购物车与 REST API 网络钩子一起使用?

你为什么要使用那个超级古老、丑陋的 web 1.0 购物车?这是一个遗留的东西,只是为了向后兼容旧网站而存在。您应该实现自己的JS购物车并使用智能支付按钮:https://developer.paypal.com/demo/checkout/#/pattern/client

无论如何,如果您坚持使用旧的 web 1.0 集成并希望将其与 webhook 结合使用,请尝试订阅所有可能的付款捕获/完成 webhook 事件(v1 和 v2(,看看您收到什么。如果您什么也没收到,您将需要使用旧的即时付款通知 (IPN( 服务而不是 webhook。

最新更新