@@ 998-1009 (lines=12) @@ | ||
995 | $this->plugin->savePayment($this->plugin->getPayment()->getId()); |
|
996 | Shopware()->Session()->sOrderVariables['sUserData'] = $this->getUserData(); |
|
997 | ||
998 | if ($order['status'] == 'checkout_complete') { |
|
999 | $this->plugin->klarnaLog("Entering Shopware_Controllers_Frontend_PaymentKlarna::returnAction: checkout_complete. Save oder if session values match.",3); |
|
1000 | if (Shopware()->Session()->offsetGet('KlarnaTransactionId') == null){ |
|
1001 | $this->plugin->klarnaLog("Entering Shopware_Controllers_Frontend_PaymentKlarna::returnAction: Session matches. Order will be saved",3); |
|
1002 | Shopware()->Session()->offsetSet('KlarnaTransactionId', $transactionId ); |
|
1003 | $orderNumber = $this->saveOrder( |
|
1004 | $order['reservation'], |
|
1005 | $order['reference'] |
|
1006 | ); |
|
1007 | Shopware()->Session()->offsetSet('KlarnaTransactionId', null ); |
|
1008 | } |
|
1009 | } |
|
1010 | ||
1011 | ||
1012 | if (empty($orderNumber) && !empty($order['merchant_reference']['orderid1'])) { |
|
@@ 1286-1297 (lines=12) @@ | ||
1283 | $this->plugin->savePayment($this->plugin->getPayment()->getId()); |
|
1284 | Shopware()->Session()->sOrderVariables['sUserData'] = $this->getUserData(); |
|
1285 | ||
1286 | if ($order['status'] == 'checkout_complete') { |
|
1287 | $this->plugin->klarnaLog("Entering Shopware_Controllers_Frontend_PaymentKlarna::returnAction: checkout_complete. Save oder if session values match.",3); |
|
1288 | if (Shopware()->Session()->offsetGet('KlarnaTransactionId') == null){ |
|
1289 | $this->plugin->klarnaLog("Entering Shopware_Controllers_Frontend_PaymentKlarna::returnAction: Session matches. Order will be saved",3); |
|
1290 | Shopware()->Session()->offsetSet('KlarnaTransactionId', $transactionId ); |
|
1291 | $orderNumber = $this->saveOrder( |
|
1292 | $order['reservation'], |
|
1293 | $order['reference'] |
|
1294 | ); |
|
1295 | Shopware()->Session()->offsetSet('KlarnaTransactionId', null ); |
|
1296 | } |
|
1297 | } |
|
1298 | ||
1299 | if (empty($orderNumber) && !empty($order['merchant_reference']['orderid1'])) { |
|
1300 | $orderNumber = $order['merchant_reference']['orderid1']; |