# Magento 2

After integrating Resolve, your Magento 2 site will:

- Offer Net Terms as a payment option on the checkout page. This payment option also surfaces a link to your buyer application.
- Process Resolve payments in your order management system.


## Integration steps

1. [Install the extension for Magento 2](#1-install-the-extension-for-magento-2)
2. [Retrieve keys](#2-retrieve-keys)
3. [Configure Net Terms as a payment method](#3-configure-resolve-as-a-payment-method)
4. [Review your order management functions](#4-review-your-order-management-functions)
5. [Test your integration](#5-test-your-integration)
6. [Go live with Resolve](#6-go-live-with-resolve)


## Before you begin

Before beginning integration, you should review the following:

- Resolve Magento 2 integration
- The transaction flow when buying with Resolve
- Your current checkout process to understand how Resolve will affect operations and customer experience


> **Note:** Install the extension in your sandbox or staging environment before pushing it live. Keep a copy of your Magento store and database to ensure you can revert to the version before the installation. You may need to re-index all the product and category tables after installation.


## Sandbox development

Develop and test the Resolve Net Terms integration in your development environment connected to our sandbox.

### Request a merchant sandbox account

To get started, reach out to your Resolve account manager to request sandbox API credentials.

### Create a sandbox customer account

Go to `https://app-sandbox.resolvepay.com/<your_merchant_id>` and submit a test customer application.

## 1. Install the extension for Magento 2

You have 2 options for installing the extension for Magento 2.

### Install using Composer

1. Retrieve your Magento authentication keys.
2. In the Magento 2 root directory, enter the following commands using the command line:



```bash
composer require resolve/magento2
composer update
php bin/magento setup:upgrade
php bin/magento setup:di:compile
```

### Install using Command Line

1. Download the extension.
2. If it does not exist, create the directory `Magento2_root/app/code/Resolve/Resolve/`.
3. Unzip and move the extension files to that directory.
4. Run `php bin/magento module:status` to verify the module is recognized.
5. Enable the module and run setup:



```bash
php bin/magento module:enable Resolve_Resolve
php bin/magento setup:upgrade
```

1. Clear the Magento 2 cache.


## 2. Retrieve keys

Your **Merchant ID** and **Secret API Key** are available in your merchant dashboard. Just go to the Settings tab then choose "Integrations" from the sub-tabs.

## 3. Configure Resolve as a payment method

After installing the extension, enable Resolve as a payment method by updating Magento 2's configurations in the admin portal. Navigate to **Stores > Configuration > Sales > Payment Methods > Resolve** and configure the following:

1. Set **Enabled** to **Yes**.
2. Keep **Mode** set to **Sandbox** (for development and testing).
3. Enter the **Merchant ID** and **Secret API Key** that you retrieved from Resolve.
4. If your checkout process automatically captures the charge, set **Payment Action** to **Authorize and Capture**.
5. Enter the dollar amount values for **Minimum Order Total** and **Maximum Order Total** that displays Resolve during checkout (defaults: 0.01 and 50000).
6. If you want to change the order of displaying Resolve as a payment option during checkout, enter a **Sort Order** value greater than 0.
7. If you want to display Resolve as text instead of a logo during checkout, set **Plain Text Appearance** to **Yes**.
8. If you want to customize the default subtext, you can add in-line HTML to **Resolve Payment Method HTML** (requires Plain Text Appearance set to No).
9. If you want to display Resolve description during checkout, set **Plain Description Text Appearance** to **Yes**.
10. If you want to customize the default description text, you can add in-line HTML to **Resolve Payment Method Description HTML** (requires Plain Description Text Appearance set to No).


### Flush cache

If your changes don't take effect immediately, flush the Magento cache. In the Magento admin panel, go to **System > Cache Management**. Click **Flush Magento Cache**. Sign out. Sign back in to reset permissions.

## 4. Review your order management functions

Processing orders (authorize, capture, cancel, refund, and partial refund) in Magento 2 updates the order status in the Resolve dashboard.

## 5. Test your integration

Test your configuration to ensure that everything is working before you go live.

1. Add an item to the cart on your test site.
2. Proceed to checkout.
3. During checkout, enter valid U.S. addresses and phone information.
4. Select Resolve as the payment option.
5. Proceed to Resolve's testing environment checkout.
6. Log in as customer.
7. Confirm your payment.
8. Wait to ensure that you have been redirected to your confirmation page.
9. Verify that the transaction appears in your platform's admin panel and on the dashboard.


> **Note:** The URL `https://app-sandbox.resolvepay.com` indicates that you are in the testing environment.


## 6. Go live with Resolve

After you verify that your configuration is working properly in the Resolve Sandbox environment, your Resolve Customer Success Manager will provide your production key.