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