From 02019f7caec30c2950346b9bdd724565aa5b096a Mon Sep 17 00:00:00 2001 From: Gaetan Craig-Riou Date: Mon, 19 Feb 2024 11:01:20 +1100 Subject: [PATCH] Re recorde vcr cassette after rebase --- .../_credit/refunds_the_payment.yml | 836 +++++++++++++ .../refunds_the_payment.yml | 1087 +++++++++++++++++ .../void_the_payment.yml | 738 +++++++++++ 3 files changed, 2661 insertions(+) create mode 100644 spec/fixtures/vcr_cassettes/Stripe-v10.9.0/Spree_Gateway_StripeSCA/_credit/refunds_the_payment.yml create mode 100644 spec/fixtures/vcr_cassettes/Stripe-v10.9.0/Spree_Gateway_StripeSCA/_void/with_a_confirmed_payment/refunds_the_payment.yml create mode 100644 spec/fixtures/vcr_cassettes/Stripe-v10.9.0/Spree_Gateway_StripeSCA/_void/with_a_voidable_payment/void_the_payment.yml diff --git a/spec/fixtures/vcr_cassettes/Stripe-v10.9.0/Spree_Gateway_StripeSCA/_credit/refunds_the_payment.yml b/spec/fixtures/vcr_cassettes/Stripe-v10.9.0/Spree_Gateway_StripeSCA/_credit/refunds_the_payment.yml new file mode 100644 index 0000000000..fb348eac47 --- /dev/null +++ b/spec/fixtures/vcr_cassettes/Stripe-v10.9.0/Spree_Gateway_StripeSCA/_credit/refunds_the_payment.yml @@ -0,0 +1,836 @@ +--- +http_interactions: +- request: + method: post + uri: https://api.stripe.com/v1/accounts + body: + encoding: UTF-8 + string: type=standard&country=AU&email=carrot.producer%40example.com + headers: + User-Agent: + - Stripe/v1 RubyBindings/10.9.0 + Authorization: + - Bearer + Content-Type: + - application/x-www-form-urlencoded + X-Stripe-Client-Telemetry: + - '{"last_request_metrics":{"request_id":"req_7Xt2mBUL2tQGa6","request_duration_ms":398}}' + Stripe-Version: + - '2023-10-16' + X-Stripe-Client-User-Agent: + - '{"bindings_version":"10.9.0","lang":"ruby","lang_version":"3.1.4 p223 (2023-03-30)","platform":"x86_64-linux","engine":"ruby","publisher":"stripe","uname":"Linux + version 5.15.0-92-generic (buildd@lcy02-amd64-002) (gcc (Ubuntu 9.4.0-1ubuntu1~20.04.2) + 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"}' + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Accept: + - "*/*" + response: + status: + code: 200 + message: OK + headers: + Server: + - nginx + Date: + - Mon, 19 Feb 2024 00:00:57 GMT + Content-Type: + - application/json + Content-Length: + - '3046' + Connection: + - keep-alive + Access-Control-Allow-Credentials: + - 'true' + Access-Control-Allow-Methods: + - GET,HEAD,PUT,PATCH,POST,DELETE + Access-Control-Allow-Origin: + - "*" + Access-Control-Expose-Headers: + - Request-Id, Stripe-Manage-Version, Stripe-Should-Retry, X-Stripe-External-Auth-Required, + X-Stripe-Privileged-Session-Required + Access-Control-Max-Age: + - '300' + Cache-Control: + - no-cache, no-store + Content-Security-Policy: + - report-uri https://q.stripe.com/csp-report?p=v1%2Faccounts; block-all-mixed-content; + 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: + - 5a55b396-5fde-45b7-9f37-84850fa5a0e0 + Original-Request: + - req_RtwrvZNzWbPbqy + Request-Id: + - req_RtwrvZNzWbPbqy + Stripe-Should-Retry: + - 'false' + Stripe-Version: + - '2023-10-16' + Vary: + - Origin + X-Stripe-Routing-Context-Priority-Tier: + - api-testmode + Strict-Transport-Security: + - max-age=63072000; includeSubDomains; preload + body: + encoding: UTF-8 + string: |- + { + "id": "acct_1OlKHzQNFa3smszT", + "object": "account", + "business_profile": { + "annual_revenue": null, + "estimated_worker_count": null, + "mcc": null, + "name": null, + "product_description": null, + "support_address": null, + "support_email": null, + "support_phone": null, + "support_url": null, + "url": null + }, + "business_type": null, + "capabilities": {}, + "charges_enabled": false, + "controller": { + "is_controller": true, + "type": "application" + }, + "country": "AU", + "created": 1708300856, + "default_currency": "aud", + "details_submitted": false, + "email": "carrot.producer@example.com", + "external_accounts": { + "object": "list", + "data": [], + "has_more": false, + "total_count": 0, + "url": "/v1/accounts/acct_1OlKHzQNFa3smszT/external_accounts" + }, + "future_requirements": { + "alternatives": [], + "current_deadline": null, + "currently_due": [], + "disabled_reason": null, + "errors": [], + "eventually_due": [], + "past_due": [], + "pending_verification": [] + }, + "metadata": {}, + "payouts_enabled": false, + "requirements": { + "alternatives": [], + "current_deadline": null, + "currently_due": [ + "business_profile.product_description", + "business_profile.support_phone", + "business_profile.url", + "external_account", + "tos_acceptance.date", + "tos_acceptance.ip" + ], + "disabled_reason": "requirements.past_due", + "errors": [], + "eventually_due": [ + "business_profile.product_description", + "business_profile.support_phone", + "business_profile.url", + "external_account", + "tos_acceptance.date", + "tos_acceptance.ip" + ], + "past_due": [ + "external_account", + "tos_acceptance.date", + "tos_acceptance.ip" + ], + "pending_verification": [] + }, + "settings": { + "bacs_debit_payments": { + "display_name": null, + "service_user_number": null + }, + "branding": { + "icon": null, + "logo": null, + "primary_color": null, + "secondary_color": null + }, + "card_issuing": { + "tos_acceptance": { + "date": null, + "ip": null + } + }, + "card_payments": { + "decline_on": { + "avs_failure": false, + "cvc_failure": false + }, + "statement_descriptor_prefix": null, + "statement_descriptor_prefix_kana": null, + "statement_descriptor_prefix_kanji": null + }, + "dashboard": { + "display_name": null, + "timezone": "Etc/UTC" + }, + "invoices": { + "default_account_tax_ids": null + }, + "payments": { + "statement_descriptor": null, + "statement_descriptor_kana": null, + "statement_descriptor_kanji": null + }, + "payouts": { + "debit_negative_balances": true, + "schedule": { + "delay_days": 2, + "interval": "daily" + }, + "statement_descriptor": null + }, + "sepa_debit_payments": {} + }, + "tos_acceptance": { + "date": null, + "ip": null, + "user_agent": null + }, + "type": "standard" + } + recorded_at: Mon, 19 Feb 2024 00:00:57 GMT +- request: + method: post + uri: https://api.stripe.com/v1/payment_intents + body: + encoding: UTF-8 + string: amount=1000¤cy=aud&payment_method=pm_card_mastercard&payment_method_types[0]=card&capture_method=automatic&confirm=true + headers: + User-Agent: + - Stripe/v1 RubyBindings/10.9.0 + Authorization: + - Bearer + Content-Type: + - application/x-www-form-urlencoded + X-Stripe-Client-Telemetry: + - '{"last_request_metrics":{"request_id":"req_RtwrvZNzWbPbqy","request_duration_ms":1983}}' + Stripe-Version: + - '2023-10-16' + X-Stripe-Client-User-Agent: + - '{"bindings_version":"10.9.0","lang":"ruby","lang_version":"3.1.4 p223 (2023-03-30)","platform":"x86_64-linux","engine":"ruby","publisher":"stripe","uname":"Linux + version 5.15.0-92-generic (buildd@lcy02-amd64-002) (gcc (Ubuntu 9.4.0-1ubuntu1~20.04.2) + 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_1OlKHzQNFa3smszT + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Accept: + - "*/*" + response: + status: + code: 200 + message: OK + headers: + Server: + - nginx + Date: + - Mon, 19 Feb 2024 00:00:59 GMT + Content-Type: + - application/json + Content-Length: + - '1396' + Connection: + - keep-alive + Access-Control-Allow-Credentials: + - 'true' + Access-Control-Allow-Methods: + - GET,HEAD,PUT,PATCH,POST,DELETE + Access-Control-Allow-Origin: + - "*" + Access-Control-Expose-Headers: + - Request-Id, Stripe-Manage-Version, Stripe-Should-Retry, X-Stripe-External-Auth-Required, + X-Stripe-Privileged-Session-Required + Access-Control-Max-Age: + - '300' + Cache-Control: + - no-cache, no-store + Content-Security-Policy: + - report-uri https://q.stripe.com/csp-report?p=v1%2Fpayment_intents; block-all-mixed-content; + 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: + - e33bfb2f-4230-4e6f-860f-4b3c1ddcd20a + Original-Request: + - req_82EHYveYLsBnJi + Request-Id: + - req_82EHYveYLsBnJi + Stripe-Account: + - acct_1OlKHzQNFa3smszT + Stripe-Should-Retry: + - 'false' + Stripe-Version: + - '2023-10-16' + Vary: + - Origin + X-Stripe-Routing-Context-Priority-Tier: + - api-testmode + Strict-Transport-Security: + - max-age=63072000; includeSubDomains; preload + body: + encoding: UTF-8 + string: |- + { + "id": "pi_3OlKI1QNFa3smszT1eEui4Zp", + "object": "payment_intent", + "amount": 1000, + "amount_capturable": 0, + "amount_details": { + "tip": {} + }, + "amount_received": 1000, + "application": "", + "application_fee_amount": null, + "automatic_payment_methods": null, + "canceled_at": null, + "cancellation_reason": null, + "capture_method": "automatic", + "client_secret": "pi_3OlKI1QNFa3smszT1eEui4Zp_secret_X1t4oelBlgyqlYql0VMNVM2hi", + "confirmation_method": "automatic", + "created": 1708300857, + "currency": "aud", + "customer": null, + "description": null, + "invoice": null, + "last_payment_error": null, + "latest_charge": "ch_3OlKI1QNFa3smszT1rtKexTu", + "livemode": false, + "metadata": {}, + "next_action": null, + "on_behalf_of": null, + "payment_method": "pm_1OlKI1QNFa3smszTik1VHwK4", + "payment_method_configuration_details": null, + "payment_method_options": { + "card": { + "installments": null, + "mandate_options": null, + "network": null, + "request_three_d_secure": "automatic" + } + }, + "payment_method_types": [ + "card" + ], + "processing": null, + "receipt_email": null, + "review": null, + "setup_future_usage": null, + "shipping": null, + "source": null, + "statement_descriptor": null, + "statement_descriptor_suffix": null, + "status": "succeeded", + "transfer_data": null, + "transfer_group": null + } + recorded_at: Mon, 19 Feb 2024 00:00:59 GMT +- request: + method: get + uri: https://api.stripe.com/v1/payment_intents/pi_3OlKI1QNFa3smszT1eEui4Zp + body: + encoding: US-ASCII + string: '' + headers: + Authorization: + - Basic c2tfdGVzdF94RmdKUU9sWHBNQUZzb3p0endGQlRGaFAwMEhHN0J1Q0ptOg== + User-Agent: + - Stripe/v1 ActiveMerchantBindings/1.133.0 + Stripe-Version: + - '2020-08-27' + X-Stripe-Client-User-Agent: + - '{"bindings_version":"1.133.0","lang":"ruby","lang_version":"3.1.4 p223 (2023-03-30)","platform":"x86_64-linux","publisher":"active_merchant"}' + X-Stripe-Client-User-Metadata: + - '{"ip":null}' + Stripe-Account: + - acct_1OlKHzQNFa3smszT + Connection: + - close + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Accept: + - "*/*" + response: + status: + code: 200 + message: OK + headers: + Server: + - nginx + Date: + - Mon, 19 Feb 2024 00:00:59 GMT + Content-Type: + - application/json + Content-Length: + - '5160' + Connection: + - close + Access-Control-Allow-Credentials: + - 'true' + Access-Control-Allow-Methods: + - GET,HEAD,PUT,PATCH,POST,DELETE + Access-Control-Allow-Origin: + - "*" + Access-Control-Expose-Headers: + - Request-Id, Stripe-Manage-Version, Stripe-Should-Retry, X-Stripe-External-Auth-Required, + X-Stripe-Privileged-Session-Required + Access-Control-Max-Age: + - '300' + Cache-Control: + - no-cache, no-store + Content-Security-Policy: + - report-uri https://q.stripe.com/csp-report?p=v1%2Fpayment_intents%2F%3Aintent; + block-all-mixed-content; default-src 'none'; base-uri 'none'; form-action + 'none'; frame-ancestors 'none'; img-src 'self'; script-src 'self' 'report-sample'; + style-src 'self' + Request-Id: + - req_AtaDJgdpcQHQky + Stripe-Account: + - acct_1OlKHzQNFa3smszT + Stripe-Version: + - '2020-08-27' + Vary: + - Origin + X-Stripe-Routing-Context-Priority-Tier: + - api-testmode + Strict-Transport-Security: + - max-age=63072000; includeSubDomains; preload + body: + encoding: UTF-8 + string: |- + { + "id": "pi_3OlKI1QNFa3smszT1eEui4Zp", + "object": "payment_intent", + "amount": 1000, + "amount_capturable": 0, + "amount_details": { + "tip": {} + }, + "amount_received": 1000, + "application": "", + "application_fee_amount": null, + "automatic_payment_methods": null, + "canceled_at": null, + "cancellation_reason": null, + "capture_method": "automatic", + "charges": { + "object": "list", + "data": [ + { + "id": "ch_3OlKI1QNFa3smszT1rtKexTu", + "object": "charge", + "amount": 1000, + "amount_captured": 1000, + "amount_refunded": 0, + "application": "", + "application_fee": null, + "application_fee_amount": null, + "balance_transaction": "txn_3OlKI1QNFa3smszT1bZdXxBs", + "billing_details": { + "address": { + "city": null, + "country": null, + "line1": null, + "line2": null, + "postal_code": null, + "state": null + }, + "email": null, + "name": null, + "phone": null + }, + "calculated_statement_descriptor": "OFNOFNOFN", + "captured": true, + "created": 1708300858, + "currency": "aud", + "customer": null, + "description": null, + "destination": null, + "dispute": null, + "disputed": false, + "failure_balance_transaction": null, + "failure_code": null, + "failure_message": null, + "fraud_details": {}, + "invoice": null, + "livemode": false, + "metadata": {}, + "on_behalf_of": null, + "order": null, + "outcome": { + "network_status": "approved_by_network", + "reason": null, + "risk_level": "normal", + "risk_score": 43, + "seller_message": "Payment complete.", + "type": "authorized" + }, + "paid": true, + "payment_intent": "pi_3OlKI1QNFa3smszT1eEui4Zp", + "payment_method": "pm_1OlKI1QNFa3smszTik1VHwK4", + "payment_method_details": { + "card": { + "amount_authorized": 1000, + "brand": "mastercard", + "checks": { + "address_line1_check": null, + "address_postal_code_check": null, + "cvc_check": "pass" + }, + "country": "US", + "exp_month": 2, + "exp_year": 2025, + "extended_authorization": { + "status": "disabled" + }, + "fingerprint": "BL35fEFVcTTS5wpE", + "funding": "credit", + "incremental_authorization": { + "status": "unavailable" + }, + "installments": null, + "last4": "4444", + "mandate": null, + "multicapture": { + "status": "unavailable" + }, + "network": "mastercard", + "network_token": { + "used": false + }, + "overcapture": { + "maximum_amount_capturable": 1000, + "status": "unavailable" + }, + "three_d_secure": null, + "wallet": null + }, + "type": "card" + }, + "radar_options": {}, + "receipt_email": null, + "receipt_number": null, + "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xT2xLSHpRTkZhM3Ntc3pUKLu0yq4GMga6ue6o0Zw6LBZ-Lrb1L42SMIwiICUaTs-FYiznOZxn0WqA0wQ4GpcthxEecTEEJdnwRXF1", + "refunded": false, + "refunds": { + "object": "list", + "data": [], + "has_more": false, + "total_count": 0, + "url": "/v1/charges/ch_3OlKI1QNFa3smszT1rtKexTu/refunds" + }, + "review": null, + "shipping": null, + "source": null, + "source_transfer": null, + "statement_descriptor": null, + "statement_descriptor_suffix": null, + "status": "succeeded", + "transfer_data": null, + "transfer_group": null + } + ], + "has_more": false, + "total_count": 1, + "url": "/v1/charges?payment_intent=pi_3OlKI1QNFa3smszT1eEui4Zp" + }, + "client_secret": "pi_3OlKI1QNFa3smszT1eEui4Zp_secret_X1t4oelBlgyqlYql0VMNVM2hi", + "confirmation_method": "automatic", + "created": 1708300857, + "currency": "aud", + "customer": null, + "description": null, + "invoice": null, + "last_payment_error": null, + "latest_charge": "ch_3OlKI1QNFa3smszT1rtKexTu", + "livemode": false, + "metadata": {}, + "next_action": null, + "on_behalf_of": null, + "payment_method": "pm_1OlKI1QNFa3smszTik1VHwK4", + "payment_method_configuration_details": null, + "payment_method_options": { + "card": { + "installments": null, + "mandate_options": null, + "network": null, + "request_three_d_secure": "automatic" + } + }, + "payment_method_types": [ + "card" + ], + "processing": null, + "receipt_email": null, + "review": null, + "setup_future_usage": null, + "shipping": null, + "source": null, + "statement_descriptor": null, + "statement_descriptor_suffix": null, + "status": "succeeded", + "transfer_data": null, + "transfer_group": null + } + recorded_at: Mon, 19 Feb 2024 00:00:59 GMT +- request: + method: post + uri: https://api.stripe.com/v1/charges/ch_3OlKI1QNFa3smszT1rtKexTu/refunds + body: + encoding: UTF-8 + string: amount=1000&expand[0]=charge + headers: + Content-Type: + - application/x-www-form-urlencoded + Authorization: + - Basic c2tfdGVzdF94RmdKUU9sWHBNQUZzb3p0endGQlRGaFAwMEhHN0J1Q0ptOg== + User-Agent: + - Stripe/v1 ActiveMerchantBindings/1.133.0 + Stripe-Version: + - '2020-08-27' + X-Stripe-Client-User-Agent: + - '{"bindings_version":"1.133.0","lang":"ruby","lang_version":"3.1.4 p223 (2023-03-30)","platform":"x86_64-linux","publisher":"active_merchant"}' + X-Stripe-Client-User-Metadata: + - '{"ip":null}' + Stripe-Account: + - acct_1OlKHzQNFa3smszT + Connection: + - close + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Accept: + - "*/*" + response: + status: + code: 200 + message: OK + headers: + Server: + - nginx + Date: + - Mon, 19 Feb 2024 00:01:01 GMT + Content-Type: + - application/json + Content-Length: + - '4536' + Connection: + - close + Access-Control-Allow-Credentials: + - 'true' + Access-Control-Allow-Methods: + - GET,HEAD,PUT,PATCH,POST,DELETE + Access-Control-Allow-Origin: + - "*" + Access-Control-Expose-Headers: + - Request-Id, Stripe-Manage-Version, Stripe-Should-Retry, X-Stripe-External-Auth-Required, + X-Stripe-Privileged-Session-Required + Access-Control-Max-Age: + - '300' + Cache-Control: + - no-cache, no-store + Content-Security-Policy: + - report-uri https://q.stripe.com/csp-report?p=v1%2Fcharges%2F%3Acharge%2Frefunds; + block-all-mixed-content; 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: + - dc175b93-7af6-4ee5-87c4-7b4af723936a + Original-Request: + - req_zJckdZIVbiGT06 + Request-Id: + - req_zJckdZIVbiGT06 + Stripe-Account: + - acct_1OlKHzQNFa3smszT + Stripe-Should-Retry: + - 'false' + Stripe-Version: + - '2020-08-27' + Vary: + - Origin + X-Stripe-Routing-Context-Priority-Tier: + - api-testmode + Strict-Transport-Security: + - max-age=63072000; includeSubDomains; preload + body: + encoding: UTF-8 + string: |- + { + "id": "re_3OlKI1QNFa3smszT1aPqOnxP", + "object": "refund", + "amount": 1000, + "balance_transaction": "txn_3OlKI1QNFa3smszT1TnZo9j4", + "charge": { + "id": "ch_3OlKI1QNFa3smszT1rtKexTu", + "object": "charge", + "amount": 1000, + "amount_captured": 1000, + "amount_refunded": 1000, + "application": "", + "application_fee": null, + "application_fee_amount": null, + "balance_transaction": "txn_3OlKI1QNFa3smszT1bZdXxBs", + "billing_details": { + "address": { + "city": null, + "country": null, + "line1": null, + "line2": null, + "postal_code": null, + "state": null + }, + "email": null, + "name": null, + "phone": null + }, + "calculated_statement_descriptor": "OFNOFNOFN", + "captured": true, + "created": 1708300858, + "currency": "aud", + "customer": null, + "description": null, + "destination": null, + "dispute": null, + "disputed": false, + "failure_balance_transaction": null, + "failure_code": null, + "failure_message": null, + "fraud_details": {}, + "invoice": null, + "livemode": false, + "metadata": {}, + "on_behalf_of": null, + "order": null, + "outcome": { + "network_status": "approved_by_network", + "reason": null, + "risk_level": "normal", + "risk_score": 43, + "seller_message": "Payment complete.", + "type": "authorized" + }, + "paid": true, + "payment_intent": "pi_3OlKI1QNFa3smszT1eEui4Zp", + "payment_method": "pm_1OlKI1QNFa3smszTik1VHwK4", + "payment_method_details": { + "card": { + "amount_authorized": 1000, + "brand": "mastercard", + "checks": { + "address_line1_check": null, + "address_postal_code_check": null, + "cvc_check": "pass" + }, + "country": "US", + "exp_month": 2, + "exp_year": 2025, + "extended_authorization": { + "status": "disabled" + }, + "fingerprint": "BL35fEFVcTTS5wpE", + "funding": "credit", + "incremental_authorization": { + "status": "unavailable" + }, + "installments": null, + "last4": "4444", + "mandate": null, + "multicapture": { + "status": "unavailable" + }, + "network": "mastercard", + "network_token": { + "used": false + }, + "overcapture": { + "maximum_amount_capturable": 1000, + "status": "unavailable" + }, + "three_d_secure": null, + "wallet": null + }, + "type": "card" + }, + "radar_options": {}, + "receipt_email": null, + "receipt_number": null, + "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xT2xLSHpRTkZhM3Ntc3pUKLy0yq4GMgYE6ofv7Rg6LBYZKo7wsATsEsQeBImV_qP1fQeL93SY95EhOpNtA8I0Cwm9XKYcYytGPyV8", + "refunded": true, + "refunds": { + "object": "list", + "data": [ + { + "id": "re_3OlKI1QNFa3smszT1aPqOnxP", + "object": "refund", + "amount": 1000, + "balance_transaction": "txn_3OlKI1QNFa3smszT1TnZo9j4", + "charge": "ch_3OlKI1QNFa3smszT1rtKexTu", + "created": 1708300860, + "currency": "aud", + "destination_details": { + "card": { + "reference_status": "pending", + "reference_type": "acquirer_reference_number", + "type": "refund" + }, + "type": "card" + }, + "metadata": {}, + "payment_intent": "pi_3OlKI1QNFa3smszT1eEui4Zp", + "reason": null, + "receipt_number": null, + "source_transfer_reversal": null, + "status": "succeeded", + "transfer_reversal": null + } + ], + "has_more": false, + "total_count": 1, + "url": "/v1/charges/ch_3OlKI1QNFa3smszT1rtKexTu/refunds" + }, + "review": null, + "shipping": null, + "source": null, + "source_transfer": null, + "statement_descriptor": null, + "statement_descriptor_suffix": null, + "status": "succeeded", + "transfer_data": null, + "transfer_group": null + }, + "created": 1708300860, + "currency": "aud", + "destination_details": { + "card": { + "reference_status": "pending", + "reference_type": "acquirer_reference_number", + "type": "refund" + }, + "type": "card" + }, + "metadata": {}, + "payment_intent": "pi_3OlKI1QNFa3smszT1eEui4Zp", + "reason": null, + "receipt_number": null, + "source_transfer_reversal": null, + "status": "succeeded", + "transfer_reversal": null + } + recorded_at: Mon, 19 Feb 2024 00:01:01 GMT +recorded_with: VCR 6.2.0 diff --git a/spec/fixtures/vcr_cassettes/Stripe-v10.9.0/Spree_Gateway_StripeSCA/_void/with_a_confirmed_payment/refunds_the_payment.yml b/spec/fixtures/vcr_cassettes/Stripe-v10.9.0/Spree_Gateway_StripeSCA/_void/with_a_confirmed_payment/refunds_the_payment.yml new file mode 100644 index 0000000000..5e735a01e1 --- /dev/null +++ b/spec/fixtures/vcr_cassettes/Stripe-v10.9.0/Spree_Gateway_StripeSCA/_void/with_a_confirmed_payment/refunds_the_payment.yml @@ -0,0 +1,1087 @@ +--- +http_interactions: +- request: + method: post + uri: https://api.stripe.com/v1/accounts + body: + encoding: UTF-8 + string: type=standard&country=AU&email=carrot.producer%40example.com + headers: + User-Agent: + - Stripe/v1 RubyBindings/10.9.0 + Authorization: + - Bearer + Content-Type: + - application/x-www-form-urlencoded + X-Stripe-Client-Telemetry: + - '{"last_request_metrics":{"request_id":"req_RQ4tnyZMxaTrfg","request_duration_ms":0}}' + Stripe-Version: + - '2023-10-16' + X-Stripe-Client-User-Agent: + - '{"bindings_version":"10.9.0","lang":"ruby","lang_version":"3.1.4 p223 (2023-03-30)","platform":"x86_64-linux","engine":"ruby","publisher":"stripe","uname":"Linux + version 5.15.0-92-generic (buildd@lcy02-amd64-002) (gcc (Ubuntu 9.4.0-1ubuntu1~20.04.2) + 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"}' + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Accept: + - "*/*" + response: + status: + code: 200 + message: OK + headers: + Server: + - nginx + Date: + - Mon, 19 Feb 2024 00:00:45 GMT + Content-Type: + - application/json + Content-Length: + - '3046' + Connection: + - keep-alive + Access-Control-Allow-Credentials: + - 'true' + Access-Control-Allow-Methods: + - GET,HEAD,PUT,PATCH,POST,DELETE + Access-Control-Allow-Origin: + - "*" + Access-Control-Expose-Headers: + - Request-Id, Stripe-Manage-Version, Stripe-Should-Retry, X-Stripe-External-Auth-Required, + X-Stripe-Privileged-Session-Required + Access-Control-Max-Age: + - '300' + Cache-Control: + - no-cache, no-store + Content-Security-Policy: + - report-uri https://q.stripe.com/csp-report?p=v1%2Faccounts; block-all-mixed-content; + 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: + - ec06ceda-0e0e-47a1-9d8b-93966afcf72b + Original-Request: + - req_qyPQcwlNSpsRVT + Request-Id: + - req_qyPQcwlNSpsRVT + Stripe-Should-Retry: + - 'false' + Stripe-Version: + - '2023-10-16' + Vary: + - Origin + X-Stripe-Routing-Context-Priority-Tier: + - api-testmode + Strict-Transport-Security: + - max-age=63072000; includeSubDomains; preload + body: + encoding: UTF-8 + string: |- + { + "id": "acct_1OlKHn4IGbVfXq1N", + "object": "account", + "business_profile": { + "annual_revenue": null, + "estimated_worker_count": null, + "mcc": null, + "name": null, + "product_description": null, + "support_address": null, + "support_email": null, + "support_phone": null, + "support_url": null, + "url": null + }, + "business_type": null, + "capabilities": {}, + "charges_enabled": false, + "controller": { + "is_controller": true, + "type": "application" + }, + "country": "AU", + "created": 1708300844, + "default_currency": "aud", + "details_submitted": false, + "email": "carrot.producer@example.com", + "external_accounts": { + "object": "list", + "data": [], + "has_more": false, + "total_count": 0, + "url": "/v1/accounts/acct_1OlKHn4IGbVfXq1N/external_accounts" + }, + "future_requirements": { + "alternatives": [], + "current_deadline": null, + "currently_due": [], + "disabled_reason": null, + "errors": [], + "eventually_due": [], + "past_due": [], + "pending_verification": [] + }, + "metadata": {}, + "payouts_enabled": false, + "requirements": { + "alternatives": [], + "current_deadline": null, + "currently_due": [ + "business_profile.product_description", + "business_profile.support_phone", + "business_profile.url", + "external_account", + "tos_acceptance.date", + "tos_acceptance.ip" + ], + "disabled_reason": "requirements.past_due", + "errors": [], + "eventually_due": [ + "business_profile.product_description", + "business_profile.support_phone", + "business_profile.url", + "external_account", + "tos_acceptance.date", + "tos_acceptance.ip" + ], + "past_due": [ + "external_account", + "tos_acceptance.date", + "tos_acceptance.ip" + ], + "pending_verification": [] + }, + "settings": { + "bacs_debit_payments": { + "display_name": null, + "service_user_number": null + }, + "branding": { + "icon": null, + "logo": null, + "primary_color": null, + "secondary_color": null + }, + "card_issuing": { + "tos_acceptance": { + "date": null, + "ip": null + } + }, + "card_payments": { + "decline_on": { + "avs_failure": false, + "cvc_failure": false + }, + "statement_descriptor_prefix": null, + "statement_descriptor_prefix_kana": null, + "statement_descriptor_prefix_kanji": null + }, + "dashboard": { + "display_name": null, + "timezone": "Etc/UTC" + }, + "invoices": { + "default_account_tax_ids": null + }, + "payments": { + "statement_descriptor": null, + "statement_descriptor_kana": null, + "statement_descriptor_kanji": null + }, + "payouts": { + "debit_negative_balances": true, + "schedule": { + "delay_days": 2, + "interval": "daily" + }, + "statement_descriptor": null + }, + "sepa_debit_payments": {} + }, + "tos_acceptance": { + "date": null, + "ip": null, + "user_agent": null + }, + "type": "standard" + } + recorded_at: Mon, 19 Feb 2024 00:00:45 GMT +- request: + method: get + uri: https://api.stripe.com/v1/payment_methods/pm_card_mastercard + body: + encoding: US-ASCII + string: '' + headers: + User-Agent: + - Stripe/v1 RubyBindings/10.9.0 + Authorization: + - Bearer + Content-Type: + - application/x-www-form-urlencoded + X-Stripe-Client-Telemetry: + - '{"last_request_metrics":{"request_id":"req_qyPQcwlNSpsRVT","request_duration_ms":2338}}' + Stripe-Version: + - '2023-10-16' + X-Stripe-Client-User-Agent: + - '{"bindings_version":"10.9.0","lang":"ruby","lang_version":"3.1.4 p223 (2023-03-30)","platform":"x86_64-linux","engine":"ruby","publisher":"stripe","uname":"Linux + version 5.15.0-92-generic (buildd@lcy02-amd64-002) (gcc (Ubuntu 9.4.0-1ubuntu1~20.04.2) + 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"}' + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Accept: + - "*/*" + response: + status: + code: 200 + message: OK + headers: + Server: + - nginx + Date: + - Mon, 19 Feb 2024 00:00:46 GMT + Content-Type: + - application/json + Content-Length: + - '977' + Connection: + - keep-alive + Access-Control-Allow-Credentials: + - 'true' + Access-Control-Allow-Methods: + - GET,HEAD,PUT,PATCH,POST,DELETE + Access-Control-Allow-Origin: + - "*" + Access-Control-Expose-Headers: + - Request-Id, Stripe-Manage-Version, Stripe-Should-Retry, X-Stripe-External-Auth-Required, + X-Stripe-Privileged-Session-Required + Access-Control-Max-Age: + - '300' + Cache-Control: + - no-cache, no-store + Content-Security-Policy: + - report-uri https://q.stripe.com/csp-report?p=v1%2Fpayment_methods%2F%3Apayment_method; + block-all-mixed-content; default-src 'none'; base-uri 'none'; form-action + 'none'; frame-ancestors 'none'; img-src 'self'; script-src 'self' 'report-sample'; + style-src 'self' + Request-Id: + - req_wKuzmpov6ASaSb + Stripe-Version: + - '2023-10-16' + Vary: + - Origin + X-Stripe-Routing-Context-Priority-Tier: + - api-testmode + Strict-Transport-Security: + - max-age=63072000; includeSubDomains; preload + body: + encoding: UTF-8 + string: |- + { + "id": "pm_1OlKHqKuuB1fWySnFEoTKGaZ", + "object": "payment_method", + "billing_details": { + "address": { + "city": null, + "country": null, + "line1": null, + "line2": null, + "postal_code": null, + "state": null + }, + "email": null, + "name": null, + "phone": null + }, + "card": { + "brand": "mastercard", + "checks": { + "address_line1_check": null, + "address_postal_code_check": null, + "cvc_check": "unchecked" + }, + "country": "US", + "display_brand": "mastercard", + "exp_month": 2, + "exp_year": 2025, + "fingerprint": "BL35fEFVcTTS5wpE", + "funding": "credit", + "generated_from": null, + "last4": "4444", + "networks": { + "available": [ + "mastercard" + ], + "preferred": null + }, + "three_d_secure_usage": { + "supported": true + }, + "wallet": null + }, + "created": 1708300846, + "customer": null, + "livemode": false, + "metadata": {}, + "type": "card" + } + recorded_at: Mon, 19 Feb 2024 00:00:46 GMT +- request: + method: post + uri: https://api.stripe.com/v1/payment_intents + body: + encoding: UTF-8 + string: amount=1000¤cy=aud&payment_method=pm_card_mastercard&payment_method_types[0]=card&capture_method=automatic&confirm=true + headers: + User-Agent: + - Stripe/v1 RubyBindings/10.9.0 + Authorization: + - Bearer + Content-Type: + - application/x-www-form-urlencoded + X-Stripe-Client-Telemetry: + - '{"last_request_metrics":{"request_id":"req_wKuzmpov6ASaSb","request_duration_ms":454}}' + Stripe-Version: + - '2023-10-16' + X-Stripe-Client-User-Agent: + - '{"bindings_version":"10.9.0","lang":"ruby","lang_version":"3.1.4 p223 (2023-03-30)","platform":"x86_64-linux","engine":"ruby","publisher":"stripe","uname":"Linux + version 5.15.0-92-generic (buildd@lcy02-amd64-002) (gcc (Ubuntu 9.4.0-1ubuntu1~20.04.2) + 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_1OlKHn4IGbVfXq1N + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Accept: + - "*/*" + response: + status: + code: 200 + message: OK + headers: + Server: + - nginx + Date: + - Mon, 19 Feb 2024 00:00:47 GMT + Content-Type: + - application/json + Content-Length: + - '1396' + Connection: + - keep-alive + Access-Control-Allow-Credentials: + - 'true' + Access-Control-Allow-Methods: + - GET,HEAD,PUT,PATCH,POST,DELETE + Access-Control-Allow-Origin: + - "*" + Access-Control-Expose-Headers: + - Request-Id, Stripe-Manage-Version, Stripe-Should-Retry, X-Stripe-External-Auth-Required, + X-Stripe-Privileged-Session-Required + Access-Control-Max-Age: + - '300' + Cache-Control: + - no-cache, no-store + Content-Security-Policy: + - report-uri https://q.stripe.com/csp-report?p=v1%2Fpayment_intents; block-all-mixed-content; + 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: + - f9133ee4-438b-4d9e-b53a-e8dd67fc4bf5 + Original-Request: + - req_cUxnfdapoSVAW5 + Request-Id: + - req_cUxnfdapoSVAW5 + Stripe-Account: + - acct_1OlKHn4IGbVfXq1N + Stripe-Should-Retry: + - 'false' + Stripe-Version: + - '2023-10-16' + Vary: + - Origin + X-Stripe-Routing-Context-Priority-Tier: + - api-testmode + Strict-Transport-Security: + - max-age=63072000; includeSubDomains; preload + body: + encoding: UTF-8 + string: |- + { + "id": "pi_3OlKHq4IGbVfXq1N1cjQgX3f", + "object": "payment_intent", + "amount": 1000, + "amount_capturable": 0, + "amount_details": { + "tip": {} + }, + "amount_received": 1000, + "application": "", + "application_fee_amount": null, + "automatic_payment_methods": null, + "canceled_at": null, + "cancellation_reason": null, + "capture_method": "automatic", + "client_secret": "pi_3OlKHq4IGbVfXq1N1cjQgX3f_secret_WIUGbKrXc8pCrw0cGyIF7WIFz", + "confirmation_method": "automatic", + "created": 1708300846, + "currency": "aud", + "customer": null, + "description": null, + "invoice": null, + "last_payment_error": null, + "latest_charge": "ch_3OlKHq4IGbVfXq1N1Ont3YNO", + "livemode": false, + "metadata": {}, + "next_action": null, + "on_behalf_of": null, + "payment_method": "pm_1OlKHq4IGbVfXq1NRLlk6sO0", + "payment_method_configuration_details": null, + "payment_method_options": { + "card": { + "installments": null, + "mandate_options": null, + "network": null, + "request_three_d_secure": "automatic" + } + }, + "payment_method_types": [ + "card" + ], + "processing": null, + "receipt_email": null, + "review": null, + "setup_future_usage": null, + "shipping": null, + "source": null, + "statement_descriptor": null, + "statement_descriptor_suffix": null, + "status": "succeeded", + "transfer_data": null, + "transfer_group": null + } + recorded_at: Mon, 19 Feb 2024 00:00:48 GMT +- request: + method: get + uri: https://api.stripe.com/v1/payment_intents/pi_3OlKHq4IGbVfXq1N1cjQgX3f + body: + encoding: US-ASCII + string: '' + headers: + User-Agent: + - Stripe/v1 RubyBindings/10.9.0 + Authorization: + - Bearer + Content-Type: + - application/x-www-form-urlencoded + X-Stripe-Client-Telemetry: + - '{"last_request_metrics":{"request_id":"req_cUxnfdapoSVAW5","request_duration_ms":1551}}' + Stripe-Version: + - '2023-10-16' + X-Stripe-Client-User-Agent: + - '{"bindings_version":"10.9.0","lang":"ruby","lang_version":"3.1.4 p223 (2023-03-30)","platform":"x86_64-linux","engine":"ruby","publisher":"stripe","uname":"Linux + version 5.15.0-92-generic (buildd@lcy02-amd64-002) (gcc (Ubuntu 9.4.0-1ubuntu1~20.04.2) + 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_1OlKHn4IGbVfXq1N + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Accept: + - "*/*" + response: + status: + code: 200 + message: OK + headers: + Server: + - nginx + Date: + - Mon, 19 Feb 2024 00:00:48 GMT + Content-Type: + - application/json + Content-Length: + - '1396' + Connection: + - keep-alive + Access-Control-Allow-Credentials: + - 'true' + Access-Control-Allow-Methods: + - GET,HEAD,PUT,PATCH,POST,DELETE + Access-Control-Allow-Origin: + - "*" + Access-Control-Expose-Headers: + - Request-Id, Stripe-Manage-Version, Stripe-Should-Retry, X-Stripe-External-Auth-Required, + X-Stripe-Privileged-Session-Required + Access-Control-Max-Age: + - '300' + Cache-Control: + - no-cache, no-store + Content-Security-Policy: + - report-uri https://q.stripe.com/csp-report?p=v1%2Fpayment_intents%2F%3Aintent; + block-all-mixed-content; default-src 'none'; base-uri 'none'; form-action + 'none'; frame-ancestors 'none'; img-src 'self'; script-src 'self' 'report-sample'; + style-src 'self' + Request-Id: + - req_31hlpB6NcLOMmV + Stripe-Account: + - acct_1OlKHn4IGbVfXq1N + Stripe-Version: + - '2023-10-16' + Vary: + - Origin + X-Stripe-Routing-Context-Priority-Tier: + - api-testmode + Strict-Transport-Security: + - max-age=63072000; includeSubDomains; preload + body: + encoding: UTF-8 + string: |- + { + "id": "pi_3OlKHq4IGbVfXq1N1cjQgX3f", + "object": "payment_intent", + "amount": 1000, + "amount_capturable": 0, + "amount_details": { + "tip": {} + }, + "amount_received": 1000, + "application": "", + "application_fee_amount": null, + "automatic_payment_methods": null, + "canceled_at": null, + "cancellation_reason": null, + "capture_method": "automatic", + "client_secret": "pi_3OlKHq4IGbVfXq1N1cjQgX3f_secret_WIUGbKrXc8pCrw0cGyIF7WIFz", + "confirmation_method": "automatic", + "created": 1708300846, + "currency": "aud", + "customer": null, + "description": null, + "invoice": null, + "last_payment_error": null, + "latest_charge": "ch_3OlKHq4IGbVfXq1N1Ont3YNO", + "livemode": false, + "metadata": {}, + "next_action": null, + "on_behalf_of": null, + "payment_method": "pm_1OlKHq4IGbVfXq1NRLlk6sO0", + "payment_method_configuration_details": null, + "payment_method_options": { + "card": { + "installments": null, + "mandate_options": null, + "network": null, + "request_three_d_secure": "automatic" + } + }, + "payment_method_types": [ + "card" + ], + "processing": null, + "receipt_email": null, + "review": null, + "setup_future_usage": null, + "shipping": null, + "source": null, + "statement_descriptor": null, + "statement_descriptor_suffix": null, + "status": "succeeded", + "transfer_data": null, + "transfer_group": null + } + recorded_at: Mon, 19 Feb 2024 00:00:48 GMT +- request: + method: get + uri: https://api.stripe.com/v1/payment_intents/pi_3OlKHq4IGbVfXq1N1cjQgX3f + body: + encoding: US-ASCII + string: '' + headers: + Authorization: + - Basic c2tfdGVzdF94RmdKUU9sWHBNQUZzb3p0endGQlRGaFAwMEhHN0J1Q0ptOg== + User-Agent: + - Stripe/v1 ActiveMerchantBindings/1.133.0 + Stripe-Version: + - '2020-08-27' + X-Stripe-Client-User-Agent: + - '{"bindings_version":"1.133.0","lang":"ruby","lang_version":"3.1.4 p223 (2023-03-30)","platform":"x86_64-linux","publisher":"active_merchant"}' + X-Stripe-Client-User-Metadata: + - '{"ip":null}' + Stripe-Account: + - acct_1OlKHn4IGbVfXq1N + Connection: + - close + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Accept: + - "*/*" + response: + status: + code: 200 + message: OK + headers: + Server: + - nginx + Date: + - Mon, 19 Feb 2024 00:00:49 GMT + Content-Type: + - application/json + Content-Length: + - '5160' + Connection: + - close + Access-Control-Allow-Credentials: + - 'true' + Access-Control-Allow-Methods: + - GET,HEAD,PUT,PATCH,POST,DELETE + Access-Control-Allow-Origin: + - "*" + Access-Control-Expose-Headers: + - Request-Id, Stripe-Manage-Version, Stripe-Should-Retry, X-Stripe-External-Auth-Required, + X-Stripe-Privileged-Session-Required + Access-Control-Max-Age: + - '300' + Cache-Control: + - no-cache, no-store + Content-Security-Policy: + - report-uri https://q.stripe.com/csp-report?p=v1%2Fpayment_intents%2F%3Aintent; + block-all-mixed-content; default-src 'none'; base-uri 'none'; form-action + 'none'; frame-ancestors 'none'; img-src 'self'; script-src 'self' 'report-sample'; + style-src 'self' + Request-Id: + - req_UJEcCq7OOtnIwI + Stripe-Account: + - acct_1OlKHn4IGbVfXq1N + Stripe-Version: + - '2020-08-27' + Vary: + - Origin + X-Stripe-Routing-Context-Priority-Tier: + - api-testmode + Strict-Transport-Security: + - max-age=63072000; includeSubDomains; preload + body: + encoding: UTF-8 + string: |- + { + "id": "pi_3OlKHq4IGbVfXq1N1cjQgX3f", + "object": "payment_intent", + "amount": 1000, + "amount_capturable": 0, + "amount_details": { + "tip": {} + }, + "amount_received": 1000, + "application": "", + "application_fee_amount": null, + "automatic_payment_methods": null, + "canceled_at": null, + "cancellation_reason": null, + "capture_method": "automatic", + "charges": { + "object": "list", + "data": [ + { + "id": "ch_3OlKHq4IGbVfXq1N1Ont3YNO", + "object": "charge", + "amount": 1000, + "amount_captured": 1000, + "amount_refunded": 0, + "application": "", + "application_fee": null, + "application_fee_amount": null, + "balance_transaction": "txn_3OlKHq4IGbVfXq1N1GJjELA4", + "billing_details": { + "address": { + "city": null, + "country": null, + "line1": null, + "line2": null, + "postal_code": null, + "state": null + }, + "email": null, + "name": null, + "phone": null + }, + "calculated_statement_descriptor": "OFNOFNOFN", + "captured": true, + "created": 1708300847, + "currency": "aud", + "customer": null, + "description": null, + "destination": null, + "dispute": null, + "disputed": false, + "failure_balance_transaction": null, + "failure_code": null, + "failure_message": null, + "fraud_details": {}, + "invoice": null, + "livemode": false, + "metadata": {}, + "on_behalf_of": null, + "order": null, + "outcome": { + "network_status": "approved_by_network", + "reason": null, + "risk_level": "normal", + "risk_score": 10, + "seller_message": "Payment complete.", + "type": "authorized" + }, + "paid": true, + "payment_intent": "pi_3OlKHq4IGbVfXq1N1cjQgX3f", + "payment_method": "pm_1OlKHq4IGbVfXq1NRLlk6sO0", + "payment_method_details": { + "card": { + "amount_authorized": 1000, + "brand": "mastercard", + "checks": { + "address_line1_check": null, + "address_postal_code_check": null, + "cvc_check": "pass" + }, + "country": "US", + "exp_month": 2, + "exp_year": 2025, + "extended_authorization": { + "status": "disabled" + }, + "fingerprint": "BL35fEFVcTTS5wpE", + "funding": "credit", + "incremental_authorization": { + "status": "unavailable" + }, + "installments": null, + "last4": "4444", + "mandate": null, + "multicapture": { + "status": "unavailable" + }, + "network": "mastercard", + "network_token": { + "used": false + }, + "overcapture": { + "maximum_amount_capturable": 1000, + "status": "unavailable" + }, + "three_d_secure": null, + "wallet": null + }, + "type": "card" + }, + "radar_options": {}, + "receipt_email": null, + "receipt_number": null, + "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xT2xLSG40SUdiVmZYcTFOKLG0yq4GMgZkKJasuBY6LBZfGji61KmlJs6E8u7Qoqlx0-uqmlTk4lhiXau-RR1qcP8gkT3JC77tPwzT", + "refunded": false, + "refunds": { + "object": "list", + "data": [], + "has_more": false, + "total_count": 0, + "url": "/v1/charges/ch_3OlKHq4IGbVfXq1N1Ont3YNO/refunds" + }, + "review": null, + "shipping": null, + "source": null, + "source_transfer": null, + "statement_descriptor": null, + "statement_descriptor_suffix": null, + "status": "succeeded", + "transfer_data": null, + "transfer_group": null + } + ], + "has_more": false, + "total_count": 1, + "url": "/v1/charges?payment_intent=pi_3OlKHq4IGbVfXq1N1cjQgX3f" + }, + "client_secret": "pi_3OlKHq4IGbVfXq1N1cjQgX3f_secret_WIUGbKrXc8pCrw0cGyIF7WIFz", + "confirmation_method": "automatic", + "created": 1708300846, + "currency": "aud", + "customer": null, + "description": null, + "invoice": null, + "last_payment_error": null, + "latest_charge": "ch_3OlKHq4IGbVfXq1N1Ont3YNO", + "livemode": false, + "metadata": {}, + "next_action": null, + "on_behalf_of": null, + "payment_method": "pm_1OlKHq4IGbVfXq1NRLlk6sO0", + "payment_method_configuration_details": null, + "payment_method_options": { + "card": { + "installments": null, + "mandate_options": null, + "network": null, + "request_three_d_secure": "automatic" + } + }, + "payment_method_types": [ + "card" + ], + "processing": null, + "receipt_email": null, + "review": null, + "setup_future_usage": null, + "shipping": null, + "source": null, + "statement_descriptor": null, + "statement_descriptor_suffix": null, + "status": "succeeded", + "transfer_data": null, + "transfer_group": null + } + recorded_at: Mon, 19 Feb 2024 00:00:49 GMT +- request: + method: post + uri: https://api.stripe.com/v1/charges/ch_3OlKHq4IGbVfXq1N1Ont3YNO/refunds + body: + encoding: UTF-8 + string: amount=1000&expand[0]=charge + headers: + Content-Type: + - application/x-www-form-urlencoded + Authorization: + - Basic c2tfdGVzdF94RmdKUU9sWHBNQUZzb3p0endGQlRGaFAwMEhHN0J1Q0ptOg== + User-Agent: + - Stripe/v1 ActiveMerchantBindings/1.133.0 + Stripe-Version: + - '2020-08-27' + X-Stripe-Client-User-Agent: + - '{"bindings_version":"1.133.0","lang":"ruby","lang_version":"3.1.4 p223 (2023-03-30)","platform":"x86_64-linux","publisher":"active_merchant"}' + X-Stripe-Client-User-Metadata: + - '{"ip":null}' + Stripe-Account: + - acct_1OlKHn4IGbVfXq1N + Connection: + - close + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Accept: + - "*/*" + response: + status: + code: 200 + message: OK + headers: + Server: + - nginx + Date: + - Mon, 19 Feb 2024 00:00:50 GMT + Content-Type: + - application/json + Content-Length: + - '4536' + Connection: + - close + Access-Control-Allow-Credentials: + - 'true' + Access-Control-Allow-Methods: + - GET,HEAD,PUT,PATCH,POST,DELETE + Access-Control-Allow-Origin: + - "*" + Access-Control-Expose-Headers: + - Request-Id, Stripe-Manage-Version, Stripe-Should-Retry, X-Stripe-External-Auth-Required, + X-Stripe-Privileged-Session-Required + Access-Control-Max-Age: + - '300' + Cache-Control: + - no-cache, no-store + Content-Security-Policy: + - report-uri https://q.stripe.com/csp-report?p=v1%2Fcharges%2F%3Acharge%2Frefunds; + block-all-mixed-content; 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: + - ac332f6f-19be-4c8b-8db1-a3c3e4207494 + Original-Request: + - req_t6Cm1fychRStDp + Request-Id: + - req_t6Cm1fychRStDp + Stripe-Account: + - acct_1OlKHn4IGbVfXq1N + Stripe-Should-Retry: + - 'false' + Stripe-Version: + - '2020-08-27' + Vary: + - Origin + X-Stripe-Routing-Context-Priority-Tier: + - api-testmode + Strict-Transport-Security: + - max-age=63072000; includeSubDomains; preload + body: + encoding: UTF-8 + string: |- + { + "id": "re_3OlKHq4IGbVfXq1N1jpyDy0m", + "object": "refund", + "amount": 1000, + "balance_transaction": "txn_3OlKHq4IGbVfXq1N1WU3drjk", + "charge": { + "id": "ch_3OlKHq4IGbVfXq1N1Ont3YNO", + "object": "charge", + "amount": 1000, + "amount_captured": 1000, + "amount_refunded": 1000, + "application": "", + "application_fee": null, + "application_fee_amount": null, + "balance_transaction": "txn_3OlKHq4IGbVfXq1N1GJjELA4", + "billing_details": { + "address": { + "city": null, + "country": null, + "line1": null, + "line2": null, + "postal_code": null, + "state": null + }, + "email": null, + "name": null, + "phone": null + }, + "calculated_statement_descriptor": "OFNOFNOFN", + "captured": true, + "created": 1708300847, + "currency": "aud", + "customer": null, + "description": null, + "destination": null, + "dispute": null, + "disputed": false, + "failure_balance_transaction": null, + "failure_code": null, + "failure_message": null, + "fraud_details": {}, + "invoice": null, + "livemode": false, + "metadata": {}, + "on_behalf_of": null, + "order": null, + "outcome": { + "network_status": "approved_by_network", + "reason": null, + "risk_level": "normal", + "risk_score": 10, + "seller_message": "Payment complete.", + "type": "authorized" + }, + "paid": true, + "payment_intent": "pi_3OlKHq4IGbVfXq1N1cjQgX3f", + "payment_method": "pm_1OlKHq4IGbVfXq1NRLlk6sO0", + "payment_method_details": { + "card": { + "amount_authorized": 1000, + "brand": "mastercard", + "checks": { + "address_line1_check": null, + "address_postal_code_check": null, + "cvc_check": "pass" + }, + "country": "US", + "exp_month": 2, + "exp_year": 2025, + "extended_authorization": { + "status": "disabled" + }, + "fingerprint": "BL35fEFVcTTS5wpE", + "funding": "credit", + "incremental_authorization": { + "status": "unavailable" + }, + "installments": null, + "last4": "4444", + "mandate": null, + "multicapture": { + "status": "unavailable" + }, + "network": "mastercard", + "network_token": { + "used": false + }, + "overcapture": { + "maximum_amount_capturable": 1000, + "status": "unavailable" + }, + "three_d_secure": null, + "wallet": null + }, + "type": "card" + }, + "radar_options": {}, + "receipt_email": null, + "receipt_number": null, + "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xT2xLSG40SUdiVmZYcTFOKLK0yq4GMgZC-6RblWI6LBZNj4qC9TZHwzFVNsqfPi9Wu03ml2yo1-Y0x6RquIwndy0haWmRkS_LZ4lS", + "refunded": true, + "refunds": { + "object": "list", + "data": [ + { + "id": "re_3OlKHq4IGbVfXq1N1jpyDy0m", + "object": "refund", + "amount": 1000, + "balance_transaction": "txn_3OlKHq4IGbVfXq1N1WU3drjk", + "charge": "ch_3OlKHq4IGbVfXq1N1Ont3YNO", + "created": 1708300849, + "currency": "aud", + "destination_details": { + "card": { + "reference_status": "pending", + "reference_type": "acquirer_reference_number", + "type": "refund" + }, + "type": "card" + }, + "metadata": {}, + "payment_intent": "pi_3OlKHq4IGbVfXq1N1cjQgX3f", + "reason": null, + "receipt_number": null, + "source_transfer_reversal": null, + "status": "succeeded", + "transfer_reversal": null + } + ], + "has_more": false, + "total_count": 1, + "url": "/v1/charges/ch_3OlKHq4IGbVfXq1N1Ont3YNO/refunds" + }, + "review": null, + "shipping": null, + "source": null, + "source_transfer": null, + "statement_descriptor": null, + "statement_descriptor_suffix": null, + "status": "succeeded", + "transfer_data": null, + "transfer_group": null + }, + "created": 1708300849, + "currency": "aud", + "destination_details": { + "card": { + "reference_status": "pending", + "reference_type": "acquirer_reference_number", + "type": "refund" + }, + "type": "card" + }, + "metadata": {}, + "payment_intent": "pi_3OlKHq4IGbVfXq1N1cjQgX3f", + "reason": null, + "receipt_number": null, + "source_transfer_reversal": null, + "status": "succeeded", + "transfer_reversal": null + } + recorded_at: Mon, 19 Feb 2024 00:00:50 GMT +recorded_with: VCR 6.2.0 diff --git a/spec/fixtures/vcr_cassettes/Stripe-v10.9.0/Spree_Gateway_StripeSCA/_void/with_a_voidable_payment/void_the_payment.yml b/spec/fixtures/vcr_cassettes/Stripe-v10.9.0/Spree_Gateway_StripeSCA/_void/with_a_voidable_payment/void_the_payment.yml new file mode 100644 index 0000000000..929077ca53 --- /dev/null +++ b/spec/fixtures/vcr_cassettes/Stripe-v10.9.0/Spree_Gateway_StripeSCA/_void/with_a_voidable_payment/void_the_payment.yml @@ -0,0 +1,738 @@ +--- +http_interactions: +- request: + method: post + uri: https://api.stripe.com/v1/accounts + body: + encoding: UTF-8 + string: type=standard&country=AU&email=carrot.producer%40example.com + headers: + User-Agent: + - Stripe/v1 RubyBindings/10.9.0 + Authorization: + - Bearer + Content-Type: + - application/x-www-form-urlencoded + X-Stripe-Client-Telemetry: + - '{"last_request_metrics":{"request_id":"req_31hlpB6NcLOMmV","request_duration_ms":498}}' + Stripe-Version: + - '2023-10-16' + X-Stripe-Client-User-Agent: + - '{"bindings_version":"10.9.0","lang":"ruby","lang_version":"3.1.4 p223 (2023-03-30)","platform":"x86_64-linux","engine":"ruby","publisher":"stripe","uname":"Linux + version 5.15.0-92-generic (buildd@lcy02-amd64-002) (gcc (Ubuntu 9.4.0-1ubuntu1~20.04.2) + 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"}' + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Accept: + - "*/*" + response: + status: + code: 200 + message: OK + headers: + Server: + - nginx + Date: + - Mon, 19 Feb 2024 00:00:52 GMT + Content-Type: + - application/json + Content-Length: + - '3046' + Connection: + - keep-alive + Access-Control-Allow-Credentials: + - 'true' + Access-Control-Allow-Methods: + - GET,HEAD,PUT,PATCH,POST,DELETE + Access-Control-Allow-Origin: + - "*" + Access-Control-Expose-Headers: + - Request-Id, Stripe-Manage-Version, Stripe-Should-Retry, X-Stripe-External-Auth-Required, + X-Stripe-Privileged-Session-Required + Access-Control-Max-Age: + - '300' + Cache-Control: + - no-cache, no-store + Content-Security-Policy: + - report-uri https://q.stripe.com/csp-report?p=v1%2Faccounts; block-all-mixed-content; + 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: + - 838c393f-89e8-440a-ac55-e772d28bcbc9 + Original-Request: + - req_xgoTbIOtuDEIze + Request-Id: + - req_xgoTbIOtuDEIze + Stripe-Should-Retry: + - 'false' + Stripe-Version: + - '2023-10-16' + Vary: + - Origin + X-Stripe-Routing-Context-Priority-Tier: + - api-testmode + Strict-Transport-Security: + - max-age=63072000; includeSubDomains; preload + body: + encoding: UTF-8 + string: |- + { + "id": "acct_1OlKHuQQavT2yUiZ", + "object": "account", + "business_profile": { + "annual_revenue": null, + "estimated_worker_count": null, + "mcc": null, + "name": null, + "product_description": null, + "support_address": null, + "support_email": null, + "support_phone": null, + "support_url": null, + "url": null + }, + "business_type": null, + "capabilities": {}, + "charges_enabled": false, + "controller": { + "is_controller": true, + "type": "application" + }, + "country": "AU", + "created": 1708300851, + "default_currency": "aud", + "details_submitted": false, + "email": "carrot.producer@example.com", + "external_accounts": { + "object": "list", + "data": [], + "has_more": false, + "total_count": 0, + "url": "/v1/accounts/acct_1OlKHuQQavT2yUiZ/external_accounts" + }, + "future_requirements": { + "alternatives": [], + "current_deadline": null, + "currently_due": [], + "disabled_reason": null, + "errors": [], + "eventually_due": [], + "past_due": [], + "pending_verification": [] + }, + "metadata": {}, + "payouts_enabled": false, + "requirements": { + "alternatives": [], + "current_deadline": null, + "currently_due": [ + "business_profile.product_description", + "business_profile.support_phone", + "business_profile.url", + "external_account", + "tos_acceptance.date", + "tos_acceptance.ip" + ], + "disabled_reason": "requirements.past_due", + "errors": [], + "eventually_due": [ + "business_profile.product_description", + "business_profile.support_phone", + "business_profile.url", + "external_account", + "tos_acceptance.date", + "tos_acceptance.ip" + ], + "past_due": [ + "external_account", + "tos_acceptance.date", + "tos_acceptance.ip" + ], + "pending_verification": [] + }, + "settings": { + "bacs_debit_payments": { + "display_name": null, + "service_user_number": null + }, + "branding": { + "icon": null, + "logo": null, + "primary_color": null, + "secondary_color": null + }, + "card_issuing": { + "tos_acceptance": { + "date": null, + "ip": null + } + }, + "card_payments": { + "decline_on": { + "avs_failure": false, + "cvc_failure": false + }, + "statement_descriptor_prefix": null, + "statement_descriptor_prefix_kana": null, + "statement_descriptor_prefix_kanji": null + }, + "dashboard": { + "display_name": null, + "timezone": "Etc/UTC" + }, + "invoices": { + "default_account_tax_ids": null + }, + "payments": { + "statement_descriptor": null, + "statement_descriptor_kana": null, + "statement_descriptor_kanji": null + }, + "payouts": { + "debit_negative_balances": true, + "schedule": { + "delay_days": 2, + "interval": "daily" + }, + "statement_descriptor": null + }, + "sepa_debit_payments": {} + }, + "tos_acceptance": { + "date": null, + "ip": null, + "user_agent": null + }, + "type": "standard" + } + recorded_at: Mon, 19 Feb 2024 00:00:52 GMT +- request: + method: get + uri: https://api.stripe.com/v1/payment_methods/pm_card_mastercard + body: + encoding: US-ASCII + string: '' + headers: + User-Agent: + - Stripe/v1 RubyBindings/10.9.0 + Authorization: + - Bearer + Content-Type: + - application/x-www-form-urlencoded + X-Stripe-Client-Telemetry: + - '{"last_request_metrics":{"request_id":"req_xgoTbIOtuDEIze","request_duration_ms":1934}}' + Stripe-Version: + - '2023-10-16' + X-Stripe-Client-User-Agent: + - '{"bindings_version":"10.9.0","lang":"ruby","lang_version":"3.1.4 p223 (2023-03-30)","platform":"x86_64-linux","engine":"ruby","publisher":"stripe","uname":"Linux + version 5.15.0-92-generic (buildd@lcy02-amd64-002) (gcc (Ubuntu 9.4.0-1ubuntu1~20.04.2) + 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"}' + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Accept: + - "*/*" + response: + status: + code: 200 + message: OK + headers: + Server: + - nginx + Date: + - Mon, 19 Feb 2024 00:00:53 GMT + Content-Type: + - application/json + Content-Length: + - '977' + Connection: + - keep-alive + Access-Control-Allow-Credentials: + - 'true' + Access-Control-Allow-Methods: + - GET,HEAD,PUT,PATCH,POST,DELETE + Access-Control-Allow-Origin: + - "*" + Access-Control-Expose-Headers: + - Request-Id, Stripe-Manage-Version, Stripe-Should-Retry, X-Stripe-External-Auth-Required, + X-Stripe-Privileged-Session-Required + Access-Control-Max-Age: + - '300' + Cache-Control: + - no-cache, no-store + Content-Security-Policy: + - report-uri https://q.stripe.com/csp-report?p=v1%2Fpayment_methods%2F%3Apayment_method; + block-all-mixed-content; default-src 'none'; base-uri 'none'; form-action + 'none'; frame-ancestors 'none'; img-src 'self'; script-src 'self' 'report-sample'; + style-src 'self' + Request-Id: + - req_SHpcnpm4a7AUEZ + Stripe-Version: + - '2023-10-16' + Vary: + - Origin + X-Stripe-Routing-Context-Priority-Tier: + - api-testmode + Strict-Transport-Security: + - max-age=63072000; includeSubDomains; preload + body: + encoding: UTF-8 + string: |- + { + "id": "pm_1OlKHxKuuB1fWySn3c29EEi6", + "object": "payment_method", + "billing_details": { + "address": { + "city": null, + "country": null, + "line1": null, + "line2": null, + "postal_code": null, + "state": null + }, + "email": null, + "name": null, + "phone": null + }, + "card": { + "brand": "mastercard", + "checks": { + "address_line1_check": null, + "address_postal_code_check": null, + "cvc_check": "unchecked" + }, + "country": "US", + "display_brand": "mastercard", + "exp_month": 2, + "exp_year": 2025, + "fingerprint": "BL35fEFVcTTS5wpE", + "funding": "credit", + "generated_from": null, + "last4": "4444", + "networks": { + "available": [ + "mastercard" + ], + "preferred": null + }, + "three_d_secure_usage": { + "supported": true + }, + "wallet": null + }, + "created": 1708300853, + "customer": null, + "livemode": false, + "metadata": {}, + "type": "card" + } + recorded_at: Mon, 19 Feb 2024 00:00:53 GMT +- request: + method: post + uri: https://api.stripe.com/v1/payment_intents + body: + encoding: UTF-8 + string: amount=1000¤cy=aud&payment_method=pm_card_mastercard&payment_method_types[0]=card&capture_method=manual + headers: + User-Agent: + - Stripe/v1 RubyBindings/10.9.0 + Authorization: + - Bearer + Content-Type: + - application/x-www-form-urlencoded + X-Stripe-Client-Telemetry: + - '{"last_request_metrics":{"request_id":"req_SHpcnpm4a7AUEZ","request_duration_ms":470}}' + Stripe-Version: + - '2023-10-16' + X-Stripe-Client-User-Agent: + - '{"bindings_version":"10.9.0","lang":"ruby","lang_version":"3.1.4 p223 (2023-03-30)","platform":"x86_64-linux","engine":"ruby","publisher":"stripe","uname":"Linux + version 5.15.0-92-generic (buildd@lcy02-amd64-002) (gcc (Ubuntu 9.4.0-1ubuntu1~20.04.2) + 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_1OlKHuQQavT2yUiZ + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Accept: + - "*/*" + response: + status: + code: 200 + message: OK + headers: + Server: + - nginx + Date: + - Mon, 19 Feb 2024 00:00:54 GMT + Content-Type: + - application/json + Content-Length: + - '1377' + Connection: + - keep-alive + Access-Control-Allow-Credentials: + - 'true' + Access-Control-Allow-Methods: + - GET,HEAD,PUT,PATCH,POST,DELETE + Access-Control-Allow-Origin: + - "*" + Access-Control-Expose-Headers: + - Request-Id, Stripe-Manage-Version, Stripe-Should-Retry, X-Stripe-External-Auth-Required, + X-Stripe-Privileged-Session-Required + Access-Control-Max-Age: + - '300' + Cache-Control: + - no-cache, no-store + Content-Security-Policy: + - report-uri https://q.stripe.com/csp-report?p=v1%2Fpayment_intents; block-all-mixed-content; + 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: + - c6ca5d5c-bcc3-4585-ba74-43319c9d47ef + Original-Request: + - req_bh5LlLDM9k2WFC + Request-Id: + - req_bh5LlLDM9k2WFC + Stripe-Account: + - acct_1OlKHuQQavT2yUiZ + Stripe-Should-Retry: + - 'false' + Stripe-Version: + - '2023-10-16' + Vary: + - Origin + X-Stripe-Routing-Context-Priority-Tier: + - api-testmode + Strict-Transport-Security: + - max-age=63072000; includeSubDomains; preload + body: + encoding: UTF-8 + string: |- + { + "id": "pi_3OlKHyQQavT2yUiZ1U0lESdv", + "object": "payment_intent", + "amount": 1000, + "amount_capturable": 0, + "amount_details": { + "tip": {} + }, + "amount_received": 0, + "application": "", + "application_fee_amount": null, + "automatic_payment_methods": null, + "canceled_at": null, + "cancellation_reason": null, + "capture_method": "manual", + "client_secret": "pi_3OlKHyQQavT2yUiZ1U0lESdv_secret_rpTnb2WYG0pVnybfmdKD0wp3k", + "confirmation_method": "automatic", + "created": 1708300854, + "currency": "aud", + "customer": null, + "description": null, + "invoice": null, + "last_payment_error": null, + "latest_charge": null, + "livemode": false, + "metadata": {}, + "next_action": null, + "on_behalf_of": null, + "payment_method": "pm_1OlKHxQQavT2yUiZRHGPw6fU", + "payment_method_configuration_details": null, + "payment_method_options": { + "card": { + "installments": null, + "mandate_options": null, + "network": null, + "request_three_d_secure": "automatic" + } + }, + "payment_method_types": [ + "card" + ], + "processing": null, + "receipt_email": null, + "review": null, + "setup_future_usage": null, + "shipping": null, + "source": null, + "statement_descriptor": null, + "statement_descriptor_suffix": null, + "status": "requires_confirmation", + "transfer_data": null, + "transfer_group": null + } + recorded_at: Mon, 19 Feb 2024 00:00:54 GMT +- request: + method: get + uri: https://api.stripe.com/v1/payment_intents/pi_3OlKHyQQavT2yUiZ1U0lESdv + body: + encoding: US-ASCII + string: '' + headers: + User-Agent: + - Stripe/v1 RubyBindings/10.9.0 + Authorization: + - Bearer + Content-Type: + - application/x-www-form-urlencoded + X-Stripe-Client-Telemetry: + - '{"last_request_metrics":{"request_id":"req_bh5LlLDM9k2WFC","request_duration_ms":627}}' + Stripe-Version: + - '2023-10-16' + X-Stripe-Client-User-Agent: + - '{"bindings_version":"10.9.0","lang":"ruby","lang_version":"3.1.4 p223 (2023-03-30)","platform":"x86_64-linux","engine":"ruby","publisher":"stripe","uname":"Linux + version 5.15.0-92-generic (buildd@lcy02-amd64-002) (gcc (Ubuntu 9.4.0-1ubuntu1~20.04.2) + 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_1OlKHuQQavT2yUiZ + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Accept: + - "*/*" + response: + status: + code: 200 + message: OK + headers: + Server: + - nginx + Date: + - Mon, 19 Feb 2024 00:00:54 GMT + Content-Type: + - application/json + Content-Length: + - '1377' + Connection: + - keep-alive + Access-Control-Allow-Credentials: + - 'true' + Access-Control-Allow-Methods: + - GET,HEAD,PUT,PATCH,POST,DELETE + Access-Control-Allow-Origin: + - "*" + Access-Control-Expose-Headers: + - Request-Id, Stripe-Manage-Version, Stripe-Should-Retry, X-Stripe-External-Auth-Required, + X-Stripe-Privileged-Session-Required + Access-Control-Max-Age: + - '300' + Cache-Control: + - no-cache, no-store + Content-Security-Policy: + - report-uri https://q.stripe.com/csp-report?p=v1%2Fpayment_intents%2F%3Aintent; + block-all-mixed-content; default-src 'none'; base-uri 'none'; form-action + 'none'; frame-ancestors 'none'; img-src 'self'; script-src 'self' 'report-sample'; + style-src 'self' + Request-Id: + - req_7Xt2mBUL2tQGa6 + Stripe-Account: + - acct_1OlKHuQQavT2yUiZ + Stripe-Version: + - '2023-10-16' + Vary: + - Origin + X-Stripe-Routing-Context-Priority-Tier: + - api-testmode + Strict-Transport-Security: + - max-age=63072000; includeSubDomains; preload + body: + encoding: UTF-8 + string: |- + { + "id": "pi_3OlKHyQQavT2yUiZ1U0lESdv", + "object": "payment_intent", + "amount": 1000, + "amount_capturable": 0, + "amount_details": { + "tip": {} + }, + "amount_received": 0, + "application": "", + "application_fee_amount": null, + "automatic_payment_methods": null, + "canceled_at": null, + "cancellation_reason": null, + "capture_method": "manual", + "client_secret": "pi_3OlKHyQQavT2yUiZ1U0lESdv_secret_rpTnb2WYG0pVnybfmdKD0wp3k", + "confirmation_method": "automatic", + "created": 1708300854, + "currency": "aud", + "customer": null, + "description": null, + "invoice": null, + "last_payment_error": null, + "latest_charge": null, + "livemode": false, + "metadata": {}, + "next_action": null, + "on_behalf_of": null, + "payment_method": "pm_1OlKHxQQavT2yUiZRHGPw6fU", + "payment_method_configuration_details": null, + "payment_method_options": { + "card": { + "installments": null, + "mandate_options": null, + "network": null, + "request_three_d_secure": "automatic" + } + }, + "payment_method_types": [ + "card" + ], + "processing": null, + "receipt_email": null, + "review": null, + "setup_future_usage": null, + "shipping": null, + "source": null, + "statement_descriptor": null, + "statement_descriptor_suffix": null, + "status": "requires_confirmation", + "transfer_data": null, + "transfer_group": null + } + recorded_at: Mon, 19 Feb 2024 00:00:54 GMT +- request: + method: post + uri: https://api.stripe.com/v1/payment_intents/pi_3OlKHyQQavT2yUiZ1U0lESdv/cancel + body: + encoding: US-ASCII + string: '' + headers: + Content-Type: + - application/x-www-form-urlencoded + Authorization: + - Basic c2tfdGVzdF94RmdKUU9sWHBNQUZzb3p0endGQlRGaFAwMEhHN0J1Q0ptOg== + User-Agent: + - Stripe/v1 ActiveMerchantBindings/1.133.0 + Stripe-Version: + - '2020-08-27' + X-Stripe-Client-User-Agent: + - '{"bindings_version":"1.133.0","lang":"ruby","lang_version":"3.1.4 p223 (2023-03-30)","platform":"x86_64-linux","publisher":"active_merchant"}' + X-Stripe-Client-User-Metadata: + - '{"ip":null}' + Stripe-Account: + - acct_1OlKHuQQavT2yUiZ + Connection: + - close + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Accept: + - "*/*" + response: + status: + code: 200 + message: OK + headers: + Server: + - nginx + Date: + - Mon, 19 Feb 2024 00:00:55 GMT + Content-Type: + - application/json + Content-Length: + - '1541' + Connection: + - close + Access-Control-Allow-Credentials: + - 'true' + Access-Control-Allow-Methods: + - GET,HEAD,PUT,PATCH,POST,DELETE + Access-Control-Allow-Origin: + - "*" + Access-Control-Expose-Headers: + - Request-Id, Stripe-Manage-Version, Stripe-Should-Retry, X-Stripe-External-Auth-Required, + X-Stripe-Privileged-Session-Required + Access-Control-Max-Age: + - '300' + Cache-Control: + - no-cache, no-store + Content-Security-Policy: + - report-uri https://q.stripe.com/csp-report?p=v1%2Fpayment_intents%2F%3Aintent%2Fcancel; + block-all-mixed-content; 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: + - 778bc74d-5e4f-41d8-b14f-c52d3b177da9 + Original-Request: + - req_c8b1fdbZWRDi0l + Request-Id: + - req_c8b1fdbZWRDi0l + Stripe-Account: + - acct_1OlKHuQQavT2yUiZ + Stripe-Should-Retry: + - 'false' + Stripe-Version: + - '2020-08-27' + Vary: + - Origin + X-Stripe-Routing-Context-Priority-Tier: + - api-testmode + Strict-Transport-Security: + - max-age=63072000; includeSubDomains; preload + body: + encoding: UTF-8 + string: |- + { + "id": "pi_3OlKHyQQavT2yUiZ1U0lESdv", + "object": "payment_intent", + "amount": 1000, + "amount_capturable": 0, + "amount_details": { + "tip": {} + }, + "amount_received": 0, + "application": "", + "application_fee_amount": null, + "automatic_payment_methods": null, + "canceled_at": 1708300855, + "cancellation_reason": null, + "capture_method": "manual", + "charges": { + "object": "list", + "data": [], + "has_more": false, + "total_count": 0, + "url": "/v1/charges?payment_intent=pi_3OlKHyQQavT2yUiZ1U0lESdv" + }, + "client_secret": "pi_3OlKHyQQavT2yUiZ1U0lESdv_secret_rpTnb2WYG0pVnybfmdKD0wp3k", + "confirmation_method": "automatic", + "created": 1708300854, + "currency": "aud", + "customer": null, + "description": null, + "invoice": null, + "last_payment_error": null, + "latest_charge": null, + "livemode": false, + "metadata": {}, + "next_action": null, + "on_behalf_of": null, + "payment_method": "pm_1OlKHxQQavT2yUiZRHGPw6fU", + "payment_method_configuration_details": null, + "payment_method_options": { + "card": { + "installments": null, + "mandate_options": null, + "network": null, + "request_three_d_secure": "automatic" + } + }, + "payment_method_types": [ + "card" + ], + "processing": null, + "receipt_email": null, + "review": null, + "setup_future_usage": null, + "shipping": null, + "source": null, + "statement_descriptor": null, + "statement_descriptor_suffix": null, + "status": "canceled", + "transfer_data": null, + "transfer_group": null + } + recorded_at: Mon, 19 Feb 2024 00:00:55 GMT +recorded_with: VCR 6.2.0