[GUIDE] Testing PayPal (Standard Add-On) in Sandbox/Test Mode

I highly recommend someone with Gravity Forms improve upon these instructions because I just spent far too much time trying to figure out what I needed to do to fully test the PayPal Standard Add-On. After I figured this out, I later found that some of this is located in the Docs for the Payments Pro Add-On. I didn’t think to look there because I am not using that.

For most users, I was fine just following the basic guide on getting the Add-On installed, setting the IPN (Instant Payment Notification) URL and enabling it in my PayPal account. Then, I have been testing some webhooks with the Webhooks Add-On. Specifically, I needed things to happen when the IPN pings my site back. I couldn’t figure out why I wasn’t getting this in Test Mode.

It’s not incredibly obvious, but Test Mode with PayPal operates on completely separate Sandbox accounts. So on your Form -> Settings -> PayPal Feed Settings, you need to change the PayPal Email Address to a Business Sandbox Account that you’ve created with your actual PayPal Business Account. I believe you go here. While you’re there, you need to document the passwords for a Business Account and a Personal Account. Set the Mode on the Feed to Test.

They don’t make it easy to manage your actual account and the Personal and Business Sandbox account simultaneously. Incognito windows are your friend.

Next, log into the Sandbox Business Account on PayPal Sandbox, which is sandbox.paypal.com. Go to Settings -> Notifications, and turn on IPN, and set the URL to https://yoursite.com/?page=gf_paypal_ipn.

You should be set to test your form in Sandbox mode, but you need to use the Sandbox Personal Account you have set up in your Sandbox Accounts. You can complete the entire payment process and return to your site. With this, all payments on the form should mark as Paid and not Pending showing all Transaction IDs.

I didn’t find it until later, but there is a Feed setting “Post Payment Actions” to “Send webhook only when payment is received” if you are using the Webhooks Add-On. This will prevent Webhooks from triggering before a customer completes a PayPal Payment.

When you are done, do NOT forget to switch your Feed back to your actual PayPal account and switch your Mode to Production.

Gravity Forms Devs should consider changing Mode labels in Feed Settings to Live and Sandbox as those are the terms PayPal uses, and also provide better instructions based on what I’ve posted here. It’s not very intuitive.

Also, Devs should make Feeds able to be Duplicated so it is easier to have one for Production and one for Test without having to manually setup the field mapping and settings for each every time. Obviously, one would be enabled and one would be disabled. Alternatively, have separate fields for PayPal Email Address for Production and Test on every PayPal Feed. The correct one would get used depending on the Mode.

I am not sure how different PayPay Payments Pro is in terms of the process but I am guessing the idea of setting up Sandbox Accounts for complete User->Business testing is the same. This is not similar to Stripe where there’s just Test Mode on your actual account, which makes things super easy.

I hope this helps someone. I just entered a post for Feature Requests.

1 Like

Thank you for sharing your experience. I’m certain those instructions will help someone in the future.

© 2008 - 2019. Gravity Forms is a project by Rocketgenius Inc.