Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion Plugin/SendCustomMetadataAfterPlaceOrder.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

namespace Payplug\Payments\Plugin;

use Magento\Framework\Exception\LocalizedException;
use Magento\Framework\Exception\NoSuchEntityException;
use Magento\Quote\Api\CartManagementInterface;
use Magento\Sales\Api\OrderRepositoryInterface;
Expand Down Expand Up @@ -40,7 +41,12 @@ public function __construct(
*/
public function afterPlaceOrder(CartManagementInterface $cartManagement, int $orderId): int
{
$order = $this->orderRepository->get($orderId);
try {
$order = $this->orderRepository->get($orderId);
} catch (LocalizedException) {
return $orderId;
Comment thread
AntoineKociubaAgenceDnD marked this conversation as resolved.
}

$method = $order->getPayment()?->getMethod();

if ($this->payplugDataHelper->isCodePayplugPayment($method) === false) {
Expand Down
Loading