line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
##---------------------------------------------------------------------------- |
2
|
|
|
|
|
|
|
## Stripe API - ~/lib/Net/API/Stripe/Charge/Outcome.pm |
3
|
|
|
|
|
|
|
## Version v0.100.0 |
4
|
|
|
|
|
|
|
## Copyright(c) 2019 DEGUEST Pte. Ltd. |
5
|
|
|
|
|
|
|
## Author: Jacques Deguest <jack@deguest.jp> |
6
|
|
|
|
|
|
|
## Created 2019/11/02 |
7
|
|
|
|
|
|
|
## Modified 2020/05/15 |
8
|
|
|
|
|
|
|
## |
9
|
|
|
|
|
|
|
##---------------------------------------------------------------------------- |
10
|
|
|
|
|
|
|
BEGIN |
11
|
|
|
|
|
|
|
{ |
12
|
|
|
|
|
|
|
use strict; |
13
|
2
|
|
|
2
|
|
24366583
|
use warnings; |
|
2
|
|
|
|
|
18
|
|
|
2
|
|
|
|
|
59
|
|
14
|
2
|
|
|
2
|
|
12
|
use parent qw( Net::API::Stripe::Generic ); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
58
|
|
15
|
2
|
|
|
2
|
|
10
|
use vars qw( $VERSION ); |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
11
|
|
16
|
2
|
|
|
2
|
|
140
|
our( $VERSION ) = 'v0.100.0'; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
118
|
|
17
|
2
|
|
|
2
|
|
39
|
}; |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
use strict; |
20
|
2
|
|
|
2
|
|
12
|
use warnings; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
43
|
|
21
|
2
|
|
|
2
|
|
10
|
|
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
355
|
|
22
|
|
|
|
|
|
|
|
23
|
0
|
|
|
0
|
1
|
|
|
24
|
|
|
|
|
|
|
|
25
|
0
|
|
|
0
|
1
|
|
|
26
|
|
|
|
|
|
|
|
27
|
0
|
|
|
0
|
1
|
|
|
28
|
|
|
|
|
|
|
|
29
|
0
|
|
|
0
|
1
|
|
1; |
30
|
|
|
|
|
|
|
|
31
|
0
|
|
|
0
|
1
|
|
|
32
|
|
|
|
|
|
|
=encoding utf8 |
33
|
0
|
|
|
0
|
1
|
|
|
34
|
|
|
|
|
|
|
=head1 NAME |
35
|
0
|
|
|
0
|
1
|
|
|
36
|
|
|
|
|
|
|
Net::API::Stripe::Charge::Outcome - A Stripe Charge Outcome Object |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
=head1 SYNOPSIS |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
my $outcome = $stripe->charge->outcome({ |
41
|
|
|
|
|
|
|
network_status => 'approved_by_network', |
42
|
|
|
|
|
|
|
reason => undef, |
43
|
|
|
|
|
|
|
risk_level => 'normal', |
44
|
|
|
|
|
|
|
risk_score => 0, |
45
|
|
|
|
|
|
|
rule => undef, |
46
|
|
|
|
|
|
|
seller_message => undef, |
47
|
|
|
|
|
|
|
type => 'authorized', |
48
|
|
|
|
|
|
|
}); |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=head1 VERSION |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
v0.100.0 |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=head1 DESCRIPTION |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
Details about whether the payment was accepted, and why. See understanding declines for details. |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=head1 CONSTRUCTOR |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=head2 new( %ARG ) |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
Creates a new L<Net::API::Stripe::Charge::Outcome> object. |
63
|
|
|
|
|
|
|
It may also take an hash like arguments, that also are method of the same name. |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
=head1 METHODS |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
=head2 network_status string |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
Possible values are approved_by_network, declined_by_network, not_sent_to_network, and reversed_after_approval. The value reversed_after_approval indicates the payment was blocked by Stripe after bank authorization, and may temporarily appear as “pending” on a cardholder’s statement. |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
=head2 reason string |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
An enumerated value providing a more detailed explanation of the outcome’s type. Charges blocked by Radar’s default block rule have the value highest_risk_level. Charges placed in review by Radar’s default review rule have the value elevated_risk_level. Charges authorized, blocked, or placed in review by custom rules have the value rule. See understanding declines for more details. |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
=head2 risk_level string |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
Stripe’s evaluation of the riskiness of the payment. Possible values for evaluated payments are normal, elevated, highest. For non-card payments, and card-based payments predating the public assignment of risk levels, this field will have the value not_assessed. In the event of an error in the evaluation, this field will have the value unknown. |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
=head2 risk_score integer |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
Stripe’s evaluation of the riskiness of the payment. Possible values for evaluated payments are between 0 and 100. For non-card payments, card-based payments predating the public assignment of risk scores, or in the event of an error during evaluation, this field will not be present. This field is only available with Radar for Fraud Teams. |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
=head2 rule string (expandable) |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
The ID of the Radar rule that matched the payment, if applicable. |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
=head2 seller_message string |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
A human-readable description of the outcome type and reason, designed for you (the recipient of the payment), not your customer. |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
=head2 type string |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
Possible values are authorized, manual_review, issuer_declined, blocked, and invalid. See understanding declines and Radar reviews for details. |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
=head1 API SAMPLE |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
{ |
98
|
|
|
|
|
|
|
"id": "ch_fake123456789", |
99
|
|
|
|
|
|
|
"object": "charge", |
100
|
|
|
|
|
|
|
"amount": 100, |
101
|
|
|
|
|
|
|
"amount_refunded": 0, |
102
|
|
|
|
|
|
|
"application": null, |
103
|
|
|
|
|
|
|
"application_fee": null, |
104
|
|
|
|
|
|
|
"application_fee_amount": null, |
105
|
|
|
|
|
|
|
"balance_transaction": "txn_fake123456789", |
106
|
|
|
|
|
|
|
"billing_details": { |
107
|
|
|
|
|
|
|
"address": { |
108
|
|
|
|
|
|
|
"city": null, |
109
|
|
|
|
|
|
|
"country": null, |
110
|
|
|
|
|
|
|
"line1": null, |
111
|
|
|
|
|
|
|
"line2": null, |
112
|
|
|
|
|
|
|
"postal_code": null, |
113
|
|
|
|
|
|
|
"state": null |
114
|
|
|
|
|
|
|
}, |
115
|
|
|
|
|
|
|
"email": null, |
116
|
|
|
|
|
|
|
"name": null, |
117
|
|
|
|
|
|
|
"phone": null |
118
|
|
|
|
|
|
|
}, |
119
|
|
|
|
|
|
|
"captured": false, |
120
|
|
|
|
|
|
|
"created": 1571176460, |
121
|
|
|
|
|
|
|
"currency": "jpy", |
122
|
|
|
|
|
|
|
"customer": null, |
123
|
|
|
|
|
|
|
"description": "My First Test Charge (created for API docs)", |
124
|
|
|
|
|
|
|
"dispute": null, |
125
|
|
|
|
|
|
|
"failure_code": null, |
126
|
|
|
|
|
|
|
"failure_message": null, |
127
|
|
|
|
|
|
|
"fraud_details": {}, |
128
|
|
|
|
|
|
|
"invoice": null, |
129
|
|
|
|
|
|
|
"livemode": false, |
130
|
|
|
|
|
|
|
"metadata": {}, |
131
|
|
|
|
|
|
|
"on_behalf_of": null, |
132
|
|
|
|
|
|
|
"order": null, |
133
|
|
|
|
|
|
|
"outcome": null, |
134
|
|
|
|
|
|
|
"paid": true, |
135
|
|
|
|
|
|
|
"payment_intent": null, |
136
|
|
|
|
|
|
|
"payment_method": "card_fake123456789", |
137
|
|
|
|
|
|
|
"payment_method_details": { |
138
|
|
|
|
|
|
|
"card": { |
139
|
|
|
|
|
|
|
"brand": "visa", |
140
|
|
|
|
|
|
|
"checks": { |
141
|
|
|
|
|
|
|
"address_line1_check": null, |
142
|
|
|
|
|
|
|
"address_postal_code_check": null, |
143
|
|
|
|
|
|
|
"cvc_check": null |
144
|
|
|
|
|
|
|
}, |
145
|
|
|
|
|
|
|
"country": "US", |
146
|
|
|
|
|
|
|
"exp_month": 4, |
147
|
|
|
|
|
|
|
"exp_year": 2024, |
148
|
|
|
|
|
|
|
"fingerprint": "fake123456789", |
149
|
|
|
|
|
|
|
"funding": "credit", |
150
|
|
|
|
|
|
|
"installments": null, |
151
|
|
|
|
|
|
|
"last4": "4242", |
152
|
|
|
|
|
|
|
"network": "visa", |
153
|
|
|
|
|
|
|
"three_d_secure": null, |
154
|
|
|
|
|
|
|
"wallet": null |
155
|
|
|
|
|
|
|
}, |
156
|
|
|
|
|
|
|
"type": "card" |
157
|
|
|
|
|
|
|
}, |
158
|
|
|
|
|
|
|
"receipt_email": null, |
159
|
|
|
|
|
|
|
"receipt_number": null, |
160
|
|
|
|
|
|
|
"receipt_url": "https://pay.stripe.com/receipts/acct_fake123456789/ch_fake123456789/rcpt_fake123456789", |
161
|
|
|
|
|
|
|
"refunded": false, |
162
|
|
|
|
|
|
|
"refunds": { |
163
|
|
|
|
|
|
|
"object": "list", |
164
|
|
|
|
|
|
|
"data": [], |
165
|
|
|
|
|
|
|
"has_more": false, |
166
|
|
|
|
|
|
|
"url": "/v1/charges/ch_fake123456789/refunds" |
167
|
|
|
|
|
|
|
}, |
168
|
|
|
|
|
|
|
"review": null, |
169
|
|
|
|
|
|
|
"shipping": null, |
170
|
|
|
|
|
|
|
"source_transfer": null, |
171
|
|
|
|
|
|
|
"statement_descriptor": null, |
172
|
|
|
|
|
|
|
"statement_descriptor_suffix": null, |
173
|
|
|
|
|
|
|
"status": "succeeded", |
174
|
|
|
|
|
|
|
"transfer_data": null, |
175
|
|
|
|
|
|
|
"transfer_group": null |
176
|
|
|
|
|
|
|
} |
177
|
|
|
|
|
|
|
|
178
|
|
|
|
|
|
|
=head1 HISTORY |
179
|
|
|
|
|
|
|
|
180
|
|
|
|
|
|
|
=head2 v0.1 |
181
|
|
|
|
|
|
|
|
182
|
|
|
|
|
|
|
Initial version |
183
|
|
|
|
|
|
|
|
184
|
|
|
|
|
|
|
=head1 AUTHOR |
185
|
|
|
|
|
|
|
|
186
|
|
|
|
|
|
|
Jacques Deguest E<lt>F<jack@deguest.jp>E<gt> |
187
|
|
|
|
|
|
|
|
188
|
|
|
|
|
|
|
=head1 SEE ALSO |
189
|
|
|
|
|
|
|
|
190
|
|
|
|
|
|
|
Stripe API documentation: |
191
|
|
|
|
|
|
|
|
192
|
|
|
|
|
|
|
L<https://stripe.com/docs/api/charges/object> |
193
|
|
|
|
|
|
|
|
194
|
|
|
|
|
|
|
=head1 COPYRIGHT & LICENSE |
195
|
|
|
|
|
|
|
|
196
|
|
|
|
|
|
|
Copyright (c) 2019-2020 DEGUEST Pte. Ltd. |
197
|
|
|
|
|
|
|
|
198
|
|
|
|
|
|
|
You can use, copy, modify and redistribute this package and associated |
199
|
|
|
|
|
|
|
files under the same terms as Perl itself. |
200
|
|
|
|
|
|
|
|
201
|
|
|
|
|
|
|
=cut |