7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
|
# File 'lib/stripe_mock/failures.rb', line 7
def card_failures
{
incorrect_number: {
message: "Your card number is incorrect.",
code: 'incorrect_number',
param: 'number',
type: 'card_error'
},
invalid_number: {
message: "This card number looks invalid.",
code: 'invalid_number',
param: 'number',
type: 'card_error'
},
invalid_expiry_month: {
message: "Your card's expiration month is invalid.",
code: 'invalid_expiry_month',
param: 'exp_month',
type: 'card_error'
},
invalid_expiry_year: {
message: "Your card's expiration year is invalid.",
code: 'invalid_expiry_year',
param: 'exp_year',
type: 'card_error'
},
invalid_cvc: {
message: "Your card's security code is invalid.",
code: 'invalid_cvc',
param: 'cvc',
type: 'card_error'
},
expired_card_month: {
message: "Your card's expiration month is invalid.",
code: 'invalid_expiry_month',
param: 'exp_month',
type: 'card_error'
},
expired_card_year: {
message: "Your card's expiration year is invalid.",
code: 'invalid_expiry_year',
param: 'exp_year',
type: 'card_error'
},
incorrect_cvc: {
message: "Your card's security code is incorrect.",
code: 'incorrect_cvc',
param: 'cvc',
type: 'card_error',
charge: 'ch_xxx'
},
incorrect_zip: {
message: "The zip code you supplied failed validation.",
code: 'incorrect_zip',
param: 'address_zip',
type: 'card_error',
charge: 'ch_xxx'
},
card_declined: {
message: "Your card was declined.",
code: 'card_declined',
type: 'card_error',
charge: 'ch_xxx'
},
missing: {
message: "Cannot charge a customer that has no active card",
code: 'missing',
param: 'card',
type: 'card_error'
},
processing_error: {
message: "An error occurred while processing your card. Try again in a little bit.",
code: 'processing_error',
type: 'card_error',
charge: 'ch_xxx'
}
}
end
|