Last updated August 21, 2013. Created by TR on October 16, 2011.
Edited by 3lackRos3, Michael-Inet. Log in to edit this page.

Edit: 2013-08-16
In general this page works for D7 / UC3. Follow what's here and translate from D6 to D7 and you should be good. Additional instructions on IPN are found in comment [Drupal 7.23, Ubercart 7.x-3.5].

INTRO - How this works behind the scenes

PayPal Website Payments Standard (WPS) works as follows:

  1. Customer fills in name, email, billing and shipping info on the checkout form.
  2. Customer selects to pay with Credit Card (WPS) on the checkout form.
  3. Customer clicks "Review Order" and then "Submit Order."
  4. UC automatically "packages up" the customer's order (either as an itemized list or as a sum total depending on your WPS settings), along with the name, email, and shipping / billing addresses and redirects the customer along with that information to a secure payment form at PayPal.
  5. Customer fills in credit card info on the PayPal site. The form already contains all of the information passed to it by UC so the customer only needs to enter the CC details in the PayPal form.

    * The customer may choose to create a PayPal account at checkout time depending on how you configured "Website Payment Preferences" in your PayPal account (see configuration steps below).

  6. Customer is either approved or denied by PayPal.
  7. Customer is manually or automatically redirected back to UC site.
  8. A user account is created automatically and the order tables updated appropriately when Ubercart receives the IPN from PayPal.

CONFIGURATION - How to make it work

PayPal Account Settings:

  1. Signup for a PayPal account.

    Before you can use WPS you need to sign up for a PayPal account.

  2. Open a business account (optional).

    Although this step is optional, it is recommended for you to keep your personal and business PayPal accounts separate. Opening a business account is preferable because it allows you to use a business name on the PayPal checkout pages and in theory allows you to keep your private name separate. Presenting a business name to customers will help build customer confidence.

  3. Go through the approval process to verify your account. This will require a bank account and correct contact information,
    possibly more. You can always contact their customer service if you get stumped here.
  4. Configure PayPal account settings.

    Login to your PayPal account and go to the profile page/tab. There are many options here but only a few are required to
    get WPS working with UC.

    Setting up WPS:

    • Click on "Website Payment Preferences" under the
      "Selling Preferences" section.
    • Enable "Auto Return".
    • Set the "Return URL" to http://www.example.com/cart/checkout/complete
    • Enable "Paypal Account Optional" (optional). This will make it so customers are not forced to create a PayPal account during
      checkout.
    • Save your settings.

    Setting up IPN:

    • Click on "Instant Payment Notification Preferences" under the "Selling Preferences" section.
    • Make sure that "Instant Payment Notification (IPN)" is checked.
    • Make sure that the IPN URL is set to http://example.com/uc_paypal/ipn. Where of course, instead of "example.com" you should use the actual domain name of your site.

* Note: When you login to PayPal, you may get taken to a "Getting Started Steps" page. Steps 1 and 2 are required and involve
opening your business account and getting verified. However, step 3 is not required. You do not have to create any buttons or links as UC handles redirecting users to PayPal automatically.

Ubercart PayPal Settings

  1. Enable uc_payment and uc_paypal modules at "admin/build/modules".
  2. Configure PayPal WPS settings at admin/store/settings/payment/edit/methods:
    • Click the "Enable" checkbox for WPS.
    • Expand the "PayPal Website Payments Standard settings" fieldset and make the following changes:
      1. Enter your PayPal account e-mail address in the appropriate field.
      2. Set the "PayPal server" to "Live" (versus Sandbox) when you're ready to process orders.
      3. The other fields are self-explanatory and based upon your requirements. Be sure to set them per your needs.
  3. Configure your Checkout Settings at admin/store/settings/checkout. You probably want to make sure you've enabled the following two options:
    • New customers receive an e-mail with their account details.
    • Anonymous checkout.
  4. Enable Automatic order update in WorkFlow-NG module by going to "admin/build/workflow-ng":
    • Click "Edit" for the Update order status on full payment
    • Tick "Active" checkbox.
    • Click "Submit"
  5. For using Report module first you have to enable Statistics module by going to "admin/build/modules":
    • Now enable Report feature by going to "admin/store/settings/reports"
    • Choose "Payment Received" under "Report Statuses"

FINISHED

That's it! Everything should be working now.

TIP: PayPal automatically checks your billing and shipping addresses to see if they are valid when you submit the order from UC. It must use a national address database to do this. This is a great feature for security reasons. You can test it yourself and see how it works.

However, you need to remember that if you are testing your site and entering bogus address info, PayPal will not bring you to checkout page but instead spit out an error similar to following:

"Unable to process payment. Please contact the merchant as the shipping address provided by the merchant is invalid, and the merchant has requested that your order must be shipped to that address."

So, test with valid addresses. You CAN enter in bogus name, email and phone number for testing purposes but you MUST enter in a valid postal address or you never get to see how this works in real life!

Testing in the PayPal Sandbox (optional)

In order to test WPS without actually submitting real CC data, you can create a PayPal Sandbox account. This requires that you go to an entirely separate PayPal site and create a new and separate account from your main PayPal business or WPS account. Here's the site: http://developer.paypal.com

This process isn't for the faint of heart, but you may find some help in this thread on PayPal's site.

When testing in the sandbox, make sure you've configured WPS in your UC settings form to process payments in the Sandbox.

Troubleshooting

If you have problems getting PayPal WPS to work properly, here are some things you should check:

  • Is your site in "offline" mode? If so, PayPal will not be able to send you an IPN to confirm the order, so orders will always stay in a "Payment pending" state.
  • Do you have HTTP authentication enabled on your site? You'll have the same problem as above.

Looking for support? Visit the Drupal.org forums, or join #drupal-support in IRC.

Comments

The set up of IPN section of this doc is incorrect. Ubercart handles the IPN internally and IPN should be disabled in the Paypal Settings.

Setting up IPN:

Click on "Instant Payment Notification Preferences" under the "Selling Preferences" section.
Make sure that "Instant Payment Notification (IPN)" is checked.
Make sure that the IPN URL is set to http://example.com/uc_paypal/ipn. Where of course, instead of "example.com" you should use the actual domain name of your site.

That should read:
Ensure that IPN is NOT ENABLED in the website settings of the paypal set up.

Comment 4 does not apply to D7 as WorkFlow-NG is out of date. Automatic order update will happen with Ubercart 7.x-3.1 without this module.

4. Enable Automatic order update in WorkFlow-NG module by going to "admin/build/workflow-ng":

Click "Edit" for the Update order status on full payment
Tick "Active" checkbox.
Click "Submit"

I'm currently having a problem with a PayPal setup, and I'm trying to rule out configuration issues on my end before I submit something to the issue queue. The documentation available for this sub-module is frustrating. Where information exists about how to set up PayPal WPS and IPN, it is often contradicted in other places. Part of the problem is that the behavior of this module has changed over time - there are posts that say that Ubercart requests an IPN at the time the order is submitted, so it is no longer necessary to enable it in your settings at PayPal. Also, in the case of Drupal 6 & 7, workflow-ng is not available.

I want to commend TR for posting this How-To as it's the most up-to-date and complete explanation available as of today (6.3.2012).

So I'd be grateful if the page can be edited to clarify a few things:
- Should the IPN be set to On or Off?
-- if ON, what URL should be entered into PayPal's settings? The URL indicated above (http://example.com/uc_paypal/ipn) seems incomplete. When trying to send an IPN, I believe PayPal is sending it to http://example.com/uc_paypal/ipn/[order-number]
- With regards to the Return URL, can it be set to a custom page? UC allows for this, but will the PayPal module break if the Return URL is not 'cart/checkout/complete'?
- Workflow-NG is supported for Drupal 5, but not Drupal 6 or 7.

Thanks,
-dave.

I am working to set this up as well. Could someone please tell me the most up to date process? I am using Drupal 7 Ubercart 3. Do we need IPN to be on or off?

Thanks,
PJ

This works for: Drupal 7.23, Ubercart 7.x-3.5

  • IPN

"Login: PayPal.com" » "My Account" » "Profile" » "My selling tools" » "Instant payment notifications" » "Edit settings"

Notification URL: http://{yoursite}/uc_paypal/ipn
IPN messages: Receive IPN messages (Enabled)

  • Enable PayPal WPS on your site

Home » Administration » Store » Configuration » Payment methods
/admin/store/settings/payment

Enable "PayPal Website Payments Standard"

  • Configure PayPal on your site

Home » Administration » Store » Configuration » Payment methods » PayPal Website Payments Standard settings
/admin/store/settings/payment/method/paypal_wps

"PayPal e-mail address" should be set to the Primary Email address for PayPal

  • PayPal Primary Email address

Update that at: "Login: PayPal.com" » "My Account" » "Profile" » "Email" » "Update"

# # #

Depending on what / how you are selling, there are probably other combinations that will work as well, but this works for us.

Best,
Michael

Thanks for the guidance
Kindly guide me what i have more than one business how do i go about here because it can only take one website

IPN
"Login: PayPal.com" » "My Account" » "Profile" » "My selling tools" » "Instant payment notifications" » "Edit settings"

Notification URL: http://{yoursite}/uc_paypal/ipn
IPN messages: Receive IPN messages (Enabled)

I have more than one site please guide at the url what i can put

hi,
where can i find ipn url(http://example.com/uc_paypal/ipn).
i am use drupal-6 and uc_cart module for recurring product. i check in sandbox the order will been complated in paypal but in order list shows paypal pending.

Can someone please confirm if the IPN should or should not be activated in PayPal settings or not, I have seen conflicting views in many places, and even in this thread there seems some conflict.
My client is getting all their orders "abandoned" when the customer does not mean to.
They make payment and are re-directed, but the order status is set to "abandoned".

I have read that this is due to a conflict between Ubercart requesting IPN and PayPal pushing IPN. The article I found said it should be disabled at the PayPal end as Ubercart takes care of it.
A definitive answer would be much appreciated.