Download the PHP package jmauzyk/commerce-cardconnect without Composer
On this page you can find all versions of the php package jmauzyk/commerce-cardconnect. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download jmauzyk/commerce-cardconnect
More information about jmauzyk/commerce-cardconnect
Files in jmauzyk/commerce-cardconnect
Package commerce-cardconnect
Short Description CardConnect integration for Craft Commerce
License MIT
Informations about the package commerce-cardconnect
CardConnect for Craft Commerce
This plugin provides a CardConnect integration for Craft Commerce.
Requirements
This plugin requires Craft CMS 3.1.0 and Commerce 2.0.0 or later.
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 CardConnect for Craft Commerce. Then click on the Install button in its modal window.
With Composer
-
Open your terminal and go to your Craft project:
-
Tell Composer to load the plugin:
- In the Control Panel, go to Settings → Plugins and click the Install button for CardConnect for Craft Commerce; or tell Craft to install the plugin:
Setup
CardConnect API Credentials
You will receive production API credentials including a username, password, merchant ID, and endpoint from CardConnect when you create an account. For test credentials and test card numbers, see the CardConnect Support Center.
Adding a CardConnect Gateway
Go to Commerce → System Settings → Gateways and click the New Gateway button. Set the gateway type to CardConnect, fill in your test or production API credentials, and save.
Payment Forms
After installing and configuring the gateway, form fields will submit a transaction to CardConnect.
Default Payment Form
The basic Commerce payment form can be output using the following line of code.
As of v1.3.0, payment forms generated using getPaymentFormHtml() will use tokenized card numbers by default via CardConnect's Hosted iFrame Tokenizer. To change the tokenization method or revert to using clear text card numbers, select the appropriate Tokenization configuration under the gateway's settings. Per CardConnect's documentation it is strongly recommended that you tokenize the clear text card data before passing it into a request.
Custom Payment Form
If additional customization is needed, custom payment forms can be used so long as they include inputs for the following attributes:
firstNamelastName- An account
numberin the form of:- Clear text card number
- CardSecure token
- An expiration date in the form of:
- Individual
monthandyear - Combined
expiry(MM/YYYY)
- Individual
cvv
To use iframe tokenization with custom payment forms, use the following line of code to output the hosted iframe tokenizer with an accompanying hidden number input. Be sure to include your own JS event handler like the Primary Payment Page Event Listener shown in the Hosted iFrame Tokenizer documentation.
To use CardSecure API tokenization with custom payment forms, use the code below as a basis. Element id and name attributes must be as shown in order to work with the tokenizer javascript.
To speed up tokenization performance, it's recommended to use code similar to below to preconnect or dns-prefetch before the tokenization is called.
Hosted iFrame Tokenizer Customization
The hosted iframe's appearance and functionality can modified using:
srcParams— An array containing optional parameters passed with the iframesrcURLoptions— An array containing attributes for constructing theiframetag
Below is an example of how you can customize the default payment form and tokenized number input. All CSS will have unnecessary whitespace removed and be correctly encoded for the iframe tag. See the Hosted iFrame Tokenizer documentation for a full reference of optional parameters and whitelisted CSS properties.
Custom User Fields
The CardPointe Gateway API supports custom user fields in authorization requests that can be recalled later. These custom values can be populated using the UserFieldsEvent:
All versions of commerce-cardconnect with dependencies
craftcms/commerce Version ^2.0|^3.0
craftcms/commerce-omnipay Version ^2.0|^3.0
jmauzyk/omnipay-cardconnect Version ^1.4.0