---
updatedAt: 2026-01-27T14:12:08.000Z
agentTools:
  projectIndex: https://docs.sequra.com/llms.txt
---

# Magento 2

This document provides a detailed guide for the installation and configuration of the SeQura Affiliate Marketing plugin on your e-commerce platform. Follow these steps carefully to ensure a successful integration.

## Module Information and Requirements

| Parameter         | Value                  |
| :---------------- | :--------------------- |
| **Version**       | 1.0.1                  |
| **Platform**      | Magento 2.3.x, 2.4.x   |
| **Tracking Type** | Server to Server (S2S) |

### System Requirements

| Requirement       | Minimum Version                        |
| :---------------- | :------------------------------------- |
| **Magento**       | 2.3.x, 2.4.x                           |
| **PHP**           | 7.3, 7.4, 8.0, 8.1, 8.2                |
| **MySQL/MariaDB** | 5.7+ or MariaDB 10.2+                  |
| **Security**      | Valid SSL Certificate (HTTPS required) |

**Required PHP Extensions:** `ext-curl`, `ext-json`, `ext-pdo_mysql`.

<br />

***

## Installation Methods

### Option 1: Manual Installation from ZIP (Recommended)

**Step 1: Download and Prepare**
Download the `SequraAffiliate Marketing.zip` file provided by SeQura.

**Step 2: Extract and Copy Files**
Navigate to the root directory of your Magento installation and extract the module.

```
# Navigate to the Magento root directory
cd /path/to/magento/root

# Create the directory structure
mkdir -p app/code/SequraAffiliateMarketing

# Extract the ZIP content into the directory
unzip SequraAffiliateMarketing.zip -d app/code/SequraAffiliateMarketing/
```

**Step 3: Configure Permissions**
Adjust file permissions and assign the correct owner (adjust `www-data:www-data` according to your server configuration).

```Text Text
# Configure permissions
find app/code/SequraAffiliateMarketing -type f -exec chmod 644 {} ;
find app/code/SequraAffiliateMarketing -type d -exec chmod 755 {} ;

# Assign the correct owner (example for Apache/NGINX)
chown -R www-data:www-data app/code/SequraAffiliateMarketing
```

### Option 2: Installation via Composer (Advanced)

If the module is available via Composer:

```
# Add the module via Composer
composer require sequra/affiliate-marketing:^1.0

# Enable the module and update the DB
php bin/magento module:enable SequraAffiliateMarketing_AffiliateMarketing
php bin/magento setup:upgrade

# Compile and flush cache
php bin/magento setup:di:compile
php bin/magento cache:flush
```

<br />

***

## Module Configuration

### Step 1: Access the Configuration Panel

1. Log in to the Magento **Admin Panel**.
2. Navigate to **Stores** > **Configuration**.
3. In the side menu, search for and select **SeQura Affiliate Marketing** > **Configuration**.

### Step 2: Configure Required Parameters

Complete the following information provided by SeQura:

| Field                                 | Description                                             | Requirement                                   |
| :------------------------------------ | :------------------------------------------------------ | :-------------------------------------------- |
| **Enable SeQura Affiliate Marketing** | Activates or deactivates the module functionality.      | **Yes**                                       |
| **Offer ID**                          | Unique identifier for the affiliate campaign.           | Provided by SeQura.                           |
| **Security Token**                    | Secret token to authenticate S2S calls.                 | Minimum 32 characters (letters and numbers).  |
| **Test Mode**                         | Enables test mode (detailed logging and notifications). | Use **Yes** for diagnostics in case of error. |

### Step 3: Test Connection

1. Click the "**Test Connection**" button.
2. Verify the message: If the test is successful, it should appear: `Connection test successful! HTTP Code: 200`.
3. If the connection fails, check the credentials and your server's outbound HTTPS connectivity.

### Step 4: Save Configuration

1. Click "**Save Config**".
2. Flush the cache: `php bin/magento cache:clean config`.

<br />

***

## Installation Verification

### 1. Click Test (Frontend)

1. Access your store with a test parameter: `https://your-store.com/?transaction_id=TEST_AFM_XYZ`.
2. **Verify the Cookie:** Check the browser DevTools under **Application** > **Cookies**. The `cookie_sequra_afm` must contain the value `TEST_AFM_XYZ`.

### 2. Conversion Test (Backend - Postback S2S)

1. With the test cookie active, complete a purchase.

2. **Verify Logs:** Monitor system logs to confirm the execution of the S2S call (if **Test Mode** is active):

   `tail -f var/log/system.log | grep "SeQura Affiliate"`

3. **Verify Database:** Confirm that the order was recorded:

   `SELECT order_id, transaction_id, status FROM sequra_affiliate_orders ORDER BY created_at DESC LIMIT 1;`

The `status` field should be `sent` or `pending` (if there are connectivity issues or retries).

<br />

***

## Production Setup

Before going to production:

1. **Disable Test Mode:** In the Admin Panel, change **Test Mode** to **No** and save the configuration.
2. **Verify Credentials:** Ensure you are using the definitive production **Offer ID** and **Security Token**.
3. **Optimize Performance:** Run the compilation and deployment commands:

   ```
   # Compile code
   php bin/magento setup:di:compile

   # Switch to production mode (if not already set)
   php bin/magento deploy:mode:set production

   # Flush cache
   php bin/magento cache:flush
   ```

   <br />

***

## Troubleshooting

| Issue                      | Most Common Cause                                               | Recommended Solution                                                         |
| :------------------------- | :-------------------------------------------------------------- | :--------------------------------------------------------------------------- |
| **Module not visible**     | Forgot to enable or run `setup:upgrade`.                        | Run `php bin/magento module:enable ...` and `php bin/magento setup:upgrade`. |
| **Test Connection fails**  | Firewall blocking outbound connection or incorrect credentials. | Check the firewall and verify SeQura credentials.                            |
| **Cookies are not saved**  | Site is not on HTTPS.                                           | Ensure the site is fully on HTTPS.                                           |
| **Postbacks are not sent** | Magento cronjob is not running or module is not enabled.        | Verify module status and cron task operation.                                |

***

> **Support:** For assistance with affiliation credentials (Offer ID, Security Token) or final tracking verification, contact your SeQura team.