Skip to content

Commit

Permalink
Merge pull request #30 from wirecard/tpwdcee-95
Browse files Browse the repository at this point in the history
Tpwdcee 95
  • Loading branch information
rinnhofer authored May 24, 2017
2 parents 1b7d570 + c6b7662 commit 5f665d9
Show file tree
Hide file tree
Showing 13 changed files with 71 additions and 172 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.7';
protected $_pluginVersion = '1.0.8';
protected $_pluginName = 'Wirecard/CheckoutPage';

/**
Expand Down
4 changes: 4 additions & 0 deletions Model/AbstractPayment.php
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,10 @@ public function initPaymentByCart(CheckoutCart $cart, $urls, \Magento\Framework\
->setConsumerData($this->_getConsumerData($quote))
->setMaxRetries($this->_dataHelper->getConfigData('options/maxretries'));

if ($this->_paymentMethod == \WirecardCEE_QMore_PaymentType::MASTERPASS) {
$init->setShippingProfile('NO_SHIPPING');
}

$init->mage_orderId = $orderId;
$init->mage_quoteId = $quote->getId();
$init->mage_orderCreation = $this->_dataHelper->getConfigData('options/order_creation');
Expand Down
3 changes: 1 addition & 2 deletions Model/ConfigProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,14 @@ class ConfigProvider implements ConfigProviderInterface
protected $methodCodes = [
Payment\Select::CODE,
Payment\Ccard::CODE,
Payment\Masterpass::CODE,
Payment\Ccardmoto::CODE,
Payment\Maestro::CODE,
Payment\Eps::CODE,
Payment\Ideal::CODE,
Payment\Giropay::CODE,
Payment\Tatrapay::CODE,
Payment\Skrilldirect::CODE,
Payment\Skrillwallet::CODE,
Payment\Mpass::CODE,
Payment\Bmc::CODE,
Payment\P24::CODE,
Payment\Poli::CODE,
Expand Down
10 changes: 6 additions & 4 deletions Model/Payment/Mpass.php → Model/Payment/Masterpass.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,14 @@

use Wirecard\CheckoutPage\Model\AbstractPayment;

class Mpass extends AbstractPayment
class Masterpass extends AbstractPayment
{
const CODE = 'wirecard_checkoutpage_mpass';

const CODE = 'wirecard_checkoutpage_masterpass';
protected $_code = self::CODE;

protected $_paymentMethod = \WirecardCEE_Stdlib_PaymentTypeAbstract::MPASS;
protected $_paymentMethod = \WirecardCEE_Stdlib_PaymentTypeAbstract::MASTERPASS;

protected $_logo = 'masterpass.png';

protected $_logo = 'mpass.png';
}
45 changes: 0 additions & 45 deletions Model/Payment/Skrilldirect.php

This file was deleted.

4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"description": "Wirecard Checkout Page extension for Magento 2",
"keywords": ["wirecard", "checkout", "page", "payment", "magento2"],
"homepage": "https://www.wirecard.at",
"version":"1.0.7",
"version":"1.0.8",
"support": {
"email": "[email protected]",
"docs": "https://guides.wirecard.com"
Expand All @@ -16,7 +16,7 @@
"magento/module-sales": "*",
"magento/module-payment": "*",
"magento/module-quote": "*",
"wirecard/checkout-client-library": "3.3.2"
"wirecard/checkout-client-library": "3.3.4"
},
"autoload": {
"files": [
Expand Down
123 changes: 41 additions & 82 deletions etc/adminhtml/system.xml
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,47 @@
</field>
</group>

<group id="wirecard_checkoutpage_masterpass" translate="label" type="text" sortOrder="1020" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Wirecard Checkout Page Masterpass</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>Available 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 method available for</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>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="50" showInWebsite="1" showInStore="1">
<label>Instructions</label>
</field>
<field id="displaymode" translate="label" type="select" sortOrder="60" showInDefault="1" showInWebsite="1" showInStore="0">
<label>Display mode</label>
<source_model>Wirecard\CheckoutPage\Model\Config\Source\DisplayModes</source_model>
</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_checkoutpage_ccardmoto" translate="label" type="text" sortOrder="1030" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Wirecard Checkout Page Credit Card - Mail Order/Telephone Order</label>
<field id="active" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="0">
Expand Down Expand Up @@ -684,47 +725,6 @@
</field>
</group>

<group id="wirecard_checkoutpage_skrilldirect" translate="label" type="text" sortOrder="1120" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Wirecard Checkout Page Skrill Direct</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>Available 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 method available for</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>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="displaymode" translate="label" type="select" sortOrder="60" showInDefault="1" showInWebsite="1" showInStore="0">
<label>Display mode</label>
<source_model>Wirecard\CheckoutPage\Model\Config\Source\DisplayModes</source_model>
</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_checkoutpage_sofortbanking" translate="label" type="text" sortOrder="1130" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Wirecard Checkout Page SOFORT Banking</label>
<field id="active" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="0">
Expand Down Expand Up @@ -1439,47 +1439,6 @@
</field>
</group>

<group id="wirecard_checkoutpage_mpass" translate="label" type="text" sortOrder="1270" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Wirecard Checkout Page mpass</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>Available 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 method available for</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>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="displaymode" translate="label" type="select" sortOrder="60" showInDefault="1" showInWebsite="1" showInStore="0">
<label>Display mode</label>
<source_model>Wirecard\CheckoutPage\Model\Config\Source\DisplayModes</source_model>
</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_checkoutpage_paybox" translate="label" type="text" sortOrder="1280" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Wirecard Checkout Page paybox</label>
<field id="active" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="0">
Expand Down
27 changes: 9 additions & 18 deletions etc/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,15 @@
<sort_order>110</sort_order>
</wirecard_checkoutpage_ccard>

<wirecard_checkoutpage_masterpass>
<active>1</active>
<title>Wirecard Checkout Page Masterpass</title>
<instructions>You will be redirected to Wirecard Checkout Page when you place an order.</instructions>
<displaymode>iframe</displaymode>
<model>Wirecard\CheckoutPage\Model\Payment\Masterpass</model>
<sort_order>115</sort_order>
</wirecard_checkoutpage_masterpass>

<wirecard_checkoutpage_ccardmoto>
<active>0</active>
<title>Wirecard Checkout Page Credit Card - Mail Order / Telephone Order</title>
Expand Down Expand Up @@ -151,15 +160,6 @@
<sort_order>190</sort_order>
</wirecard_checkoutpage_p24>

<wirecard_checkoutpage_skrilldirect>
<active>0</active>
<title>Wirecard Checkout Page Skrill Direct</title>
<instructions>You will be redirected to Wirecard Checkout Page when you place an order.</instructions>
<displaymode>iframe</displaymode>
<model>Wirecard\CheckoutPage\Model\Payment\Skrilldirect</model>
<sort_order>200</sort_order>
</wirecard_checkoutpage_skrilldirect>

<wirecard_checkoutpage_sofortbanking>
<active>1</active>
<title>Wirecard Checkout Page SOFORT Banking</title>
Expand Down Expand Up @@ -314,15 +314,6 @@
<txident>SINGLE</txident>
</wirecard_checkoutpage_sepa>

<wirecard_checkoutpage_mpass>
<active>0</active>
<title>Wirecard Checkout Page mpass</title>
<instructions>You will be redirected to Wirecard Checkout Page when you place an order.</instructions>
<displaymode>iframe</displaymode>
<model>Wirecard\CheckoutPage\Model\Payment\Mpass</model>
<sort_order>350</sort_order>
</wirecard_checkoutpage_mpass>

<wirecard_checkoutpage_paybox>
<active>0</active>
<title>Wirecard Checkout Page paybox</title>
Expand Down
2 changes: 0 additions & 2 deletions i18n/de_AT.csv
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ Provider,Provider
"Wirecard Checkout Page Invoice","Wirecard Checkout Page Rechnung"
"Wirecard Checkout Page Maestro SecureCode","Wirecard Checkout Page Maestro SecureCode"
"Wirecard Checkout Page moneta.ru","Wirecard Checkout Page moneta.ru"
"Wirecard Checkout Page mpass","Wirecard Checkout Page mpass"
"Wirecard Checkout Page My Voucher","Wirecard Checkout Page Mein Gutschein"
"Wirecard Checkout Page paybox","Wirecard Checkout Page paybox"
"Wirecard Checkout Page PayPal","Wirecard Checkout Page PayPal"
Expand All @@ -89,7 +88,6 @@ Provider,Provider
"Wirecard Checkout Page Select","Wirecard Checkout Page Zahlungsmittelauswahl"
"Wirecard Checkout Page SEPA Direct Debit","Wirecard Checkout Page SEPA Lastschrift"
"Wirecard Checkout Page Skrill Digital Wallet","Wirecard Checkout Page Skrill Digital Wallet"
"Wirecard Checkout Page Skrill Direct","Wirecard Checkout Page Skrill Direct"
"Wirecard Checkout Page SOFORT Banking","Wirecard Checkout Page SOFORT Überweisung"
"Wirecard Checkout Page TatraPay","Wirecard Checkout Page TatraPay"
"Wirecard Checkout Page Trustly","Wirecard Checkout Page Trustly"
Expand Down
2 changes: 0 additions & 2 deletions i18n/en_US.csv
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ Provider,Provider
"Wirecard Checkout Page Invoice","Wirecard Checkout Page Invoice"
"Wirecard Checkout Page Maestro SecureCode","Wirecard Checkout Page Maestro SecureCode"
"Wirecard Checkout Page moneta.ru","Wirecard Checkout Page moneta.ru"
"Wirecard Checkout Page mpass","Wirecard Checkout Page mpass"
"Wirecard Checkout Page My Voucher","Wirecard Checkout Page My Voucher"
"Wirecard Checkout Page paybox","Wirecard Checkout Page paybox"
"Wirecard Checkout Page PayPal","Wirecard Checkout Page PayPal"
Expand All @@ -90,7 +89,6 @@ Provider,Provider
"Wirecard Checkout Page Select","Wirecard Checkout Page Select"
"Wirecard Checkout Page SEPA Direct Debit","Wirecard Checkout Page SEPA Direct Debit"
"Wirecard Checkout Page Skrill Digital Wallet","Wirecard Checkout Page Skrill Digital Wallet"
"Wirecard Checkout Page Skrill Direct","Wirecard Checkout Page Skrill Direct"
"Wirecard Checkout Page SOFORT Banking","Wirecard Checkout Page SOFORT Banking"
"Wirecard Checkout Page TatraPay","Wirecard Checkout Page TatraPay"
"Wirecard Checkout Page Trustly","Wirecard Checkout Page Trustly"
Expand Down
Loading

0 comments on commit 5f665d9

Please sign in to comment.