afterpay-global / module-afterpay
Magento 2 Afterpay Payment Module
Installs: 246 622
Dependents: 2
Suggesters: 0
Security: 0
Stars: 22
Watchers: 12
Forks: 49
Type:magento2-module
Requires
- php: >=7.4.0
- afterpay-global/module-cash-app-pay: ^5
- magento/framework: ^103.0
- magento/module-checkout: 100.4.*
- magento/module-payment: 100.4.*
- magento/module-quote-graph-ql: 100.4.*
- magento/module-sales: 103.0.*
- magento/module-weee: 100.4.*
- dev-main
- 5.4.2
- 5.4.1
- 5.3.2
- 5.3.1
- 5.3.0
- 5.2.2
- 5.2.1
- 5.2.0
- 5.1.4
- v5.1.2
- v5.1.1
- v5.1.0
- 5.0.5
- v5.0.4-beta.1
- 5.0.3
- 5.0.1
- 5.0.0
- 4.3.3
- 4.3.2
- 4.3.1
- 4.3.0
- 4.2.2
- 4.2.1
- 4.2.0
- 4.1.2
- 4.1.0
- 4.0.5
- 4.0.5-beta.1
- 4.0.4
- 4.0.2
- 4.0.1
- 4.0.0
- 3.4.5
- 3.4.4
- 3.4.3
- 3.4.2
- 3.4.1
- 3.4.0
- 3.3.0
- 3.2.0
- 3.1.4
- 3.1.3
- 3.1.2
- 3.1.1
- v3.1.0
- dev-2.3-main
- dev-legacy-main
- dev-patch/v3.2.0.2
This package is auto-updated.
Last update: 2024-12-08 00:06:01 UTC
README
Installation
Install using Composer (Recommended)
- From the CLI, run the following commands to install the Afterpay module.
The right installation command is dependent on your Magento 2 version: - Run Magento install/upgrade scripts:
php bin/magento setup:upgrade
- Compile dependency injection:
php bin/magento setup:di:compile
- Deploy static view files (production mode only):
php bin/magento setup:static-content:deploy
- Flush Magento cache:
php bin/magento cache:flush
Install manually
- 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: - Unzip the file
- Create directory `Afterpay/Afterpay` in: [MAGENTO]/app/code/
- Copy the files to `Afterpay/Afterpay` folder
- Run Magento install/upgrade scripts:
php bin/magento setup:upgrade
- Compile dependency injection:
php bin/magento setup:di:compile
- Deploy static view files (production mode only):
php bin/magento setup:static-content:deploy
- 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.
- Navigate to Magento Admin/Stores/Configuration/Sales/Payment Methods/Afterpay
- Enter the Merchant ID and Merchant Key.
- Enable Afterpay plugin using the Enabled checkbox.
- Configure the Afterpay API Mode (Sandbox Mode for testing on a staging instance and Production Mode for a live website and legitimate transactions).
- Save the configuration.
- Navigate to Magento Admin/System/Tools/Cache Management
- 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.
- Open Command Line Interface and navigate to the Magento directory on your server
- In CLI, run the below command to update Afterpay module:
The right installation command is dependent on your Magento 2 version: - Make sure that Composer finished the update without errors
- Run Magento install/upgrade scripts:
php bin/magento setup:upgrade
- Compile dependency injection:
php bin/magento setup:di:compile
- Deploy static view files (production mode only):
php bin/magento setup:static-content:deploy
- 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.
- Remove Files in: [MAGENTO]/app/code/Afterpay/Afterpay
- 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: - Unzip the file
- Copy the files in folder to: [MAGENTO]/app/code/Afterpay/Afterpay
- Open Command Line Interface
- In CLI, run the command to enable Afterpay module:
php bin/magento module:enable Afterpay_Afterpay
- Run Magento install/upgrade scripts:
php bin/magento setup:upgrade
- Compile dependency injection:
php bin/magento setup:di:compile
- Deploy static view files (production mode only):
php bin/magento setup:static-content:deploy
- Flush Magento cache:
php bin/magento cache:flush
Uninstall
- From the CLI, run the following commands to uninstall Afterpay module:
bin/magento module:uninstall Afterpay_Afterpay
- Run Magento install/upgrade scripts:
php bin/magento setup:upgrade
- Compile dependency injection:
php bin/magento setup:di:compile
- Deploy static view files (production mode only):
php bin/magento setup:static-content:deploy
- Flush Magento cache:
php bin/magento cache:flush
Headless support
Module supports GraphQL and REST API. See GraphQL and Rest API