Hello! Viewed many articles on how to work with pipel, how to accept paypal on your site. Total out 2 ways:

  1. Like all merchants. An action form is created which is a paypal service and fields are passed by others: cmd = _xclick and notify_url - link to the payment processor after it is paid.
  2. Via API papypal. Using methods: SetExpressCheckout, DoExpressCheckoutPayment, GetExpressCheckoutDetails. The first method creates an invoice and returns the token, after which my script should redirect to the paypal payment page with the previously received token. After the user confirms the payment to paypal, there is a request for my script with a token and payer ID. The script calls the DoExpressCheckoutPayment method to complete the payment and the GetExpressCheckoutDetails method to get the details.

Obviously, the first method is simpler. But why so many articles with the second way? They are more than with a simpler first. Are there any advantages of the second method? Why at all then he invented it

    1 answer 1

    Obviously, because the first method is simpler. And the second is more interesting, because he has more opportunities)

    In the first case, you describe the "Buy Now" button . It is so beautifully described on PayPal itself. This is the easiest way to provide the user with the ability to pay using PayPal.

    In the second case, one of the features of the outdated Classic Api (based on SOAP) is Express Checkout . If desired, using it you can make an analogue of the "Buy Now" button.

    But at Express Checkouts, the capabilities of Classic Api are not limited to - there are many more. There is user authentication, automatic payments and payments (as on Steam, for example, when you can pay for goods at all without going to the PayPal website, by pressing just one button; well, any periodic payments also use this), billing bulk payments.

    For a long time, PayPal introduced a new API (uses REST) ​​- they added even more interesting business opportunities there.

    • In general, it is clear) The implementation of the "Buy Now" button through the API is close to perversion. Thank you)) - iproger