Affirm

Download instructions with code in word doc.

  1. Obtain credentials from Affirm setting up in back office
  2. Add Merchant Account (Payment Processor
    1. Setup>System Setting Manager > Payment Processor > Add New Merchant Account
    2. Set Active to “Yes”
    3. Choose “Environment” to work from (live or sandbox)
    4. Add Live and Sandbox public and private keys.
    5. Save

Setup Affirm Merchant Account (done by client)

  1. Configure the Checkout Plugin
    1. Products> Website Template Manager > Plugins > Checkout >Edit
    2. Place a check in the Payment Method “Affirm “
    3. Enter the name of the Affirm Merchant Account in the Affirm Payment Processor Field. 
    4. Select Modal (popup) or Redirect (redirects to a page). 
    5. Enable Analytic Analytics - Checked is enabled. This is typically checked. 
    6. Enable Promotional Messaging - Checked is enabled. This is typically checked. 
    7. Checkout expires (in hours) - Number of hours before Affirm payment options is helf before its cleared. 
    8. Promotion ID - Deprecated, i.e. Not used. 
    9. Logo Color - Deprecated, i.e. Not used. 
    10. Logo Type - Deprecated, i.e. Not used. 

Configure the Checkout Plugin to enable Affirm as a payment method on the website (done by then client)

  1. Edit “additional_header” Template 
    1. Products> Website Template Manager > Search> search for “additional_header”
    2. Edit “additional_header” template
    3. Place the following text in the template {affirm_header}
    4. Save Template (Sample below)

Add the affirm_header template to the additional_header template (done by CORESense)

  1.  Edit “paginated_checkout” Template 
    1. Products> Website Template Manager > Search> search for “paginated_checkout”
    2. Edit “paginated_checkout” template
    3. Place the following text in the template {affirm_fragment}
    4. Save Template (Sample below)

Add affirm_fragment template to the paginated_checkout template and save (done by CORESense)

 

  1. Edit “paginated_checkout_js” Template
    1. Products> Website Template Manager > Search> search for “paginated_checkout_js”
    2. Edit “paginated_checkout_js” template
    3. Place the following code at the top of the current code afteer the {literal} and <script> tags
    4. Save Template
    5. When complete, Preview the website and make sure “Affirm” appears in the payment method pull down
    6. Client will need to format the “Affirm” button to their liking

Add the following code after {literal} and <script> tags as shown:

Add to the following to the stylesheet.css

  1. Add promotional message to shopping cart page
    1. Products> Website Template Manager > shopping_cart-footer template
    2. Add  <p class="affirm-as-low-as" data-page-type="cart" data-amount="{$order->get_grand_total(true)*100}"></p>  as shown and save the tempate.

Add Affirm Shopping Cart Promotional code to shopping_cart template (done by CORESense)

  1. Add promotional message to the product page
    1. Products> Website Template Manager>Product
    2. Create a template called 'affirm_product_price' as shown below.
    3. Add {affirm_product_price} to the product_page template as shown below and save the template, 

affirm_product_price template (done by CORESense) 

Note: this code may vary depending on the client's map_pricing template

Adding template to the product_page template (done by CORESense)

© 2023 CORESense ·  info@coresense.com · 125 High Rock Avenue, Saratoga Springs, NY 12866