FAQ
Find answers to common questions about your Magento 2 integration with Affirm.
How does the Chrome SameSite cookie policy impact my Magento 2 integration?
With the recent release of Google Chrome's SameSite cookie policy, the newest version of Chrome updated how it handles cookies. As a result, we’ve seen an increase in loan authorization failures for Magento 2 merchants integrated with Affirm. See our guide for more information on this issue and how to resolve it.
How do I modify the monthly payment messaging placement on the product detail or cart page?
To place monthly payment messaging on the product detail:
1. From the Magento 2 admin page, go to Stores > Configuration > General > Affirm Promos.
2. In the As Low As Additional Developer Settings section, set PDP Placement options for As low as to one of these options:
- After Price (selected by default)
- Before Price
- End of Product Info
This integration uses the Affirm/Block/Promotion/ProductPage/Aslowas
block and the Affirm/view/frontend/templates/promotion/aslowasPDP.phtml
template.
To include this block in a specific location on the product or cart page, you'll need to select the appropriate handle (the default product page in Magento 2 is catalog_product_view.xml
) and parent block or container, which will render the as low as block (using <referenceBlock name="parent_block_name"> structure
or <referenceContainer name="test_content">)
, where parent_block_name
- name parent block in the layout.
What should I do if I see an "Invalid header line detected" error message when placing an order with Affirm?
This error is caused by an upgrade to our load balancers from AWS Classic ELB to AWS Application Load Balancer and the new ALB supports both HTTP/1.1 and HTTP/2. As a result, clients that support HTTP/2 will auto upgrade. It is likely that cURL also auto upgrades to HTTP/2 transparently, i.e. it sends HTTP/2 request with a HTTP/2 response, on the wire.
We use Magento 2's core Zend Framework library for cURL request and it does not support HTTP/2. We have plans to switch to another library or Magento 2's cURL in the future. In the mean time, you can follow the instructions below to apply a patch to add HTTP/2 support to ZF1 library.
// Modify the following file path around line 185:
File path : <magento root>/vendor/magento/zendframework1/library/Zend/Http/Response.php
// From:
if (! preg_match('|^\d\.\d$|', $version)) {
// To:
if (! preg_match('|^\d\.\d$|', $version) && ($version != 2)) { // Hot fix by Affirm
// Modify the following file path around line 517:
File path : <magento root>/vendor/magento/zendframework1/library/Zend/Http/Response.php
// From:
if ($index === 0 && preg_match('#^HTTP/\d+(?:\.\d+) [1-5]\d+#', $line)) {
// Status line; ignore
continue;
}
// To:
if ($index === 0 && preg_match('#^HTTP/\d+(?:\.\d+) [1-5]\d+#', $line)) {
// Status line; ignore
continue;
}
// Hot fix by Affirm
if ($index === 0 && preg_match('#^HTTP/2 200#', $line)) {
// Status line; ignore
continue;
}
How do I get Affirm checkout to work with Magento 2.2 or lower?
You can use release 2.1.5 for Magento 2.2 and lower.
Use the command below for the Composer installation:
composer require affirm/magento2:2.1.5
composer update
php bin/magento setup:upgrade
php bin/magento setup:di:compile
Does Affirm support multishipping checkout?
No, Affirm does not support multishipping checkout as we use the customer's shipping and billing addresses in our underwriting process to validate fraud.
Updated 12 months ago