Skip to content

Commit

Permalink
Merge pull request #34 from wirecard/TPWDCEE-681
Browse files Browse the repository at this point in the history
Tpwdcee 681
  • Loading branch information
tomazpu committed Feb 9, 2018
2 parents 4fbfd4e + c61ed64 commit 602723b
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,5 @@ public function getCustomerDobDay()
return $this->getCustomerDobPart('dd');
}


}
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,5 @@ public function getCustomerDobMonth() {
public function getCustomerDobDay() {
return $this->getCustomerDobPart('dd');
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,25 @@ public function getDataStorageUrl()
return $this->_dataStorageUrl;
}

public function isRatepayPaymentProvider()
{
$installment = new Wirecard_CheckoutSeamless_Model_Installment();
$invoice = new Wirecard_CheckoutSeamless_Model_Invoice();

$payments = Mage::getSingleton('payment/config')->getActiveMethods();
$methods = array(array('value'=>'', 'label'=>Mage::helper('adminhtml')->__('--Please Select--')));

foreach ($payments as $paymentCode=>$paymentModel) {
$methods[] = $paymentCode;
}

$installment_active = in_array('wirecard_checkoutpage_installment', $methods);
$invoice_active = in_array('wirecard_checkoutpage_invoice', $methods);


return (($installment->getConfigData('provider') == "ratepay" && $installment_active) || ($invoice->getConfigData('provider') == "ratepay" && $invoice_active));
}

public function getConsumerDeviceId() {
$session = Mage::getModel('customer/session');

Expand Down
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.2.5';
protected $_pluginVersion = '4.2.6';
protected $_pluginName = 'Wirecard/CheckoutSeamless';

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<config>
<modules>
<Wirecard_CheckoutSeamless>
<version>4.2.5</version>
<version>4.2.6</version>
</Wirecard_CheckoutSeamless>
</modules>
<global>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
</div>
</div>

<?php if (strlen($this->getConsumerDeviceId())) { ?>
<?php if (strlen($this->getConsumerDeviceId()) && $this->isRatepayPaymentProvider()) { ?>
<!-- wirecard checkout seamless device id script -->
<script language="JavaScript">
var di = {t:'<?php echo $this->getConsumerDeviceId(); ?>',v:'WDWL',l:'Checkout'};
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "wirecard/magento-wcs",
"license": "GPL-2.0",
"license": "GPL-2.0-only",
"type": "magento-module",
"description": "Wirecard Checkout Seamless extension for Magento",
"keywords": ["wirecard", "checkout", "seamless", "payment", "pci-dss", "saq-a", "saq-a-ep", "magento"],
Expand Down

0 comments on commit 602723b

Please sign in to comment.