Documentation, Reference Materials and Tutorials for WPForms
Would you like to test a PayPal transaction before accepting real payments on your site? Through this process, you can see the steps your visitors experience 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.
Before we get started, you’ll need to have the PayPal addon installed.
Set 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.
If you would like to create more test accounts, there are additional instructions available.
You’ll need to set up a password for the Personal test account so that you can log in with this account later for a test payment. To do this, click on the Personal test email, then click on Profile.
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.
Create a Form to Test PayPal Payments
You’ll either need to create a new form or edit an existing form with WPForms.
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 Blank 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. Enter a dollar value under Item Price.
Next, click on the Payments tab and then click on PayPal Standard to display PayPal settings.
You’ll need to enable PayPal by checking the box labeled Enable PayPal Standard payments.
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.
Publish Your Form and Perform 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.
To publish the form, click the Add Form button just above the text editor. Now you’ll be asked to select a form. Select the form you just created and click the Add Form button.
Your form is now embedded on the page, so you can publish your page and visit it on the front end.
To begin your test payment, you’ll need to fill out the form with the Personal test email listed on your PayPal Sandbox page.
When 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 checkout option.
PayPal may ask you to agree to their Electronic Communications Delivery Policy before continuing.
Now you’ll next 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 Personal test email, then on Notifications. This will open a listing of any recent actions taken under this account. This listing should 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.
Before you publicly publish your form, just remember to switch your PayPal settings so they are no longer set up for testing. 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.
We hope this guide helped you to test PayPal payments!