Documentation
Print page

Testing with the PayPal sandbox gateway

There are two options to test your online payment set-up. The easiest option is to make a booking on the live system and directly reverse it. This will come at a small cost, as PayPal charges you a fee for the refund ($0,30/€0,35). If you want to avoid this charge or do more extensive testing, you can use the gateway in test mode in combination with a PayPal developer account.

  1. Presuming you have not used the PayPal sandbox before, log in to developer.paypal.com, using your normal PayPal credentials
  2. Go to Dashboard > Sandbox > Accounts. Here you will see that a Business test account has already been created for you. This account uses a (fake) email address that is modeled after your real email address, but with -facilitator appended to your username. For example, user@example.com would have become user-facilitator@example.com. Click this email address in the overview and click on the Profile link that appears below the email address. In the pop-up window that opens, select Change password, provide a password for this account and save it
  3. Next, create at least one Personal test account, which can be used to make test payments

    Sandbox accounts
  4. While remaining logged in to developer.paypal.com, log in as administrator to your SuperSaaS account in another browser window/tab

  5. Go to Payment Setup and add the “magic word”$gateway {paypal user-facilitator@example.com} (replace user-facilitator@example.com with your own facilitator-style email address) somewhere in the text area labeled Message to show at the top of the shop page

    Setting up test mode
  6. At the bottom of the page, check Test mode. Switch to the PayPal sandbox gateway…
  7. Press Save changes
  8. Log out as administrator and log in as a user
  9. Make a booking that requires a payment. When you come to the PayPal site, log in using the credentials of one of the Personal test accounts that you created in step 3
  10. You can now complete the payment process as if you were a real user. Upon completion, you’ll be taken back to your SuperSaaS schedule
  11. Log out as user and log back in as administrator. When you now review the status of the test booking, you’ll see a + to indicate that payment was received
  12. To inspect test payments you received in your facilitator account and/or test refunds, go to Applications > Sandbox accounts and select the Enter Sandbox site link, situated above the overview of your test accounts
  13. Log in using the credentials of your facilitator account as created in step 1
  14. On the overview tab, under My recent activity, you’ll see the payment listed that you received following the test booking. Please refer to Testing on the live system for more information on how to make a refund

    PayPal account overview

Once you’re done testing, make sure you delete the “magic word” you added in step 5 (or replace it with your proper PayPal credentials, if necessary) and switch off test mode by unchecking Test mode. Switch to the PayPal sandbox gateway… on the Payment Setup page.