stripe_model_callbacks 0.1.7 → 0.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +3 -3
- data/Rakefile +1 -1
- data/app/models/stripe_model_callbacks/application_record.rb +11 -7
- data/app/services/stripe_model_callbacks/account/external_account/updated_service.rb +1 -1
- data/app/services/stripe_model_callbacks/base_service.rb +6 -6
- data/app/services/stripe_model_callbacks/charge/dispute_updated_service.rb +3 -3
- data/app/services/stripe_model_callbacks/charge/updated_service.rb +5 -5
- data/app/services/stripe_model_callbacks/configure_service.rb +54 -27
- data/app/services/stripe_model_callbacks/customer/bank_account/deleted_service.rb +1 -1
- data/app/services/stripe_model_callbacks/customer/discount_updated_service.rb +1 -1
- data/app/services/stripe_model_callbacks/customer/source_updated_service.rb +3 -3
- data/app/services/stripe_model_callbacks/customer/subscription/updated_service.rb +2 -2
- data/app/services/stripe_model_callbacks/customer/updated_service.rb +2 -2
- data/app/services/stripe_model_callbacks/event_mocker_service.rb +14 -8
- data/app/services/stripe_model_callbacks/invoice/updated_service.rb +4 -4
- data/app/services/stripe_model_callbacks/payment_intent/updated_service.rb +19 -0
- data/app/services/stripe_model_callbacks/payment_method/updated_service.rb +19 -0
- data/app/services/stripe_model_callbacks/payout/updated_service.rb +3 -3
- data/app/services/stripe_model_callbacks/plan/updated_service.rb +1 -1
- data/app/services/stripe_model_callbacks/price/updated_service.rb +1 -1
- data/app/services/stripe_model_callbacks/product/updated_service.rb +1 -1
- data/app/services/stripe_model_callbacks/recipient/updated_service.rb +1 -1
- data/app/services/stripe_model_callbacks/review/updated_service.rb +1 -1
- data/app/services/stripe_model_callbacks/setup_intent/updated_service.rb +8 -0
- data/app/services/stripe_model_callbacks/sku/updated_service.rb +1 -1
- data/app/services/stripe_model_callbacks/source/updated_service.rb +4 -4
- data/app/services/stripe_model_callbacks/subscription/state_checker_service.rb +1 -1
- data/app/services/stripe_model_callbacks/subscription_schedule/updated_service.rb +1 -1
- data/app/services/stripe_model_callbacks/sync_everything.rb +17 -2
- data/app/services/stripe_model_callbacks/sync_from_stripe.rb +1 -1
- data/app/services/stripe_model_callbacks/tax_rate/updated_service.rb +3 -3
- data/app/services/stripe_model_callbacks/transfer/updated_service.rb +1 -1
- data/config/rails_best_practices.yml +1 -0
- data/db/migrate/20180206151132_change_activities_trackable_id_to_string.rb +1 -1
- data/db/migrate/20180208091647_change_stripe_subscription_items_quantity_to_integer.rb +1 -1
- data/db/migrate/20181219121712_add_new_primary_id_and_rename_old.rb +2 -2
- data/db/migrate/20230210081405_create_stripe_setup_intents.rb +28 -0
- data/db/migrate/20230331182902_add_amount_captured_to_stripe_charges.rb +6 -0
- data/db/migrate/20230420092307_create_stripe_payment_methods.rb +15 -0
- data/db/migrate/20230421072509_create_stripe_payment_intents.rb +44 -0
- data/db/migrate/20230422074329_add_payment_intent_to_stripe_charges.rb +6 -0
- data/db/migrate/20230422175529_add_payment_intent_to_stripe_refunds.rb +6 -0
- data/db/migrate/20230422180602_change_stripe_refunds_stripe_charge_id_to_nullable.rb +5 -0
- data/db/migrate/20230518072538_change_stripe_setup_intents_payment_method_to_string.rb +7 -0
- data/lib/stripe_model_callbacks/configuration.rb +1 -1
- data/lib/stripe_model_callbacks/event_mocker.rb +1 -1
- data/lib/stripe_model_callbacks/factories/stripe_charges.rb +10 -0
- data/lib/stripe_model_callbacks/factories/stripe_coupons.rb +9 -9
- data/lib/stripe_model_callbacks/factories/stripe_customers.rb +6 -4
- data/lib/stripe_model_callbacks/factories/stripe_payment_intents.rb +17 -0
- data/lib/stripe_model_callbacks/factories/stripe_payment_methods.rb +15 -0
- data/lib/stripe_model_callbacks/factories/stripe_plans.rb +9 -12
- data/lib/stripe_model_callbacks/factories/stripe_products.rb +6 -8
- data/lib/stripe_model_callbacks/factories/stripe_setup_intents.rb +7 -0
- data/lib/stripe_model_callbacks/factories/stripe_subscription_items.rb +6 -7
- data/lib/stripe_model_callbacks/factories/stripe_subscriptions.rb +10 -12
- data/lib/stripe_model_callbacks/factories/stripe_tax_rates.rb +10 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/charge/charge.refunded.json +1 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/payment_intent/payment_intent.amount_capturable_updated.json +66 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/payment_intent/payment_intent.canceled.json +66 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/payment_intent/payment_intent.created.json +66 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/payment_intent/payment_intent.partially_funded.json +66 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/payment_intent/payment_intent.payment_failed.json +66 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/payment_intent/payment_intent.processing.json +66 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/payment_intent/payment_intent.requires_action.json +66 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/payment_intent/payment_intent.succeeded.json +66 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/payment_method/payment_method.attached.json +63 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/payment_method/payment_method.automatically_updated.json +63 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/payment_method/payment_method.card_automatically_updated.json +63 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/payment_method/payment_method.detached.json +63 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/payment_method/payment_method.updated.json +63 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/setup_intent/setup_intent.created.json +47 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/setup_intent/setup_intent.updated.json +47 -0
- data/lib/stripe_model_callbacks/models/stripe_charge.rb +47 -3
- data/lib/stripe_model_callbacks/models/stripe_coupon.rb +11 -0
- data/lib/stripe_model_callbacks/models/stripe_customer.rb +12 -0
- data/lib/stripe_model_callbacks/models/stripe_invoice.rb +16 -1
- data/lib/stripe_model_callbacks/models/stripe_payment_intent.rb +126 -0
- data/lib/stripe_model_callbacks/models/stripe_payment_method.rb +32 -0
- data/lib/stripe_model_callbacks/models/stripe_plan.rb +13 -0
- data/lib/stripe_model_callbacks/models/stripe_product.rb +10 -0
- data/lib/stripe_model_callbacks/models/stripe_refund.rb +3 -1
- data/lib/stripe_model_callbacks/models/stripe_setup_intent.rb +21 -0
- data/lib/stripe_model_callbacks/models/stripe_source.rb +2 -1
- data/lib/stripe_model_callbacks/models/stripe_subscription.rb +23 -4
- data/lib/stripe_model_callbacks/models/stripe_subscription_item.rb +10 -1
- data/lib/stripe_model_callbacks/models/stripe_subscription_schedule.rb +1 -1
- data/lib/stripe_model_callbacks/models/stripe_subscription_schedule_phase.rb +1 -1
- data/lib/stripe_model_callbacks/models/stripe_tax_rate.rb +6 -0
- data/lib/stripe_model_callbacks/version.rb +1 -1
- data/lib/stripe_model_callbacks.rb +1 -1
- metadata +45 -13
data/lib/stripe_model_callbacks/fixtures/stripe_events/payment_intent/payment_intent.canceled.json
ADDED
@@ -0,0 +1,66 @@
|
|
1
|
+
{
|
2
|
+
"id": "evt_1MxwhGIICJxvfdbRjLpH5qNb",
|
3
|
+
"object": "event",
|
4
|
+
"api_version": "2022-11-15",
|
5
|
+
"created": 1681755758,
|
6
|
+
"data": {
|
7
|
+
"object": {
|
8
|
+
"id": "pi_1JGpBw4Lf1hyuG3tSrdK3llw",
|
9
|
+
"object": "payment_intent",
|
10
|
+
"amount": 1000,
|
11
|
+
"amount_capturable": 0,
|
12
|
+
"amount_details": {
|
13
|
+
"tip": {}
|
14
|
+
},
|
15
|
+
"amount_received": 0,
|
16
|
+
"application": null,
|
17
|
+
"application_fee_amount": null,
|
18
|
+
"automatic_payment_methods": null,
|
19
|
+
"canceled_at": null,
|
20
|
+
"cancellation_reason": null,
|
21
|
+
"capture_method": "automatic",
|
22
|
+
"client_secret": "pi_1JGpBw4Lf1hyuG3tSrdK3llw_secret_LS2rgASDfUetReE3XLXayygdt",
|
23
|
+
"confirmation_method": "automatic",
|
24
|
+
"created": 1627149796,
|
25
|
+
"currency": "usd",
|
26
|
+
"customer": null,
|
27
|
+
"description": "Created by stripe.com/docs demo",
|
28
|
+
"invoice": null,
|
29
|
+
"last_payment_error": null,
|
30
|
+
"latest_charge": null,
|
31
|
+
"livemode": false,
|
32
|
+
"metadata": {},
|
33
|
+
"next_action": null,
|
34
|
+
"on_behalf_of": null,
|
35
|
+
"payment_method": null,
|
36
|
+
"payment_method_options": {
|
37
|
+
"card": {
|
38
|
+
"installments": null,
|
39
|
+
"mandate_options": null,
|
40
|
+
"network": null,
|
41
|
+
"request_three_d_secure": "automatic"
|
42
|
+
}
|
43
|
+
},
|
44
|
+
"payment_method_types": [
|
45
|
+
"card"
|
46
|
+
],
|
47
|
+
"processing": null,
|
48
|
+
"receipt_email": null,
|
49
|
+
"review": null,
|
50
|
+
"setup_future_usage": null,
|
51
|
+
"shipping": null,
|
52
|
+
"statement_descriptor": null,
|
53
|
+
"statement_descriptor_suffix": null,
|
54
|
+
"status": "requires_payment_method",
|
55
|
+
"transfer_data": null,
|
56
|
+
"transfer_group": null
|
57
|
+
}
|
58
|
+
},
|
59
|
+
"livemode": true,
|
60
|
+
"pending_webhooks": 1,
|
61
|
+
"request": {
|
62
|
+
"id": null,
|
63
|
+
"idempotency_key": "setatt_1MxwglIICJxvfdbR7jPCO6O3-src_1MxwgmIICJxvfdbRoaqKyWHH"
|
64
|
+
},
|
65
|
+
"type": "payment_intent.canceled"
|
66
|
+
}
|
data/lib/stripe_model_callbacks/fixtures/stripe_events/payment_intent/payment_intent.created.json
ADDED
@@ -0,0 +1,66 @@
|
|
1
|
+
{
|
2
|
+
"id": "evt_1MxwhGIICJxvfdbRjLpH5qNb",
|
3
|
+
"object": "event",
|
4
|
+
"api_version": "2022-11-15",
|
5
|
+
"created": 1681755758,
|
6
|
+
"data": {
|
7
|
+
"object": {
|
8
|
+
"id": "pi_1JGpBw4Lf1hyuG3tSrdK3llw",
|
9
|
+
"object": "payment_intent",
|
10
|
+
"amount": 1000,
|
11
|
+
"amount_capturable": 0,
|
12
|
+
"amount_details": {
|
13
|
+
"tip": {}
|
14
|
+
},
|
15
|
+
"amount_received": 0,
|
16
|
+
"application": null,
|
17
|
+
"application_fee_amount": null,
|
18
|
+
"automatic_payment_methods": null,
|
19
|
+
"canceled_at": null,
|
20
|
+
"cancellation_reason": null,
|
21
|
+
"capture_method": "automatic",
|
22
|
+
"client_secret": "pi_1JGpBw4Lf1hyuG3tSrdK3llw_secret_LS2rgASDfUetReE3XLXayygdt",
|
23
|
+
"confirmation_method": "automatic",
|
24
|
+
"created": 1627149796,
|
25
|
+
"currency": "usd",
|
26
|
+
"customer": null,
|
27
|
+
"description": "Created by stripe.com/docs demo",
|
28
|
+
"invoice": null,
|
29
|
+
"last_payment_error": null,
|
30
|
+
"latest_charge": null,
|
31
|
+
"livemode": false,
|
32
|
+
"metadata": {},
|
33
|
+
"next_action": null,
|
34
|
+
"on_behalf_of": null,
|
35
|
+
"payment_method": null,
|
36
|
+
"payment_method_options": {
|
37
|
+
"card": {
|
38
|
+
"installments": null,
|
39
|
+
"mandate_options": null,
|
40
|
+
"network": null,
|
41
|
+
"request_three_d_secure": "automatic"
|
42
|
+
}
|
43
|
+
},
|
44
|
+
"payment_method_types": [
|
45
|
+
"card"
|
46
|
+
],
|
47
|
+
"processing": null,
|
48
|
+
"receipt_email": null,
|
49
|
+
"review": null,
|
50
|
+
"setup_future_usage": null,
|
51
|
+
"shipping": null,
|
52
|
+
"statement_descriptor": null,
|
53
|
+
"statement_descriptor_suffix": null,
|
54
|
+
"status": "requires_payment_method",
|
55
|
+
"transfer_data": null,
|
56
|
+
"transfer_group": null
|
57
|
+
}
|
58
|
+
},
|
59
|
+
"livemode": true,
|
60
|
+
"pending_webhooks": 1,
|
61
|
+
"request": {
|
62
|
+
"id": null,
|
63
|
+
"idempotency_key": "setatt_1MxwglIICJxvfdbR7jPCO6O3-src_1MxwgmIICJxvfdbRoaqKyWHH"
|
64
|
+
},
|
65
|
+
"type": "payment_intent.created"
|
66
|
+
}
|
@@ -0,0 +1,66 @@
|
|
1
|
+
{
|
2
|
+
"id": "evt_1MxwhGIICJxvfdbRjLpH5qNb",
|
3
|
+
"object": "event",
|
4
|
+
"api_version": "2022-11-15",
|
5
|
+
"created": 1681755758,
|
6
|
+
"data": {
|
7
|
+
"object": {
|
8
|
+
"id": "pi_1JGpBw4Lf1hyuG3tSrdK3llw",
|
9
|
+
"object": "payment_intent",
|
10
|
+
"amount": 1000,
|
11
|
+
"amount_capturable": 0,
|
12
|
+
"amount_details": {
|
13
|
+
"tip": {}
|
14
|
+
},
|
15
|
+
"amount_received": 0,
|
16
|
+
"application": null,
|
17
|
+
"application_fee_amount": null,
|
18
|
+
"automatic_payment_methods": null,
|
19
|
+
"canceled_at": null,
|
20
|
+
"cancellation_reason": null,
|
21
|
+
"capture_method": "automatic",
|
22
|
+
"client_secret": "pi_1JGpBw4Lf1hyuG3tSrdK3llw_secret_LS2rgASDfUetReE3XLXayygdt",
|
23
|
+
"confirmation_method": "automatic",
|
24
|
+
"created": 1627149796,
|
25
|
+
"currency": "usd",
|
26
|
+
"customer": null,
|
27
|
+
"description": "Created by stripe.com/docs demo",
|
28
|
+
"invoice": null,
|
29
|
+
"last_payment_error": null,
|
30
|
+
"latest_charge": null,
|
31
|
+
"livemode": false,
|
32
|
+
"metadata": {},
|
33
|
+
"next_action": null,
|
34
|
+
"on_behalf_of": null,
|
35
|
+
"payment_method": null,
|
36
|
+
"payment_method_options": {
|
37
|
+
"card": {
|
38
|
+
"installments": null,
|
39
|
+
"mandate_options": null,
|
40
|
+
"network": null,
|
41
|
+
"request_three_d_secure": "automatic"
|
42
|
+
}
|
43
|
+
},
|
44
|
+
"payment_method_types": [
|
45
|
+
"card"
|
46
|
+
],
|
47
|
+
"processing": null,
|
48
|
+
"receipt_email": null,
|
49
|
+
"review": null,
|
50
|
+
"setup_future_usage": null,
|
51
|
+
"shipping": null,
|
52
|
+
"statement_descriptor": null,
|
53
|
+
"statement_descriptor_suffix": null,
|
54
|
+
"status": "requires_payment_method",
|
55
|
+
"transfer_data": null,
|
56
|
+
"transfer_group": null
|
57
|
+
}
|
58
|
+
},
|
59
|
+
"livemode": true,
|
60
|
+
"pending_webhooks": 1,
|
61
|
+
"request": {
|
62
|
+
"id": null,
|
63
|
+
"idempotency_key": "setatt_1MxwglIICJxvfdbR7jPCO6O3-src_1MxwgmIICJxvfdbRoaqKyWHH"
|
64
|
+
},
|
65
|
+
"type": "payment_intent.partially_funded"
|
66
|
+
}
|
@@ -0,0 +1,66 @@
|
|
1
|
+
{
|
2
|
+
"id": "evt_1MxwhGIICJxvfdbRjLpH5qNb",
|
3
|
+
"object": "event",
|
4
|
+
"api_version": "2022-11-15",
|
5
|
+
"created": 1681755758,
|
6
|
+
"data": {
|
7
|
+
"object": {
|
8
|
+
"id": "pi_1JGpBw4Lf1hyuG3tSrdK3llw",
|
9
|
+
"object": "payment_intent",
|
10
|
+
"amount": 1000,
|
11
|
+
"amount_capturable": 0,
|
12
|
+
"amount_details": {
|
13
|
+
"tip": {}
|
14
|
+
},
|
15
|
+
"amount_received": 0,
|
16
|
+
"application": null,
|
17
|
+
"application_fee_amount": null,
|
18
|
+
"automatic_payment_methods": null,
|
19
|
+
"canceled_at": null,
|
20
|
+
"cancellation_reason": null,
|
21
|
+
"capture_method": "automatic",
|
22
|
+
"client_secret": "pi_1JGpBw4Lf1hyuG3tSrdK3llw_secret_LS2rgASDfUetReE3XLXayygdt",
|
23
|
+
"confirmation_method": "automatic",
|
24
|
+
"created": 1627149796,
|
25
|
+
"currency": "usd",
|
26
|
+
"customer": null,
|
27
|
+
"description": "Created by stripe.com/docs demo",
|
28
|
+
"invoice": null,
|
29
|
+
"last_payment_error": null,
|
30
|
+
"latest_charge": null,
|
31
|
+
"livemode": false,
|
32
|
+
"metadata": {},
|
33
|
+
"next_action": null,
|
34
|
+
"on_behalf_of": null,
|
35
|
+
"payment_method": null,
|
36
|
+
"payment_method_options": {
|
37
|
+
"card": {
|
38
|
+
"installments": null,
|
39
|
+
"mandate_options": null,
|
40
|
+
"network": null,
|
41
|
+
"request_three_d_secure": "automatic"
|
42
|
+
}
|
43
|
+
},
|
44
|
+
"payment_method_types": [
|
45
|
+
"card"
|
46
|
+
],
|
47
|
+
"processing": null,
|
48
|
+
"receipt_email": null,
|
49
|
+
"review": null,
|
50
|
+
"setup_future_usage": null,
|
51
|
+
"shipping": null,
|
52
|
+
"statement_descriptor": null,
|
53
|
+
"statement_descriptor_suffix": null,
|
54
|
+
"status": "requires_payment_method",
|
55
|
+
"transfer_data": null,
|
56
|
+
"transfer_group": null
|
57
|
+
}
|
58
|
+
},
|
59
|
+
"livemode": true,
|
60
|
+
"pending_webhooks": 1,
|
61
|
+
"request": {
|
62
|
+
"id": null,
|
63
|
+
"idempotency_key": "setatt_1MxwglIICJxvfdbR7jPCO6O3-src_1MxwgmIICJxvfdbRoaqKyWHH"
|
64
|
+
},
|
65
|
+
"type": "payment_intent.payment_failed"
|
66
|
+
}
|
data/lib/stripe_model_callbacks/fixtures/stripe_events/payment_intent/payment_intent.processing.json
ADDED
@@ -0,0 +1,66 @@
|
|
1
|
+
{
|
2
|
+
"id": "evt_1MxwhGIICJxvfdbRjLpH5qNb",
|
3
|
+
"object": "event",
|
4
|
+
"api_version": "2022-11-15",
|
5
|
+
"created": 1681755758,
|
6
|
+
"data": {
|
7
|
+
"object": {
|
8
|
+
"id": "pi_1JGpBw4Lf1hyuG3tSrdK3llw",
|
9
|
+
"object": "payment_intent",
|
10
|
+
"amount": 1000,
|
11
|
+
"amount_capturable": 0,
|
12
|
+
"amount_details": {
|
13
|
+
"tip": {}
|
14
|
+
},
|
15
|
+
"amount_received": 0,
|
16
|
+
"application": null,
|
17
|
+
"application_fee_amount": null,
|
18
|
+
"automatic_payment_methods": null,
|
19
|
+
"canceled_at": null,
|
20
|
+
"cancellation_reason": null,
|
21
|
+
"capture_method": "automatic",
|
22
|
+
"client_secret": "pi_1JGpBw4Lf1hyuG3tSrdK3llw_secret_LS2rgASDfUetReE3XLXayygdt",
|
23
|
+
"confirmation_method": "automatic",
|
24
|
+
"created": 1627149796,
|
25
|
+
"currency": "usd",
|
26
|
+
"customer": null,
|
27
|
+
"description": "Created by stripe.com/docs demo",
|
28
|
+
"invoice": null,
|
29
|
+
"last_payment_error": null,
|
30
|
+
"latest_charge": null,
|
31
|
+
"livemode": false,
|
32
|
+
"metadata": {},
|
33
|
+
"next_action": null,
|
34
|
+
"on_behalf_of": null,
|
35
|
+
"payment_method": null,
|
36
|
+
"payment_method_options": {
|
37
|
+
"card": {
|
38
|
+
"installments": null,
|
39
|
+
"mandate_options": null,
|
40
|
+
"network": null,
|
41
|
+
"request_three_d_secure": "automatic"
|
42
|
+
}
|
43
|
+
},
|
44
|
+
"payment_method_types": [
|
45
|
+
"card"
|
46
|
+
],
|
47
|
+
"processing": null,
|
48
|
+
"receipt_email": null,
|
49
|
+
"review": null,
|
50
|
+
"setup_future_usage": null,
|
51
|
+
"shipping": null,
|
52
|
+
"statement_descriptor": null,
|
53
|
+
"statement_descriptor_suffix": null,
|
54
|
+
"status": "requires_payment_method",
|
55
|
+
"transfer_data": null,
|
56
|
+
"transfer_group": null
|
57
|
+
}
|
58
|
+
},
|
59
|
+
"livemode": true,
|
60
|
+
"pending_webhooks": 1,
|
61
|
+
"request": {
|
62
|
+
"id": null,
|
63
|
+
"idempotency_key": "setatt_1MxwglIICJxvfdbR7jPCO6O3-src_1MxwgmIICJxvfdbRoaqKyWHH"
|
64
|
+
},
|
65
|
+
"type": "payment_intent.processing"
|
66
|
+
}
|
@@ -0,0 +1,66 @@
|
|
1
|
+
{
|
2
|
+
"id": "evt_1MxwhGIICJxvfdbRjLpH5qNb",
|
3
|
+
"object": "event",
|
4
|
+
"api_version": "2022-11-15",
|
5
|
+
"created": 1681755758,
|
6
|
+
"data": {
|
7
|
+
"object": {
|
8
|
+
"id": "pi_1JGpBw4Lf1hyuG3tSrdK3llw",
|
9
|
+
"object": "payment_intent",
|
10
|
+
"amount": 1000,
|
11
|
+
"amount_capturable": 0,
|
12
|
+
"amount_details": {
|
13
|
+
"tip": {}
|
14
|
+
},
|
15
|
+
"amount_received": 0,
|
16
|
+
"application": null,
|
17
|
+
"application_fee_amount": null,
|
18
|
+
"automatic_payment_methods": null,
|
19
|
+
"canceled_at": null,
|
20
|
+
"cancellation_reason": null,
|
21
|
+
"capture_method": "automatic",
|
22
|
+
"client_secret": "pi_1JGpBw4Lf1hyuG3tSrdK3llw_secret_LS2rgASDfUetReE3XLXayygdt",
|
23
|
+
"confirmation_method": "automatic",
|
24
|
+
"created": 1627149796,
|
25
|
+
"currency": "usd",
|
26
|
+
"customer": null,
|
27
|
+
"description": "Created by stripe.com/docs demo",
|
28
|
+
"invoice": null,
|
29
|
+
"last_payment_error": null,
|
30
|
+
"latest_charge": null,
|
31
|
+
"livemode": false,
|
32
|
+
"metadata": {},
|
33
|
+
"next_action": null,
|
34
|
+
"on_behalf_of": null,
|
35
|
+
"payment_method": null,
|
36
|
+
"payment_method_options": {
|
37
|
+
"card": {
|
38
|
+
"installments": null,
|
39
|
+
"mandate_options": null,
|
40
|
+
"network": null,
|
41
|
+
"request_three_d_secure": "automatic"
|
42
|
+
}
|
43
|
+
},
|
44
|
+
"payment_method_types": [
|
45
|
+
"card"
|
46
|
+
],
|
47
|
+
"processing": null,
|
48
|
+
"receipt_email": null,
|
49
|
+
"review": null,
|
50
|
+
"setup_future_usage": null,
|
51
|
+
"shipping": null,
|
52
|
+
"statement_descriptor": null,
|
53
|
+
"statement_descriptor_suffix": null,
|
54
|
+
"status": "requires_payment_method",
|
55
|
+
"transfer_data": null,
|
56
|
+
"transfer_group": null
|
57
|
+
}
|
58
|
+
},
|
59
|
+
"livemode": true,
|
60
|
+
"pending_webhooks": 1,
|
61
|
+
"request": {
|
62
|
+
"id": null,
|
63
|
+
"idempotency_key": "setatt_1MxwglIICJxvfdbR7jPCO6O3-src_1MxwgmIICJxvfdbRoaqKyWHH"
|
64
|
+
},
|
65
|
+
"type": "payment_intent.requires_action"
|
66
|
+
}
|
data/lib/stripe_model_callbacks/fixtures/stripe_events/payment_intent/payment_intent.succeeded.json
ADDED
@@ -0,0 +1,66 @@
|
|
1
|
+
{
|
2
|
+
"id": "evt_1MxwhGIICJxvfdbRjLpH5qNb",
|
3
|
+
"object": "event",
|
4
|
+
"api_version": "2022-11-15",
|
5
|
+
"created": 1681755758,
|
6
|
+
"data": {
|
7
|
+
"object": {
|
8
|
+
"id": "pi_1JGpBw4Lf1hyuG3tSrdK3llw",
|
9
|
+
"object": "payment_intent",
|
10
|
+
"amount": 1000,
|
11
|
+
"amount_capturable": 0,
|
12
|
+
"amount_details": {
|
13
|
+
"tip": {}
|
14
|
+
},
|
15
|
+
"amount_received": 0,
|
16
|
+
"application": null,
|
17
|
+
"application_fee_amount": null,
|
18
|
+
"automatic_payment_methods": null,
|
19
|
+
"canceled_at": null,
|
20
|
+
"cancellation_reason": null,
|
21
|
+
"capture_method": "automatic",
|
22
|
+
"client_secret": "pi_1JGpBw4Lf1hyuG3tSrdK3llw_secret_LS2rgASDfUetReE3XLXayygdt",
|
23
|
+
"confirmation_method": "automatic",
|
24
|
+
"created": 1627149796,
|
25
|
+
"currency": "usd",
|
26
|
+
"customer": null,
|
27
|
+
"description": "Created by stripe.com/docs demo",
|
28
|
+
"invoice": null,
|
29
|
+
"last_payment_error": null,
|
30
|
+
"latest_charge": null,
|
31
|
+
"livemode": false,
|
32
|
+
"metadata": {},
|
33
|
+
"next_action": null,
|
34
|
+
"on_behalf_of": null,
|
35
|
+
"payment_method": null,
|
36
|
+
"payment_method_options": {
|
37
|
+
"card": {
|
38
|
+
"installments": null,
|
39
|
+
"mandate_options": null,
|
40
|
+
"network": null,
|
41
|
+
"request_three_d_secure": "automatic"
|
42
|
+
}
|
43
|
+
},
|
44
|
+
"payment_method_types": [
|
45
|
+
"card"
|
46
|
+
],
|
47
|
+
"processing": null,
|
48
|
+
"receipt_email": null,
|
49
|
+
"review": null,
|
50
|
+
"setup_future_usage": null,
|
51
|
+
"shipping": null,
|
52
|
+
"statement_descriptor": null,
|
53
|
+
"statement_descriptor_suffix": null,
|
54
|
+
"status": "requires_payment_method",
|
55
|
+
"transfer_data": null,
|
56
|
+
"transfer_group": null
|
57
|
+
}
|
58
|
+
},
|
59
|
+
"livemode": true,
|
60
|
+
"pending_webhooks": 1,
|
61
|
+
"request": {
|
62
|
+
"id": null,
|
63
|
+
"idempotency_key": "setatt_1MxwglIICJxvfdbR7jPCO6O3-src_1MxwgmIICJxvfdbRoaqKyWHH"
|
64
|
+
},
|
65
|
+
"type": "payment_intent.succeeded"
|
66
|
+
}
|
data/lib/stripe_model_callbacks/fixtures/stripe_events/payment_method/payment_method.attached.json
ADDED
@@ -0,0 +1,63 @@
|
|
1
|
+
{
|
2
|
+
"id": "evt_1MxwhGIICJxvfdbRjLpH5qNb",
|
3
|
+
"object": "event",
|
4
|
+
"api_version": "2022-11-15",
|
5
|
+
"created": 1681755758,
|
6
|
+
"data": {
|
7
|
+
"object": {
|
8
|
+
"id": "pm_1MxwglIICJxvfdbRkDNKMCwZ",
|
9
|
+
"object": "payment_method",
|
10
|
+
"billing_details": {
|
11
|
+
"address": {
|
12
|
+
"city": null,
|
13
|
+
"country": "DK",
|
14
|
+
"line1": null,
|
15
|
+
"line2": null,
|
16
|
+
"postal_code": null,
|
17
|
+
"state": null
|
18
|
+
},
|
19
|
+
"email": null,
|
20
|
+
"name": null,
|
21
|
+
"phone": null
|
22
|
+
},
|
23
|
+
"card": {
|
24
|
+
"brand": "mastercard",
|
25
|
+
"checks": {
|
26
|
+
"address_line1_check": null,
|
27
|
+
"address_postal_code_check": null,
|
28
|
+
"cvc_check": "pass"
|
29
|
+
},
|
30
|
+
"country": "DK",
|
31
|
+
"exp_month": 6,
|
32
|
+
"exp_year": 2023,
|
33
|
+
"fingerprint": "QJ3sKGzehiISoOQ3",
|
34
|
+
"funding": "debit",
|
35
|
+
"generated_from": null,
|
36
|
+
"last4": "7080",
|
37
|
+
"networks": {
|
38
|
+
"available": [
|
39
|
+
"mastercard"
|
40
|
+
],
|
41
|
+
"preferred": null
|
42
|
+
},
|
43
|
+
"three_d_secure_usage": {
|
44
|
+
"supported": true
|
45
|
+
},
|
46
|
+
"wallet": null
|
47
|
+
},
|
48
|
+
"created": 1681755727,
|
49
|
+
"customer": "cus_NiCY7UI5u0pbJH",
|
50
|
+
"livemode": true,
|
51
|
+
"metadata": {
|
52
|
+
},
|
53
|
+
"type": "card"
|
54
|
+
}
|
55
|
+
},
|
56
|
+
"livemode": true,
|
57
|
+
"pending_webhooks": 1,
|
58
|
+
"request": {
|
59
|
+
"id": null,
|
60
|
+
"idempotency_key": "setatt_1MxwglIICJxvfdbR7jPCO6O3-src_1MxwgmIICJxvfdbRoaqKyWHH"
|
61
|
+
},
|
62
|
+
"type": "payment_method.attached"
|
63
|
+
}
|
@@ -0,0 +1,63 @@
|
|
1
|
+
{
|
2
|
+
"id": "evt_1MxwhGIICJxvfdbRjLpH5qNb",
|
3
|
+
"object": "event",
|
4
|
+
"api_version": "2022-11-15",
|
5
|
+
"created": 1681755758,
|
6
|
+
"data": {
|
7
|
+
"object": {
|
8
|
+
"id": "pm_1MxwglIICJxvfdbRkDNKMCwZ",
|
9
|
+
"object": "payment_method",
|
10
|
+
"billing_details": {
|
11
|
+
"address": {
|
12
|
+
"city": null,
|
13
|
+
"country": "DK",
|
14
|
+
"line1": null,
|
15
|
+
"line2": null,
|
16
|
+
"postal_code": null,
|
17
|
+
"state": null
|
18
|
+
},
|
19
|
+
"email": null,
|
20
|
+
"name": null,
|
21
|
+
"phone": null
|
22
|
+
},
|
23
|
+
"card": {
|
24
|
+
"brand": "mastercard",
|
25
|
+
"checks": {
|
26
|
+
"address_line1_check": null,
|
27
|
+
"address_postal_code_check": null,
|
28
|
+
"cvc_check": "pass"
|
29
|
+
},
|
30
|
+
"country": "DK",
|
31
|
+
"exp_month": 6,
|
32
|
+
"exp_year": 2023,
|
33
|
+
"fingerprint": "QJ3sKGzehiISoOQ3",
|
34
|
+
"funding": "debit",
|
35
|
+
"generated_from": null,
|
36
|
+
"last4": "7080",
|
37
|
+
"networks": {
|
38
|
+
"available": [
|
39
|
+
"mastercard"
|
40
|
+
],
|
41
|
+
"preferred": null
|
42
|
+
},
|
43
|
+
"three_d_secure_usage": {
|
44
|
+
"supported": true
|
45
|
+
},
|
46
|
+
"wallet": null
|
47
|
+
},
|
48
|
+
"created": 1681755727,
|
49
|
+
"customer": "cus_NiCY7UI5u0pbJH",
|
50
|
+
"livemode": true,
|
51
|
+
"metadata": {
|
52
|
+
},
|
53
|
+
"type": "card"
|
54
|
+
}
|
55
|
+
},
|
56
|
+
"livemode": true,
|
57
|
+
"pending_webhooks": 1,
|
58
|
+
"request": {
|
59
|
+
"id": null,
|
60
|
+
"idempotency_key": "setatt_1MxwglIICJxvfdbR7jPCO6O3-src_1MxwgmIICJxvfdbRoaqKyWHH"
|
61
|
+
},
|
62
|
+
"type": "payment_method.automatically_updated"
|
63
|
+
}
|
@@ -0,0 +1,63 @@
|
|
1
|
+
{
|
2
|
+
"id": "evt_1MxwhGIICJxvfdbRjLpH5qNb",
|
3
|
+
"object": "event",
|
4
|
+
"api_version": "2022-11-15",
|
5
|
+
"created": 1681755758,
|
6
|
+
"data": {
|
7
|
+
"object": {
|
8
|
+
"id": "pm_1MxwglIICJxvfdbRkDNKMCwZ",
|
9
|
+
"object": "payment_method",
|
10
|
+
"billing_details": {
|
11
|
+
"address": {
|
12
|
+
"city": null,
|
13
|
+
"country": "DK",
|
14
|
+
"line1": null,
|
15
|
+
"line2": null,
|
16
|
+
"postal_code": null,
|
17
|
+
"state": null
|
18
|
+
},
|
19
|
+
"email": null,
|
20
|
+
"name": null,
|
21
|
+
"phone": null
|
22
|
+
},
|
23
|
+
"card": {
|
24
|
+
"brand": "mastercard",
|
25
|
+
"checks": {
|
26
|
+
"address_line1_check": null,
|
27
|
+
"address_postal_code_check": null,
|
28
|
+
"cvc_check": "pass"
|
29
|
+
},
|
30
|
+
"country": "DK",
|
31
|
+
"exp_month": 6,
|
32
|
+
"exp_year": 2023,
|
33
|
+
"fingerprint": "QJ3sKGzehiISoOQ3",
|
34
|
+
"funding": "debit",
|
35
|
+
"generated_from": null,
|
36
|
+
"last4": "7080",
|
37
|
+
"networks": {
|
38
|
+
"available": [
|
39
|
+
"mastercard"
|
40
|
+
],
|
41
|
+
"preferred": null
|
42
|
+
},
|
43
|
+
"three_d_secure_usage": {
|
44
|
+
"supported": true
|
45
|
+
},
|
46
|
+
"wallet": null
|
47
|
+
},
|
48
|
+
"created": 1681755727,
|
49
|
+
"customer": "cus_NiCY7UI5u0pbJH",
|
50
|
+
"livemode": true,
|
51
|
+
"metadata": {
|
52
|
+
},
|
53
|
+
"type": "card"
|
54
|
+
}
|
55
|
+
},
|
56
|
+
"livemode": true,
|
57
|
+
"pending_webhooks": 1,
|
58
|
+
"request": {
|
59
|
+
"id": null,
|
60
|
+
"idempotency_key": "setatt_1MxwglIICJxvfdbR7jPCO6O3-src_1MxwgmIICJxvfdbRoaqKyWHH"
|
61
|
+
},
|
62
|
+
"type": "payment_method.card_automatically_updated"
|
63
|
+
}
|