# Magento Plugin

The Magento Sola plugin will allow you to charge credit cards via the Sola gateway. Sola enables credit card payments for both customers on the storefront and for merchants in the Admin portal. The plugin supports Authorize Only, Capture, Void, Cancel, and Refund transactions. As a merchant, your web servers remain out of scope of the transaction, keeping card data secure and simplifying PCI compliance.

## Installation

#### **Install the plugin**

Install the plugin from <https://marketplace.magento.com/cardknox-cardknox.html> .

#### Install the Sola Plugin

To install the Sola plugin:

1. Unzip the folder to app/code/CardknoxDevelopment/Cardknox (create the directories if needed)
2. Run the below commands in the Magento root directory (bash).

{% hint style="info" %}
If you are using versions 2.0 – 2.1, contact cardknox for a compatible version. For 2.1.0 - 2.1.3, comment out lines 278 – 282 in Cardknox/etc/di.xml. On higher versions, no changes are needed.
{% endhint %}

**Enable the module**

```
php bin/magento module:enable CardknoxDevelopment_Cardknox --clear-static-content
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy
```

**Optionally flush the cache**

```
php bin/magento cache:clean
php bin/magento cache:flush
```

## Setup

Navigate to Stores > Configuration > Payment Methods > Sola which will bring you to the configuration page (see below).

## Configuration Options

| **Item**                             | **Description**                                                                                                                                                                      |
| ------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Enabled                              | This enables the Sola / Cardknox Module. Set to ‘Yes’ to enable Sola payments.                                                                                                       |
| Title                                | Name of payment method. This will appear to users when selecting a payment method. We recommend selecting ‘Credit Card.’                                                             |
| Vault Enabled                        | This enables the customer to save cards for later use on the site.                                                                                                                   |
| Vault Title                          | Name of vault payment method. This will appear to users when selecting a card on file. We recommend selecting ‘Stored Cards.’                                                        |
| Sola Transaction Key                 | Your Sola API transaction Key.                                                                                                                                                       |
| Sola Token Key                       | Your Sola token key (iFields key).                                                                                                                                                   |
| Debug                                | Logs transaction data for troubleshooting purposes.                                                                                                                                  |
| Payment Action                       | Sets the transaction payment mode. If ‘Authorize’ is selected, all transactions will need to be captured when invoicing an order.                                                    |
| Enable Split Capture For Credit Card | When Payment action is set to Authorize, this will allow you to [split capture](https://docs.cardknox.com/cardknox-products/split-capture) when capturing (invoicing) a transaction. |
| Payment from Applicable Countries    | Select ‘Specific Countries’ to only allow payment from the ‘Payment From Specific Countries’ whitelist.                                                                              |
| Payment from Specific Countries      | Select countries you wish to whitelist.                                                                                                                                              |
| Sola Gateway Endpoint                | Sola URL to which transactions are routed (this setting should not be modified unless advised to do so by Sola Support).                                                             |
| Google reCAPTCHA V2 Enable           | This enables Google reCAPTCHA V2                                                                                                                                                     |
| Google API Key V2                    | Your Google reCaptcha Site Key V2                                                                                                                                                    |
| Google API Secret Key V2             | Your Google reCaptcha Secret key V2                                                                                                                                                  |
| Sort Order                           | Priority of Sola in list of payment methods.                                                                                                                                         |

{% hint style="info" %}
If you do not have a key, you can obtain it by signing into your account in the Sola portal and navigating to Key Management.
{% endhint %}

## Sola Google Pay <a href="#cardknox-google-pay" id="cardknox-google-pay"></a>

| **Item** | **Description** |
| -------- | --------------- |

| **Item**                           | **Description**                                                                                                                                                                                                                            |
| ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Enabled                            | <p>This enables Sola Google Pay . Set to ‘Yes’ to enable Google Pay. Please ensure that your Sola account is configured for Google Pay.<br>Please contact <a href="mailto:gatewaysupport@solapayments.com">Sola support</a> to confirm</p> |
| Title                              | Name of payment method. This will appear to users when selecting a payment method. We recommend selecting ‘Google Pay’                                                                                                                     |
| Merchant Name                      | Enter the merchant name (DBA)                                                                                                                                                                                                              |
| Environment                        | Sets the Google Pay environment. This must match the environment set on the Sola account. Please contact [Sola support](mailto:gatewaysupport@solapayments.com) to confirm                                                                 |
| GooglePay Payment Action           | Sets the transaction payment mode. If ‘Authorize’ is selected, all transactions will need to be captured when invoicing an order.                                                                                                          |
| Enable Split Capture For GooglePay | When Payment action is set to Authorize, this will allow you to [split capture](https://docs.cardknox.com/cardknox-products/split-capture) when capturing (invoicing) a transaction.                                                       |
| Button Style                       | This sets the Google Pay button style                                                                                                                                                                                                      |
| Payment from Applicable Countries  | Select ‘Specific Countries’ to only allow payment from the ‘Payment From Specific Countries’ whitelist.                                                                                                                                    |
| Payment from Specific Countries    | Select countries you wish to whitelist.                                                                                                                                                                                                    |
| Sort Order                         | Priority of Google Pay in list of payment methods.                                                                                                                                                                                         |

## Sola Apple Pay

{% hint style="info" %}
Please complete the Apple Pay Domain Registration [here ](https://portal.solapayments.com/account-settings/payment-methods)prior to enabling Cardknox Apple Pay
{% endhint %}

| **Item** | **Description** |
| -------- | --------------- |

| **Item**                          | **Description**                                                                                                                                                                                                                        |
| --------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Enabled                           | <p>This enables Sola Apple Pay. Set to ‘Yes’ to enable Apple Pay. Please ensure that your Sola account is configured for Apple Pay.<br>Please contact <a href="mailto:gatewaysupport@solapayments.com">Sola support</a> to confirm</p> |
| Title                             | Name of payment method. This will appear to users when selecting a payment method. We recommend selecting ‘Apple Pay’                                                                                                                  |
| Merchant Identifier               | The default value is merchant.cardknox.com                                                                                                                                                                                             |
| Environment                       | Sets the Apple Pay environment.                                                                                                                                                                                                        |
| Apple Pay Button Style            | This sets the Apple Pay button style                                                                                                                                                                                                   |
| Apple Pay Button Style            | This sets the Apple Pay button style                                                                                                                                                                                                   |
| Payment Action                    | Sets the transaction payment mode. If ‘Authorize’ is selected, all transactions will need to be captured when invoicing an order.                                                                                                      |
| Payment from Applicable Countries | Select ‘Specific Countries’ to only allow payment from the ‘Payment From Specific Countries’ whitelist.                                                                                                                                |
| Payment from Specific Countries   | Select countries you wish to whitelist.                                                                                                                                                                                                |
| Sort Order                        | Priority of Apple Pay in list of payment methods                                                                                                                                                                                       |

## Usage

### New Order

Select Credit Card as the payment method in the Payment & Shipping Information section (see Title in the Configuration Options section of this document).

### Capture

If ‘Authorize’ is selected as the Payment Action in the Sola module settings (see Payment Actions in the Configuration Options section of this page), select ‘Capture Online’ to capture the transaction before submitting the invoice. Please note that previously voided transactions cannot be captured and will result in an error.

### Void

Use ‘Void’ to cancel transactions on orders that have not yet been invoiced. This is only available if ‘Authorize’ is selected as the Payment Action in the Sola module settings (see Payment Actions in the Configuration Options section of this document). Once an order has been invoiced, use ‘Credit Memo’ to refund the transaction.

Please note that ‘Void’ cancels the credit card transaction but does not cancel the order. To cancel the order as well, see the Cancel section below.

### Cancel

Use Cancel to void an un-captured transaction and cancel the associated order.

### Credit Memo

Issue a Credit Memo to refund an order that has already been invoiced.

### Retrieving Sola Reference Number

Sola transaction reference numbers can be found in the Transaction History section of any order page and are listed as **Transaction ID**. This can be useful when viewing your transactions on the Sola Gateway portal or when contacting Sola Support regarding specific transactions.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.solapayments.com/plugins/magento-plugin.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
