Skip to content

Commit

Permalink
Merge pull request #62 from wirecard/TPWDCEE-768
Browse files Browse the repository at this point in the history
Tpwdcee 768
  • Loading branch information
jpy authored Feb 9, 2018
2 parents fb97d5f + a1c9482 commit f686245
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 15 deletions.
17 changes: 10 additions & 7 deletions Frontend/WirecardCheckoutPage/Bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public function getCapabilities()
*/
public function getVersion()
{
return '1.5.9';
return '1.5.10';
}

/**
Expand Down Expand Up @@ -956,12 +956,15 @@ public function onPostDispatch(Enlight_Event_EventArgs $args)
$consumerDeviceId = md5(Shopware()->WirecardCheckoutPage()->getConfig()->customerid . "_" . $timestamp);
Shopware()->Session()->offsetSet('wcpConsumerDeviceId', $consumerDeviceId);
}
$ratepay = '<script language="JavaScript">var di = {t:"'.$consumerDeviceId.'",v:"WDWL",l:"Checkout"};</script>';
$ratepay .= '<script type="text/javascript" src="//d.ratepay.com/'.$consumerDeviceId.'/di.js"></script>';
$ratepay .= '<noscript><link rel="stylesheet" type="text/css" href="//d.ratepay.com/di.css?t='.$consumerDeviceId.'&v=WDWL&l=Checkout"></noscript>';
$ratepay .= '<object type="application/x-shockwave-flash" data="//d.ratepay.com/WDWL/c.swf" width="0" height="0"><param name="movie" value="//d.ratepay.com/WDWL/c.swf" /><param name="flashvars" value="t='.$consumerDeviceId.'&v=WDWL"/><param name="AllowScriptAccess" value="always"/></object>';
$view->wcpConsumerDeviceIdScript = $ratepay;

$paymentName = Shopware()->WirecardCheckoutPage()->getPaymentShortName();
if ((Shopware()->WirecardCheckoutPage()->getConfig()->INVOICE_PROVIDER == 'ratepay' && $paymentName == 'wcp_invoice') ||
(Shopware()->WirecardCheckoutPage()->getConfig()->INSTALLMENT_PROVIDER == 'ratepay' && $paymentName == 'wcp_installment')) {
$ratepay = '<script language="JavaScript">var di = {t:"' . $consumerDeviceId . '",v:"WDWL",l:"Checkout"};</script>';
$ratepay .= '<script type="text/javascript" src="//d.ratepay.com/' . $consumerDeviceId . '/di.js"></script>';
$ratepay .= '<noscript><link rel="stylesheet" type="text/css" href="//d.ratepay.com/di.css?t=' . $consumerDeviceId . '&v=WDWL&l=Checkout"></noscript>';
$ratepay .= '<object type="application/x-shockwave-flash" data="//d.ratepay.com/WDWL/c.swf" width="0" height="0"><param name="movie" value="//d.ratepay.com/WDWL/c.swf" /><param name="flashvars" value="t=' . $consumerDeviceId . '&v=WDWL"/><param name="AllowScriptAccess" value="always"/></object>';
$view->wcpConsumerDeviceIdScript = $ratepay;
}
if ( ! $this->isActivePayment($paymentName)) {
$controller->forward('shippingPayment');
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,18 @@
if (birthdate < limit) {
$('#wcp-birthdate').val(dateStr);
$('#wcpPayolutionAging').hide();
if ($('#wcpInvoiceTermsChecked').is(':checked')) {
$('#wcpPayolutionTermsAccept').hide();
if ($('#wcsInvoiceTermsChecked').length) {
if ($('#wcpInvoiceTermsChecked').is(':checked')) {
$('#wcpPayolutionTermsAccept').hide();
$('.is--primary').attr('disabled', false);
} else {
$('.is--primary').attr('disabled', true);
$('#wcpPayolutionTermsAccept').show();
}
} else {
$('#wcsPayolutionTermsAccept').hide();
$('.is--primary').attr('disabled', false);
}
else
{
$('.is--primary').attr('disabled', true);
$('#wcpPayolutionTermsAccept').show();
}
}
else {
$('#wcpPayolutionTermsAccept').hide();
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Wirecard Checkout Page plugin for Shopware

[![License](https://img.shields.io/badge/license-GPLv2-blue.svg)](https://raw.githubusercontent.com/wirecard/shopware-wcp/master/LICENSE)
[![Shopware](https://img.shields.io/badge/Shopware-v5.2.0--v5.3.4-green.svg)](https://www.shopware.com/)
[![Shopware](https://img.shields.io/badge/Shopware-v5.2.0--v5.4.0-green.svg)](https://www.shopware.com/)
[![PHP v7](https://img.shields.io/badge/php-v7-yellow.svg)](http://www.php.net)
[![PHP v5.6](https://img.shields.io/badge/php-v5.6-yellow.svg)](http://www.php.net)

Expand Down

0 comments on commit f686245

Please sign in to comment.