epopia-stripe-ruby-mock 2.5.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.env +2 -0
- data/.gitignore +8 -0
- data/.rspec +1 -0
- data/.travis.yml +28 -0
- data/Gemfile +12 -0
- data/LICENSE.txt +22 -0
- data/README.md +413 -0
- data/Rakefile +14 -0
- data/bin/stripe-mock-server +19 -0
- data/lib/stripe_mock.rb +95 -0
- data/lib/stripe_mock/api/account_balance.rb +14 -0
- data/lib/stripe_mock/api/bank_tokens.rb +13 -0
- data/lib/stripe_mock/api/card_tokens.rb +13 -0
- data/lib/stripe_mock/api/client.rb +41 -0
- data/lib/stripe_mock/api/conversion_rate.rb +14 -0
- data/lib/stripe_mock/api/debug.rb +11 -0
- data/lib/stripe_mock/api/errors.rb +65 -0
- data/lib/stripe_mock/api/global_id_prefix.rb +22 -0
- data/lib/stripe_mock/api/instance.rb +38 -0
- data/lib/stripe_mock/api/live.rb +15 -0
- data/lib/stripe_mock/api/server.rb +39 -0
- data/lib/stripe_mock/api/test_helpers.rb +24 -0
- data/lib/stripe_mock/api/webhooks.rb +88 -0
- data/lib/stripe_mock/client.rb +127 -0
- data/lib/stripe_mock/data.rb +1193 -0
- data/lib/stripe_mock/data/list.rb +73 -0
- data/lib/stripe_mock/error_queue.rb +27 -0
- data/lib/stripe_mock/errors/closed_client_connection_error.rb +9 -0
- data/lib/stripe_mock/errors/server_timeout_error.rb +12 -0
- data/lib/stripe_mock/errors/stripe_mock_error.rb +15 -0
- data/lib/stripe_mock/errors/uninitialized_instance_error.rb +9 -0
- data/lib/stripe_mock/errors/unstarted_state_error.rb +9 -0
- data/lib/stripe_mock/errors/unsupported_request_error.rb +4 -0
- data/lib/stripe_mock/instance.rb +237 -0
- data/lib/stripe_mock/request_handlers/accounts.rb +86 -0
- data/lib/stripe_mock/request_handlers/balance.rb +17 -0
- data/lib/stripe_mock/request_handlers/balance_transactions.rb +37 -0
- data/lib/stripe_mock/request_handlers/cards.rb +35 -0
- data/lib/stripe_mock/request_handlers/charges.rb +177 -0
- data/lib/stripe_mock/request_handlers/country_spec.rb +22 -0
- data/lib/stripe_mock/request_handlers/coupons.rb +35 -0
- data/lib/stripe_mock/request_handlers/customers.rb +137 -0
- data/lib/stripe_mock/request_handlers/disputes.rb +35 -0
- data/lib/stripe_mock/request_handlers/ephemeral_key.rb +13 -0
- data/lib/stripe_mock/request_handlers/events.rb +21 -0
- data/lib/stripe_mock/request_handlers/external_accounts.rb +55 -0
- data/lib/stripe_mock/request_handlers/helpers/bank_account_helpers.rb +14 -0
- data/lib/stripe_mock/request_handlers/helpers/card_helpers.rb +127 -0
- data/lib/stripe_mock/request_handlers/helpers/charge_helpers.rb +16 -0
- data/lib/stripe_mock/request_handlers/helpers/coupon_helpers.rb +17 -0
- data/lib/stripe_mock/request_handlers/helpers/external_account_helpers.rb +49 -0
- data/lib/stripe_mock/request_handlers/helpers/subscription_helpers.rb +119 -0
- data/lib/stripe_mock/request_handlers/helpers/token_helpers.rb +44 -0
- data/lib/stripe_mock/request_handlers/invoice_items.rb +45 -0
- data/lib/stripe_mock/request_handlers/invoices.rb +177 -0
- data/lib/stripe_mock/request_handlers/orders.rb +80 -0
- data/lib/stripe_mock/request_handlers/payment_intents.rb +203 -0
- data/lib/stripe_mock/request_handlers/payment_methods.rb +112 -0
- data/lib/stripe_mock/request_handlers/payouts.rb +32 -0
- data/lib/stripe_mock/request_handlers/plans.rb +42 -0
- data/lib/stripe_mock/request_handlers/products.rb +43 -0
- data/lib/stripe_mock/request_handlers/recipients.rb +60 -0
- data/lib/stripe_mock/request_handlers/refunds.rb +91 -0
- data/lib/stripe_mock/request_handlers/sources.rb +55 -0
- data/lib/stripe_mock/request_handlers/subscription_items.rb +36 -0
- data/lib/stripe_mock/request_handlers/subscriptions.rb +296 -0
- data/lib/stripe_mock/request_handlers/tax_rates.rb +36 -0
- data/lib/stripe_mock/request_handlers/tokens.rb +75 -0
- data/lib/stripe_mock/request_handlers/transfers.rb +65 -0
- data/lib/stripe_mock/request_handlers/validators/param_validators.rb +32 -0
- data/lib/stripe_mock/server.rb +93 -0
- data/lib/stripe_mock/test_strategies/base.rb +81 -0
- data/lib/stripe_mock/test_strategies/live.rb +40 -0
- data/lib/stripe_mock/test_strategies/mock.rb +27 -0
- data/lib/stripe_mock/util.rb +44 -0
- data/lib/stripe_mock/version.rb +4 -0
- data/lib/stripe_mock/webhook_fixtures/account.application.deauthorized.json +12 -0
- data/lib/stripe_mock/webhook_fixtures/account.external_account.created.json +27 -0
- data/lib/stripe_mock/webhook_fixtures/account.external_account.deleted.json +27 -0
- data/lib/stripe_mock/webhook_fixtures/account.external_account.updated.json +27 -0
- data/lib/stripe_mock/webhook_fixtures/account.updated.json +26 -0
- data/lib/stripe_mock/webhook_fixtures/balance.available.json +25 -0
- data/lib/stripe_mock/webhook_fixtures/charge.dispute.closed.json +22 -0
- data/lib/stripe_mock/webhook_fixtures/charge.dispute.created.json +22 -0
- data/lib/stripe_mock/webhook_fixtures/charge.dispute.funds_reinstated.json +88 -0
- data/lib/stripe_mock/webhook_fixtures/charge.dispute.funds_withdrawn.json +88 -0
- data/lib/stripe_mock/webhook_fixtures/charge.dispute.updated.json +25 -0
- data/lib/stripe_mock/webhook_fixtures/charge.failed.json +56 -0
- data/lib/stripe_mock/webhook_fixtures/charge.refunded.json +69 -0
- data/lib/stripe_mock/webhook_fixtures/charge.succeeded.json +55 -0
- data/lib/stripe_mock/webhook_fixtures/charge.updated.json +58 -0
- data/lib/stripe_mock/webhook_fixtures/coupon.created.json +23 -0
- data/lib/stripe_mock/webhook_fixtures/coupon.deleted.json +23 -0
- data/lib/stripe_mock/webhook_fixtures/customer.created.json +54 -0
- data/lib/stripe_mock/webhook_fixtures/customer.deleted.json +42 -0
- data/lib/stripe_mock/webhook_fixtures/customer.discount.created.json +28 -0
- data/lib/stripe_mock/webhook_fixtures/customer.discount.deleted.json +28 -0
- data/lib/stripe_mock/webhook_fixtures/customer.discount.updated.json +43 -0
- data/lib/stripe_mock/webhook_fixtures/customer.source.created.json +32 -0
- data/lib/stripe_mock/webhook_fixtures/customer.source.deleted.json +32 -0
- data/lib/stripe_mock/webhook_fixtures/customer.source.updated.json +36 -0
- data/lib/stripe_mock/webhook_fixtures/customer.subscription.created.json +66 -0
- data/lib/stripe_mock/webhook_fixtures/customer.subscription.deleted.json +65 -0
- data/lib/stripe_mock/webhook_fixtures/customer.subscription.trial_will_end.json +65 -0
- data/lib/stripe_mock/webhook_fixtures/customer.subscription.updated.json +78 -0
- data/lib/stripe_mock/webhook_fixtures/customer.updated.json +57 -0
- data/lib/stripe_mock/webhook_fixtures/invoice.created.json +71 -0
- data/lib/stripe_mock/webhook_fixtures/invoice.payment_failed.json +105 -0
- data/lib/stripe_mock/webhook_fixtures/invoice.payment_succeeded.json +112 -0
- data/lib/stripe_mock/webhook_fixtures/invoice.updated.json +74 -0
- data/lib/stripe_mock/webhook_fixtures/invoiceitem.created.json +21 -0
- data/lib/stripe_mock/webhook_fixtures/invoiceitem.deleted.json +21 -0
- data/lib/stripe_mock/webhook_fixtures/invoiceitem.updated.json +24 -0
- data/lib/stripe_mock/webhook_fixtures/plan.created.json +20 -0
- data/lib/stripe_mock/webhook_fixtures/plan.deleted.json +20 -0
- data/lib/stripe_mock/webhook_fixtures/plan.updated.json +23 -0
- data/lib/stripe_mock/webhook_fixtures/transfer.created.json +89 -0
- data/lib/stripe_mock/webhook_fixtures/transfer.failed.json +89 -0
- data/lib/stripe_mock/webhook_fixtures/transfer.paid.json +89 -0
- data/lib/stripe_mock/webhook_fixtures/transfer.updated.json +92 -0
- data/lib/trollop.rb +782 -0
- data/spec/_dummy/webhooks/dummy.event.json +6 -0
- data/spec/api/instance_spec.rb +30 -0
- data/spec/fixtures/create_refund.yml +126 -0
- data/spec/fixtures/stripe_webhooks/account.updated.json +7 -0
- data/spec/fixtures/stripe_webhooks/custom.account.updated.json +5 -0
- data/spec/instance_spec.rb +100 -0
- data/spec/integration_examples/charge_token_examples.rb +51 -0
- data/spec/integration_examples/customer_card_examples.rb +42 -0
- data/spec/integration_examples/prepare_error_examples.rb +38 -0
- data/spec/list_spec.rb +140 -0
- data/spec/readme_spec.rb +75 -0
- data/spec/server_spec.rb +139 -0
- data/spec/shared_stripe_examples/account_examples.rb +96 -0
- data/spec/shared_stripe_examples/balance_examples.rb +11 -0
- data/spec/shared_stripe_examples/balance_transaction_examples.rb +63 -0
- data/spec/shared_stripe_examples/bank_examples.rb +229 -0
- data/spec/shared_stripe_examples/bank_token_examples.rb +59 -0
- data/spec/shared_stripe_examples/card_examples.rb +307 -0
- data/spec/shared_stripe_examples/card_token_examples.rb +185 -0
- data/spec/shared_stripe_examples/charge_examples.rb +510 -0
- data/spec/shared_stripe_examples/country_specs_examples.rb +18 -0
- data/spec/shared_stripe_examples/coupon_examples.rb +85 -0
- data/spec/shared_stripe_examples/customer_examples.rb +453 -0
- data/spec/shared_stripe_examples/dispute_examples.rb +98 -0
- data/spec/shared_stripe_examples/ephemeral_key_examples.rb +17 -0
- data/spec/shared_stripe_examples/error_mock_examples.rb +162 -0
- data/spec/shared_stripe_examples/external_account_examples.rb +170 -0
- data/spec/shared_stripe_examples/extra_features_examples.rb +36 -0
- data/spec/shared_stripe_examples/invoice_examples.rb +524 -0
- data/spec/shared_stripe_examples/invoice_item_examples.rb +69 -0
- data/spec/shared_stripe_examples/payment_intent_examples.rb +131 -0
- data/spec/shared_stripe_examples/payment_method_examples.rb +175 -0
- data/spec/shared_stripe_examples/payout_examples.rb +68 -0
- data/spec/shared_stripe_examples/plan_examples.rb +194 -0
- data/spec/shared_stripe_examples/product_example.rb +65 -0
- data/spec/shared_stripe_examples/recipient_examples.rb +118 -0
- data/spec/shared_stripe_examples/refund_examples.rb +472 -0
- data/spec/shared_stripe_examples/subscription_examples.rb +1148 -0
- data/spec/shared_stripe_examples/subscription_items_examples.rb +75 -0
- data/spec/shared_stripe_examples/tax_rate_examples.rb +42 -0
- data/spec/shared_stripe_examples/transfer_examples.rb +130 -0
- data/spec/shared_stripe_examples/validation_examples.rb +19 -0
- data/spec/shared_stripe_examples/webhook_event_examples.rb +261 -0
- data/spec/spec_helper.rb +58 -0
- data/spec/stripe_mock_spec.rb +123 -0
- data/spec/support/stripe_examples.rb +42 -0
- data/spec/util_spec.rb +121 -0
- data/stripe-ruby-mock.gemspec +27 -0
- metadata +344 -0
@@ -0,0 +1,25 @@
|
|
1
|
+
{
|
2
|
+
"created": 1326853478,
|
3
|
+
"livemode": false,
|
4
|
+
"id": "evt_00000000000000",
|
5
|
+
"type": "balance.available",
|
6
|
+
"object": "event",
|
7
|
+
"data": {
|
8
|
+
"object": {
|
9
|
+
"pending": [
|
10
|
+
{
|
11
|
+
"amount": 2217,
|
12
|
+
"currency": "usd"
|
13
|
+
}
|
14
|
+
],
|
15
|
+
"available": [
|
16
|
+
{
|
17
|
+
"amount": 0,
|
18
|
+
"currency": "usd"
|
19
|
+
}
|
20
|
+
],
|
21
|
+
"livemode": false,
|
22
|
+
"object": "balance"
|
23
|
+
}
|
24
|
+
}
|
25
|
+
}
|
@@ -0,0 +1,22 @@
|
|
1
|
+
{
|
2
|
+
"created": 1326853478,
|
3
|
+
"livemode": false,
|
4
|
+
"id": "evt_00000000000000",
|
5
|
+
"type": "charge.dispute.closed",
|
6
|
+
"object": "event",
|
7
|
+
"data": {
|
8
|
+
"object": {
|
9
|
+
"charge": "ch_00000000000000",
|
10
|
+
"amount": 1000,
|
11
|
+
"created": 1381080229,
|
12
|
+
"status": "won",
|
13
|
+
"livemode": false,
|
14
|
+
"currency": "usd",
|
15
|
+
"object": "dispute",
|
16
|
+
"reason": "general",
|
17
|
+
"balance_transaction": "txn_00000000000000",
|
18
|
+
"evidence_due_by": 1382745599,
|
19
|
+
"evidence": "Here is some evidence"
|
20
|
+
}
|
21
|
+
}
|
22
|
+
}
|
@@ -0,0 +1,22 @@
|
|
1
|
+
{
|
2
|
+
"created": 1326853478,
|
3
|
+
"livemode": false,
|
4
|
+
"id": "evt_00000000000000",
|
5
|
+
"type": "charge.dispute.created",
|
6
|
+
"object": "event",
|
7
|
+
"data": {
|
8
|
+
"object": {
|
9
|
+
"charge": "ch_00000000000000",
|
10
|
+
"amount": 1000,
|
11
|
+
"created": 1381080223,
|
12
|
+
"status": "needs_response",
|
13
|
+
"livemode": false,
|
14
|
+
"currency": "usd",
|
15
|
+
"object": "dispute",
|
16
|
+
"reason": "general",
|
17
|
+
"balance_transaction": "txn_00000000000000",
|
18
|
+
"evidence_due_by": 1382745599,
|
19
|
+
"evidence": null
|
20
|
+
}
|
21
|
+
}
|
22
|
+
}
|
@@ -0,0 +1,88 @@
|
|
1
|
+
{
|
2
|
+
"created": 1326853478,
|
3
|
+
"livemode": false,
|
4
|
+
"id": "evt_00000000000000",
|
5
|
+
"type": "charge.dispute.funds_reinstated",
|
6
|
+
"object": "event",
|
7
|
+
"request": null,
|
8
|
+
"pending_webhooks": 1,
|
9
|
+
"api_version": "2017-12-14",
|
10
|
+
"data": {
|
11
|
+
"object": {
|
12
|
+
"id": "dp_00000000000000",
|
13
|
+
"object": "dispute",
|
14
|
+
"amount": 25000,
|
15
|
+
"balance_transaction": "txn_00000000000000",
|
16
|
+
"balance_transactions": [
|
17
|
+
{
|
18
|
+
"id": "txn_1Bl3mMGWCopOTFn18p8iALq8",
|
19
|
+
"object": "balance_transaction",
|
20
|
+
"amount": -25000,
|
21
|
+
"available_on": 1516233600,
|
22
|
+
"created": 1516145022,
|
23
|
+
"currency": "usd",
|
24
|
+
"description": "Chargeback withdrawal for ch_1Bl3mKGWCopOTFn1LKoN557r",
|
25
|
+
"exchange_rate": null,
|
26
|
+
"fee": 1500,
|
27
|
+
"fee_details": [
|
28
|
+
{
|
29
|
+
"amount": 1500,
|
30
|
+
"application": null,
|
31
|
+
"currency": "usd",
|
32
|
+
"description": "Dispute fee",
|
33
|
+
"type": "stripe_fee"
|
34
|
+
}
|
35
|
+
],
|
36
|
+
"net": -26500,
|
37
|
+
"source": "dp_1Bl3mMGWCopOTFn1jpVaJDrU",
|
38
|
+
"status": "pending",
|
39
|
+
"type": "adjustment"
|
40
|
+
}
|
41
|
+
],
|
42
|
+
"charge": "ch_00000000000000",
|
43
|
+
"created": 1516145022,
|
44
|
+
"currency": "usd",
|
45
|
+
"evidence": {
|
46
|
+
"access_activity_log": null,
|
47
|
+
"billing_address": null,
|
48
|
+
"cancellation_policy": null,
|
49
|
+
"cancellation_policy_disclosure": null,
|
50
|
+
"cancellation_rebuttal": null,
|
51
|
+
"customer_communication": null,
|
52
|
+
"customer_email_address": "amitree.apu@gmail.com",
|
53
|
+
"customer_name": "amitree.apu@gmail.com",
|
54
|
+
"customer_purchase_ip": "157.131.133.10",
|
55
|
+
"customer_signature": null,
|
56
|
+
"duplicate_charge_documentation": null,
|
57
|
+
"duplicate_charge_explanation": null,
|
58
|
+
"duplicate_charge_id": null,
|
59
|
+
"product_description": null,
|
60
|
+
"receipt": null,
|
61
|
+
"refund_policy": null,
|
62
|
+
"refund_policy_disclosure": null,
|
63
|
+
"refund_refusal_explanation": null,
|
64
|
+
"service_date": null,
|
65
|
+
"service_documentation": null,
|
66
|
+
"shipping_address": null,
|
67
|
+
"shipping_carrier": null,
|
68
|
+
"shipping_date": null,
|
69
|
+
"shipping_documentation": null,
|
70
|
+
"shipping_tracking_number": null,
|
71
|
+
"uncategorized_file": null,
|
72
|
+
"uncategorized_text": null
|
73
|
+
},
|
74
|
+
"evidence_details": {
|
75
|
+
"due_by": 1517529599,
|
76
|
+
"has_evidence": false,
|
77
|
+
"past_due": false,
|
78
|
+
"submission_count": 0
|
79
|
+
},
|
80
|
+
"is_charge_refundable": false,
|
81
|
+
"livemode": false,
|
82
|
+
"metadata": {
|
83
|
+
},
|
84
|
+
"reason": "fraudulent",
|
85
|
+
"status": "needs_response"
|
86
|
+
}
|
87
|
+
}
|
88
|
+
}
|
@@ -0,0 +1,88 @@
|
|
1
|
+
{
|
2
|
+
"created": 1326853478,
|
3
|
+
"livemode": false,
|
4
|
+
"id": "evt_00000000000000",
|
5
|
+
"type": "charge.dispute.funds_withdrawn",
|
6
|
+
"object": "event",
|
7
|
+
"request": null,
|
8
|
+
"pending_webhooks": 1,
|
9
|
+
"api_version": "2017-12-14",
|
10
|
+
"data": {
|
11
|
+
"object": {
|
12
|
+
"id": "dp_00000000000000",
|
13
|
+
"object": "dispute",
|
14
|
+
"amount": 25000,
|
15
|
+
"balance_transaction": "txn_00000000000000",
|
16
|
+
"balance_transactions": [
|
17
|
+
{
|
18
|
+
"id": "txn_1Bl3mMGWCopOTFn18p8iALq8",
|
19
|
+
"object": "balance_transaction",
|
20
|
+
"amount": -25000,
|
21
|
+
"available_on": 1516233600,
|
22
|
+
"created": 1516145022,
|
23
|
+
"currency": "usd",
|
24
|
+
"description": "Chargeback withdrawal for ch_1Bl3mKGWCopOTFn1LKoN557r",
|
25
|
+
"exchange_rate": null,
|
26
|
+
"fee": 1500,
|
27
|
+
"fee_details": [
|
28
|
+
{
|
29
|
+
"amount": 1500,
|
30
|
+
"application": null,
|
31
|
+
"currency": "usd",
|
32
|
+
"description": "Dispute fee",
|
33
|
+
"type": "stripe_fee"
|
34
|
+
}
|
35
|
+
],
|
36
|
+
"net": -26500,
|
37
|
+
"source": "dp_1Bl3mMGWCopOTFn1jpVaJDrU",
|
38
|
+
"status": "pending",
|
39
|
+
"type": "adjustment"
|
40
|
+
}
|
41
|
+
],
|
42
|
+
"charge": "ch_00000000000000",
|
43
|
+
"created": 1516145022,
|
44
|
+
"currency": "usd",
|
45
|
+
"evidence": {
|
46
|
+
"access_activity_log": null,
|
47
|
+
"billing_address": null,
|
48
|
+
"cancellation_policy": null,
|
49
|
+
"cancellation_policy_disclosure": null,
|
50
|
+
"cancellation_rebuttal": null,
|
51
|
+
"customer_communication": null,
|
52
|
+
"customer_email_address": "amitree.apu@gmail.com",
|
53
|
+
"customer_name": "amitree.apu@gmail.com",
|
54
|
+
"customer_purchase_ip": "157.131.133.10",
|
55
|
+
"customer_signature": null,
|
56
|
+
"duplicate_charge_documentation": null,
|
57
|
+
"duplicate_charge_explanation": null,
|
58
|
+
"duplicate_charge_id": null,
|
59
|
+
"product_description": null,
|
60
|
+
"receipt": null,
|
61
|
+
"refund_policy": null,
|
62
|
+
"refund_policy_disclosure": null,
|
63
|
+
"refund_refusal_explanation": null,
|
64
|
+
"service_date": null,
|
65
|
+
"service_documentation": null,
|
66
|
+
"shipping_address": null,
|
67
|
+
"shipping_carrier": null,
|
68
|
+
"shipping_date": null,
|
69
|
+
"shipping_documentation": null,
|
70
|
+
"shipping_tracking_number": null,
|
71
|
+
"uncategorized_file": null,
|
72
|
+
"uncategorized_text": null
|
73
|
+
},
|
74
|
+
"evidence_details": {
|
75
|
+
"due_by": 1517529599,
|
76
|
+
"has_evidence": false,
|
77
|
+
"past_due": false,
|
78
|
+
"submission_count": 0
|
79
|
+
},
|
80
|
+
"is_charge_refundable": false,
|
81
|
+
"livemode": false,
|
82
|
+
"metadata": {
|
83
|
+
},
|
84
|
+
"reason": "fraudulent",
|
85
|
+
"status": "needs_response"
|
86
|
+
}
|
87
|
+
}
|
88
|
+
}
|
@@ -0,0 +1,25 @@
|
|
1
|
+
{
|
2
|
+
"created": 1326853478,
|
3
|
+
"livemode": false,
|
4
|
+
"id": "evt_00000000000000",
|
5
|
+
"type": "charge.dispute.updated",
|
6
|
+
"object": "event",
|
7
|
+
"data": {
|
8
|
+
"object": {
|
9
|
+
"charge": "ch_00000000000000",
|
10
|
+
"amount": 1000,
|
11
|
+
"created": 1381080226,
|
12
|
+
"status": "under_review",
|
13
|
+
"livemode": false,
|
14
|
+
"currency": "usd",
|
15
|
+
"object": "dispute",
|
16
|
+
"reason": "general",
|
17
|
+
"balance_transaction": "txn_00000000000000",
|
18
|
+
"evidence_due_by": 1382745599,
|
19
|
+
"evidence": "Here is some evidence"
|
20
|
+
},
|
21
|
+
"previous_attributes": {
|
22
|
+
"evidence": null
|
23
|
+
}
|
24
|
+
}
|
25
|
+
}
|
@@ -0,0 +1,56 @@
|
|
1
|
+
{
|
2
|
+
"created": 1326853478,
|
3
|
+
"livemode": false,
|
4
|
+
"id": "evt_00000000000000",
|
5
|
+
"type": "charge.failed",
|
6
|
+
"object": "event",
|
7
|
+
"data": {
|
8
|
+
"object": {
|
9
|
+
"id": "ch_00000000000000",
|
10
|
+
"object": "charge",
|
11
|
+
"created": 1380933505,
|
12
|
+
"livemode": false,
|
13
|
+
"paid": false,
|
14
|
+
"amount": 1000,
|
15
|
+
"currency": "usd",
|
16
|
+
"refunded": false,
|
17
|
+
"source": {
|
18
|
+
"id": "cc_00000000000000",
|
19
|
+
"object": "card",
|
20
|
+
"last4": "4242",
|
21
|
+
"type": "Visa",
|
22
|
+
"brand": "Visa",
|
23
|
+
"funding": "credit",
|
24
|
+
"exp_month": 12,
|
25
|
+
"exp_year": 2013,
|
26
|
+
"fingerprint": "wXWJT135mEK107G8",
|
27
|
+
"customer": "cus_00000000000000",
|
28
|
+
"country": "US",
|
29
|
+
"name": "Actual Nothing",
|
30
|
+
"address_line1": null,
|
31
|
+
"address_line2": null,
|
32
|
+
"address_city": null,
|
33
|
+
"address_state": null,
|
34
|
+
"address_zip": null,
|
35
|
+
"address_country": null,
|
36
|
+
"cvc_check": null,
|
37
|
+
"address_line1_check": null,
|
38
|
+
"address_zip_check": null
|
39
|
+
},
|
40
|
+
"captured": true,
|
41
|
+
"refunds": {
|
42
|
+
|
43
|
+
},
|
44
|
+
"balance_transaction": "txn_00000000000000",
|
45
|
+
"failure_message": null,
|
46
|
+
"failure_code": null,
|
47
|
+
"amount_refunded": 0,
|
48
|
+
"customer": "cus_00000000000000",
|
49
|
+
"invoice": "in_00000000000000",
|
50
|
+
"description": null,
|
51
|
+
"dispute": null,
|
52
|
+
"metadata": {
|
53
|
+
}
|
54
|
+
}
|
55
|
+
}
|
56
|
+
}
|
@@ -0,0 +1,69 @@
|
|
1
|
+
{
|
2
|
+
"created": 1326853478,
|
3
|
+
"livemode": false,
|
4
|
+
"id": "evt_00000000000000",
|
5
|
+
"type": "charge.refunded",
|
6
|
+
"object": "event",
|
7
|
+
"data": {
|
8
|
+
"object": {
|
9
|
+
"id": "ch_00000000000000",
|
10
|
+
"object": "charge",
|
11
|
+
"created": 1380933505,
|
12
|
+
"livemode": false,
|
13
|
+
"paid": true,
|
14
|
+
"amount": 1000,
|
15
|
+
"currency": "usd",
|
16
|
+
"refunded": true,
|
17
|
+
"source": {
|
18
|
+
"id": "cc_00000000000000",
|
19
|
+
"object": "card",
|
20
|
+
"last4": "4242",
|
21
|
+
"type": "Visa",
|
22
|
+
"brand": "Visa",
|
23
|
+
"funding": "credit",
|
24
|
+
"exp_month": 12,
|
25
|
+
"exp_year": 2013,
|
26
|
+
"fingerprint": "wXWJT135mEK107G8",
|
27
|
+
"customer": "cus_00000000000000",
|
28
|
+
"country": "US",
|
29
|
+
"name": "Actual Nothing",
|
30
|
+
"address_line1": null,
|
31
|
+
"address_line2": null,
|
32
|
+
"address_city": null,
|
33
|
+
"address_state": null,
|
34
|
+
"address_zip": null,
|
35
|
+
"address_country": null,
|
36
|
+
"cvc_check": null,
|
37
|
+
"address_line1_check": null,
|
38
|
+
"address_zip_check": null
|
39
|
+
},
|
40
|
+
"captured": true,
|
41
|
+
"refunds": {
|
42
|
+
"object": "list",
|
43
|
+
"total_count": 1,
|
44
|
+
"has_more": false,
|
45
|
+
"data": [
|
46
|
+
{
|
47
|
+
"amount": 1000,
|
48
|
+
"currency": "usd",
|
49
|
+
"created": 1381080103,
|
50
|
+
"object": "refund",
|
51
|
+
"balance_transaction": "txn_2hkjgg43ucu7K1",
|
52
|
+
"id": "re_00000000000000"
|
53
|
+
}
|
54
|
+
]
|
55
|
+
},
|
56
|
+
"balance_transaction": "txn_00000000000000",
|
57
|
+
"failure_message": null,
|
58
|
+
"failure_code": null,
|
59
|
+
"amount_refunded": 1000,
|
60
|
+
"customer": "cus_00000000000000",
|
61
|
+
"invoice": "in_00000000000000",
|
62
|
+
"description": null,
|
63
|
+
"dispute": null,
|
64
|
+
"metadata": {
|
65
|
+
},
|
66
|
+
"fee": 0
|
67
|
+
}
|
68
|
+
}
|
69
|
+
}
|
@@ -0,0 +1,55 @@
|
|
1
|
+
{
|
2
|
+
"created": 1326853478,
|
3
|
+
"livemode": false,
|
4
|
+
"id": "evt_00000000000000",
|
5
|
+
"type": "charge.succeeded",
|
6
|
+
"object": "event",
|
7
|
+
"data": {
|
8
|
+
"object": {
|
9
|
+
"id": "ch_00000000000000",
|
10
|
+
"object": "charge",
|
11
|
+
"created": 1380933505,
|
12
|
+
"livemode": false,
|
13
|
+
"paid": true,
|
14
|
+
"amount": 1000,
|
15
|
+
"currency": "usd",
|
16
|
+
"refunded": false,
|
17
|
+
"source": {
|
18
|
+
"id": "cc_00000000000000",
|
19
|
+
"object": "card",
|
20
|
+
"last4": "4242",
|
21
|
+
"type": "Visa",
|
22
|
+
"brand": "Visa",
|
23
|
+
"exp_month": 12,
|
24
|
+
"exp_year": 2013,
|
25
|
+
"fingerprint": "wXWJT135mEK107G8",
|
26
|
+
"customer": "cus_00000000000000",
|
27
|
+
"country": "US",
|
28
|
+
"name": "Actual Nothing",
|
29
|
+
"address_line1": null,
|
30
|
+
"address_line2": null,
|
31
|
+
"address_city": null,
|
32
|
+
"address_state": null,
|
33
|
+
"address_zip": null,
|
34
|
+
"address_country": null,
|
35
|
+
"cvc_check": null,
|
36
|
+
"address_line1_check": null,
|
37
|
+
"address_zip_check": null
|
38
|
+
},
|
39
|
+
"captured": true,
|
40
|
+
"refunds": {
|
41
|
+
|
42
|
+
},
|
43
|
+
"balance_transaction": "txn_00000000000000",
|
44
|
+
"failure_message": null,
|
45
|
+
"failure_code": null,
|
46
|
+
"amount_refunded": 0,
|
47
|
+
"customer": "cus_00000000000000",
|
48
|
+
"invoice": "in_00000000000000",
|
49
|
+
"description": null,
|
50
|
+
"dispute": null,
|
51
|
+
"metadata": {
|
52
|
+
}
|
53
|
+
}
|
54
|
+
}
|
55
|
+
}
|