Skip to content

Commit

Permalink
Merge pull request #19 from wirecard/theme_compatibility
Browse files Browse the repository at this point in the history
Update TPWDCEE-94, add theme compatibility
  • Loading branch information
jpy committed Jul 25, 2017
2 parents c82c411 + 620b64e commit 51d4049
Show file tree
Hide file tree
Showing 140 changed files with 306 additions and 370 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
class Wirecard_CheckoutSeamless_Helper_Data extends Mage_Payment_Helper_Data
{

protected $_pluginVersion = '4.1.3';
protected $_pluginVersion = '4.2.0';
protected $_pluginName = 'Wirecard/CheckoutSeamless';

/**
Expand Down
15 changes: 7 additions & 8 deletions app/code/community/Wirecard/CheckoutSeamless/Model/Abstract.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ abstract class Wirecard_CheckoutSeamless_Model_Abstract extends Mage_Payment_Mod
protected $_defaultLocale = 'en';

protected $_order;
protected $_pluginVersion = '4.1.3';
protected $_pluginVersion = '4.2.0';
protected $_pluginName = 'Wirecard/CheckoutSeamless';

protected $_formBlockType = 'wirecard_checkoutseamless/form';
Expand Down Expand Up @@ -439,14 +439,18 @@ protected function compareAddresses($quote)
*/
protected function _isAvailablePayolution($quote)
{
$currencies = explode(',', $this->getConfigData('currencies'));
if (!in_array($quote->getQuoteCurrencyCode(), $currencies))
return false;

$dob = $quote->getCustomerDob();
//we only need to check the dob if it's set. Else we ask for dob on payment selection page.
if ($dob) {
$dobObject = new DateTime($dob);
$currentYear = date('Y');
$currentMonth = date('m');
$currentDay = date('d');
$ageCheckDate = ($currentYear - 17) . '-' . $currentMonth . '-' . $currentDay;
$ageCheckDate = ($currentYear - 18) . '-' . $currentMonth . '-' . $currentDay;
$ageCheckObject = new DateTime($ageCheckDate);
if ($ageCheckObject < $dobObject) {
//customer is younger than 18 years. Installment not available
Expand All @@ -461,10 +465,6 @@ protected function _isAvailablePayolution($quote)
if (!$this->compareAddresses($quote))
return false;

if ($quote->getQuoteCurrencyCode() != 'EUR') {
return false;
}

return parent::isAvailable($quote);
}

Expand All @@ -480,15 +480,14 @@ protected function _isAvailableRatePay($quote)
return false;

$dob = $quote->getCustomerDob();
$minAge = (int)$this->getConfigData('min_age');

//we only need to check the dob if it's set. Else we ask for dob on payment selection page.
if ($dob) {
$dobObject = new DateTime($dob);
$currentYear = date('Y');
$currentMonth = date('m');
$currentDay = date('d');
$ageCheckDate = ($currentYear - $minAge) . '-' . $currentMonth . '-' . $currentDay;
$ageCheckDate = ($currentYear - 18) . '-' . $currentMonth . '-' . $currentDay;
$ageCheckObject = new DateTime($ageCheckDate);
if ($ageCheckObject < $dobObject) {
return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,8 @@ public function autoload($class)
// rewrite class filename, avoid conflicts with installed old plugin, which resides under WirecardCEE
if (preg_match('/^WirecardCEE_/', $class)) {
if(defined('COMPILER_INCLUDE_PATH')) {
$class = str_replace('WirecardCEE', 'Wirecard_CheckoutSeamless', $class);
$classFile = COMPILER_INCLUDE_PATH . DIRECTORY_SEPARATOR . $class . '.php';
} else {
$class = str_replace('WirecardCEE', 'Wirecard' . DIRECTORY_SEPARATOR . 'CheckoutSeamless', $class);
$classFile = str_replace(' ', DIRECTORY_SEPARATOR, ucwords(str_replace('_', ' ', $class))) . '.php';
}
include $classFile;
Expand Down
43 changes: 0 additions & 43 deletions app/code/community/Wirecard/CheckoutSeamless/Model/Mpass.php

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ public function toOptionArray()
$themes = array(
array('value' => 'payolution', 'label' => 'payolution'),
array('value' => 'ratepay', 'label' => 'RatePay'),
array('value' => 'ratepay', 'label' => 'Wirecard'),
);

return $themes;
Expand Down
64 changes: 26 additions & 38 deletions app/code/community/Wirecard/CheckoutSeamless/etc/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<config>
<modules>
<wirecard_checkoutseamless>
<version>4.1.3</version>
<version>4.2.0</version>
</wirecard_checkoutseamless>
</modules>
<global>
Expand Down Expand Up @@ -169,140 +169,128 @@
<wirecard_checkoutseamless_cc>
<active>0</active>
<model>wirecard_checkoutseamless/cc</model>
<title>Wirecard Checkout Seamless Credit Card / Maestro SecureCode</title>
<title>Credit Card / Maestro SecureCode</title>
<allowspecific>0</allowspecific>
</wirecard_checkoutseamless_cc>
<wirecard_checkoutseamless_ccMoto>
<active>0</active>
<model>wirecard_checkoutseamless/ccMoto</model>
<title>Wirecard Checkout Seamless CreditCard MoTo</title>
<title>Credit Card - Mail Order / Telephone Order</title>
<allowspecific>0</allowspecific>
</wirecard_checkoutseamless_ccMoto>
<wirecard_checkoutseamless_eps>
<active>0</active>
<model>wirecard_checkoutseamless/eps</model>
<title>Wirecard Checkout Seamless eps Online Bank Transfer</title>
<title>eps Online Bank Transfer</title>
<allowspecific>0</allowspecific>
</wirecard_checkoutseamless_eps>
<wirecard_checkoutseamless_ideal>
<active>0</active>
<model>wirecard_checkoutseamless/ideal</model>
<title>Wirecard Checkout Seamless iDEAL</title>
<title>iDEAL</title>
<allowspecific>0</allowspecific>
</wirecard_checkoutseamless_ideal>
<wirecard_checkoutseamless_giropay>
<active>0</active>
<model>wirecard_checkoutseamless/giropay</model>
<title>Wirecard Checkout Seamless giropay</title>
<title>giropay</title>
<allowspecific>0</allowspecific>
</wirecard_checkoutseamless_giropay>
<wirecard_checkoutseamless_tatrapay>
<active>0</active>
<model>wirecard_checkoutseamless/tatrapay</model>
<title>Wirecard Checkout Seamless TatraPay</title>
<title>TatraPay</title>
<allowspecific>0</allowspecific>
</wirecard_checkoutseamless_tatrapay>
<wirecard_checkoutseamless_sofortbanking>
<active>0</active>
<model>wirecard_checkoutseamless/sofortbanking</model>
<title>Wirecard Checkout Seamless SOFORT Banking</title>
<title>SOFORT Banking</title>
<allowspecific>0</allowspecific>
</wirecard_checkoutseamless_sofortbanking>
<wirecard_checkoutseamless_skrilldirect>
<active>0</active>
<model>wirecard_checkoutseamless/skrilldirect</model>
<title>Wirecard Checkout Seamless Skrill Direct</title>
<allowspecific>0</allowspecific>
</wirecard_checkoutseamless_skrilldirect>
<wirecard_checkoutseamless_skrillwallet>
<active>0</active>
<model>wirecard_checkoutseamless/skrillwallet</model>
<title>Wirecard Checkout Seamless Skrill Digital Wallet</title>
<title>Skrill Digital Wallet</title>
<allowspecific>0</allowspecific>
</wirecard_checkoutseamless_skrillwallet>
<wirecard_checkoutseamless_mpass>
<active>0</active>
<model>wirecard_checkoutseamless/mpass</model>
<title>Wirecard Checkout Seamless mpass</title>
<allowspecific>0</allowspecific>
</wirecard_checkoutseamless_mpass>
<wirecard_checkoutseamless_bmc>
<active>0</active>
<model>wirecard_checkoutseamless/bmc</model>
<title>Wirecard Checkout Seamless BanContact/Mister Cash</title>
<title>Bancontact</title>
<allowspecific>0</allowspecific>
</wirecard_checkoutseamless_bmc>
<wirecard_checkoutseamless_p24>
<active>0</active>
<model>wirecard_checkoutseamless/p24</model>
<title>Wirecard Checkout Seamless Przelewy24</title>
<title>Przelewy24</title>
<allowspecific>0</allowspecific>
</wirecard_checkoutseamless_p24>
<wirecard_checkoutseamless_poli>
<active>0</active>
<model>wirecard_checkoutseamless/poli</model>
<title>Wirecard Checkout Seamless POLi</title>
<title>POLi</title>
<allowspecific>0</allowspecific>
</wirecard_checkoutseamless_poli>
<wirecard_checkoutseamless_moneta>
<active>0</active>
<model>wirecard_checkoutseamless/moneta</model>
<title>Wirecard Checkout Seamless moneta.ru</title>
<title>moneta.ru</title>
<allowspecific>0</allowspecific>
</wirecard_checkoutseamless_moneta>
<wirecard_checkoutseamless_ekonto>
<active>0</active>
<model>wirecard_checkoutseamless/ekonto</model>
<title>Wirecard Checkout Seamless eKonto</title>
<title>eKonto</title>
<allowspecific>0</allowspecific>
</wirecard_checkoutseamless_ekonto>
<wirecard_checkoutseamless_trustly>
<active>0</active>
<model>wirecard_checkoutseamless/trustly</model>
<title>Wirecard Checkout Seamless Trustly</title>
<title>Trustly</title>
<allowspecific>0</allowspecific>
</wirecard_checkoutseamless_trustly>
<wirecard_checkoutseamless_paybox>
<active>0</active>
<model>wirecard_checkoutseamless/paybox</model>
<title>Wirecard Checkout Seamless paybox</title>
<title>paybox</title>
<allowspecific>0</allowspecific>
</wirecard_checkoutseamless_paybox>
<wirecard_checkoutseamless_paysafecard>
<active>0</active>
<model>wirecard_checkoutseamless/paysafecard</model>
<title>Wirecard Checkout Seamless paysafecard</title>
<title>paysafecard</title>
<allowspecific>0</allowspecific>
</wirecard_checkoutseamless_paysafecard>
<wirecard_checkoutseamless_quick>
<active>0</active>
<model>wirecard_checkoutseamless/quick</model>
<title>Wirecard Checkout Seamless @Quick</title>
<title>@Quick</title>
<allowspecific>0</allowspecific>
</wirecard_checkoutseamless_quick>
<wirecard_checkoutseamless_paypal>
<active>0</active>
<model>wirecard_checkoutseamless/paypal</model>
<title>Wirecard Checkout Seamless PayPal</title>
<title>PayPal</title>
<allowspecific>0</allowspecific>
</wirecard_checkoutseamless_paypal>
<wirecard_checkoutseamless_epaybg>
<active>0</active>
<model>wirecard_checkoutseamless/epaybg</model>
<title>Wirecard Checkout Seamless epay.bg</title>
<title>epay.bg</title>
<allowspecific>0</allowspecific>
</wirecard_checkoutseamless_epaybg>
<wirecard_checkoutseamless_sepadd>
<active>0</active>
<model>wirecard_checkoutseamless/sepadd</model>
<title>Wirecard Checkout Seamless SEPA Direct Debit</title>
<title>SEPA Direct Debit</title>
<allowspecific>0</allowspecific>
</wirecard_checkoutseamless_sepadd>
<wirecard_checkoutseamless_invoice>
<active>0</active>
<provider>payolution</provider>
<model>wirecard_checkoutseamless/invoice</model>
<title>Wirecard Checkout Seamless Invoice</title>
<title>Invoice</title>
<allowspecific>0</allowspecific>
<min_order_total>10</min_order_total>
<max_order_total>3500</max_order_total>
Expand All @@ -312,7 +300,7 @@
<active>0</active>
<provider>payolution</provider>
<model>wirecard_checkoutseamless/invoiceb2b</model>
<title>Wirecard Checkout Seamless Invoice B2B</title>
<title>Invoice B2B</title>
<allowspecific>0</allowspecific>
<min_order_total>25</min_order_total>
<max_order_total>3500</max_order_total>
Expand All @@ -321,7 +309,7 @@
<active>0</active>
<provider>payolution</provider>
<model>wirecard_checkoutseamless/installment</model>
<title>Wirecard Checkout Seamless Installment</title>
<title>Installment</title>
<allowspecific>0</allowspecific>
<min_order_total>150</min_order_total>
<max_order_total>3500</max_order_total>
Expand All @@ -330,13 +318,13 @@
<wirecard_checkoutseamless_voucher>
<active>0</active>
<model>wirecard_checkoutseamless/voucher</model>
<title>Wirecard Checkout Seamless My Voucher</title>
<title>My Voucher</title>
<allowspecific>0</allowspecific>
</wirecard_checkoutseamless_voucher>
<wirecard_checkoutseamless_trustpay>
<active>0</active>
<model>wirecard_checkoutseamless/trustpay</model>
<title>Wirecard Checkout Seamless TrustPay</title>
<title>TrustPay</title>
<allowspecific>0</allowspecific>
</wirecard_checkoutseamless_trustpay>

Expand Down
Loading

0 comments on commit 51d4049

Please sign in to comment.