5

I am looking at using PayPal as a payment option for my custom shopping cart I have built. I already have a cart set up, and a checkout 'complete'. It asks the user for their address. Once they have completed all the fields, they hit 'Pay with PayPal'. This does not send them to PayPal yet. First it processes the data they entered, THEN redirects them off to PayPal to pay.

This is all using PayPal Express Checkout.

The desired flow is something like this.

  1. The user adds items to the cart. All this happens and is already handled by my server, with no calls to PayPal. I want the user to manage the cart on MY WEBSITE, not PayPal.
  2. Once finished, the user hits 'checkout'. This then takes them to another page on my server (for example http://mywebsite.com/store/checkout/) where they confirm their shopping cart and enter their shipping address and other details.
  3. Once they finish that, they click a 'Pay with PayPal' button and are sent to another page on MY server (for example, http://mywebsite.com/store/checkout/pay/) where my web application processes the order and information and adds it to the database. Now, HERE is where I want the paypal magic to happen.
  4. During the processing of the previous page (step three), I want my web application to contact paypal using the SetExpressCheckout API and redirect the user to the PayPal payment page.
  5. The user enters their credit card or PayPal details and pays on https://paypal.com.
  6. The user is then sent back to my website to be told that payment has been received (if it has) or any other alerts that they need to be aware of. The order status is updated accordingly and the order is shipped off.

I am quite sure this is all possible. Is it? I am using Python and Django.

My only problem is that I do not want the users to have to enter their shipping/payment address TWICE (once on my website, once on the paypal payment website). I do not want the user to have to enter their shipping/payment address at the PayPal payment website. There is no need for this as I already have it. Is it possible to remove the address fields from the PayPal website, or just pre-fill them with data from my website?

Josh Hunt
  • 14,225
  • 26
  • 79
  • 98

3 Answers3

2

Yes, there is an option in the Paypal API to override the address input. See here:

https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_api_ECCustomizing#id0864F070OHS__id0864H804030

Relevant info copied here for convenience:

To override the shipping address:

Set the ADDROVERRIDE parameter to 1 in the call to SetExpressCheckout.
Set the following shipping address parameters in the call to SetExpressCheckout to the address values you want to use for the new address.

SHIPTONAME
SHIPTOSTREET
SHIPTOCITY
SHIPTOSTATE (Optional)
SHIPTOCOUNTRYCODE
SHIPTOZIP
SHIPTOSTREET2 (Optional)
Amber
  • 507,862
  • 82
  • 626
  • 550
0

In your SetExpressCheckout call you can set "NOSHIPPING" to 1. This removes any shipping address details from being requested on the PayPal payment page. It also means, however, that no shipping details are attached to the payment (if you or the customer want to have that kind of information available from within your PayPal account).

Dan
  • 1
  • 1
  • 1
0

David, it's absolutely possible for you to pass in address so it's prefilled for new PayPal customers, or to have PayaPal not ask for it at all.

Once you have gotten that working, however, I'd like to encourage you to also add in PayPal as a "shortcut" that skips straight from a button next to your "checkout" button to PayPal for payment, using the address the customer has on file with PayPal (which we will pass back to you, unless you suppress the address in that instance of the SetEC). Ditto, add it at the top of the page where you are otherwise asking to fill out the address.

For small businesses in the US, adding PayPal in this way boosts revenue by over 25 PERCENT typically, and very often by much more. You have to remember there are 55 mm active PayPal customers in the US alone, and they are habituated not to re-enter data.

Good luck,

PayPal Joel

Joel
  • 1