Affirm-developers

Installation

Learn how to install and upgrade the Affirm Magento extension.

Overview

This guide describes how to integrate Affirm into your Magento 2 eCommerce platform and provide Affirm as a payment option to your customers.

📘

Reccomendations

  • Install the extension in your sandbox or staging environment before pushing it live
  • Keep a copy of your Magento store and database to ensure you can revert to the version before the installation
  • You may need to re-index all the produce and category tables after extension installation

Sandbox development

You should have received an email inviting you to create an Affirm account. Click here for information about accessing your account.

Develop and test the Affirm integration in your development environment connected to our sandbox. To use our sandbox, retrieve your sandbox API keys at https://sandbox.affirm.com/dashboard/#/apikeys for use during integration.

After development and testing, you'll need to update your integration to use your live API keys, which you can find at https://affirm.com/dashboard/#/apikeys.

Install the extension

You have 2 options for installing the Magento 2 Affirm extension. Both options also upgrade the extension using the exact same steps described below.

📘

Please see the additional instructions for Magento 2.2 and lower.

Install using Composer

1. Retrieve your Magento authentication keys.
2. In the Magento 2 root directory, enter the following commands using the command line:

composer require affirm/magento2
composer update
php bin/magento setup:upgrade
php bin/magento setup:di:compile

3. Clear the Magento 2 cache to use the default Magento 2 Affirm configuration. For Magento 2.2 and lower an Affirm Module version 2.1.5 will be used.

Install using Command Line

1. Download the extension

📘

Ensure the correct release is compatible with your version of Magento 2

2. If it doesn't exist, create the directory Magento2_root/app/code/Astound/Affirm/.
3. Unzip the extension and move all the files to Magento2_root/app/code/Astound/Affirm/.
4. In the Magento 2 root directory, run the following command to verify that Astound_Affirm exists in List of disabled modules:

php bin/magento module:status

5. In the Magento 2 root directory, run the following commands:

php bin/magento module:enable Astound_Affirm
php bin/magento setup:upgrade

6. Clear the Magento 2 cache to use the default Magento 2 Affirm configuration.

Updated 9 months ago



Installation


Learn how to install and upgrade the Affirm Magento extension.

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.