Skip to content

Commit

Permalink
Merge pull request #156 from vippsas/2.4.41
Browse files Browse the repository at this point in the history
Release new version 2.4.41
  • Loading branch information
voleye authored Jan 12, 2023
2 parents eddfffc + ad6dc3e commit b13224d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 14 deletions.
17 changes: 4 additions & 13 deletions Gateway/Command/CommandManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,19 +58,10 @@ public function __construct(
*/
public function initiatePayment(InfoInterface $payment, $arguments)
{
try {
return $this->executeByCode('initiate', $payment, $arguments);
} catch (\Exception $e) {
if ($payment instanceof QuotePayment) {
// process error "orderId is already in used and must be unique"
if ((int)$e->getCode() === 34) {
$quote = $payment->getQuote();
$quote->setReservedOrderId(null);

return $this->executeByCode('initiate', $payment, $arguments);
}
}
}
$quote = $payment->getQuote();
$quote->setReservedOrderId(null);

return $this->executeByCode('initiate', $payment, $arguments);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion etc/module.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
~ IN THE SOFTWARE.
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
<module name="Vipps_Payment" setup_version="2.4.40">
<module name="Vipps_Payment" setup_version="2.4.41">
<sequence>
<module name="Magento_Sales" />
<module name="Magento_Payment" />
Expand Down

0 comments on commit b13224d

Please sign in to comment.