This guide describes how to add the Affirm Telesales Add-on module for Magento. The module allows your phone representatives and administrators to provide Affirm as a payment option when creating orders in Magento. When they create an order using the Telesales option, Affirm will send the customer a link via email and SMS to being their loan application process.
The integration steps are:
- Install the Telesales module
- Configure the Telesales module
- Test the Telesales module
- Deploy to production
Before you begin
Before adding the module, you should have already installed and configured Affirm for Magento.
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.
Note that we only send SMS messages with the checkout link from the Affirm Live environment. During Sandbox environment testing, use email messages for the checkout link.
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.
1. Install the Telesales module
You have several options for installing the module. Click here if you already have the module installed and need information on upgrading it.
- Install using modman
- Go to MAGENTO_ROOT and run:
modman clone https://github.com/Affirm/Magento1_Affirm_Telesales.git
- Update the module by running:
modman update Magento1_Affirm_Telesales
- Install using Magento Connect Manager
- Download the latest package release (compressed TGZ file)
- In the Magento admin panel, go to System > Magento Connect > Magento Connect Manager
- Click Choose File and select the downloaded package release file
- Click Upload
- Install using magento-composer-installer
composer require affirm/magento1-telesales
2. Configure the Telesales module
After installing the Telesales module, enable it by updating Magento’s configurations:
- Sign in to your Magento admin portal
- Go to System > Configuration > Sales > Payment Methods > Affirm Telesales
- Set Enabled to Yes
- Keep Mode set to Sandbox (for development and testing)
- Enter the Public API Key and Private API Key you retrieved from the Affirm sandbox merchant dashboard
- If your checkout process automatically captures the charge, set Payment Action to Authorize and Capture
- Enter your company or brand name in Company Name (this is what the customer will see)
3. Test the Telesales module
We only send SMS messages with the checkout link from the Affirm Live environment. During Sandbox environment testing, use email messages for the checkout link.
- In your order management system, create an order
- Enter a valid U.S. address and mobile phone number (Affirm won’t work with a fake address or phone number)
- Select Affirm as the payment option
- Click Submit Order to place it in a pending state
- Click Send Affirm Checkout link
- Find the email with the checkout link and click it
- If you have an existing account, click Sign In
- If you don’t have an existing account, create one with the following:
- Any first and last name
- An email address with a valid format
- A valid US cell phone number (you do not need access to this number) that you will use in all subsequent checkout attempts
- A birth date older than 18 years old
- Any four digits
- Enter 1234 for the verification code and click VERIFY CODE
- Complete checkout flow and click CONFIRM LOAN
- Verify that the order is processed or complete in your order management dashboard
- Verify that the transaction appears in your platform's admin panel and on sandbox.affirm.com/dashboard
4. Deploy to production
Coordinate testing with Affirm
Before deploying the Affirm integration to your production site, Affirm will need to test it in your development or staging environment connected to our live environment. Contact your Integration Consultant or email@example.com to coordinate this test.
Connect to the live Affirm environment
- Retrieve your live API keys at https://affirm.com/dashboard/#/apikeys
- In the Magento admin panel, go to System > Configuration > Sales > Payment Methods > Affirm Telesales
- Set Mode to Production
- Enter the Public API Key and Secret Key (private key) you just retrieved from the Affirm merchant dashboard
Launch to production
After you’ve connected to our live environment and we’ve tested your integration, you’re ready to deploy to your production environment and offer Affirm as a payment option to your customers.