实施标准 Paypal“立即购买”按钮。文档不清楚什么数据被传递到“返回”url。该文档也没有提及如何通过表单发送您自己的自定义数据。
任何人都可以为此提供适当的文档吗?
相关代码:
<form accept-charset="UTF-8" action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="✓"><input name="authenticity_token" type="hidden" value="mYAT+aR+YhVyBrulWoYoMjzY00DQggAXUVGI12TA6zk="></div>
<input id="cmd" name="cmd" type="hidden" value="_xclick">
<input id="currency_code" name="currency_code" type="hidden" value="USD">
<input id="notify_url" name="notify_url" type="hidden" value="http://localhost:3000/en/paypal_ipns/cart_purchase_ipn">
<input id="item_name" name="item_name" type="hidden" value="Cart id 5398">
<input id="quantity" name="quantity" type="hidden" value="1">
<input id="business" name="business" type="hidden" value="[email protected] /cdn-cgi/l/email-protection">
<input id="return" name="return" type="hidden" value="http://localhost:3000/en/checkout/process_paypal_return">
<input id="amount" name="amount" type="hidden" value="1.99">
<input id="rm" name="rm" type="hidden" value="2">
<p>
<input type="image" src="https://www.sandbox.paypal.com/en_US/i/btn/btn_xpressCheckout.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">
</p>
</form>
您可以使用 PDT(支付数据传输)将交易信息返回到您的页面。你可以找到更多相关内容here https://www.x.com/developers/paypal/documentation-tools/paypal-payments-standard/integration-guide/paymentdatatransfer。您还可以找到可以返回的 PDT 变量列表here https://www.x.com/developers/paypal/documentation-tools/ipn/integration-guide/IPNandPDTVariables。如果您想传递自定义信息,可以将其填充到变量“custom”中,然后返回返回页面后解析该变量。我通常用“|”分隔填充到“自定义”变量中的不同变量和值但你可以使用任何适合你的东西。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)