Skip to content

Develop #68

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.1.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [3.2.1](https://github.com/unzerdev/magento2/compare/3.2.0..3.2.1)
### Fixed
* missing mandatory cardholder field for cards payment method

## [3.2.0](https://github.com/unzerdev/magento2/compare/3.1.0..3.2.0)
### Added
* TWINT payment method
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "unzerdev/magento2",
"description": "This extension for Magento 2 provides a direct integration of the Unzer payment types to your Magento 2 shop via the Unzer Payment API (PAPI).",
"type": "magento2-module",
"version": "3.2.0",
"version": "3.2.1",
"license": "Apache-2.0",
"require": {
"php": "~7.4.0|~8.1.0|~8.2.0|~8.3.0",
Expand Down
2 changes: 1 addition & 1 deletion etc/module.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
<module name="Unzer_PAPI" setup_version="3.2.0">
<module name="Unzer_PAPI" setup_version="3.2.1">
<sequence>
<module name="Magento_Checkout"/>
<module name="Magento_Config" />
Expand Down
9 changes: 8 additions & 1 deletion view/frontend/web/js/view/payment/method-renderer/cards.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ define(
cvc: {valid: null},
expiry: {valid: null},
number: {valid: null},
holder: {valid: null},
},
template: 'Unzer_PAPI/payment/cards'
},
Expand Down Expand Up @@ -44,10 +45,15 @@ define(
containerId: 'unzer-card-element-id-cvc',
onlyIframe: false
});
this.resourceProvider.create('holder', {
containerId: 'unzer-card-element-id-holder',
onlyIframe: false
});

this.fields.cvc.valid = ko.observable(false);
this.fields.expiry.valid = ko.observable(false);
this.fields.number.valid = ko.observable(false);
this.fields.holder.valid = ko.observable(false);

this.resourceProvider.addEventListener('change', function (event) {
if ("type" in event) {
Expand All @@ -62,7 +68,8 @@ define(
return ko.computed(function () {
return self.fields.cvc.valid() &&
self.fields.expiry.valid() &&
self.fields.number.valid();
self.fields.number.valid() &&
self.fields.holder.valid();
})();
},

Expand Down
3 changes: 3 additions & 0 deletions view/frontend/web/template/payment/cards.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
<div id="unzer-card-element-id-cvc" class="unzerInput"></div>
</div>
</div>
<div class="field">
<div id="unzer-card-element-id-holder" class="unzerInput"></div>
</div>
<!-- ko if: (isVaultEnabled())-->
<div class="field">
<div class="unzerUI checkbox">
Expand Down
Loading