So am using laravel 11. After user places an order and redirected to paynow then choose a payment method. So user chose ecocash and paid. on the frontend on paynow am getting an error on your website attached, then if payment fails i have that page attached to show that payment wasnt successful. If payment is successfull its supposed to upload the order details to my details but am only getting success message on my email.
Your resulturl needs to be accessible by Paynow’s servers, so if the URL you supply there is private / firewalled / not publicly accessible, then you wont get a notification from Paynow on it.
Ref
So my resulturl [ public function result(Request $request) ] is public and in my web.php its not inside any middleware so i dont think thats the reason. The same function is responsible for sending data to my database if status is marked success from you. My return url is working because when the payment fails its showing the failed view below >
public function return(Request $request)
{
try {
return redirect()->route(‘cart.order.confirmation’)->with(‘success’, ‘You will receive an email confirmation shortly.’);
} catch (\Exception $e) {
// Redirect to a safe fallback in case of issues
return redirect()->route(‘cart.order.failed’)->with(‘error’, ‘An error occurred. Please contact support.’);
}
}
Yes, its a live url and returning 200. After payment your guys confirmed the payment went through but before returning to my site you are giving me an error attached above .