Save Stripe payment details on order confirmation, add arrive early tip
- Retrieve PaymentIntent on success redirect, save payment_method, card_brand, card_last4 - Display payment info on /ma-commande page (card type + last 4 digits) - Add "Il est recommande d'arriver en avance" to practical info on ticket PDF - Migration for payment_method, card_brand, card_last4 columns Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -24,6 +24,9 @@ class BilletBuyerTest extends TestCase
|
||||
self::assertSame(0.0, $buyer->getTotalHTDecimal());
|
||||
self::assertSame(BilletBuyer::STATUS_PENDING, $buyer->getStatus());
|
||||
self::assertNull($buyer->getStripeSessionId());
|
||||
self::assertNull($buyer->getPaymentMethod());
|
||||
self::assertNull($buyer->getCardBrand());
|
||||
self::assertNull($buyer->getCardLast4());
|
||||
self::assertNull($buyer->getPaidAt());
|
||||
self::assertMatchesRegularExpression('/^ETICKET-[A-Z0-9]{4}-[A-Z0-9]{4}-[A-Z0-9]{4}$/', $buyer->getReference());
|
||||
self::assertSame(32, \strlen($buyer->getAccessToken()));
|
||||
@@ -94,6 +97,18 @@ class BilletBuyerTest extends TestCase
|
||||
self::assertSame($buyer, $result);
|
||||
}
|
||||
|
||||
public function testSetAndGetPaymentDetails(): void
|
||||
{
|
||||
$buyer = new BilletBuyer();
|
||||
$buyer->setPaymentMethod('card');
|
||||
$buyer->setCardBrand('visa');
|
||||
$buyer->setCardLast4('4242');
|
||||
|
||||
self::assertSame('card', $buyer->getPaymentMethod());
|
||||
self::assertSame('visa', $buyer->getCardBrand());
|
||||
self::assertSame('4242', $buyer->getCardLast4());
|
||||
}
|
||||
|
||||
public function testSetAndGetPaidAt(): void
|
||||
{
|
||||
$buyer = new BilletBuyer();
|
||||
|
||||
Reference in New Issue
Block a user