File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -429,6 +429,7 @@ func TestPaymentCreate(t *testing.T) {
429
429
t .Run ("PaymentIntent" , func (t * testing.T ) {
430
430
stripeCardSimple := "payment-method-simple"
431
431
stripeCardSCA := "payment-method-sca"
432
+ stripeClientSecret := "payment-intent-secret"
432
433
433
434
tests := map [string ]string {
434
435
"AutomaticConfirm" : stripeCardSimple ,
@@ -462,6 +463,7 @@ func TestPaymentCreate(t *testing.T) {
462
463
intent .Status = stripe .PaymentIntentStatusSucceeded
463
464
case stripeCardSCA :
464
465
intent .Status = stripe .PaymentIntentStatusRequiresAction
466
+ intent .ClientSecret = stripeClientSecret
465
467
default :
466
468
t .Errorf ("unknown payment method: %s" , pm )
467
469
}
@@ -505,6 +507,9 @@ func TestPaymentCreate(t *testing.T) {
505
507
}
506
508
assert .Equal (t , expectedStatus , trans .Status )
507
509
assert .Equal (t , stripePaymentIntentID , trans .ProcessorID )
510
+ if expectedStatus == models .PendingState {
511
+ assert .Equal (t , trans .ProviderMetadata ["payment_intent_secret" ], stripeClientSecret )
512
+ }
508
513
assert .Equal (t , 1 , callCount )
509
514
510
515
order := & models.Order {}
You can’t perform that action at this time.
0 commit comments