2026-08-31 12:50:29 +03:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace Modules\Core\Payment\Exceptions;
|
|
|
|
|
|
|
|
|
|
use RuntimeException;
|
|
|
|
|
use Throwable;
|
|
|
|
|
|
|
|
|
|
/**
|
2026-09-02 16:14:52 +03:00
|
|
|
* Thrown by a Modules\Core\Payment\Contracts\PaymentDriver when the
|
2026-08-31 12:50:29 +03:00
|
|
|
* gateway has not confirmed payment — wrong/expired intent, already
|
|
|
|
|
* processed, or the gateway itself rejects the confirmation. A driver
|
|
|
|
|
* throws this instead of silently placing the order: CheckoutService::
|
|
|
|
|
* placeOrder() must only ever be called once a driver has positively
|
|
|
|
|
* confirmed payment, never as a fallback.
|
|
|
|
|
*/
|
|
|
|
|
class PaymentNotConfirmedException extends RuntimeException
|
|
|
|
|
{
|
|
|
|
|
public function __construct(string $message, ?Throwable $previous = null)
|
|
|
|
|
{
|
|
|
|
|
parent::__construct($message, previous: $previous);
|
|
|
|
|
}
|
|
|
|
|
}
|