Skip to content

Develop #70

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 26, 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.2](https://github.com/unzerdev/magento2/compare/3.2.1..3.2.2)
### Fixed
* bank name not needed anymore for eps payment method

## [3.2.1](https://github.com/unzerdev/magento2/compare/3.2.0..3.2.1)
### Fixed
* missing mandatory cardholder field for cards 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.1",
"version": "3.2.2",
"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.1">
<module name="Unzer_PAPI" setup_version="3.2.2">
<sequence>
<module name="Magento_Checkout"/>
<module name="Magento_Config" />
Expand Down
25 changes: 2 additions & 23 deletions view/frontend/web/js/view/payment/method-renderer/eps.js
Original file line number Diff line number Diff line change
@@ -1,39 +1,18 @@
define(
[
'ko',
'Unzer_PAPI/js/view/payment/method-renderer/base'
],
function (ko, Component) {
function (Component) {
'use strict';

return Component.extend({
defaults: {
field: {valid: false},
template: 'Unzer_PAPI/payment/eps'
},

initializeForm: function () {
const self = this;

this.resourceProvider = this.sdk.EPS();
this.resourceProvider.create('eps', {
containerId: 'eps-field'
});

this.field.valid = ko.observable(false);

this.resourceProvider.addEventListener('change', function (event) {
self.field.valid(!!event.value);
});
},

allInputsValid: function () {
return this.field.valid();
},

validate: function () {
return this.allInputsValid();
},
}
});
}
);
3 changes: 1 addition & 2 deletions view/frontend/web/template/payment/eps.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,13 @@
</div>

<form class="unzerUI form" novalidate>
<div id="eps-field" class="field"></div>
<div class="field">
<button class="unzerUI primary button fluid"
data-bind="
click: placeOrder,
attr: {title: $t('Place Order')},
css: {disabled: !isPlaceOrderActionAllowed() || !allTermsChecked()},
enable: (getCode() == isChecked() && allInputsValid())
enable: (getCode() == isChecked())
"
type="submit">
<span data-bind="i18n: 'Place Order'"></span>
Expand Down
Loading