This PR replaces the existing Affirm.js which are customarily loaded from CDN with local copies which get loaded as static resources from the SFCC tenant server instance for each merchant. This change is implemented in order to satisfy the one of the security requirements for the AppExchange marketplace to which this cartridge will migrate.
This commit adds the following browser side javascript files which represent Affirm.js stored locally as resources file for each of the environments respectively:
static/default/affirm/js/live.jsstatic/default/affirm/js/sandbox.js
Along with the static files, a new configuration option was added to enable merchant to decide whether to use the static resource version of Affirm.js or update the resources file (templates/resources/affirm.properties) to continue using the CDN hosted version of Affirm.js by following the instructions on the Affirm docs page (to be updated in conjunction with this release). By default, the cartridge will be using the static resources version to adhere to the Salesforce requirement.
Load Affirm.js from static resources
Summary of Changes
This PR replaces the existing
Affirm.js
which are customarily loaded from CDN with local copies which get loaded as static resources from the SFCC tenant server instance for each merchant. This change is implemented in order to satisfy the one of the security requirements for the AppExchange marketplace to which this cartridge will migrate.This commit adds the following browser side javascript files which represent
Affirm.js
stored locally as resources file for each of the environments respectively:static/default/affirm/js/live.js
static/default/affirm/js/sandbox.js
Along with the static files, a new configuration option was added to enable merchant to decide whether to use the static resource version of
Affirm.js
or update the resources file (templates/resources/affirm.properties
) to continue using the CDN hosted version ofAffirm.js
by following the instructions on the Affirm docs page (to be updated in conjunction with this release). By default, the cartridge will be using the static resources version to adhere to the Salesforce requirement.