如何在不使用“立即购买”按钮的情况下将 Paypal IPN 集成到自定义购物车
我无法理解如何使用 IPN 服务将购物车商品发送到 PayPal,而不使用许多教程似乎都演示的“立即购买”按钮。
因此,我的购物车详细信息作为多维数组存储在 $_SESSION['cart'] 中。
e.g:
$_SESSION['cart'][0]['item_price']
$_SESSION['cart'][0]['item_name']
$_SESSION['cart'][0]['item_description']
$_SESSION['cart'][1]['item_price'] ...
我知道监听器参与了整个过程的其余部分,但是我看不到如何将项目详细信息(例如名称和费用)发送到 paypal 进行付款处理。
无论如何,cURL 都参与其中。任何信息都会非常有帮助!
I'm having some trouble understanding how I can send my shopping cart items to PayPal using the IPN service without using the 'Buy Now' buttons which many tutorials seem to demonstrate.
So my shopping cart details are stored within $_SESSION['cart'] as a multidimensional array.
e.g:
$_SESSION['cart'][0]['item_price']
$_SESSION['cart'][0]['item_name']
$_SESSION['cart'][0]['item_description']
$_SESSION['cart'][1]['item_price'] ...
I know that a listener is involved for the rest of the process however I cannot see how I can send the item details such as name and cost to paypal for payment processing.
Is cURL involved in anyway. Any information would be very helpful!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
IPN 代表即时付款通知。 IPN 本身是从 PayPal 服务器到您网站页面的 POST,让您知道交易已完成(或失败)。
要在不使用简单按钮方法的情况下将购物车发送到 PayPal,您需要使用 PayPal API。查看 SetExpressCheckout 方法,该方法在 PayPal 网站上初始化购物车/结账。这将为您提供一个 ID/URL,您可以稍后使用它来将您的客户重定向到。
请参阅:
https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_api_nvp_r_SetExpressCheckout
IPN stands for Instant Payment Notification. IPN itself is a POST from PayPal's servers to a page on your site to let you know that a transaction has completed (or failed).
To send a shopping cart to PayPal without using the simple button method you need to use the PayPal API. Check out the SetExpressCheckout method, which initialises a cart/checkout on the PayPal site. This will give you an ID/URL you can use to redirect your customer to at a later time.
See:
https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_api_nvp_r_SetExpressCheckout