Installer et configurer Affirm

Ce guide vous aide à configurer Affirm à la caisse dans Spree.

Install Affirm on Spree

1. Download the Spree extension.
2. Add the following line to your Spree Gemfile:

gem 'spree_affirm', :github => "affirm/spree_affirm"

3. Installez le gem avec Bundler :

bundle install
bundle exec rails g spree_affirm:install

4. Redémarrez votre serveur Spree.

Configurer Affirm

1. Sign in to the Spree admin page.
2. Go to Configurations > Payment Methods.
3. Click New Payment Method.
4. Set PROVIDER to Spree::Gateway::Affirm..
5. Enter Affirm Monthly Payments for NAME.
6. Click Create.
7. Keep SERVER set to sandbox.affirm.com for testing.
8. Check the TEST MODE box for testing.
9. Enter the API Key (public key) and Secret Key (private key) you retrieved from the Affirm sandbox merchant dashboard.
10. If your checkout process automatically captures the charge, set AUTO CAPTURE to Yes.
11. Set ACTIVE to Yes to enable Affirm as a payment method.
12. Click Update.

858