Installation
Installation d'Affirm
Installing Affirm on Salesforce Commerce Cloud (SFCC) requires the following steps:
- Import the Affirm cartridge.
- Import the required XML files.
- Enable Affirm as a payment processor.
Étape 1 : Importez la cartouche Affirm
1. Download the cartridge.
2. In the Salesforce UX Studio menu, click File > Import.
3. Click to expand General and click Existing Projects into Workspace.
4. Click Next.
5. Cliquez sur Parcourir et accédez au répertoire dans lequel vous avez téléchargé la cartouche Affirm.
6. After the window loads the project, click Select All.
7. Click Finish.
8. Right-click the project and click Properties.
9. Click Project References and check all the Affirm references.
10. Click OK.
11. After Salesforce UX Studio builds the workspace, sign in to Business Manager and go to Site > Manage Sites.
12. Select your site and click Settings.
13. At the end of the cartridge path field, add the following options based on the Commerce Cloud Type:
- Pipelines:
int_affirm_controllers:int_affirm - JavaScript controllers:
int_affirm_controllers:int_affirm - SFRA:
int_affirm_sfra:int_affirm
Étape 2 : Importez les fichiers XML du répertoire Metadata de la cartouche téléchargée
1. In the Business Manager go to Administration > Site Development > Site Import & Export.
2. In the Import section, click Choose File and select affirm.zip from the metadata folder.
3. Click Upload.
4. Once the upload is complete, select affirm.zip from the archive list and click Import.
NoteYou should configure your library ID in the
library.xmlfile in metadata folder. Currently there is the default 'RefArchSharedLibrary'.
- For Pipelines and Controllers put 'SiteGenesisSharedLibrary'.
- For SFRA put 'RefArchSharedLibrary'.
5. Verify that the Site Preferences group was created with ID - AFFIRM_PAYMENT and name – Affirm.
6. Verify that the Payment Method was created with ID - Affirm and name – Affirm. Enable the Affirm payment method.
7. You can add image or text for your payment method by updating content asset “affirm-payment-method”.
Étape 3 : Activez le processeur de paiement Affirm
1. In the Business Manager go to Merchant Tools > Ordering > Payment Processors.
2. Click NEW.
3. Verify that the Site Preferences group was created with ID - AFFIRM_PAYMENT and name -- Affirm.
4. Verify Site Preferences Group exists with:
- ID:
AFFIRM_PAYMENT - Name:
Affirm
5. Outils commerçants > Commandes > Modes de paiement pour vérifier que le mode de paiement existe avec :
- ID:
Affirm - Name:
Affirm
6. Click Enable.
7. Optionally, you can add an image or text for the payment method by updating the asset affirm-payment-method.
Code personnalisé
Vous devrez également mettre à jour les fichiers de vos sites pour prendre en charge la messagerie promotionnelle et les fonctions de paiement. Vous trouverez des instructions pour effectuer ces modifications personnalisées ci-dessous :
En outre, cliquez sur Cartes de crédit/débit pour vérifier que Visa est activé.
Configurer le traitement de la carte virtuelle
- Connectez-vous à Business Manager et accédez à Outils Commerçant > Préférences du site > Préférences personnalisées du site > Affirm.
- Définissez Intégration de la carte virtuelle Affirm sur Activé.
- Add the VCN Payment Instrument with last part of hook name (eg.
BASIC_CREDIT).
Intégration avec d'autres processeurs de paiement
Our virtual card integration assumes you're processing a debit card using your payment processors. By default, it uses the BASIC_CREDIT processor but if you need to integrate Affirm with other payment processors, follow the next steps:
- Set site preference attribute VCN Payment Instrument with the last part of hook name (e.g.
CYBERSOURCE_CREDIT_CARD). - Register the new hook handler for extension point
dw.int_affirm.payment_instrument.%PI%, where %PI% is payment instrument value you've set in the previous step. (e.g.,dw.int_affirm.payment_instrument.CYBERSOURCE_CREDIT_CARD). By default it isdw.int_affirm.payment_instrument.BASIC_CREDITdefined inside/cartridge/scripts/hooks.json. - Implement a method "add" of this hook handler, which will take basket as the parameter. The method should return a newly created payment instrument. Credit card information can be extracted from
HttpParametersMapand a reference implementation can be found incartridge/scripts/payment/instrument/BASIC_CREDIT.js). Lastly, checkCredit/Debit Cardsto verify that Visa Card is enabled.
Mis à jour 3 months ago