Merge pull request #12168 from rioug/11670-refund-stripe-payment-complete-order

Refund stripe payment when an order is complete
This commit is contained in:
Filipe
2024-02-28 18:08:50 +00:00
committed by GitHub
11 changed files with 1588 additions and 333 deletions

View File

@@ -59,6 +59,8 @@ module Spree
flash[:error] = t(:cannot_perform_operation)
end
rescue StandardError => e
logger.error e.message
Bugsnag.notify(e)
flash[:error] = e.message
ensure
redirect_to request.referer

View File

@@ -19,4 +19,4 @@
%td.actions
- payment.actions.each do |action|
= link_to_with_icon "icon-#{action}", Spree.t(action), fire_admin_order_payment_path(@order, payment, e: action),
no_text: true, data: { method: :put, "ujs-navigate": "false", action: action, disable_with: "" }
no_text: true, data: { method: :put, action: action, disable_with: "" }

View File

@@ -14,7 +14,7 @@ http_interactions:
Content-Type:
- application/x-www-form-urlencoded
X-Stripe-Client-Telemetry:
- '{"last_request_metrics":{"request_id":"req_waW9Ckkv5MVQ5c","request_duration_ms":399}}'
- '{"last_request_metrics":{"request_id":"req_o2i92svEF6wZ9X","request_duration_ms":396}}'
Stripe-Version:
- '2023-10-16'
X-Stripe-Client-User-Agent:
@@ -34,7 +34,7 @@ http_interactions:
Server:
- nginx
Date:
- Mon, 26 Feb 2024 23:18:21 GMT
- Wed, 28 Feb 2024 04:23:09 GMT
Content-Type:
- application/json
Content-Length:
@@ -59,11 +59,11 @@ http_interactions:
default-src 'none'; base-uri 'none'; form-action 'none'; frame-ancestors 'none';
img-src 'self'; script-src 'self' 'report-sample'; style-src 'self'
Idempotency-Key:
- 2b301d19-cc91-43de-a99b-7bf4f00570e1
- 3d3d1721-0516-4615-b6d1-dcf32c7fe0b2
Original-Request:
- req_mkQqGEicm5NuUZ
- req_FYW1iyKrExg9pI
Request-Id:
- req_mkQqGEicm5NuUZ
- req_FYW1iyKrExg9pI
Stripe-Should-Retry:
- 'false'
Stripe-Version:
@@ -78,7 +78,7 @@ http_interactions:
encoding: UTF-8
string: |-
{
"id": "acct_1OoDRAQRoLKdE8Em",
"id": "acct_1Ooeff4DenidF2LU",
"object": "account",
"business_profile": {
"annual_revenue": null,
@@ -100,7 +100,7 @@ http_interactions:
"type": "application"
},
"country": "AU",
"created": 1708989500,
"created": 1709094188,
"default_currency": "aud",
"details_submitted": false,
"email": "carrot.producer@example.com",
@@ -109,7 +109,7 @@ http_interactions:
"data": [],
"has_more": false,
"total_count": 0,
"url": "/v1/accounts/acct_1OoDRAQRoLKdE8Em/external_accounts"
"url": "/v1/accounts/acct_1Ooeff4DenidF2LU/external_accounts"
},
"future_requirements": {
"alternatives": [],
@@ -206,7 +206,7 @@ http_interactions:
},
"type": "standard"
}
recorded_at: Mon, 26 Feb 2024 23:18:21 GMT
recorded_at: Wed, 28 Feb 2024 04:23:09 GMT
- request:
method: post
uri: https://api.stripe.com/v1/payment_intents
@@ -221,7 +221,7 @@ http_interactions:
Content-Type:
- application/x-www-form-urlencoded
X-Stripe-Client-Telemetry:
- '{"last_request_metrics":{"request_id":"req_mkQqGEicm5NuUZ","request_duration_ms":1875}}'
- '{"last_request_metrics":{"request_id":"req_FYW1iyKrExg9pI","request_duration_ms":1973}}'
Stripe-Version:
- '2023-10-16'
X-Stripe-Client-User-Agent:
@@ -230,7 +230,7 @@ http_interactions:
9.4.0, GNU ld (GNU Binutils for Ubuntu) 2.34) #102~20.04.1-Ubuntu SMP Mon
Jan 15 13:09:14 UTC 2024","hostname":"gaetan-Dell-G15"}'
Stripe-Account:
- acct_1OoDRAQRoLKdE8Em
- acct_1Ooeff4DenidF2LU
Accept-Encoding:
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
Accept:
@@ -243,7 +243,7 @@ http_interactions:
Server:
- nginx
Date:
- Mon, 26 Feb 2024 23:18:23 GMT
- Wed, 28 Feb 2024 04:23:11 GMT
Content-Type:
- application/json
Content-Length:
@@ -268,13 +268,13 @@ http_interactions:
default-src 'none'; base-uri 'none'; form-action 'none'; frame-ancestors 'none';
img-src 'self'; script-src 'self' 'report-sample'; style-src 'self'
Idempotency-Key:
- 0666d344-fa19-4fd7-931a-fea5c97fbd18
- ee331c2c-1b37-4a83-a81b-96388aa9da31
Original-Request:
- req_5pxAgyGnD6hohF
- req_0zdTS2eXS52wv3
Request-Id:
- req_5pxAgyGnD6hohF
- req_0zdTS2eXS52wv3
Stripe-Account:
- acct_1OoDRAQRoLKdE8Em
- acct_1Ooeff4DenidF2LU
Stripe-Should-Retry:
- 'false'
Stripe-Version:
@@ -289,7 +289,7 @@ http_interactions:
encoding: UTF-8
string: |-
{
"id": "pi_3OoDRCQRoLKdE8Em1MEAqw8K",
"id": "pi_3Ooefi4DenidF2LU1DyZ34Mm",
"object": "payment_intent",
"amount": 1000,
"amount_capturable": 0,
@@ -303,20 +303,20 @@ http_interactions:
"canceled_at": null,
"cancellation_reason": null,
"capture_method": "automatic",
"client_secret": "pi_3OoDRCQRoLKdE8Em1MEAqw8K_secret_V5WhuZ8znPBBUc87sQ3xEpFYt",
"client_secret": "pi_3Ooefi4DenidF2LU1DyZ34Mm_secret_w379gPpBGChVwBEUepP0qlRB0",
"confirmation_method": "automatic",
"created": 1708989502,
"created": 1709094190,
"currency": "aud",
"customer": null,
"description": null,
"invoice": null,
"last_payment_error": null,
"latest_charge": "ch_3OoDRCQRoLKdE8Em1jzh5JMF",
"latest_charge": "ch_3Ooefi4DenidF2LU1gG37Leq",
"livemode": false,
"metadata": {},
"next_action": null,
"on_behalf_of": null,
"payment_method": "pm_1OoDRCQRoLKdE8EmoaCnokMm",
"payment_method": "pm_1Ooefh4DenidF2LU9tRCdeQl",
"payment_method_configuration_details": null,
"payment_method_options": {
"card": {
@@ -341,10 +341,10 @@ http_interactions:
"transfer_data": null,
"transfer_group": null
}
recorded_at: Mon, 26 Feb 2024 23:18:23 GMT
recorded_at: Wed, 28 Feb 2024 04:23:11 GMT
- request:
method: get
uri: https://api.stripe.com/v1/payment_intents/pi_3OoDRCQRoLKdE8Em1MEAqw8K
uri: https://api.stripe.com/v1/payment_intents/pi_3Ooefi4DenidF2LU1DyZ34Mm
body:
encoding: US-ASCII
string: ''
@@ -360,7 +360,7 @@ http_interactions:
X-Stripe-Client-User-Metadata:
- '{"ip":null}'
Stripe-Account:
- acct_1OoDRAQRoLKdE8Em
- acct_1Ooeff4DenidF2LU
Connection:
- close
Accept-Encoding:
@@ -375,7 +375,7 @@ http_interactions:
Server:
- nginx
Date:
- Mon, 26 Feb 2024 23:18:23 GMT
- Wed, 28 Feb 2024 04:23:11 GMT
Content-Type:
- application/json
Content-Length:
@@ -401,9 +401,9 @@ http_interactions:
'none'; frame-ancestors 'none'; img-src 'self'; script-src 'self' 'report-sample';
style-src 'self'
Request-Id:
- req_yR8P9t9VBU4Rwr
- req_dpwxzBlEqboYmG
Stripe-Account:
- acct_1OoDRAQRoLKdE8Em
- acct_1Ooeff4DenidF2LU
Stripe-Version:
- '2020-08-27'
Vary:
@@ -416,7 +416,7 @@ http_interactions:
encoding: UTF-8
string: |-
{
"id": "pi_3OoDRCQRoLKdE8Em1MEAqw8K",
"id": "pi_3Ooefi4DenidF2LU1DyZ34Mm",
"object": "payment_intent",
"amount": 1000,
"amount_capturable": 0,
@@ -434,7 +434,7 @@ http_interactions:
"object": "list",
"data": [
{
"id": "ch_3OoDRCQRoLKdE8Em1jzh5JMF",
"id": "ch_3Ooefi4DenidF2LU1gG37Leq",
"object": "charge",
"amount": 1000,
"amount_captured": 1000,
@@ -442,7 +442,7 @@ http_interactions:
"application": "<HIDDEN-STRIPE_CLIENT_ID>",
"application_fee": null,
"application_fee_amount": null,
"balance_transaction": "txn_3OoDRCQRoLKdE8Em1JsGfBVA",
"balance_transaction": "txn_3Ooefi4DenidF2LU1A5YW6L5",
"billing_details": {
"address": {
"city": null,
@@ -458,7 +458,7 @@ http_interactions:
},
"calculated_statement_descriptor": "OFNOFNOFN",
"captured": true,
"created": 1708989502,
"created": 1709094190,
"currency": "aud",
"customer": null,
"description": null,
@@ -478,13 +478,13 @@ http_interactions:
"network_status": "approved_by_network",
"reason": null,
"risk_level": "normal",
"risk_score": 64,
"risk_score": 60,
"seller_message": "Payment complete.",
"type": "authorized"
},
"paid": true,
"payment_intent": "pi_3OoDRCQRoLKdE8Em1MEAqw8K",
"payment_method": "pm_1OoDRCQRoLKdE8EmoaCnokMm",
"payment_intent": "pi_3Ooefi4DenidF2LU1DyZ34Mm",
"payment_method": "pm_1Ooefh4DenidF2LU9tRCdeQl",
"payment_method_details": {
"card": {
"amount_authorized": 1000,
@@ -527,14 +527,14 @@ http_interactions:
"radar_options": {},
"receipt_email": null,
"receipt_number": null,
"receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xT29EUkFRUm9MS2RFOEVtKL-49K4GMgYhxpkERrk6LBY1srJNKxFJi2C32U7trpmJVOZpe12b9XdmSn95IM_2Hs_2sTtaeW09TK9b",
"receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xT29lZmY0RGVuaWRGMkxVKK_q-q4GMgZJ1VM-2OM6LBb4D48xGlDpdG-HkaSEFwnz19gNCEL6o7LPe7Gh8_xibxWVk8tEJTqByzNe",
"refunded": false,
"refunds": {
"object": "list",
"data": [],
"has_more": false,
"total_count": 0,
"url": "/v1/charges/ch_3OoDRCQRoLKdE8Em1jzh5JMF/refunds"
"url": "/v1/charges/ch_3Ooefi4DenidF2LU1gG37Leq/refunds"
},
"review": null,
"shipping": null,
@@ -549,22 +549,22 @@ http_interactions:
],
"has_more": false,
"total_count": 1,
"url": "/v1/charges?payment_intent=pi_3OoDRCQRoLKdE8Em1MEAqw8K"
"url": "/v1/charges?payment_intent=pi_3Ooefi4DenidF2LU1DyZ34Mm"
},
"client_secret": "pi_3OoDRCQRoLKdE8Em1MEAqw8K_secret_V5WhuZ8znPBBUc87sQ3xEpFYt",
"client_secret": "pi_3Ooefi4DenidF2LU1DyZ34Mm_secret_w379gPpBGChVwBEUepP0qlRB0",
"confirmation_method": "automatic",
"created": 1708989502,
"created": 1709094190,
"currency": "aud",
"customer": null,
"description": null,
"invoice": null,
"last_payment_error": null,
"latest_charge": "ch_3OoDRCQRoLKdE8Em1jzh5JMF",
"latest_charge": "ch_3Ooefi4DenidF2LU1gG37Leq",
"livemode": false,
"metadata": {},
"next_action": null,
"on_behalf_of": null,
"payment_method": "pm_1OoDRCQRoLKdE8EmoaCnokMm",
"payment_method": "pm_1Ooefh4DenidF2LU9tRCdeQl",
"payment_method_configuration_details": null,
"payment_method_options": {
"card": {
@@ -589,10 +589,10 @@ http_interactions:
"transfer_data": null,
"transfer_group": null
}
recorded_at: Mon, 26 Feb 2024 23:18:23 GMT
recorded_at: Wed, 28 Feb 2024 04:23:11 GMT
- request:
method: post
uri: https://api.stripe.com/v1/charges/ch_3OoDRCQRoLKdE8Em1jzh5JMF/refunds
uri: https://api.stripe.com/v1/charges/ch_3Ooefi4DenidF2LU1gG37Leq/refunds
body:
encoding: UTF-8
string: amount=1000&expand[0]=charge
@@ -610,7 +610,7 @@ http_interactions:
X-Stripe-Client-User-Metadata:
- '{"ip":null}'
Stripe-Account:
- acct_1OoDRAQRoLKdE8Em
- acct_1Ooeff4DenidF2LU
Connection:
- close
Accept-Encoding:
@@ -625,7 +625,7 @@ http_interactions:
Server:
- nginx
Date:
- Mon, 26 Feb 2024 23:18:24 GMT
- Wed, 28 Feb 2024 04:23:12 GMT
Content-Type:
- application/json
Content-Length:
@@ -651,13 +651,13 @@ http_interactions:
'none'; frame-ancestors 'none'; img-src 'self'; script-src 'self' 'report-sample';
style-src 'self'
Idempotency-Key:
- a7cb6bb0-5988-44c8-afd9-fd3a16ff04f1
- f967618e-2bff-4c64-8875-82306c718be6
Original-Request:
- req_hbIdRwHvlCo7RG
- req_5Yjwd0ugW4geJy
Request-Id:
- req_hbIdRwHvlCo7RG
- req_5Yjwd0ugW4geJy
Stripe-Account:
- acct_1OoDRAQRoLKdE8Em
- acct_1Ooeff4DenidF2LU
Stripe-Should-Retry:
- 'false'
Stripe-Version:
@@ -672,12 +672,12 @@ http_interactions:
encoding: UTF-8
string: |-
{
"id": "re_3OoDRCQRoLKdE8Em1JQ7tHyu",
"id": "re_3Ooefi4DenidF2LU1hzSgbUz",
"object": "refund",
"amount": 1000,
"balance_transaction": "txn_3OoDRCQRoLKdE8Em14wLLKJa",
"balance_transaction": "txn_3Ooefi4DenidF2LU1oUen4EE",
"charge": {
"id": "ch_3OoDRCQRoLKdE8Em1jzh5JMF",
"id": "ch_3Ooefi4DenidF2LU1gG37Leq",
"object": "charge",
"amount": 1000,
"amount_captured": 1000,
@@ -685,7 +685,7 @@ http_interactions:
"application": "<HIDDEN-STRIPE_CLIENT_ID>",
"application_fee": null,
"application_fee_amount": null,
"balance_transaction": "txn_3OoDRCQRoLKdE8Em1JsGfBVA",
"balance_transaction": "txn_3Ooefi4DenidF2LU1A5YW6L5",
"billing_details": {
"address": {
"city": null,
@@ -701,7 +701,7 @@ http_interactions:
},
"calculated_statement_descriptor": "OFNOFNOFN",
"captured": true,
"created": 1708989502,
"created": 1709094190,
"currency": "aud",
"customer": null,
"description": null,
@@ -721,13 +721,13 @@ http_interactions:
"network_status": "approved_by_network",
"reason": null,
"risk_level": "normal",
"risk_score": 64,
"risk_score": 60,
"seller_message": "Payment complete.",
"type": "authorized"
},
"paid": true,
"payment_intent": "pi_3OoDRCQRoLKdE8Em1MEAqw8K",
"payment_method": "pm_1OoDRCQRoLKdE8EmoaCnokMm",
"payment_intent": "pi_3Ooefi4DenidF2LU1DyZ34Mm",
"payment_method": "pm_1Ooefh4DenidF2LU9tRCdeQl",
"payment_method_details": {
"card": {
"amount_authorized": 1000,
@@ -770,18 +770,18 @@ http_interactions:
"radar_options": {},
"receipt_email": null,
"receipt_number": null,
"receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xT29EUkFRUm9MS2RFOEVtKMC49K4GMgYTCZ6Gtyo6LBYY_zKc4wTXwwjIbeUatbB2AqyrCrMD5HzAamZUfY2TDUaexvHISDz42z43",
"receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xT29lZmY0RGVuaWRGMkxVKLDq-q4GMgYBQPWVApY6LBZIdxWS5NgOoXSKJhVtXOpcQmkL8UTt0n8vbxpQzooi76bsTotoW945k7-i",
"refunded": true,
"refunds": {
"object": "list",
"data": [
{
"id": "re_3OoDRCQRoLKdE8Em1JQ7tHyu",
"id": "re_3Ooefi4DenidF2LU1hzSgbUz",
"object": "refund",
"amount": 1000,
"balance_transaction": "txn_3OoDRCQRoLKdE8Em14wLLKJa",
"charge": "ch_3OoDRCQRoLKdE8Em1jzh5JMF",
"created": 1708989504,
"balance_transaction": "txn_3Ooefi4DenidF2LU1oUen4EE",
"charge": "ch_3Ooefi4DenidF2LU1gG37Leq",
"created": 1709094191,
"currency": "aud",
"destination_details": {
"card": {
@@ -792,7 +792,7 @@ http_interactions:
"type": "card"
},
"metadata": {},
"payment_intent": "pi_3OoDRCQRoLKdE8Em1MEAqw8K",
"payment_intent": "pi_3Ooefi4DenidF2LU1DyZ34Mm",
"reason": null,
"receipt_number": null,
"source_transfer_reversal": null,
@@ -802,7 +802,7 @@ http_interactions:
],
"has_more": false,
"total_count": 1,
"url": "/v1/charges/ch_3OoDRCQRoLKdE8Em1jzh5JMF/refunds"
"url": "/v1/charges/ch_3Ooefi4DenidF2LU1gG37Leq/refunds"
},
"review": null,
"shipping": null,
@@ -814,7 +814,7 @@ http_interactions:
"transfer_data": null,
"transfer_group": null
},
"created": 1708989504,
"created": 1709094191,
"currency": "aud",
"destination_details": {
"card": {
@@ -825,12 +825,12 @@ http_interactions:
"type": "card"
},
"metadata": {},
"payment_intent": "pi_3OoDRCQRoLKdE8Em1MEAqw8K",
"payment_intent": "pi_3Ooefi4DenidF2LU1DyZ34Mm",
"reason": null,
"receipt_number": null,
"source_transfer_reversal": null,
"status": "succeeded",
"transfer_reversal": null
}
recorded_at: Mon, 26 Feb 2024 23:18:24 GMT
recorded_at: Wed, 28 Feb 2024 04:23:12 GMT
recorded_with: VCR 6.2.0

View File

@@ -14,7 +14,7 @@ http_interactions:
Content-Type:
- application/x-www-form-urlencoded
X-Stripe-Client-Telemetry:
- '{"last_request_metrics":{"request_id":"req_5pxAgyGnD6hohF","request_duration_ms":1395}}'
- '{"last_request_metrics":{"request_id":"req_0zdTS2eXS52wv3","request_duration_ms":1375}}'
Stripe-Version:
- '2023-10-16'
X-Stripe-Client-User-Agent:
@@ -34,7 +34,7 @@ http_interactions:
Server:
- nginx
Date:
- Mon, 26 Feb 2024 23:18:25 GMT
- Wed, 28 Feb 2024 04:23:13 GMT
Content-Type:
- application/json
Content-Length:
@@ -60,7 +60,7 @@ http_interactions:
'none'; frame-ancestors 'none'; img-src 'self'; script-src 'self' 'report-sample';
style-src 'self'
Request-Id:
- req_eSrwVTyd2UFmad
- req_TC671rsepSNnXC
Stripe-Version:
- '2023-10-16'
Vary:
@@ -73,7 +73,7 @@ http_interactions:
encoding: UTF-8
string: |-
{
"id": "pm_1OoDRFKuuB1fWySn8MOpYwav",
"id": "pm_1OoeflKuuB1fWySn43Ej2zjy",
"object": "payment_method",
"billing_details": {
"address": {
@@ -114,19 +114,19 @@ http_interactions:
},
"wallet": null
},
"created": 1708989505,
"created": 1709094193,
"customer": null,
"livemode": false,
"metadata": {},
"type": "card"
}
recorded_at: Mon, 26 Feb 2024 23:18:25 GMT
recorded_at: Wed, 28 Feb 2024 04:23:13 GMT
- request:
method: post
uri: https://api.stripe.com/v1/payment_intents
body:
encoding: UTF-8
string: amount=1000&currency=aud&payment_method=pm_1OoDRFKuuB1fWySn8MOpYwav&payment_method_types[0]=card&capture_method=manual
string: amount=1000&currency=aud&payment_method=pm_1OoeflKuuB1fWySn43Ej2zjy&payment_method_types[0]=card&capture_method=manual
headers:
User-Agent:
- Stripe/v1 RubyBindings/10.10.0
@@ -135,7 +135,7 @@ http_interactions:
Content-Type:
- application/x-www-form-urlencoded
X-Stripe-Client-Telemetry:
- '{"last_request_metrics":{"request_id":"req_eSrwVTyd2UFmad","request_duration_ms":419}}'
- '{"last_request_metrics":{"request_id":"req_TC671rsepSNnXC","request_duration_ms":342}}'
Stripe-Version:
- '2023-10-16'
X-Stripe-Client-User-Agent:
@@ -155,7 +155,7 @@ http_interactions:
Server:
- nginx
Date:
- Mon, 26 Feb 2024 23:18:26 GMT
- Wed, 28 Feb 2024 04:23:14 GMT
Content-Type:
- application/json
Content-Length:
@@ -180,11 +180,11 @@ http_interactions:
default-src 'none'; base-uri 'none'; form-action 'none'; frame-ancestors 'none';
img-src 'self'; script-src 'self' 'report-sample'; style-src 'self'
Idempotency-Key:
- 184e96b8-67b1-4999-8514-597ace058d9d
- e62b12fb-ca7d-4731-a40d-3ea1fe68ea4e
Original-Request:
- req_yXZmn7ZlMMvVbr
- req_iELWfIGpVGFgJW
Request-Id:
- req_yXZmn7ZlMMvVbr
- req_iELWfIGpVGFgJW
Stripe-Should-Retry:
- 'false'
Stripe-Version:
@@ -199,7 +199,7 @@ http_interactions:
encoding: UTF-8
string: |-
{
"id": "pi_3OoDRFKuuB1fWySn0MkE2Wwn",
"id": "pi_3OoeflKuuB1fWySn128KWMQF",
"object": "payment_intent",
"amount": 1000,
"amount_capturable": 0,
@@ -213,9 +213,9 @@ http_interactions:
"canceled_at": null,
"cancellation_reason": null,
"capture_method": "manual",
"client_secret": "pi_3OoDRFKuuB1fWySn0MkE2Wwn_secret_NdqpdBC30d7BgrPsIiBoj8xw8",
"client_secret": "pi_3OoeflKuuB1fWySn128KWMQF_secret_AFZlxzNaGKQhJwyoycEnNnXt9",
"confirmation_method": "automatic",
"created": 1708989505,
"created": 1709094193,
"currency": "aud",
"customer": null,
"description": null,
@@ -226,7 +226,7 @@ http_interactions:
"metadata": {},
"next_action": null,
"on_behalf_of": null,
"payment_method": "pm_1OoDRFKuuB1fWySn8MOpYwav",
"payment_method": "pm_1OoeflKuuB1fWySn43Ej2zjy",
"payment_method_configuration_details": null,
"payment_method_options": {
"card": {
@@ -251,10 +251,10 @@ http_interactions:
"transfer_data": null,
"transfer_group": null
}
recorded_at: Mon, 26 Feb 2024 23:18:26 GMT
recorded_at: Wed, 28 Feb 2024 04:23:14 GMT
- request:
method: get
uri: https://api.stripe.com/v1/payment_intents/pi_3OoDRFKuuB1fWySn0MkE2Wwn
uri: https://api.stripe.com/v1/payment_intents/pi_3OoeflKuuB1fWySn128KWMQF
body:
encoding: US-ASCII
string: ''
@@ -266,7 +266,7 @@ http_interactions:
Content-Type:
- application/x-www-form-urlencoded
X-Stripe-Client-Telemetry:
- '{"last_request_metrics":{"request_id":"req_yXZmn7ZlMMvVbr","request_duration_ms":406}}'
- '{"last_request_metrics":{"request_id":"req_iELWfIGpVGFgJW","request_duration_ms":471}}'
Stripe-Version:
- '2023-10-16'
X-Stripe-Client-User-Agent:
@@ -286,7 +286,7 @@ http_interactions:
Server:
- nginx
Date:
- Mon, 26 Feb 2024 23:18:26 GMT
- Wed, 28 Feb 2024 04:23:14 GMT
Content-Type:
- application/json
Content-Length:
@@ -312,7 +312,7 @@ http_interactions:
'none'; frame-ancestors 'none'; img-src 'self'; script-src 'self' 'report-sample';
style-src 'self'
Request-Id:
- req_4LwwjkiCeJTWny
- req_urrrJYueyeMAx7
Stripe-Version:
- '2023-10-16'
Vary:
@@ -325,7 +325,7 @@ http_interactions:
encoding: UTF-8
string: |-
{
"id": "pi_3OoDRFKuuB1fWySn0MkE2Wwn",
"id": "pi_3OoeflKuuB1fWySn128KWMQF",
"object": "payment_intent",
"amount": 1000,
"amount_capturable": 0,
@@ -339,9 +339,9 @@ http_interactions:
"canceled_at": null,
"cancellation_reason": null,
"capture_method": "manual",
"client_secret": "pi_3OoDRFKuuB1fWySn0MkE2Wwn_secret_NdqpdBC30d7BgrPsIiBoj8xw8",
"client_secret": "pi_3OoeflKuuB1fWySn128KWMQF_secret_AFZlxzNaGKQhJwyoycEnNnXt9",
"confirmation_method": "automatic",
"created": 1708989505,
"created": 1709094193,
"currency": "aud",
"customer": null,
"description": null,
@@ -352,7 +352,7 @@ http_interactions:
"metadata": {},
"next_action": null,
"on_behalf_of": null,
"payment_method": "pm_1OoDRFKuuB1fWySn8MOpYwav",
"payment_method": "pm_1OoeflKuuB1fWySn43Ej2zjy",
"payment_method_configuration_details": null,
"payment_method_options": {
"card": {
@@ -377,5 +377,5 @@ http_interactions:
"transfer_data": null,
"transfer_group": null
}
recorded_at: Mon, 26 Feb 2024 23:18:26 GMT
recorded_at: Wed, 28 Feb 2024 04:23:14 GMT
recorded_with: VCR 6.2.0

View File

@@ -13,8 +13,6 @@ http_interactions:
- Bearer <HIDDEN-STRIPE_INSTANCE_SECRET_KEY>
Content-Type:
- application/x-www-form-urlencoded
X-Stripe-Client-Telemetry:
- '{"last_request_metrics":{"request_id":"req_23MVJCpcGmFoMK","request_duration_ms":714}}'
Stripe-Version:
- '2023-10-16'
X-Stripe-Client-User-Agent:
@@ -34,7 +32,7 @@ http_interactions:
Server:
- nginx
Date:
- Mon, 26 Feb 2024 23:18:03 GMT
- Wed, 28 Feb 2024 04:22:50 GMT
Content-Type:
- application/json
Content-Length:
@@ -60,7 +58,7 @@ http_interactions:
'none'; frame-ancestors 'none'; img-src 'self'; script-src 'self' 'report-sample';
style-src 'self'
Request-Id:
- req_KLpwv6s9SAPg80
- req_C80lOiQ174c6i0
Stripe-Version:
- '2023-10-16'
Vary:
@@ -73,7 +71,7 @@ http_interactions:
encoding: UTF-8
string: |-
{
"id": "pm_1OoDQtKuuB1fWySnan7tn1C1",
"id": "pm_1OoefOKuuB1fWySnRppMNGu2",
"object": "payment_method",
"billing_details": {
"address": {
@@ -114,19 +112,19 @@ http_interactions:
},
"wallet": null
},
"created": 1708989483,
"created": 1709094170,
"customer": null,
"livemode": false,
"metadata": {},
"type": "card"
}
recorded_at: Mon, 26 Feb 2024 23:18:03 GMT
recorded_at: Wed, 28 Feb 2024 04:22:50 GMT
- request:
method: post
uri: https://api.stripe.com/v1/payment_intents
body:
encoding: UTF-8
string: amount=1000&currency=aud&payment_method=pm_1OoDQtKuuB1fWySnan7tn1C1&payment_method_types[0]=card&capture_method=manual
string: amount=1000&currency=aud&payment_method=pm_1OoefOKuuB1fWySnRppMNGu2&payment_method_types[0]=card&capture_method=manual
headers:
User-Agent:
- Stripe/v1 RubyBindings/10.10.0
@@ -135,7 +133,7 @@ http_interactions:
Content-Type:
- application/x-www-form-urlencoded
X-Stripe-Client-Telemetry:
- '{"last_request_metrics":{"request_id":"req_KLpwv6s9SAPg80","request_duration_ms":361}}'
- '{"last_request_metrics":{"request_id":"req_C80lOiQ174c6i0","request_duration_ms":534}}'
Stripe-Version:
- '2023-10-16'
X-Stripe-Client-User-Agent:
@@ -155,7 +153,7 @@ http_interactions:
Server:
- nginx
Date:
- Mon, 26 Feb 2024 23:18:04 GMT
- Wed, 28 Feb 2024 04:22:51 GMT
Content-Type:
- application/json
Content-Length:
@@ -180,11 +178,11 @@ http_interactions:
default-src 'none'; base-uri 'none'; form-action 'none'; frame-ancestors 'none';
img-src 'self'; script-src 'self' 'report-sample'; style-src 'self'
Idempotency-Key:
- dbfdf33a-b189-434b-9f35-f84bace3850e
- b22256dd-6a6a-4d2f-8165-1ab4b95b7cce
Original-Request:
- req_wMWTTImxxd99lK
- req_I48KhbL4d4cHh2
Request-Id:
- req_wMWTTImxxd99lK
- req_I48KhbL4d4cHh2
Stripe-Should-Retry:
- 'false'
Stripe-Version:
@@ -199,7 +197,7 @@ http_interactions:
encoding: UTF-8
string: |-
{
"id": "pi_3OoDQuKuuB1fWySn2KsZ2dYy",
"id": "pi_3OoefPKuuB1fWySn2a1CUhKr",
"object": "payment_intent",
"amount": 1000,
"amount_capturable": 0,
@@ -213,9 +211,9 @@ http_interactions:
"canceled_at": null,
"cancellation_reason": null,
"capture_method": "manual",
"client_secret": "pi_3OoDQuKuuB1fWySn2KsZ2dYy_secret_srp4rTvl0vZLelDDasV3hstpA",
"client_secret": "pi_3OoefPKuuB1fWySn2a1CUhKr_secret_jrv3bAuw620fN4yEQ39dnpTkT",
"confirmation_method": "automatic",
"created": 1708989484,
"created": 1709094171,
"currency": "aud",
"customer": null,
"description": null,
@@ -226,7 +224,7 @@ http_interactions:
"metadata": {},
"next_action": null,
"on_behalf_of": null,
"payment_method": "pm_1OoDQtKuuB1fWySnan7tn1C1",
"payment_method": "pm_1OoefOKuuB1fWySnRppMNGu2",
"payment_method_configuration_details": null,
"payment_method_options": {
"card": {
@@ -251,10 +249,10 @@ http_interactions:
"transfer_data": null,
"transfer_group": null
}
recorded_at: Mon, 26 Feb 2024 23:18:04 GMT
recorded_at: Wed, 28 Feb 2024 04:22:51 GMT
- request:
method: post
uri: https://api.stripe.com/v1/payment_intents/pi_3OoDQuKuuB1fWySn2KsZ2dYy/confirm
uri: https://api.stripe.com/v1/payment_intents/pi_3OoefPKuuB1fWySn2a1CUhKr/confirm
body:
encoding: US-ASCII
string: ''
@@ -266,7 +264,7 @@ http_interactions:
Content-Type:
- application/x-www-form-urlencoded
X-Stripe-Client-Telemetry:
- '{"last_request_metrics":{"request_id":"req_wMWTTImxxd99lK","request_duration_ms":397}}'
- '{"last_request_metrics":{"request_id":"req_I48KhbL4d4cHh2","request_duration_ms":444}}'
Stripe-Version:
- '2023-10-16'
X-Stripe-Client-User-Agent:
@@ -286,7 +284,7 @@ http_interactions:
Server:
- nginx
Date:
- Mon, 26 Feb 2024 23:18:05 GMT
- Wed, 28 Feb 2024 04:22:52 GMT
Content-Type:
- application/json
Content-Length:
@@ -312,11 +310,11 @@ http_interactions:
'none'; frame-ancestors 'none'; img-src 'self'; script-src 'self' 'report-sample';
style-src 'self'
Idempotency-Key:
- c4a3a839-a9c3-4780-9b87-12da5bcec40b
- 87c23353-1da7-4401-90d8-782133288905
Original-Request:
- req_8fG6knCx8x9Rxy
- req_3MS3zmJh2lqbIp
Request-Id:
- req_8fG6knCx8x9Rxy
- req_3MS3zmJh2lqbIp
Stripe-Should-Retry:
- 'false'
Stripe-Version:
@@ -331,7 +329,7 @@ http_interactions:
encoding: UTF-8
string: |-
{
"id": "pi_3OoDQuKuuB1fWySn2KsZ2dYy",
"id": "pi_3OoefPKuuB1fWySn2a1CUhKr",
"object": "payment_intent",
"amount": 1000,
"amount_capturable": 1000,
@@ -345,20 +343,20 @@ http_interactions:
"canceled_at": null,
"cancellation_reason": null,
"capture_method": "manual",
"client_secret": "pi_3OoDQuKuuB1fWySn2KsZ2dYy_secret_srp4rTvl0vZLelDDasV3hstpA",
"client_secret": "pi_3OoefPKuuB1fWySn2a1CUhKr_secret_jrv3bAuw620fN4yEQ39dnpTkT",
"confirmation_method": "automatic",
"created": 1708989484,
"created": 1709094171,
"currency": "aud",
"customer": null,
"description": null,
"invoice": null,
"last_payment_error": null,
"latest_charge": "ch_3OoDQuKuuB1fWySn2GskmbBH",
"latest_charge": "ch_3OoefPKuuB1fWySn2XgChplD",
"livemode": false,
"metadata": {},
"next_action": null,
"on_behalf_of": null,
"payment_method": "pm_1OoDQtKuuB1fWySnan7tn1C1",
"payment_method": "pm_1OoefOKuuB1fWySnRppMNGu2",
"payment_method_configuration_details": null,
"payment_method_options": {
"card": {
@@ -383,10 +381,10 @@ http_interactions:
"transfer_data": null,
"transfer_group": null
}
recorded_at: Mon, 26 Feb 2024 23:18:05 GMT
recorded_at: Wed, 28 Feb 2024 04:22:52 GMT
- request:
method: get
uri: https://api.stripe.com/v1/payment_intents/pi_3OoDQuKuuB1fWySn2KsZ2dYy
uri: https://api.stripe.com/v1/payment_intents/pi_3OoefPKuuB1fWySn2a1CUhKr
body:
encoding: US-ASCII
string: ''
@@ -398,7 +396,7 @@ http_interactions:
Content-Type:
- application/x-www-form-urlencoded
X-Stripe-Client-Telemetry:
- '{"last_request_metrics":{"request_id":"req_8fG6knCx8x9Rxy","request_duration_ms":961}}'
- '{"last_request_metrics":{"request_id":"req_3MS3zmJh2lqbIp","request_duration_ms":985}}'
Stripe-Version:
- '2023-10-16'
X-Stripe-Client-User-Agent:
@@ -418,7 +416,7 @@ http_interactions:
Server:
- nginx
Date:
- Mon, 26 Feb 2024 23:18:06 GMT
- Wed, 28 Feb 2024 04:22:53 GMT
Content-Type:
- application/json
Content-Length:
@@ -444,7 +442,7 @@ http_interactions:
'none'; frame-ancestors 'none'; img-src 'self'; script-src 'self' 'report-sample';
style-src 'self'
Request-Id:
- req_qO0Ww4PpgWg5KM
- req_XPJt16n7nTK00g
Stripe-Version:
- '2023-10-16'
Vary:
@@ -457,7 +455,7 @@ http_interactions:
encoding: UTF-8
string: |-
{
"id": "pi_3OoDQuKuuB1fWySn2KsZ2dYy",
"id": "pi_3OoefPKuuB1fWySn2a1CUhKr",
"object": "payment_intent",
"amount": 1000,
"amount_capturable": 1000,
@@ -471,20 +469,20 @@ http_interactions:
"canceled_at": null,
"cancellation_reason": null,
"capture_method": "manual",
"client_secret": "pi_3OoDQuKuuB1fWySn2KsZ2dYy_secret_srp4rTvl0vZLelDDasV3hstpA",
"client_secret": "pi_3OoefPKuuB1fWySn2a1CUhKr_secret_jrv3bAuw620fN4yEQ39dnpTkT",
"confirmation_method": "automatic",
"created": 1708989484,
"created": 1709094171,
"currency": "aud",
"customer": null,
"description": null,
"invoice": null,
"last_payment_error": null,
"latest_charge": "ch_3OoDQuKuuB1fWySn2GskmbBH",
"latest_charge": "ch_3OoefPKuuB1fWySn2XgChplD",
"livemode": false,
"metadata": {},
"next_action": null,
"on_behalf_of": null,
"payment_method": "pm_1OoDQtKuuB1fWySnan7tn1C1",
"payment_method": "pm_1OoefOKuuB1fWySnRppMNGu2",
"payment_method_configuration_details": null,
"payment_method_options": {
"card": {
@@ -509,10 +507,10 @@ http_interactions:
"transfer_data": null,
"transfer_group": null
}
recorded_at: Mon, 26 Feb 2024 23:18:06 GMT
recorded_at: Wed, 28 Feb 2024 04:22:53 GMT
- request:
method: post
uri: https://api.stripe.com/v1/payment_intents/pi_3OoDQuKuuB1fWySn2KsZ2dYy/capture
uri: https://api.stripe.com/v1/payment_intents/pi_3OoefPKuuB1fWySn2a1CUhKr/capture
body:
encoding: UTF-8
string: amount_to_capture=1000
@@ -543,7 +541,7 @@ http_interactions:
Server:
- nginx
Date:
- Mon, 26 Feb 2024 23:18:07 GMT
- Wed, 28 Feb 2024 04:22:54 GMT
Content-Type:
- application/json
Content-Length:
@@ -569,11 +567,11 @@ http_interactions:
'none'; frame-ancestors 'none'; img-src 'self'; script-src 'self' 'report-sample';
style-src 'self'
Idempotency-Key:
- 0f2d7880-e8d6-4be3-9518-31c50c67098d
- 924a5a52-a3b7-454d-9525-a4f745643bcc
Original-Request:
- req_yGg76wZk7CqoZY
- req_0mMZdvmaHu1xkb
Request-Id:
- req_yGg76wZk7CqoZY
- req_0mMZdvmaHu1xkb
Stripe-Should-Retry:
- 'false'
Stripe-Version:
@@ -588,7 +586,7 @@ http_interactions:
encoding: UTF-8
string: |-
{
"id": "pi_3OoDQuKuuB1fWySn2KsZ2dYy",
"id": "pi_3OoefPKuuB1fWySn2a1CUhKr",
"object": "payment_intent",
"amount": 1000,
"amount_capturable": 0,
@@ -606,7 +604,7 @@ http_interactions:
"object": "list",
"data": [
{
"id": "ch_3OoDQuKuuB1fWySn2GskmbBH",
"id": "ch_3OoefPKuuB1fWySn2XgChplD",
"object": "charge",
"amount": 1000,
"amount_captured": 1000,
@@ -615,7 +613,7 @@ http_interactions:
"application": null,
"application_fee": null,
"application_fee_amount": null,
"balance_transaction": "txn_3OoDQuKuuB1fWySn2jKTEpcO",
"balance_transaction": "txn_3OoefPKuuB1fWySn2KbEy5KT",
"billing_details": {
"address": {
"city": null,
@@ -631,7 +629,7 @@ http_interactions:
},
"calculated_statement_descriptor": "OFNOFNOFN",
"captured": true,
"created": 1708989484,
"created": 1709094171,
"currency": "aud",
"customer": null,
"description": null,
@@ -651,18 +649,18 @@ http_interactions:
"network_status": "approved_by_network",
"reason": null,
"risk_level": "normal",
"risk_score": 54,
"risk_score": 24,
"seller_message": "Payment complete.",
"type": "authorized"
},
"paid": true,
"payment_intent": "pi_3OoDQuKuuB1fWySn2KsZ2dYy",
"payment_method": "pm_1OoDQtKuuB1fWySnan7tn1C1",
"payment_intent": "pi_3OoefPKuuB1fWySn2a1CUhKr",
"payment_method": "pm_1OoefOKuuB1fWySnRppMNGu2",
"payment_method_details": {
"card": {
"amount_authorized": 1000,
"brand": "mastercard",
"capture_before": 1709594284,
"capture_before": 1709698971,
"checks": {
"address_line1_check": null,
"address_postal_code_check": null,
@@ -701,14 +699,14 @@ http_interactions:
"radar_options": {},
"receipt_email": null,
"receipt_number": null,
"receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xRmlxRXNLdXVCMWZXeVNuKK-49K4GMgZmgAsdYi86LBaAvvcn5C_2FrHqfJUvI9BMvlQMtEX0FPRVuHQ-GLpc_rYzzCk6anmfAuKg",
"receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xRmlxRXNLdXVCMWZXeVNuKJ7q-q4GMgbcaqyB9xQ6LBbyuqO6Pzq_DRbuPPU_3KgWARob19ouqfjqfTie9nYDPO4CNF1NF5JvJAg2",
"refunded": false,
"refunds": {
"object": "list",
"data": [],
"has_more": false,
"total_count": 0,
"url": "/v1/charges/ch_3OoDQuKuuB1fWySn2GskmbBH/refunds"
"url": "/v1/charges/ch_3OoefPKuuB1fWySn2XgChplD/refunds"
},
"review": null,
"shipping": null,
@@ -723,22 +721,22 @@ http_interactions:
],
"has_more": false,
"total_count": 1,
"url": "/v1/charges?payment_intent=pi_3OoDQuKuuB1fWySn2KsZ2dYy"
"url": "/v1/charges?payment_intent=pi_3OoefPKuuB1fWySn2a1CUhKr"
},
"client_secret": "pi_3OoDQuKuuB1fWySn2KsZ2dYy_secret_srp4rTvl0vZLelDDasV3hstpA",
"client_secret": "pi_3OoefPKuuB1fWySn2a1CUhKr_secret_jrv3bAuw620fN4yEQ39dnpTkT",
"confirmation_method": "automatic",
"created": 1708989484,
"created": 1709094171,
"currency": "aud",
"customer": null,
"description": null,
"invoice": null,
"last_payment_error": null,
"latest_charge": "ch_3OoDQuKuuB1fWySn2GskmbBH",
"latest_charge": "ch_3OoefPKuuB1fWySn2XgChplD",
"livemode": false,
"metadata": {},
"next_action": null,
"on_behalf_of": null,
"payment_method": "pm_1OoDQtKuuB1fWySnan7tn1C1",
"payment_method": "pm_1OoefOKuuB1fWySnRppMNGu2",
"payment_method_configuration_details": null,
"payment_method_options": {
"card": {
@@ -763,5 +761,5 @@ http_interactions:
"transfer_data": null,
"transfer_group": null
}
recorded_at: Mon, 26 Feb 2024 23:18:07 GMT
recorded_at: Wed, 28 Feb 2024 04:22:54 GMT
recorded_with: VCR 6.2.0

View File

@@ -14,7 +14,7 @@ http_interactions:
Content-Type:
- application/x-www-form-urlencoded
X-Stripe-Client-Telemetry:
- '{"last_request_metrics":{"request_id":"req_qO0Ww4PpgWg5KM","request_duration_ms":279}}'
- '{"last_request_metrics":{"request_id":"req_XPJt16n7nTK00g","request_duration_ms":340}}'
Stripe-Version:
- '2023-10-16'
X-Stripe-Client-User-Agent:
@@ -34,7 +34,7 @@ http_interactions:
Server:
- nginx
Date:
- Mon, 26 Feb 2024 23:18:07 GMT
- Wed, 28 Feb 2024 04:22:55 GMT
Content-Type:
- application/json
Content-Length:
@@ -60,7 +60,7 @@ http_interactions:
'none'; frame-ancestors 'none'; img-src 'self'; script-src 'self' 'report-sample';
style-src 'self'
Request-Id:
- req_czHKinzILS7AFE
- req_PkEIZ0ytajfFi0
Stripe-Version:
- '2023-10-16'
Vary:
@@ -73,7 +73,7 @@ http_interactions:
encoding: UTF-8
string: |-
{
"id": "pm_1OoDQxKuuB1fWySnSvhi0vIM",
"id": "pm_1OoefTKuuB1fWySnZGdqP7aU",
"object": "payment_method",
"billing_details": {
"address": {
@@ -114,19 +114,19 @@ http_interactions:
},
"wallet": null
},
"created": 1708989487,
"created": 1709094175,
"customer": null,
"livemode": false,
"metadata": {},
"type": "card"
}
recorded_at: Mon, 26 Feb 2024 23:18:07 GMT
recorded_at: Wed, 28 Feb 2024 04:22:55 GMT
- request:
method: post
uri: https://api.stripe.com/v1/payment_intents
body:
encoding: UTF-8
string: amount=1000&currency=aud&payment_method=pm_1OoDQxKuuB1fWySnSvhi0vIM&payment_method_types[0]=card&capture_method=manual
string: amount=1000&currency=aud&payment_method=pm_1OoefTKuuB1fWySnZGdqP7aU&payment_method_types[0]=card&capture_method=manual
headers:
User-Agent:
- Stripe/v1 RubyBindings/10.10.0
@@ -135,7 +135,7 @@ http_interactions:
Content-Type:
- application/x-www-form-urlencoded
X-Stripe-Client-Telemetry:
- '{"last_request_metrics":{"request_id":"req_czHKinzILS7AFE","request_duration_ms":324}}'
- '{"last_request_metrics":{"request_id":"req_PkEIZ0ytajfFi0","request_duration_ms":393}}'
Stripe-Version:
- '2023-10-16'
X-Stripe-Client-User-Agent:
@@ -155,7 +155,7 @@ http_interactions:
Server:
- nginx
Date:
- Mon, 26 Feb 2024 23:18:08 GMT
- Wed, 28 Feb 2024 04:22:55 GMT
Content-Type:
- application/json
Content-Length:
@@ -180,11 +180,11 @@ http_interactions:
default-src 'none'; base-uri 'none'; form-action 'none'; frame-ancestors 'none';
img-src 'self'; script-src 'self' 'report-sample'; style-src 'self'
Idempotency-Key:
- 3488f9d6-5de5-4f37-afc7-a76e1ea86cb1
- 2483ffe7-b417-4399-aa5d-8e07a07f3c4a
Original-Request:
- req_ka9NvhQ2HUxvCx
- req_8qPyCfGouYra9P
Request-Id:
- req_ka9NvhQ2HUxvCx
- req_8qPyCfGouYra9P
Stripe-Should-Retry:
- 'false'
Stripe-Version:
@@ -199,7 +199,7 @@ http_interactions:
encoding: UTF-8
string: |-
{
"id": "pi_3OoDQxKuuB1fWySn2v6wzn50",
"id": "pi_3OoefTKuuB1fWySn1nUc8iAF",
"object": "payment_intent",
"amount": 1000,
"amount_capturable": 0,
@@ -213,9 +213,9 @@ http_interactions:
"canceled_at": null,
"cancellation_reason": null,
"capture_method": "manual",
"client_secret": "pi_3OoDQxKuuB1fWySn2v6wzn50_secret_gBr81jkfTiQdt2UsVPw0cAfDo",
"client_secret": "pi_3OoefTKuuB1fWySn1nUc8iAF_secret_P1PkiljJQA3bUt1qjafq1N30Y",
"confirmation_method": "automatic",
"created": 1708989487,
"created": 1709094175,
"currency": "aud",
"customer": null,
"description": null,
@@ -226,7 +226,7 @@ http_interactions:
"metadata": {},
"next_action": null,
"on_behalf_of": null,
"payment_method": "pm_1OoDQxKuuB1fWySnSvhi0vIM",
"payment_method": "pm_1OoefTKuuB1fWySnZGdqP7aU",
"payment_method_configuration_details": null,
"payment_method_options": {
"card": {
@@ -251,10 +251,10 @@ http_interactions:
"transfer_data": null,
"transfer_group": null
}
recorded_at: Mon, 26 Feb 2024 23:18:08 GMT
recorded_at: Wed, 28 Feb 2024 04:22:55 GMT
- request:
method: post
uri: https://api.stripe.com/v1/payment_intents/pi_3OoDQxKuuB1fWySn2v6wzn50/confirm
uri: https://api.stripe.com/v1/payment_intents/pi_3OoefTKuuB1fWySn1nUc8iAF/confirm
body:
encoding: US-ASCII
string: ''
@@ -266,7 +266,7 @@ http_interactions:
Content-Type:
- application/x-www-form-urlencoded
X-Stripe-Client-Telemetry:
- '{"last_request_metrics":{"request_id":"req_ka9NvhQ2HUxvCx","request_duration_ms":386}}'
- '{"last_request_metrics":{"request_id":"req_8qPyCfGouYra9P","request_duration_ms":408}}'
Stripe-Version:
- '2023-10-16'
X-Stripe-Client-User-Agent:
@@ -286,7 +286,7 @@ http_interactions:
Server:
- nginx
Date:
- Mon, 26 Feb 2024 23:18:08 GMT
- Wed, 28 Feb 2024 04:22:56 GMT
Content-Type:
- application/json
Content-Length:
@@ -312,11 +312,11 @@ http_interactions:
'none'; frame-ancestors 'none'; img-src 'self'; script-src 'self' 'report-sample';
style-src 'self'
Idempotency-Key:
- e5d77b32-932c-426a-950b-184567a796de
- 680027e4-2ed8-4df3-9f5e-41477748d594
Original-Request:
- req_Io9FilMaYLuSaM
- req_RZnI8d1lN97iCq
Request-Id:
- req_Io9FilMaYLuSaM
- req_RZnI8d1lN97iCq
Stripe-Should-Retry:
- 'false'
Stripe-Version:
@@ -331,7 +331,7 @@ http_interactions:
encoding: UTF-8
string: |-
{
"id": "pi_3OoDQxKuuB1fWySn2v6wzn50",
"id": "pi_3OoefTKuuB1fWySn1nUc8iAF",
"object": "payment_intent",
"amount": 1000,
"amount_capturable": 1000,
@@ -345,20 +345,20 @@ http_interactions:
"canceled_at": null,
"cancellation_reason": null,
"capture_method": "manual",
"client_secret": "pi_3OoDQxKuuB1fWySn2v6wzn50_secret_gBr81jkfTiQdt2UsVPw0cAfDo",
"client_secret": "pi_3OoefTKuuB1fWySn1nUc8iAF_secret_P1PkiljJQA3bUt1qjafq1N30Y",
"confirmation_method": "automatic",
"created": 1708989487,
"created": 1709094175,
"currency": "aud",
"customer": null,
"description": null,
"invoice": null,
"last_payment_error": null,
"latest_charge": "ch_3OoDQxKuuB1fWySn21xsU35T",
"latest_charge": "ch_3OoefTKuuB1fWySn115Vyr1m",
"livemode": false,
"metadata": {},
"next_action": null,
"on_behalf_of": null,
"payment_method": "pm_1OoDQxKuuB1fWySnSvhi0vIM",
"payment_method": "pm_1OoefTKuuB1fWySnZGdqP7aU",
"payment_method_configuration_details": null,
"payment_method_options": {
"card": {
@@ -383,5 +383,5 @@ http_interactions:
"transfer_data": null,
"transfer_group": null
}
recorded_at: Mon, 26 Feb 2024 23:18:09 GMT
recorded_at: Wed, 28 Feb 2024 04:22:56 GMT
recorded_with: VCR 6.2.0

View File

@@ -14,7 +14,7 @@ http_interactions:
Content-Type:
- application/x-www-form-urlencoded
X-Stripe-Client-Telemetry:
- '{"last_request_metrics":{"request_id":"req_Io9FilMaYLuSaM","request_duration_ms":908}}'
- '{"last_request_metrics":{"request_id":"req_RZnI8d1lN97iCq","request_duration_ms":986}}'
Stripe-Version:
- '2023-10-16'
X-Stripe-Client-User-Agent:
@@ -34,7 +34,7 @@ http_interactions:
Server:
- nginx
Date:
- Mon, 26 Feb 2024 23:18:11 GMT
- Wed, 28 Feb 2024 04:22:58 GMT
Content-Type:
- application/json
Content-Length:
@@ -59,11 +59,11 @@ http_interactions:
default-src 'none'; base-uri 'none'; form-action 'none'; frame-ancestors 'none';
img-src 'self'; script-src 'self' 'report-sample'; style-src 'self'
Idempotency-Key:
- ed4002e3-1994-46ba-9d16-d08827a4e1dc
- 54580d6e-e359-4cb8-bd6f-19755b32a54b
Original-Request:
- req_q4YMtUiD7aQJB9
- req_tvTBJjnxpf5qXy
Request-Id:
- req_q4YMtUiD7aQJB9
- req_tvTBJjnxpf5qXy
Stripe-Should-Retry:
- 'false'
Stripe-Version:
@@ -78,7 +78,7 @@ http_interactions:
encoding: UTF-8
string: |-
{
"id": "acct_1OoDQz4K6DRMoG9d",
"id": "acct_1OoefV4C2tKH5dGL",
"object": "account",
"business_profile": {
"annual_revenue": null,
@@ -100,7 +100,7 @@ http_interactions:
"type": "application"
},
"country": "AU",
"created": 1708989490,
"created": 1709094178,
"default_currency": "aud",
"details_submitted": false,
"email": "carrot.producer@example.com",
@@ -109,7 +109,7 @@ http_interactions:
"data": [],
"has_more": false,
"total_count": 0,
"url": "/v1/accounts/acct_1OoDQz4K6DRMoG9d/external_accounts"
"url": "/v1/accounts/acct_1OoefV4C2tKH5dGL/external_accounts"
},
"future_requirements": {
"alternatives": [],
@@ -206,7 +206,7 @@ http_interactions:
},
"type": "standard"
}
recorded_at: Mon, 26 Feb 2024 23:18:11 GMT
recorded_at: Wed, 28 Feb 2024 04:22:58 GMT
- request:
method: get
uri: https://api.stripe.com/v1/payment_methods/pm_card_mastercard
@@ -221,7 +221,7 @@ http_interactions:
Content-Type:
- application/x-www-form-urlencoded
X-Stripe-Client-Telemetry:
- '{"last_request_metrics":{"request_id":"req_q4YMtUiD7aQJB9","request_duration_ms":1647}}'
- '{"last_request_metrics":{"request_id":"req_tvTBJjnxpf5qXy","request_duration_ms":1696}}'
Stripe-Version:
- '2023-10-16'
X-Stripe-Client-User-Agent:
@@ -241,7 +241,7 @@ http_interactions:
Server:
- nginx
Date:
- Mon, 26 Feb 2024 23:18:12 GMT
- Wed, 28 Feb 2024 04:23:00 GMT
Content-Type:
- application/json
Content-Length:
@@ -267,7 +267,7 @@ http_interactions:
'none'; frame-ancestors 'none'; img-src 'self'; script-src 'self' 'report-sample';
style-src 'self'
Request-Id:
- req_rE6qWwsq2oadyU
- req_vV7bfcGNN6GDXn
Stripe-Version:
- '2023-10-16'
Vary:
@@ -280,7 +280,7 @@ http_interactions:
encoding: UTF-8
string: |-
{
"id": "pm_1OoDR1KuuB1fWySnxBTpHdK8",
"id": "pm_1OoefXKuuB1fWySn407A6STW",
"object": "payment_method",
"billing_details": {
"address": {
@@ -321,13 +321,13 @@ http_interactions:
},
"wallet": null
},
"created": 1708989491,
"created": 1709094179,
"customer": null,
"livemode": false,
"metadata": {},
"type": "card"
}
recorded_at: Mon, 26 Feb 2024 23:18:12 GMT
recorded_at: Wed, 28 Feb 2024 04:23:00 GMT
- request:
method: post
uri: https://api.stripe.com/v1/payment_intents
@@ -342,7 +342,7 @@ http_interactions:
Content-Type:
- application/x-www-form-urlencoded
X-Stripe-Client-Telemetry:
- '{"last_request_metrics":{"request_id":"req_rE6qWwsq2oadyU","request_duration_ms":371}}'
- '{"last_request_metrics":{"request_id":"req_vV7bfcGNN6GDXn","request_duration_ms":381}}'
Stripe-Version:
- '2023-10-16'
X-Stripe-Client-User-Agent:
@@ -351,7 +351,7 @@ http_interactions:
9.4.0, GNU ld (GNU Binutils for Ubuntu) 2.34) #102~20.04.1-Ubuntu SMP Mon
Jan 15 13:09:14 UTC 2024","hostname":"gaetan-Dell-G15"}'
Stripe-Account:
- acct_1OoDQz4K6DRMoG9d
- acct_1OoefV4C2tKH5dGL
Accept-Encoding:
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
Accept:
@@ -364,7 +364,7 @@ http_interactions:
Server:
- nginx
Date:
- Mon, 26 Feb 2024 23:18:13 GMT
- Wed, 28 Feb 2024 04:23:01 GMT
Content-Type:
- application/json
Content-Length:
@@ -389,13 +389,13 @@ http_interactions:
default-src 'none'; base-uri 'none'; form-action 'none'; frame-ancestors 'none';
img-src 'self'; script-src 'self' 'report-sample'; style-src 'self'
Idempotency-Key:
- 42eedad4-c8ab-4718-9022-68b06f0ae50e
- 2989f409-6a08-4cfa-a4fa-dd10e361ed8c
Original-Request:
- req_VFkVTpNLhdYDSP
- req_t1G1fXjle87ldK
Request-Id:
- req_VFkVTpNLhdYDSP
- req_t1G1fXjle87ldK
Stripe-Account:
- acct_1OoDQz4K6DRMoG9d
- acct_1OoefV4C2tKH5dGL
Stripe-Should-Retry:
- 'false'
Stripe-Version:
@@ -410,7 +410,7 @@ http_interactions:
encoding: UTF-8
string: |-
{
"id": "pi_3OoDR24K6DRMoG9d0SbyMf0l",
"id": "pi_3OoefY4C2tKH5dGL1GZJ9p6K",
"object": "payment_intent",
"amount": 1000,
"amount_capturable": 0,
@@ -424,20 +424,20 @@ http_interactions:
"canceled_at": null,
"cancellation_reason": null,
"capture_method": "automatic",
"client_secret": "pi_3OoDR24K6DRMoG9d0SbyMf0l_secret_pT8dTrVG0PppJA5sAWaUd98w5",
"client_secret": "pi_3OoefY4C2tKH5dGL1GZJ9p6K_secret_yTGvOEMPhBORAgEQagwJpXTPI",
"confirmation_method": "automatic",
"created": 1708989492,
"created": 1709094180,
"currency": "aud",
"customer": null,
"description": null,
"invoice": null,
"last_payment_error": null,
"latest_charge": "ch_3OoDR24K6DRMoG9d0ggx7xob",
"latest_charge": "ch_3OoefY4C2tKH5dGL1VlO0lYA",
"livemode": false,
"metadata": {},
"next_action": null,
"on_behalf_of": null,
"payment_method": "pm_1OoDR24K6DRMoG9d09thlZE0",
"payment_method": "pm_1OoefY4C2tKH5dGL4j5cFhFa",
"payment_method_configuration_details": null,
"payment_method_options": {
"card": {
@@ -462,10 +462,10 @@ http_interactions:
"transfer_data": null,
"transfer_group": null
}
recorded_at: Mon, 26 Feb 2024 23:18:13 GMT
recorded_at: Wed, 28 Feb 2024 04:23:01 GMT
- request:
method: get
uri: https://api.stripe.com/v1/payment_intents/pi_3OoDR24K6DRMoG9d0SbyMf0l
uri: https://api.stripe.com/v1/payment_intents/pi_3OoefY4C2tKH5dGL1GZJ9p6K
body:
encoding: US-ASCII
string: ''
@@ -477,7 +477,7 @@ http_interactions:
Content-Type:
- application/x-www-form-urlencoded
X-Stripe-Client-Telemetry:
- '{"last_request_metrics":{"request_id":"req_VFkVTpNLhdYDSP","request_duration_ms":1532}}'
- '{"last_request_metrics":{"request_id":"req_t1G1fXjle87ldK","request_duration_ms":1504}}'
Stripe-Version:
- '2023-10-16'
X-Stripe-Client-User-Agent:
@@ -486,7 +486,7 @@ http_interactions:
9.4.0, GNU ld (GNU Binutils for Ubuntu) 2.34) #102~20.04.1-Ubuntu SMP Mon
Jan 15 13:09:14 UTC 2024","hostname":"gaetan-Dell-G15"}'
Stripe-Account:
- acct_1OoDQz4K6DRMoG9d
- acct_1OoefV4C2tKH5dGL
Accept-Encoding:
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
Accept:
@@ -499,7 +499,7 @@ http_interactions:
Server:
- nginx
Date:
- Mon, 26 Feb 2024 23:18:13 GMT
- Wed, 28 Feb 2024 04:23:01 GMT
Content-Type:
- application/json
Content-Length:
@@ -525,9 +525,9 @@ http_interactions:
'none'; frame-ancestors 'none'; img-src 'self'; script-src 'self' 'report-sample';
style-src 'self'
Request-Id:
- req_epr3kVFefIc6M3
- req_lZyw7j5pG8K6Cv
Stripe-Account:
- acct_1OoDQz4K6DRMoG9d
- acct_1OoefV4C2tKH5dGL
Stripe-Version:
- '2023-10-16'
Vary:
@@ -540,7 +540,7 @@ http_interactions:
encoding: UTF-8
string: |-
{
"id": "pi_3OoDR24K6DRMoG9d0SbyMf0l",
"id": "pi_3OoefY4C2tKH5dGL1GZJ9p6K",
"object": "payment_intent",
"amount": 1000,
"amount_capturable": 0,
@@ -554,20 +554,20 @@ http_interactions:
"canceled_at": null,
"cancellation_reason": null,
"capture_method": "automatic",
"client_secret": "pi_3OoDR24K6DRMoG9d0SbyMf0l_secret_pT8dTrVG0PppJA5sAWaUd98w5",
"client_secret": "pi_3OoefY4C2tKH5dGL1GZJ9p6K_secret_yTGvOEMPhBORAgEQagwJpXTPI",
"confirmation_method": "automatic",
"created": 1708989492,
"created": 1709094180,
"currency": "aud",
"customer": null,
"description": null,
"invoice": null,
"last_payment_error": null,
"latest_charge": "ch_3OoDR24K6DRMoG9d0ggx7xob",
"latest_charge": "ch_3OoefY4C2tKH5dGL1VlO0lYA",
"livemode": false,
"metadata": {},
"next_action": null,
"on_behalf_of": null,
"payment_method": "pm_1OoDR24K6DRMoG9d09thlZE0",
"payment_method": "pm_1OoefY4C2tKH5dGL4j5cFhFa",
"payment_method_configuration_details": null,
"payment_method_options": {
"card": {
@@ -592,10 +592,10 @@ http_interactions:
"transfer_data": null,
"transfer_group": null
}
recorded_at: Mon, 26 Feb 2024 23:18:14 GMT
recorded_at: Wed, 28 Feb 2024 04:23:01 GMT
- request:
method: get
uri: https://api.stripe.com/v1/payment_intents/pi_3OoDR24K6DRMoG9d0SbyMf0l
uri: https://api.stripe.com/v1/payment_intents/pi_3OoefY4C2tKH5dGL1GZJ9p6K
body:
encoding: US-ASCII
string: ''
@@ -611,7 +611,7 @@ http_interactions:
X-Stripe-Client-User-Metadata:
- '{"ip":null}'
Stripe-Account:
- acct_1OoDQz4K6DRMoG9d
- acct_1OoefV4C2tKH5dGL
Connection:
- close
Accept-Encoding:
@@ -626,11 +626,11 @@ http_interactions:
Server:
- nginx
Date:
- Mon, 26 Feb 2024 23:18:14 GMT
- Wed, 28 Feb 2024 04:23:02 GMT
Content-Type:
- application/json
Content-Length:
- '5160'
- '5159'
Connection:
- close
Access-Control-Allow-Credentials:
@@ -652,9 +652,9 @@ http_interactions:
'none'; frame-ancestors 'none'; img-src 'self'; script-src 'self' 'report-sample';
style-src 'self'
Request-Id:
- req_czBegYmlYU8qGX
- req_FH8bGixsjbByLa
Stripe-Account:
- acct_1OoDQz4K6DRMoG9d
- acct_1OoefV4C2tKH5dGL
Stripe-Version:
- '2020-08-27'
Vary:
@@ -667,7 +667,7 @@ http_interactions:
encoding: UTF-8
string: |-
{
"id": "pi_3OoDR24K6DRMoG9d0SbyMf0l",
"id": "pi_3OoefY4C2tKH5dGL1GZJ9p6K",
"object": "payment_intent",
"amount": 1000,
"amount_capturable": 0,
@@ -685,7 +685,7 @@ http_interactions:
"object": "list",
"data": [
{
"id": "ch_3OoDR24K6DRMoG9d0ggx7xob",
"id": "ch_3OoefY4C2tKH5dGL1VlO0lYA",
"object": "charge",
"amount": 1000,
"amount_captured": 1000,
@@ -693,7 +693,7 @@ http_interactions:
"application": "<HIDDEN-STRIPE_CLIENT_ID>",
"application_fee": null,
"application_fee_amount": null,
"balance_transaction": "txn_3OoDR24K6DRMoG9d0R8YS7Vv",
"balance_transaction": "txn_3OoefY4C2tKH5dGL13dcK4j1",
"billing_details": {
"address": {
"city": null,
@@ -709,7 +709,7 @@ http_interactions:
},
"calculated_statement_descriptor": "OFNOFNOFN",
"captured": true,
"created": 1708989492,
"created": 1709094180,
"currency": "aud",
"customer": null,
"description": null,
@@ -729,13 +729,13 @@ http_interactions:
"network_status": "approved_by_network",
"reason": null,
"risk_level": "normal",
"risk_score": 20,
"risk_score": 7,
"seller_message": "Payment complete.",
"type": "authorized"
},
"paid": true,
"payment_intent": "pi_3OoDR24K6DRMoG9d0SbyMf0l",
"payment_method": "pm_1OoDR24K6DRMoG9d09thlZE0",
"payment_intent": "pi_3OoefY4C2tKH5dGL1GZJ9p6K",
"payment_method": "pm_1OoefY4C2tKH5dGL4j5cFhFa",
"payment_method_details": {
"card": {
"amount_authorized": 1000,
@@ -778,14 +778,14 @@ http_interactions:
"radar_options": {},
"receipt_email": null,
"receipt_number": null,
"receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xT29EUXo0SzZEUk1vRzlkKLa49K4GMgaYttG8d3A6LBYL130f3PqbLJKmpUks5BsQbPk28XQPiwubarxIPrH5xVW-zGNXu4lHvKpg",
"receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xT29lZlY0QzJ0S0g1ZEdMKKbq-q4GMgaRkN_RRNQ6LBZz6CQXHZCrsn25QS9Jm5gbb44sYBgtlhvBnbTpsJMQXRa5GaNsE626dU5n",
"refunded": false,
"refunds": {
"object": "list",
"data": [],
"has_more": false,
"total_count": 0,
"url": "/v1/charges/ch_3OoDR24K6DRMoG9d0ggx7xob/refunds"
"url": "/v1/charges/ch_3OoefY4C2tKH5dGL1VlO0lYA/refunds"
},
"review": null,
"shipping": null,
@@ -800,22 +800,22 @@ http_interactions:
],
"has_more": false,
"total_count": 1,
"url": "/v1/charges?payment_intent=pi_3OoDR24K6DRMoG9d0SbyMf0l"
"url": "/v1/charges?payment_intent=pi_3OoefY4C2tKH5dGL1GZJ9p6K"
},
"client_secret": "pi_3OoDR24K6DRMoG9d0SbyMf0l_secret_pT8dTrVG0PppJA5sAWaUd98w5",
"client_secret": "pi_3OoefY4C2tKH5dGL1GZJ9p6K_secret_yTGvOEMPhBORAgEQagwJpXTPI",
"confirmation_method": "automatic",
"created": 1708989492,
"created": 1709094180,
"currency": "aud",
"customer": null,
"description": null,
"invoice": null,
"last_payment_error": null,
"latest_charge": "ch_3OoDR24K6DRMoG9d0ggx7xob",
"latest_charge": "ch_3OoefY4C2tKH5dGL1VlO0lYA",
"livemode": false,
"metadata": {},
"next_action": null,
"on_behalf_of": null,
"payment_method": "pm_1OoDR24K6DRMoG9d09thlZE0",
"payment_method": "pm_1OoefY4C2tKH5dGL4j5cFhFa",
"payment_method_configuration_details": null,
"payment_method_options": {
"card": {
@@ -840,10 +840,10 @@ http_interactions:
"transfer_data": null,
"transfer_group": null
}
recorded_at: Mon, 26 Feb 2024 23:18:14 GMT
recorded_at: Wed, 28 Feb 2024 04:23:02 GMT
- request:
method: post
uri: https://api.stripe.com/v1/charges/ch_3OoDR24K6DRMoG9d0ggx7xob/refunds
uri: https://api.stripe.com/v1/charges/ch_3OoefY4C2tKH5dGL1VlO0lYA/refunds
body:
encoding: UTF-8
string: amount=1000&expand[0]=charge
@@ -861,7 +861,7 @@ http_interactions:
X-Stripe-Client-User-Metadata:
- '{"ip":null}'
Stripe-Account:
- acct_1OoDQz4K6DRMoG9d
- acct_1OoefV4C2tKH5dGL
Connection:
- close
Accept-Encoding:
@@ -876,11 +876,11 @@ http_interactions:
Server:
- nginx
Date:
- Mon, 26 Feb 2024 23:18:15 GMT
- Wed, 28 Feb 2024 04:23:03 GMT
Content-Type:
- application/json
Content-Length:
- '4536'
- '4535'
Connection:
- close
Access-Control-Allow-Credentials:
@@ -902,13 +902,13 @@ http_interactions:
'none'; frame-ancestors 'none'; img-src 'self'; script-src 'self' 'report-sample';
style-src 'self'
Idempotency-Key:
- 0a98bb39-2793-4563-8069-b15c1be7a2c6
- e3b5a699-fd66-4438-acf5-dbcdd0c0cd8f
Original-Request:
- req_UGRHbBVNXDDQxO
- req_gnYblTnZmxelLp
Request-Id:
- req_UGRHbBVNXDDQxO
- req_gnYblTnZmxelLp
Stripe-Account:
- acct_1OoDQz4K6DRMoG9d
- acct_1OoefV4C2tKH5dGL
Stripe-Should-Retry:
- 'false'
Stripe-Version:
@@ -923,12 +923,12 @@ http_interactions:
encoding: UTF-8
string: |-
{
"id": "re_3OoDR24K6DRMoG9d09PmYd3C",
"id": "re_3OoefY4C2tKH5dGL13F5cUVM",
"object": "refund",
"amount": 1000,
"balance_transaction": "txn_3OoDR24K6DRMoG9d0fw0EbzO",
"balance_transaction": "txn_3OoefY4C2tKH5dGL1DQGbKPm",
"charge": {
"id": "ch_3OoDR24K6DRMoG9d0ggx7xob",
"id": "ch_3OoefY4C2tKH5dGL1VlO0lYA",
"object": "charge",
"amount": 1000,
"amount_captured": 1000,
@@ -936,7 +936,7 @@ http_interactions:
"application": "<HIDDEN-STRIPE_CLIENT_ID>",
"application_fee": null,
"application_fee_amount": null,
"balance_transaction": "txn_3OoDR24K6DRMoG9d0R8YS7Vv",
"balance_transaction": "txn_3OoefY4C2tKH5dGL13dcK4j1",
"billing_details": {
"address": {
"city": null,
@@ -952,7 +952,7 @@ http_interactions:
},
"calculated_statement_descriptor": "OFNOFNOFN",
"captured": true,
"created": 1708989492,
"created": 1709094180,
"currency": "aud",
"customer": null,
"description": null,
@@ -972,13 +972,13 @@ http_interactions:
"network_status": "approved_by_network",
"reason": null,
"risk_level": "normal",
"risk_score": 20,
"risk_score": 7,
"seller_message": "Payment complete.",
"type": "authorized"
},
"paid": true,
"payment_intent": "pi_3OoDR24K6DRMoG9d0SbyMf0l",
"payment_method": "pm_1OoDR24K6DRMoG9d09thlZE0",
"payment_intent": "pi_3OoefY4C2tKH5dGL1GZJ9p6K",
"payment_method": "pm_1OoefY4C2tKH5dGL4j5cFhFa",
"payment_method_details": {
"card": {
"amount_authorized": 1000,
@@ -1021,18 +1021,18 @@ http_interactions:
"radar_options": {},
"receipt_email": null,
"receipt_number": null,
"receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xT29EUXo0SzZEUk1vRzlkKLe49K4GMgaU7PBpToo6LBa-S2S4uuRuKvm3XgKD_iDADQLtfcquUhFm78xV0C2FnK2Cvknk_SpQiF_Q",
"receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xT29lZlY0QzJ0S0g1ZEdMKKfq-q4GMgaZksVQP2U6LBbzMTFesAxG2bPJiPJrrQg4rFEMLvIeOgyWS0m6-vJl8TTT-s9srkaZHmxm",
"refunded": true,
"refunds": {
"object": "list",
"data": [
{
"id": "re_3OoDR24K6DRMoG9d09PmYd3C",
"id": "re_3OoefY4C2tKH5dGL13F5cUVM",
"object": "refund",
"amount": 1000,
"balance_transaction": "txn_3OoDR24K6DRMoG9d0fw0EbzO",
"charge": "ch_3OoDR24K6DRMoG9d0ggx7xob",
"created": 1708989494,
"balance_transaction": "txn_3OoefY4C2tKH5dGL1DQGbKPm",
"charge": "ch_3OoefY4C2tKH5dGL1VlO0lYA",
"created": 1709094182,
"currency": "aud",
"destination_details": {
"card": {
@@ -1043,7 +1043,7 @@ http_interactions:
"type": "card"
},
"metadata": {},
"payment_intent": "pi_3OoDR24K6DRMoG9d0SbyMf0l",
"payment_intent": "pi_3OoefY4C2tKH5dGL1GZJ9p6K",
"reason": null,
"receipt_number": null,
"source_transfer_reversal": null,
@@ -1053,7 +1053,7 @@ http_interactions:
],
"has_more": false,
"total_count": 1,
"url": "/v1/charges/ch_3OoDR24K6DRMoG9d0ggx7xob/refunds"
"url": "/v1/charges/ch_3OoefY4C2tKH5dGL1VlO0lYA/refunds"
},
"review": null,
"shipping": null,
@@ -1065,7 +1065,7 @@ http_interactions:
"transfer_data": null,
"transfer_group": null
},
"created": 1708989494,
"created": 1709094182,
"currency": "aud",
"destination_details": {
"card": {
@@ -1076,12 +1076,12 @@ http_interactions:
"type": "card"
},
"metadata": {},
"payment_intent": "pi_3OoDR24K6DRMoG9d0SbyMf0l",
"payment_intent": "pi_3OoefY4C2tKH5dGL1GZJ9p6K",
"reason": null,
"receipt_number": null,
"source_transfer_reversal": null,
"status": "succeeded",
"transfer_reversal": null
}
recorded_at: Mon, 26 Feb 2024 23:18:15 GMT
recorded_at: Wed, 28 Feb 2024 04:23:03 GMT
recorded_with: VCR 6.2.0

View File

@@ -14,7 +14,7 @@ http_interactions:
Content-Type:
- application/x-www-form-urlencoded
X-Stripe-Client-Telemetry:
- '{"last_request_metrics":{"request_id":"req_epr3kVFefIc6M3","request_duration_ms":398}}'
- '{"last_request_metrics":{"request_id":"req_lZyw7j5pG8K6Cv","request_duration_ms":296}}'
Stripe-Version:
- '2023-10-16'
X-Stripe-Client-User-Agent:
@@ -34,7 +34,7 @@ http_interactions:
Server:
- nginx
Date:
- Mon, 26 Feb 2024 23:18:17 GMT
- Wed, 28 Feb 2024 04:23:05 GMT
Content-Type:
- application/json
Content-Length:
@@ -59,11 +59,11 @@ http_interactions:
default-src 'none'; base-uri 'none'; form-action 'none'; frame-ancestors 'none';
img-src 'self'; script-src 'self' 'report-sample'; style-src 'self'
Idempotency-Key:
- 1c1da7a1-b0f6-4ee9-8a4c-768ac4bd3fcd
- 1ef2201e-0e24-4640-982d-6568c4052527
Original-Request:
- req_BADUQvDMU55Oqp
- req_s4ofxXP0G2Y783
Request-Id:
- req_BADUQvDMU55Oqp
- req_s4ofxXP0G2Y783
Stripe-Should-Retry:
- 'false'
Stripe-Version:
@@ -78,7 +78,7 @@ http_interactions:
encoding: UTF-8
string: |-
{
"id": "acct_1OoDR5QQIX0JHVBP",
"id": "acct_1Ooefb4DjmilFkgB",
"object": "account",
"business_profile": {
"annual_revenue": null,
@@ -100,7 +100,7 @@ http_interactions:
"type": "application"
},
"country": "AU",
"created": 1708989496,
"created": 1709094184,
"default_currency": "aud",
"details_submitted": false,
"email": "carrot.producer@example.com",
@@ -109,7 +109,7 @@ http_interactions:
"data": [],
"has_more": false,
"total_count": 0,
"url": "/v1/accounts/acct_1OoDR5QQIX0JHVBP/external_accounts"
"url": "/v1/accounts/acct_1Ooefb4DjmilFkgB/external_accounts"
},
"future_requirements": {
"alternatives": [],
@@ -206,7 +206,7 @@ http_interactions:
},
"type": "standard"
}
recorded_at: Mon, 26 Feb 2024 23:18:17 GMT
recorded_at: Wed, 28 Feb 2024 04:23:05 GMT
- request:
method: get
uri: https://api.stripe.com/v1/payment_methods/pm_card_mastercard
@@ -221,7 +221,7 @@ http_interactions:
Content-Type:
- application/x-www-form-urlencoded
X-Stripe-Client-Telemetry:
- '{"last_request_metrics":{"request_id":"req_BADUQvDMU55Oqp","request_duration_ms":1730}}'
- '{"last_request_metrics":{"request_id":"req_s4ofxXP0G2Y783","request_duration_ms":1698}}'
Stripe-Version:
- '2023-10-16'
X-Stripe-Client-User-Agent:
@@ -241,7 +241,7 @@ http_interactions:
Server:
- nginx
Date:
- Mon, 26 Feb 2024 23:18:18 GMT
- Wed, 28 Feb 2024 04:23:06 GMT
Content-Type:
- application/json
Content-Length:
@@ -267,7 +267,7 @@ http_interactions:
'none'; frame-ancestors 'none'; img-src 'self'; script-src 'self' 'report-sample';
style-src 'self'
Request-Id:
- req_mv1NBgV94MnFrF
- req_YRYMRdfcJyCfpc
Stripe-Version:
- '2023-10-16'
Vary:
@@ -280,7 +280,7 @@ http_interactions:
encoding: UTF-8
string: |-
{
"id": "pm_1OoDR8KuuB1fWySnAKom7xp9",
"id": "pm_1OoefeKuuB1fWySn4sV0w7me",
"object": "payment_method",
"billing_details": {
"address": {
@@ -321,13 +321,13 @@ http_interactions:
},
"wallet": null
},
"created": 1708989498,
"created": 1709094186,
"customer": null,
"livemode": false,
"metadata": {},
"type": "card"
}
recorded_at: Mon, 26 Feb 2024 23:18:18 GMT
recorded_at: Wed, 28 Feb 2024 04:23:06 GMT
- request:
method: post
uri: https://api.stripe.com/v1/payment_intents
@@ -342,7 +342,7 @@ http_interactions:
Content-Type:
- application/x-www-form-urlencoded
X-Stripe-Client-Telemetry:
- '{"last_request_metrics":{"request_id":"req_mv1NBgV94MnFrF","request_duration_ms":428}}'
- '{"last_request_metrics":{"request_id":"req_YRYMRdfcJyCfpc","request_duration_ms":414}}'
Stripe-Version:
- '2023-10-16'
X-Stripe-Client-User-Agent:
@@ -351,7 +351,7 @@ http_interactions:
9.4.0, GNU ld (GNU Binutils for Ubuntu) 2.34) #102~20.04.1-Ubuntu SMP Mon
Jan 15 13:09:14 UTC 2024","hostname":"gaetan-Dell-G15"}'
Stripe-Account:
- acct_1OoDR5QQIX0JHVBP
- acct_1Ooefb4DjmilFkgB
Accept-Encoding:
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
Accept:
@@ -364,7 +364,7 @@ http_interactions:
Server:
- nginx
Date:
- Mon, 26 Feb 2024 23:18:18 GMT
- Wed, 28 Feb 2024 04:23:06 GMT
Content-Type:
- application/json
Content-Length:
@@ -389,13 +389,13 @@ http_interactions:
default-src 'none'; base-uri 'none'; form-action 'none'; frame-ancestors 'none';
img-src 'self'; script-src 'self' 'report-sample'; style-src 'self'
Idempotency-Key:
- 737c0b98-c355-4738-a49f-c0dbad06bc10
- 4709c865-413b-4f63-92de-88ea134ca3fc
Original-Request:
- req_KJjhzGwgpPtNpb
- req_924xRbbZ96ZSGs
Request-Id:
- req_KJjhzGwgpPtNpb
- req_924xRbbZ96ZSGs
Stripe-Account:
- acct_1OoDR5QQIX0JHVBP
- acct_1Ooefb4DjmilFkgB
Stripe-Should-Retry:
- 'false'
Stripe-Version:
@@ -410,7 +410,7 @@ http_interactions:
encoding: UTF-8
string: |-
{
"id": "pi_3OoDR8QQIX0JHVBP17iPyWpl",
"id": "pi_3Ooefe4DjmilFkgB0MRGxtD7",
"object": "payment_intent",
"amount": 1000,
"amount_capturable": 0,
@@ -424,9 +424,9 @@ http_interactions:
"canceled_at": null,
"cancellation_reason": null,
"capture_method": "manual",
"client_secret": "pi_3OoDR8QQIX0JHVBP17iPyWpl_secret_BokkwD6wf89emZuUAz6RIGSyL",
"client_secret": "pi_3Ooefe4DjmilFkgB0MRGxtD7_secret_m61Cyi5MpCkThDwF1HOTfVtTh",
"confirmation_method": "automatic",
"created": 1708989498,
"created": 1709094186,
"currency": "aud",
"customer": null,
"description": null,
@@ -437,7 +437,7 @@ http_interactions:
"metadata": {},
"next_action": null,
"on_behalf_of": null,
"payment_method": "pm_1OoDR8QQIX0JHVBPiisWwyMi",
"payment_method": "pm_1Ooefe4DjmilFkgBPSiob94t",
"payment_method_configuration_details": null,
"payment_method_options": {
"card": {
@@ -462,10 +462,10 @@ http_interactions:
"transfer_data": null,
"transfer_group": null
}
recorded_at: Mon, 26 Feb 2024 23:18:19 GMT
recorded_at: Wed, 28 Feb 2024 04:23:06 GMT
- request:
method: get
uri: https://api.stripe.com/v1/payment_intents/pi_3OoDR8QQIX0JHVBP17iPyWpl
uri: https://api.stripe.com/v1/payment_intents/pi_3Ooefe4DjmilFkgB0MRGxtD7
body:
encoding: US-ASCII
string: ''
@@ -477,7 +477,7 @@ http_interactions:
Content-Type:
- application/x-www-form-urlencoded
X-Stripe-Client-Telemetry:
- '{"last_request_metrics":{"request_id":"req_KJjhzGwgpPtNpb","request_duration_ms":610}}'
- '{"last_request_metrics":{"request_id":"req_924xRbbZ96ZSGs","request_duration_ms":508}}'
Stripe-Version:
- '2023-10-16'
X-Stripe-Client-User-Agent:
@@ -486,7 +486,7 @@ http_interactions:
9.4.0, GNU ld (GNU Binutils for Ubuntu) 2.34) #102~20.04.1-Ubuntu SMP Mon
Jan 15 13:09:14 UTC 2024","hostname":"gaetan-Dell-G15"}'
Stripe-Account:
- acct_1OoDR5QQIX0JHVBP
- acct_1Ooefb4DjmilFkgB
Accept-Encoding:
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
Accept:
@@ -499,7 +499,7 @@ http_interactions:
Server:
- nginx
Date:
- Mon, 26 Feb 2024 23:18:19 GMT
- Wed, 28 Feb 2024 04:23:07 GMT
Content-Type:
- application/json
Content-Length:
@@ -525,9 +525,9 @@ http_interactions:
'none'; frame-ancestors 'none'; img-src 'self'; script-src 'self' 'report-sample';
style-src 'self'
Request-Id:
- req_waW9Ckkv5MVQ5c
- req_o2i92svEF6wZ9X
Stripe-Account:
- acct_1OoDR5QQIX0JHVBP
- acct_1Ooefb4DjmilFkgB
Stripe-Version:
- '2023-10-16'
Vary:
@@ -540,7 +540,7 @@ http_interactions:
encoding: UTF-8
string: |-
{
"id": "pi_3OoDR8QQIX0JHVBP17iPyWpl",
"id": "pi_3Ooefe4DjmilFkgB0MRGxtD7",
"object": "payment_intent",
"amount": 1000,
"amount_capturable": 0,
@@ -554,9 +554,9 @@ http_interactions:
"canceled_at": null,
"cancellation_reason": null,
"capture_method": "manual",
"client_secret": "pi_3OoDR8QQIX0JHVBP17iPyWpl_secret_BokkwD6wf89emZuUAz6RIGSyL",
"client_secret": "pi_3Ooefe4DjmilFkgB0MRGxtD7_secret_m61Cyi5MpCkThDwF1HOTfVtTh",
"confirmation_method": "automatic",
"created": 1708989498,
"created": 1709094186,
"currency": "aud",
"customer": null,
"description": null,
@@ -567,7 +567,7 @@ http_interactions:
"metadata": {},
"next_action": null,
"on_behalf_of": null,
"payment_method": "pm_1OoDR8QQIX0JHVBPiisWwyMi",
"payment_method": "pm_1Ooefe4DjmilFkgBPSiob94t",
"payment_method_configuration_details": null,
"payment_method_options": {
"card": {
@@ -592,10 +592,10 @@ http_interactions:
"transfer_data": null,
"transfer_group": null
}
recorded_at: Mon, 26 Feb 2024 23:18:19 GMT
recorded_at: Wed, 28 Feb 2024 04:23:07 GMT
- request:
method: post
uri: https://api.stripe.com/v1/payment_intents/pi_3OoDR8QQIX0JHVBP17iPyWpl/cancel
uri: https://api.stripe.com/v1/payment_intents/pi_3Ooefe4DjmilFkgB0MRGxtD7/cancel
body:
encoding: US-ASCII
string: ''
@@ -613,7 +613,7 @@ http_interactions:
X-Stripe-Client-User-Metadata:
- '{"ip":null}'
Stripe-Account:
- acct_1OoDR5QQIX0JHVBP
- acct_1Ooefb4DjmilFkgB
Connection:
- close
Accept-Encoding:
@@ -628,7 +628,7 @@ http_interactions:
Server:
- nginx
Date:
- Mon, 26 Feb 2024 23:18:19 GMT
- Wed, 28 Feb 2024 04:23:07 GMT
Content-Type:
- application/json
Content-Length:
@@ -654,13 +654,13 @@ http_interactions:
'none'; frame-ancestors 'none'; img-src 'self'; script-src 'self' 'report-sample';
style-src 'self'
Idempotency-Key:
- da9c3105-779e-4313-85c8-cc03080fb957
- a75b58f8-d2f4-43b6-aff2-21023fcc77f2
Original-Request:
- req_MBu3YgXKFZ6hzA
- req_WU2ReDoGdQvhVb
Request-Id:
- req_MBu3YgXKFZ6hzA
- req_WU2ReDoGdQvhVb
Stripe-Account:
- acct_1OoDR5QQIX0JHVBP
- acct_1Ooefb4DjmilFkgB
Stripe-Should-Retry:
- 'false'
Stripe-Version:
@@ -675,7 +675,7 @@ http_interactions:
encoding: UTF-8
string: |-
{
"id": "pi_3OoDR8QQIX0JHVBP17iPyWpl",
"id": "pi_3Ooefe4DjmilFkgB0MRGxtD7",
"object": "payment_intent",
"amount": 1000,
"amount_capturable": 0,
@@ -686,7 +686,7 @@ http_interactions:
"application": "<HIDDEN-STRIPE_CLIENT_ID>",
"application_fee_amount": null,
"automatic_payment_methods": null,
"canceled_at": 1708989499,
"canceled_at": 1709094187,
"cancellation_reason": null,
"capture_method": "manual",
"charges": {
@@ -694,11 +694,11 @@ http_interactions:
"data": [],
"has_more": false,
"total_count": 0,
"url": "/v1/charges?payment_intent=pi_3OoDR8QQIX0JHVBP17iPyWpl"
"url": "/v1/charges?payment_intent=pi_3Ooefe4DjmilFkgB0MRGxtD7"
},
"client_secret": "pi_3OoDR8QQIX0JHVBP17iPyWpl_secret_BokkwD6wf89emZuUAz6RIGSyL",
"client_secret": "pi_3Ooefe4DjmilFkgB0MRGxtD7_secret_m61Cyi5MpCkThDwF1HOTfVtTh",
"confirmation_method": "automatic",
"created": 1708989498,
"created": 1709094186,
"currency": "aud",
"customer": null,
"description": null,
@@ -709,7 +709,7 @@ http_interactions:
"metadata": {},
"next_action": null,
"on_behalf_of": null,
"payment_method": "pm_1OoDR8QQIX0JHVBPiisWwyMi",
"payment_method": "pm_1Ooefe4DjmilFkgBPSiob94t",
"payment_method_configuration_details": null,
"payment_method_options": {
"card": {
@@ -734,5 +734,5 @@ http_interactions:
"transfer_data": null,
"transfer_group": null
}
recorded_at: Mon, 26 Feb 2024 23:18:19 GMT
recorded_at: Wed, 28 Feb 2024 04:23:07 GMT
recorded_with: VCR 6.2.0

View File

@@ -0,0 +1,136 @@
# frozen_string_literal: true
require "spec_helper"
describe Spree::Admin::PaymentsController, type: :request do
let(:user) { order.user }
let(:order) { create(:completed_order_with_fees) }
before do
sign_in create(:admin_user)
end
describe "PUT /admin/orders/:order_number/payments/:id/fire" do
let(:payment) do
create(
:payment,
payment_method: stripe_payment_method,
order:,
response_code: "pi_123",
amount: order.total,
state: "completed"
)
end
let(:stripe_payment_method) do
create(:stripe_sca_payment_method, distributors: [order.distributor])
end
let(:headers) { { HTTP_REFERER: spree.admin_order_payments_url(order) } }
before do
order.update(payments: [])
order.payments << payment
end
context "with no event parameter" do
it "redirect to payments page" do
put(
"/admin/orders/#{order.number}/payments/#{order.payments.first.id}/fire",
params: {},
headers:
)
expect(response).to redirect_to(spree.admin_order_payments_url(order))
end
end
context "with no payment source" do
it "redirect to payments page" do
allow(payment).to receive(:payment_source).and_return(nil)
put(
"/admin/orders/#{order.number}/payments/#{order.payments.first.id}/fire?e=void",
params: {},
headers:
)
expect(response).to redirect_to(spree.admin_order_payments_url(order))
end
end
context "with 'void' parameter" do
before do
allow(Spree::Payment).to receive(:find).and_return(payment)
end
it "calls void_transaction! on payment" do
expect(payment).to receive(:void_transaction!)
put(
"/admin/orders/#{order.number}/payments/#{order.payments.first.id}/fire?e=void",
params: {},
headers:
)
end
it "redirect to payments page" do
allow(payment).to receive(:void_transaction!).and_return(true)
put(
"/admin/orders/#{order.number}/payments/#{order.payments.first.id}/fire?e=void",
params: {},
headers:
)
expect(response).to redirect_to(spree.admin_order_payments_url(order))
expect(flash[:success]).to eq "Payment Updated"
end
context "when void_transaction! fails" do
it "set an error flash message" do
allow(payment).to receive(:void_transaction!).and_return(false)
put(
"/admin/orders/#{order.number}/payments/#{order.payments.first.id}/fire?e=void",
params: {},
headers:
)
expect(response).to redirect_to(spree.admin_order_payments_url(order))
expect(flash[:error]).to eq "Could not update the payment"
end
end
end
context "when something unexpected happen" do
before do
allow(Spree::Payment).to receive(:find).and_return(payment)
allow(payment).to receive(:void_transaction!).and_raise(StandardError, "Unexpected !")
end
it "log the error message" do
# The redirect_do also calls Rails.logger.error
expect(Rails.logger).to receive(:error).with("Unexpected !").ordered
expect(Rails.logger).to receive(:error).with(/Redirected/).ordered
expect(Bugsnag).to receive(:notify).with(StandardError)
put(
"/admin/orders/#{order.number}/payments/#{order.payments.first.id}/fire?e=void",
params: {},
headers: { HTTP_REFERER: spree.admin_order_payments_url(order) }
)
expect(flash[:error]).to eq "Unexpected !"
end
it "redirect to payments page" do
put(
"/admin/orders/#{order.number}/payments/#{order.payments.first.id}/fire?e=void",
params: {},
headers:
)
expect(response).to redirect_to(spree.admin_order_payments_url(order))
end
end
end
end

View File

@@ -18,11 +18,11 @@ describe '
create(:stripe_account, enterprise: order.distributor, stripe_user_id: "abc123")
end
around do |example|
with_stripe_setup { example.run }
end
context "making a new Stripe payment" do
around do |example|
with_stripe_setup { example.run }
end
before do
stub_payment_methods_post_request
stub_payment_intent_get_request
@@ -145,14 +145,50 @@ describe '
end
end
context "that is completed" do
let(:payment) { OrderPaymentFinder.new(order.reload).last_payment }
context "that is completed", :vcr, :stripe_version do
let(:payment) do
create(
:payment,
order:,
amount: order.total,
payment_method: stripe_payment_method,
source: credit_card,
response_code: payment_intent.id,
state: "completed"
)
end
let(:connected_account) do
Stripe::Account.create({
type: 'standard',
country: 'AU',
email: 'lettuce.producer@example.com'
})
end
let(:stripe_test_account) { connected_account.id }
# Stripe testing card:
# https://stripe.com/docs/testing?testing-method=payment-methods
let(:pm_card) { Stripe::PaymentMethod.retrieve('pm_card_mastercard') }
let(:credit_card) { create(:credit_card, gateway_payment_profile_id: pm_card.id) }
let(:payment_intent) do
Stripe::PaymentIntent.create(
{
amount: (order.total * 100).to_i, # given in AUD cents
currency: 'aud', # AUD to match order currency
payment_method: 'pm_card_mastercard',
payment_method_types: ['card'],
capture_method: 'automatic',
confirm: true
},
stripe_account: stripe_test_account
)
end
before do
payment.update response_code: "pi_123", amount: order.total, state: "completed"
stub_payment_intent_get_request response: { intent_status: "succeeded" },
stripe_account_header: false
stub_refund_request
stripe_account.update!(stripe_user_id: stripe_test_account)
order.update payments: []
order.payments << payment
end
it "allows to refund the payment" do