@@ 964-975 (lines=12) @@ | ||
961 | $this->plugin->savePayment($this->plugin->getPayment()->getId()); |
|
962 | Shopware()->Session()->sOrderVariables['sUserData'] = $this->getUserData(); |
|
963 | ||
964 | if ($order['status'] == 'checkout_complete') { |
|
965 | $this->plugin->klarnaLog("Entering Shopware_Controllers_Frontend_PaymentKlarna::returnAction: checkout_complete. Save oder if session values match.",3); |
|
966 | if (Shopware()->Session()->offsetGet('KlarnaTransactionId') == null){ |
|
967 | $this->plugin->klarnaLog("Entering Shopware_Controllers_Frontend_PaymentKlarna::returnAction: Session matches. Order will be saved",3); |
|
968 | Shopware()->Session()->offsetSet('KlarnaTransactionId', $transactionId ); |
|
969 | $orderNumber = $this->saveOrder( |
|
970 | $order['reservation'], |
|
971 | $order['reference'] |
|
972 | ); |
|
973 | Shopware()->Session()->offsetSet('KlarnaTransactionId', null ); |
|
974 | } |
|
975 | } |
|
976 | ||
977 | ||
978 | if (empty($orderNumber) && !empty($order['merchant_reference']['orderid1'])) { |
|
@@ 1250-1261 (lines=12) @@ | ||
1247 | $this->plugin->savePayment($this->plugin->getPayment()->getId()); |
|
1248 | Shopware()->Session()->sOrderVariables['sUserData'] = $this->getUserData(); |
|
1249 | ||
1250 | if ($order['status'] == 'checkout_complete') { |
|
1251 | $this->plugin->klarnaLog("Entering Shopware_Controllers_Frontend_PaymentKlarna::returnAction: checkout_complete. Save oder if session values match.",3); |
|
1252 | if (Shopware()->Session()->offsetGet('KlarnaTransactionId') == null){ |
|
1253 | $this->plugin->klarnaLog("Entering Shopware_Controllers_Frontend_PaymentKlarna::returnAction: Session matches. Order will be saved",3); |
|
1254 | Shopware()->Session()->offsetSet('KlarnaTransactionId', $transactionId ); |
|
1255 | $orderNumber = $this->saveOrder( |
|
1256 | $order['reservation'], |
|
1257 | $order['reference'] |
|
1258 | ); |
|
1259 | Shopware()->Session()->offsetSet('KlarnaTransactionId', null ); |
|
1260 | } |
|
1261 | } |
|
1262 | ||
1263 | if (empty($orderNumber) && !empty($order['merchant_reference']['orderid1'])) { |
|
1264 | $orderNumber = $order['merchant_reference']['orderid1']; |