Skip to content

Commit

Permalink
UNZER-523 Fix issue with orders on return from auth
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniil Tkachev committed Nov 20, 2024
1 parent 8d66a2a commit 9b76526
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Controller/Admin/OrderMain.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
use OxidEsales\Eshop\Core\Registry;
use OxidSolutionCatalysts\Unzer\Model\Payment;
use OxidSolutionCatalysts\Unzer\Service\Payment as PaymentService;
use OxidSolutionCatalysts\Unzer\Model\Order;
use OxidEsales\Eshop\Application\Model\Order;
use OxidSolutionCatalysts\Unzer\Traits\ServiceContainer;
use UnzerSDK\Exceptions\UnzerApiException;

Expand Down
3 changes: 2 additions & 1 deletion src/Controller/DispatcherController.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@

use JsonException;
use OxidEsales\Eshop\Application\Controller\FrontendController;
use OxidEsales\Eshop\Application\Model\Order;
use OxidEsales\Eshop\Core\Registry;
use OxidSolutionCatalysts\Unzer\Model\Order;

use OxidSolutionCatalysts\Unzer\Traits\Request;
use OxidSolutionCatalysts\Unzer\Model\TmpOrder;
use OxidSolutionCatalysts\Unzer\Service\Transaction;
Expand Down
5 changes: 3 additions & 2 deletions src/Service/Transaction.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
use JsonException;
use OxidEsales\Eshop\Application\Model\User;
use OxidSolutionCatalysts\Unzer\Exception\UnzerException;
use OxidSolutionCatalysts\Unzer\Model\Order;
use OxidEsales\Eshop\Application\Model\Order;
use OxidSolutionCatalysts\Unzer\Traits\Request;
use OxidSolutionCatalysts\Unzer\Traits\ServiceContainer;
use OxidEsales\Eshop\Core\DatabaseProvider;
Expand Down Expand Up @@ -234,7 +234,8 @@ protected function saveTransaction(array $params): bool

$oxid = $this->prepareTransactionOxid($params);

if (!$transaction->load($oxid) && $this->canSaveTransaction($transaction, $params)) {
// if (!$transaction->load($oxid) && $this->canSaveTransaction($transaction, $params)) {
if (!$transaction->load($oxid)) {
$transaction->assign($params);
$transaction->setId($oxid);
$transaction->save();
Expand Down

0 comments on commit 9b76526

Please sign in to comment.