Giter Site home page Giter Site logo

afterpay-magento-2's Introduction

Afterpay for Magento 2

Installation

Install using Composer (Recommended)

  1. From the CLI, run the following commands to install the Afterpay module.
    The right installation command is dependent on your Magento 2 version:
    Magento version Command to run
    2.4.* composer require afterpay-global/module-afterpay:^5
    2.3.* composer require afterpay-global/module-afterpay:^4
    < 2.3.0 composer require afterpay-global/module-afterpay:^3
  2. Run Magento install/upgrade scripts: php bin/magento setup:upgrade
  3. Compile dependency injection: php bin/magento setup:di:compile
  4. Deploy static view files (production mode only): php bin/magento setup:static-content:deploy
  5. Flush Magento cache: php bin/magento cache:flush

Install manually

  1. Download the Afterpay module for Magento 2 - Available as a .zip or tar.gz file from the Afterpay GitHub directory.
    The right installation module is dependent on your Magento 2 version:
    Magento version Download
    2.4.* Afterpay
    2.3.* Afterpay:4.*
    < 2.3.0 Afterpay:legacy
  2. Unzip the file
  3. Create directory `Afterpay/Afterpay` in: [MAGENTO]/app/code/
  4. Copy the files to `Afterpay/Afterpay` folder
  5. Run Magento install/upgrade scripts: php bin/magento setup:upgrade
  6. Compile dependency injection: php bin/magento setup:di:compile
  7. Deploy static view files (production mode only): php bin/magento setup:static-content:deploy
  8. Flush Magento cache: php bin/magento cache:flush

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. Navigate to Magento Admin/System/Tools/Cache Management
  7. Click Flush Magento Cache button

Upgrade

Composer Upgrade (Recommended)

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 'Install using Composer' 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:
    The right installation command is dependent on your Magento 2 version:
    Magento version Command to run
    2.4.* composer require afterpay-global/module-afterpay:^5
    2.3.* composer require afterpay-global/module-afterpay:^4
    < 2.3.0 composer require afterpay-global/module-afterpay:^3
  3. Make sure that Composer finished the update without errors
  4. Run Magento install/upgrade scripts: php bin/magento setup:upgrade
  5. Compile dependency injection: php bin/magento setup:di:compile
  6. Deploy static view files (production mode only): php bin/magento setup:static-content:deploy
  7. Flush Magento cache: php bin/magento cache:flush

Manual Upgrade

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.
    The right Afterpay module upgradation is dependent on your Magento 2 version:
    Magento version Download
    2.4.* Afterpay:latest
    2.3.* Afterpay:4.*
    < 2.3.0 Afterpay:legacy
  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 command to enable Afterpay module: php bin/magento module:enable Afterpay_Afterpay
  7. Run Magento install/upgrade scripts: php bin/magento setup:upgrade
  8. Compile dependency injection: php bin/magento setup:di:compile
  9. Deploy static view files (production mode only): php bin/magento setup:static-content:deploy
  10. Flush Magento cache: php bin/magento cache:flush

Uninstall

  1. From the CLI, run the following commands to uninstall Afterpay module: bin/magento module:uninstall Afterpay_Afterpay
  2. Run Magento install/upgrade scripts: php bin/magento setup:upgrade
  3. Compile dependency injection: php bin/magento setup:di:compile
  4. Deploy static view files (production mode only): php bin/magento setup:static-content:deploy
  5. Flush Magento cache: php bin/magento cache:flush

Headless support

Module supports GraphQL and REST API. See GraphQL and Rest API

afterpay-magento-2's People

Contributors

afterpayplugins avatar benfterpay avatar ghatamehta-afterpay avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.