Creating and Testing your Form in the PayPal Sandbox
The PayPal Sandbox has been set up to work exactly like the live PayPal site, except no real currency changes hands. You can make and receieve donations, view transaction history, refund donations, create and cancel subscriptions etc. This allows you to get comfortable with PayPal and make sure your form works as expected before you place it on your public website!
Here's the step-by-step process for creating your first form and testing it in the sandbox.
One-time Test Account Setup
You should already have a live PayPal account before proceeding.
At the end of this step, you will have two fake PayPal accounts to test with: A Merchant which represents your organization; and a Buyer which represents a donor.
When you test, you will login as the Buyer to donate, and as the Merchant to see all of your test donations.
- Go to https://developer.paypal.com/ and register for a developer account (button at the top, right corner).
- Use the the primary e-mail address and password from your organization's PayPal account.
- Check the box to Stay Logged In.
- Whenever you login to this site, you will use this PayPal account.
- Navigate to Applications > Sandbox Accounts. You will see that PayPal has created a test Business account for you.
- Copy this merchant account name and save it to your Cloud Services PayPal Settings page in the SandBox column.
- To set this account's password: click on the name of this account, then click the Profile link. On the Profile tab, enter a new password and save it. Note the e-mail address and password somewhere handy because you will use them to login as the Merchant.
- To get the API Username, Password and Signature for your Cloud Services PayPal Settings: click on the API Credentials tab (next to the Profile tab). These settings are used to run the Transaction Details report and to download donations into Silent Partner desktop.
- Click Create Account to create the test Donor account.
- Create a Personal (buyer) account, fund the bank account with money, and choose a credit card type.
- Make a note of the password because you will need it to make donations and login to see what your donors see.
Step #1 - Set the options for your Form
- Form Types: You can create 4 types of forms.
- Donation - The wording on PayPal's site is geared towards a donation instead of a payment for merchandise.
- Monthly Donation - The amount the donor selects will be withdrawn each month, on the current day of the month, until you or the donor cancels the subscription.
Add to Cart - Allows a donor to split their donation across projects and make one payment at the end. The wording on PayPal's site is very purchase/merchandise oriented though, so try this out in the Sandbox to see whether it is sufficient for your needs.
- When the donor clicks this button, their PayPal shopping cart will be displayed, and will contain the item they just added.
- The donor will then be able to click a link to "Continue Shopping" which brings them back to the page they were just on; or they can pay right away.
- You can add one or more Add to Cart buttons on a web page, OR you can allow the donor to repeatedly enter an amount, select a project and click the same Add to Cart button. Either way, PayPal will keep track of what your donor has added.
- You can use the Donate image with the Add to Cart form to make the experience a little less purchase-oriented.
View Cart - This button makes it easy for your donor to jump directly to their cart when they are finished browsing your site and are ready to check out.
- You just need one of these per page, but you can put it on as many web site pages as you wish.
- If you do not enter the address of a custom button, PayPal's View Cart or Afficher le panier buttons will be used according to the PayPal Site Language you have chosen.
- Form Instructions: Use this textbox to display a message to your donor before they get to PayPal's site. For example: Silent Partner monthly donation and cart buttons will prompt for a shipping address instead of a mailing address. If this causes confusion for your donors, you can provide an explanation.
- PayPal Site Language: This will set PayPal's first checkout page to the language you select so it is easier for your donor to figure out how to make their donation.
- Button Image: You can choose any one of the 6 PayPal images for any Form Type, OR you can enter the web address of your own image.
- Merchant Accounts: Your Live and Sandbox merchant accounts will be pre-populated if you have saved them to your Cloud Profile. You can do this on the Configure PayPal page. Your form will be built using the sandbox merchant account for the sandbox environment, and your "real" merchant account for your live form.
- Donation Amount: There are 3 ways you can capture the donation amount.
- Specify Amount: The amount you enter is hard-coded into the form and the donor cannot change it.
- Suggested Amount: The donor is presented with the default amount you have entered but can change it.
Donor choose a Giving Level: You provide up to 5 giving levels and the donor selects one.
- The third level will be selected by default.
- Simply erase the boxes of the levels you do not wish to use. ie. If you only want three levels and the middle should be the default, erase the values in the first and last level.
- You can be creative and communicate the impact of the donation when you name your levels. For example: buy 4 cows at $500 instead of Level 1.
- G/L Account: If you allow the donor to select a G/L, your form will show a drop-down list containing all of your web-enabled accounts. To add, remove or change the description of these accounts: make your changes in Silent Partner Desktop and run a backup to Silent Partner to refresh your Cloud database.
- Motivation Code: If you allow the donor to select a Motivation Code, your form will show a drop-down list containing all of your web-enabled motivation codes. To add, remove or change the description of these codes: make your changes in Silent Partner Desktop and run a backup to Silent Partner to refresh your Cloud database.
- Motivation Code Prompt: The Motivation code applies to the entire transaction, not to specific projects if a donation is split across more than one project or GL account. Therefore, the motivation code indicates the primary reason your donor arrived at your donation page today.
- Donor can send Instructions & Donor's Instructions Prompt: You can allow donors to send you a note with their donation during "check out" on PayPal's site. If you allow notes, you can change the default prompt that says: "Add special instructions to recipient".
- Where will this form send donors? This option defaults to the Sandbox so you can test with with fake credit cards and fake donors. Switch it to Live before placing your form on your live web site.
- Thank You Page Address: Once your donor has completed their donation you can send them back to a page on your web site. The page, at a minimum, can say: "Thank you for your donation" but there are many creative ways you can further engage this donor.
- Open Cart in: For Add to Cart and View Cart forms, indicates how the donor's cart will open. In the same browser window or a new browser window.
- Continue Shopping: PayPal can usually figure out where to send the donor when the "Continue Shopping" button is clicked. But this may not work well on more complicated websites, so you can indicate where the donor should be sent.
Form Code & Sharing Hyperlink Code:
- Form code is pasted onto a web page. It can contain drop-down lists and textboxes for the user to fill out before clicking the Donate button.
- You cannot paste a Form into an e-mail or onto some social websites like Facebook - but the link code may work. Do a Google search for instructions on pasting a link into your favorite social media site.
- Note: You cannot generate Link Code if you want the donor to be able to choose an amount, project or motivation code with option circles or drop-down boxes. Hyperlinks do not support user choices.
- Sharing Hyperlink Text: This is the linked text of the hyperlink.
Step #2 - Create and Test (optional)
- You can always test the button you created in the PayPal Sandbox so you understand what your donor experiences when they make a donation and go through the checkout process on PayPal's web site.
- Click Generate the Code
- Click Test the Form, to popup your form or Test the Link to popup your hyperlink.
- If a window does not pop-up, you can copy the code from the code box at the bottom of the page, and paste it into a webpage on your website
- Fill in the form and click the button.
- You will be brought to PayPal's sandbox.
- If you are not already logged into the Sandbox with your Live Merchant Account, you will be prompted to login to the test site before continuing on with the donation.
- Login as the test Donor and complete the donation.
- You may need to repeat this process to tweak your form: set options, create, test again.
- Note: When you are testing Shopping Cart features in the popup window, the Continue Shopping button will not work. This is because the popup window is not a "real" web page. Simply copy your Cart and View Cart buttons to a web page on our site to test this part.
Once you are satisfied with your form, change the Environment to Live, Create, Test on the live PayPal site and then copy the code from the box to your Public-Facing website.
Other tips
- You can login to the PayPal Sandbox with the e-mail address and password of your Test Donor account or your Test Business account to see what transactions have taken place: https://www.sandbox.paypal.com
- If you ever need a fake credit card number to test with in the sandbox, this website will generate them for you: https://www.ccaples.com/index.php/misc/tools-and-stuff/cc-num-gen
- Use any future expiration date
- Use 123 for the CVV