Skip to content

Commit

Permalink
#27 Update when ratepay script is loaded
Browse files Browse the repository at this point in the history
  • Loading branch information
tomazpu committed Feb 7, 2018
1 parent 12dee89 commit 99e59aa
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion wirecardceecheckoutseamless/wirecardceecheckoutseamless.php
Original file line number Diff line number Diff line change
Expand Up @@ -1910,7 +1910,10 @@ public function hookPaymentOptions($params)
if (!isset($this->context->cookie->wcsConsumerDeviceId)) {
$this->context->cookie->wcsConsumerDeviceId = $consumerDeviceId;
}
echo "<script language='JavaScript'>

if ((Configuration::get('WCS_PT_INVOICE_PROVIDER') == 'ratepay' && (bool)Configuration::get('WCS_PT_INVOICE')) ||
(Configuration::get('WCS_PT_INSTALLMENT_PROVIDER') == 'ratepay' && (bool)Configuration::get('WCS_PT_INSTALLMENT'))) {
echo "<script language='JavaScript'>
var di = {t:'" . $this->context->cookie->wcsConsumerDeviceId . "',v:'WDWL',l:'Checkout'};
</script>
<script type='text/javascript' src='//d.ratepay.com/" . $this->context->cookie->wcsConsumerDeviceId . "/di.js'></script>
Expand All @@ -1922,6 +1925,7 @@ public function hookPaymentOptions($params)
<param name='flashvars' value='t=" . $this->context->cookie->wcsConsumerDeviceId . "&v=WDWL'/>
<param name='AllowScriptAccess' value='always'/>
</object>";
}

$paymentTypes = $this->getEnabledPaymentTypes($params['cart']);

Expand Down

0 comments on commit 99e59aa

Please sign in to comment.