Skip to content

PayPal Payments Testing Guide

1. Basic concepts

PayPal provides two types of accounts: personal and business (see Account Types @ paypal.com). For all practical purposes we may understand personal accounts as individual accounts used to make payments, and business accounts as merchant accounts used to receive payments. IxDF has two business PayPal accounts:

  1. IxDF USA
  2. IxDF DK

PayPal accounts, either personal or business, come into two flavors: live accounts and sandbox accounts. When we sign up to PayPal a live account is automatically created. Live accounts are used to make real payments, using real money, and they receive real payments. Sandbox accounts are used to make test payments, using virtual money, and they receive test payments.

All non-production sites are configured to use sandbox accounts. That means they accept test payments only, from sandbox personal accounts, and the payments go to IxDF USA or IxDF DK sandbox business accounts, linked to their live counterparts. The sandbox business account a payment goes to depends on which payment gateway processed the payment, which in turn depends on the settings at the Payment Gateway Control Panel (/admin/payment-gateways/settings).

Notice: For more in-depth documentation about testing and the PayPal sandbox, check the PayPal Sandbox Testing Guide.

2. How to make test payments

All non-production sites accept test payments only (see section 1. Basic concepts). In order to do that you need to enter the credentials of any sandbox personal account and then select one of the payment methods offered by that account to make the payment. Each sandbox personal account provides the following payment methods:

  • a PayPal balance
  • a credit card
  • a bank account

We already created a number of pre-defined sandbox personal accounts that cover the most common use cases. You can find the full list at the PayPal Accounts section of the Testing Control Panel.

If you need to test a custom case you can create a new sandbox personal account for that -- see section 3. Managing sandbox accounts. Remember to remove your temporal sandbox personal accounts if you or other team members are not going to use them in the future.

3. Managing sandbox accounts

A sandbox account, whether personal or business, works like a live account. That is, you can log in a sandbox account, see all transactions (payments) made, the available payment methods, its profile, and so on. You can also change the account settings, add or remove payment methods and even change its profile, like you would do to a live account. The difference is that all info you deal with is "fake", that is, fake credit cards, fake bank accounts, fake profile, etc. In order to manage a sandbox account visit the page https://www.sandbox.paypal.com/ and then log in using the sandbox account credentials.

If you need to test a custom case you can create a new sandbox personal account for that:

  1. Go to https://developer.paypal.com/developer/accounts/
  2. Click on Log into Dashboard
  3. Enter the shared development PayPal account credentials (you can find the credentials on LastPass)
  4. Click on Create Account
  5. Enter the account details
  6. Click on Create Account

*Notice: For more in-depth documentation about creating sandbox accounts, check the Create a sandbox account guide on PayPal.

4. Checking test payments results

Once a test payment have been made, the “virtual” money goes to the PayPal business sandbox account linked to IxDF USA or IxDF DK (see section 1. Basic concepts). In order to check whether the funds arrived, and so whether the payment worked and the correct payment gateway was used, just log in the corresponding sandbox business account (see section 3. Managing sandbox accounts). You should see the payment under the "Recent activity" section right on the welcome (summary) page. Click on View all to view all transactions.

These are the credentials of the IxDF sandbox business accounts:

IxDF DK

IxDF USA

⚠️ Please do not change any of the business accounts.

5. Testing payouts

We use PayPal to pay Educational Partner commissions. It is possible to test partner payments using PayPal sandbox accounts as well. Follow these steps:

  1. Go to the Educational Partner Control Panel (/admin/educational-partner)
  2. Scroll to the Referral Commission section
  3. Find a partner that has an outstanding commission larger than 100USD and click View
  4. Click Go to the member admin page of partner
  5. Impersonate the partner (notice that you can’t use a direct login link because you are going to change its Education Partner details)
  6. Click on Educational Partner (from partner’s profile page)
  7. Scroll to the You’ve earned XXXX USD in referral commission section
  8. Click set up your PayPal account or change account
  9. Enter the email address of any sandbox personal account
  10. Click Link account or Save changes
  11. Repeat steps 1 to 3
  12. Scroll to the bottom and click Pay outstanding commission to partner
  13. Select which PayPal gateway, that is, which IxDF sandbox business account will pay the commission and click Make payment
  14. Go to /admin/console-commands/referral-programs-update-pending-payouts/run and click Run this command
  15. Go to the partner’s admin page
  16. Scroll to the Payment transaction section
  17. If the payment was success you will see the corresponding credit note under the Invoices and credit note section, if the payment failed you will see the corresponding failed transaction under the Unsuccessful/Uncompleted transactions section (open the failed transaction to see the failure reason)

Notice that the sandbox business account that will pay the commission must have enough funds. If it does not the payment will fail with a suitable error message. In this case you can log in any sandbox personal account (see section 3. Managing sandbox accounts) and send funds to that sandbox business account.

Another option is to join the site you are testing as a Team with a large number of seats (visit /company/join). After making the payment the corresponding sandbox business account will receive the funds and then you can proceed with the education partner commission payment testing.