Skip to content
master
Switch branches/tags
Go to file
Code

README.md

1.1 New Afterpay Installation with Composer (Recommended)

This section outlines the steps to install Afterpay plugin using Composer.

  1. Open Command Line Interface and navigate to the Magento directory on your server
  2. In CLI, run the below command to install Afterpay module:
    composer require afterpay-global/module-afterpay
  3. At the Composer request, enter your Magento marketplace credentials (public key - username, private key - password)
  4. Make sure that Composer finished the installation without errors
  5. In CLI, run the Magento setup upgrade:
    php bin/magento setup:upgrade
  6. In CLI, run the Magento Dependencies Injection Compile:
    php bin/magento setup:di:compile
  7. In CLI, run the Magento Static Content deployment:
    php bin/magento setup:static-content:deploy
  8. Login to Magento Admin and navigate to System/Cache Management
  9. Flush the cache storage by selecting Flush Cache Storage

1.2 New Afterpay Installation

This section outlines the steps to install the Afterpay plugin for the first time.

Note: [MAGENTO] refers to the root folder where Magento is installed.

  1. Download the Magento-Afterpay plugin - Available as a .zip or tar.gz file from the Afterpay GitHub directory.
  2. Unzip the file
  3. Create directory Afterpay/Afterpay in:
    [MAGENTO]/app/code/
  4. Copy the files to 'Afterpay/Afterpay' folder
  5. Open Command Line Interface
  6. In CLI, run the below command to enable Afterpay module:
    php bin/magento module:enable Afterpay_Afterpay
  7. In CLI, run the Magento setup upgrade:
    php bin/magento setup:upgrade
  8. In CLI, run the Magento Dependencies Injection Compile:
    php bin/magento setup:di:compile
  9. In CLI, run the Magento Static Content deployment:
    php bin/magento setup:static-content:deploy
  10. Login to Magento Admin and navigate to System/Cache Management
  11. Flush the cache storage by selecting Flush Cache Storage

1.3 Afterpay Merchant Setup

Complete the below steps to configure the merchant’s Afterpay Merchant Credentials in Magento Admin.

Note: Prerequisite for this section is to obtain an Afterpay Merchant ID and Secret Key from Afterpay.

  1. Navigate to Magento Admin/Stores/Configuration/Sales/Payment Methods/Afterpay
  2. Enter the Merchant ID and Merchant Key.
  3. Enable Afterpay plugin using the Enabled checkbox.
  4. Configure the Afterpay API Mode (Sandbox Mode for testing on a staging instance and Production Mode for a live website and legitimate transactions).
  5. Save the configuration.
  6. Click the Update Limits button to retrieve the Minimum and Maximum Afterpay Order values.

1.4 Upgrade Of Afterpay Installation using Composer

This section outlines the steps to upgrade the currently installed Afterpay plugin version using composer.

Notes:

Prerequisite for this section is that the module should be installed using composer. Please see section 1.1 for guidelines to install Afterpay module using composer.

[MAGENTO] refers to the root folder where Magento is installed.

  1. Open Command Line Interface and navigate to the Magento directory on your server
  2. In CLI, run the below command to update Afterpay module:
    composer update afterpay-global/module-afterpay
  3. Make sure that Composer finished the update without errors
  4. In CLI, run the Magento setup upgrade:
    php bin/magento setup:upgrade
  5. In CLI, run the Magento Dependencies Injection Compile:
    php bin/magento setup:di:compile
  6. In CLI, run the Magento Static Content deployment:
    php bin/magento setup:static-content:deploy
  7. Login to Magento Admin and navigate to System/Cache Management
  8. Flush the cache storage by selecting Flush Cache Storage

1.5 Upgrade Of Afterpay Installation

This section outlines the steps to upgrade the currently installed Afterpay plugin version.

The process of upgrading the Afterpay plugin version involves the complete removal of Afterpay plugin files.

Note: [MAGENTO] refers to the root folder where Magento is installed.

  1. Remove Files in: [MAGENTO]/app/code/Afterpay/Afterpay
  2. Download the Magento-Afterpay plugin - Available as a .zip or tar.gz file from the Afterpay GitHub directory.
  3. Unzip the file
  4. Copy the files in folder to:
    [MAGENTO]/app/code/Afterpay/Afterpay
  5. Open Command Line Interface
  6. In CLI, run the below command to enable Afterpay module:
    php bin/magento module:enable Afterpay_Afterpay
  7. In CLI, run the Magento setup upgrade:
    php bin/magento setup:upgrade
  8. In CLI, run the Magento Dependencies Injection Compile:
    php bin/magento setup:di:compile
  9. In CLI, run the Magento Static Content deployment:
    php bin/magento setup:static-content:deploy
  10. Login to Magento Admin and navigate to System/Cache Management
  11. Flush the cache storage by selecting Flush Cache Storage