Testing PayPal Express Sandbox in Magento

The checkout and the integrated payment methods are a crucial part of the Magento application. The inbuilt PayPal payment methods that Magento provides allow payments to be taken through PayPal, and it is vital to ensure the configuration is working correctly before using PayPal in live mode. Testing PayPal Express Sandbox in Magento can be configured using two methods: API Signature and API Certificate. This post will look at setting up API Signature credentials.

API Signature details used for sandbox mode can be found within your PayPal Developer account. Log into your Business account at https://developer.paypal.com.

Head to the Dashboard section, then under the Sandbox submenu on the left hand side, click on Accounts.

PayPal by default creates two accounts for you: a buyer and a facilitator.

Testing PayPal Express Sandbox in Magento

The facilitator’s email address will be the first detail entered within the Magento admin. Simply head to System -> Configuration -> Sales -> Payment Methods, expand the PayPal Express Checkout section and enter the email address in the
Email Associated with PayPal Merchant Account
field.

Testing PayPal Express Sandbox in Magento

The API Username, API Password and API Signature credentials can be obtained by clicking on the facilitator email address to expand further details, and then clicking Profile.

Testing PayPal Express Sandbox in Magento

An Account Details lightbox should pop up, and you’ll find the API credentials located under the API Credentials tab.

Testing PayPal Express Sandbox in Magento

Add the details into the Magento admin, and the Enable this Solution option should now be available to set to Yes.

In addition, ensure that the Sandbox Mode option is set to Yes.

Now that the sandbox PayPal configuration is complete, you can test out the payment method. You can use the Buyer email account that PayPal sets up for you to test payments when needing to log into PayPal to complete a sandbox purchase.

Click on the buyer email address in your PayPal account under Sandbox Accounts and click on the Profile link.

Another lightbox will appear. Under the Profile tab, you’ll be able to view details and change the password of the buyer account.

Testing PayPal Express Sandbox in Magento

Under the Funding tab, PayPal will also give you test Bank Account and Credit Card details if you choose to checkout as a guest when testing PayPal Express.

Testing PayPal Express sandbox in Magento allows you to check for any existing problems before using live credentials, and potentially avoid losing sales by fixing any unexpected errors.

Note: This article is based on Magento Community/Open Source version 1.9.