Installation
Get your API key
- Go to two.inc and sign up with your company.
- You will receive an email with your API test keys. And as soon as you are ready, your production keys as well.
- Once you change out your test keys with your production keys, you are ready to offer your B2B customers the Two solution.
From Composer
Installation using Composer
Composer is a dependency manager for PHP. Composer declare the libraries your project depends on and it will manage (install/update) them for you.
Check if your server has composer installed by running the following command:
composer –v
If your server doesn’t have composer installed, you can easily install it by using this manual: https://getcomposer.org/doc/00-intro.md
Step-by-step to install the Magento® 2 extension through Composer:
Connect to your server running Magento® 2 using SSH or other method (make sure you have access to the command line). Locate your Magento® 2 project root. Install the Magento® 2 extension through composer and wait till it's completed:
composer require two-inc/magento2
Once completed run the Magento® module enable command:
php bin/magento module:enable Two_Gateway
After that run the Magento® upgrade and clean the caches:
php bin/magento setup:upgrade php bin/magento cache:flush
If Magento® is running in production mode you also need to redeploy the static content:
php bin/magento setup:static-content:deploy
After the installation: Go to your Magento® admin portal and open ‘Stores’ > ‘Configuration’ > TWO and check that the Two option has appeared in your Magento backend.
Configuration
The configutation of the Two Checkout plugin is split into 3 areas.
- General : Setting your checkout environment and API credentials
- Payment : Controls if the plugin is enabled on your checkout as well as optional UI fields
- Search : Enabling the Two address autocomplete
General Config Settings
Payment Config Settings
Search Config Settings
Complete & Apply Changes
In the Admin interface, navigate toSystem > Tools > Cache Management > Flush Cache
.Alternatively, run the following in the command line: php bin/magento cache:flush
Your Two payment gateway is now ready to use!
Disabling
If for any reason you'd like to temporarily disable the Two Magento plugin, please follow one of the below methods.
Disable via Command Line
Run the commands below:
php bin/magento module:disable Two_Gateway php bin/magento setup:upgrade php bin/magento setup:static-content:deploy php bin/magento cache:flush
Disable via Composer
Navigate toStore → Configuration → Two → Payment
and set Enable Two payments
to No. This will disable Two as a checkout option.Uninstallation
Please follow one of the below methods to uninstall the Two Magento plugin.
Uninstall via Command Line
Run the commands below:
php bin/magento module:uninstall Two_Gateway php bin/magento setup:upgrade php bin/magento setup:static-content:deploy php bin/magento cache:flush
Uninstall via Composer
Run the commands below:
php bin/magento module:disable Two_Gateway composer remove -r two-inc/magento2 php bin/magento setup:upgrade php bin/magento setup:static-content:deploy php bin/magento cache:flush
Magento Refunds
In order to refund an order, you must navigate to your Magento orders from Admin > Sales > Orders.
Select an order that has a status of 'Processing' in order to issue a refund. In this example we are selecting the top most order to edit.
Clicking 'View' in the order actions to edit the order, you can then navigate to the invoices tab with the associated order. In order to issue a refund, you first need to click 'View' in the invoice actions. After doing so, you can the click 'Credit Memo' to start the refund process.
The 'New Memo' page shows you the line items that make up the order and lets you set the quantities to refund. After setting the quantities for the items you wish to refund, click 'Refund' at the bottom of the page to issue the refund, which will then send the buyer a credit note.