There are two ways to integrate PayPal payments in your website:
1. Create a tool via the PayPal account button
Enter the PayPal merchant account, select the Create Button tool, including add to cart, purchase, rent three types of buttons.
After that, a piece of code is generated, the code is copied directly into its own HTML file, and the button is clicked to jump to the corresponding page of PayPal. The payment process is as follows:
2, the direct use of HTML form forms, the official example is as follows:
<Divrole= "Main"class= "Ui-content"><formAction= "HTTPS://WWW.PAYPAL.COM/CGI-BIN/WEBSCR"Method= "POST"><!--Identify your business So, you can collect the payments. -<inputtype= "hidden"name= "Business"value= "[email protected]"><!--Specify a Buy now button. -<inputtype= "hidden"name= "cmd"value= "_xclick"><!--Specify details about the item buyers would purchase. -<inputtype= "hidden"name= "Item_name"value= "Hot sauce-12oz Bottle"><inputtype= "hidden"name= "Amount"value= "5.95"><inputtype= "hidden"name= "Currency_code"value= "USD"><!--Display the payment button. -<inputtype= "image"name= "Submit"Border= "0"src= "Https://www.paypalobjects.com/en_US/i/btn/btn_buynow_LG.gif"alt= "paypal-the safer, easier-to-pay online"><imgalt=""Border= "0"width= "1"Height= "1"src= "Https://www.paypalobjects.com/en_US/i/scr/pixel.gif" ></form>
Conclusion:
In general, PayPal's integration is simple, way 1, more secure and easy, but the disadvantage is that if the product changes frequently, or the existence of multi-merchant is very troublesome, because the parameters of the button are fixed.
The second, similar to the Android SDK, needs to pass the shopping information to the background before jumping to pay.
Note: PayPal also pays a refund via the transaction serial number (refund)
Web-Integrated PayPal payment