Download the PHP package webdna/commerce-affirm without Composer
On this page you can find all versions of the php package webdna/commerce-affirm. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package commerce-affirm
Affirm for Craft Commerce
Requirements
This plugin requests Craft 4.x and Craft Commerce 4.x
Installation
You can install this plugin from the Plugin Store or with Composer.
From the Plugin Store
Go to the Plugin Store in your project’s Control Panel and search for “Affirm”. Then click on the “Install” button in its modal window.
With Composer
Open your terminal and run the following commands:
Setup
To add an Affirm payment gateway, go to Commerce → Settings → Gateways, create a new gateway.
Enter the Public & Private API keys (environmental variable are recommended) and a product key if you have one.
Usage
On the payment page, use the getPaymentFormHtml method passing in a few parameters.
Parameters
automatic
: automatically launches the payment modal otherwise show a button to launch it. (default: 'true')
cancelUrl
: the url to return to if the process is cancelled. (only used in 'redirect' mode)
confirmationUrl
: the url to return to on a successful application. (only used in 'redirect' mode)
mode
: 'modal' or 'redirect' (default: 'modal')
showStatus
: show the status updates, processing etc. (default: false)
Modal callbacks:
onFail
, onSuccess
, onOpen
, onValidationError
if you pass in the onSuccess
callback, you will need to handle setting the token input with the received e.checkout_token
and submitting the form.
All versions of commerce-affirm with dependencies
craftcms/commerce Version ^4.0||^5.0
craftcms/commerce-omnipay Version ^4.0.0||^5.0
eduardlleshi/omnipay-affirm Version ^3.0