Skip to content

Commit

Permalink
Merge pull request #84 from wirecard/shopware557-compat
Browse files Browse the repository at this point in the history
Shopware 5.5.7 compat
  • Loading branch information
rinnhofer authored Mar 18, 2019
2 parents 0a29b48 + 5fa5205 commit 40a1102
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
3 changes: 2 additions & 1 deletion Frontend/WirecardCheckoutSeamless/Bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public function getCapabilities()
*/
public function getVersion()
{
return '1.10.14';
return '1.10.15';
}

/**
Expand Down Expand Up @@ -1162,6 +1162,7 @@ public function onPostDispatch(Enlight_Event_EventArgs $args)
$view->bMonth = $birthday[1];
$view->bDay = $birthday[2];

$view->payolutionTerms = false;
if ((Shopware()->WirecardCheckoutSeamless()->Config()->INVOICE_PROVIDER == 'payolution' && $view->paymentTypeName == 'invoice') ||
(Shopware()->WirecardCheckoutSeamless()->Config()->INSTALLMENT_PROVIDER == 'payolution' && $view->paymentTypeName == 'installment')) {
$view->payolutionTerms = Shopware()->WirecardCheckoutSeamless()->Config()->PAYOLUTION_TERMS;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,7 @@ public function saveOrderAction()
$confirmUrl = $router->assemble(
array(
'action' => 'confirm',
'forceSecure' => true,
'appendSession' => true
'forceSecure' => true
)
);

Expand Down Expand Up @@ -326,7 +325,6 @@ public function confirmAction()

Shopware()->Session()->offsetSet('sPaymentstate', 'success');

$orderNumber = 0;
// pending url, we already have an order id, just update the payment state
if ($data['orderId']) {
$this->saveOrder(
Expand Down Expand Up @@ -530,13 +528,13 @@ public function confirmAction()
$message = $error->getConsumerMessage();
}

$update['session'] = '';
}
break;
default:
}

$update['data'] = serialize($post);
$update['session'] = base64_encode(serialize($_SESSION)); // save back ev. modified sessiondata

Shopware()->Db()->update(
'wirecard_checkout_seamless',
Expand Down Expand Up @@ -571,6 +569,13 @@ public function returnAction()
$this->View()->redirectUrl = $this->Front()->Router()->assemble(Array('controller' => 'checkout', 'action' => 'confirm', 'sUseSSL' => true));

$responseData = unserialize($result['data']);

// write back modified sessiondata, might be modified by the confirm (server2server) request
$savedSessionData = unserialize(base64_decode($result['session']));
if (is_array($savedSessionData) && isset($savedSessionData['Shopware'])) {
Shopware()->Session()->offsetSet('sOrderVariables', $savedSessionData['Shopware']['sOrderVariables']);
}

try {

$return = WirecardCEE_QMore_ReturnFactory::getInstance(
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 Seamless plugin for Shopware

[![License](https://img.shields.io/badge/license-GPLv2-blue.svg)](https://raw.githubusercontent.com/wirecard/Shopware-WCS/master/LICENSE)
[![Shopware](https://img.shields.io/badge/Shopware-v5.5.6-green.svg)](https://www.shopware.com/)
[![Shopware](https://img.shields.io/badge/Shopware-v5.5.7-green.svg)](https://www.shopware.com/)
[![PHP v7.1](https://img.shields.io/badge/php-v7.1-yellow.svg)](http://www.php.net)
[![PHP v7.0](https://img.shields.io/badge/php-v7.0-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 40a1102

Please sign in to comment.