cancel
Showing results for 
Search instead for 
Did you mean: 

Magento2.4- Order does not register as paid after making payment with payment gateway

Magento2.4- Order does not register as paid after making payment with payment gateway

I'm using one of the payment gateways. It's called Urway/one97.

When the customer makes a payment with the payment gateway not register as paid + the order status changes to Complete.

I sent the problem to the Support Team but I got no solution.

How can I solve the issue? Why is that happening?

1 REPLY 1

Re: Magento2.4- Order does not register as paid after making payment with payment gateway

You can use events to change order status again after the order is created
You can try the event: checkout_submit_all_after
For example, in events.xml

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">
<event name="checkout_submit_all_after">
<observer name="yourcompany_yourmodule_checkout_submit_all_after" instance="YourCompany\YourModule\Observer\ProcessOrder" />
</event>
</config>

And in the observer

public function execute(\Magento\Framework\Event\Observer $observer)
{
$order = $observer->getOrder();
$quote = $observer->getQuote();
// Do whatever you want here
return $this;
}
If issue solved, Click Kudos & Accept as Solution.
LitCommerce - The Most Simple & Affordable Multi-channel Selling Tool