Would you like to test a PayPal transaction before accepting real payments on your site? By testing the process, you can see the steps your visitors will take, while also ensuring that the payment process is functioning as it should.
In this article, we’ll show you how to set up and create test PayPal transactions for your forms.
Requirements: You will need a Pro license level or higher to access the PayPal Standard addon.
1. Setting Up a Sandbox Account on PayPal
To begin testing, you’ll need a PayPal account. If you don’t have one already, you can sign up for a PayPal account here.
Next, you’ll need to go to the PayPal Developer site and use your existing PayPal account to log in.
Once logged in, look under the Sandbox section in the left menu and click Accounts.
PayPal will have already created two test accounts for you: one for a Business account and one for a Personal account.
Note: If you would like to create more test accounts, you can check out PayPal’s instructions.
Next, you’ll need to set up a password for the Personal test account. This is so that you can log in with this account later, when you make a test payment. To do this, click on the three dots under Manage Accounts for the Personal test email. Then, click on View/Edit Account.
You’ll see the details here for the Personal test profile that was automatically created for you. Next, click Change Password and enter a password you’ll be able to remember later.
Now you can close that window, but keep the Sandbox Test Accounts page open as you’ll need to refer to those test account email addresses later.
2. Creating a Form to Test PayPal Payments
Before we continue, be sure you’ve installed and activated WPForms on your WordPress site.
After you’ve got everything set up, you’ll need to create a new form or edit an existing form.
If you are creating a new form, you’ll need to provide your form with a title and choose a template. We’re using the Billing / Order Form template here.
In this example, we’ll be adding the following fields to the form: Name, Email and Single Item.
To add a price to the item, open the form builder and click the Single Item field to open the Field Options screen. From there, you can enter a dollar value under Item Price.
Then, navigate to Payments » PayPal Standard and check the box labeled Enable PayPal Standard payments to enable PayPal’s settings.
Under PayPal Email Address, you should then enter the test Business email listed on your PayPal Sandbox page.
The last step to setting up your form is to set the Mode to Test/Sandbox. Be sure to save your form before continuing.
3. Publishing Your Form and Performing the Test
Now that you’ve set up the form, you can go back to your WordPress dashboard. You can either create a new page or edit an existing page to publish the form you just created.
Once you’re ready, click the + (plus) button in the text editor to add a new block.
Then, navigate to the Widgets section and select WPForms.
Now you’ll be asked to select a form. Go ahead and choose the form you just created from the dropdown.
This will embed your form on the page, so you can publish your page and visit it on the front end of your site.
To begin your test payment, you’ll need to fill out the form with the Personal test email listed on your PayPal Sandbox page.
After you submit the form, you will be redirected to PayPal’s site. Here, you’ll need to log in using the same Personal test email you entered in the form as well as the password you set for that profile earlier.
To avoid entering login details again in a couple of steps, you can check the Stay logged in for faster purchases option.
Note: PayPal may ask you to agree to their Electronic Communications Delivery Policy before continuing.
Once you’ve logged in, you’ll be taken to the Order Summary page. You can check that the total matches what was listed in the form, then click the Pay Now button.
Your test order has now been completed! You’ll see a page to confirm this.
As a last step, we’ll check that the order displays on your Personal test account in PayPal. To do this, return to your Sandbox Test Accounts page on PayPal’s Developer site.
Next, click on the three dots under Manage Accounts for the Personal test email. Then, click on View Notifications. This will open a listing of any recent actions taken under this account.
This list will include the receipt from your test transaction.
You can click on the title for the receipt to open more details and check that they match your test order.
Switching to Live Payments
Before you publicly publish your form, you’ll need to switch your PayPal settings to process live payments. To do this, open your form builder and select the Payments tab. Then click on PayPal Standard, select Production mode and add your normal PayPal email.
That’s it! We hope this guide helped you to test PayPal payments in WPForms.
Note: For more details on how to customize PayPal Standard settings in your form, check out our tutorial on how to set up PayPal payments in WPForms.
Next, do you want to set up manage submitted form entries on your site? Then, be sure to check out our complete guide to form entries.