Skip to content
This repository was archived by the owner on Feb 27, 2023. It is now read-only.

Commit a672e61

Browse files
committed
Use existing test PaymentMethods directly instead of creating new ones
1 parent 84482f8 commit a672e61

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

web.rb

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -104,18 +104,9 @@ def authenticate!
104104
)
105105
# Attach some test cards to the customer for testing convenience.
106106
# See https://stripe.com/docs/testing#cards
107-
['4000000000003220', '4242424242424242'].each { |number|
108-
paymentMethod = Stripe::PaymentMethod.create({
109-
type: 'card',
110-
card: {
111-
number: number,
112-
exp_month: 5,
113-
exp_year: 2023,
114-
cvc: '000',
115-
},
116-
})
107+
['pm_card_threeDSecure2Required', 'pm_card_visa'].each { |pm_id|
117108
Stripe::PaymentMethod.attach(
118-
paymentMethod.id,
109+
pm_id,
119110
{
120111
customer: @customer.id,
121112
}

0 commit comments

Comments
 (0)