public function CreatePaymentTest::dataProviderCreatePayment in Commerce Stripe 8
Data provider for the create payment test.
Return value
\Generator The test data.
File
- tests/
src/ Kernel/ CreatePaymentTest.php, line 99
Class
- CreatePaymentTest
- Tests creating a payment.
Namespace
Drupal\Tests\commerce_stripe\KernelCode
public function dataProviderCreatePayment() {
// 3DS 2 authentication must be completed for the payment to be successful.
(yield [
'pm_card_threeDSecure2Required',
TRUE,
PaymentIntent::STATUS_REQUIRES_ACTION,
]);
(yield [
'pm_card_threeDSecure2Required',
FALSE,
PaymentIntent::STATUS_REQUIRES_ACTION,
]);
// 3DS authentication may still be performed, but is not required.
(yield [
'pm_card_threeDSecureOptional',
TRUE,
PaymentIntent::STATUS_SUCCEEDED,
]);
// 3DS is supported for this card, but this card is not enrolled in 3D Secure
(yield [
'pm_card_visa',
TRUE,
PaymentIntent::STATUS_SUCCEEDED,
]);
// 3DS is not supported on this card and cannot be invoked.
(yield [
'pm_card_amex_threeDSecureNotSupported',
TRUE,
PaymentIntent::STATUS_SUCCEEDED,
]);
}