Skip to content
This repository has been archived by the owner on Feb 10, 2023. It is now read-only.

Commit

Permalink
Finish 1.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jmauzyk committed Apr 21, 2021
1 parent 5fd34ae commit ca8ed45
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Release Notes for CardConnect for Craft Commerce

## 1.5.0 - 2021-04-20
### Added
* Added `UserFieldsEvent` for sending custom data with authorizations ([documentation](https://github.com/jmauzyk/commerce-cardconnect#custom-user-fields))

### Changed
* The plugin now supports Commerce Omnipay 3.0
* The plugin now requires Omnipay: CardConnect 1.4.0

### Fixed
* Fixed a bug where purchase transactions failed to validate correctly
* Fixed a bug where requests failed to send cardholder name if different from billing address
* Fixed a bug where requests using payment sources failed to populate cardholder name

## 1.4.4 - 2020-12-17
### Fixed
* Fixed bug where expiry pattern wouldn't validate correctly in certain instances
Expand Down
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,3 +161,26 @@ Below is an example of how you can customize the default payment form and tokeni
{# To output tokenized number input with customization... #}
{{ gateway.getIframeNumberInput(srcParams, options)|raw }}
```

## Custom User Fields

The CardPointe Gateway API supports custom [user fields](https://developer.cardpointe.com/cardconnect-api#additional-optional-fields) in authorization requests that can be recalled later. These custom values can be populated using the `UserFieldsEvent`:

```php
use jmauzyk\commerce\cardconnect\events\UserFieldsEvent;
use jmauzyk\commerce\cardconnect\gateways\Gateway;
use yii\base\Event;

Event::on(
Gateway::class,
Gateway::USER_FIELDS_EVENT,
function (UserFieldsEvent $e) {
$order = $e->order;

$e->userFields = [
'note' => $order->note ?? '',
// ...
];
}
);
```

0 comments on commit ca8ed45

Please sign in to comment.