@@ 1018-1037 (lines=20) @@ | ||
1015 | $this->plugin->savePayment($this->plugin->getPayment()->getId()); |
|
1016 | Shopware()->Session()->sOrderVariables['sUserData'] = $this->getUserData(); |
|
1017 | ||
1018 | if ($order['status'] == 'checkout_complete') { |
|
1019 | $this->plugin->klarnaLog( |
|
1020 | "Entering Shopware_Controllers_Frontend_PaymentKlarna::returnAction: " . |
|
1021 | "checkout_complete. Save oder if session values match.", |
|
1022 | 3 |
|
1023 | ); |
|
1024 | if (Shopware()->Session()->offsetGet('KlarnaTransactionId') == null) { |
|
1025 | $this->plugin->klarnaLog( |
|
1026 | "Entering Shopware_Controllers_Frontend_PaymentKlarna::returnAction: " . |
|
1027 | "Session matches. Order will be saved", |
|
1028 | 3 |
|
1029 | ); |
|
1030 | Shopware()->Session()->offsetSet('KlarnaTransactionId', $transactionId); |
|
1031 | $orderNumber = $this->saveOrder( |
|
1032 | $order['reservation'], |
|
1033 | $order['reference'] |
|
1034 | ); |
|
1035 | Shopware()->Session()->offsetSet('KlarnaTransactionId', null); |
|
1036 | } |
|
1037 | } |
|
1038 | ||
1039 | ||
1040 | if (empty($orderNumber) && !empty($order['merchant_reference']['orderid1'])) { |
|
@@ 1349-1368 (lines=20) @@ | ||
1346 | $this->plugin->savePayment($this->plugin->getPayment()->getId()); |
|
1347 | Shopware()->Session()->sOrderVariables['sUserData'] = $this->getUserData(); |
|
1348 | ||
1349 | if ($order['status'] == 'checkout_complete') { |
|
1350 | $this->plugin->klarnaLog( |
|
1351 | "Entering Shopware_Controllers_Frontend_PaymentKlarna::returnAction: " . |
|
1352 | "checkout_complete. Save oder if session values match.", |
|
1353 | 3 |
|
1354 | ); |
|
1355 | if (Shopware()->Session()->offsetGet('KlarnaTransactionId') == null) { |
|
1356 | $this->plugin->klarnaLog( |
|
1357 | "Entering Shopware_Controllers_Frontend_PaymentKlarna::returnAction: " . |
|
1358 | "Session matches. Order will be saved", |
|
1359 | 3 |
|
1360 | ); |
|
1361 | Shopware()->Session()->offsetSet('KlarnaTransactionId', $transactionId); |
|
1362 | $orderNumber = $this->saveOrder( |
|
1363 | $order['reservation'], |
|
1364 | $order['reference'] |
|
1365 | ); |
|
1366 | Shopware()->Session()->offsetSet('KlarnaTransactionId', null); |
|
1367 | } |
|
1368 | } |
|
1369 | ||
1370 | if (empty($orderNumber) && !empty($order['merchant_reference']['orderid1'])) { |
|
1371 | $orderNumber = $order['merchant_reference']['orderid1']; |