Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
| SetupIntentData | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
| __construct | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | namespace App\Domain\Stripe\Data; |
| 6 | |
| 7 | /** |
| 8 | * Domain wrapper for a Stripe SetupIntent. |
| 9 | * |
| 10 | * The frontend uses {@see $clientSecret} to confirm the SetupIntent against |
| 11 | * Stripe.js — that's the moment the user's card details are exchanged for a |
| 12 | * PaymentMethod ID attached to the customer. FlowState never sees the card |
| 13 | * data; only the eventual PaymentMethod ID, retrieved later by listing. |
| 14 | */ |
| 15 | final readonly class SetupIntentData |
| 16 | { |
| 17 | public function __construct( |
| 18 | public string $id, |
| 19 | public string $clientSecret, |
| 20 | public string $status, |
| 21 | ) {} |
| 22 | } |