mirror of
https://github.com/anikeen-com/id.git
synced 2026-11-02 21:59:33 +00:00
Support third-party checkout confirmation
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>
This commit is contained in:
1 parent
0fce38f48a
commit
f20a12e6da
8 files changed
+174
No files matched your search
@@ -3,6 +3,7 @@
|
||||
namespace Anikeen\Id\Resources;
|
||||
|
||||
use Anikeen\Id\Concerns\HasBillable;
|
||||
use Anikeen\Id\Concerns\HasConfirmationUrl;
|
||||
use Anikeen\Id\Contracts\AppTokenRepository;
|
||||
use Throwable;
|
||||
|
||||
@@ -17,10 +18,12 @@ use Throwable;
|
||||
* @property string $ends_at
|
||||
* @property string $webhook_url
|
||||
* @property string $webhook_secret
|
||||
* @property null|string $confirmation_url where the user confirms it (third-party apps)
|
||||
*/
|
||||
class Subscription extends BaseResource
|
||||
{
|
||||
use HasBillable;
|
||||
use HasConfirmationUrl;
|
||||
|
||||
/**
|
||||
* Update a given subscription from the current user.
|
||||
|
||||
Reference in new issue
Block a user