Testing the 2Checkout Gateway
When connecting to a payment gateway, it is always recommended to test the gateway using a sandbox or developer account to ensure that transactions are working correctly, without having to use actual money. This document will walk you through testing with a 2Checkout Sandbox account.
Setting up your 2Checkout sandbox account
Setting up your 2Checkout sandbox account
In order to properly test 2Checkout using GiveWP’s Test Mode you first need to sign up for a 2Checkout account. You should select the plan that you prefer and then you’ll be able to get the credentials for your sandbox account. This is an environment designed to mimic a live 2checkout environment, without having to use real money/credit cards.
Once you sign up for an account, you should log in into your account.
Once you log in, you need to create a new role and a new user account to manage the API.
Creating a new role and user
Navigate to the top right corner and click on the tool icon and then on User management.
The next step is to create a new role. Click on Roles > Add role and you’ll be asked to add a new name for this role and an optional description.
Then, uncheck everything and leave only the Manage API Access checked, and click to save it.
After you save it, go back to the User Management page and click on Users > Add User. give it a name, email, first name, last name, password, and add the role you just created to it. Then, click to save it.
Getting API Keys
To get the API Keys and other information you’ll need, navigate to Integrations > Webhooks > API.
Now, navigate to your site’s dashboard, click on Donations > Settings > Payment Gateways > 2Checkout Settings and add the information there:
The account number you see on GiveWP is the Merchant Code you get from 2Checkout. And the API username and API User Password are the credentials you created above.
Once that is set up, you are ready to make test donations. Ensure GiveWP is in Test Mode and using the 2Checkout test data, you can process donations without using real money, ensuring that the gateway is properly connected.