Skip to content

Magento 2.4.5 after place order success page with customization

Hello I have created one observer after the order is placed (sales_model_service_quote_submit_success) order data need to synch with some third-party system it is working fine order is synched to the system some time if any error from thirdpary system order success page not showing it redirecting to cart but order present in admin pannel i have placed any die like this code having any idea why it redirecting

$resp = json_decode($response);
                $logger->info('ideal reposnse.=' . print_r($resp, true));
                if (isset($resp->Response) && $resp->Response == "Import Complete") 

{