mirror of
https://github.com/anikeen-com/id.git
synced 2026-11-02 21:59:33 +00:00
Orders and subscriptions created by untrusted apps are confirmed by the user on Anikeen ID. confirmationUrl($returnUrl) on Order and Subscription builds the link with the return URL; checking out such a draft throws ConfirmationRequiredException carrying the same URL. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
18 lines
511 B
PHP
18 lines
511 B
PHP
<?php
|
|
|
|
namespace Anikeen\Id\Exceptions;
|
|
|
|
use Throwable;
|
|
|
|
/**
|
|
* Thrown when a third-party app tries to check out an order or subscription itself: the user has
|
|
* to confirm it on Anikeen ID. Send them to the confirmation URL instead.
|
|
*/
|
|
class ConfirmationRequiredException extends ResourceException
|
|
{
|
|
public function __construct(string $message, int $code, public readonly ?string $confirmationUrl = null, ?Throwable $previous = null)
|
|
{
|
|
parent::__construct($message, $code, $previous);
|
|
}
|
|
}
|