<分区>
我们不允许提问寻求书籍、工具、软件库等的推荐。您可以编辑问题,以便用事实和引用来回答。
关闭 6 年前。
我正在开发电子商务应用程序,它需要 PayPal 支付网关才能通过信用卡/借记卡从客户那里获得付款。我浏览了开发者网站上所有可用的 PayPal API 类型,但找不到我需要的那个。任何人都可以帮助我摆脱使用正确的 API 代码的困惑。
<form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post">
<!-- Identify your business so that you can collect the payments. -->
<input type="hidden" name="business" value="info@companyname.com">
<!-- Specify a Buy Now button. -->
<input type="hidden" name="cmd" value="_xclick">
<!-- Specify details about the item that buyers will purchase. -->
<input type="hidden" name="item_name" value="Camera">
<input type="hidden" name="item_number" value="CAM0548">
<input type="hidden" name="amount" value="2.0">
<input type="hidden" name="currency_code" value="USD">
<!-- Specify URLs -->
<input type='hidden' name='cancel_return' value='http://localhost/paypal/cancel.php'>
<input type='hidden' name='return' value='http://localhost/paypal/success.php'>
<!-- Display the payment button. -->
<input type="image" name="submit" border="0"
src="https://www.paypalobjects.com/en_US/i/btn/btn_buynow_LG.gif" alt="PayPal - The safer, easier way to pay online">
<img alt="" border="0" width="1" height="1" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" >
</form>
最佳答案
我认为您应该尝试使用 Paypal Express Checkout,这是一种更好的方式。
查看演示:https://demo.paypal.com/us/demo/navigation?device=desktop&page=merchantHome
下载演示代码:https://demo.paypal.com/us/demo/download?capability=checkOutWithPaypal&lang=PHP
关于php - 哪一个是用于信用卡/借记卡付款的正确 PayPal API 代码?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39251342/