Skip to content

Commit

Permalink
Merge pull request #35 from wirecard/TPWDCEE-514
Browse files Browse the repository at this point in the history
Tpwdcee 514
  • Loading branch information
rinnhofer authored Nov 20, 2017
2 parents e1fdef4 + b59172c commit 75f1fc6
Show file tree
Hide file tree
Showing 15 changed files with 46 additions and 110 deletions.
2 changes: 1 addition & 1 deletion Helper/Data.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
class Data extends \Magento\Framework\App\Helper\AbstractHelper
{

protected $_pluginVersion = '1.0.9';
protected $_pluginVersion = '1.0.10';
protected $_pluginName = 'Wirecard/CheckoutSeamless';

/**
Expand Down
1 change: 0 additions & 1 deletion Model/ConfigProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ class ConfigProvider implements ConfigProviderInterface
Payment\Trustly::CODE,
Payment\Paybox::CODE,
Payment\Paysafecard::CODE,
Payment\Quick::CODE,
Payment\Paypal::CODE,
Payment\Epaybg::CODE,
Payment\Sepa::CODE,
Expand Down
45 changes: 0 additions & 45 deletions Model/Payment/Quick.php

This file was deleted.

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": "wirecard/magento2-wcs",
"description": "Wirecard Checkout Seamless",
"type": "magento2-module",
"version": "1.0.9",
"version": "1.0.10",
"license": [
"MIT"
],
Expand Down
37 changes: 0 additions & 37 deletions etc/adminhtml/system.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1132,43 +1132,6 @@
</field>
</group>

<group id="wirecard_checkoutseamless_quick" translate="label" type="text" sortOrder="5240" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Wirecard Checkout Seamless @Quick</label>
<field id="active" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="0">
<label>Enabled</label>
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
</field>
<field id="title" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Title</label>
</field>
<field id="allowed_carrier" translate="label" type="multiselect" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="0">
<label>Allowed Shipping Methods</label>
<source_model>Magento\Shipping\Model\Config\Source\Allmethods</source_model>
</field>
<field id="allowspecific" translate="label" type="allowspecific" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="0">
<label>Payment from Applicable Countries</label>
<source_model>Magento\Payment\Model\Config\Source\Allspecificcountries</source_model>
</field>
<field id="specificcountry" translate="label" type="multiselect" sortOrder="40" showInDefault="1" showInWebsite="1" showInStore="0">
<label>Payment from Specific Countries</label>
<source_model>Magento\Directory\Model\Config\Source\Country</source_model>
<can_be_empty>1</can_be_empty>
</field>
<field id="instructions" translate="label" sortOrder="50" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Instructions</label>
</field>
<field id="sort_order" translate="label" type="text" sortOrder="70" showInDefault="1" showInWebsite="1" showInStore="0">
<label>Sort Order</label>
<frontend_class>validate-number</frontend_class>
</field>
<field id="min_order_total" translate="label" type="text" sortOrder="80" showInDefault="1" showInWebsite="1" showInStore="0">
<label>Minimum Order Total</label>
</field>
<field id="max_order_total" translate="label" type="text" sortOrder="90" showInDefault="1" showInWebsite="1" showInStore="0">
<label>Maximum Order Total</label>
</field>
</group>

<group id="wirecard_checkoutseamless_skrillwallet" translate="label" type="text" sortOrder="5250" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Wirecard Checkout Seamless Skrill Digital Wallet</label>
<field id="active" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="0">
Expand Down
8 changes: 0 additions & 8 deletions etc/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -256,14 +256,6 @@
<sort_order>310</sort_order>
</wirecard_checkoutseamless_paysafecard>

<wirecard_checkoutseamless_quick>
<active>0</active>
<title>Wirecard Checkout Seamless @Quick</title>
<instructions>You will be redirected to Wirecard Checkout Seamless when you place an order.</instructions>
<model>Wirecard\CheckoutSeamless\Model\Payment\Quick</model>
<sort_order>320</sort_order>
</wirecard_checkoutseamless_quick>

<wirecard_checkoutseamless_skrillwallet>
<active>0</active>
<title>Wirecard Checkout Seamless Skrill Digital Wallet</title>
Expand Down
1 change: 0 additions & 1 deletion i18n/de_AT.csv
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@
"Version: %product","Version: %product"
"Void not possible anymore for this payment, please try cancel instead!","Das Aufheben der Authorisierung ist nicht mehr möglich!"
"Wirecard Checkout Seamless Fund Transfer","Wirecard Checkout Seamless Auszahlungr"
"Wirecard Checkout Seamless @Quick","Wirecard Checkout Seamless @Quick"
"Wirecard Checkout Seamless Bancontact","Wirecard Checkout Seamless Bancontact"
"Wirecard Checkout Seamless Credit Card - Mail Order / Telephone Order","Wirecard Checkout Page Kreditkarte - Post / Telefonbestellung"
"Wirecard Checkout Seamless Credit Card","Wirecard Checkout Seamless Kreditkarte"
Expand Down
1 change: 0 additions & 1 deletion i18n/en_US.csv
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@
"Transaction identifier","Transaction identifier"
"Version: %product","Version: %product"
"Void not possible anymore for this payment, please try cancel instead!","Void not possible anymore for this payment, please try cancel instead!"
"Wirecard Checkout Seamless @Quick","Wirecard Checkout Seamless @Quick"
"Wirecard Checkout Seamless Bancontact","Wirecard Checkout Seamless Bancontact"
"Wirecard Checkout Seamless Credit Card - Mail Order / Telephone Order","Wirecard Checkout Seamless Credit Card - Mail Order / Telephone Order"
"Wirecard Checkout Seamless Credit Card","Wirecard Checkout Seamless Credit Card"
Expand Down
3 changes: 0 additions & 3 deletions view/frontend/layout/checkout_index_index.xml
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,6 @@
<item name="wirecard_checkoutseamless_paysafecard" xsi:type="array">
<item name="isBillingAddressRequired" xsi:type="boolean">true</item>
</item>
<item name="wirecard_checkoutseamless_quick" xsi:type="array">
<item name="isBillingAddressRequired" xsi:type="boolean">true</item>
</item>
<item name="wirecard_checkoutseamless_skrillwallet" xsi:type="array">
<item name="isBillingAddressRequired" xsi:type="boolean">true</item>
</item>
Expand Down
4 changes: 0 additions & 4 deletions view/frontend/web/js/view/payment/method-renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,6 @@ define(
type: 'wirecard_checkoutseamless_paysafecard',
component: 'Wirecard_CheckoutSeamless/js/view/payment/method-renderer/standard'
},
{
type: 'wirecard_checkoutseamless_quick',
component: 'Wirecard_CheckoutSeamless/js/view/payment/method-renderer/standard'
},
{
type: 'wirecard_checkoutseamless_paypal',
component: 'Wirecard_CheckoutSeamless/js/view/payment/method-renderer/standard'
Expand Down
2 changes: 1 addition & 1 deletion view/frontend/web/js/view/payment/method-renderer/ccard.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ define(
return $.extend(true, parent, {'additional_data': additionalData});
},
placeWirecardOrder: function () {
if (this.validate()) {
if (this.validate() && additionalValidators.validate()) {
var paymentMethod = this.getPaymentMethod(),
ccData = {},
failure = function (errors, messageContainer) {
Expand Down
9 changes: 8 additions & 1 deletion view/frontend/web/js/view/payment/method-renderer/eps.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,16 @@ define(
var frm = $('#' + this.getCode() + '-form');
return frm.validation() && frm.validation('isValid');
},

getFinancialInstitutions: function () {
return window.checkoutConfig.payment[this.getCode()].financialinstitutions;
},
placeWirecardOrder: function() {
if (this.validate() && additionalValidators.validate()) {
this.selectPaymentMethod();

setPaymentMethodAction(this.messageContainer, this.getDisplayMode());
}
return false;
}
});
}
Expand Down
14 changes: 12 additions & 2 deletions view/frontend/web/js/view/payment/method-renderer/ideal.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,10 @@ define(
'Wirecard_CheckoutSeamless/js/view/payment/method-renderer/standard',
'Wirecard_CheckoutSeamless/js/action/set-payment-method',
'mage/url',
'jquery'
'jquery',
'Magento_Checkout/js/model/payment/additional-validators'
],
function (Component, setPaymentMethodAction, url, $) {
function (Component, setPaymentMethodAction, url, $, additionalValidators) {
return Component.extend({
defaults: {
template: 'Wirecard_CheckoutSeamless/payment/method-ideal'
Expand All @@ -61,6 +62,15 @@ define(

getFinancialInstitutions: function () {
return window.checkoutConfig.payment[this.getCode()].financialinstitutions;
},

placeWirecardOrder: function() {
if (this.validate() && additionalValidators.validate()) {
this.selectPaymentMethod();

setPaymentMethodAction(this.messageContainer, this.getDisplayMode());
}
return false;
}
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,10 @@ define(
'Wirecard_CheckoutSeamless/js/model/min-age-validator',
'mage/url',
'jquery',
'mage/translate'
'mage/translate',
'Magento_Checkout/js/model/payment/additional-validators'
],
function (Component, setPaymentMethodAction, minAgeValidator, url, $, $t) {
function (Component, setPaymentMethodAction, minAgeValidator, url, $, $t, additionalValidators) {
return Component.extend({

customerData: {},
Expand Down Expand Up @@ -90,8 +91,16 @@ define(

getConsentText: function () {
return window.checkoutConfig.payment[this.getCode()].consenttxt;
}
},

placeWirecardOrder: function() {
if (this.validate() && additionalValidators.validate()) {
this.selectPaymentMethod();

setPaymentMethodAction(this.messageContainer, this.getDisplayMode());
}
return false;
}
});
}
);
12 changes: 11 additions & 1 deletion view/frontend/web/js/view/payment/method-renderer/trustpay.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,9 @@ define(
'Wirecard_CheckoutSeamless/js/action/set-payment-method',
'mage/url',
'jquery',
'Magento_Checkout/js/model/payment/additional-validators'
],
function (Component, setPaymentMethodAction, url, $) {
function (Component, setPaymentMethodAction, url, $, additionalValidators) {
return Component.extend({
defaults: {
template: 'Wirecard_CheckoutSeamless/payment/method-trustpay'
Expand Down Expand Up @@ -65,6 +66,15 @@ define(

getFinancialInstitutions: function () {
return window.checkoutConfig.payment[this.getCode()].financialinstitutions;
},

placeWirecardOrder: function() {
if (this.validate() && additionalValidators.validate()) {
this.selectPaymentMethod();

setPaymentMethodAction(this.messageContainer, this.getDisplayMode());
}
return false;
}
});
}
Expand Down

0 comments on commit 75f1fc6

Please sign in to comment.