Quantcast
Channel: Active questions tagged paypal - Stack Overflow
Viewing all articles
Browse latest Browse all 521

How can I transform PayPal Classic Payment form into PayPal REST API PHP Application?

$
0
0

The following is the simplest PayPal interface form:

<form action="https://www.paypal.com/cgi-bin/webscr" method="post" /> <input type="hidden" name="cmd" value="_xclick" /> <input type="hidden" name="business" value="JohnDoe2@example.com" /> <input type="hidden" name="item_name" value="Purchase at the Virtual Store" /> <input type="hidden" name="item_number" value="Organic-001" /><input type="hidden" name="amount" value="17.4" /> <input type="hidden" name="currency_code" value="EUR" /> <input type="hidden" name="notify_url" value="http://www.example.com/paypalnotify.php" /> <input type="submit" name="submit" value="Pay now By PayPal" /></form>

This form is specific to a PayPal premier business account and a given amount to pay, with following key parameters:

  1. business=JohnDoe2@example.com.
  2. amount=17.4EUR.
  3. currency_code=EUR or USD.
  4. notify_url as the callback for PayPal.com as it ends.

By clicking on the [submit] button, it performs this:

  1. It redirects the customer to the paypal.com site.
  2. The user will login into her/his PayPal account, and validate the payment.
  3. The PayPal site will call the paypalnotify.php like a callback, passes information indicating if the payment has succeeded, cancelled, or not valid...

Now in the new interface using PayPal REST API, using PHP development kit, how one has to proceed to accomplish the payment?


Viewing all articles
Browse latest Browse all 521

Trending Articles