From fad37318b3ca2eb35474232ab496e4bd6b3d2dd7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 30 Nov 2023 17:53:34 +0000 Subject: [PATCH 01/16] chore(deps): bump activemerchant from 1.123.0 to 1.133.0 Bumps [activemerchant](https://github.com/activemerchant/active_merchant) from 1.123.0 to 1.133.0. - [Release notes](https://github.com/activemerchant/active_merchant/releases) - [Changelog](https://github.com/activemerchant/active_merchant/blob/master/CHANGELOG) - [Commits](https://github.com/activemerchant/active_merchant/compare/v1.123.0...v1.133.0) --- updated-dependencies: - dependency-name: activemerchant dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index fc4250cd8a..53a086a95f 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -98,11 +98,12 @@ GEM activejob (7.0.8) activesupport (= 7.0.8) globalid (>= 0.3.6) - activemerchant (1.123.0) + activemerchant (1.133.0) activesupport (>= 4.2) builder (>= 2.1.2, < 4.0.0) i18n (>= 0.6.9) nokogiri (~> 1.4) + rexml (~> 3.2.5) activemodel (7.0.8) activesupport (= 7.0.8) activerecord (7.0.8) From 62fbaa8a6ecc685f03a512ce63640cf45d359ac5 Mon Sep 17 00:00:00 2001 From: Gaetan Craig-Riou Date: Mon, 5 Feb 2024 15:21:06 +1100 Subject: [PATCH 02/16] Update Stripe payment intents decorator - copied the relevant code from the new Active Merchant version - Add spec to cover the scenario of saving a card when paying by card - Fix Stripe stub. I used stripe stubs for the new scenario because storing a card on stripe depends on some client side interaction with Stripe. We can't capture that with VCR. --- .../stripe_payment_intents_decorator.rb | 34 ++++++------------- spec/support/request/stripe_stubs.rb | 2 +- spec/system/consumer/checkout/payment_spec.rb | 19 +++++++++++ 3 files changed, 31 insertions(+), 24 deletions(-) diff --git a/lib/active_merchant/billing/gateways/stripe_payment_intents_decorator.rb b/lib/active_merchant/billing/gateways/stripe_payment_intents_decorator.rb index 711589f0cc..eb29ca560a 100644 --- a/lib/active_merchant/billing/gateways/stripe_payment_intents_decorator.rb +++ b/lib/active_merchant/billing/gateways/stripe_payment_intents_decorator.rb @@ -38,9 +38,9 @@ ActiveMerchant::Billing::StripePaymentIntentsGateway.class_eval do end # Note: Not all payment methods are currently supported by the - # {Payment Methods API}[https://stripe.com/docs/payments/payment-methods] - # Current implementation will create - # a PaymentMethod object if the method is a token or credit card + # {Payment Methods API}[https://stripe.com/docs/payments/payment-methods] + # Current implementation will create a PaymentMethod object if the method is a token + # or credit card # All other types will default to legacy Stripe store def store(payment_method, options = {}) params = {} @@ -48,27 +48,15 @@ ActiveMerchant::Billing::StripePaymentIntentsGateway.class_eval do # If customer option is provided, create a payment method and attach to customer id # Otherwise, create a customer, then attach - # if payment_method.is_a?(StripePaymentToken) || - # payment_method.is_a?(ActiveMerchant::Billing::CreditCard) - add_payment_method_token(params, payment_method, options) - if options[:customer] - customer_id = options[:customer] - else - post[:validate] = options[:validate] unless options[:validate].nil? - post[:description] = options[:description] if options[:description] - post[:email] = options[:email] if options[:email] - customer = commit(:post, 'customers', post, options) - customer_id = customer.params['id'] + result = add_payment_method_token(params, payment_method, options) + return result if result.is_a?(ActiveMerchant::Billing::Response) - # return the stripe response if expected customer id is not present - return customer if customer_id.nil? - end - commit(:post, - "payment_methods/#{params[:payment_method]}/attach", - { customer: customer_id }, options) - # else - # super(payment, options) - # end + customer_id = options[:customer] || customer(post, payment_method, options).params['id'] + options = format_idempotency_key(options, 'attach') + attach_parameters = { customer: customer_id } + attach_parameters[:validate] = options[:validate] unless options[:validate].nil? + + commit(:post, "payment_methods/#{params[:payment_method]}/attach", attach_parameters, options) end private diff --git a/spec/support/request/stripe_stubs.rb b/spec/support/request/stripe_stubs.rb index 9a10c9830a..524233cffc 100644 --- a/spec/support/request/stripe_stubs.rb +++ b/spec/support/request/stripe_stubs.rb @@ -44,7 +44,7 @@ module StripeStubs # Stubs the customers call to both the main stripe account and the connected account def stub_customers_post_request(email:, response: {}, stripe_account_header: false) stub = stub_request(:post, "https://api.stripe.com/v1/customers") - .with(body: { email: }) + .with(body: { expand: ["sources"], email: }) stub = stub.with(headers: { 'Stripe-Account' => 'abc123' }) if stripe_account_header stub.to_return(customers_response_mock(response)) end diff --git a/spec/system/consumer/checkout/payment_spec.rb b/spec/system/consumer/checkout/payment_spec.rb index 970c9a09c8..0646e40185 100644 --- a/spec/system/consumer/checkout/payment_spec.rb +++ b/spec/system/consumer/checkout/payment_spec.rb @@ -250,6 +250,25 @@ describe "As a consumer, I want to checkout my order" do click_on "Next - Order summary" proceed_to_summary end + + context "when saving card" do + it "selects Stripe SCA and proceeds to the summary step" do + stub_customers_post_request(email: order.user.email) + stub_payment_method_attach_request + + choose pay_method.to_s + fill_out_card_details + check "Save card for future use" + + click_on "Next - Order summary" + proceed_to_summary + + # Verify card has been saved with correct stripe IDs + user_credit_card = order.reload.user.credit_cards.first + expect(user_credit_card.gateway_payment_profile_id).to eq "pm_123" + expect(user_credit_card.gateway_customer_profile_id).to eq "cus_A123" + end + end end end From 8a0c32eec0d7eee68730197c3c81bc384573521d Mon Sep 17 00:00:00 2001 From: Gaetan Craig-Riou Date: Mon, 5 Feb 2024 16:24:41 +1100 Subject: [PATCH 03/16] Improve Stripe::ProfileStorer specs * Use `with_stripe_setup` helper * add the request failing scenario --- spec/lib/stripe/profile_storer_spec.rb | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/spec/lib/stripe/profile_storer_spec.rb b/spec/lib/stripe/profile_storer_spec.rb index e7b69f8c8c..0553fe5fc4 100644 --- a/spec/lib/stripe/profile_storer_spec.rb +++ b/spec/lib/stripe/profile_storer_spec.rb @@ -5,6 +5,7 @@ require 'spec_helper' module Stripe describe ProfileStorer do include StripeStubs + include StripeHelper describe "create_customer_from_token" do let(:stripe_payment_method) { create(:stripe_sca_payment_method) } @@ -18,9 +19,11 @@ module Stripe { status: 200, body: JSON.generate(id: customer_id, sources: { data: [{ id: "1" }] }) } } - before do - Stripe.api_key = "sk_test_12345" + around do |example| + with_stripe_setup { example.run } + end + before do stub_customers_post_request(email: payment.order.email, response: customer_response_mock) stub_payment_method_attach_request(payment_method: card_id, customer: customer_id) end @@ -32,6 +35,18 @@ module Stripe expect(payment.source.gateway_customer_profile_id).to eq customer_id expect(payment.source.gateway_payment_profile_id).to eq card_id end + + context "when request fails" do + it "raises an error" do + expect(stripe_payment_method.provider).to receive(:store).and_return( + ActiveMerchant::Billing::Response.new(false, "some error") + ) + + expect { profile_storer.create_customer_from_token }.to raise_error( + Spree::Core::GatewayError + ) + end + end end end end From 84f53abdfe5ba365d687bce8b35aadc8bbfa2adf Mon Sep 17 00:00:00 2001 From: Gaetan Craig-Riou Date: Mon, 5 Feb 2024 16:26:28 +1100 Subject: [PATCH 04/16] StripePaymentIntentsGateway decorator, remove `store` --- .../stripe_payment_intents_decorator.rb | 22 ------------------- lib/stripe/profile_storer.rb | 4 +++- 2 files changed, 3 insertions(+), 23 deletions(-) diff --git a/lib/active_merchant/billing/gateways/stripe_payment_intents_decorator.rb b/lib/active_merchant/billing/gateways/stripe_payment_intents_decorator.rb index eb29ca560a..0ea1625b1a 100644 --- a/lib/active_merchant/billing/gateways/stripe_payment_intents_decorator.rb +++ b/lib/active_merchant/billing/gateways/stripe_payment_intents_decorator.rb @@ -37,28 +37,6 @@ ActiveMerchant::Billing::StripePaymentIntentsGateway.class_eval do super(money, charge_id, options) end - # Note: Not all payment methods are currently supported by the - # {Payment Methods API}[https://stripe.com/docs/payments/payment-methods] - # Current implementation will create a PaymentMethod object if the method is a token - # or credit card - # All other types will default to legacy Stripe store - def store(payment_method, options = {}) - params = {} - post = {} - - # If customer option is provided, create a payment method and attach to customer id - # Otherwise, create a customer, then attach - result = add_payment_method_token(params, payment_method, options) - return result if result.is_a?(ActiveMerchant::Billing::Response) - - customer_id = options[:customer] || customer(post, payment_method, options).params['id'] - options = format_idempotency_key(options, 'attach') - attach_parameters = { customer: customer_id } - attach_parameters[:validate] = options[:validate] unless options[:validate].nil? - - commit(:post, "payment_methods/#{params[:payment_method]}/attach", attach_parameters, options) - end - private def add_connected_account(post, options = {}) diff --git a/lib/stripe/profile_storer.rb b/lib/stripe/profile_storer.rb index 688bb4f9e8..ba3cc7b0aa 100644 --- a/lib/stripe/profile_storer.rb +++ b/lib/stripe/profile_storer.rb @@ -12,7 +12,9 @@ module Stripe end def create_customer_from_token - token = @payment.source.gateway_payment_profile_id + token = ActiveMerchant::Billing::StripeGateway::StripePaymentToken.new( + { 'id' => @payment.source.gateway_payment_profile_id } + ) response = @provider.store(token, options) if response.success? From 765ec81725b32999559c952340885f1e1295f1e6 Mon Sep 17 00:00:00 2001 From: Gaetan Craig-Riou Date: Tue, 6 Feb 2024 10:52:38 +1100 Subject: [PATCH 05/16] StripePaymentIntentsGateway decorator, remove capture --- .../billing/gateways/stripe_payment_intents_decorator.rb | 7 ------- 1 file changed, 7 deletions(-) diff --git a/lib/active_merchant/billing/gateways/stripe_payment_intents_decorator.rb b/lib/active_merchant/billing/gateways/stripe_payment_intents_decorator.rb index 0ea1625b1a..8875f6bffd 100644 --- a/lib/active_merchant/billing/gateways/stripe_payment_intents_decorator.rb +++ b/lib/active_merchant/billing/gateways/stripe_payment_intents_decorator.rb @@ -24,13 +24,6 @@ ActiveMerchant::Billing::StripePaymentIntentsGateway.class_eval do commit(:post, 'payment_intents', post, options) end - def capture(money, intent_id, options = {}) - post = {} - post[:amount_to_capture] = money - add_connected_account(post, options) - commit(:post, "payment_intents/#{intent_id}/capture", post, options) - end - def refund(money, intent_id, options = {}) intent = commit(:get, "payment_intents/#{intent_id}", nil, options) charge_id = intent.params.dig('charges', 'data')[0]['id'] From 214e8b85ea8dadff8b735d9d486e468131eb3a71 Mon Sep 17 00:00:00 2001 From: Gaetan Craig-Riou Date: Tue, 6 Feb 2024 10:53:46 +1100 Subject: [PATCH 06/16] StripePaymentIntentsGateway decorator, remove create_intent --- .../stripe_payment_intents_decorator.rb | 20 ------------------- 1 file changed, 20 deletions(-) diff --git a/lib/active_merchant/billing/gateways/stripe_payment_intents_decorator.rb b/lib/active_merchant/billing/gateways/stripe_payment_intents_decorator.rb index 8875f6bffd..bee22c7082 100644 --- a/lib/active_merchant/billing/gateways/stripe_payment_intents_decorator.rb +++ b/lib/active_merchant/billing/gateways/stripe_payment_intents_decorator.rb @@ -4,26 +4,6 @@ ActiveMerchant::Billing::StripePaymentIntentsGateway.class_eval do CREATE_INTENT_ATTRIBUTES = %i[description statement_descriptor receipt_email save_payment_method].freeze - def create_intent(money, payment_method, options = {}) - post = {} - add_amount(post, money, options, true) - add_capture_method(post, options) - add_confirmation_method(post, options) - add_customer(post, options) - add_payment_method_token(post, payment_method, options) - add_metadata(post, options) - add_return_url(post, options) - add_connected_account(post, options) - add_shipping_address(post, options) - setup_future_usage(post, options) - - CREATE_INTENT_ATTRIBUTES.each do |attribute| - add_whitelisted_attribute(post, options, attribute) - end - - commit(:post, 'payment_intents', post, options) - end - def refund(money, intent_id, options = {}) intent = commit(:get, "payment_intents/#{intent_id}", nil, options) charge_id = intent.params.dig('charges', 'data')[0]['id'] From 549610bc355c2ad7b757e9f1013e125e0a4a9e90 Mon Sep 17 00:00:00 2001 From: Gaetan Craig-Riou Date: Tue, 6 Feb 2024 11:16:53 +1100 Subject: [PATCH 07/16] Finally remove StripePaymentIntentsGateway decorator Add spec for Spree::Gateway::StripeSCA#void It also partially fix 11670, refund of Stripe payment should now work for complete order --- app/models/spree/gateway/stripe_sca.rb | 10 +- .../stripe_payment_intents_decorator.rb | 28 - .../refunds_the_payment.yml | 1149 +++++++++++++++++ .../void_the_payment.yml | 524 ++++++++ .../refunds_the_payment.yml | 877 +++++++++++++ .../void_the_payment.yml | 530 ++++++++ ...t_intent_state_is_not_requires_capture.yml | 128 +- .../_purchase/completes_the_purchase.yml | 237 ++-- ..._error_message_to_help_developer_debug.yml | 134 +- spec/models/spree/gateway/stripe_sca_spec.rb | 87 +- 10 files changed, 3407 insertions(+), 297 deletions(-) delete mode 100644 lib/active_merchant/billing/gateways/stripe_payment_intents_decorator.rb create mode 100644 spec/fixtures/vcr_cassettes/Stripe-v10.2.0/Spree_Gateway_StripeSCA/_void/with_a_confirmed_payment/refunds_the_payment.yml create mode 100644 spec/fixtures/vcr_cassettes/Stripe-v10.2.0/Spree_Gateway_StripeSCA/_void/with_a_voidable_payment/void_the_payment.yml create mode 100644 spec/fixtures/vcr_cassettes/Stripe-v10.6.0/Spree_Gateway_StripeSCA/_void/with_a_confirmed_payment/refunds_the_payment.yml create mode 100644 spec/fixtures/vcr_cassettes/Stripe-v10.6.0/Spree_Gateway_StripeSCA/_void/with_a_voidable_payment/void_the_payment.yml diff --git a/app/models/spree/gateway/stripe_sca.rb b/app/models/spree/gateway/stripe_sca.rb index b4a3ea95b4..c137734ba2 100644 --- a/app/models/spree/gateway/stripe_sca.rb +++ b/app/models/spree/gateway/stripe_sca.rb @@ -4,7 +4,6 @@ require 'stripe/profile_storer' require 'stripe/credit_card_cloner' require 'stripe/authorize_response_patcher' require 'stripe/payment_intent_validator' -require 'active_merchant/billing/gateways/stripe_payment_intents_decorator' require 'active_merchant/billing/gateways/stripe' module Spree @@ -87,6 +86,7 @@ module Spree # NOTE: the name of this method is determined by Spree::Payment::Processing def void(response_code, _creditcard, gateway_options) payment_intent_id = response_code + payment_intent_response = Stripe::PaymentIntent.retrieve(payment_intent_id, stripe_account: stripe_account_id) gateway_options[:stripe_account] = stripe_account_id @@ -95,8 +95,7 @@ module Spree if voidable?(payment_intent_response) provider.void(response_code, gateway_options) else - provider.refund(refundable_amount(payment_intent_response), response_code, - gateway_options) + provider.refund(payment_intent_response.amount_received, response_code, gateway_options) end end @@ -119,11 +118,6 @@ module Spree VOIDABLE_STATES.include? payment_intent_response.status end - def refundable_amount(payment_intent_response) - payment_intent_response.amount_received - - payment_intent_response.charges.data.map(&:amount_refunded).sum - end - # In this gateway, what we call 'secret_key' is the 'login' def options options = super diff --git a/lib/active_merchant/billing/gateways/stripe_payment_intents_decorator.rb b/lib/active_merchant/billing/gateways/stripe_payment_intents_decorator.rb deleted file mode 100644 index bee22c7082..0000000000 --- a/lib/active_merchant/billing/gateways/stripe_payment_intents_decorator.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -ActiveMerchant::Billing::StripePaymentIntentsGateway.class_eval do - CREATE_INTENT_ATTRIBUTES = - %i[description statement_descriptor receipt_email save_payment_method].freeze - - def refund(money, intent_id, options = {}) - intent = commit(:get, "payment_intents/#{intent_id}", nil, options) - charge_id = intent.params.dig('charges', 'data')[0]['id'] - super(money, charge_id, options) - end - - private - - def add_connected_account(post, options = {}) - return unless transfer_data = options[:transfer_data] - - post[:transfer_data] = {} - if transfer_data[:destination] - post[:transfer_data][:destination] = transfer_data[:destination] - end - post[:transfer_data][:amount] = transfer_data[:amount] if transfer_data[:amount] - post[:on_behalf_of] = options[:on_behalf_of] if options[:on_behalf_of] - post[:transfer_group] = options[:transfer_group] if options[:transfer_group] - post[:application_fee_amount] = options[:application_fee] if options[:application_fee] - post - end -end diff --git a/spec/fixtures/vcr_cassettes/Stripe-v10.2.0/Spree_Gateway_StripeSCA/_void/with_a_confirmed_payment/refunds_the_payment.yml b/spec/fixtures/vcr_cassettes/Stripe-v10.2.0/Spree_Gateway_StripeSCA/_void/with_a_confirmed_payment/refunds_the_payment.yml new file mode 100644 index 0000000000..c3cce8b8a6 --- /dev/null +++ b/spec/fixtures/vcr_cassettes/Stripe-v10.2.0/Spree_Gateway_StripeSCA/_void/with_a_confirmed_payment/refunds_the_payment.yml @@ -0,0 +1,1149 @@ +--- +http_interactions: +- 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.2.0 + Authorization: + - Bearer + Content-Type: + - application/x-www-form-urlencoded + X-Stripe-Client-Telemetry: + - '{"last_request_metrics":{"request_id":"req_RQ4tnyZMxaTrfg","request_duration_ms":920}}' + Stripe-Version: + - '2023-10-16' + X-Stripe-Client-User-Agent: + - '{"bindings_version":"10.2.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, 12 Feb 2024 03:46:37 GMT + Content-Type: + - application/json + Content-Length: + - '942' + 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_AMPupOEWxQpMvJ + Stripe-Version: + - '2023-10-16' + Vary: + - Origin + X-Stripe-Non-Api-Overhead-Duration-Ms: + - '140.0' + X-Stripe-Routing-Context-Priority-Tier: + - api-testmode + Strict-Transport-Security: + - max-age=63072000; includeSubDomains; preload + body: + encoding: UTF-8 + string: |- + { + "id": "pm_1OiqTZGkyVbTBiYeSbdHHVBU", + "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", + "exp_month": 2, + "exp_year": 2025, + "fingerprint": "1Zr75a6zBSZLu0Zp", + "funding": "credit", + "generated_from": null, + "last4": "4444", + "networks": { + "available": [ + "mastercard" + ], + "preferred": null + }, + "three_d_secure_usage": { + "supported": true + }, + "wallet": null + }, + "created": 1707709597, + "customer": null, + "livemode": false, + "metadata": {}, + "type": "card" + } + recorded_at: Mon, 12 Feb 2024 03:46:37 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.2.0 + Authorization: + - Bearer + Content-Type: + - application/x-www-form-urlencoded + X-Stripe-Client-Telemetry: + - '{"last_request_metrics":{"request_id":"req_AMPupOEWxQpMvJ","request_duration_ms":356}}' + Stripe-Version: + - '2023-10-16' + X-Stripe-Client-User-Agent: + - '{"bindings_version":"10.2.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_1APQreGkyVbTBiYe + 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, 12 Feb 2024 03:46:38 GMT + Content-Type: + - application/json + Content-Length: + - '1344' + 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: + - 65755257-63df-450c-9bf4-90d6512d869a + Original-Request: + - req_Y9z6pafg0X39IU + Request-Id: + - req_Y9z6pafg0X39IU + Stripe-Should-Retry: + - 'false' + Stripe-Version: + - '2023-10-16' + Vary: + - Origin + X-Stripe-Non-Api-Overhead-Duration-Ms: + - '306.0' + X-Stripe-Routing-Context-Priority-Tier: + - api-testmode + Strict-Transport-Security: + - max-age=63072000; includeSubDomains; preload + body: + encoding: UTF-8 + string: |- + { + "id": "pi_3OiqTaGkyVbTBiYe0nUcBPZV", + "object": "payment_intent", + "amount": 1000, + "amount_capturable": 0, + "amount_details": { + "tip": {} + }, + "amount_received": 0, + "application": null, + "application_fee_amount": null, + "automatic_payment_methods": null, + "canceled_at": null, + "cancellation_reason": null, + "capture_method": "manual", + "client_secret": "pi_3OiqTaGkyVbTBiYe0nUcBPZV_secret_2KT0oh8uYFUeQONViEq7ZWLgN", + "confirmation_method": "automatic", + "created": 1707709598, + "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_1OiqTaGkyVbTBiYeLv5l0zWX", + "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, 12 Feb 2024 03:46:38 GMT +- request: + method: post + uri: https://api.stripe.com/v1/payment_intents/pi_3OiqTaGkyVbTBiYe0nUcBPZV/confirm + body: + encoding: US-ASCII + string: '' + headers: + User-Agent: + - Stripe/v1 RubyBindings/10.2.0 + Authorization: + - Bearer + Content-Type: + - application/x-www-form-urlencoded + X-Stripe-Client-Telemetry: + - '{"last_request_metrics":{"request_id":"req_Y9z6pafg0X39IU","request_duration_ms":528}}' + Stripe-Version: + - '2023-10-16' + X-Stripe-Client-User-Agent: + - '{"bindings_version":"10.2.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, 12 Feb 2024 03:46:39 GMT + Content-Type: + - application/json + Content-Length: + - '1367' + 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%2Fconfirm; + 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: + - 43c15925-cb4a-4302-8ba7-1c60c45a4148 + Original-Request: + - req_nFqQkMl1tz0Za6 + Request-Id: + - req_nFqQkMl1tz0Za6 + Stripe-Should-Retry: + - 'false' + Stripe-Version: + - '2023-10-16' + Vary: + - Origin + X-Stripe-Non-Api-Overhead-Duration-Ms: + - '722.0' + X-Stripe-Routing-Context-Priority-Tier: + - api-testmode + Strict-Transport-Security: + - max-age=63072000; includeSubDomains; preload + body: + encoding: UTF-8 + string: |- + { + "id": "pi_3OiqTaGkyVbTBiYe0nUcBPZV", + "object": "payment_intent", + "amount": 1000, + "amount_capturable": 1000, + "amount_details": { + "tip": {} + }, + "amount_received": 0, + "application": null, + "application_fee_amount": null, + "automatic_payment_methods": null, + "canceled_at": null, + "cancellation_reason": null, + "capture_method": "manual", + "client_secret": "pi_3OiqTaGkyVbTBiYe0nUcBPZV_secret_2KT0oh8uYFUeQONViEq7ZWLgN", + "confirmation_method": "automatic", + "created": 1707709598, + "currency": "aud", + "customer": null, + "description": null, + "invoice": null, + "last_payment_error": null, + "latest_charge": "ch_3OiqTaGkyVbTBiYe0O6Hj6zD", + "livemode": false, + "metadata": {}, + "next_action": null, + "on_behalf_of": null, + "payment_method": "pm_1OiqTaGkyVbTBiYeLv5l0zWX", + "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_capture", + "transfer_data": null, + "transfer_group": null + } + recorded_at: Mon, 12 Feb 2024 03:46:39 GMT +- request: + method: post + uri: https://api.stripe.com/v1/payment_intents/pi_3OiqTaGkyVbTBiYe0nUcBPZV/capture + body: + encoding: US-ASCII + string: '' + headers: + User-Agent: + - Stripe/v1 RubyBindings/10.2.0 + Authorization: + - Bearer + Content-Type: + - application/x-www-form-urlencoded + X-Stripe-Client-Telemetry: + - '{"last_request_metrics":{"request_id":"req_nFqQkMl1tz0Za6","request_duration_ms":1012}}' + Stripe-Version: + - '2023-10-16' + X-Stripe-Client-User-Agent: + - '{"bindings_version":"10.2.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, 12 Feb 2024 03:46:40 GMT + Content-Type: + - application/json + Content-Length: + - '1360' + 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%2Fcapture; + 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: + - 369fad8e-e4ff-4766-a931-602e295519d8 + Original-Request: + - req_UkosKenQjluRqt + Request-Id: + - req_UkosKenQjluRqt + Stripe-Should-Retry: + - 'false' + Stripe-Version: + - '2023-10-16' + Vary: + - Origin + X-Stripe-Non-Api-Overhead-Duration-Ms: + - '676.0' + X-Stripe-Routing-Context-Priority-Tier: + - api-testmode + Strict-Transport-Security: + - max-age=63072000; includeSubDomains; preload + body: + encoding: UTF-8 + string: |- + { + "id": "pi_3OiqTaGkyVbTBiYe0nUcBPZV", + "object": "payment_intent", + "amount": 1000, + "amount_capturable": 0, + "amount_details": { + "tip": {} + }, + "amount_received": 1000, + "application": null, + "application_fee_amount": null, + "automatic_payment_methods": null, + "canceled_at": null, + "cancellation_reason": null, + "capture_method": "manual", + "client_secret": "pi_3OiqTaGkyVbTBiYe0nUcBPZV_secret_2KT0oh8uYFUeQONViEq7ZWLgN", + "confirmation_method": "automatic", + "created": 1707709598, + "currency": "aud", + "customer": null, + "description": null, + "invoice": null, + "last_payment_error": null, + "latest_charge": "ch_3OiqTaGkyVbTBiYe0O6Hj6zD", + "livemode": false, + "metadata": {}, + "next_action": null, + "on_behalf_of": null, + "payment_method": "pm_1OiqTaGkyVbTBiYeLv5l0zWX", + "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, 12 Feb 2024 03:46:40 GMT +- request: + method: get + uri: https://api.stripe.com/v1/payment_intents/pi_3OiqTaGkyVbTBiYe0nUcBPZV + body: + encoding: US-ASCII + string: '' + headers: + User-Agent: + - Stripe/v1 RubyBindings/10.2.0 + Authorization: + - Bearer + Content-Type: + - application/x-www-form-urlencoded + X-Stripe-Client-Telemetry: + - '{"last_request_metrics":{"request_id":"req_UkosKenQjluRqt","request_duration_ms":869}}' + Stripe-Version: + - '2023-10-16' + X-Stripe-Client-User-Agent: + - '{"bindings_version":"10.2.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_1APQreGkyVbTBiYe + 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, 12 Feb 2024 03:46:41 GMT + Content-Type: + - application/json + Content-Length: + - '1360' + 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_bkByviWmLTQOfW + Stripe-Version: + - '2023-10-16' + Vary: + - Origin + X-Stripe-Non-Api-Overhead-Duration-Ms: + - '60.0' + X-Stripe-Routing-Context-Priority-Tier: + - api-testmode + Strict-Transport-Security: + - max-age=63072000; includeSubDomains; preload + body: + encoding: UTF-8 + string: |- + { + "id": "pi_3OiqTaGkyVbTBiYe0nUcBPZV", + "object": "payment_intent", + "amount": 1000, + "amount_capturable": 0, + "amount_details": { + "tip": {} + }, + "amount_received": 1000, + "application": null, + "application_fee_amount": null, + "automatic_payment_methods": null, + "canceled_at": null, + "cancellation_reason": null, + "capture_method": "manual", + "client_secret": "pi_3OiqTaGkyVbTBiYe0nUcBPZV_secret_2KT0oh8uYFUeQONViEq7ZWLgN", + "confirmation_method": "automatic", + "created": 1707709598, + "currency": "aud", + "customer": null, + "description": null, + "invoice": null, + "last_payment_error": null, + "latest_charge": "ch_3OiqTaGkyVbTBiYe0O6Hj6zD", + "livemode": false, + "metadata": {}, + "next_action": null, + "on_behalf_of": null, + "payment_method": "pm_1OiqTaGkyVbTBiYeLv5l0zWX", + "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, 12 Feb 2024 03:46:41 GMT +- request: + method: get + uri: https://api.stripe.com/v1/payment_intents/pi_3OiqTaGkyVbTBiYe0nUcBPZV + body: + encoding: US-ASCII + string: '' + headers: + Authorization: + - Basic c2tfdGVzdF9HRlFXMnU4c2xsbmxBTzYxN2FUODFRdko6 + 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_1APQreGkyVbTBiYe + 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, 12 Feb 2024 03:46:41 GMT + Content-Type: + - application/json + Content-Length: + - '5139' + 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_UtyUK1MQapAOEz + Stripe-Version: + - '2020-08-27' + Vary: + - Origin + X-Stripe-Non-Api-Overhead-Duration-Ms: + - '117.0' + X-Stripe-Routing-Context-Priority-Tier: + - api-testmode + Strict-Transport-Security: + - max-age=63072000; includeSubDomains; preload + body: + encoding: UTF-8 + string: |- + { + "id": "pi_3OiqTaGkyVbTBiYe0nUcBPZV", + "object": "payment_intent", + "amount": 1000, + "amount_capturable": 0, + "amount_details": { + "tip": {} + }, + "amount_received": 1000, + "application": null, + "application_fee_amount": null, + "automatic_payment_methods": null, + "canceled_at": null, + "cancellation_reason": null, + "capture_method": "manual", + "charges": { + "object": "list", + "data": [ + { + "id": "ch_3OiqTaGkyVbTBiYe0O6Hj6zD", + "object": "charge", + "amount": 1000, + "amount_captured": 1000, + "amount_refunded": 0, + "application": null, + "application_fee": null, + "application_fee_amount": null, + "balance_transaction": "txn_3OiqTaGkyVbTBiYe0AQLBi3e", + "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": "OPENFOODNETWORK", + "captured": true, + "created": 1707709599, + "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": 13, + "seller_message": "Payment complete.", + "type": "authorized" + }, + "paid": true, + "payment_intent": "pi_3OiqTaGkyVbTBiYe0nUcBPZV", + "payment_method": "pm_1OiqTaGkyVbTBiYeLv5l0zWX", + "payment_method_details": { + "card": { + "amount_authorized": 1000, + "brand": "mastercard", + "capture_before": 1708314399, + "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": "1Zr75a6zBSZLu0Zp", + "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/CAcaFwoVYWNjdF8xQVBRcmVHa3lWYlRCaVllKKGppq4GMgYKu9Q4B5A6LBaTUzdg_aQZMp9WlQueacwdHTSVg_dxKop9ZZpxY9MYvYW5Q-ZabNXYn7dp", + "refunded": false, + "refunds": { + "object": "list", + "data": [], + "has_more": false, + "total_count": 0, + "url": "/v1/charges/ch_3OiqTaGkyVbTBiYe0O6Hj6zD/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_3OiqTaGkyVbTBiYe0nUcBPZV" + }, + "client_secret": "pi_3OiqTaGkyVbTBiYe0nUcBPZV_secret_2KT0oh8uYFUeQONViEq7ZWLgN", + "confirmation_method": "automatic", + "created": 1707709598, + "currency": "aud", + "customer": null, + "description": null, + "invoice": null, + "last_payment_error": null, + "latest_charge": "ch_3OiqTaGkyVbTBiYe0O6Hj6zD", + "livemode": false, + "metadata": {}, + "next_action": null, + "on_behalf_of": null, + "payment_method": "pm_1OiqTaGkyVbTBiYeLv5l0zWX", + "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, 12 Feb 2024 03:46:41 GMT +- request: + method: post + uri: https://api.stripe.com/v1/charges/ch_3OiqTaGkyVbTBiYe0O6Hj6zD/refunds + body: + encoding: UTF-8 + string: amount=1000&expand[0]=charge + headers: + Content-Type: + - application/x-www-form-urlencoded + Authorization: + - Basic c2tfdGVzdF9HRlFXMnU4c2xsbmxBTzYxN2FUODFRdko6 + 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_1APQreGkyVbTBiYe + 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, 12 Feb 2024 03:46:42 GMT + Content-Type: + - application/json + Content-Length: + - '4547' + 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: + - 5fd98021-2934-4a23-a462-2686b02d6be4 + Original-Request: + - req_GrOgrUV9vyH0dN + Request-Id: + - req_GrOgrUV9vyH0dN + 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_3OiqTaGkyVbTBiYe0K4k5Khy", + "object": "refund", + "amount": 1000, + "balance_transaction": "txn_3OiqTaGkyVbTBiYe09TPiL12", + "charge": { + "id": "ch_3OiqTaGkyVbTBiYe0O6Hj6zD", + "object": "charge", + "amount": 1000, + "amount_captured": 1000, + "amount_refunded": 1000, + "application": null, + "application_fee": null, + "application_fee_amount": null, + "balance_transaction": "txn_3OiqTaGkyVbTBiYe0AQLBi3e", + "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": "OPENFOODNETWORK", + "captured": true, + "created": 1707709599, + "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": 13, + "seller_message": "Payment complete.", + "type": "authorized" + }, + "paid": true, + "payment_intent": "pi_3OiqTaGkyVbTBiYe0nUcBPZV", + "payment_method": "pm_1OiqTaGkyVbTBiYeLv5l0zWX", + "payment_method_details": { + "card": { + "amount_authorized": 1000, + "brand": "mastercard", + "capture_before": 1708314399, + "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": "1Zr75a6zBSZLu0Zp", + "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/CAcaFwoVYWNjdF8xQVBRcmVHa3lWYlRCaVllKKKppq4GMgbB94RxQuw6LBajaUJ_Nzh33IT18N1M4-HhSrvYWIOIFfijUMVA2zy0iqBh8K2_OWFkLTEf", + "refunded": true, + "refunds": { + "object": "list", + "data": [ + { + "id": "re_3OiqTaGkyVbTBiYe0K4k5Khy", + "object": "refund", + "amount": 1000, + "balance_transaction": "txn_3OiqTaGkyVbTBiYe09TPiL12", + "charge": "ch_3OiqTaGkyVbTBiYe0O6Hj6zD", + "created": 1707709602, + "currency": "aud", + "destination_details": { + "card": { + "reference_status": "pending", + "reference_type": "acquirer_reference_number", + "type": "refund" + }, + "type": "card" + }, + "metadata": {}, + "payment_intent": "pi_3OiqTaGkyVbTBiYe0nUcBPZV", + "reason": null, + "receipt_number": null, + "source_transfer_reversal": null, + "status": "succeeded", + "transfer_reversal": null + } + ], + "has_more": false, + "total_count": 1, + "url": "/v1/charges/ch_3OiqTaGkyVbTBiYe0O6Hj6zD/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": 1707709602, + "currency": "aud", + "destination_details": { + "card": { + "reference_status": "pending", + "reference_type": "acquirer_reference_number", + "type": "refund" + }, + "type": "card" + }, + "metadata": {}, + "payment_intent": "pi_3OiqTaGkyVbTBiYe0nUcBPZV", + "reason": null, + "receipt_number": null, + "source_transfer_reversal": null, + "status": "succeeded", + "transfer_reversal": null + } + recorded_at: Mon, 12 Feb 2024 03:46:42 GMT +recorded_with: VCR 6.2.0 diff --git a/spec/fixtures/vcr_cassettes/Stripe-v10.2.0/Spree_Gateway_StripeSCA/_void/with_a_voidable_payment/void_the_payment.yml b/spec/fixtures/vcr_cassettes/Stripe-v10.2.0/Spree_Gateway_StripeSCA/_void/with_a_voidable_payment/void_the_payment.yml new file mode 100644 index 0000000000..24fb9dc483 --- /dev/null +++ b/spec/fixtures/vcr_cassettes/Stripe-v10.2.0/Spree_Gateway_StripeSCA/_void/with_a_voidable_payment/void_the_payment.yml @@ -0,0 +1,524 @@ +--- +http_interactions: +- 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.2.0 + Authorization: + - Bearer + Content-Type: + - application/x-www-form-urlencoded + X-Stripe-Client-Telemetry: + - '{"last_request_metrics":{"request_id":"req_bkByviWmLTQOfW","request_duration_ms":359}}' + Stripe-Version: + - '2023-10-16' + X-Stripe-Client-User-Agent: + - '{"bindings_version":"10.2.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, 12 Feb 2024 03:46:43 GMT + Content-Type: + - application/json + Content-Length: + - '942' + 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_XABjvmIDq8zdLB + Stripe-Version: + - '2023-10-16' + Vary: + - Origin + X-Stripe-Non-Api-Overhead-Duration-Ms: + - '167.0' + X-Stripe-Routing-Context-Priority-Tier: + - api-testmode + Strict-Transport-Security: + - max-age=63072000; includeSubDomains; preload + body: + encoding: UTF-8 + string: |- + { + "id": "pm_1OiqTfGkyVbTBiYe3NHcuFzj", + "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", + "exp_month": 2, + "exp_year": 2025, + "fingerprint": "1Zr75a6zBSZLu0Zp", + "funding": "credit", + "generated_from": null, + "last4": "4444", + "networks": { + "available": [ + "mastercard" + ], + "preferred": null + }, + "three_d_secure_usage": { + "supported": true + }, + "wallet": null + }, + "created": 1707709603, + "customer": null, + "livemode": false, + "metadata": {}, + "type": "card" + } + recorded_at: Mon, 12 Feb 2024 03:46:43 GMT +- request: + method: post + uri: https://api.stripe.com/v1/payment_intents + body: + encoding: UTF-8 + string: amount=1000¤cy=aud&payment_method=pm_1OiqTfGkyVbTBiYe3NHcuFzj&payment_method_types[0]=card&capture_method=manual + headers: + User-Agent: + - Stripe/v1 RubyBindings/10.2.0 + Authorization: + - Bearer + Content-Type: + - application/x-www-form-urlencoded + X-Stripe-Client-Telemetry: + - '{"last_request_metrics":{"request_id":"req_XABjvmIDq8zdLB","request_duration_ms":484}}' + Stripe-Version: + - '2023-10-16' + X-Stripe-Client-User-Agent: + - '{"bindings_version":"10.2.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, 12 Feb 2024 03:46:44 GMT + Content-Type: + - application/json + Content-Length: + - '1344' + 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: + - 5e88c180-041d-449f-821d-34f26e16ca9e + Original-Request: + - req_tQWBPCGhiMCP0g + Request-Id: + - req_tQWBPCGhiMCP0g + Stripe-Should-Retry: + - 'false' + Stripe-Version: + - '2023-10-16' + Vary: + - Origin + X-Stripe-Non-Api-Overhead-Duration-Ms: + - '193.0' + X-Stripe-Routing-Context-Priority-Tier: + - api-testmode + Strict-Transport-Security: + - max-age=63072000; includeSubDomains; preload + body: + encoding: UTF-8 + string: |- + { + "id": "pi_3OiqTgGkyVbTBiYe0de0qJ91", + "object": "payment_intent", + "amount": 1000, + "amount_capturable": 0, + "amount_details": { + "tip": {} + }, + "amount_received": 0, + "application": null, + "application_fee_amount": null, + "automatic_payment_methods": null, + "canceled_at": null, + "cancellation_reason": null, + "capture_method": "manual", + "client_secret": "pi_3OiqTgGkyVbTBiYe0de0qJ91_secret_d6ozPrnET7mJAXHuW1mZlOxB6", + "confirmation_method": "automatic", + "created": 1707709604, + "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_1OiqTfGkyVbTBiYe3NHcuFzj", + "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, 12 Feb 2024 03:46:44 GMT +- request: + method: get + uri: https://api.stripe.com/v1/payment_intents/pi_3OiqTgGkyVbTBiYe0de0qJ91 + body: + encoding: US-ASCII + string: '' + headers: + User-Agent: + - Stripe/v1 RubyBindings/10.2.0 + Authorization: + - Bearer + Content-Type: + - application/x-www-form-urlencoded + X-Stripe-Client-Telemetry: + - '{"last_request_metrics":{"request_id":"req_tQWBPCGhiMCP0g","request_duration_ms":509}}' + Stripe-Version: + - '2023-10-16' + X-Stripe-Client-User-Agent: + - '{"bindings_version":"10.2.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, 12 Feb 2024 03:46:44 GMT + Content-Type: + - application/json + Content-Length: + - '1344' + 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_3zPIl85xE98iJP + Stripe-Version: + - '2023-10-16' + Vary: + - Origin + X-Stripe-Non-Api-Overhead-Duration-Ms: + - '63.0' + X-Stripe-Routing-Context-Priority-Tier: + - api-testmode + Strict-Transport-Security: + - max-age=63072000; includeSubDomains; preload + body: + encoding: UTF-8 + string: |- + { + "id": "pi_3OiqTgGkyVbTBiYe0de0qJ91", + "object": "payment_intent", + "amount": 1000, + "amount_capturable": 0, + "amount_details": { + "tip": {} + }, + "amount_received": 0, + "application": null, + "application_fee_amount": null, + "automatic_payment_methods": null, + "canceled_at": null, + "cancellation_reason": null, + "capture_method": "manual", + "client_secret": "pi_3OiqTgGkyVbTBiYe0de0qJ91_secret_d6ozPrnET7mJAXHuW1mZlOxB6", + "confirmation_method": "automatic", + "created": 1707709604, + "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_1OiqTfGkyVbTBiYe3NHcuFzj", + "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, 12 Feb 2024 03:46:44 GMT +- request: + method: post + uri: https://api.stripe.com/v1/payment_intents/pi_3OiqTgGkyVbTBiYe0de0qJ91/cancel + body: + encoding: US-ASCII + string: '' + headers: + Content-Type: + - application/x-www-form-urlencoded + Authorization: + - Basic c2tfdGVzdF9HRlFXMnU4c2xsbmxBTzYxN2FUODFRdko6 + 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}' + 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, 12 Feb 2024 03:46:45 GMT + Content-Type: + - application/json + Content-Length: + - '1508' + 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: + - dd6026b4-78e9-49c7-a4af-365d48f10eb8 + Original-Request: + - req_Ez0PQVQfU8IYRv + Request-Id: + - req_Ez0PQVQfU8IYRv + 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_3OiqTgGkyVbTBiYe0de0qJ91", + "object": "payment_intent", + "amount": 1000, + "amount_capturable": 0, + "amount_details": { + "tip": {} + }, + "amount_received": 0, + "application": null, + "application_fee_amount": null, + "automatic_payment_methods": null, + "canceled_at": 1707709605, + "cancellation_reason": null, + "capture_method": "manual", + "charges": { + "object": "list", + "data": [], + "has_more": false, + "total_count": 0, + "url": "/v1/charges?payment_intent=pi_3OiqTgGkyVbTBiYe0de0qJ91" + }, + "client_secret": "pi_3OiqTgGkyVbTBiYe0de0qJ91_secret_d6ozPrnET7mJAXHuW1mZlOxB6", + "confirmation_method": "automatic", + "created": 1707709604, + "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_1OiqTfGkyVbTBiYe3NHcuFzj", + "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, 12 Feb 2024 03:46:45 GMT +recorded_with: VCR 6.2.0 diff --git a/spec/fixtures/vcr_cassettes/Stripe-v10.6.0/Spree_Gateway_StripeSCA/_void/with_a_confirmed_payment/refunds_the_payment.yml b/spec/fixtures/vcr_cassettes/Stripe-v10.6.0/Spree_Gateway_StripeSCA/_void/with_a_confirmed_payment/refunds_the_payment.yml new file mode 100644 index 0000000000..91615dbb4a --- /dev/null +++ b/spec/fixtures/vcr_cassettes/Stripe-v10.6.0/Spree_Gateway_StripeSCA/_void/with_a_confirmed_payment/refunds_the_payment.yml @@ -0,0 +1,877 @@ +--- +http_interactions: +- 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.6.0 + Authorization: + - Bearer + Content-Type: + - application/x-www-form-urlencoded + Stripe-Version: + - '2023-10-16' + X-Stripe-Client-User-Agent: + - '{"bindings_version":"10.6.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_1OhZ9lQQeZbvfZRJ + 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, 12 Feb 2024 22:53:08 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: + - 9f9ede9d-96ac-4441-b545-e1eb438336d2 + Original-Request: + - req_lB6oA68zTMJrpJ + Request-Id: + - req_lB6oA68zTMJrpJ + Stripe-Account: + - acct_1OhZ9lQQeZbvfZRJ + 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_3Oj8N5QQeZbvfZRJ0DWbfoMx", + "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_3Oj8N5QQeZbvfZRJ0DWbfoMx_secret_nvjdOSvBf3LuhqkJsaRlmiouk", + "confirmation_method": "automatic", + "created": 1707778387, + "currency": "aud", + "customer": null, + "description": null, + "invoice": null, + "last_payment_error": null, + "latest_charge": "ch_3Oj8N5QQeZbvfZRJ0jNdFIT8", + "livemode": false, + "metadata": {}, + "next_action": null, + "on_behalf_of": null, + "payment_method": "pm_1Oj8N5QQeZbvfZRJQ6Qh4CtB", + "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, 12 Feb 2024 22:53:09 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.6.0 + Authorization: + - Bearer + Content-Type: + - application/x-www-form-urlencoded + X-Stripe-Client-Telemetry: + - '{"last_request_metrics":{"request_id":"req_lB6oA68zTMJrpJ","request_duration_ms":1832}}' + Stripe-Version: + - '2023-10-16' + X-Stripe-Client-User-Agent: + - '{"bindings_version":"10.6.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, 12 Feb 2024 22:53:11 GMT + Content-Type: + - application/json + Content-Length: + - '942' + 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_MPSEbWRjRHc1xo + 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_1Oj8N8KuuB1fWySnY2lqbAGk", + "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", + "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": 1707778390, + "customer": null, + "livemode": false, + "metadata": {}, + "type": "card" + } + recorded_at: Mon, 12 Feb 2024 22:53:11 GMT +- request: + method: get + uri: https://api.stripe.com/v1/payment_intents/pi_3Oj8N5QQeZbvfZRJ0DWbfoMx + body: + encoding: US-ASCII + string: '' + headers: + User-Agent: + - Stripe/v1 RubyBindings/10.6.0 + Authorization: + - Bearer + Content-Type: + - application/x-www-form-urlencoded + X-Stripe-Client-Telemetry: + - '{"last_request_metrics":{"request_id":"req_MPSEbWRjRHc1xo","request_duration_ms":1078}}' + Stripe-Version: + - '2023-10-16' + X-Stripe-Client-User-Agent: + - '{"bindings_version":"10.6.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_1OhZ9lQQeZbvfZRJ + 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, 12 Feb 2024 22:53:11 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_kqqjMU3wRPfz7h + Stripe-Account: + - acct_1OhZ9lQQeZbvfZRJ + 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_3Oj8N5QQeZbvfZRJ0DWbfoMx", + "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_3Oj8N5QQeZbvfZRJ0DWbfoMx_secret_nvjdOSvBf3LuhqkJsaRlmiouk", + "confirmation_method": "automatic", + "created": 1707778387, + "currency": "aud", + "customer": null, + "description": null, + "invoice": null, + "last_payment_error": null, + "latest_charge": "ch_3Oj8N5QQeZbvfZRJ0jNdFIT8", + "livemode": false, + "metadata": {}, + "next_action": null, + "on_behalf_of": null, + "payment_method": "pm_1Oj8N5QQeZbvfZRJQ6Qh4CtB", + "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, 12 Feb 2024 22:53:11 GMT +- request: + method: get + uri: https://api.stripe.com/v1/payment_intents/pi_3Oj8N5QQeZbvfZRJ0DWbfoMx + 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_1OhZ9lQQeZbvfZRJ + 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, 12 Feb 2024 22:53:12 GMT + Content-Type: + - application/json + Content-Length: + - '5159' + 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_2ZdR6OrOajgOec + Stripe-Account: + - acct_1OhZ9lQQeZbvfZRJ + 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_3Oj8N5QQeZbvfZRJ0DWbfoMx", + "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_3Oj8N5QQeZbvfZRJ0jNdFIT8", + "object": "charge", + "amount": 1000, + "amount_captured": 1000, + "amount_refunded": 0, + "application": "", + "application_fee": null, + "application_fee_amount": null, + "balance_transaction": "txn_3Oj8N5QQeZbvfZRJ0VVf4rtO", + "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": 1707778388, + "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": 0, + "seller_message": "Payment complete.", + "type": "authorized" + }, + "paid": true, + "payment_intent": "pi_3Oj8N5QQeZbvfZRJ0DWbfoMx", + "payment_method": "pm_1Oj8N5QQeZbvfZRJQ6Qh4CtB", + "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/CAcaFwoVYWNjdF8xT2haOWxRUWVaYnZmWlJKKNjCqq4GMgZz3nu_-qs6LBbP4HIvOO9vohwzYRZA73lI9cjv8LnAaahU-8StFSQ0AW4v1eUKfrTSCc8c", + "refunded": false, + "refunds": { + "object": "list", + "data": [], + "has_more": false, + "total_count": 0, + "url": "/v1/charges/ch_3Oj8N5QQeZbvfZRJ0jNdFIT8/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_3Oj8N5QQeZbvfZRJ0DWbfoMx" + }, + "client_secret": "pi_3Oj8N5QQeZbvfZRJ0DWbfoMx_secret_nvjdOSvBf3LuhqkJsaRlmiouk", + "confirmation_method": "automatic", + "created": 1707778387, + "currency": "aud", + "customer": null, + "description": null, + "invoice": null, + "last_payment_error": null, + "latest_charge": "ch_3Oj8N5QQeZbvfZRJ0jNdFIT8", + "livemode": false, + "metadata": {}, + "next_action": null, + "on_behalf_of": null, + "payment_method": "pm_1Oj8N5QQeZbvfZRJQ6Qh4CtB", + "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, 12 Feb 2024 22:53:12 GMT +- request: + method: post + uri: https://api.stripe.com/v1/charges/ch_3Oj8N5QQeZbvfZRJ0jNdFIT8/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_1OhZ9lQQeZbvfZRJ + 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, 12 Feb 2024 22:53:13 GMT + Content-Type: + - application/json + Content-Length: + - '4535' + 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: + - cf4f970c-f6b3-4e76-b233-4eab0e385c71 + Original-Request: + - req_38Iu12IYZJwYz3 + Request-Id: + - req_38Iu12IYZJwYz3 + Stripe-Account: + - acct_1OhZ9lQQeZbvfZRJ + 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_3Oj8N5QQeZbvfZRJ0x3xrJep", + "object": "refund", + "amount": 1000, + "balance_transaction": "txn_3Oj8N5QQeZbvfZRJ0446g84e", + "charge": { + "id": "ch_3Oj8N5QQeZbvfZRJ0jNdFIT8", + "object": "charge", + "amount": 1000, + "amount_captured": 1000, + "amount_refunded": 1000, + "application": "", + "application_fee": null, + "application_fee_amount": null, + "balance_transaction": "txn_3Oj8N5QQeZbvfZRJ0VVf4rtO", + "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": 1707778388, + "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": 0, + "seller_message": "Payment complete.", + "type": "authorized" + }, + "paid": true, + "payment_intent": "pi_3Oj8N5QQeZbvfZRJ0DWbfoMx", + "payment_method": "pm_1Oj8N5QQeZbvfZRJQ6Qh4CtB", + "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/CAcaFwoVYWNjdF8xT2haOWxRUWVaYnZmWlJKKNnCqq4GMgYb2YoorMU6LBZPiModP9pA5IE5ehBQl5Kwr5IwrCYjcU1OlRxOtlsEdsxBrK09r38JrH1o", + "refunded": true, + "refunds": { + "object": "list", + "data": [ + { + "id": "re_3Oj8N5QQeZbvfZRJ0x3xrJep", + "object": "refund", + "amount": 1000, + "balance_transaction": "txn_3Oj8N5QQeZbvfZRJ0446g84e", + "charge": "ch_3Oj8N5QQeZbvfZRJ0jNdFIT8", + "created": 1707778392, + "currency": "aud", + "destination_details": { + "card": { + "reference_status": "pending", + "reference_type": "acquirer_reference_number", + "type": "refund" + }, + "type": "card" + }, + "metadata": {}, + "payment_intent": "pi_3Oj8N5QQeZbvfZRJ0DWbfoMx", + "reason": null, + "receipt_number": null, + "source_transfer_reversal": null, + "status": "succeeded", + "transfer_reversal": null + } + ], + "has_more": false, + "total_count": 1, + "url": "/v1/charges/ch_3Oj8N5QQeZbvfZRJ0jNdFIT8/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": 1707778392, + "currency": "aud", + "destination_details": { + "card": { + "reference_status": "pending", + "reference_type": "acquirer_reference_number", + "type": "refund" + }, + "type": "card" + }, + "metadata": {}, + "payment_intent": "pi_3Oj8N5QQeZbvfZRJ0DWbfoMx", + "reason": null, + "receipt_number": null, + "source_transfer_reversal": null, + "status": "succeeded", + "transfer_reversal": null + } + recorded_at: Mon, 12 Feb 2024 22:53:13 GMT +recorded_with: VCR 6.2.0 diff --git a/spec/fixtures/vcr_cassettes/Stripe-v10.6.0/Spree_Gateway_StripeSCA/_void/with_a_voidable_payment/void_the_payment.yml b/spec/fixtures/vcr_cassettes/Stripe-v10.6.0/Spree_Gateway_StripeSCA/_void/with_a_voidable_payment/void_the_payment.yml new file mode 100644 index 0000000000..f8eb537ca2 --- /dev/null +++ b/spec/fixtures/vcr_cassettes/Stripe-v10.6.0/Spree_Gateway_StripeSCA/_void/with_a_voidable_payment/void_the_payment.yml @@ -0,0 +1,530 @@ +--- +http_interactions: +- 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.6.0 + Authorization: + - Bearer + Content-Type: + - application/x-www-form-urlencoded + X-Stripe-Client-Telemetry: + - '{"last_request_metrics":{"request_id":"req_kqqjMU3wRPfz7h","request_duration_ms":485}}' + Stripe-Version: + - '2023-10-16' + X-Stripe-Client-User-Agent: + - '{"bindings_version":"10.6.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_1OhZ9lQQeZbvfZRJ + 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, 12 Feb 2024 22:53:14 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: + - 816e3630-03dc-4f3a-b4c6-5e88e3322536 + Original-Request: + - req_6jrnUl6aZNQxLk + Request-Id: + - req_6jrnUl6aZNQxLk + Stripe-Account: + - acct_1OhZ9lQQeZbvfZRJ + 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_3Oj8NCQQeZbvfZRJ1ahXc6sm", + "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_3Oj8NCQQeZbvfZRJ1ahXc6sm_secret_S6BFb7CunuRZPNoXb2GSmSUsh", + "confirmation_method": "automatic", + "created": 1707778394, + "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_1Oj8NCQQeZbvfZRJUrdNo9RL", + "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, 12 Feb 2024 22:53:14 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.6.0 + Authorization: + - Bearer + Content-Type: + - application/x-www-form-urlencoded + X-Stripe-Client-Telemetry: + - '{"last_request_metrics":{"request_id":"req_6jrnUl6aZNQxLk","request_duration_ms":572}}' + Stripe-Version: + - '2023-10-16' + X-Stripe-Client-User-Agent: + - '{"bindings_version":"10.6.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, 12 Feb 2024 22:53:15 GMT + Content-Type: + - application/json + Content-Length: + - '942' + 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_fiClXhKKwaSAmy + 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_1Oj8NDKuuB1fWySnzaxDjTO2", + "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", + "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": 1707778395, + "customer": null, + "livemode": false, + "metadata": {}, + "type": "card" + } + recorded_at: Mon, 12 Feb 2024 22:53:15 GMT +- request: + method: get + uri: https://api.stripe.com/v1/payment_intents/pi_3Oj8NCQQeZbvfZRJ1ahXc6sm + body: + encoding: US-ASCII + string: '' + headers: + User-Agent: + - Stripe/v1 RubyBindings/10.6.0 + Authorization: + - Bearer + Content-Type: + - application/x-www-form-urlencoded + X-Stripe-Client-Telemetry: + - '{"last_request_metrics":{"request_id":"req_fiClXhKKwaSAmy","request_duration_ms":535}}' + Stripe-Version: + - '2023-10-16' + X-Stripe-Client-User-Agent: + - '{"bindings_version":"10.6.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_1OhZ9lQQeZbvfZRJ + 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, 12 Feb 2024 22:53:15 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_mclrPggiyKYO9S + Stripe-Account: + - acct_1OhZ9lQQeZbvfZRJ + 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_3Oj8NCQQeZbvfZRJ1ahXc6sm", + "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_3Oj8NCQQeZbvfZRJ1ahXc6sm_secret_S6BFb7CunuRZPNoXb2GSmSUsh", + "confirmation_method": "automatic", + "created": 1707778394, + "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_1Oj8NCQQeZbvfZRJUrdNo9RL", + "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, 12 Feb 2024 22:53:15 GMT +- request: + method: post + uri: https://api.stripe.com/v1/payment_intents/pi_3Oj8NCQQeZbvfZRJ1ahXc6sm/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_1OhZ9lQQeZbvfZRJ + 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, 12 Feb 2024 22:53:16 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: + - 3e00f853-05da-4290-86df-fad9bca9d5ea + Original-Request: + - req_clYJJBeUWvA3Fe + Request-Id: + - req_clYJJBeUWvA3Fe + Stripe-Account: + - acct_1OhZ9lQQeZbvfZRJ + 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_3Oj8NCQQeZbvfZRJ1ahXc6sm", + "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": 1707778396, + "cancellation_reason": null, + "capture_method": "manual", + "charges": { + "object": "list", + "data": [], + "has_more": false, + "total_count": 0, + "url": "/v1/charges?payment_intent=pi_3Oj8NCQQeZbvfZRJ1ahXc6sm" + }, + "client_secret": "pi_3Oj8NCQQeZbvfZRJ1ahXc6sm_secret_S6BFb7CunuRZPNoXb2GSmSUsh", + "confirmation_method": "automatic", + "created": 1707778394, + "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_1Oj8NCQQeZbvfZRJUrdNo9RL", + "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, 12 Feb 2024 22:53:16 GMT +recorded_with: VCR 6.2.0 diff --git a/spec/fixtures/vcr_cassettes/Stripe-v10.9.0/Spree_Gateway_StripeSCA/_error_message/when_payment_intent_state_is_not_in_requires_capture_state/does_not_succeed_if_payment_intent_state_is_not_requires_capture.yml b/spec/fixtures/vcr_cassettes/Stripe-v10.9.0/Spree_Gateway_StripeSCA/_error_message/when_payment_intent_state_is_not_in_requires_capture_state/does_not_succeed_if_payment_intent_state_is_not_requires_capture.yml index 5073c404dc..0aaa88dca0 100644 --- a/spec/fixtures/vcr_cassettes/Stripe-v10.9.0/Spree_Gateway_StripeSCA/_error_message/when_payment_intent_state_is_not_in_requires_capture_state/does_not_succeed_if_payment_intent_state_is_not_requires_capture.yml +++ b/spec/fixtures/vcr_cassettes/Stripe-v10.9.0/Spree_Gateway_StripeSCA/_error_message/when_payment_intent_state_is_not_in_requires_capture_state/does_not_succeed_if_payment_intent_state_is_not_requires_capture.yml @@ -1,27 +1,27 @@ --- http_interactions: - request: - method: post - uri: https://api.stripe.com/v1/payment_methods + method: get + uri: https://api.stripe.com/v1/payment_methods/pm_card_mastercard body: - encoding: UTF-8 - string: type=card&card[number]=4242424242424242&card[exp_month]=12&card[exp_year]=2025&card[cvc]=314 + encoding: US-ASCII + string: '' headers: User-Agent: - - Stripe/v1 RubyBindings/10.9.0 + - Stripe/v1 RubyBindings/10.2.0 Authorization: - - Bearer + - Bearer Content-Type: - application/x-www-form-urlencoded X-Stripe-Client-Telemetry: - - '{"last_request_metrics":{"request_id":"req_0uMthnY2adDsVr","request_duration_ms":955}}' + - '{"last_request_metrics":{"request_id":"req_3zPIl85xE98iJP","request_duration_ms":295}}' 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 6.1.0-17-amd64 (debian-kernel@lists.debian.org) (gcc-12 (Debian 12.2.0-14) - 12.2.0, GNU ld (GNU Binutils for Debian) 2.40) #1 SMP PREEMPT_DYNAMIC Debian - 6.1.69-1 (2023-12-30)","hostname":"blackbox"}' + - '{"bindings_version":"10.2.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: @@ -34,11 +34,11 @@ http_interactions: Server: - nginx Date: - - Sun, 18 Feb 2024 23:01:48 GMT + - Mon, 12 Feb 2024 03:46:46 GMT Content-Type: - application/json Content-Length: - - '960' + - '942' Connection: - keep-alive Access-Control-Allow-Credentials: @@ -55,21 +55,18 @@ http_interactions: Cache-Control: - no-cache, no-store Content-Security-Policy: - - report-uri https://q.stripe.com/csp-report?p=v1%2Fpayment_methods; 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: - - 16efe530-35f3-4b4d-b07e-d8d8b1862ced - Original-Request: - - req_s7XlUZYvwV7DRk + - 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_s7XlUZYvwV7DRk - Stripe-Should-Retry: - - 'false' + - req_cTgKnTotXU2m08 Stripe-Version: - '2023-10-16' Vary: - Origin + X-Stripe-Non-Api-Overhead-Duration-Ms: + - '177.00000000000003' X-Stripe-Routing-Context-Priority-Tier: - api-testmode Strict-Transport-Security: @@ -78,7 +75,7 @@ http_interactions: encoding: UTF-8 string: |- { - "id": "pm_1OlJMmKuuB1fWySnHNgcZaCT", + "id": "pm_1OiqThGkyVbTBiYe79xZ1M6F", "object": "payment_method", "billing_details": { "address": { @@ -94,23 +91,22 @@ http_interactions: "phone": null }, "card": { - "brand": "visa", + "brand": "mastercard", "checks": { "address_line1_check": null, "address_postal_code_check": null, "cvc_check": "unchecked" }, "country": "US", - "display_brand": "visa", - "exp_month": 12, + "exp_month": 2, "exp_year": 2025, - "fingerprint": "6E6tgVjx6U65iHFV", + "fingerprint": "1Zr75a6zBSZLu0Zp", "funding": "credit", "generated_from": null, - "last4": "4242", + "last4": "4444", "networks": { "available": [ - "visa" + "mastercard" ], "preferred": null }, @@ -119,35 +115,35 @@ http_interactions: }, "wallet": null }, - "created": 1708297308, + "created": 1707709605, "customer": null, "livemode": false, "metadata": {}, "type": "card" } - recorded_at: Sun, 18 Feb 2024 23:01:49 GMT + recorded_at: Mon, 12 Feb 2024 03:46: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_1OlJMmKuuB1fWySnHNgcZaCT&payment_method_types[0]=card&capture_method=manual + string: amount=1000¤cy=aud&payment_method=pm_1OiqThGkyVbTBiYe79xZ1M6F&payment_method_types[0]=card&capture_method=manual headers: User-Agent: - - Stripe/v1 RubyBindings/10.9.0 + - Stripe/v1 RubyBindings/10.2.0 Authorization: - - Bearer + - Bearer Content-Type: - application/x-www-form-urlencoded X-Stripe-Client-Telemetry: - - '{"last_request_metrics":{"request_id":"req_s7XlUZYvwV7DRk","request_duration_ms":609}}' + - '{"last_request_metrics":{"request_id":"req_cTgKnTotXU2m08","request_duration_ms":414}}' 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 6.1.0-17-amd64 (debian-kernel@lists.debian.org) (gcc-12 (Debian 12.2.0-14) - 12.2.0, GNU ld (GNU Binutils for Debian) 2.40) #1 SMP PREEMPT_DYNAMIC Debian - 6.1.69-1 (2023-12-30)","hostname":"blackbox"}' + - '{"bindings_version":"10.2.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: @@ -160,7 +156,7 @@ http_interactions: Server: - nginx Date: - - Sun, 18 Feb 2024 23:01:49 GMT + - Mon, 12 Feb 2024 03:46:46 GMT Content-Type: - application/json Content-Length: @@ -185,17 +181,19 @@ 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: - - b94f241f-9070-4cde-a9ba-ca5f5fa4c266 + - cbee6ab9-167f-4f87-bf9b-e756850cf038 Original-Request: - - req_C5dAJYEOBGfyxt + - req_1DypHzrDYgsR9w Request-Id: - - req_C5dAJYEOBGfyxt + - req_1DypHzrDYgsR9w Stripe-Should-Retry: - 'false' Stripe-Version: - '2023-10-16' Vary: - Origin + X-Stripe-Non-Api-Overhead-Duration-Ms: + - '184.0' X-Stripe-Routing-Context-Priority-Tier: - api-testmode Strict-Transport-Security: @@ -204,7 +202,7 @@ http_interactions: encoding: UTF-8 string: |- { - "id": "pi_3OlJMnKuuB1fWySn0OktZ9W6", + "id": "pi_3OiqTiGkyVbTBiYe1e33LyXE", "object": "payment_intent", "amount": 1000, "amount_capturable": 0, @@ -218,9 +216,9 @@ http_interactions: "canceled_at": null, "cancellation_reason": null, "capture_method": "manual", - "client_secret": "pi_3OlJMnKuuB1fWySn0OktZ9W6_secret_3fSpa587arHfeA8BNEORln5Me", + "client_secret": "pi_3OiqTiGkyVbTBiYe1e33LyXE_secret_Xv2XJAG5i7druXN4lekU5771E", "confirmation_method": "automatic", - "created": 1708297309, + "created": 1707709606, "currency": "aud", "customer": null, "description": null, @@ -231,7 +229,7 @@ http_interactions: "metadata": {}, "next_action": null, "on_behalf_of": null, - "payment_method": "pm_1OlJMmKuuB1fWySnHNgcZaCT", + "payment_method": "pm_1OiqThGkyVbTBiYe79xZ1M6F", "payment_method_configuration_details": null, "payment_method_options": { "card": { @@ -256,29 +254,29 @@ http_interactions: "transfer_data": null, "transfer_group": null } - recorded_at: Sun, 18 Feb 2024 23:01:49 GMT + recorded_at: Mon, 12 Feb 2024 03:46:46 GMT - request: method: get - uri: https://api.stripe.com/v1/payment_intents/pi_3OlJMnKuuB1fWySn0OktZ9W6 + uri: https://api.stripe.com/v1/payment_intents/pi_3OiqTiGkyVbTBiYe1e33LyXE body: encoding: US-ASCII string: '' headers: User-Agent: - - Stripe/v1 RubyBindings/10.9.0 + - Stripe/v1 RubyBindings/10.2.0 Authorization: - - Bearer + - Bearer Content-Type: - application/x-www-form-urlencoded X-Stripe-Client-Telemetry: - - '{"last_request_metrics":{"request_id":"req_C5dAJYEOBGfyxt","request_duration_ms":403}}' + - '{"last_request_metrics":{"request_id":"req_1DypHzrDYgsR9w","request_duration_ms":387}}' 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 6.1.0-17-amd64 (debian-kernel@lists.debian.org) (gcc-12 (Debian 12.2.0-14) - 12.2.0, GNU ld (GNU Binutils for Debian) 2.40) #1 SMP PREEMPT_DYNAMIC Debian - 6.1.69-1 (2023-12-30)","hostname":"blackbox"}' + - '{"bindings_version":"10.2.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: @@ -291,7 +289,7 @@ http_interactions: Server: - nginx Date: - - Sun, 18 Feb 2024 23:01:49 GMT + - Mon, 12 Feb 2024 03:46:46 GMT Content-Type: - application/json Content-Length: @@ -317,11 +315,13 @@ http_interactions: 'none'; frame-ancestors 'none'; img-src 'self'; script-src 'self' 'report-sample'; style-src 'self' Request-Id: - - req_x4tAh20i3zA59E + - req_41RUDZ0JcBgpJK Stripe-Version: - '2023-10-16' Vary: - Origin + X-Stripe-Non-Api-Overhead-Duration-Ms: + - '57.99999999999999' X-Stripe-Routing-Context-Priority-Tier: - api-testmode Strict-Transport-Security: @@ -330,7 +330,7 @@ http_interactions: encoding: UTF-8 string: |- { - "id": "pi_3OlJMnKuuB1fWySn0OktZ9W6", + "id": "pi_3OiqTiGkyVbTBiYe1e33LyXE", "object": "payment_intent", "amount": 1000, "amount_capturable": 0, @@ -344,9 +344,9 @@ http_interactions: "canceled_at": null, "cancellation_reason": null, "capture_method": "manual", - "client_secret": "pi_3OlJMnKuuB1fWySn0OktZ9W6_secret_3fSpa587arHfeA8BNEORln5Me", + "client_secret": "pi_3OiqTiGkyVbTBiYe1e33LyXE_secret_Xv2XJAG5i7druXN4lekU5771E", "confirmation_method": "automatic", - "created": 1708297309, + "created": 1707709606, "currency": "aud", "customer": null, "description": null, @@ -357,7 +357,7 @@ http_interactions: "metadata": {}, "next_action": null, "on_behalf_of": null, - "payment_method": "pm_1OlJMmKuuB1fWySnHNgcZaCT", + "payment_method": "pm_1OiqThGkyVbTBiYe79xZ1M6F", "payment_method_configuration_details": null, "payment_method_options": { "card": { @@ -382,5 +382,5 @@ http_interactions: "transfer_data": null, "transfer_group": null } - recorded_at: Sun, 18 Feb 2024 23:01:49 GMT + recorded_at: Mon, 12 Feb 2024 03:46:46 GMT recorded_with: VCR 6.2.0 diff --git a/spec/fixtures/vcr_cassettes/Stripe-v10.9.0/Spree_Gateway_StripeSCA/_purchase/completes_the_purchase.yml b/spec/fixtures/vcr_cassettes/Stripe-v10.9.0/Spree_Gateway_StripeSCA/_purchase/completes_the_purchase.yml index 197a6890f9..9cb825d16d 100644 --- a/spec/fixtures/vcr_cassettes/Stripe-v10.9.0/Spree_Gateway_StripeSCA/_purchase/completes_the_purchase.yml +++ b/spec/fixtures/vcr_cassettes/Stripe-v10.9.0/Spree_Gateway_StripeSCA/_purchase/completes_the_purchase.yml @@ -1,27 +1,25 @@ --- http_interactions: - request: - method: post - uri: https://api.stripe.com/v1/payment_methods + method: get + uri: https://api.stripe.com/v1/payment_methods/pm_card_mastercard body: - encoding: UTF-8 - string: type=card&card[number]=4242424242424242&card[exp_month]=12&card[exp_year]=2025&card[cvc]=314 + encoding: US-ASCII + string: '' headers: User-Agent: - - Stripe/v1 RubyBindings/10.9.0 + - Stripe/v1 RubyBindings/10.2.0 Authorization: - - Bearer + - Bearer Content-Type: - application/x-www-form-urlencoded - X-Stripe-Client-Telemetry: - - '{"last_request_metrics":{"request_id":"req_51om1IRAHFZCV6","request_duration_ms":496}}' 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 6.1.0-17-amd64 (debian-kernel@lists.debian.org) (gcc-12 (Debian 12.2.0-14) - 12.2.0, GNU ld (GNU Binutils for Debian) 2.40) #1 SMP PREEMPT_DYNAMIC Debian - 6.1.69-1 (2023-12-30)","hostname":"blackbox"}' + - '{"bindings_version":"10.2.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: @@ -34,11 +32,11 @@ http_interactions: Server: - nginx Date: - - Sun, 18 Feb 2024 23:01:39 GMT + - Mon, 12 Feb 2024 03:46:31 GMT Content-Type: - application/json Content-Length: - - '960' + - '942' Connection: - keep-alive Access-Control-Allow-Credentials: @@ -55,21 +53,18 @@ http_interactions: Cache-Control: - no-cache, no-store Content-Security-Policy: - - report-uri https://q.stripe.com/csp-report?p=v1%2Fpayment_methods; 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: - - 1544bce0-8504-40ae-85e6-99567c05a81f - Original-Request: - - req_ZZHpIWmt0Tb9QC + - 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_ZZHpIWmt0Tb9QC - Stripe-Should-Retry: - - 'false' + - req_hFFx1UFSv39xhy Stripe-Version: - '2023-10-16' Vary: - Origin + X-Stripe-Non-Api-Overhead-Duration-Ms: + - '138.0' X-Stripe-Routing-Context-Priority-Tier: - api-testmode Strict-Transport-Security: @@ -78,7 +73,7 @@ http_interactions: encoding: UTF-8 string: |- { - "id": "pm_1OlJMdKuuB1fWySnSN7kwt4O", + "id": "pm_1OiqTSGkyVbTBiYegXlSZpe8", "object": "payment_method", "billing_details": { "address": { @@ -94,23 +89,22 @@ http_interactions: "phone": null }, "card": { - "brand": "visa", + "brand": "mastercard", "checks": { "address_line1_check": null, "address_postal_code_check": null, "cvc_check": "unchecked" }, "country": "US", - "display_brand": "visa", - "exp_month": 12, + "exp_month": 2, "exp_year": 2025, - "fingerprint": "6E6tgVjx6U65iHFV", + "fingerprint": "1Zr75a6zBSZLu0Zp", "funding": "credit", "generated_from": null, - "last4": "4242", + "last4": "4444", "networks": { "available": [ - "visa" + "mastercard" ], "preferred": null }, @@ -119,35 +113,35 @@ http_interactions: }, "wallet": null }, - "created": 1708297299, + "created": 1707709590, "customer": null, "livemode": false, "metadata": {}, "type": "card" } - recorded_at: Sun, 18 Feb 2024 23:01:39 GMT + recorded_at: Mon, 12 Feb 2024 03:46:31 GMT - request: method: post uri: https://api.stripe.com/v1/payment_intents body: encoding: UTF-8 - string: amount=1000¤cy=aud&payment_method=pm_1OlJMdKuuB1fWySnSN7kwt4O&payment_method_types[0]=card&capture_method=manual + string: amount=1000¤cy=aud&payment_method=pm_1OiqTSGkyVbTBiYegXlSZpe8&payment_method_types[0]=card&capture_method=manual headers: User-Agent: - - Stripe/v1 RubyBindings/10.9.0 + - Stripe/v1 RubyBindings/10.2.0 Authorization: - - Bearer + - Bearer Content-Type: - application/x-www-form-urlencoded X-Stripe-Client-Telemetry: - - '{"last_request_metrics":{"request_id":"req_ZZHpIWmt0Tb9QC","request_duration_ms":571}}' + - '{"last_request_metrics":{"request_id":"req_hFFx1UFSv39xhy","request_duration_ms":531}}' 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 6.1.0-17-amd64 (debian-kernel@lists.debian.org) (gcc-12 (Debian 12.2.0-14) - 12.2.0, GNU ld (GNU Binutils for Debian) 2.40) #1 SMP PREEMPT_DYNAMIC Debian - 6.1.69-1 (2023-12-30)","hostname":"blackbox"}' + - '{"bindings_version":"10.2.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: @@ -160,7 +154,7 @@ http_interactions: Server: - nginx Date: - - Sun, 18 Feb 2024 23:01:40 GMT + - Mon, 12 Feb 2024 03:46:31 GMT Content-Type: - application/json Content-Length: @@ -185,17 +179,19 @@ 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: - - 948c081d-dd9b-42fe-8904-c66806ba6ced + - 00d5f1c9-b2ef-4a0c-b3ca-91336529c64a Original-Request: - - req_gWoQz3c7XBT7zK + - req_6LkNIZildZ9rlK Request-Id: - - req_gWoQz3c7XBT7zK + - req_6LkNIZildZ9rlK Stripe-Should-Retry: - 'false' Stripe-Version: - '2023-10-16' Vary: - Origin + X-Stripe-Non-Api-Overhead-Duration-Ms: + - '178.0' X-Stripe-Routing-Context-Priority-Tier: - api-testmode Strict-Transport-Security: @@ -204,7 +200,7 @@ http_interactions: encoding: UTF-8 string: |- { - "id": "pi_3OlJMdKuuB1fWySn1mC3Z7lL", + "id": "pi_3OiqTTGkyVbTBiYe0oEyxvMp", "object": "payment_intent", "amount": 1000, "amount_capturable": 0, @@ -218,9 +214,9 @@ http_interactions: "canceled_at": null, "cancellation_reason": null, "capture_method": "manual", - "client_secret": "pi_3OlJMdKuuB1fWySn1mC3Z7lL_secret_A5cHGtk5DKIuxGVjMQtq0RMlA", + "client_secret": "pi_3OiqTTGkyVbTBiYe0oEyxvMp_secret_fEWUt67pPAN7ia8aNL7R1ePM9", "confirmation_method": "automatic", - "created": 1708297299, + "created": 1707709591, "currency": "aud", "customer": null, "description": null, @@ -231,7 +227,7 @@ http_interactions: "metadata": {}, "next_action": null, "on_behalf_of": null, - "payment_method": "pm_1OlJMdKuuB1fWySnSN7kwt4O", + "payment_method": "pm_1OiqTSGkyVbTBiYegXlSZpe8", "payment_method_configuration_details": null, "payment_method_options": { "card": { @@ -256,29 +252,29 @@ http_interactions: "transfer_data": null, "transfer_group": null } - recorded_at: Sun, 18 Feb 2024 23:01:40 GMT + recorded_at: Mon, 12 Feb 2024 03:46:31 GMT - request: method: post - uri: https://api.stripe.com/v1/payment_intents/pi_3OlJMdKuuB1fWySn1mC3Z7lL/confirm + uri: https://api.stripe.com/v1/payment_intents/pi_3OiqTTGkyVbTBiYe0oEyxvMp/confirm body: encoding: US-ASCII string: '' headers: User-Agent: - - Stripe/v1 RubyBindings/10.9.0 + - Stripe/v1 RubyBindings/10.2.0 Authorization: - - Bearer + - Bearer Content-Type: - application/x-www-form-urlencoded X-Stripe-Client-Telemetry: - - '{"last_request_metrics":{"request_id":"req_gWoQz3c7XBT7zK","request_duration_ms":580}}' + - '{"last_request_metrics":{"request_id":"req_6LkNIZildZ9rlK","request_duration_ms":484}}' 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 6.1.0-17-amd64 (debian-kernel@lists.debian.org) (gcc-12 (Debian 12.2.0-14) - 12.2.0, GNU ld (GNU Binutils for Debian) 2.40) #1 SMP PREEMPT_DYNAMIC Debian - 6.1.69-1 (2023-12-30)","hostname":"blackbox"}' + - '{"bindings_version":"10.2.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: @@ -291,7 +287,7 @@ http_interactions: Server: - nginx Date: - - Sun, 18 Feb 2024 23:01:41 GMT + - Mon, 12 Feb 2024 03:46:32 GMT Content-Type: - application/json Content-Length: @@ -317,17 +313,19 @@ http_interactions: 'none'; frame-ancestors 'none'; img-src 'self'; script-src 'self' 'report-sample'; style-src 'self' Idempotency-Key: - - 870a6954-88b1-467c-8fa9-277015f3722e + - cad3cbd3-85ec-45d6-af7e-db634c5396be Original-Request: - - req_afZee7GuNtasTS + - req_c0YFD1rixOGBNW Request-Id: - - req_afZee7GuNtasTS + - req_c0YFD1rixOGBNW Stripe-Should-Retry: - 'false' Stripe-Version: - '2023-10-16' Vary: - Origin + X-Stripe-Non-Api-Overhead-Duration-Ms: + - '713.0' X-Stripe-Routing-Context-Priority-Tier: - api-testmode Strict-Transport-Security: @@ -336,7 +334,7 @@ http_interactions: encoding: UTF-8 string: |- { - "id": "pi_3OlJMdKuuB1fWySn1mC3Z7lL", + "id": "pi_3OiqTTGkyVbTBiYe0oEyxvMp", "object": "payment_intent", "amount": 1000, "amount_capturable": 1000, @@ -350,20 +348,20 @@ http_interactions: "canceled_at": null, "cancellation_reason": null, "capture_method": "manual", - "client_secret": "pi_3OlJMdKuuB1fWySn1mC3Z7lL_secret_A5cHGtk5DKIuxGVjMQtq0RMlA", + "client_secret": "pi_3OiqTTGkyVbTBiYe0oEyxvMp_secret_fEWUt67pPAN7ia8aNL7R1ePM9", "confirmation_method": "automatic", - "created": 1708297299, + "created": 1707709591, "currency": "aud", "customer": null, "description": null, "invoice": null, "last_payment_error": null, - "latest_charge": "ch_3OlJMdKuuB1fWySn1Si9UkuX", + "latest_charge": "ch_3OiqTTGkyVbTBiYe0jeLlsRt", "livemode": false, "metadata": {}, "next_action": null, "on_behalf_of": null, - "payment_method": "pm_1OlJMdKuuB1fWySnSN7kwt4O", + "payment_method": "pm_1OiqTSGkyVbTBiYegXlSZpe8", "payment_method_configuration_details": null, "payment_method_options": { "card": { @@ -388,29 +386,29 @@ http_interactions: "transfer_data": null, "transfer_group": null } - recorded_at: Sun, 18 Feb 2024 23:01:41 GMT + recorded_at: Mon, 12 Feb 2024 03:46:32 GMT - request: method: get - uri: https://api.stripe.com/v1/payment_intents/pi_3OlJMdKuuB1fWySn1mC3Z7lL + uri: https://api.stripe.com/v1/payment_intents/pi_3OiqTTGkyVbTBiYe0oEyxvMp body: encoding: US-ASCII string: '' headers: User-Agent: - - Stripe/v1 RubyBindings/10.9.0 + - Stripe/v1 RubyBindings/10.2.0 Authorization: - - Bearer + - Bearer Content-Type: - application/x-www-form-urlencoded X-Stripe-Client-Telemetry: - - '{"last_request_metrics":{"request_id":"req_afZee7GuNtasTS","request_duration_ms":1147}}' + - '{"last_request_metrics":{"request_id":"req_c0YFD1rixOGBNW","request_duration_ms":921}}' 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 6.1.0-17-amd64 (debian-kernel@lists.debian.org) (gcc-12 (Debian 12.2.0-14) - 12.2.0, GNU ld (GNU Binutils for Debian) 2.40) #1 SMP PREEMPT_DYNAMIC Debian - 6.1.69-1 (2023-12-30)","hostname":"blackbox"}' + - '{"bindings_version":"10.2.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: @@ -423,7 +421,7 @@ http_interactions: Server: - nginx Date: - - Sun, 18 Feb 2024 23:01:43 GMT + - Mon, 12 Feb 2024 03:46:34 GMT Content-Type: - application/json Content-Length: @@ -449,11 +447,13 @@ http_interactions: 'none'; frame-ancestors 'none'; img-src 'self'; script-src 'self' 'report-sample'; style-src 'self' Request-Id: - - req_nvxMljuYGpNN36 + - req_SnM5lbQViqtjbG Stripe-Version: - '2023-10-16' Vary: - Origin + X-Stripe-Non-Api-Overhead-Duration-Ms: + - '70.0' X-Stripe-Routing-Context-Priority-Tier: - api-testmode Strict-Transport-Security: @@ -462,7 +462,7 @@ http_interactions: encoding: UTF-8 string: |- { - "id": "pi_3OlJMdKuuB1fWySn1mC3Z7lL", + "id": "pi_3OiqTTGkyVbTBiYe0oEyxvMp", "object": "payment_intent", "amount": 1000, "amount_capturable": 1000, @@ -476,20 +476,20 @@ http_interactions: "canceled_at": null, "cancellation_reason": null, "capture_method": "manual", - "client_secret": "pi_3OlJMdKuuB1fWySn1mC3Z7lL_secret_A5cHGtk5DKIuxGVjMQtq0RMlA", + "client_secret": "pi_3OiqTTGkyVbTBiYe0oEyxvMp_secret_fEWUt67pPAN7ia8aNL7R1ePM9", "confirmation_method": "automatic", - "created": 1708297299, + "created": 1707709591, "currency": "aud", "customer": null, "description": null, "invoice": null, "last_payment_error": null, - "latest_charge": "ch_3OlJMdKuuB1fWySn1Si9UkuX", + "latest_charge": "ch_3OiqTTGkyVbTBiYe0jeLlsRt", "livemode": false, "metadata": {}, "next_action": null, "on_behalf_of": null, - "payment_method": "pm_1OlJMdKuuB1fWySnSN7kwt4O", + "payment_method": "pm_1OiqTSGkyVbTBiYegXlSZpe8", "payment_method_configuration_details": null, "payment_method_options": { "card": { @@ -514,10 +514,10 @@ http_interactions: "transfer_data": null, "transfer_group": null } - recorded_at: Sun, 18 Feb 2024 23:01:43 GMT + recorded_at: Mon, 12 Feb 2024 03:46:34 GMT - request: method: post - uri: https://api.stripe.com/v1/payment_intents/pi_3OlJMdKuuB1fWySn1mC3Z7lL/capture + uri: https://api.stripe.com/v1/payment_intents/pi_3OiqTTGkyVbTBiYe0oEyxvMp/capture body: encoding: UTF-8 string: amount_to_capture=1000 @@ -525,13 +525,13 @@ http_interactions: Content-Type: - application/x-www-form-urlencoded Authorization: - - Basic c2tfdGVzdF94RmdKUU9sWHBNQUZzb3p0endGQlRGaFAwMEhHN0J1Q0ptOg== + - Basic c2tfdGVzdF9HRlFXMnU4c2xsbmxBTzYxN2FUODFRdko6 User-Agent: - - Stripe/v1 ActiveMerchantBindings/1.123.0 + - Stripe/v1 ActiveMerchantBindings/1.133.0 Stripe-Version: - - '2019-05-16' + - '2020-08-27' X-Stripe-Client-User-Agent: - - '{"bindings_version":"1.123.0","lang":"ruby","lang_version":"3.1.4 p223 (2023-03-30)","platform":"x86_64-linux","publisher":"active_merchant"}' + - '{"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}' Connection: @@ -548,11 +548,11 @@ http_interactions: Server: - nginx Date: - - Sun, 18 Feb 2024 23:01:44 GMT + - Mon, 12 Feb 2024 03:46:35 GMT Content-Type: - application/json Content-Length: - - '5152' + - '5138' Connection: - close Access-Control-Allow-Credentials: @@ -574,17 +574,19 @@ http_interactions: 'none'; frame-ancestors 'none'; img-src 'self'; script-src 'self' 'report-sample'; style-src 'self' Idempotency-Key: - - 517a8ae3-9501-48d9-9225-51eb365643bb + - 180b5f53-661c-4d2b-acb6-24bde086c561 Original-Request: - - req_OIwCtiBaYsGTF8 + - req_1hdxqRBMl4cNHD Request-Id: - - req_OIwCtiBaYsGTF8 + - req_1hdxqRBMl4cNHD Stripe-Should-Retry: - 'false' Stripe-Version: - - '2019-05-16' + - '2020-08-27' Vary: - Origin + X-Stripe-Non-Api-Overhead-Duration-Ms: + - '778.0' X-Stripe-Routing-Context-Priority-Tier: - api-testmode Strict-Transport-Security: @@ -593,7 +595,7 @@ http_interactions: encoding: UTF-8 string: |- { - "id": "pi_3OlJMdKuuB1fWySn1mC3Z7lL", + "id": "pi_3OiqTTGkyVbTBiYe0oEyxvMp", "object": "payment_intent", "amount": 1000, "amount_capturable": 0, @@ -611,16 +613,15 @@ http_interactions: "object": "list", "data": [ { - "id": "ch_3OlJMdKuuB1fWySn1Si9UkuX", + "id": "ch_3OiqTTGkyVbTBiYe0jeLlsRt", "object": "charge", "amount": 1000, "amount_captured": 1000, "amount_refunded": 0, - "amount_updates": [], "application": null, "application_fee": null, "application_fee_amount": null, - "balance_transaction": "txn_3OlJMdKuuB1fWySn1EtKks3E", + "balance_transaction": "txn_3OiqTTGkyVbTBiYe068H10eP", "billing_details": { "address": { "city": null, @@ -634,9 +635,9 @@ http_interactions: "name": null, "phone": null }, - "calculated_statement_descriptor": "OFNOFNOFN", + "calculated_statement_descriptor": "OPENFOODNETWORK", "captured": true, - "created": 1708297300, + "created": 1707709592, "currency": "aud", "customer": null, "description": null, @@ -656,41 +657,41 @@ http_interactions: "network_status": "approved_by_network", "reason": null, "risk_level": "normal", - "risk_score": 50, + "risk_score": 2, "seller_message": "Payment complete.", "type": "authorized" }, "paid": true, - "payment_intent": "pi_3OlJMdKuuB1fWySn1mC3Z7lL", - "payment_method": "pm_1OlJMdKuuB1fWySnSN7kwt4O", + "payment_intent": "pi_3OiqTTGkyVbTBiYe0oEyxvMp", + "payment_method": "pm_1OiqTSGkyVbTBiYegXlSZpe8", "payment_method_details": { "card": { "amount_authorized": 1000, - "brand": "visa", - "capture_before": 1708902100, + "brand": "mastercard", + "capture_before": 1708314392, "checks": { "address_line1_check": null, "address_postal_code_check": null, "cvc_check": "pass" }, "country": "US", - "exp_month": 12, + "exp_month": 2, "exp_year": 2025, "extended_authorization": { "status": "disabled" }, - "fingerprint": "6E6tgVjx6U65iHFV", + "fingerprint": "1Zr75a6zBSZLu0Zp", "funding": "credit", "incremental_authorization": { "status": "unavailable" }, "installments": null, - "last4": "4242", + "last4": "4444", "mandate": null, "multicapture": { "status": "unavailable" }, - "network": "visa", + "network": "mastercard", "network_token": { "used": false }, @@ -706,14 +707,14 @@ http_interactions: "radar_options": {}, "receipt_email": null, "receipt_number": null, - "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xRmlxRXNLdXVCMWZXeVNuKNiYyq4GMgaRL-XiUw86LBZE508pdjPqCQjn3Qti4m-zS9ApaX9PdD7COJl9LEw4dcNQKFdVD-7D8l3g", + "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xQVBRcmVHa3lWYlRCaVllKJuppq4GMgZqhtW4UmU6LBb6C-hm4GQkFY_GabTkAfy0cZ1SwjrcaIGPt4NbAQObuJfLF2dsVRziJCiV", "refunded": false, "refunds": { "object": "list", "data": [], "has_more": false, "total_count": 0, - "url": "/v1/charges/ch_3OlJMdKuuB1fWySn1Si9UkuX/refunds" + "url": "/v1/charges/ch_3OiqTTGkyVbTBiYe0jeLlsRt/refunds" }, "review": null, "shipping": null, @@ -728,22 +729,22 @@ http_interactions: ], "has_more": false, "total_count": 1, - "url": "/v1/charges?payment_intent=pi_3OlJMdKuuB1fWySn1mC3Z7lL" + "url": "/v1/charges?payment_intent=pi_3OiqTTGkyVbTBiYe0oEyxvMp" }, - "client_secret": "pi_3OlJMdKuuB1fWySn1mC3Z7lL_secret_A5cHGtk5DKIuxGVjMQtq0RMlA", + "client_secret": "pi_3OiqTTGkyVbTBiYe0oEyxvMp_secret_fEWUt67pPAN7ia8aNL7R1ePM9", "confirmation_method": "automatic", - "created": 1708297299, + "created": 1707709591, "currency": "aud", "customer": null, "description": null, "invoice": null, "last_payment_error": null, - "latest_charge": "ch_3OlJMdKuuB1fWySn1Si9UkuX", + "latest_charge": "ch_3OiqTTGkyVbTBiYe0jeLlsRt", "livemode": false, "metadata": {}, "next_action": null, "on_behalf_of": null, - "payment_method": "pm_1OlJMdKuuB1fWySnSN7kwt4O", + "payment_method": "pm_1OiqTSGkyVbTBiYegXlSZpe8", "payment_method_configuration_details": null, "payment_method_options": { "card": { @@ -768,5 +769,5 @@ http_interactions: "transfer_data": null, "transfer_group": null } - recorded_at: Sun, 18 Feb 2024 23:01:44 GMT + recorded_at: Mon, 12 Feb 2024 03:46:35 GMT recorded_with: VCR 6.2.0 diff --git a/spec/fixtures/vcr_cassettes/Stripe-v10.9.0/Spree_Gateway_StripeSCA/_purchase/provides_an_error_message_to_help_developer_debug.yml b/spec/fixtures/vcr_cassettes/Stripe-v10.9.0/Spree_Gateway_StripeSCA/_purchase/provides_an_error_message_to_help_developer_debug.yml index c5a0be7f7d..4353de244d 100644 --- a/spec/fixtures/vcr_cassettes/Stripe-v10.9.0/Spree_Gateway_StripeSCA/_purchase/provides_an_error_message_to_help_developer_debug.yml +++ b/spec/fixtures/vcr_cassettes/Stripe-v10.9.0/Spree_Gateway_StripeSCA/_purchase/provides_an_error_message_to_help_developer_debug.yml @@ -1,27 +1,27 @@ --- http_interactions: - request: - method: post - uri: https://api.stripe.com/v1/payment_methods + method: get + uri: https://api.stripe.com/v1/payment_methods/pm_card_mastercard body: - encoding: UTF-8 - string: type=card&card[number]=4242424242424242&card[exp_month]=12&card[exp_year]=2025&card[cvc]=314 + encoding: US-ASCII + string: '' headers: User-Agent: - - Stripe/v1 RubyBindings/10.9.0 + - Stripe/v1 RubyBindings/10.2.0 Authorization: - - Bearer + - Bearer Content-Type: - application/x-www-form-urlencoded X-Stripe-Client-Telemetry: - - '{"last_request_metrics":{"request_id":"req_nvxMljuYGpNN36","request_duration_ms":417}}' + - '{"last_request_metrics":{"request_id":"req_SnM5lbQViqtjbG","request_duration_ms":358}}' 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 6.1.0-17-amd64 (debian-kernel@lists.debian.org) (gcc-12 (Debian 12.2.0-14) - 12.2.0, GNU ld (GNU Binutils for Debian) 2.40) #1 SMP PREEMPT_DYNAMIC Debian - 6.1.69-1 (2023-12-30)","hostname":"blackbox"}' + - '{"bindings_version":"10.2.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: @@ -34,11 +34,11 @@ http_interactions: Server: - nginx Date: - - Sun, 18 Feb 2024 23:01:45 GMT + - Mon, 12 Feb 2024 03:46:35 GMT Content-Type: - application/json Content-Length: - - '960' + - '942' Connection: - keep-alive Access-Control-Allow-Credentials: @@ -55,21 +55,18 @@ http_interactions: Cache-Control: - no-cache, no-store Content-Security-Policy: - - report-uri https://q.stripe.com/csp-report?p=v1%2Fpayment_methods; 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: - - '0840ae80-e34d-4ca4-9b24-4872ef60a47b' - Original-Request: - - req_JdKtYmo8F5PGGZ + - 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_JdKtYmo8F5PGGZ - Stripe-Should-Retry: - - 'false' + - req_Wr1CrKPOYhGknI Stripe-Version: - '2023-10-16' Vary: - Origin + X-Stripe-Non-Api-Overhead-Duration-Ms: + - '144.00000000000003' X-Stripe-Routing-Context-Priority-Tier: - api-testmode Strict-Transport-Security: @@ -78,7 +75,7 @@ http_interactions: encoding: UTF-8 string: |- { - "id": "pm_1OlJMiKuuB1fWySn9UkunsGB", + "id": "pm_1OiqTXGkyVbTBiYeyvRuXFKv", "object": "payment_method", "billing_details": { "address": { @@ -94,23 +91,22 @@ http_interactions: "phone": null }, "card": { - "brand": "visa", + "brand": "mastercard", "checks": { "address_line1_check": null, "address_postal_code_check": null, "cvc_check": "unchecked" }, "country": "US", - "display_brand": "visa", - "exp_month": 12, + "exp_month": 2, "exp_year": 2025, - "fingerprint": "6E6tgVjx6U65iHFV", + "fingerprint": "1Zr75a6zBSZLu0Zp", "funding": "credit", "generated_from": null, - "last4": "4242", + "last4": "4444", "networks": { "available": [ - "visa" + "mastercard" ], "preferred": null }, @@ -119,35 +115,35 @@ http_interactions: }, "wallet": null }, - "created": 1708297305, + "created": 1707709595, "customer": null, "livemode": false, "metadata": {}, "type": "card" } - recorded_at: Sun, 18 Feb 2024 23:01:45 GMT + recorded_at: Mon, 12 Feb 2024 03:46:35 GMT - request: method: post uri: https://api.stripe.com/v1/payment_intents body: encoding: UTF-8 - string: amount=1000¤cy=aud&payment_method=pm_1OlJMiKuuB1fWySn9UkunsGB&payment_method_types[0]=card&capture_method=manual + string: amount=1000¤cy=aud&payment_method=pm_1OiqTXGkyVbTBiYeyvRuXFKv&payment_method_types[0]=card&capture_method=manual headers: User-Agent: - - Stripe/v1 RubyBindings/10.9.0 + - Stripe/v1 RubyBindings/10.2.0 Authorization: - - Bearer + - Bearer Content-Type: - application/x-www-form-urlencoded X-Stripe-Client-Telemetry: - - '{"last_request_metrics":{"request_id":"req_JdKtYmo8F5PGGZ","request_duration_ms":479}}' + - '{"last_request_metrics":{"request_id":"req_Wr1CrKPOYhGknI","request_duration_ms":354}}' 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 6.1.0-17-amd64 (debian-kernel@lists.debian.org) (gcc-12 (Debian 12.2.0-14) - 12.2.0, GNU ld (GNU Binutils for Debian) 2.40) #1 SMP PREEMPT_DYNAMIC Debian - 6.1.69-1 (2023-12-30)","hostname":"blackbox"}' + - '{"bindings_version":"10.2.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: @@ -160,7 +156,7 @@ http_interactions: Server: - nginx Date: - - Sun, 18 Feb 2024 23:01:45 GMT + - Mon, 12 Feb 2024 03:46:35 GMT Content-Type: - application/json Content-Length: @@ -185,17 +181,19 @@ 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: - - b330b83b-e5d0-4df4-805f-b403a0cceac0 + - 451b60a5-f932-46c0-b101-5c67e1a9e6f2 Original-Request: - - req_pUQ6XBsrwBJj7c + - req_mOJcscgCtaoJZB Request-Id: - - req_pUQ6XBsrwBJj7c + - req_mOJcscgCtaoJZB Stripe-Should-Retry: - 'false' Stripe-Version: - '2023-10-16' Vary: - Origin + X-Stripe-Non-Api-Overhead-Duration-Ms: + - '197.0' X-Stripe-Routing-Context-Priority-Tier: - api-testmode Strict-Transport-Security: @@ -204,7 +202,7 @@ http_interactions: encoding: UTF-8 string: |- { - "id": "pi_3OlJMjKuuB1fWySn0hkOQ7rg", + "id": "pi_3OiqTXGkyVbTBiYe1KcfbvwC", "object": "payment_intent", "amount": 1000, "amount_capturable": 0, @@ -218,9 +216,9 @@ http_interactions: "canceled_at": null, "cancellation_reason": null, "capture_method": "manual", - "client_secret": "pi_3OlJMjKuuB1fWySn0hkOQ7rg_secret_jAW17UAwyZyLVD3FVMy2wf3Bh", + "client_secret": "pi_3OiqTXGkyVbTBiYe1KcfbvwC_secret_f7lFpbpOxCMEtBmvrK72gzHU5", "confirmation_method": "automatic", - "created": 1708297305, + "created": 1707709595, "currency": "aud", "customer": null, "description": null, @@ -231,7 +229,7 @@ http_interactions: "metadata": {}, "next_action": null, "on_behalf_of": null, - "payment_method": "pm_1OlJMiKuuB1fWySn9UkunsGB", + "payment_method": "pm_1OiqTXGkyVbTBiYeyvRuXFKv", "payment_method_configuration_details": null, "payment_method_options": { "card": { @@ -256,29 +254,29 @@ http_interactions: "transfer_data": null, "transfer_group": null } - recorded_at: Sun, 18 Feb 2024 23:01:45 GMT + recorded_at: Mon, 12 Feb 2024 03:46:36 GMT - request: method: post - uri: https://api.stripe.com/v1/payment_intents/pi_3OlJMjKuuB1fWySn0hkOQ7rg/confirm + uri: https://api.stripe.com/v1/payment_intents/pi_3OiqTXGkyVbTBiYe1KcfbvwC/confirm body: encoding: US-ASCII string: '' headers: User-Agent: - - Stripe/v1 RubyBindings/10.9.0 + - Stripe/v1 RubyBindings/10.2.0 Authorization: - - Bearer + - Bearer Content-Type: - application/x-www-form-urlencoded X-Stripe-Client-Telemetry: - - '{"last_request_metrics":{"request_id":"req_pUQ6XBsrwBJj7c","request_duration_ms":508}}' + - '{"last_request_metrics":{"request_id":"req_mOJcscgCtaoJZB","request_duration_ms":432}}' 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 6.1.0-17-amd64 (debian-kernel@lists.debian.org) (gcc-12 (Debian 12.2.0-14) - 12.2.0, GNU ld (GNU Binutils for Debian) 2.40) #1 SMP PREEMPT_DYNAMIC Debian - 6.1.69-1 (2023-12-30)","hostname":"blackbox"}' + - '{"bindings_version":"10.2.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: @@ -291,7 +289,7 @@ http_interactions: Server: - nginx Date: - - Sun, 18 Feb 2024 23:01:46 GMT + - Mon, 12 Feb 2024 03:46:36 GMT Content-Type: - application/json Content-Length: @@ -317,17 +315,19 @@ http_interactions: 'none'; frame-ancestors 'none'; img-src 'self'; script-src 'self' 'report-sample'; style-src 'self' Idempotency-Key: - - 97d0bf60-c1e6-4615-ad6c-edb10db55a49 + - e2c61e6c-52f3-428c-b539-6897feb57bd4 Original-Request: - - req_0uMthnY2adDsVr + - req_RQ4tnyZMxaTrfg Request-Id: - - req_0uMthnY2adDsVr + - req_RQ4tnyZMxaTrfg Stripe-Should-Retry: - 'false' Stripe-Version: - '2023-10-16' Vary: - Origin + X-Stripe-Non-Api-Overhead-Duration-Ms: + - '705.0' X-Stripe-Routing-Context-Priority-Tier: - api-testmode Strict-Transport-Security: @@ -336,7 +336,7 @@ http_interactions: encoding: UTF-8 string: |- { - "id": "pi_3OlJMjKuuB1fWySn0hkOQ7rg", + "id": "pi_3OiqTXGkyVbTBiYe1KcfbvwC", "object": "payment_intent", "amount": 1000, "amount_capturable": 1000, @@ -350,20 +350,20 @@ http_interactions: "canceled_at": null, "cancellation_reason": null, "capture_method": "manual", - "client_secret": "pi_3OlJMjKuuB1fWySn0hkOQ7rg_secret_jAW17UAwyZyLVD3FVMy2wf3Bh", + "client_secret": "pi_3OiqTXGkyVbTBiYe1KcfbvwC_secret_f7lFpbpOxCMEtBmvrK72gzHU5", "confirmation_method": "automatic", - "created": 1708297305, + "created": 1707709595, "currency": "aud", "customer": null, "description": null, "invoice": null, "last_payment_error": null, - "latest_charge": "ch_3OlJMjKuuB1fWySn0DrvIzRN", + "latest_charge": "ch_3OiqTXGkyVbTBiYe10IKjyYG", "livemode": false, "metadata": {}, "next_action": null, "on_behalf_of": null, - "payment_method": "pm_1OlJMiKuuB1fWySn9UkunsGB", + "payment_method": "pm_1OiqTXGkyVbTBiYeyvRuXFKv", "payment_method_configuration_details": null, "payment_method_options": { "card": { @@ -388,5 +388,5 @@ http_interactions: "transfer_data": null, "transfer_group": null } - recorded_at: Sun, 18 Feb 2024 23:01:46 GMT + recorded_at: Mon, 12 Feb 2024 03:46:36 GMT recorded_with: VCR 6.2.0 diff --git a/spec/models/spree/gateway/stripe_sca_spec.rb b/spec/models/spree/gateway/stripe_sca_spec.rb index 3c704b80fc..ae19ec324d 100644 --- a/spec/models/spree/gateway/stripe_sca_spec.rb +++ b/spec/models/spree/gateway/stripe_sca_spec.rb @@ -3,7 +3,6 @@ require 'spec_helper' describe Spree::Gateway::StripeSCA, type: :model do - let(:order) { create(:order_ready_for_payment) } let(:year_valid) { Time.zone.now.year.next } @@ -25,17 +24,10 @@ describe Spree::Gateway::StripeSCA, type: :model do { order_id: order.number } } - let(:pm_card) do - Stripe::PaymentMethod.create({ - type: 'card', - card: { - number: '4242424242424242', - exp_month: 12, - exp_year: year_valid, - cvc: '314', - }, - }) - end + # Stripe testing card: + # https://stripe.com/docs/testing?testing-method=payment-methods + let(:pm_card) { Stripe::PaymentMethod.retrieve('pm_card_mastercard') } + let(:payment_intent) do Stripe::PaymentIntent.create({ amount: 1000, # given in AUD cents @@ -71,6 +63,77 @@ describe Spree::Gateway::StripeSCA, type: :model do end end + describe "#void", :vcr, :stripe_version do + # This is the first account retrieved using Stripe::Account.list + let(:stripe_test_account) { "acct_1OhZ9lQQeZbvfZRJ" } + + before do + # Inject our test stripe account + stripe_account = create(:stripe_account, stripe_user_id: stripe_test_account) + allow(StripeAccount).to receive(:find_by).and_return(stripe_account) + end + + context "with a confirmed payment" do + it "refunds the payment" do + # Link the payment intent to our test stripe account, and automatically confirm and capture + # the payment. + payment_intent = Stripe::PaymentIntent.create( + { + amount: 1000, # 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 + ) + + payment = create( + :payment, + order:, + amount: order.total, + payment_method: subject, + source: credit_card, + response_code: payment_intent.id + ) + + response = subject.void(payment_intent.id, nil, {}) + + expect(response.success?).to eq true + end + end + + context "with a voidable payment" do + it "void the payment" do + # Link the payment intent to our test stripe account + payment_intent = Stripe::PaymentIntent.create( + { + amount: 1000, # given in AUD cents + currency: 'aud', # AUD to match order currency + payment_method: 'pm_card_mastercard', + payment_method_types: ['card'], + capture_method: 'manual' + }, + stripe_account: stripe_test_account + ) + + payment = create( + :payment, + order:, + amount: order.total, + payment_method: subject, + source: credit_card, + response_code: payment_intent.id + ) + + response = subject.void(payment_intent.id, nil, {}) + + expect(response.success?).to eq true + end + end + end + describe "#error message", :vcr, :stripe_version do context "when payment intent state is not in 'requires_capture' state" do before do From 0af9ccd17a55cc4fa685a39af19b093131741b12 Mon Sep 17 00:00:00 2001 From: Gaetan Craig-Riou Date: Tue, 13 Feb 2024 10:43:49 +1100 Subject: [PATCH 08/16] Add test for #credit it uses ActiveMerchant::Billing::StripePaymentIntentsGateway#refund, we covering the last scenario that previously used the decorator. --- .../_credit/refunds_the_payment.yml | 747 ++++++++++++++++++ spec/models/spree/gateway/stripe_sca_spec.rb | 31 + 2 files changed, 778 insertions(+) create mode 100644 spec/fixtures/vcr_cassettes/Stripe-v10.6.0/Spree_Gateway_StripeSCA/_credit/refunds_the_payment.yml diff --git a/spec/fixtures/vcr_cassettes/Stripe-v10.6.0/Spree_Gateway_StripeSCA/_credit/refunds_the_payment.yml b/spec/fixtures/vcr_cassettes/Stripe-v10.6.0/Spree_Gateway_StripeSCA/_credit/refunds_the_payment.yml new file mode 100644 index 0000000000..aa9e288fb5 --- /dev/null +++ b/spec/fixtures/vcr_cassettes/Stripe-v10.6.0/Spree_Gateway_StripeSCA/_credit/refunds_the_payment.yml @@ -0,0 +1,747 @@ +--- +http_interactions: +- 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.6.0 + Authorization: + - Bearer + Content-Type: + - application/x-www-form-urlencoded + Stripe-Version: + - '2023-10-16' + X-Stripe-Client-User-Agent: + - '{"bindings_version":"10.6.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_1OhZ9lQQeZbvfZRJ + 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, 12 Feb 2024 23:40:33 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: + - 2df83cff-6b9e-4b69-a8d6-3a29ae896132 + Original-Request: + - req_qlmSU2gDZApvRn + Request-Id: + - req_qlmSU2gDZApvRn + Stripe-Account: + - acct_1OhZ9lQQeZbvfZRJ + 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_3Oj96yQQeZbvfZRJ1mJK3wjg", + "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_3Oj96yQQeZbvfZRJ1mJK3wjg_secret_gYuztzQD3aI900vCqWTwV0Tqa", + "confirmation_method": "automatic", + "created": 1707781232, + "currency": "aud", + "customer": null, + "description": null, + "invoice": null, + "last_payment_error": null, + "latest_charge": "ch_3Oj96yQQeZbvfZRJ1eu9nqj8", + "livemode": false, + "metadata": {}, + "next_action": null, + "on_behalf_of": null, + "payment_method": "pm_1Oj96yQQeZbvfZRJ0rDYJTvm", + "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, 12 Feb 2024 23:40:33 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.6.0 + Authorization: + - Bearer + Content-Type: + - application/x-www-form-urlencoded + X-Stripe-Client-Telemetry: + - '{"last_request_metrics":{"request_id":"req_qlmSU2gDZApvRn","request_duration_ms":1569}}' + Stripe-Version: + - '2023-10-16' + X-Stripe-Client-User-Agent: + - '{"bindings_version":"10.6.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, 12 Feb 2024 23:40:34 GMT + Content-Type: + - application/json + Content-Length: + - '942' + 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_080Zj6If1DAG4Q + 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_1Oj970KuuB1fWySneY4k7dE5", + "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", + "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": 1707781234, + "customer": null, + "livemode": false, + "metadata": {}, + "type": "card" + } + recorded_at: Mon, 12 Feb 2024 23:40:34 GMT +- request: + method: get + uri: https://api.stripe.com/v1/payment_intents/pi_3Oj96yQQeZbvfZRJ1mJK3wjg + 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_1OhZ9lQQeZbvfZRJ + 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, 12 Feb 2024 23:40:35 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_V4N2hQ53av2Y7Z + Stripe-Account: + - acct_1OhZ9lQQeZbvfZRJ + 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_3Oj96yQQeZbvfZRJ1mJK3wjg", + "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_3Oj96yQQeZbvfZRJ1eu9nqj8", + "object": "charge", + "amount": 1000, + "amount_captured": 1000, + "amount_refunded": 0, + "application": "", + "application_fee": null, + "application_fee_amount": null, + "balance_transaction": "txn_3Oj96yQQeZbvfZRJ1RsK34U6", + "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": 1707781232, + "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": 36, + "seller_message": "Payment complete.", + "type": "authorized" + }, + "paid": true, + "payment_intent": "pi_3Oj96yQQeZbvfZRJ1mJK3wjg", + "payment_method": "pm_1Oj96yQQeZbvfZRJ0rDYJTvm", + "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/CAcaFwoVYWNjdF8xT2haOWxRUWVaYnZmWlJKKPPYqq4GMgbBqrOsaAA6LBbntbfnCS4i_BCTrINWH_iO8IhhvEcUo4NzHmV6T6gBL9XSdNg-1LvMV5fe", + "refunded": false, + "refunds": { + "object": "list", + "data": [], + "has_more": false, + "total_count": 0, + "url": "/v1/charges/ch_3Oj96yQQeZbvfZRJ1eu9nqj8/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_3Oj96yQQeZbvfZRJ1mJK3wjg" + }, + "client_secret": "pi_3Oj96yQQeZbvfZRJ1mJK3wjg_secret_gYuztzQD3aI900vCqWTwV0Tqa", + "confirmation_method": "automatic", + "created": 1707781232, + "currency": "aud", + "customer": null, + "description": null, + "invoice": null, + "last_payment_error": null, + "latest_charge": "ch_3Oj96yQQeZbvfZRJ1eu9nqj8", + "livemode": false, + "metadata": {}, + "next_action": null, + "on_behalf_of": null, + "payment_method": "pm_1Oj96yQQeZbvfZRJ0rDYJTvm", + "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, 12 Feb 2024 23:40:35 GMT +- request: + method: post + uri: https://api.stripe.com/v1/charges/ch_3Oj96yQQeZbvfZRJ1eu9nqj8/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_1OhZ9lQQeZbvfZRJ + 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, 12 Feb 2024 23:40:37 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: + - 45259ce6-403c-4e58-814e-f5d9a8408b20 + Original-Request: + - req_YAl5fRQ21daQPA + Request-Id: + - req_YAl5fRQ21daQPA + Stripe-Account: + - acct_1OhZ9lQQeZbvfZRJ + 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_3Oj96yQQeZbvfZRJ1g0CJ9FL", + "object": "refund", + "amount": 1000, + "balance_transaction": "txn_3Oj96yQQeZbvfZRJ1jHrLFL1", + "charge": { + "id": "ch_3Oj96yQQeZbvfZRJ1eu9nqj8", + "object": "charge", + "amount": 1000, + "amount_captured": 1000, + "amount_refunded": 1000, + "application": "", + "application_fee": null, + "application_fee_amount": null, + "balance_transaction": "txn_3Oj96yQQeZbvfZRJ1RsK34U6", + "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": 1707781232, + "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": 36, + "seller_message": "Payment complete.", + "type": "authorized" + }, + "paid": true, + "payment_intent": "pi_3Oj96yQQeZbvfZRJ1mJK3wjg", + "payment_method": "pm_1Oj96yQQeZbvfZRJ0rDYJTvm", + "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/CAcaFwoVYWNjdF8xT2haOWxRUWVaYnZmWlJKKPTYqq4GMgZQqAj4ctc6LBbgm76DRSrCQ4pX8VSrXuiayuVxdn1a0v3rX62vwWWKBuWFTGIKRS5Rfctx", + "refunded": true, + "refunds": { + "object": "list", + "data": [ + { + "id": "re_3Oj96yQQeZbvfZRJ1g0CJ9FL", + "object": "refund", + "amount": 1000, + "balance_transaction": "txn_3Oj96yQQeZbvfZRJ1jHrLFL1", + "charge": "ch_3Oj96yQQeZbvfZRJ1eu9nqj8", + "created": 1707781236, + "currency": "aud", + "destination_details": { + "card": { + "reference_status": "pending", + "reference_type": "acquirer_reference_number", + "type": "refund" + }, + "type": "card" + }, + "metadata": {}, + "payment_intent": "pi_3Oj96yQQeZbvfZRJ1mJK3wjg", + "reason": null, + "receipt_number": null, + "source_transfer_reversal": null, + "status": "succeeded", + "transfer_reversal": null + } + ], + "has_more": false, + "total_count": 1, + "url": "/v1/charges/ch_3Oj96yQQeZbvfZRJ1eu9nqj8/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": 1707781236, + "currency": "aud", + "destination_details": { + "card": { + "reference_status": "pending", + "reference_type": "acquirer_reference_number", + "type": "refund" + }, + "type": "card" + }, + "metadata": {}, + "payment_intent": "pi_3Oj96yQQeZbvfZRJ1mJK3wjg", + "reason": null, + "receipt_number": null, + "source_transfer_reversal": null, + "status": "succeeded", + "transfer_reversal": null + } + recorded_at: Mon, 12 Feb 2024 23:40:37 GMT +recorded_with: VCR 6.2.0 diff --git a/spec/models/spree/gateway/stripe_sca_spec.rb b/spec/models/spree/gateway/stripe_sca_spec.rb index ae19ec324d..47bd3c18c1 100644 --- a/spec/models/spree/gateway/stripe_sca_spec.rb +++ b/spec/models/spree/gateway/stripe_sca_spec.rb @@ -134,6 +134,37 @@ describe Spree::Gateway::StripeSCA, type: :model do end end + describe "#credit", :vcr, :stripe_version do + # This is the first account retrieved using Stripe::Account.list + let(:stripe_test_account) { "acct_1OhZ9lQQeZbvfZRJ" } + + before do + # Inject our test stripe account + stripe_account = create(:stripe_account, stripe_user_id: stripe_test_account) + allow(StripeAccount).to receive(:find_by).and_return(stripe_account) + end + + it "refunds the payment" do + # Link the payment intent to our test stripe account, and automatically confirm and capture + # the payment. + payment_intent = Stripe::PaymentIntent.create( + { + amount: 1000, # 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 + ) + + response = subject.credit(1000, nil, payment_intent.id, {}) + + expect(response.success?).to eq true + end + end + describe "#error message", :vcr, :stripe_version do context "when payment intent state is not in 'requires_capture' state" do before do From edc40c9ea90a8408db46f5310a574b509ac8fe0b Mon Sep 17 00:00:00 2001 From: Gaetan Craig-Riou Date: Tue, 13 Feb 2024 10:49:43 +1100 Subject: [PATCH 09/16] Refactor Spree::Gateway::StripeSCA - fix confusing comment - rename parameter to better reflect usage --- app/models/spree/gateway/stripe_sca.rb | 29 +++++++++++++------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/app/models/spree/gateway/stripe_sca.rb b/app/models/spree/gateway/stripe_sca.rb index c137734ba2..78e658ab9c 100644 --- a/app/models/spree/gateway/stripe_sca.rb +++ b/app/models/spree/gateway/stripe_sca.rb @@ -43,7 +43,7 @@ module Spree StripeAccount.find_by(enterprise_id: preferred_enterprise_id)&.stripe_user_id end - # NOTE: the name of this method is determined by Spree::Payment::Processing + # NOTE: this method is required by Spree::Payment::Processing def purchase(money, creditcard, gateway_options) begin payment_intent_id = fetch_payment_intent(creditcard, gateway_options) @@ -63,7 +63,7 @@ module Spree provider.capture(money, payment_intent_id, options) end - # NOTE: the name of this method is determined by Spree::Payment::Processing + # NOTE: this method is required by Spree::Payment::Processing def charge_offline(money, creditcard, gateway_options) customer, payment_method = Stripe::CreditCardCloner.new(creditcard, stripe_account_id).find_or_clone @@ -74,7 +74,7 @@ module Spree failed_activemerchant_billing_response(e.message) end - # NOTE: the name of this method is determined by Spree::Payment::Processing + # NOTE: this method is required by Spree::Payment::Processing def authorize(money, creditcard, gateway_options) authorize_response = provider.authorize(*options_for_authorize(money, creditcard, gateway_options)) @@ -83,26 +83,27 @@ module Spree failed_activemerchant_billing_response(e.message) end - # NOTE: the name of this method is determined by Spree::Payment::Processing - def void(response_code, _creditcard, gateway_options) - payment_intent_id = response_code - - payment_intent_response = Stripe::PaymentIntent.retrieve(payment_intent_id, - stripe_account: stripe_account_id) + # NOTE: this method is required by Spree::Payment::Processing + def void(payment_intent_id, _creditcard, gateway_options) + payment_intent_response = Stripe::PaymentIntent.retrieve( + payment_intent_id, stripe_account: stripe_account_id + ) gateway_options[:stripe_account] = stripe_account_id # If a payment has been confirmed it can't be voided by Stripe, and must be refunded instead if voidable?(payment_intent_response) - provider.void(response_code, gateway_options) + provider.void(payment_intent_id, gateway_options) else - provider.refund(payment_intent_response.amount_received, response_code, gateway_options) + provider.refund( + payment_intent_response.amount_received, payment_intent_id, gateway_options + ) end end - # NOTE: the name of this method is determined by Spree::Payment::Processing - def credit(money, _creditcard, response_code, gateway_options) + # NOTE: this method is required by Spree::Payment::Processing + def credit(money, _creditcard, payment_intent_id, gateway_options) gateway_options[:stripe_account] = stripe_account_id - provider.refund(money, response_code, gateway_options) + provider.refund(money, payment_intent_id, gateway_options) end def create_profile(payment) From 8832f2fef6b3b34ed0644b0da190940cdabe40e6 Mon Sep 17 00:00:00 2001 From: Gaetan Craig-Riou Date: Tue, 13 Feb 2024 11:59:16 +1100 Subject: [PATCH 10/16] Refactor #credit spec Model spec shouldn't know about the undelying call to stripe. Replaced request stubs by payment method stubs. Consolidate #credit spec in one `describe` block --- spec/models/spree/payment_spec.rb | 108 +++++++++++++----------------- 1 file changed, 47 insertions(+), 61 deletions(-) diff --git a/spec/models/spree/payment_spec.rb b/spec/models/spree/payment_spec.rb index fcfa0fa767..f160ec8388 100644 --- a/spec/models/spree/payment_spec.rb +++ b/spec/models/spree/payment_spec.rb @@ -442,10 +442,23 @@ describe Spree::Payment do end end - context "#credit" do + describe "#credit" do + let(:success_response) do + instance_double( + ActiveMerchant::Billing::Response, + authorization: "12345", + success?: true, + avs_result: { 'code' => 'avs-code' }, + cvv_result: { code: nil, message: nil } + ) + end + before do payment.state = 'completed' payment.response_code = '123' + + # Stub payment.method#credit + allow(payment_method).to receive(:credit).and_return(success_response) end context "when outstanding_balance is less than payment amount" do @@ -468,10 +481,6 @@ describe Spree::Payment do end it "should not applied any transaction fees" do - stub_request(:get, "https://api.stripe.com/v1/payment_intents/123"). - to_return(status: 200, body: payment_authorised) - stub_request(:post, "https://api.stripe.com/v1/charges/ch_1234/refunds"). - to_return(status: 200, body: payment_refunded) payment.credit! expect(payment.adjustment.finalized?).to eq(false) expect(order.all_adjustments.payment_fee.length).to eq(0) @@ -504,11 +513,40 @@ describe Spree::Payment do end end + context "when amount <= credit_allowed" do + it "makes the state processing" do + payment.payment_method.name = 'Gateway' + payment.payment_method.distributors << create(:distributor_enterprise) + payment.payment_method.save! + + payment.order = create(:order) + + payment.state = 'completed' + allow(payment).to receive(:credit_allowed) { 10 } + payment.partial_credit(10) + expect(payment).to be_processing + end + + it "calls credit on the source with the payment and amount" do + payment.state = 'completed' + allow(payment).to receive(:credit_allowed) { 10 } + expect(payment).to receive(:credit!).with(10) + payment.partial_credit(10) + end + end + + context "when amount > credit_allowed" do + it "should not call credit on the source" do + payment = build_stubbed(:payment) + payment.state = 'completed' + allow(payment).to receive(:credit_allowed) { 10 } + payment.partial_credit(20) + expect(payment).to be_completed + end + end + + it "should log the response" do - stub_request(:get, "https://api.stripe.com/v1/payment_intents/123"). - to_return(status: 200, body: payment_authorised) - stub_request(:post, "https://api.stripe.com/v1/charges/ch_1234/refunds"). - to_return(status: 200, body: payment_refunded) payment.credit! expect(payment).to have_received(:record_response) end @@ -523,19 +561,11 @@ describe Spree::Payment do context "when response is successful" do it "should create an offsetting payment" do - stub_request(:get, "https://api.stripe.com/v1/payment_intents/123"). - to_return(status: 200, body: payment_authorised) - stub_request(:post, "https://api.stripe.com/v1/charges/ch_1234/refunds"). - to_return(status: 200, body: payment_refunded) expect(Spree::Payment).to receive(:create!) payment.credit! end it "resulting payment should have correct values" do - stub_request(:get, "https://api.stripe.com/v1/payment_intents/123"). - to_return(status: 200, body: payment_authorised) - stub_request(:post, "https://api.stripe.com/v1/charges/ch_1234/refunds"). - to_return(status: 200, body: payment_refunded) allow(payment.order).to receive(:new_outstanding_balance) { 100 } allow(payment).to receive(:credit_allowed) { 10 } @@ -552,15 +582,7 @@ describe Spree::Payment do verification_value: '123') end - let(:successful_response) do - ActiveMerchant::Billing::Response.new(true, "Yay!") - end - it 'lets the new payment to be saved' do - stub_request(:get, "https://api.stripe.com/v1/payment_intents/123"). - to_return(status: 200, body: payment_authorised) - stub_request(:post, "https://api.stripe.com/v1/charges/ch_1234/refunds"). - to_return(status: 200, body: payment_refunded) allow(payment.order).to receive(:new_outstanding_balance) { 100 } allow(payment).to receive(:credit_allowed) { 10 } @@ -636,42 +658,6 @@ describe Spree::Payment do end end - context "#credit" do - context "when amount <= credit_allowed" do - it "makes the state processing" do - stub_request(:get, "https://api.stripe.com/v1/payment_intents/12345"). - to_return(status: 200, body: payment_authorised) - stub_request(:post, "https://api.stripe.com/v1/charges/ch_1234/refunds"). - to_return(status: 200, body: payment_refunded) - payment.payment_method.name = 'Gateway' - payment.payment_method.distributors << create(:distributor_enterprise) - payment.payment_method.save! - - payment.order = create(:order) - - payment.state = 'completed' - allow(payment).to receive(:credit_allowed) { 10 } - payment.partial_credit(10) - expect(payment).to be_processing - end - it "calls credit on the source with the payment and amount" do - payment.state = 'completed' - allow(payment).to receive(:credit_allowed) { 10 } - expect(payment).to receive(:credit!).with(10) - payment.partial_credit(10) - end - end - context "when amount > credit_allowed" do - it "should not call credit on the source" do - payment = build_stubbed(:payment) - payment.state = 'completed' - allow(payment).to receive(:credit_allowed) { 10 } - payment.partial_credit(20) - expect(payment).to be_completed - end - end - end - context "#save" do context "completed payments" do it "updates order payment total" do From 657f71c357560fef98af524ccc01638e17660620 Mon Sep 17 00:00:00 2001 From: Gaetan Craig-Riou Date: Tue, 13 Feb 2024 12:31:02 +1100 Subject: [PATCH 11/16] Further refactor payment specs - remove any stub_request - use intance_double of ActiveMerchant::Billing::Response --- spec/models/spree/payment_spec.rb | 78 ++++++++----------------------- 1 file changed, 20 insertions(+), 58 deletions(-) diff --git a/spec/models/spree/payment_spec.rb b/spec/models/spree/payment_spec.rb index f160ec8388..1d90ebb478 100644 --- a/spec/models/spree/payment_spec.rb +++ b/spec/models/spree/payment_spec.rb @@ -32,26 +32,15 @@ describe Spree::Payment do let(:amount_in_cents) { payment.amount.to_f * 100 } let(:success_response) do - double('success_response', success?: true, - authorization: '123', - avs_result: { 'code' => 'avs-code' }, - cvv_result: { code: nil, message: nil }) + instance_double( + ActiveMerchant::Billing::Response, + authorization: "123", + success?: true, + avs_result: { 'code' => 'avs-code' }, + cvv_result: { code: nil, message: nil } + ) end - - let(:failed_response) { double('gateway_response', success?: false) } - - let(:payment_authorised) { - payment_intent(payment.amount, "requires_capture") - } - let(:payment_canceled) { - payment_intent(payment.amount, "canceled") - } - let(:payment_refunded) { - payment_intent(payment.amount, "refunded") - } - let(:capture_successful) { - payment_intent(payment.amount, "succeeded") - } + let(:failed_response) { instance_double(ActiveMerchant::Billing::Response, success?: false) } context "extends LocalizedNumber" do subject { build_stubbed(:payment) } @@ -121,11 +110,11 @@ describe Spree::Payment do end it "should make the state 'processing'" do - stub_request(:get, "https://api.stripe.com/v1/payment_intents/12345"). - to_return(status: 200, body: payment_authorised) - stub_request(:post, "https://api.stripe.com/v1/payment_intents/12345/capture"). - to_return(status: 200, body: capture_successful) + allow(payment_method).to receive(:capture).and_return(success_response) + allow(payment_method).to receive(:purchase).and_return(success_response) + expect(payment).to receive(:started_processing!) + payment.save! payment.process! end @@ -165,6 +154,7 @@ describe Spree::Payment do before do allow(payment_method).to receive(:authorize) { success_response } end + it "should call authorize on the gateway with the payment amount" do expect(payment.payment_method).to receive(:authorize).with( amount_in_cents, card, anything @@ -242,11 +232,9 @@ describe Spree::Payment do context "purchase" do before do - stub_request(:get, "https://api.stripe.com/v1/payment_intents/12345"). - to_return(status: 200, body: payment_authorised) - stub_request(:post, "https://api.stripe.com/v1/payment_intents/12345/capture"). - to_return(status: 200, body: capture_successful) + allow(payment_method).to receive(:purchase).and_return(success_response) end + it "should call purchase on the gateway with the payment amount" do expect(payment_method).to receive(:purchase).with(amount_in_cents, card, anything).and_return(success_response) @@ -347,6 +335,8 @@ describe Spree::Payment do before do payment.response_code = '123' payment.state = 'pending' + + allow(payment_method).to receive(:void).and_return(success_response) end context "when profiles are supported" do @@ -368,10 +358,6 @@ describe Spree::Payment do end it "should log the response" do - stub_request(:get, "https://api.stripe.com/v1/payment_intents/123"). - to_return(status: 200, body: payment_authorised) - stub_request(:post, "https://api.stripe.com/v1/payment_intents/123/cancel"). - to_return(status: 200, body: payment_canceled) payment.void_transaction! expect(payment).to have_received(:record_response) end @@ -385,24 +371,11 @@ describe Spree::Payment do end context "if successful" do - let(:mocked_response) { - instance_double(ActiveMerchant::Billing::Response, authorization: '12345', - success?: true) - } - - before do - allow(payment_method).to receive(:void).and_return(mocked_response) - end - it "should update the response_code with the authorization from the gateway" do - stub_request(:get, "https://api.stripe.com/v1/payment_intents/abc"). - to_return(status: 200, body: payment_authorised) - stub_request(:post, "https://api.stripe.com/v1/payment_intents/abc/cancel"). - to_return(status: 200, body: payment_canceled) - # Change it to something different payment.response_code = 'abc' payment.void_transaction! - expect(payment.response_code).to eq('12345') + + expect(payment.response_code).to eq('123') end end @@ -443,16 +416,6 @@ describe Spree::Payment do end describe "#credit" do - let(:success_response) do - instance_double( - ActiveMerchant::Billing::Response, - authorization: "12345", - success?: true, - avs_result: { 'code' => 'avs-code' }, - cvv_result: { code: nil, message: nil } - ) - end - before do payment.state = 'completed' payment.response_code = '123' @@ -545,7 +508,6 @@ describe Spree::Payment do end end - it "should log the response" do payment.credit! expect(payment).to have_received(:record_response) @@ -572,7 +534,7 @@ describe Spree::Payment do offsetting_payment = payment.credit! expect(offsetting_payment.amount.to_f).to eq(-10) expect(offsetting_payment).to be_completed - expect(offsetting_payment.response_code).to eq('12345') + expect(offsetting_payment.response_code).to eq('123') expect(offsetting_payment.source).to eq(payment) end From ef1d2fdb4d4e4b81254cad6ba28f687e8c1ff982 Mon Sep 17 00:00:00 2001 From: Gaetan Craig-Riou Date: Wed, 14 Feb 2024 14:19:01 +1100 Subject: [PATCH 12/16] Clean up cassettes * remove old cassettes left over from a rebase * re recorded cassettes with the lastest Stripe version --- .../refunds_the_payment.yml | 1149 ----------------- .../void_the_payment.yml | 524 -------- .../_credit/refunds_the_payment.yml | 228 +--- .../refunds_the_payment.yml | 152 +-- .../void_the_payment.yml | 86 +- 5 files changed, 175 insertions(+), 1964 deletions(-) delete mode 100644 spec/fixtures/vcr_cassettes/Stripe-v10.2.0/Spree_Gateway_StripeSCA/_void/with_a_confirmed_payment/refunds_the_payment.yml delete mode 100644 spec/fixtures/vcr_cassettes/Stripe-v10.2.0/Spree_Gateway_StripeSCA/_void/with_a_voidable_payment/void_the_payment.yml rename spec/fixtures/vcr_cassettes/{Stripe-v10.6.0 => Stripe-v10.8.0}/Spree_Gateway_StripeSCA/_credit/refunds_the_payment.yml (73%) rename spec/fixtures/vcr_cassettes/{Stripe-v10.6.0 => Stripe-v10.8.0}/Spree_Gateway_StripeSCA/_void/with_a_confirmed_payment/refunds_the_payment.yml (86%) rename spec/fixtures/vcr_cassettes/{Stripe-v10.6.0 => Stripe-v10.8.0}/Spree_Gateway_StripeSCA/_void/with_a_voidable_payment/void_the_payment.yml (87%) diff --git a/spec/fixtures/vcr_cassettes/Stripe-v10.2.0/Spree_Gateway_StripeSCA/_void/with_a_confirmed_payment/refunds_the_payment.yml b/spec/fixtures/vcr_cassettes/Stripe-v10.2.0/Spree_Gateway_StripeSCA/_void/with_a_confirmed_payment/refunds_the_payment.yml deleted file mode 100644 index c3cce8b8a6..0000000000 --- a/spec/fixtures/vcr_cassettes/Stripe-v10.2.0/Spree_Gateway_StripeSCA/_void/with_a_confirmed_payment/refunds_the_payment.yml +++ /dev/null @@ -1,1149 +0,0 @@ ---- -http_interactions: -- 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.2.0 - Authorization: - - Bearer - Content-Type: - - application/x-www-form-urlencoded - X-Stripe-Client-Telemetry: - - '{"last_request_metrics":{"request_id":"req_RQ4tnyZMxaTrfg","request_duration_ms":920}}' - Stripe-Version: - - '2023-10-16' - X-Stripe-Client-User-Agent: - - '{"bindings_version":"10.2.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, 12 Feb 2024 03:46:37 GMT - Content-Type: - - application/json - Content-Length: - - '942' - 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_AMPupOEWxQpMvJ - Stripe-Version: - - '2023-10-16' - Vary: - - Origin - X-Stripe-Non-Api-Overhead-Duration-Ms: - - '140.0' - X-Stripe-Routing-Context-Priority-Tier: - - api-testmode - Strict-Transport-Security: - - max-age=63072000; includeSubDomains; preload - body: - encoding: UTF-8 - string: |- - { - "id": "pm_1OiqTZGkyVbTBiYeSbdHHVBU", - "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", - "exp_month": 2, - "exp_year": 2025, - "fingerprint": "1Zr75a6zBSZLu0Zp", - "funding": "credit", - "generated_from": null, - "last4": "4444", - "networks": { - "available": [ - "mastercard" - ], - "preferred": null - }, - "three_d_secure_usage": { - "supported": true - }, - "wallet": null - }, - "created": 1707709597, - "customer": null, - "livemode": false, - "metadata": {}, - "type": "card" - } - recorded_at: Mon, 12 Feb 2024 03:46:37 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.2.0 - Authorization: - - Bearer - Content-Type: - - application/x-www-form-urlencoded - X-Stripe-Client-Telemetry: - - '{"last_request_metrics":{"request_id":"req_AMPupOEWxQpMvJ","request_duration_ms":356}}' - Stripe-Version: - - '2023-10-16' - X-Stripe-Client-User-Agent: - - '{"bindings_version":"10.2.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_1APQreGkyVbTBiYe - 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, 12 Feb 2024 03:46:38 GMT - Content-Type: - - application/json - Content-Length: - - '1344' - 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: - - 65755257-63df-450c-9bf4-90d6512d869a - Original-Request: - - req_Y9z6pafg0X39IU - Request-Id: - - req_Y9z6pafg0X39IU - Stripe-Should-Retry: - - 'false' - Stripe-Version: - - '2023-10-16' - Vary: - - Origin - X-Stripe-Non-Api-Overhead-Duration-Ms: - - '306.0' - X-Stripe-Routing-Context-Priority-Tier: - - api-testmode - Strict-Transport-Security: - - max-age=63072000; includeSubDomains; preload - body: - encoding: UTF-8 - string: |- - { - "id": "pi_3OiqTaGkyVbTBiYe0nUcBPZV", - "object": "payment_intent", - "amount": 1000, - "amount_capturable": 0, - "amount_details": { - "tip": {} - }, - "amount_received": 0, - "application": null, - "application_fee_amount": null, - "automatic_payment_methods": null, - "canceled_at": null, - "cancellation_reason": null, - "capture_method": "manual", - "client_secret": "pi_3OiqTaGkyVbTBiYe0nUcBPZV_secret_2KT0oh8uYFUeQONViEq7ZWLgN", - "confirmation_method": "automatic", - "created": 1707709598, - "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_1OiqTaGkyVbTBiYeLv5l0zWX", - "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, 12 Feb 2024 03:46:38 GMT -- request: - method: post - uri: https://api.stripe.com/v1/payment_intents/pi_3OiqTaGkyVbTBiYe0nUcBPZV/confirm - body: - encoding: US-ASCII - string: '' - headers: - User-Agent: - - Stripe/v1 RubyBindings/10.2.0 - Authorization: - - Bearer - Content-Type: - - application/x-www-form-urlencoded - X-Stripe-Client-Telemetry: - - '{"last_request_metrics":{"request_id":"req_Y9z6pafg0X39IU","request_duration_ms":528}}' - Stripe-Version: - - '2023-10-16' - X-Stripe-Client-User-Agent: - - '{"bindings_version":"10.2.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, 12 Feb 2024 03:46:39 GMT - Content-Type: - - application/json - Content-Length: - - '1367' - 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%2Fconfirm; - 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: - - 43c15925-cb4a-4302-8ba7-1c60c45a4148 - Original-Request: - - req_nFqQkMl1tz0Za6 - Request-Id: - - req_nFqQkMl1tz0Za6 - Stripe-Should-Retry: - - 'false' - Stripe-Version: - - '2023-10-16' - Vary: - - Origin - X-Stripe-Non-Api-Overhead-Duration-Ms: - - '722.0' - X-Stripe-Routing-Context-Priority-Tier: - - api-testmode - Strict-Transport-Security: - - max-age=63072000; includeSubDomains; preload - body: - encoding: UTF-8 - string: |- - { - "id": "pi_3OiqTaGkyVbTBiYe0nUcBPZV", - "object": "payment_intent", - "amount": 1000, - "amount_capturable": 1000, - "amount_details": { - "tip": {} - }, - "amount_received": 0, - "application": null, - "application_fee_amount": null, - "automatic_payment_methods": null, - "canceled_at": null, - "cancellation_reason": null, - "capture_method": "manual", - "client_secret": "pi_3OiqTaGkyVbTBiYe0nUcBPZV_secret_2KT0oh8uYFUeQONViEq7ZWLgN", - "confirmation_method": "automatic", - "created": 1707709598, - "currency": "aud", - "customer": null, - "description": null, - "invoice": null, - "last_payment_error": null, - "latest_charge": "ch_3OiqTaGkyVbTBiYe0O6Hj6zD", - "livemode": false, - "metadata": {}, - "next_action": null, - "on_behalf_of": null, - "payment_method": "pm_1OiqTaGkyVbTBiYeLv5l0zWX", - "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_capture", - "transfer_data": null, - "transfer_group": null - } - recorded_at: Mon, 12 Feb 2024 03:46:39 GMT -- request: - method: post - uri: https://api.stripe.com/v1/payment_intents/pi_3OiqTaGkyVbTBiYe0nUcBPZV/capture - body: - encoding: US-ASCII - string: '' - headers: - User-Agent: - - Stripe/v1 RubyBindings/10.2.0 - Authorization: - - Bearer - Content-Type: - - application/x-www-form-urlencoded - X-Stripe-Client-Telemetry: - - '{"last_request_metrics":{"request_id":"req_nFqQkMl1tz0Za6","request_duration_ms":1012}}' - Stripe-Version: - - '2023-10-16' - X-Stripe-Client-User-Agent: - - '{"bindings_version":"10.2.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, 12 Feb 2024 03:46:40 GMT - Content-Type: - - application/json - Content-Length: - - '1360' - 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%2Fcapture; - 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: - - 369fad8e-e4ff-4766-a931-602e295519d8 - Original-Request: - - req_UkosKenQjluRqt - Request-Id: - - req_UkosKenQjluRqt - Stripe-Should-Retry: - - 'false' - Stripe-Version: - - '2023-10-16' - Vary: - - Origin - X-Stripe-Non-Api-Overhead-Duration-Ms: - - '676.0' - X-Stripe-Routing-Context-Priority-Tier: - - api-testmode - Strict-Transport-Security: - - max-age=63072000; includeSubDomains; preload - body: - encoding: UTF-8 - string: |- - { - "id": "pi_3OiqTaGkyVbTBiYe0nUcBPZV", - "object": "payment_intent", - "amount": 1000, - "amount_capturable": 0, - "amount_details": { - "tip": {} - }, - "amount_received": 1000, - "application": null, - "application_fee_amount": null, - "automatic_payment_methods": null, - "canceled_at": null, - "cancellation_reason": null, - "capture_method": "manual", - "client_secret": "pi_3OiqTaGkyVbTBiYe0nUcBPZV_secret_2KT0oh8uYFUeQONViEq7ZWLgN", - "confirmation_method": "automatic", - "created": 1707709598, - "currency": "aud", - "customer": null, - "description": null, - "invoice": null, - "last_payment_error": null, - "latest_charge": "ch_3OiqTaGkyVbTBiYe0O6Hj6zD", - "livemode": false, - "metadata": {}, - "next_action": null, - "on_behalf_of": null, - "payment_method": "pm_1OiqTaGkyVbTBiYeLv5l0zWX", - "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, 12 Feb 2024 03:46:40 GMT -- request: - method: get - uri: https://api.stripe.com/v1/payment_intents/pi_3OiqTaGkyVbTBiYe0nUcBPZV - body: - encoding: US-ASCII - string: '' - headers: - User-Agent: - - Stripe/v1 RubyBindings/10.2.0 - Authorization: - - Bearer - Content-Type: - - application/x-www-form-urlencoded - X-Stripe-Client-Telemetry: - - '{"last_request_metrics":{"request_id":"req_UkosKenQjluRqt","request_duration_ms":869}}' - Stripe-Version: - - '2023-10-16' - X-Stripe-Client-User-Agent: - - '{"bindings_version":"10.2.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_1APQreGkyVbTBiYe - 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, 12 Feb 2024 03:46:41 GMT - Content-Type: - - application/json - Content-Length: - - '1360' - 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_bkByviWmLTQOfW - Stripe-Version: - - '2023-10-16' - Vary: - - Origin - X-Stripe-Non-Api-Overhead-Duration-Ms: - - '60.0' - X-Stripe-Routing-Context-Priority-Tier: - - api-testmode - Strict-Transport-Security: - - max-age=63072000; includeSubDomains; preload - body: - encoding: UTF-8 - string: |- - { - "id": "pi_3OiqTaGkyVbTBiYe0nUcBPZV", - "object": "payment_intent", - "amount": 1000, - "amount_capturable": 0, - "amount_details": { - "tip": {} - }, - "amount_received": 1000, - "application": null, - "application_fee_amount": null, - "automatic_payment_methods": null, - "canceled_at": null, - "cancellation_reason": null, - "capture_method": "manual", - "client_secret": "pi_3OiqTaGkyVbTBiYe0nUcBPZV_secret_2KT0oh8uYFUeQONViEq7ZWLgN", - "confirmation_method": "automatic", - "created": 1707709598, - "currency": "aud", - "customer": null, - "description": null, - "invoice": null, - "last_payment_error": null, - "latest_charge": "ch_3OiqTaGkyVbTBiYe0O6Hj6zD", - "livemode": false, - "metadata": {}, - "next_action": null, - "on_behalf_of": null, - "payment_method": "pm_1OiqTaGkyVbTBiYeLv5l0zWX", - "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, 12 Feb 2024 03:46:41 GMT -- request: - method: get - uri: https://api.stripe.com/v1/payment_intents/pi_3OiqTaGkyVbTBiYe0nUcBPZV - body: - encoding: US-ASCII - string: '' - headers: - Authorization: - - Basic c2tfdGVzdF9HRlFXMnU4c2xsbmxBTzYxN2FUODFRdko6 - 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_1APQreGkyVbTBiYe - 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, 12 Feb 2024 03:46:41 GMT - Content-Type: - - application/json - Content-Length: - - '5139' - 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_UtyUK1MQapAOEz - Stripe-Version: - - '2020-08-27' - Vary: - - Origin - X-Stripe-Non-Api-Overhead-Duration-Ms: - - '117.0' - X-Stripe-Routing-Context-Priority-Tier: - - api-testmode - Strict-Transport-Security: - - max-age=63072000; includeSubDomains; preload - body: - encoding: UTF-8 - string: |- - { - "id": "pi_3OiqTaGkyVbTBiYe0nUcBPZV", - "object": "payment_intent", - "amount": 1000, - "amount_capturable": 0, - "amount_details": { - "tip": {} - }, - "amount_received": 1000, - "application": null, - "application_fee_amount": null, - "automatic_payment_methods": null, - "canceled_at": null, - "cancellation_reason": null, - "capture_method": "manual", - "charges": { - "object": "list", - "data": [ - { - "id": "ch_3OiqTaGkyVbTBiYe0O6Hj6zD", - "object": "charge", - "amount": 1000, - "amount_captured": 1000, - "amount_refunded": 0, - "application": null, - "application_fee": null, - "application_fee_amount": null, - "balance_transaction": "txn_3OiqTaGkyVbTBiYe0AQLBi3e", - "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": "OPENFOODNETWORK", - "captured": true, - "created": 1707709599, - "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": 13, - "seller_message": "Payment complete.", - "type": "authorized" - }, - "paid": true, - "payment_intent": "pi_3OiqTaGkyVbTBiYe0nUcBPZV", - "payment_method": "pm_1OiqTaGkyVbTBiYeLv5l0zWX", - "payment_method_details": { - "card": { - "amount_authorized": 1000, - "brand": "mastercard", - "capture_before": 1708314399, - "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": "1Zr75a6zBSZLu0Zp", - "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/CAcaFwoVYWNjdF8xQVBRcmVHa3lWYlRCaVllKKGppq4GMgYKu9Q4B5A6LBaTUzdg_aQZMp9WlQueacwdHTSVg_dxKop9ZZpxY9MYvYW5Q-ZabNXYn7dp", - "refunded": false, - "refunds": { - "object": "list", - "data": [], - "has_more": false, - "total_count": 0, - "url": "/v1/charges/ch_3OiqTaGkyVbTBiYe0O6Hj6zD/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_3OiqTaGkyVbTBiYe0nUcBPZV" - }, - "client_secret": "pi_3OiqTaGkyVbTBiYe0nUcBPZV_secret_2KT0oh8uYFUeQONViEq7ZWLgN", - "confirmation_method": "automatic", - "created": 1707709598, - "currency": "aud", - "customer": null, - "description": null, - "invoice": null, - "last_payment_error": null, - "latest_charge": "ch_3OiqTaGkyVbTBiYe0O6Hj6zD", - "livemode": false, - "metadata": {}, - "next_action": null, - "on_behalf_of": null, - "payment_method": "pm_1OiqTaGkyVbTBiYeLv5l0zWX", - "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, 12 Feb 2024 03:46:41 GMT -- request: - method: post - uri: https://api.stripe.com/v1/charges/ch_3OiqTaGkyVbTBiYe0O6Hj6zD/refunds - body: - encoding: UTF-8 - string: amount=1000&expand[0]=charge - headers: - Content-Type: - - application/x-www-form-urlencoded - Authorization: - - Basic c2tfdGVzdF9HRlFXMnU4c2xsbmxBTzYxN2FUODFRdko6 - 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_1APQreGkyVbTBiYe - 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, 12 Feb 2024 03:46:42 GMT - Content-Type: - - application/json - Content-Length: - - '4547' - 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: - - 5fd98021-2934-4a23-a462-2686b02d6be4 - Original-Request: - - req_GrOgrUV9vyH0dN - Request-Id: - - req_GrOgrUV9vyH0dN - 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_3OiqTaGkyVbTBiYe0K4k5Khy", - "object": "refund", - "amount": 1000, - "balance_transaction": "txn_3OiqTaGkyVbTBiYe09TPiL12", - "charge": { - "id": "ch_3OiqTaGkyVbTBiYe0O6Hj6zD", - "object": "charge", - "amount": 1000, - "amount_captured": 1000, - "amount_refunded": 1000, - "application": null, - "application_fee": null, - "application_fee_amount": null, - "balance_transaction": "txn_3OiqTaGkyVbTBiYe0AQLBi3e", - "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": "OPENFOODNETWORK", - "captured": true, - "created": 1707709599, - "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": 13, - "seller_message": "Payment complete.", - "type": "authorized" - }, - "paid": true, - "payment_intent": "pi_3OiqTaGkyVbTBiYe0nUcBPZV", - "payment_method": "pm_1OiqTaGkyVbTBiYeLv5l0zWX", - "payment_method_details": { - "card": { - "amount_authorized": 1000, - "brand": "mastercard", - "capture_before": 1708314399, - "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": "1Zr75a6zBSZLu0Zp", - "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/CAcaFwoVYWNjdF8xQVBRcmVHa3lWYlRCaVllKKKppq4GMgbB94RxQuw6LBajaUJ_Nzh33IT18N1M4-HhSrvYWIOIFfijUMVA2zy0iqBh8K2_OWFkLTEf", - "refunded": true, - "refunds": { - "object": "list", - "data": [ - { - "id": "re_3OiqTaGkyVbTBiYe0K4k5Khy", - "object": "refund", - "amount": 1000, - "balance_transaction": "txn_3OiqTaGkyVbTBiYe09TPiL12", - "charge": "ch_3OiqTaGkyVbTBiYe0O6Hj6zD", - "created": 1707709602, - "currency": "aud", - "destination_details": { - "card": { - "reference_status": "pending", - "reference_type": "acquirer_reference_number", - "type": "refund" - }, - "type": "card" - }, - "metadata": {}, - "payment_intent": "pi_3OiqTaGkyVbTBiYe0nUcBPZV", - "reason": null, - "receipt_number": null, - "source_transfer_reversal": null, - "status": "succeeded", - "transfer_reversal": null - } - ], - "has_more": false, - "total_count": 1, - "url": "/v1/charges/ch_3OiqTaGkyVbTBiYe0O6Hj6zD/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": 1707709602, - "currency": "aud", - "destination_details": { - "card": { - "reference_status": "pending", - "reference_type": "acquirer_reference_number", - "type": "refund" - }, - "type": "card" - }, - "metadata": {}, - "payment_intent": "pi_3OiqTaGkyVbTBiYe0nUcBPZV", - "reason": null, - "receipt_number": null, - "source_transfer_reversal": null, - "status": "succeeded", - "transfer_reversal": null - } - recorded_at: Mon, 12 Feb 2024 03:46:42 GMT -recorded_with: VCR 6.2.0 diff --git a/spec/fixtures/vcr_cassettes/Stripe-v10.2.0/Spree_Gateway_StripeSCA/_void/with_a_voidable_payment/void_the_payment.yml b/spec/fixtures/vcr_cassettes/Stripe-v10.2.0/Spree_Gateway_StripeSCA/_void/with_a_voidable_payment/void_the_payment.yml deleted file mode 100644 index 24fb9dc483..0000000000 --- a/spec/fixtures/vcr_cassettes/Stripe-v10.2.0/Spree_Gateway_StripeSCA/_void/with_a_voidable_payment/void_the_payment.yml +++ /dev/null @@ -1,524 +0,0 @@ ---- -http_interactions: -- 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.2.0 - Authorization: - - Bearer - Content-Type: - - application/x-www-form-urlencoded - X-Stripe-Client-Telemetry: - - '{"last_request_metrics":{"request_id":"req_bkByviWmLTQOfW","request_duration_ms":359}}' - Stripe-Version: - - '2023-10-16' - X-Stripe-Client-User-Agent: - - '{"bindings_version":"10.2.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, 12 Feb 2024 03:46:43 GMT - Content-Type: - - application/json - Content-Length: - - '942' - 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_XABjvmIDq8zdLB - Stripe-Version: - - '2023-10-16' - Vary: - - Origin - X-Stripe-Non-Api-Overhead-Duration-Ms: - - '167.0' - X-Stripe-Routing-Context-Priority-Tier: - - api-testmode - Strict-Transport-Security: - - max-age=63072000; includeSubDomains; preload - body: - encoding: UTF-8 - string: |- - { - "id": "pm_1OiqTfGkyVbTBiYe3NHcuFzj", - "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", - "exp_month": 2, - "exp_year": 2025, - "fingerprint": "1Zr75a6zBSZLu0Zp", - "funding": "credit", - "generated_from": null, - "last4": "4444", - "networks": { - "available": [ - "mastercard" - ], - "preferred": null - }, - "three_d_secure_usage": { - "supported": true - }, - "wallet": null - }, - "created": 1707709603, - "customer": null, - "livemode": false, - "metadata": {}, - "type": "card" - } - recorded_at: Mon, 12 Feb 2024 03:46:43 GMT -- request: - method: post - uri: https://api.stripe.com/v1/payment_intents - body: - encoding: UTF-8 - string: amount=1000¤cy=aud&payment_method=pm_1OiqTfGkyVbTBiYe3NHcuFzj&payment_method_types[0]=card&capture_method=manual - headers: - User-Agent: - - Stripe/v1 RubyBindings/10.2.0 - Authorization: - - Bearer - Content-Type: - - application/x-www-form-urlencoded - X-Stripe-Client-Telemetry: - - '{"last_request_metrics":{"request_id":"req_XABjvmIDq8zdLB","request_duration_ms":484}}' - Stripe-Version: - - '2023-10-16' - X-Stripe-Client-User-Agent: - - '{"bindings_version":"10.2.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, 12 Feb 2024 03:46:44 GMT - Content-Type: - - application/json - Content-Length: - - '1344' - 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: - - 5e88c180-041d-449f-821d-34f26e16ca9e - Original-Request: - - req_tQWBPCGhiMCP0g - Request-Id: - - req_tQWBPCGhiMCP0g - Stripe-Should-Retry: - - 'false' - Stripe-Version: - - '2023-10-16' - Vary: - - Origin - X-Stripe-Non-Api-Overhead-Duration-Ms: - - '193.0' - X-Stripe-Routing-Context-Priority-Tier: - - api-testmode - Strict-Transport-Security: - - max-age=63072000; includeSubDomains; preload - body: - encoding: UTF-8 - string: |- - { - "id": "pi_3OiqTgGkyVbTBiYe0de0qJ91", - "object": "payment_intent", - "amount": 1000, - "amount_capturable": 0, - "amount_details": { - "tip": {} - }, - "amount_received": 0, - "application": null, - "application_fee_amount": null, - "automatic_payment_methods": null, - "canceled_at": null, - "cancellation_reason": null, - "capture_method": "manual", - "client_secret": "pi_3OiqTgGkyVbTBiYe0de0qJ91_secret_d6ozPrnET7mJAXHuW1mZlOxB6", - "confirmation_method": "automatic", - "created": 1707709604, - "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_1OiqTfGkyVbTBiYe3NHcuFzj", - "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, 12 Feb 2024 03:46:44 GMT -- request: - method: get - uri: https://api.stripe.com/v1/payment_intents/pi_3OiqTgGkyVbTBiYe0de0qJ91 - body: - encoding: US-ASCII - string: '' - headers: - User-Agent: - - Stripe/v1 RubyBindings/10.2.0 - Authorization: - - Bearer - Content-Type: - - application/x-www-form-urlencoded - X-Stripe-Client-Telemetry: - - '{"last_request_metrics":{"request_id":"req_tQWBPCGhiMCP0g","request_duration_ms":509}}' - Stripe-Version: - - '2023-10-16' - X-Stripe-Client-User-Agent: - - '{"bindings_version":"10.2.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, 12 Feb 2024 03:46:44 GMT - Content-Type: - - application/json - Content-Length: - - '1344' - 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_3zPIl85xE98iJP - Stripe-Version: - - '2023-10-16' - Vary: - - Origin - X-Stripe-Non-Api-Overhead-Duration-Ms: - - '63.0' - X-Stripe-Routing-Context-Priority-Tier: - - api-testmode - Strict-Transport-Security: - - max-age=63072000; includeSubDomains; preload - body: - encoding: UTF-8 - string: |- - { - "id": "pi_3OiqTgGkyVbTBiYe0de0qJ91", - "object": "payment_intent", - "amount": 1000, - "amount_capturable": 0, - "amount_details": { - "tip": {} - }, - "amount_received": 0, - "application": null, - "application_fee_amount": null, - "automatic_payment_methods": null, - "canceled_at": null, - "cancellation_reason": null, - "capture_method": "manual", - "client_secret": "pi_3OiqTgGkyVbTBiYe0de0qJ91_secret_d6ozPrnET7mJAXHuW1mZlOxB6", - "confirmation_method": "automatic", - "created": 1707709604, - "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_1OiqTfGkyVbTBiYe3NHcuFzj", - "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, 12 Feb 2024 03:46:44 GMT -- request: - method: post - uri: https://api.stripe.com/v1/payment_intents/pi_3OiqTgGkyVbTBiYe0de0qJ91/cancel - body: - encoding: US-ASCII - string: '' - headers: - Content-Type: - - application/x-www-form-urlencoded - Authorization: - - Basic c2tfdGVzdF9HRlFXMnU4c2xsbmxBTzYxN2FUODFRdko6 - 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}' - 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, 12 Feb 2024 03:46:45 GMT - Content-Type: - - application/json - Content-Length: - - '1508' - 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: - - dd6026b4-78e9-49c7-a4af-365d48f10eb8 - Original-Request: - - req_Ez0PQVQfU8IYRv - Request-Id: - - req_Ez0PQVQfU8IYRv - 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_3OiqTgGkyVbTBiYe0de0qJ91", - "object": "payment_intent", - "amount": 1000, - "amount_capturable": 0, - "amount_details": { - "tip": {} - }, - "amount_received": 0, - "application": null, - "application_fee_amount": null, - "automatic_payment_methods": null, - "canceled_at": 1707709605, - "cancellation_reason": null, - "capture_method": "manual", - "charges": { - "object": "list", - "data": [], - "has_more": false, - "total_count": 0, - "url": "/v1/charges?payment_intent=pi_3OiqTgGkyVbTBiYe0de0qJ91" - }, - "client_secret": "pi_3OiqTgGkyVbTBiYe0de0qJ91_secret_d6ozPrnET7mJAXHuW1mZlOxB6", - "confirmation_method": "automatic", - "created": 1707709604, - "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_1OiqTfGkyVbTBiYe3NHcuFzj", - "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, 12 Feb 2024 03:46:45 GMT -recorded_with: VCR 6.2.0 diff --git a/spec/fixtures/vcr_cassettes/Stripe-v10.6.0/Spree_Gateway_StripeSCA/_credit/refunds_the_payment.yml b/spec/fixtures/vcr_cassettes/Stripe-v10.8.0/Spree_Gateway_StripeSCA/_credit/refunds_the_payment.yml similarity index 73% rename from spec/fixtures/vcr_cassettes/Stripe-v10.6.0/Spree_Gateway_StripeSCA/_credit/refunds_the_payment.yml rename to spec/fixtures/vcr_cassettes/Stripe-v10.8.0/Spree_Gateway_StripeSCA/_credit/refunds_the_payment.yml index aa9e288fb5..f3ee211836 100644 --- a/spec/fixtures/vcr_cassettes/Stripe-v10.6.0/Spree_Gateway_StripeSCA/_credit/refunds_the_payment.yml +++ b/spec/fixtures/vcr_cassettes/Stripe-v10.8.0/Spree_Gateway_StripeSCA/_credit/refunds_the_payment.yml @@ -8,15 +8,17 @@ http_interactions: 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.6.0 + - Stripe/v1 RubyBindings/10.8.0 Authorization: - Bearer Content-Type: - application/x-www-form-urlencoded + X-Stripe-Client-Telemetry: + - '{"last_request_metrics":{"request_id":"req_PnWqcN06vWvMR9","request_duration_ms":411}}' Stripe-Version: - '2023-10-16' X-Stripe-Client-User-Agent: - - '{"bindings_version":"10.6.0","lang":"ruby","lang_version":"3.1.4 p223 (2023-03-30)","platform":"x86_64-linux","engine":"ruby","publisher":"stripe","uname":"Linux + - '{"bindings_version":"10.8.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"}' @@ -34,7 +36,7 @@ http_interactions: Server: - nginx Date: - - Mon, 12 Feb 2024 23:40:33 GMT + - Wed, 14 Feb 2024 03:18:36 GMT Content-Type: - application/json Content-Length: @@ -59,11 +61,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: - - 2df83cff-6b9e-4b69-a8d6-3a29ae896132 + - 162c4776-cf5c-4796-a217-bb655e612276 Original-Request: - - req_qlmSU2gDZApvRn + - req_t5o3NvgtXE4esg Request-Id: - - req_qlmSU2gDZApvRn + - req_t5o3NvgtXE4esg Stripe-Account: - acct_1OhZ9lQQeZbvfZRJ Stripe-Should-Retry: @@ -80,7 +82,7 @@ http_interactions: encoding: UTF-8 string: |- { - "id": "pi_3Oj96yQQeZbvfZRJ1mJK3wjg", + "id": "pi_3OjYzXQQeZbvfZRJ1j1ruUY5", "object": "payment_intent", "amount": 1000, "amount_capturable": 0, @@ -94,20 +96,20 @@ http_interactions: "canceled_at": null, "cancellation_reason": null, "capture_method": "automatic", - "client_secret": "pi_3Oj96yQQeZbvfZRJ1mJK3wjg_secret_gYuztzQD3aI900vCqWTwV0Tqa", + "client_secret": "pi_3OjYzXQQeZbvfZRJ1j1ruUY5_secret_vRIuwF8JpnLz26yrZwfV6Dw8o", "confirmation_method": "automatic", - "created": 1707781232, + "created": 1707880715, "currency": "aud", "customer": null, "description": null, "invoice": null, "last_payment_error": null, - "latest_charge": "ch_3Oj96yQQeZbvfZRJ1eu9nqj8", + "latest_charge": "ch_3OjYzXQQeZbvfZRJ19NYrLHA", "livemode": false, "metadata": {}, "next_action": null, "on_behalf_of": null, - "payment_method": "pm_1Oj96yQQeZbvfZRJ0rDYJTvm", + "payment_method": "pm_1OjYzXQQeZbvfZRJYMx81X2A", "payment_method_configuration_details": null, "payment_method_options": { "card": { @@ -132,130 +134,10 @@ http_interactions: "transfer_data": null, "transfer_group": null } - recorded_at: Mon, 12 Feb 2024 23:40:33 GMT + recorded_at: Wed, 14 Feb 2024 03:18:37 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.6.0 - Authorization: - - Bearer - Content-Type: - - application/x-www-form-urlencoded - X-Stripe-Client-Telemetry: - - '{"last_request_metrics":{"request_id":"req_qlmSU2gDZApvRn","request_duration_ms":1569}}' - Stripe-Version: - - '2023-10-16' - X-Stripe-Client-User-Agent: - - '{"bindings_version":"10.6.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, 12 Feb 2024 23:40:34 GMT - Content-Type: - - application/json - Content-Length: - - '942' - 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_080Zj6If1DAG4Q - 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_1Oj970KuuB1fWySneY4k7dE5", - "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", - "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": 1707781234, - "customer": null, - "livemode": false, - "metadata": {}, - "type": "card" - } - recorded_at: Mon, 12 Feb 2024 23:40:34 GMT -- request: - method: get - uri: https://api.stripe.com/v1/payment_intents/pi_3Oj96yQQeZbvfZRJ1mJK3wjg + uri: https://api.stripe.com/v1/payment_intents/pi_3OjYzXQQeZbvfZRJ1j1ruUY5 body: encoding: US-ASCII string: '' @@ -286,7 +168,7 @@ http_interactions: Server: - nginx Date: - - Mon, 12 Feb 2024 23:40:35 GMT + - Wed, 14 Feb 2024 03:18:37 GMT Content-Type: - application/json Content-Length: @@ -312,7 +194,7 @@ http_interactions: 'none'; frame-ancestors 'none'; img-src 'self'; script-src 'self' 'report-sample'; style-src 'self' Request-Id: - - req_V4N2hQ53av2Y7Z + - req_LT0o6jALXIeEGV Stripe-Account: - acct_1OhZ9lQQeZbvfZRJ Stripe-Version: @@ -327,7 +209,7 @@ http_interactions: encoding: UTF-8 string: |- { - "id": "pi_3Oj96yQQeZbvfZRJ1mJK3wjg", + "id": "pi_3OjYzXQQeZbvfZRJ1j1ruUY5", "object": "payment_intent", "amount": 1000, "amount_capturable": 0, @@ -345,7 +227,7 @@ http_interactions: "object": "list", "data": [ { - "id": "ch_3Oj96yQQeZbvfZRJ1eu9nqj8", + "id": "ch_3OjYzXQQeZbvfZRJ19NYrLHA", "object": "charge", "amount": 1000, "amount_captured": 1000, @@ -353,7 +235,7 @@ http_interactions: "application": "", "application_fee": null, "application_fee_amount": null, - "balance_transaction": "txn_3Oj96yQQeZbvfZRJ1RsK34U6", + "balance_transaction": "txn_3OjYzXQQeZbvfZRJ1GsCEqjS", "billing_details": { "address": { "city": null, @@ -369,7 +251,7 @@ http_interactions: }, "calculated_statement_descriptor": "OFNOFNOFN", "captured": true, - "created": 1707781232, + "created": 1707880716, "currency": "aud", "customer": null, "description": null, @@ -389,13 +271,13 @@ http_interactions: "network_status": "approved_by_network", "reason": null, "risk_level": "normal", - "risk_score": 36, + "risk_score": 26, "seller_message": "Payment complete.", "type": "authorized" }, "paid": true, - "payment_intent": "pi_3Oj96yQQeZbvfZRJ1mJK3wjg", - "payment_method": "pm_1Oj96yQQeZbvfZRJ0rDYJTvm", + "payment_intent": "pi_3OjYzXQQeZbvfZRJ1j1ruUY5", + "payment_method": "pm_1OjYzXQQeZbvfZRJYMx81X2A", "payment_method_details": { "card": { "amount_authorized": 1000, @@ -438,14 +320,14 @@ http_interactions: "radar_options": {}, "receipt_email": null, "receipt_number": null, - "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xT2haOWxRUWVaYnZmWlJKKPPYqq4GMgbBqrOsaAA6LBbntbfnCS4i_BCTrINWH_iO8IhhvEcUo4NzHmV6T6gBL9XSdNg-1LvMV5fe", + "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xT2haOWxRUWVaYnZmWlJKKI3isK4GMgY_HCUfdyE6LBZd0oRsqmQJIXTqN-eOQDNIrEI0HnrxkpbbvqNdWZiAD7qGeAol3jjYdokB", "refunded": false, "refunds": { "object": "list", "data": [], "has_more": false, "total_count": 0, - "url": "/v1/charges/ch_3Oj96yQQeZbvfZRJ1eu9nqj8/refunds" + "url": "/v1/charges/ch_3OjYzXQQeZbvfZRJ19NYrLHA/refunds" }, "review": null, "shipping": null, @@ -460,22 +342,22 @@ http_interactions: ], "has_more": false, "total_count": 1, - "url": "/v1/charges?payment_intent=pi_3Oj96yQQeZbvfZRJ1mJK3wjg" + "url": "/v1/charges?payment_intent=pi_3OjYzXQQeZbvfZRJ1j1ruUY5" }, - "client_secret": "pi_3Oj96yQQeZbvfZRJ1mJK3wjg_secret_gYuztzQD3aI900vCqWTwV0Tqa", + "client_secret": "pi_3OjYzXQQeZbvfZRJ1j1ruUY5_secret_vRIuwF8JpnLz26yrZwfV6Dw8o", "confirmation_method": "automatic", - "created": 1707781232, + "created": 1707880715, "currency": "aud", "customer": null, "description": null, "invoice": null, "last_payment_error": null, - "latest_charge": "ch_3Oj96yQQeZbvfZRJ1eu9nqj8", + "latest_charge": "ch_3OjYzXQQeZbvfZRJ19NYrLHA", "livemode": false, "metadata": {}, "next_action": null, "on_behalf_of": null, - "payment_method": "pm_1Oj96yQQeZbvfZRJ0rDYJTvm", + "payment_method": "pm_1OjYzXQQeZbvfZRJYMx81X2A", "payment_method_configuration_details": null, "payment_method_options": { "card": { @@ -500,10 +382,10 @@ http_interactions: "transfer_data": null, "transfer_group": null } - recorded_at: Mon, 12 Feb 2024 23:40:35 GMT + recorded_at: Wed, 14 Feb 2024 03:18:37 GMT - request: method: post - uri: https://api.stripe.com/v1/charges/ch_3Oj96yQQeZbvfZRJ1eu9nqj8/refunds + uri: https://api.stripe.com/v1/charges/ch_3OjYzXQQeZbvfZRJ19NYrLHA/refunds body: encoding: UTF-8 string: amount=1000&expand[0]=charge @@ -536,7 +418,7 @@ http_interactions: Server: - nginx Date: - - Mon, 12 Feb 2024 23:40:37 GMT + - Wed, 14 Feb 2024 03:18:38 GMT Content-Type: - application/json Content-Length: @@ -562,11 +444,11 @@ http_interactions: 'none'; frame-ancestors 'none'; img-src 'self'; script-src 'self' 'report-sample'; style-src 'self' Idempotency-Key: - - 45259ce6-403c-4e58-814e-f5d9a8408b20 + - e56daa83-ded4-4bcb-870d-92fffe95b1d3 Original-Request: - - req_YAl5fRQ21daQPA + - req_xesaGuCPCy5q9O Request-Id: - - req_YAl5fRQ21daQPA + - req_xesaGuCPCy5q9O Stripe-Account: - acct_1OhZ9lQQeZbvfZRJ Stripe-Should-Retry: @@ -583,12 +465,12 @@ http_interactions: encoding: UTF-8 string: |- { - "id": "re_3Oj96yQQeZbvfZRJ1g0CJ9FL", + "id": "re_3OjYzXQQeZbvfZRJ1mvEuIT9", "object": "refund", "amount": 1000, - "balance_transaction": "txn_3Oj96yQQeZbvfZRJ1jHrLFL1", + "balance_transaction": "txn_3OjYzXQQeZbvfZRJ1Mrm6k4L", "charge": { - "id": "ch_3Oj96yQQeZbvfZRJ1eu9nqj8", + "id": "ch_3OjYzXQQeZbvfZRJ19NYrLHA", "object": "charge", "amount": 1000, "amount_captured": 1000, @@ -596,7 +478,7 @@ http_interactions: "application": "", "application_fee": null, "application_fee_amount": null, - "balance_transaction": "txn_3Oj96yQQeZbvfZRJ1RsK34U6", + "balance_transaction": "txn_3OjYzXQQeZbvfZRJ1GsCEqjS", "billing_details": { "address": { "city": null, @@ -612,7 +494,7 @@ http_interactions: }, "calculated_statement_descriptor": "OFNOFNOFN", "captured": true, - "created": 1707781232, + "created": 1707880716, "currency": "aud", "customer": null, "description": null, @@ -632,13 +514,13 @@ http_interactions: "network_status": "approved_by_network", "reason": null, "risk_level": "normal", - "risk_score": 36, + "risk_score": 26, "seller_message": "Payment complete.", "type": "authorized" }, "paid": true, - "payment_intent": "pi_3Oj96yQQeZbvfZRJ1mJK3wjg", - "payment_method": "pm_1Oj96yQQeZbvfZRJ0rDYJTvm", + "payment_intent": "pi_3OjYzXQQeZbvfZRJ1j1ruUY5", + "payment_method": "pm_1OjYzXQQeZbvfZRJYMx81X2A", "payment_method_details": { "card": { "amount_authorized": 1000, @@ -681,18 +563,18 @@ http_interactions: "radar_options": {}, "receipt_email": null, "receipt_number": null, - "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xT2haOWxRUWVaYnZmWlJKKPTYqq4GMgZQqAj4ctc6LBbgm76DRSrCQ4pX8VSrXuiayuVxdn1a0v3rX62vwWWKBuWFTGIKRS5Rfctx", + "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xT2haOWxRUWVaYnZmWlJKKI7isK4GMgaV5COlGVo6LBYjTJOdJa9CuJnMR5Eg_gBt7975GIO67Zbbfrct_HakXl5lNGalmw-bF_E4", "refunded": true, "refunds": { "object": "list", "data": [ { - "id": "re_3Oj96yQQeZbvfZRJ1g0CJ9FL", + "id": "re_3OjYzXQQeZbvfZRJ1mvEuIT9", "object": "refund", "amount": 1000, - "balance_transaction": "txn_3Oj96yQQeZbvfZRJ1jHrLFL1", - "charge": "ch_3Oj96yQQeZbvfZRJ1eu9nqj8", - "created": 1707781236, + "balance_transaction": "txn_3OjYzXQQeZbvfZRJ1Mrm6k4L", + "charge": "ch_3OjYzXQQeZbvfZRJ19NYrLHA", + "created": 1707880718, "currency": "aud", "destination_details": { "card": { @@ -703,7 +585,7 @@ http_interactions: "type": "card" }, "metadata": {}, - "payment_intent": "pi_3Oj96yQQeZbvfZRJ1mJK3wjg", + "payment_intent": "pi_3OjYzXQQeZbvfZRJ1j1ruUY5", "reason": null, "receipt_number": null, "source_transfer_reversal": null, @@ -713,7 +595,7 @@ http_interactions: ], "has_more": false, "total_count": 1, - "url": "/v1/charges/ch_3Oj96yQQeZbvfZRJ1eu9nqj8/refunds" + "url": "/v1/charges/ch_3OjYzXQQeZbvfZRJ19NYrLHA/refunds" }, "review": null, "shipping": null, @@ -725,7 +607,7 @@ http_interactions: "transfer_data": null, "transfer_group": null }, - "created": 1707781236, + "created": 1707880718, "currency": "aud", "destination_details": { "card": { @@ -736,12 +618,12 @@ http_interactions: "type": "card" }, "metadata": {}, - "payment_intent": "pi_3Oj96yQQeZbvfZRJ1mJK3wjg", + "payment_intent": "pi_3OjYzXQQeZbvfZRJ1j1ruUY5", "reason": null, "receipt_number": null, "source_transfer_reversal": null, "status": "succeeded", "transfer_reversal": null } - recorded_at: Mon, 12 Feb 2024 23:40:37 GMT + recorded_at: Wed, 14 Feb 2024 03:18:39 GMT recorded_with: VCR 6.2.0 diff --git a/spec/fixtures/vcr_cassettes/Stripe-v10.6.0/Spree_Gateway_StripeSCA/_void/with_a_confirmed_payment/refunds_the_payment.yml b/spec/fixtures/vcr_cassettes/Stripe-v10.8.0/Spree_Gateway_StripeSCA/_void/with_a_confirmed_payment/refunds_the_payment.yml similarity index 86% rename from spec/fixtures/vcr_cassettes/Stripe-v10.6.0/Spree_Gateway_StripeSCA/_void/with_a_confirmed_payment/refunds_the_payment.yml rename to spec/fixtures/vcr_cassettes/Stripe-v10.8.0/Spree_Gateway_StripeSCA/_void/with_a_confirmed_payment/refunds_the_payment.yml index 91615dbb4a..9b4ad95685 100644 --- a/spec/fixtures/vcr_cassettes/Stripe-v10.6.0/Spree_Gateway_StripeSCA/_void/with_a_confirmed_payment/refunds_the_payment.yml +++ b/spec/fixtures/vcr_cassettes/Stripe-v10.8.0/Spree_Gateway_StripeSCA/_void/with_a_confirmed_payment/refunds_the_payment.yml @@ -8,15 +8,17 @@ http_interactions: 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.6.0 + - Stripe/v1 RubyBindings/10.8.0 Authorization: - Bearer Content-Type: - application/x-www-form-urlencoded + X-Stripe-Client-Telemetry: + - '{"last_request_metrics":{"request_id":"req_RQ4tnyZMxaTrfg","request_duration_ms":1}}' Stripe-Version: - '2023-10-16' X-Stripe-Client-User-Agent: - - '{"bindings_version":"10.6.0","lang":"ruby","lang_version":"3.1.4 p223 (2023-03-30)","platform":"x86_64-linux","engine":"ruby","publisher":"stripe","uname":"Linux + - '{"bindings_version":"10.8.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"}' @@ -34,7 +36,7 @@ http_interactions: Server: - nginx Date: - - Mon, 12 Feb 2024 22:53:08 GMT + - Wed, 14 Feb 2024 03:18:29 GMT Content-Type: - application/json Content-Length: @@ -59,11 +61,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: - - 9f9ede9d-96ac-4441-b545-e1eb438336d2 + - e865bd69-4374-4e2e-9542-96af5f6daab7 Original-Request: - - req_lB6oA68zTMJrpJ + - req_SJe2N6YBjv0snw Request-Id: - - req_lB6oA68zTMJrpJ + - req_SJe2N6YBjv0snw Stripe-Account: - acct_1OhZ9lQQeZbvfZRJ Stripe-Should-Retry: @@ -80,7 +82,7 @@ http_interactions: encoding: UTF-8 string: |- { - "id": "pi_3Oj8N5QQeZbvfZRJ0DWbfoMx", + "id": "pi_3OjYzQQQeZbvfZRJ1ZfpFZtt", "object": "payment_intent", "amount": 1000, "amount_capturable": 0, @@ -94,20 +96,20 @@ http_interactions: "canceled_at": null, "cancellation_reason": null, "capture_method": "automatic", - "client_secret": "pi_3Oj8N5QQeZbvfZRJ0DWbfoMx_secret_nvjdOSvBf3LuhqkJsaRlmiouk", + "client_secret": "pi_3OjYzQQQeZbvfZRJ1ZfpFZtt_secret_DDNSlzw1M5FiivpZsr8w1C9Pq", "confirmation_method": "automatic", - "created": 1707778387, + "created": 1707880708, "currency": "aud", "customer": null, "description": null, "invoice": null, "last_payment_error": null, - "latest_charge": "ch_3Oj8N5QQeZbvfZRJ0jNdFIT8", + "latest_charge": "ch_3OjYzQQQeZbvfZRJ1agdI8ZG", "livemode": false, "metadata": {}, "next_action": null, "on_behalf_of": null, - "payment_method": "pm_1Oj8N5QQeZbvfZRJQ6Qh4CtB", + "payment_method": "pm_1OjYzQQQeZbvfZRJevczQ3ja", "payment_method_configuration_details": null, "payment_method_options": { "card": { @@ -132,7 +134,7 @@ http_interactions: "transfer_data": null, "transfer_group": null } - recorded_at: Mon, 12 Feb 2024 22:53:09 GMT + recorded_at: Wed, 14 Feb 2024 03:18:29 GMT - request: method: get uri: https://api.stripe.com/v1/payment_methods/pm_card_mastercard @@ -141,17 +143,17 @@ http_interactions: string: '' headers: User-Agent: - - Stripe/v1 RubyBindings/10.6.0 + - Stripe/v1 RubyBindings/10.8.0 Authorization: - Bearer Content-Type: - application/x-www-form-urlencoded X-Stripe-Client-Telemetry: - - '{"last_request_metrics":{"request_id":"req_lB6oA68zTMJrpJ","request_duration_ms":1832}}' + - '{"last_request_metrics":{"request_id":"req_SJe2N6YBjv0snw","request_duration_ms":1697}}' Stripe-Version: - '2023-10-16' X-Stripe-Client-User-Agent: - - '{"bindings_version":"10.6.0","lang":"ruby","lang_version":"3.1.4 p223 (2023-03-30)","platform":"x86_64-linux","engine":"ruby","publisher":"stripe","uname":"Linux + - '{"bindings_version":"10.8.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"}' @@ -167,7 +169,7 @@ http_interactions: Server: - nginx Date: - - Mon, 12 Feb 2024 22:53:11 GMT + - Wed, 14 Feb 2024 03:18:30 GMT Content-Type: - application/json Content-Length: @@ -193,7 +195,7 @@ http_interactions: 'none'; frame-ancestors 'none'; img-src 'self'; script-src 'self' 'report-sample'; style-src 'self' Request-Id: - - req_MPSEbWRjRHc1xo + - req_5rWKkeAfNF1e2K Stripe-Version: - '2023-10-16' Vary: @@ -206,7 +208,7 @@ http_interactions: encoding: UTF-8 string: |- { - "id": "pm_1Oj8N8KuuB1fWySnY2lqbAGk", + "id": "pm_1OjYzSKuuB1fWySn6gTcoyG9", "object": "payment_method", "billing_details": { "address": { @@ -246,32 +248,32 @@ http_interactions: }, "wallet": null }, - "created": 1707778390, + "created": 1707880710, "customer": null, "livemode": false, "metadata": {}, "type": "card" } - recorded_at: Mon, 12 Feb 2024 22:53:11 GMT + recorded_at: Wed, 14 Feb 2024 03:18:30 GMT - request: method: get - uri: https://api.stripe.com/v1/payment_intents/pi_3Oj8N5QQeZbvfZRJ0DWbfoMx + uri: https://api.stripe.com/v1/payment_intents/pi_3OjYzQQQeZbvfZRJ1ZfpFZtt body: encoding: US-ASCII string: '' headers: User-Agent: - - Stripe/v1 RubyBindings/10.6.0 + - Stripe/v1 RubyBindings/10.8.0 Authorization: - Bearer Content-Type: - application/x-www-form-urlencoded X-Stripe-Client-Telemetry: - - '{"last_request_metrics":{"request_id":"req_MPSEbWRjRHc1xo","request_duration_ms":1078}}' + - '{"last_request_metrics":{"request_id":"req_5rWKkeAfNF1e2K","request_duration_ms":454}}' Stripe-Version: - '2023-10-16' X-Stripe-Client-User-Agent: - - '{"bindings_version":"10.6.0","lang":"ruby","lang_version":"3.1.4 p223 (2023-03-30)","platform":"x86_64-linux","engine":"ruby","publisher":"stripe","uname":"Linux + - '{"bindings_version":"10.8.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"}' @@ -289,7 +291,7 @@ http_interactions: Server: - nginx Date: - - Mon, 12 Feb 2024 22:53:11 GMT + - Wed, 14 Feb 2024 03:18:30 GMT Content-Type: - application/json Content-Length: @@ -315,7 +317,7 @@ http_interactions: 'none'; frame-ancestors 'none'; img-src 'self'; script-src 'self' 'report-sample'; style-src 'self' Request-Id: - - req_kqqjMU3wRPfz7h + - req_wxI46rAQyl4SSe Stripe-Account: - acct_1OhZ9lQQeZbvfZRJ Stripe-Version: @@ -330,7 +332,7 @@ http_interactions: encoding: UTF-8 string: |- { - "id": "pi_3Oj8N5QQeZbvfZRJ0DWbfoMx", + "id": "pi_3OjYzQQQeZbvfZRJ1ZfpFZtt", "object": "payment_intent", "amount": 1000, "amount_capturable": 0, @@ -344,20 +346,20 @@ http_interactions: "canceled_at": null, "cancellation_reason": null, "capture_method": "automatic", - "client_secret": "pi_3Oj8N5QQeZbvfZRJ0DWbfoMx_secret_nvjdOSvBf3LuhqkJsaRlmiouk", + "client_secret": "pi_3OjYzQQQeZbvfZRJ1ZfpFZtt_secret_DDNSlzw1M5FiivpZsr8w1C9Pq", "confirmation_method": "automatic", - "created": 1707778387, + "created": 1707880708, "currency": "aud", "customer": null, "description": null, "invoice": null, "last_payment_error": null, - "latest_charge": "ch_3Oj8N5QQeZbvfZRJ0jNdFIT8", + "latest_charge": "ch_3OjYzQQQeZbvfZRJ1agdI8ZG", "livemode": false, "metadata": {}, "next_action": null, "on_behalf_of": null, - "payment_method": "pm_1Oj8N5QQeZbvfZRJQ6Qh4CtB", + "payment_method": "pm_1OjYzQQQeZbvfZRJevczQ3ja", "payment_method_configuration_details": null, "payment_method_options": { "card": { @@ -382,10 +384,10 @@ http_interactions: "transfer_data": null, "transfer_group": null } - recorded_at: Mon, 12 Feb 2024 22:53:11 GMT + recorded_at: Wed, 14 Feb 2024 03:18:30 GMT - request: method: get - uri: https://api.stripe.com/v1/payment_intents/pi_3Oj8N5QQeZbvfZRJ0DWbfoMx + uri: https://api.stripe.com/v1/payment_intents/pi_3OjYzQQQeZbvfZRJ1ZfpFZtt body: encoding: US-ASCII string: '' @@ -416,11 +418,11 @@ http_interactions: Server: - nginx Date: - - Mon, 12 Feb 2024 22:53:12 GMT + - Wed, 14 Feb 2024 03:18:31 GMT Content-Type: - application/json Content-Length: - - '5159' + - '5160' Connection: - close Access-Control-Allow-Credentials: @@ -442,7 +444,7 @@ http_interactions: 'none'; frame-ancestors 'none'; img-src 'self'; script-src 'self' 'report-sample'; style-src 'self' Request-Id: - - req_2ZdR6OrOajgOec + - req_8eT2GT3KhocGtE Stripe-Account: - acct_1OhZ9lQQeZbvfZRJ Stripe-Version: @@ -457,7 +459,7 @@ http_interactions: encoding: UTF-8 string: |- { - "id": "pi_3Oj8N5QQeZbvfZRJ0DWbfoMx", + "id": "pi_3OjYzQQQeZbvfZRJ1ZfpFZtt", "object": "payment_intent", "amount": 1000, "amount_capturable": 0, @@ -475,7 +477,7 @@ http_interactions: "object": "list", "data": [ { - "id": "ch_3Oj8N5QQeZbvfZRJ0jNdFIT8", + "id": "ch_3OjYzQQQeZbvfZRJ1agdI8ZG", "object": "charge", "amount": 1000, "amount_captured": 1000, @@ -483,7 +485,7 @@ http_interactions: "application": "", "application_fee": null, "application_fee_amount": null, - "balance_transaction": "txn_3Oj8N5QQeZbvfZRJ0VVf4rtO", + "balance_transaction": "txn_3OjYzQQQeZbvfZRJ1rzq7WJf", "billing_details": { "address": { "city": null, @@ -499,7 +501,7 @@ http_interactions: }, "calculated_statement_descriptor": "OFNOFNOFN", "captured": true, - "created": 1707778388, + "created": 1707880708, "currency": "aud", "customer": null, "description": null, @@ -519,13 +521,13 @@ http_interactions: "network_status": "approved_by_network", "reason": null, "risk_level": "normal", - "risk_score": 0, + "risk_score": 12, "seller_message": "Payment complete.", "type": "authorized" }, "paid": true, - "payment_intent": "pi_3Oj8N5QQeZbvfZRJ0DWbfoMx", - "payment_method": "pm_1Oj8N5QQeZbvfZRJQ6Qh4CtB", + "payment_intent": "pi_3OjYzQQQeZbvfZRJ1ZfpFZtt", + "payment_method": "pm_1OjYzQQQeZbvfZRJevczQ3ja", "payment_method_details": { "card": { "amount_authorized": 1000, @@ -568,14 +570,14 @@ http_interactions: "radar_options": {}, "receipt_email": null, "receipt_number": null, - "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xT2haOWxRUWVaYnZmWlJKKNjCqq4GMgZz3nu_-qs6LBbP4HIvOO9vohwzYRZA73lI9cjv8LnAaahU-8StFSQ0AW4v1eUKfrTSCc8c", + "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xT2haOWxRUWVaYnZmWlJKKIfisK4GMgb5-TOPrLE6LBb_wjrOeEWzijpNMNdyZOt4LrIYtnRo4ZjRMaX-NqxyTdMnnWcQDt7-EAlo", "refunded": false, "refunds": { "object": "list", "data": [], "has_more": false, "total_count": 0, - "url": "/v1/charges/ch_3Oj8N5QQeZbvfZRJ0jNdFIT8/refunds" + "url": "/v1/charges/ch_3OjYzQQQeZbvfZRJ1agdI8ZG/refunds" }, "review": null, "shipping": null, @@ -590,22 +592,22 @@ http_interactions: ], "has_more": false, "total_count": 1, - "url": "/v1/charges?payment_intent=pi_3Oj8N5QQeZbvfZRJ0DWbfoMx" + "url": "/v1/charges?payment_intent=pi_3OjYzQQQeZbvfZRJ1ZfpFZtt" }, - "client_secret": "pi_3Oj8N5QQeZbvfZRJ0DWbfoMx_secret_nvjdOSvBf3LuhqkJsaRlmiouk", + "client_secret": "pi_3OjYzQQQeZbvfZRJ1ZfpFZtt_secret_DDNSlzw1M5FiivpZsr8w1C9Pq", "confirmation_method": "automatic", - "created": 1707778387, + "created": 1707880708, "currency": "aud", "customer": null, "description": null, "invoice": null, "last_payment_error": null, - "latest_charge": "ch_3Oj8N5QQeZbvfZRJ0jNdFIT8", + "latest_charge": "ch_3OjYzQQQeZbvfZRJ1agdI8ZG", "livemode": false, "metadata": {}, "next_action": null, "on_behalf_of": null, - "payment_method": "pm_1Oj8N5QQeZbvfZRJQ6Qh4CtB", + "payment_method": "pm_1OjYzQQQeZbvfZRJevczQ3ja", "payment_method_configuration_details": null, "payment_method_options": { "card": { @@ -630,10 +632,10 @@ http_interactions: "transfer_data": null, "transfer_group": null } - recorded_at: Mon, 12 Feb 2024 22:53:12 GMT + recorded_at: Wed, 14 Feb 2024 03:18:31 GMT - request: method: post - uri: https://api.stripe.com/v1/charges/ch_3Oj8N5QQeZbvfZRJ0jNdFIT8/refunds + uri: https://api.stripe.com/v1/charges/ch_3OjYzQQQeZbvfZRJ1agdI8ZG/refunds body: encoding: UTF-8 string: amount=1000&expand[0]=charge @@ -666,11 +668,11 @@ http_interactions: Server: - nginx Date: - - Mon, 12 Feb 2024 22:53:13 GMT + - Wed, 14 Feb 2024 03:18:32 GMT Content-Type: - application/json Content-Length: - - '4535' + - '4536' Connection: - close Access-Control-Allow-Credentials: @@ -692,11 +694,11 @@ http_interactions: 'none'; frame-ancestors 'none'; img-src 'self'; script-src 'self' 'report-sample'; style-src 'self' Idempotency-Key: - - cf4f970c-f6b3-4e76-b233-4eab0e385c71 + - c5612d0a-b27b-4611-8571-df184dfb4883 Original-Request: - - req_38Iu12IYZJwYz3 + - req_GSLFwegws0fu5O Request-Id: - - req_38Iu12IYZJwYz3 + - req_GSLFwegws0fu5O Stripe-Account: - acct_1OhZ9lQQeZbvfZRJ Stripe-Should-Retry: @@ -713,12 +715,12 @@ http_interactions: encoding: UTF-8 string: |- { - "id": "re_3Oj8N5QQeZbvfZRJ0x3xrJep", + "id": "re_3OjYzQQQeZbvfZRJ1XLkiMNb", "object": "refund", "amount": 1000, - "balance_transaction": "txn_3Oj8N5QQeZbvfZRJ0446g84e", + "balance_transaction": "txn_3OjYzQQQeZbvfZRJ1END2EXD", "charge": { - "id": "ch_3Oj8N5QQeZbvfZRJ0jNdFIT8", + "id": "ch_3OjYzQQQeZbvfZRJ1agdI8ZG", "object": "charge", "amount": 1000, "amount_captured": 1000, @@ -726,7 +728,7 @@ http_interactions: "application": "", "application_fee": null, "application_fee_amount": null, - "balance_transaction": "txn_3Oj8N5QQeZbvfZRJ0VVf4rtO", + "balance_transaction": "txn_3OjYzQQQeZbvfZRJ1rzq7WJf", "billing_details": { "address": { "city": null, @@ -742,7 +744,7 @@ http_interactions: }, "calculated_statement_descriptor": "OFNOFNOFN", "captured": true, - "created": 1707778388, + "created": 1707880708, "currency": "aud", "customer": null, "description": null, @@ -762,13 +764,13 @@ http_interactions: "network_status": "approved_by_network", "reason": null, "risk_level": "normal", - "risk_score": 0, + "risk_score": 12, "seller_message": "Payment complete.", "type": "authorized" }, "paid": true, - "payment_intent": "pi_3Oj8N5QQeZbvfZRJ0DWbfoMx", - "payment_method": "pm_1Oj8N5QQeZbvfZRJQ6Qh4CtB", + "payment_intent": "pi_3OjYzQQQeZbvfZRJ1ZfpFZtt", + "payment_method": "pm_1OjYzQQQeZbvfZRJevczQ3ja", "payment_method_details": { "card": { "amount_authorized": 1000, @@ -811,18 +813,18 @@ http_interactions: "radar_options": {}, "receipt_email": null, "receipt_number": null, - "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xT2haOWxRUWVaYnZmWlJKKNnCqq4GMgYb2YoorMU6LBZPiModP9pA5IE5ehBQl5Kwr5IwrCYjcU1OlRxOtlsEdsxBrK09r38JrH1o", + "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xT2haOWxRUWVaYnZmWlJKKIjisK4GMgZypb2pB6g6LBbF0B7_4nXvwqexHymit0cH1Fo3Kia6S2-A33YZ7GK8vHCldPf3XtBchtVJ", "refunded": true, "refunds": { "object": "list", "data": [ { - "id": "re_3Oj8N5QQeZbvfZRJ0x3xrJep", + "id": "re_3OjYzQQQeZbvfZRJ1XLkiMNb", "object": "refund", "amount": 1000, - "balance_transaction": "txn_3Oj8N5QQeZbvfZRJ0446g84e", - "charge": "ch_3Oj8N5QQeZbvfZRJ0jNdFIT8", - "created": 1707778392, + "balance_transaction": "txn_3OjYzQQQeZbvfZRJ1END2EXD", + "charge": "ch_3OjYzQQQeZbvfZRJ1agdI8ZG", + "created": 1707880712, "currency": "aud", "destination_details": { "card": { @@ -833,7 +835,7 @@ http_interactions: "type": "card" }, "metadata": {}, - "payment_intent": "pi_3Oj8N5QQeZbvfZRJ0DWbfoMx", + "payment_intent": "pi_3OjYzQQQeZbvfZRJ1ZfpFZtt", "reason": null, "receipt_number": null, "source_transfer_reversal": null, @@ -843,7 +845,7 @@ http_interactions: ], "has_more": false, "total_count": 1, - "url": "/v1/charges/ch_3Oj8N5QQeZbvfZRJ0jNdFIT8/refunds" + "url": "/v1/charges/ch_3OjYzQQQeZbvfZRJ1agdI8ZG/refunds" }, "review": null, "shipping": null, @@ -855,7 +857,7 @@ http_interactions: "transfer_data": null, "transfer_group": null }, - "created": 1707778392, + "created": 1707880712, "currency": "aud", "destination_details": { "card": { @@ -866,12 +868,12 @@ http_interactions: "type": "card" }, "metadata": {}, - "payment_intent": "pi_3Oj8N5QQeZbvfZRJ0DWbfoMx", + "payment_intent": "pi_3OjYzQQQeZbvfZRJ1ZfpFZtt", "reason": null, "receipt_number": null, "source_transfer_reversal": null, "status": "succeeded", "transfer_reversal": null } - recorded_at: Mon, 12 Feb 2024 22:53:13 GMT + recorded_at: Wed, 14 Feb 2024 03:18:32 GMT recorded_with: VCR 6.2.0 diff --git a/spec/fixtures/vcr_cassettes/Stripe-v10.6.0/Spree_Gateway_StripeSCA/_void/with_a_voidable_payment/void_the_payment.yml b/spec/fixtures/vcr_cassettes/Stripe-v10.8.0/Spree_Gateway_StripeSCA/_void/with_a_voidable_payment/void_the_payment.yml similarity index 87% rename from spec/fixtures/vcr_cassettes/Stripe-v10.6.0/Spree_Gateway_StripeSCA/_void/with_a_voidable_payment/void_the_payment.yml rename to spec/fixtures/vcr_cassettes/Stripe-v10.8.0/Spree_Gateway_StripeSCA/_void/with_a_voidable_payment/void_the_payment.yml index f8eb537ca2..9794336c76 100644 --- a/spec/fixtures/vcr_cassettes/Stripe-v10.6.0/Spree_Gateway_StripeSCA/_void/with_a_voidable_payment/void_the_payment.yml +++ b/spec/fixtures/vcr_cassettes/Stripe-v10.8.0/Spree_Gateway_StripeSCA/_void/with_a_voidable_payment/void_the_payment.yml @@ -8,17 +8,17 @@ http_interactions: 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.6.0 + - Stripe/v1 RubyBindings/10.8.0 Authorization: - Bearer Content-Type: - application/x-www-form-urlencoded X-Stripe-Client-Telemetry: - - '{"last_request_metrics":{"request_id":"req_kqqjMU3wRPfz7h","request_duration_ms":485}}' + - '{"last_request_metrics":{"request_id":"req_wxI46rAQyl4SSe","request_duration_ms":422}}' Stripe-Version: - '2023-10-16' X-Stripe-Client-User-Agent: - - '{"bindings_version":"10.6.0","lang":"ruby","lang_version":"3.1.4 p223 (2023-03-30)","platform":"x86_64-linux","engine":"ruby","publisher":"stripe","uname":"Linux + - '{"bindings_version":"10.8.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"}' @@ -36,7 +36,7 @@ http_interactions: Server: - nginx Date: - - Mon, 12 Feb 2024 22:53:14 GMT + - Wed, 14 Feb 2024 03:18:33 GMT Content-Type: - application/json Content-Length: @@ -61,11 +61,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: - - 816e3630-03dc-4f3a-b4c6-5e88e3322536 + - c58ef797-9bab-401e-ab3d-4df1bd2507d4 Original-Request: - - req_6jrnUl6aZNQxLk + - req_RHfHf6SxOfQFW5 Request-Id: - - req_6jrnUl6aZNQxLk + - req_RHfHf6SxOfQFW5 Stripe-Account: - acct_1OhZ9lQQeZbvfZRJ Stripe-Should-Retry: @@ -82,7 +82,7 @@ http_interactions: encoding: UTF-8 string: |- { - "id": "pi_3Oj8NCQQeZbvfZRJ1ahXc6sm", + "id": "pi_3OjYzVQQeZbvfZRJ0e0x2sws", "object": "payment_intent", "amount": 1000, "amount_capturable": 0, @@ -96,9 +96,9 @@ http_interactions: "canceled_at": null, "cancellation_reason": null, "capture_method": "manual", - "client_secret": "pi_3Oj8NCQQeZbvfZRJ1ahXc6sm_secret_S6BFb7CunuRZPNoXb2GSmSUsh", + "client_secret": "pi_3OjYzVQQeZbvfZRJ0e0x2sws_secret_p1V0dEyb3qeHYwrXdTzNu9cG8", "confirmation_method": "automatic", - "created": 1707778394, + "created": 1707880713, "currency": "aud", "customer": null, "description": null, @@ -109,7 +109,7 @@ http_interactions: "metadata": {}, "next_action": null, "on_behalf_of": null, - "payment_method": "pm_1Oj8NCQQeZbvfZRJUrdNo9RL", + "payment_method": "pm_1OjYzVQQeZbvfZRJl4Sv9a5X", "payment_method_configuration_details": null, "payment_method_options": { "card": { @@ -134,7 +134,7 @@ http_interactions: "transfer_data": null, "transfer_group": null } - recorded_at: Mon, 12 Feb 2024 22:53:14 GMT + recorded_at: Wed, 14 Feb 2024 03:18:33 GMT - request: method: get uri: https://api.stripe.com/v1/payment_methods/pm_card_mastercard @@ -143,17 +143,17 @@ http_interactions: string: '' headers: User-Agent: - - Stripe/v1 RubyBindings/10.6.0 + - Stripe/v1 RubyBindings/10.8.0 Authorization: - Bearer Content-Type: - application/x-www-form-urlencoded X-Stripe-Client-Telemetry: - - '{"last_request_metrics":{"request_id":"req_6jrnUl6aZNQxLk","request_duration_ms":572}}' + - '{"last_request_metrics":{"request_id":"req_RHfHf6SxOfQFW5","request_duration_ms":536}}' Stripe-Version: - '2023-10-16' X-Stripe-Client-User-Agent: - - '{"bindings_version":"10.6.0","lang":"ruby","lang_version":"3.1.4 p223 (2023-03-30)","platform":"x86_64-linux","engine":"ruby","publisher":"stripe","uname":"Linux + - '{"bindings_version":"10.8.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"}' @@ -169,7 +169,7 @@ http_interactions: Server: - nginx Date: - - Mon, 12 Feb 2024 22:53:15 GMT + - Wed, 14 Feb 2024 03:18:34 GMT Content-Type: - application/json Content-Length: @@ -195,7 +195,7 @@ http_interactions: 'none'; frame-ancestors 'none'; img-src 'self'; script-src 'self' 'report-sample'; style-src 'self' Request-Id: - - req_fiClXhKKwaSAmy + - req_4RtNXuFemQOv6L Stripe-Version: - '2023-10-16' Vary: @@ -208,7 +208,7 @@ http_interactions: encoding: UTF-8 string: |- { - "id": "pm_1Oj8NDKuuB1fWySnzaxDjTO2", + "id": "pm_1OjYzWKuuB1fWySneavPZ5WZ", "object": "payment_method", "billing_details": { "address": { @@ -248,32 +248,32 @@ http_interactions: }, "wallet": null }, - "created": 1707778395, + "created": 1707880714, "customer": null, "livemode": false, "metadata": {}, "type": "card" } - recorded_at: Mon, 12 Feb 2024 22:53:15 GMT + recorded_at: Wed, 14 Feb 2024 03:18:34 GMT - request: method: get - uri: https://api.stripe.com/v1/payment_intents/pi_3Oj8NCQQeZbvfZRJ1ahXc6sm + uri: https://api.stripe.com/v1/payment_intents/pi_3OjYzVQQeZbvfZRJ0e0x2sws body: encoding: US-ASCII string: '' headers: User-Agent: - - Stripe/v1 RubyBindings/10.6.0 + - Stripe/v1 RubyBindings/10.8.0 Authorization: - Bearer Content-Type: - application/x-www-form-urlencoded X-Stripe-Client-Telemetry: - - '{"last_request_metrics":{"request_id":"req_fiClXhKKwaSAmy","request_duration_ms":535}}' + - '{"last_request_metrics":{"request_id":"req_4RtNXuFemQOv6L","request_duration_ms":463}}' Stripe-Version: - '2023-10-16' X-Stripe-Client-User-Agent: - - '{"bindings_version":"10.6.0","lang":"ruby","lang_version":"3.1.4 p223 (2023-03-30)","platform":"x86_64-linux","engine":"ruby","publisher":"stripe","uname":"Linux + - '{"bindings_version":"10.8.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"}' @@ -291,7 +291,7 @@ http_interactions: Server: - nginx Date: - - Mon, 12 Feb 2024 22:53:15 GMT + - Wed, 14 Feb 2024 03:18:34 GMT Content-Type: - application/json Content-Length: @@ -317,7 +317,7 @@ http_interactions: 'none'; frame-ancestors 'none'; img-src 'self'; script-src 'self' 'report-sample'; style-src 'self' Request-Id: - - req_mclrPggiyKYO9S + - req_PnWqcN06vWvMR9 Stripe-Account: - acct_1OhZ9lQQeZbvfZRJ Stripe-Version: @@ -332,7 +332,7 @@ http_interactions: encoding: UTF-8 string: |- { - "id": "pi_3Oj8NCQQeZbvfZRJ1ahXc6sm", + "id": "pi_3OjYzVQQeZbvfZRJ0e0x2sws", "object": "payment_intent", "amount": 1000, "amount_capturable": 0, @@ -346,9 +346,9 @@ http_interactions: "canceled_at": null, "cancellation_reason": null, "capture_method": "manual", - "client_secret": "pi_3Oj8NCQQeZbvfZRJ1ahXc6sm_secret_S6BFb7CunuRZPNoXb2GSmSUsh", + "client_secret": "pi_3OjYzVQQeZbvfZRJ0e0x2sws_secret_p1V0dEyb3qeHYwrXdTzNu9cG8", "confirmation_method": "automatic", - "created": 1707778394, + "created": 1707880713, "currency": "aud", "customer": null, "description": null, @@ -359,7 +359,7 @@ http_interactions: "metadata": {}, "next_action": null, "on_behalf_of": null, - "payment_method": "pm_1Oj8NCQQeZbvfZRJUrdNo9RL", + "payment_method": "pm_1OjYzVQQeZbvfZRJl4Sv9a5X", "payment_method_configuration_details": null, "payment_method_options": { "card": { @@ -384,10 +384,10 @@ http_interactions: "transfer_data": null, "transfer_group": null } - recorded_at: Mon, 12 Feb 2024 22:53:15 GMT + recorded_at: Wed, 14 Feb 2024 03:18:34 GMT - request: method: post - uri: https://api.stripe.com/v1/payment_intents/pi_3Oj8NCQQeZbvfZRJ1ahXc6sm/cancel + uri: https://api.stripe.com/v1/payment_intents/pi_3OjYzVQQeZbvfZRJ0e0x2sws/cancel body: encoding: US-ASCII string: '' @@ -420,7 +420,7 @@ http_interactions: Server: - nginx Date: - - Mon, 12 Feb 2024 22:53:16 GMT + - Wed, 14 Feb 2024 03:18:35 GMT Content-Type: - application/json Content-Length: @@ -446,11 +446,11 @@ http_interactions: 'none'; frame-ancestors 'none'; img-src 'self'; script-src 'self' 'report-sample'; style-src 'self' Idempotency-Key: - - 3e00f853-05da-4290-86df-fad9bca9d5ea + - c527367d-ab3f-4141-9d50-2dadee2eb10d Original-Request: - - req_clYJJBeUWvA3Fe + - req_mgU0tpR5EE5dow Request-Id: - - req_clYJJBeUWvA3Fe + - req_mgU0tpR5EE5dow Stripe-Account: - acct_1OhZ9lQQeZbvfZRJ Stripe-Should-Retry: @@ -467,7 +467,7 @@ http_interactions: encoding: UTF-8 string: |- { - "id": "pi_3Oj8NCQQeZbvfZRJ1ahXc6sm", + "id": "pi_3OjYzVQQeZbvfZRJ0e0x2sws", "object": "payment_intent", "amount": 1000, "amount_capturable": 0, @@ -478,7 +478,7 @@ http_interactions: "application": "", "application_fee_amount": null, "automatic_payment_methods": null, - "canceled_at": 1707778396, + "canceled_at": 1707880715, "cancellation_reason": null, "capture_method": "manual", "charges": { @@ -486,11 +486,11 @@ http_interactions: "data": [], "has_more": false, "total_count": 0, - "url": "/v1/charges?payment_intent=pi_3Oj8NCQQeZbvfZRJ1ahXc6sm" + "url": "/v1/charges?payment_intent=pi_3OjYzVQQeZbvfZRJ0e0x2sws" }, - "client_secret": "pi_3Oj8NCQQeZbvfZRJ1ahXc6sm_secret_S6BFb7CunuRZPNoXb2GSmSUsh", + "client_secret": "pi_3OjYzVQQeZbvfZRJ0e0x2sws_secret_p1V0dEyb3qeHYwrXdTzNu9cG8", "confirmation_method": "automatic", - "created": 1707778394, + "created": 1707880713, "currency": "aud", "customer": null, "description": null, @@ -501,7 +501,7 @@ http_interactions: "metadata": {}, "next_action": null, "on_behalf_of": null, - "payment_method": "pm_1Oj8NCQQeZbvfZRJUrdNo9RL", + "payment_method": "pm_1OjYzVQQeZbvfZRJl4Sv9a5X", "payment_method_configuration_details": null, "payment_method_options": { "card": { @@ -526,5 +526,5 @@ http_interactions: "transfer_data": null, "transfer_group": null } - recorded_at: Mon, 12 Feb 2024 22:53:16 GMT + recorded_at: Wed, 14 Feb 2024 03:18:35 GMT recorded_with: VCR 6.2.0 From 89236f4c2fdc2fecf4b8462435146eddd2df09d4 Mon Sep 17 00:00:00 2001 From: Gaetan Craig-Riou Date: Mon, 19 Feb 2024 10:34:15 +1100 Subject: [PATCH 13/16] Per review, create a Stripe account It's better to avoid hard coded stripe entities --- .../_credit/refunds_the_payment.yml | 325 +++++++++++++--- .../refunds_the_payment.yml | 362 ++++++++++++++---- .../void_the_payment.yml | 296 +++++++++++--- spec/models/spree/gateway/stripe_sca_spec.rb | 14 +- 4 files changed, 812 insertions(+), 185 deletions(-) diff --git a/spec/fixtures/vcr_cassettes/Stripe-v10.8.0/Spree_Gateway_StripeSCA/_credit/refunds_the_payment.yml b/spec/fixtures/vcr_cassettes/Stripe-v10.8.0/Spree_Gateway_StripeSCA/_credit/refunds_the_payment.yml index f3ee211836..39f6ae4239 100644 --- a/spec/fixtures/vcr_cassettes/Stripe-v10.8.0/Spree_Gateway_StripeSCA/_credit/refunds_the_payment.yml +++ b/spec/fixtures/vcr_cassettes/Stripe-v10.8.0/Spree_Gateway_StripeSCA/_credit/refunds_the_payment.yml @@ -1,5 +1,210 @@ --- 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.8.0 + Authorization: + - Bearer + Content-Type: + - application/x-www-form-urlencoded + Stripe-Version: + - '2023-10-16' + X-Stripe-Client-User-Agent: + - '{"bindings_version":"10.8.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: + - Sun, 18 Feb 2024 23:18:55 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: + - a9283eb3-7b80-4b48-b83f-08c42cabd937 + Original-Request: + - req_Wbr0VoksDJMRSz + Request-Id: + - req_Wbr0VoksDJMRSz + 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_1OlJdK3P50uNgD3L", + "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": 1708298335, + "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_1OlJdK3P50uNgD3L/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: Sun, 18 Feb 2024 23:18:56 GMT - request: method: post uri: https://api.stripe.com/v1/payment_intents @@ -14,7 +219,7 @@ http_interactions: Content-Type: - application/x-www-form-urlencoded X-Stripe-Client-Telemetry: - - '{"last_request_metrics":{"request_id":"req_PnWqcN06vWvMR9","request_duration_ms":411}}' + - '{"last_request_metrics":{"request_id":"req_Wbr0VoksDJMRSz","request_duration_ms":2220}}' Stripe-Version: - '2023-10-16' X-Stripe-Client-User-Agent: @@ -23,7 +228,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_1OhZ9lQQeZbvfZRJ + - acct_1OlJdK3P50uNgD3L Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 Accept: @@ -36,7 +241,7 @@ http_interactions: Server: - nginx Date: - - Wed, 14 Feb 2024 03:18:36 GMT + - Sun, 18 Feb 2024 23:18:57 GMT Content-Type: - application/json Content-Length: @@ -61,13 +266,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: - - 162c4776-cf5c-4796-a217-bb655e612276 + - 38ea3dac-f935-4511-a906-057263310590 Original-Request: - - req_t5o3NvgtXE4esg + - req_e6hlbnspoZ8FRt Request-Id: - - req_t5o3NvgtXE4esg + - req_e6hlbnspoZ8FRt Stripe-Account: - - acct_1OhZ9lQQeZbvfZRJ + - acct_1OlJdK3P50uNgD3L Stripe-Should-Retry: - 'false' Stripe-Version: @@ -82,7 +287,7 @@ http_interactions: encoding: UTF-8 string: |- { - "id": "pi_3OjYzXQQeZbvfZRJ1j1ruUY5", + "id": "pi_3OlJdM3P50uNgD3L1TTJHq6z", "object": "payment_intent", "amount": 1000, "amount_capturable": 0, @@ -96,20 +301,20 @@ http_interactions: "canceled_at": null, "cancellation_reason": null, "capture_method": "automatic", - "client_secret": "pi_3OjYzXQQeZbvfZRJ1j1ruUY5_secret_vRIuwF8JpnLz26yrZwfV6Dw8o", + "client_secret": "pi_3OlJdM3P50uNgD3L1TTJHq6z_secret_vYJ4jMHatj3bwtyafHxb2II4G", "confirmation_method": "automatic", - "created": 1707880715, + "created": 1708298336, "currency": "aud", "customer": null, "description": null, "invoice": null, "last_payment_error": null, - "latest_charge": "ch_3OjYzXQQeZbvfZRJ19NYrLHA", + "latest_charge": "ch_3OlJdM3P50uNgD3L1OIT6IVm", "livemode": false, "metadata": {}, "next_action": null, "on_behalf_of": null, - "payment_method": "pm_1OjYzXQQeZbvfZRJYMx81X2A", + "payment_method": "pm_1OlJdM3P50uNgD3LTg9urTfT", "payment_method_configuration_details": null, "payment_method_options": { "card": { @@ -134,10 +339,10 @@ http_interactions: "transfer_data": null, "transfer_group": null } - recorded_at: Wed, 14 Feb 2024 03:18:37 GMT + recorded_at: Sun, 18 Feb 2024 23:18:57 GMT - request: method: get - uri: https://api.stripe.com/v1/payment_intents/pi_3OjYzXQQeZbvfZRJ1j1ruUY5 + uri: https://api.stripe.com/v1/payment_intents/pi_3OlJdM3P50uNgD3L1TTJHq6z body: encoding: US-ASCII string: '' @@ -153,7 +358,7 @@ http_interactions: X-Stripe-Client-User-Metadata: - '{"ip":null}' Stripe-Account: - - acct_1OhZ9lQQeZbvfZRJ + - acct_1OlJdK3P50uNgD3L Connection: - close Accept-Encoding: @@ -168,11 +373,11 @@ http_interactions: Server: - nginx Date: - - Wed, 14 Feb 2024 03:18:37 GMT + - Sun, 18 Feb 2024 23:18:58 GMT Content-Type: - application/json Content-Length: - - '5160' + - '5159' Connection: - close Access-Control-Allow-Credentials: @@ -194,9 +399,9 @@ http_interactions: 'none'; frame-ancestors 'none'; img-src 'self'; script-src 'self' 'report-sample'; style-src 'self' Request-Id: - - req_LT0o6jALXIeEGV + - req_0XQkUeP9goSD62 Stripe-Account: - - acct_1OhZ9lQQeZbvfZRJ + - acct_1OlJdK3P50uNgD3L Stripe-Version: - '2020-08-27' Vary: @@ -209,7 +414,7 @@ http_interactions: encoding: UTF-8 string: |- { - "id": "pi_3OjYzXQQeZbvfZRJ1j1ruUY5", + "id": "pi_3OlJdM3P50uNgD3L1TTJHq6z", "object": "payment_intent", "amount": 1000, "amount_capturable": 0, @@ -227,7 +432,7 @@ http_interactions: "object": "list", "data": [ { - "id": "ch_3OjYzXQQeZbvfZRJ19NYrLHA", + "id": "ch_3OlJdM3P50uNgD3L1OIT6IVm", "object": "charge", "amount": 1000, "amount_captured": 1000, @@ -235,7 +440,7 @@ http_interactions: "application": "", "application_fee": null, "application_fee_amount": null, - "balance_transaction": "txn_3OjYzXQQeZbvfZRJ1GsCEqjS", + "balance_transaction": "txn_3OlJdM3P50uNgD3L1WGnM0ec", "billing_details": { "address": { "city": null, @@ -251,7 +456,7 @@ http_interactions: }, "calculated_statement_descriptor": "OFNOFNOFN", "captured": true, - "created": 1707880716, + "created": 1708298337, "currency": "aud", "customer": null, "description": null, @@ -271,13 +476,13 @@ http_interactions: "network_status": "approved_by_network", "reason": null, "risk_level": "normal", - "risk_score": 26, + "risk_score": 2, "seller_message": "Payment complete.", "type": "authorized" }, "paid": true, - "payment_intent": "pi_3OjYzXQQeZbvfZRJ1j1ruUY5", - "payment_method": "pm_1OjYzXQQeZbvfZRJYMx81X2A", + "payment_intent": "pi_3OlJdM3P50uNgD3L1TTJHq6z", + "payment_method": "pm_1OlJdM3P50uNgD3LTg9urTfT", "payment_method_details": { "card": { "amount_authorized": 1000, @@ -320,14 +525,14 @@ http_interactions: "radar_options": {}, "receipt_email": null, "receipt_number": null, - "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xT2haOWxRUWVaYnZmWlJKKI3isK4GMgY_HCUfdyE6LBZd0oRsqmQJIXTqN-eOQDNIrEI0HnrxkpbbvqNdWZiAD7qGeAol3jjYdokB", + "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xT2xKZEszUDUwdU5nRDNMKOKgyq4GMgbXXEkyYz46LBb4_CJ9OvCAcpFK5JRnLm875MtWjznz4uWvnIbYnPZpGAiDUb9GJYVEppee", "refunded": false, "refunds": { "object": "list", "data": [], "has_more": false, "total_count": 0, - "url": "/v1/charges/ch_3OjYzXQQeZbvfZRJ19NYrLHA/refunds" + "url": "/v1/charges/ch_3OlJdM3P50uNgD3L1OIT6IVm/refunds" }, "review": null, "shipping": null, @@ -342,22 +547,22 @@ http_interactions: ], "has_more": false, "total_count": 1, - "url": "/v1/charges?payment_intent=pi_3OjYzXQQeZbvfZRJ1j1ruUY5" + "url": "/v1/charges?payment_intent=pi_3OlJdM3P50uNgD3L1TTJHq6z" }, - "client_secret": "pi_3OjYzXQQeZbvfZRJ1j1ruUY5_secret_vRIuwF8JpnLz26yrZwfV6Dw8o", + "client_secret": "pi_3OlJdM3P50uNgD3L1TTJHq6z_secret_vYJ4jMHatj3bwtyafHxb2II4G", "confirmation_method": "automatic", - "created": 1707880715, + "created": 1708298336, "currency": "aud", "customer": null, "description": null, "invoice": null, "last_payment_error": null, - "latest_charge": "ch_3OjYzXQQeZbvfZRJ19NYrLHA", + "latest_charge": "ch_3OlJdM3P50uNgD3L1OIT6IVm", "livemode": false, "metadata": {}, "next_action": null, "on_behalf_of": null, - "payment_method": "pm_1OjYzXQQeZbvfZRJYMx81X2A", + "payment_method": "pm_1OlJdM3P50uNgD3LTg9urTfT", "payment_method_configuration_details": null, "payment_method_options": { "card": { @@ -382,10 +587,10 @@ http_interactions: "transfer_data": null, "transfer_group": null } - recorded_at: Wed, 14 Feb 2024 03:18:37 GMT + recorded_at: Sun, 18 Feb 2024 23:18:58 GMT - request: method: post - uri: https://api.stripe.com/v1/charges/ch_3OjYzXQQeZbvfZRJ19NYrLHA/refunds + uri: https://api.stripe.com/v1/charges/ch_3OlJdM3P50uNgD3L1OIT6IVm/refunds body: encoding: UTF-8 string: amount=1000&expand[0]=charge @@ -403,7 +608,7 @@ http_interactions: X-Stripe-Client-User-Metadata: - '{"ip":null}' Stripe-Account: - - acct_1OhZ9lQQeZbvfZRJ + - acct_1OlJdK3P50uNgD3L Connection: - close Accept-Encoding: @@ -418,11 +623,11 @@ http_interactions: Server: - nginx Date: - - Wed, 14 Feb 2024 03:18:38 GMT + - Sun, 18 Feb 2024 23:18:59 GMT Content-Type: - application/json Content-Length: - - '4536' + - '4535' Connection: - close Access-Control-Allow-Credentials: @@ -444,13 +649,13 @@ http_interactions: 'none'; frame-ancestors 'none'; img-src 'self'; script-src 'self' 'report-sample'; style-src 'self' Idempotency-Key: - - e56daa83-ded4-4bcb-870d-92fffe95b1d3 + - 1adc333b-f920-48aa-bc0d-e3b71af92255 Original-Request: - - req_xesaGuCPCy5q9O + - req_KKn5hjAhXnLhop Request-Id: - - req_xesaGuCPCy5q9O + - req_KKn5hjAhXnLhop Stripe-Account: - - acct_1OhZ9lQQeZbvfZRJ + - acct_1OlJdK3P50uNgD3L Stripe-Should-Retry: - 'false' Stripe-Version: @@ -465,12 +670,12 @@ http_interactions: encoding: UTF-8 string: |- { - "id": "re_3OjYzXQQeZbvfZRJ1mvEuIT9", + "id": "re_3OlJdM3P50uNgD3L15XH6tpe", "object": "refund", "amount": 1000, - "balance_transaction": "txn_3OjYzXQQeZbvfZRJ1Mrm6k4L", + "balance_transaction": "txn_3OlJdM3P50uNgD3L1uKIjwp5", "charge": { - "id": "ch_3OjYzXQQeZbvfZRJ19NYrLHA", + "id": "ch_3OlJdM3P50uNgD3L1OIT6IVm", "object": "charge", "amount": 1000, "amount_captured": 1000, @@ -478,7 +683,7 @@ http_interactions: "application": "", "application_fee": null, "application_fee_amount": null, - "balance_transaction": "txn_3OjYzXQQeZbvfZRJ1GsCEqjS", + "balance_transaction": "txn_3OlJdM3P50uNgD3L1WGnM0ec", "billing_details": { "address": { "city": null, @@ -494,7 +699,7 @@ http_interactions: }, "calculated_statement_descriptor": "OFNOFNOFN", "captured": true, - "created": 1707880716, + "created": 1708298337, "currency": "aud", "customer": null, "description": null, @@ -514,13 +719,13 @@ http_interactions: "network_status": "approved_by_network", "reason": null, "risk_level": "normal", - "risk_score": 26, + "risk_score": 2, "seller_message": "Payment complete.", "type": "authorized" }, "paid": true, - "payment_intent": "pi_3OjYzXQQeZbvfZRJ1j1ruUY5", - "payment_method": "pm_1OjYzXQQeZbvfZRJYMx81X2A", + "payment_intent": "pi_3OlJdM3P50uNgD3L1TTJHq6z", + "payment_method": "pm_1OlJdM3P50uNgD3LTg9urTfT", "payment_method_details": { "card": { "amount_authorized": 1000, @@ -563,18 +768,18 @@ http_interactions: "radar_options": {}, "receipt_email": null, "receipt_number": null, - "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xT2haOWxRUWVaYnZmWlJKKI7isK4GMgaV5COlGVo6LBYjTJOdJa9CuJnMR5Eg_gBt7975GIO67Zbbfrct_HakXl5lNGalmw-bF_E4", + "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xT2xKZEszUDUwdU5nRDNMKOOgyq4GMgZRQKCkX886LBY0QZ4Hm4Fpy1v-B0NQrJrOyBw_S4LSZiRKrUVBfGgxoP7wLS6zCudbkSFK", "refunded": true, "refunds": { "object": "list", "data": [ { - "id": "re_3OjYzXQQeZbvfZRJ1mvEuIT9", + "id": "re_3OlJdM3P50uNgD3L15XH6tpe", "object": "refund", "amount": 1000, - "balance_transaction": "txn_3OjYzXQQeZbvfZRJ1Mrm6k4L", - "charge": "ch_3OjYzXQQeZbvfZRJ19NYrLHA", - "created": 1707880718, + "balance_transaction": "txn_3OlJdM3P50uNgD3L1uKIjwp5", + "charge": "ch_3OlJdM3P50uNgD3L1OIT6IVm", + "created": 1708298339, "currency": "aud", "destination_details": { "card": { @@ -585,7 +790,7 @@ http_interactions: "type": "card" }, "metadata": {}, - "payment_intent": "pi_3OjYzXQQeZbvfZRJ1j1ruUY5", + "payment_intent": "pi_3OlJdM3P50uNgD3L1TTJHq6z", "reason": null, "receipt_number": null, "source_transfer_reversal": null, @@ -595,7 +800,7 @@ http_interactions: ], "has_more": false, "total_count": 1, - "url": "/v1/charges/ch_3OjYzXQQeZbvfZRJ19NYrLHA/refunds" + "url": "/v1/charges/ch_3OlJdM3P50uNgD3L1OIT6IVm/refunds" }, "review": null, "shipping": null, @@ -607,7 +812,7 @@ http_interactions: "transfer_data": null, "transfer_group": null }, - "created": 1707880718, + "created": 1708298339, "currency": "aud", "destination_details": { "card": { @@ -618,12 +823,12 @@ http_interactions: "type": "card" }, "metadata": {}, - "payment_intent": "pi_3OjYzXQQeZbvfZRJ1j1ruUY5", + "payment_intent": "pi_3OlJdM3P50uNgD3L1TTJHq6z", "reason": null, "receipt_number": null, "source_transfer_reversal": null, "status": "succeeded", "transfer_reversal": null } - recorded_at: Wed, 14 Feb 2024 03:18:39 GMT + recorded_at: Sun, 18 Feb 2024 23:19:00 GMT recorded_with: VCR 6.2.0 diff --git a/spec/fixtures/vcr_cassettes/Stripe-v10.8.0/Spree_Gateway_StripeSCA/_void/with_a_confirmed_payment/refunds_the_payment.yml b/spec/fixtures/vcr_cassettes/Stripe-v10.8.0/Spree_Gateway_StripeSCA/_void/with_a_confirmed_payment/refunds_the_payment.yml index 9b4ad95685..5b2fbf0092 100644 --- a/spec/fixtures/vcr_cassettes/Stripe-v10.8.0/Spree_Gateway_StripeSCA/_void/with_a_confirmed_payment/refunds_the_payment.yml +++ b/spec/fixtures/vcr_cassettes/Stripe-v10.8.0/Spree_Gateway_StripeSCA/_void/with_a_confirmed_payment/refunds_the_payment.yml @@ -1,5 +1,212 @@ --- 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.8.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.8.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: + - Sun, 18 Feb 2024 23:31: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: + - 2ed389f6-f571-412f-8164-91dd63633bab + Original-Request: + - req_meqXmqkS2joigR + Request-Id: + - req_meqXmqkS2joigR + 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_1OlJpq4IDOolHj4A", + "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": 1708299111, + "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_1OlJpq4IDOolHj4A/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: Sun, 18 Feb 2024 23:31:52 GMT - request: method: post uri: https://api.stripe.com/v1/payment_intents @@ -14,7 +221,7 @@ http_interactions: Content-Type: - application/x-www-form-urlencoded X-Stripe-Client-Telemetry: - - '{"last_request_metrics":{"request_id":"req_RQ4tnyZMxaTrfg","request_duration_ms":1}}' + - '{"last_request_metrics":{"request_id":"req_meqXmqkS2joigR","request_duration_ms":2100}}' Stripe-Version: - '2023-10-16' X-Stripe-Client-User-Agent: @@ -23,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_1OhZ9lQQeZbvfZRJ + - acct_1OlJpq4IDOolHj4A Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 Accept: @@ -36,7 +243,7 @@ http_interactions: Server: - nginx Date: - - Wed, 14 Feb 2024 03:18:29 GMT + - Sun, 18 Feb 2024 23:31:53 GMT Content-Type: - application/json Content-Length: @@ -61,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: - - e865bd69-4374-4e2e-9542-96af5f6daab7 + - faeaef1a-6ba5-40e5-be52-848b398c8695 Original-Request: - - req_SJe2N6YBjv0snw + - req_MngqpVVLXd1sJL Request-Id: - - req_SJe2N6YBjv0snw + - req_MngqpVVLXd1sJL Stripe-Account: - - acct_1OhZ9lQQeZbvfZRJ + - acct_1OlJpq4IDOolHj4A Stripe-Should-Retry: - 'false' Stripe-Version: @@ -82,7 +289,7 @@ http_interactions: encoding: UTF-8 string: |- { - "id": "pi_3OjYzQQQeZbvfZRJ1ZfpFZtt", + "id": "pi_3OlJps4IDOolHj4A0FSKbxMR", "object": "payment_intent", "amount": 1000, "amount_capturable": 0, @@ -96,20 +303,20 @@ http_interactions: "canceled_at": null, "cancellation_reason": null, "capture_method": "automatic", - "client_secret": "pi_3OjYzQQQeZbvfZRJ1ZfpFZtt_secret_DDNSlzw1M5FiivpZsr8w1C9Pq", + "client_secret": "pi_3OlJps4IDOolHj4A0FSKbxMR_secret_j9TxEMm87Qo3bbIs9UEPtVGTK", "confirmation_method": "automatic", - "created": 1707880708, + "created": 1708299112, "currency": "aud", "customer": null, "description": null, "invoice": null, "last_payment_error": null, - "latest_charge": "ch_3OjYzQQQeZbvfZRJ1agdI8ZG", + "latest_charge": "ch_3OlJps4IDOolHj4A0xc8SBvy", "livemode": false, "metadata": {}, "next_action": null, "on_behalf_of": null, - "payment_method": "pm_1OjYzQQQeZbvfZRJevczQ3ja", + "payment_method": "pm_1OlJps4IDOolHj4AJIs76ygW", "payment_method_configuration_details": null, "payment_method_options": { "card": { @@ -134,7 +341,7 @@ http_interactions: "transfer_data": null, "transfer_group": null } - recorded_at: Wed, 14 Feb 2024 03:18:29 GMT + recorded_at: Sun, 18 Feb 2024 23:31:53 GMT - request: method: get uri: https://api.stripe.com/v1/payment_methods/pm_card_mastercard @@ -149,7 +356,7 @@ http_interactions: Content-Type: - application/x-www-form-urlencoded X-Stripe-Client-Telemetry: - - '{"last_request_metrics":{"request_id":"req_SJe2N6YBjv0snw","request_duration_ms":1697}}' + - '{"last_request_metrics":{"request_id":"req_MngqpVVLXd1sJL","request_duration_ms":1423}}' Stripe-Version: - '2023-10-16' X-Stripe-Client-User-Agent: @@ -169,11 +376,11 @@ http_interactions: Server: - nginx Date: - - Wed, 14 Feb 2024 03:18:30 GMT + - Sun, 18 Feb 2024 23:31:54 GMT Content-Type: - application/json Content-Length: - - '942' + - '977' Connection: - keep-alive Access-Control-Allow-Credentials: @@ -195,7 +402,7 @@ http_interactions: 'none'; frame-ancestors 'none'; img-src 'self'; script-src 'self' 'report-sample'; style-src 'self' Request-Id: - - req_5rWKkeAfNF1e2K + - req_npRtP9yodXxNC9 Stripe-Version: - '2023-10-16' Vary: @@ -208,7 +415,7 @@ http_interactions: encoding: UTF-8 string: |- { - "id": "pm_1OjYzSKuuB1fWySn6gTcoyG9", + "id": "pm_1OlJpuKuuB1fWySnkErwTuoc", "object": "payment_method", "billing_details": { "address": { @@ -231,6 +438,7 @@ http_interactions: "cvc_check": "unchecked" }, "country": "US", + "display_brand": "mastercard", "exp_month": 2, "exp_year": 2025, "fingerprint": "BL35fEFVcTTS5wpE", @@ -248,16 +456,16 @@ http_interactions: }, "wallet": null }, - "created": 1707880710, + "created": 1708299114, "customer": null, "livemode": false, "metadata": {}, "type": "card" } - recorded_at: Wed, 14 Feb 2024 03:18:30 GMT + recorded_at: Sun, 18 Feb 2024 23:31:55 GMT - request: method: get - uri: https://api.stripe.com/v1/payment_intents/pi_3OjYzQQQeZbvfZRJ1ZfpFZtt + uri: https://api.stripe.com/v1/payment_intents/pi_3OlJps4IDOolHj4A0FSKbxMR body: encoding: US-ASCII string: '' @@ -269,7 +477,7 @@ http_interactions: Content-Type: - application/x-www-form-urlencoded X-Stripe-Client-Telemetry: - - '{"last_request_metrics":{"request_id":"req_5rWKkeAfNF1e2K","request_duration_ms":454}}' + - '{"last_request_metrics":{"request_id":"req_npRtP9yodXxNC9","request_duration_ms":560}}' Stripe-Version: - '2023-10-16' X-Stripe-Client-User-Agent: @@ -278,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_1OhZ9lQQeZbvfZRJ + - acct_1OlJpq4IDOolHj4A Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 Accept: @@ -291,7 +499,7 @@ http_interactions: Server: - nginx Date: - - Wed, 14 Feb 2024 03:18:30 GMT + - Sun, 18 Feb 2024 23:31:55 GMT Content-Type: - application/json Content-Length: @@ -317,9 +525,9 @@ http_interactions: 'none'; frame-ancestors 'none'; img-src 'self'; script-src 'self' 'report-sample'; style-src 'self' Request-Id: - - req_wxI46rAQyl4SSe + - req_v39bGC0NS2ATEx Stripe-Account: - - acct_1OhZ9lQQeZbvfZRJ + - acct_1OlJpq4IDOolHj4A Stripe-Version: - '2023-10-16' Vary: @@ -332,7 +540,7 @@ http_interactions: encoding: UTF-8 string: |- { - "id": "pi_3OjYzQQQeZbvfZRJ1ZfpFZtt", + "id": "pi_3OlJps4IDOolHj4A0FSKbxMR", "object": "payment_intent", "amount": 1000, "amount_capturable": 0, @@ -346,20 +554,20 @@ http_interactions: "canceled_at": null, "cancellation_reason": null, "capture_method": "automatic", - "client_secret": "pi_3OjYzQQQeZbvfZRJ1ZfpFZtt_secret_DDNSlzw1M5FiivpZsr8w1C9Pq", + "client_secret": "pi_3OlJps4IDOolHj4A0FSKbxMR_secret_j9TxEMm87Qo3bbIs9UEPtVGTK", "confirmation_method": "automatic", - "created": 1707880708, + "created": 1708299112, "currency": "aud", "customer": null, "description": null, "invoice": null, "last_payment_error": null, - "latest_charge": "ch_3OjYzQQQeZbvfZRJ1agdI8ZG", + "latest_charge": "ch_3OlJps4IDOolHj4A0xc8SBvy", "livemode": false, "metadata": {}, "next_action": null, "on_behalf_of": null, - "payment_method": "pm_1OjYzQQQeZbvfZRJevczQ3ja", + "payment_method": "pm_1OlJps4IDOolHj4AJIs76ygW", "payment_method_configuration_details": null, "payment_method_options": { "card": { @@ -384,10 +592,10 @@ http_interactions: "transfer_data": null, "transfer_group": null } - recorded_at: Wed, 14 Feb 2024 03:18:30 GMT + recorded_at: Sun, 18 Feb 2024 23:31:55 GMT - request: method: get - uri: https://api.stripe.com/v1/payment_intents/pi_3OjYzQQQeZbvfZRJ1ZfpFZtt + uri: https://api.stripe.com/v1/payment_intents/pi_3OlJps4IDOolHj4A0FSKbxMR body: encoding: US-ASCII string: '' @@ -403,7 +611,7 @@ http_interactions: X-Stripe-Client-User-Metadata: - '{"ip":null}' Stripe-Account: - - acct_1OhZ9lQQeZbvfZRJ + - acct_1OlJpq4IDOolHj4A Connection: - close Accept-Encoding: @@ -418,7 +626,7 @@ http_interactions: Server: - nginx Date: - - Wed, 14 Feb 2024 03:18:31 GMT + - Sun, 18 Feb 2024 23:31:56 GMT Content-Type: - application/json Content-Length: @@ -444,9 +652,9 @@ http_interactions: 'none'; frame-ancestors 'none'; img-src 'self'; script-src 'self' 'report-sample'; style-src 'self' Request-Id: - - req_8eT2GT3KhocGtE + - req_BpoOBuAdbqdFxT Stripe-Account: - - acct_1OhZ9lQQeZbvfZRJ + - acct_1OlJpq4IDOolHj4A Stripe-Version: - '2020-08-27' Vary: @@ -459,7 +667,7 @@ http_interactions: encoding: UTF-8 string: |- { - "id": "pi_3OjYzQQQeZbvfZRJ1ZfpFZtt", + "id": "pi_3OlJps4IDOolHj4A0FSKbxMR", "object": "payment_intent", "amount": 1000, "amount_capturable": 0, @@ -477,7 +685,7 @@ http_interactions: "object": "list", "data": [ { - "id": "ch_3OjYzQQQeZbvfZRJ1agdI8ZG", + "id": "ch_3OlJps4IDOolHj4A0xc8SBvy", "object": "charge", "amount": 1000, "amount_captured": 1000, @@ -485,7 +693,7 @@ http_interactions: "application": "", "application_fee": null, "application_fee_amount": null, - "balance_transaction": "txn_3OjYzQQQeZbvfZRJ1rzq7WJf", + "balance_transaction": "txn_3OlJps4IDOolHj4A0be0gc2M", "billing_details": { "address": { "city": null, @@ -501,7 +709,7 @@ http_interactions: }, "calculated_statement_descriptor": "OFNOFNOFN", "captured": true, - "created": 1707880708, + "created": 1708299113, "currency": "aud", "customer": null, "description": null, @@ -521,13 +729,13 @@ http_interactions: "network_status": "approved_by_network", "reason": null, "risk_level": "normal", - "risk_score": 12, + "risk_score": 15, "seller_message": "Payment complete.", "type": "authorized" }, "paid": true, - "payment_intent": "pi_3OjYzQQQeZbvfZRJ1ZfpFZtt", - "payment_method": "pm_1OjYzQQQeZbvfZRJevczQ3ja", + "payment_intent": "pi_3OlJps4IDOolHj4A0FSKbxMR", + "payment_method": "pm_1OlJps4IDOolHj4AJIs76ygW", "payment_method_details": { "card": { "amount_authorized": 1000, @@ -570,14 +778,14 @@ http_interactions: "radar_options": {}, "receipt_email": null, "receipt_number": null, - "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xT2haOWxRUWVaYnZmWlJKKIfisK4GMgb5-TOPrLE6LBb_wjrOeEWzijpNMNdyZOt4LrIYtnRo4ZjRMaX-NqxyTdMnnWcQDt7-EAlo", + "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xT2xKcHE0SURPb2xIajRBKOymyq4GMgaCH-hx8Xs6LBZk7rUcrlcl82luDEKcN3jln7XbThp1gFFoook-2b4wWsQ3bajF9tLklKpL", "refunded": false, "refunds": { "object": "list", "data": [], "has_more": false, "total_count": 0, - "url": "/v1/charges/ch_3OjYzQQQeZbvfZRJ1agdI8ZG/refunds" + "url": "/v1/charges/ch_3OlJps4IDOolHj4A0xc8SBvy/refunds" }, "review": null, "shipping": null, @@ -592,22 +800,22 @@ http_interactions: ], "has_more": false, "total_count": 1, - "url": "/v1/charges?payment_intent=pi_3OjYzQQQeZbvfZRJ1ZfpFZtt" + "url": "/v1/charges?payment_intent=pi_3OlJps4IDOolHj4A0FSKbxMR" }, - "client_secret": "pi_3OjYzQQQeZbvfZRJ1ZfpFZtt_secret_DDNSlzw1M5FiivpZsr8w1C9Pq", + "client_secret": "pi_3OlJps4IDOolHj4A0FSKbxMR_secret_j9TxEMm87Qo3bbIs9UEPtVGTK", "confirmation_method": "automatic", - "created": 1707880708, + "created": 1708299112, "currency": "aud", "customer": null, "description": null, "invoice": null, "last_payment_error": null, - "latest_charge": "ch_3OjYzQQQeZbvfZRJ1agdI8ZG", + "latest_charge": "ch_3OlJps4IDOolHj4A0xc8SBvy", "livemode": false, "metadata": {}, "next_action": null, "on_behalf_of": null, - "payment_method": "pm_1OjYzQQQeZbvfZRJevczQ3ja", + "payment_method": "pm_1OlJps4IDOolHj4AJIs76ygW", "payment_method_configuration_details": null, "payment_method_options": { "card": { @@ -632,10 +840,10 @@ http_interactions: "transfer_data": null, "transfer_group": null } - recorded_at: Wed, 14 Feb 2024 03:18:31 GMT + recorded_at: Sun, 18 Feb 2024 23:31:56 GMT - request: method: post - uri: https://api.stripe.com/v1/charges/ch_3OjYzQQQeZbvfZRJ1agdI8ZG/refunds + uri: https://api.stripe.com/v1/charges/ch_3OlJps4IDOolHj4A0xc8SBvy/refunds body: encoding: UTF-8 string: amount=1000&expand[0]=charge @@ -653,7 +861,7 @@ http_interactions: X-Stripe-Client-User-Metadata: - '{"ip":null}' Stripe-Account: - - acct_1OhZ9lQQeZbvfZRJ + - acct_1OlJpq4IDOolHj4A Connection: - close Accept-Encoding: @@ -668,7 +876,7 @@ http_interactions: Server: - nginx Date: - - Wed, 14 Feb 2024 03:18:32 GMT + - Sun, 18 Feb 2024 23:31:57 GMT Content-Type: - application/json Content-Length: @@ -694,13 +902,13 @@ http_interactions: 'none'; frame-ancestors 'none'; img-src 'self'; script-src 'self' 'report-sample'; style-src 'self' Idempotency-Key: - - c5612d0a-b27b-4611-8571-df184dfb4883 + - 14e5eaed-eb35-4530-bd97-b10e0b6485e9 Original-Request: - - req_GSLFwegws0fu5O + - req_ZrY5fViOUd9zj5 Request-Id: - - req_GSLFwegws0fu5O + - req_ZrY5fViOUd9zj5 Stripe-Account: - - acct_1OhZ9lQQeZbvfZRJ + - acct_1OlJpq4IDOolHj4A Stripe-Should-Retry: - 'false' Stripe-Version: @@ -715,12 +923,12 @@ http_interactions: encoding: UTF-8 string: |- { - "id": "re_3OjYzQQQeZbvfZRJ1XLkiMNb", + "id": "re_3OlJps4IDOolHj4A0fuLJjYP", "object": "refund", "amount": 1000, - "balance_transaction": "txn_3OjYzQQQeZbvfZRJ1END2EXD", + "balance_transaction": "txn_3OlJps4IDOolHj4A0uopfEv0", "charge": { - "id": "ch_3OjYzQQQeZbvfZRJ1agdI8ZG", + "id": "ch_3OlJps4IDOolHj4A0xc8SBvy", "object": "charge", "amount": 1000, "amount_captured": 1000, @@ -728,7 +936,7 @@ http_interactions: "application": "", "application_fee": null, "application_fee_amount": null, - "balance_transaction": "txn_3OjYzQQQeZbvfZRJ1rzq7WJf", + "balance_transaction": "txn_3OlJps4IDOolHj4A0be0gc2M", "billing_details": { "address": { "city": null, @@ -744,7 +952,7 @@ http_interactions: }, "calculated_statement_descriptor": "OFNOFNOFN", "captured": true, - "created": 1707880708, + "created": 1708299113, "currency": "aud", "customer": null, "description": null, @@ -764,13 +972,13 @@ http_interactions: "network_status": "approved_by_network", "reason": null, "risk_level": "normal", - "risk_score": 12, + "risk_score": 15, "seller_message": "Payment complete.", "type": "authorized" }, "paid": true, - "payment_intent": "pi_3OjYzQQQeZbvfZRJ1ZfpFZtt", - "payment_method": "pm_1OjYzQQQeZbvfZRJevczQ3ja", + "payment_intent": "pi_3OlJps4IDOolHj4A0FSKbxMR", + "payment_method": "pm_1OlJps4IDOolHj4AJIs76ygW", "payment_method_details": { "card": { "amount_authorized": 1000, @@ -813,18 +1021,18 @@ http_interactions: "radar_options": {}, "receipt_email": null, "receipt_number": null, - "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xT2haOWxRUWVaYnZmWlJKKIjisK4GMgZypb2pB6g6LBbF0B7_4nXvwqexHymit0cH1Fo3Kia6S2-A33YZ7GK8vHCldPf3XtBchtVJ", + "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xT2xKcHE0SURPb2xIajRBKO2myq4GMgbWCpqeR486LBbcEhBtNPuCryM5xJKKFpmwBkERo7JjAc7onU_q6xbxOVm8exXEF1tcb9r0", "refunded": true, "refunds": { "object": "list", "data": [ { - "id": "re_3OjYzQQQeZbvfZRJ1XLkiMNb", + "id": "re_3OlJps4IDOolHj4A0fuLJjYP", "object": "refund", "amount": 1000, - "balance_transaction": "txn_3OjYzQQQeZbvfZRJ1END2EXD", - "charge": "ch_3OjYzQQQeZbvfZRJ1agdI8ZG", - "created": 1707880712, + "balance_transaction": "txn_3OlJps4IDOolHj4A0uopfEv0", + "charge": "ch_3OlJps4IDOolHj4A0xc8SBvy", + "created": 1708299116, "currency": "aud", "destination_details": { "card": { @@ -835,7 +1043,7 @@ http_interactions: "type": "card" }, "metadata": {}, - "payment_intent": "pi_3OjYzQQQeZbvfZRJ1ZfpFZtt", + "payment_intent": "pi_3OlJps4IDOolHj4A0FSKbxMR", "reason": null, "receipt_number": null, "source_transfer_reversal": null, @@ -845,7 +1053,7 @@ http_interactions: ], "has_more": false, "total_count": 1, - "url": "/v1/charges/ch_3OjYzQQQeZbvfZRJ1agdI8ZG/refunds" + "url": "/v1/charges/ch_3OlJps4IDOolHj4A0xc8SBvy/refunds" }, "review": null, "shipping": null, @@ -857,7 +1065,7 @@ http_interactions: "transfer_data": null, "transfer_group": null }, - "created": 1707880712, + "created": 1708299116, "currency": "aud", "destination_details": { "card": { @@ -868,12 +1076,12 @@ http_interactions: "type": "card" }, "metadata": {}, - "payment_intent": "pi_3OjYzQQQeZbvfZRJ1ZfpFZtt", + "payment_intent": "pi_3OlJps4IDOolHj4A0FSKbxMR", "reason": null, "receipt_number": null, "source_transfer_reversal": null, "status": "succeeded", "transfer_reversal": null } - recorded_at: Wed, 14 Feb 2024 03:18:32 GMT + recorded_at: Sun, 18 Feb 2024 23:31:57 GMT recorded_with: VCR 6.2.0 diff --git a/spec/fixtures/vcr_cassettes/Stripe-v10.8.0/Spree_Gateway_StripeSCA/_void/with_a_voidable_payment/void_the_payment.yml b/spec/fixtures/vcr_cassettes/Stripe-v10.8.0/Spree_Gateway_StripeSCA/_void/with_a_voidable_payment/void_the_payment.yml index 9794336c76..f265e280d7 100644 --- a/spec/fixtures/vcr_cassettes/Stripe-v10.8.0/Spree_Gateway_StripeSCA/_void/with_a_voidable_payment/void_the_payment.yml +++ b/spec/fixtures/vcr_cassettes/Stripe-v10.8.0/Spree_Gateway_StripeSCA/_void/with_a_voidable_payment/void_the_payment.yml @@ -1,5 +1,212 @@ --- 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.8.0 + Authorization: + - Bearer + Content-Type: + - application/x-www-form-urlencoded + X-Stripe-Client-Telemetry: + - '{"last_request_metrics":{"request_id":"req_v39bGC0NS2ATEx","request_duration_ms":499}}' + Stripe-Version: + - '2023-10-16' + X-Stripe-Client-User-Agent: + - '{"bindings_version":"10.8.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: + - Sun, 18 Feb 2024 23:31:59 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: + - 8f008bd6-9ce8-428b-9327-a5b768f25be2 + Original-Request: + - req_gHdtWKWo8Ywyim + Request-Id: + - req_gHdtWKWo8Ywyim + 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_1OlJpx4FpDs6HNTb", + "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": 1708299118, + "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_1OlJpx4FpDs6HNTb/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: Sun, 18 Feb 2024 23:31:59 GMT - request: method: post uri: https://api.stripe.com/v1/payment_intents @@ -14,7 +221,7 @@ http_interactions: Content-Type: - application/x-www-form-urlencoded X-Stripe-Client-Telemetry: - - '{"last_request_metrics":{"request_id":"req_wxI46rAQyl4SSe","request_duration_ms":422}}' + - '{"last_request_metrics":{"request_id":"req_gHdtWKWo8Ywyim","request_duration_ms":1712}}' Stripe-Version: - '2023-10-16' X-Stripe-Client-User-Agent: @@ -23,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_1OhZ9lQQeZbvfZRJ + - acct_1OlJpx4FpDs6HNTb Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 Accept: @@ -36,7 +243,7 @@ http_interactions: Server: - nginx Date: - - Wed, 14 Feb 2024 03:18:33 GMT + - Sun, 18 Feb 2024 23:31:59 GMT Content-Type: - application/json Content-Length: @@ -61,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: - - c58ef797-9bab-401e-ab3d-4df1bd2507d4 + - ee9d6e1c-4298-444c-b7b7-19d6fbc01eb0 Original-Request: - - req_RHfHf6SxOfQFW5 + - req_Z8fycI2zLmmQsU Request-Id: - - req_RHfHf6SxOfQFW5 + - req_Z8fycI2zLmmQsU Stripe-Account: - - acct_1OhZ9lQQeZbvfZRJ + - acct_1OlJpx4FpDs6HNTb Stripe-Should-Retry: - 'false' Stripe-Version: @@ -82,7 +289,7 @@ http_interactions: encoding: UTF-8 string: |- { - "id": "pi_3OjYzVQQeZbvfZRJ0e0x2sws", + "id": "pi_3OlJpz4FpDs6HNTb0Iz2h8vT", "object": "payment_intent", "amount": 1000, "amount_capturable": 0, @@ -96,9 +303,9 @@ http_interactions: "canceled_at": null, "cancellation_reason": null, "capture_method": "manual", - "client_secret": "pi_3OjYzVQQeZbvfZRJ0e0x2sws_secret_p1V0dEyb3qeHYwrXdTzNu9cG8", + "client_secret": "pi_3OlJpz4FpDs6HNTb0Iz2h8vT_secret_I512Wt8V0ucFAWLSMwHPWXvCA", "confirmation_method": "automatic", - "created": 1707880713, + "created": 1708299119, "currency": "aud", "customer": null, "description": null, @@ -109,7 +316,7 @@ http_interactions: "metadata": {}, "next_action": null, "on_behalf_of": null, - "payment_method": "pm_1OjYzVQQeZbvfZRJl4Sv9a5X", + "payment_method": "pm_1OlJpz4FpDs6HNTbKam9f2S3", "payment_method_configuration_details": null, "payment_method_options": { "card": { @@ -134,7 +341,7 @@ http_interactions: "transfer_data": null, "transfer_group": null } - recorded_at: Wed, 14 Feb 2024 03:18:33 GMT + recorded_at: Sun, 18 Feb 2024 23:32:00 GMT - request: method: get uri: https://api.stripe.com/v1/payment_methods/pm_card_mastercard @@ -149,7 +356,7 @@ http_interactions: Content-Type: - application/x-www-form-urlencoded X-Stripe-Client-Telemetry: - - '{"last_request_metrics":{"request_id":"req_RHfHf6SxOfQFW5","request_duration_ms":536}}' + - '{"last_request_metrics":{"request_id":"req_Z8fycI2zLmmQsU","request_duration_ms":720}}' Stripe-Version: - '2023-10-16' X-Stripe-Client-User-Agent: @@ -169,11 +376,11 @@ http_interactions: Server: - nginx Date: - - Wed, 14 Feb 2024 03:18:34 GMT + - Sun, 18 Feb 2024 23:32:01 GMT Content-Type: - application/json Content-Length: - - '942' + - '977' Connection: - keep-alive Access-Control-Allow-Credentials: @@ -195,7 +402,7 @@ http_interactions: 'none'; frame-ancestors 'none'; img-src 'self'; script-src 'self' 'report-sample'; style-src 'self' Request-Id: - - req_4RtNXuFemQOv6L + - req_ja6110bAf7mNnp Stripe-Version: - '2023-10-16' Vary: @@ -208,7 +415,7 @@ http_interactions: encoding: UTF-8 string: |- { - "id": "pm_1OjYzWKuuB1fWySneavPZ5WZ", + "id": "pm_1OlJq0KuuB1fWySnfoDRqyeT", "object": "payment_method", "billing_details": { "address": { @@ -231,6 +438,7 @@ http_interactions: "cvc_check": "unchecked" }, "country": "US", + "display_brand": "mastercard", "exp_month": 2, "exp_year": 2025, "fingerprint": "BL35fEFVcTTS5wpE", @@ -248,16 +456,16 @@ http_interactions: }, "wallet": null }, - "created": 1707880714, + "created": 1708299120, "customer": null, "livemode": false, "metadata": {}, "type": "card" } - recorded_at: Wed, 14 Feb 2024 03:18:34 GMT + recorded_at: Sun, 18 Feb 2024 23:32:01 GMT - request: method: get - uri: https://api.stripe.com/v1/payment_intents/pi_3OjYzVQQeZbvfZRJ0e0x2sws + uri: https://api.stripe.com/v1/payment_intents/pi_3OlJpz4FpDs6HNTb0Iz2h8vT body: encoding: US-ASCII string: '' @@ -269,7 +477,7 @@ http_interactions: Content-Type: - application/x-www-form-urlencoded X-Stripe-Client-Telemetry: - - '{"last_request_metrics":{"request_id":"req_4RtNXuFemQOv6L","request_duration_ms":463}}' + - '{"last_request_metrics":{"request_id":"req_ja6110bAf7mNnp","request_duration_ms":538}}' Stripe-Version: - '2023-10-16' X-Stripe-Client-User-Agent: @@ -278,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_1OhZ9lQQeZbvfZRJ + - acct_1OlJpx4FpDs6HNTb Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 Accept: @@ -291,7 +499,7 @@ http_interactions: Server: - nginx Date: - - Wed, 14 Feb 2024 03:18:34 GMT + - Sun, 18 Feb 2024 23:32:01 GMT Content-Type: - application/json Content-Length: @@ -317,9 +525,9 @@ http_interactions: 'none'; frame-ancestors 'none'; img-src 'self'; script-src 'self' 'report-sample'; style-src 'self' Request-Id: - - req_PnWqcN06vWvMR9 + - req_7o6W2mEV9dHwzj Stripe-Account: - - acct_1OhZ9lQQeZbvfZRJ + - acct_1OlJpx4FpDs6HNTb Stripe-Version: - '2023-10-16' Vary: @@ -332,7 +540,7 @@ http_interactions: encoding: UTF-8 string: |- { - "id": "pi_3OjYzVQQeZbvfZRJ0e0x2sws", + "id": "pi_3OlJpz4FpDs6HNTb0Iz2h8vT", "object": "payment_intent", "amount": 1000, "amount_capturable": 0, @@ -346,9 +554,9 @@ http_interactions: "canceled_at": null, "cancellation_reason": null, "capture_method": "manual", - "client_secret": "pi_3OjYzVQQeZbvfZRJ0e0x2sws_secret_p1V0dEyb3qeHYwrXdTzNu9cG8", + "client_secret": "pi_3OlJpz4FpDs6HNTb0Iz2h8vT_secret_I512Wt8V0ucFAWLSMwHPWXvCA", "confirmation_method": "automatic", - "created": 1707880713, + "created": 1708299119, "currency": "aud", "customer": null, "description": null, @@ -359,7 +567,7 @@ http_interactions: "metadata": {}, "next_action": null, "on_behalf_of": null, - "payment_method": "pm_1OjYzVQQeZbvfZRJl4Sv9a5X", + "payment_method": "pm_1OlJpz4FpDs6HNTbKam9f2S3", "payment_method_configuration_details": null, "payment_method_options": { "card": { @@ -384,10 +592,10 @@ http_interactions: "transfer_data": null, "transfer_group": null } - recorded_at: Wed, 14 Feb 2024 03:18:34 GMT + recorded_at: Sun, 18 Feb 2024 23:32:01 GMT - request: method: post - uri: https://api.stripe.com/v1/payment_intents/pi_3OjYzVQQeZbvfZRJ0e0x2sws/cancel + uri: https://api.stripe.com/v1/payment_intents/pi_3OlJpz4FpDs6HNTb0Iz2h8vT/cancel body: encoding: US-ASCII string: '' @@ -405,7 +613,7 @@ http_interactions: X-Stripe-Client-User-Metadata: - '{"ip":null}' Stripe-Account: - - acct_1OhZ9lQQeZbvfZRJ + - acct_1OlJpx4FpDs6HNTb Connection: - close Accept-Encoding: @@ -420,7 +628,7 @@ http_interactions: Server: - nginx Date: - - Wed, 14 Feb 2024 03:18:35 GMT + - Sun, 18 Feb 2024 23:32:02 GMT Content-Type: - application/json Content-Length: @@ -446,13 +654,13 @@ http_interactions: 'none'; frame-ancestors 'none'; img-src 'self'; script-src 'self' 'report-sample'; style-src 'self' Idempotency-Key: - - c527367d-ab3f-4141-9d50-2dadee2eb10d + - add367a8-a518-4762-9e62-16695b6a49ca Original-Request: - - req_mgU0tpR5EE5dow + - req_juZ0k8HqCGOhHL Request-Id: - - req_mgU0tpR5EE5dow + - req_juZ0k8HqCGOhHL Stripe-Account: - - acct_1OhZ9lQQeZbvfZRJ + - acct_1OlJpx4FpDs6HNTb Stripe-Should-Retry: - 'false' Stripe-Version: @@ -467,7 +675,7 @@ http_interactions: encoding: UTF-8 string: |- { - "id": "pi_3OjYzVQQeZbvfZRJ0e0x2sws", + "id": "pi_3OlJpz4FpDs6HNTb0Iz2h8vT", "object": "payment_intent", "amount": 1000, "amount_capturable": 0, @@ -478,7 +686,7 @@ http_interactions: "application": "", "application_fee_amount": null, "automatic_payment_methods": null, - "canceled_at": 1707880715, + "canceled_at": 1708299122, "cancellation_reason": null, "capture_method": "manual", "charges": { @@ -486,11 +694,11 @@ http_interactions: "data": [], "has_more": false, "total_count": 0, - "url": "/v1/charges?payment_intent=pi_3OjYzVQQeZbvfZRJ0e0x2sws" + "url": "/v1/charges?payment_intent=pi_3OlJpz4FpDs6HNTb0Iz2h8vT" }, - "client_secret": "pi_3OjYzVQQeZbvfZRJ0e0x2sws_secret_p1V0dEyb3qeHYwrXdTzNu9cG8", + "client_secret": "pi_3OlJpz4FpDs6HNTb0Iz2h8vT_secret_I512Wt8V0ucFAWLSMwHPWXvCA", "confirmation_method": "automatic", - "created": 1707880713, + "created": 1708299119, "currency": "aud", "customer": null, "description": null, @@ -501,7 +709,7 @@ http_interactions: "metadata": {}, "next_action": null, "on_behalf_of": null, - "payment_method": "pm_1OjYzVQQeZbvfZRJl4Sv9a5X", + "payment_method": "pm_1OlJpz4FpDs6HNTbKam9f2S3", "payment_method_configuration_details": null, "payment_method_options": { "card": { @@ -526,5 +734,5 @@ http_interactions: "transfer_data": null, "transfer_group": null } - recorded_at: Wed, 14 Feb 2024 03:18:35 GMT + recorded_at: Sun, 18 Feb 2024 23:32:02 GMT recorded_with: VCR 6.2.0 diff --git a/spec/models/spree/gateway/stripe_sca_spec.rb b/spec/models/spree/gateway/stripe_sca_spec.rb index 47bd3c18c1..41e2b76340 100644 --- a/spec/models/spree/gateway/stripe_sca_spec.rb +++ b/spec/models/spree/gateway/stripe_sca_spec.rb @@ -38,6 +38,14 @@ describe Spree::Gateway::StripeSCA, type: :model do }) end + let(:connected_account) do + Stripe::Account.create({ + type: 'standard', + country: 'AU', + email: 'carrot.producer@example.com' + }) + end + describe "#purchase", :vcr, :stripe_version do # Stripe acepts amounts as positive integers representing how much to charge # in the smallest currency unit @@ -64,8 +72,7 @@ describe Spree::Gateway::StripeSCA, type: :model do end describe "#void", :vcr, :stripe_version do - # This is the first account retrieved using Stripe::Account.list - let(:stripe_test_account) { "acct_1OhZ9lQQeZbvfZRJ" } + let(:stripe_test_account) { connected_account.id } before do # Inject our test stripe account @@ -135,8 +142,7 @@ describe Spree::Gateway::StripeSCA, type: :model do end describe "#credit", :vcr, :stripe_version do - # This is the first account retrieved using Stripe::Account.list - let(:stripe_test_account) { "acct_1OhZ9lQQeZbvfZRJ" } + let(:stripe_test_account) { connected_account.id } before do # Inject our test stripe account From 848767d50f9b007f45d0459ea14ab81ee12f29fc Mon Sep 17 00:00:00 2001 From: Gaetan Craig-Riou Date: Mon, 19 Feb 2024 10:46:55 +1100 Subject: [PATCH 14/16] Per review, clean up test set up --- spec/models/spree/gateway/stripe_sca_spec.rb | 45 +++++++++----------- 1 file changed, 20 insertions(+), 25 deletions(-) diff --git a/spec/models/spree/gateway/stripe_sca_spec.rb b/spec/models/spree/gateway/stripe_sca_spec.rb index 41e2b76340..58308deb89 100644 --- a/spec/models/spree/gateway/stripe_sca_spec.rb +++ b/spec/models/spree/gateway/stripe_sca_spec.rb @@ -78,13 +78,22 @@ describe Spree::Gateway::StripeSCA, type: :model do # Inject our test stripe account stripe_account = create(:stripe_account, stripe_user_id: stripe_test_account) allow(StripeAccount).to receive(:find_by).and_return(stripe_account) + + create( + :payment, + order:, + amount: order.total, + payment_method: subject, + source: credit_card, + response_code: payment_intent.id + ) end context "with a confirmed payment" do - it "refunds the payment" do - # Link the payment intent to our test stripe account, and automatically confirm and capture - # the payment. - payment_intent = Stripe::PaymentIntent.create( + # Link the payment intent to our test stripe account, and automatically confirm and capture + # the payment. + let(:payment_intent) do + Stripe::PaymentIntent.create( { amount: 1000, # given in AUD cents currency: 'aud', # AUD to match order currency @@ -95,16 +104,9 @@ describe Spree::Gateway::StripeSCA, type: :model do }, stripe_account: stripe_test_account ) + end - payment = create( - :payment, - order:, - amount: order.total, - payment_method: subject, - source: credit_card, - response_code: payment_intent.id - ) - + it "refunds the payment" do response = subject.void(payment_intent.id, nil, {}) expect(response.success?).to eq true @@ -112,9 +114,9 @@ describe Spree::Gateway::StripeSCA, type: :model do end context "with a voidable payment" do - it "void the payment" do - # Link the payment intent to our test stripe account - payment_intent = Stripe::PaymentIntent.create( + # Link the payment intent to our test stripe account + let(:payment_intent) do + Stripe::PaymentIntent.create( { amount: 1000, # given in AUD cents currency: 'aud', # AUD to match order currency @@ -124,16 +126,9 @@ describe Spree::Gateway::StripeSCA, type: :model do }, stripe_account: stripe_test_account ) + end - payment = create( - :payment, - order:, - amount: order.total, - payment_method: subject, - source: credit_card, - response_code: payment_intent.id - ) - + it "void the payment" do response = subject.void(payment_intent.id, nil, {}) expect(response.success?).to eq true From 02019f7caec30c2950346b9bdd724565aa5b096a Mon Sep 17 00:00:00 2001 From: Gaetan Craig-Riou Date: Mon, 19 Feb 2024 11:01:20 +1100 Subject: [PATCH 15/16] 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 From cb83ad688edc84ebeed1ce1aebce7fd22df330cd Mon Sep 17 00:00:00 2001 From: Gaetan Craig-Riou Date: Mon, 19 Feb 2024 15:44:20 +1100 Subject: [PATCH 16/16] Remove old vcr stripe cassettes --- .../_credit/refunds_the_payment.yml | 834 ------------- .../refunds_the_payment.yml | 1087 ----------------- .../void_the_payment.yml | 738 ----------- 3 files changed, 2659 deletions(-) delete mode 100644 spec/fixtures/vcr_cassettes/Stripe-v10.8.0/Spree_Gateway_StripeSCA/_credit/refunds_the_payment.yml delete mode 100644 spec/fixtures/vcr_cassettes/Stripe-v10.8.0/Spree_Gateway_StripeSCA/_void/with_a_confirmed_payment/refunds_the_payment.yml delete mode 100644 spec/fixtures/vcr_cassettes/Stripe-v10.8.0/Spree_Gateway_StripeSCA/_void/with_a_voidable_payment/void_the_payment.yml diff --git a/spec/fixtures/vcr_cassettes/Stripe-v10.8.0/Spree_Gateway_StripeSCA/_credit/refunds_the_payment.yml b/spec/fixtures/vcr_cassettes/Stripe-v10.8.0/Spree_Gateway_StripeSCA/_credit/refunds_the_payment.yml deleted file mode 100644 index 39f6ae4239..0000000000 --- a/spec/fixtures/vcr_cassettes/Stripe-v10.8.0/Spree_Gateway_StripeSCA/_credit/refunds_the_payment.yml +++ /dev/null @@ -1,834 +0,0 @@ ---- -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.8.0 - Authorization: - - Bearer - Content-Type: - - application/x-www-form-urlencoded - Stripe-Version: - - '2023-10-16' - X-Stripe-Client-User-Agent: - - '{"bindings_version":"10.8.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: - - Sun, 18 Feb 2024 23:18:55 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: - - a9283eb3-7b80-4b48-b83f-08c42cabd937 - Original-Request: - - req_Wbr0VoksDJMRSz - Request-Id: - - req_Wbr0VoksDJMRSz - 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_1OlJdK3P50uNgD3L", - "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": 1708298335, - "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_1OlJdK3P50uNgD3L/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: Sun, 18 Feb 2024 23:18:56 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.8.0 - Authorization: - - Bearer - Content-Type: - - application/x-www-form-urlencoded - X-Stripe-Client-Telemetry: - - '{"last_request_metrics":{"request_id":"req_Wbr0VoksDJMRSz","request_duration_ms":2220}}' - Stripe-Version: - - '2023-10-16' - X-Stripe-Client-User-Agent: - - '{"bindings_version":"10.8.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_1OlJdK3P50uNgD3L - 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: - - Sun, 18 Feb 2024 23:18:57 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: - - 38ea3dac-f935-4511-a906-057263310590 - Original-Request: - - req_e6hlbnspoZ8FRt - Request-Id: - - req_e6hlbnspoZ8FRt - Stripe-Account: - - acct_1OlJdK3P50uNgD3L - 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_3OlJdM3P50uNgD3L1TTJHq6z", - "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_3OlJdM3P50uNgD3L1TTJHq6z_secret_vYJ4jMHatj3bwtyafHxb2II4G", - "confirmation_method": "automatic", - "created": 1708298336, - "currency": "aud", - "customer": null, - "description": null, - "invoice": null, - "last_payment_error": null, - "latest_charge": "ch_3OlJdM3P50uNgD3L1OIT6IVm", - "livemode": false, - "metadata": {}, - "next_action": null, - "on_behalf_of": null, - "payment_method": "pm_1OlJdM3P50uNgD3LTg9urTfT", - "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: Sun, 18 Feb 2024 23:18:57 GMT -- request: - method: get - uri: https://api.stripe.com/v1/payment_intents/pi_3OlJdM3P50uNgD3L1TTJHq6z - 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_1OlJdK3P50uNgD3L - 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: - - Sun, 18 Feb 2024 23:18:58 GMT - Content-Type: - - application/json - Content-Length: - - '5159' - 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_0XQkUeP9goSD62 - Stripe-Account: - - acct_1OlJdK3P50uNgD3L - 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_3OlJdM3P50uNgD3L1TTJHq6z", - "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_3OlJdM3P50uNgD3L1OIT6IVm", - "object": "charge", - "amount": 1000, - "amount_captured": 1000, - "amount_refunded": 0, - "application": "", - "application_fee": null, - "application_fee_amount": null, - "balance_transaction": "txn_3OlJdM3P50uNgD3L1WGnM0ec", - "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": 1708298337, - "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": 2, - "seller_message": "Payment complete.", - "type": "authorized" - }, - "paid": true, - "payment_intent": "pi_3OlJdM3P50uNgD3L1TTJHq6z", - "payment_method": "pm_1OlJdM3P50uNgD3LTg9urTfT", - "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/CAcaFwoVYWNjdF8xT2xKZEszUDUwdU5nRDNMKOKgyq4GMgbXXEkyYz46LBb4_CJ9OvCAcpFK5JRnLm875MtWjznz4uWvnIbYnPZpGAiDUb9GJYVEppee", - "refunded": false, - "refunds": { - "object": "list", - "data": [], - "has_more": false, - "total_count": 0, - "url": "/v1/charges/ch_3OlJdM3P50uNgD3L1OIT6IVm/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_3OlJdM3P50uNgD3L1TTJHq6z" - }, - "client_secret": "pi_3OlJdM3P50uNgD3L1TTJHq6z_secret_vYJ4jMHatj3bwtyafHxb2II4G", - "confirmation_method": "automatic", - "created": 1708298336, - "currency": "aud", - "customer": null, - "description": null, - "invoice": null, - "last_payment_error": null, - "latest_charge": "ch_3OlJdM3P50uNgD3L1OIT6IVm", - "livemode": false, - "metadata": {}, - "next_action": null, - "on_behalf_of": null, - "payment_method": "pm_1OlJdM3P50uNgD3LTg9urTfT", - "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: Sun, 18 Feb 2024 23:18:58 GMT -- request: - method: post - uri: https://api.stripe.com/v1/charges/ch_3OlJdM3P50uNgD3L1OIT6IVm/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_1OlJdK3P50uNgD3L - 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: - - Sun, 18 Feb 2024 23:18:59 GMT - Content-Type: - - application/json - Content-Length: - - '4535' - 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: - - 1adc333b-f920-48aa-bc0d-e3b71af92255 - Original-Request: - - req_KKn5hjAhXnLhop - Request-Id: - - req_KKn5hjAhXnLhop - Stripe-Account: - - acct_1OlJdK3P50uNgD3L - 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_3OlJdM3P50uNgD3L15XH6tpe", - "object": "refund", - "amount": 1000, - "balance_transaction": "txn_3OlJdM3P50uNgD3L1uKIjwp5", - "charge": { - "id": "ch_3OlJdM3P50uNgD3L1OIT6IVm", - "object": "charge", - "amount": 1000, - "amount_captured": 1000, - "amount_refunded": 1000, - "application": "", - "application_fee": null, - "application_fee_amount": null, - "balance_transaction": "txn_3OlJdM3P50uNgD3L1WGnM0ec", - "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": 1708298337, - "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": 2, - "seller_message": "Payment complete.", - "type": "authorized" - }, - "paid": true, - "payment_intent": "pi_3OlJdM3P50uNgD3L1TTJHq6z", - "payment_method": "pm_1OlJdM3P50uNgD3LTg9urTfT", - "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/CAcaFwoVYWNjdF8xT2xKZEszUDUwdU5nRDNMKOOgyq4GMgZRQKCkX886LBY0QZ4Hm4Fpy1v-B0NQrJrOyBw_S4LSZiRKrUVBfGgxoP7wLS6zCudbkSFK", - "refunded": true, - "refunds": { - "object": "list", - "data": [ - { - "id": "re_3OlJdM3P50uNgD3L15XH6tpe", - "object": "refund", - "amount": 1000, - "balance_transaction": "txn_3OlJdM3P50uNgD3L1uKIjwp5", - "charge": "ch_3OlJdM3P50uNgD3L1OIT6IVm", - "created": 1708298339, - "currency": "aud", - "destination_details": { - "card": { - "reference_status": "pending", - "reference_type": "acquirer_reference_number", - "type": "refund" - }, - "type": "card" - }, - "metadata": {}, - "payment_intent": "pi_3OlJdM3P50uNgD3L1TTJHq6z", - "reason": null, - "receipt_number": null, - "source_transfer_reversal": null, - "status": "succeeded", - "transfer_reversal": null - } - ], - "has_more": false, - "total_count": 1, - "url": "/v1/charges/ch_3OlJdM3P50uNgD3L1OIT6IVm/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": 1708298339, - "currency": "aud", - "destination_details": { - "card": { - "reference_status": "pending", - "reference_type": "acquirer_reference_number", - "type": "refund" - }, - "type": "card" - }, - "metadata": {}, - "payment_intent": "pi_3OlJdM3P50uNgD3L1TTJHq6z", - "reason": null, - "receipt_number": null, - "source_transfer_reversal": null, - "status": "succeeded", - "transfer_reversal": null - } - recorded_at: Sun, 18 Feb 2024 23:19:00 GMT -recorded_with: VCR 6.2.0 diff --git a/spec/fixtures/vcr_cassettes/Stripe-v10.8.0/Spree_Gateway_StripeSCA/_void/with_a_confirmed_payment/refunds_the_payment.yml b/spec/fixtures/vcr_cassettes/Stripe-v10.8.0/Spree_Gateway_StripeSCA/_void/with_a_confirmed_payment/refunds_the_payment.yml deleted file mode 100644 index 5b2fbf0092..0000000000 --- a/spec/fixtures/vcr_cassettes/Stripe-v10.8.0/Spree_Gateway_StripeSCA/_void/with_a_confirmed_payment/refunds_the_payment.yml +++ /dev/null @@ -1,1087 +0,0 @@ ---- -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.8.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.8.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: - - Sun, 18 Feb 2024 23:31: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: - - 2ed389f6-f571-412f-8164-91dd63633bab - Original-Request: - - req_meqXmqkS2joigR - Request-Id: - - req_meqXmqkS2joigR - 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_1OlJpq4IDOolHj4A", - "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": 1708299111, - "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_1OlJpq4IDOolHj4A/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: Sun, 18 Feb 2024 23:31:52 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.8.0 - Authorization: - - Bearer - Content-Type: - - application/x-www-form-urlencoded - X-Stripe-Client-Telemetry: - - '{"last_request_metrics":{"request_id":"req_meqXmqkS2joigR","request_duration_ms":2100}}' - Stripe-Version: - - '2023-10-16' - X-Stripe-Client-User-Agent: - - '{"bindings_version":"10.8.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_1OlJpq4IDOolHj4A - 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: - - Sun, 18 Feb 2024 23:31:53 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: - - faeaef1a-6ba5-40e5-be52-848b398c8695 - Original-Request: - - req_MngqpVVLXd1sJL - Request-Id: - - req_MngqpVVLXd1sJL - Stripe-Account: - - acct_1OlJpq4IDOolHj4A - 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_3OlJps4IDOolHj4A0FSKbxMR", - "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_3OlJps4IDOolHj4A0FSKbxMR_secret_j9TxEMm87Qo3bbIs9UEPtVGTK", - "confirmation_method": "automatic", - "created": 1708299112, - "currency": "aud", - "customer": null, - "description": null, - "invoice": null, - "last_payment_error": null, - "latest_charge": "ch_3OlJps4IDOolHj4A0xc8SBvy", - "livemode": false, - "metadata": {}, - "next_action": null, - "on_behalf_of": null, - "payment_method": "pm_1OlJps4IDOolHj4AJIs76ygW", - "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: Sun, 18 Feb 2024 23:31:53 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.8.0 - Authorization: - - Bearer - Content-Type: - - application/x-www-form-urlencoded - X-Stripe-Client-Telemetry: - - '{"last_request_metrics":{"request_id":"req_MngqpVVLXd1sJL","request_duration_ms":1423}}' - Stripe-Version: - - '2023-10-16' - X-Stripe-Client-User-Agent: - - '{"bindings_version":"10.8.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: - - Sun, 18 Feb 2024 23:31:54 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_npRtP9yodXxNC9 - 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_1OlJpuKuuB1fWySnkErwTuoc", - "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": 1708299114, - "customer": null, - "livemode": false, - "metadata": {}, - "type": "card" - } - recorded_at: Sun, 18 Feb 2024 23:31:55 GMT -- request: - method: get - uri: https://api.stripe.com/v1/payment_intents/pi_3OlJps4IDOolHj4A0FSKbxMR - body: - encoding: US-ASCII - string: '' - headers: - User-Agent: - - Stripe/v1 RubyBindings/10.8.0 - Authorization: - - Bearer - Content-Type: - - application/x-www-form-urlencoded - X-Stripe-Client-Telemetry: - - '{"last_request_metrics":{"request_id":"req_npRtP9yodXxNC9","request_duration_ms":560}}' - Stripe-Version: - - '2023-10-16' - X-Stripe-Client-User-Agent: - - '{"bindings_version":"10.8.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_1OlJpq4IDOolHj4A - 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: - - Sun, 18 Feb 2024 23:31:55 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_v39bGC0NS2ATEx - Stripe-Account: - - acct_1OlJpq4IDOolHj4A - 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_3OlJps4IDOolHj4A0FSKbxMR", - "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_3OlJps4IDOolHj4A0FSKbxMR_secret_j9TxEMm87Qo3bbIs9UEPtVGTK", - "confirmation_method": "automatic", - "created": 1708299112, - "currency": "aud", - "customer": null, - "description": null, - "invoice": null, - "last_payment_error": null, - "latest_charge": "ch_3OlJps4IDOolHj4A0xc8SBvy", - "livemode": false, - "metadata": {}, - "next_action": null, - "on_behalf_of": null, - "payment_method": "pm_1OlJps4IDOolHj4AJIs76ygW", - "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: Sun, 18 Feb 2024 23:31:55 GMT -- request: - method: get - uri: https://api.stripe.com/v1/payment_intents/pi_3OlJps4IDOolHj4A0FSKbxMR - 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_1OlJpq4IDOolHj4A - 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: - - Sun, 18 Feb 2024 23:31:56 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_BpoOBuAdbqdFxT - Stripe-Account: - - acct_1OlJpq4IDOolHj4A - 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_3OlJps4IDOolHj4A0FSKbxMR", - "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_3OlJps4IDOolHj4A0xc8SBvy", - "object": "charge", - "amount": 1000, - "amount_captured": 1000, - "amount_refunded": 0, - "application": "", - "application_fee": null, - "application_fee_amount": null, - "balance_transaction": "txn_3OlJps4IDOolHj4A0be0gc2M", - "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": 1708299113, - "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": 15, - "seller_message": "Payment complete.", - "type": "authorized" - }, - "paid": true, - "payment_intent": "pi_3OlJps4IDOolHj4A0FSKbxMR", - "payment_method": "pm_1OlJps4IDOolHj4AJIs76ygW", - "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/CAcaFwoVYWNjdF8xT2xKcHE0SURPb2xIajRBKOymyq4GMgaCH-hx8Xs6LBZk7rUcrlcl82luDEKcN3jln7XbThp1gFFoook-2b4wWsQ3bajF9tLklKpL", - "refunded": false, - "refunds": { - "object": "list", - "data": [], - "has_more": false, - "total_count": 0, - "url": "/v1/charges/ch_3OlJps4IDOolHj4A0xc8SBvy/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_3OlJps4IDOolHj4A0FSKbxMR" - }, - "client_secret": "pi_3OlJps4IDOolHj4A0FSKbxMR_secret_j9TxEMm87Qo3bbIs9UEPtVGTK", - "confirmation_method": "automatic", - "created": 1708299112, - "currency": "aud", - "customer": null, - "description": null, - "invoice": null, - "last_payment_error": null, - "latest_charge": "ch_3OlJps4IDOolHj4A0xc8SBvy", - "livemode": false, - "metadata": {}, - "next_action": null, - "on_behalf_of": null, - "payment_method": "pm_1OlJps4IDOolHj4AJIs76ygW", - "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: Sun, 18 Feb 2024 23:31:56 GMT -- request: - method: post - uri: https://api.stripe.com/v1/charges/ch_3OlJps4IDOolHj4A0xc8SBvy/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_1OlJpq4IDOolHj4A - 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: - - Sun, 18 Feb 2024 23:31:57 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: - - 14e5eaed-eb35-4530-bd97-b10e0b6485e9 - Original-Request: - - req_ZrY5fViOUd9zj5 - Request-Id: - - req_ZrY5fViOUd9zj5 - Stripe-Account: - - acct_1OlJpq4IDOolHj4A - 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_3OlJps4IDOolHj4A0fuLJjYP", - "object": "refund", - "amount": 1000, - "balance_transaction": "txn_3OlJps4IDOolHj4A0uopfEv0", - "charge": { - "id": "ch_3OlJps4IDOolHj4A0xc8SBvy", - "object": "charge", - "amount": 1000, - "amount_captured": 1000, - "amount_refunded": 1000, - "application": "", - "application_fee": null, - "application_fee_amount": null, - "balance_transaction": "txn_3OlJps4IDOolHj4A0be0gc2M", - "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": 1708299113, - "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": 15, - "seller_message": "Payment complete.", - "type": "authorized" - }, - "paid": true, - "payment_intent": "pi_3OlJps4IDOolHj4A0FSKbxMR", - "payment_method": "pm_1OlJps4IDOolHj4AJIs76ygW", - "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/CAcaFwoVYWNjdF8xT2xKcHE0SURPb2xIajRBKO2myq4GMgbWCpqeR486LBbcEhBtNPuCryM5xJKKFpmwBkERo7JjAc7onU_q6xbxOVm8exXEF1tcb9r0", - "refunded": true, - "refunds": { - "object": "list", - "data": [ - { - "id": "re_3OlJps4IDOolHj4A0fuLJjYP", - "object": "refund", - "amount": 1000, - "balance_transaction": "txn_3OlJps4IDOolHj4A0uopfEv0", - "charge": "ch_3OlJps4IDOolHj4A0xc8SBvy", - "created": 1708299116, - "currency": "aud", - "destination_details": { - "card": { - "reference_status": "pending", - "reference_type": "acquirer_reference_number", - "type": "refund" - }, - "type": "card" - }, - "metadata": {}, - "payment_intent": "pi_3OlJps4IDOolHj4A0FSKbxMR", - "reason": null, - "receipt_number": null, - "source_transfer_reversal": null, - "status": "succeeded", - "transfer_reversal": null - } - ], - "has_more": false, - "total_count": 1, - "url": "/v1/charges/ch_3OlJps4IDOolHj4A0xc8SBvy/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": 1708299116, - "currency": "aud", - "destination_details": { - "card": { - "reference_status": "pending", - "reference_type": "acquirer_reference_number", - "type": "refund" - }, - "type": "card" - }, - "metadata": {}, - "payment_intent": "pi_3OlJps4IDOolHj4A0FSKbxMR", - "reason": null, - "receipt_number": null, - "source_transfer_reversal": null, - "status": "succeeded", - "transfer_reversal": null - } - recorded_at: Sun, 18 Feb 2024 23:31:57 GMT -recorded_with: VCR 6.2.0 diff --git a/spec/fixtures/vcr_cassettes/Stripe-v10.8.0/Spree_Gateway_StripeSCA/_void/with_a_voidable_payment/void_the_payment.yml b/spec/fixtures/vcr_cassettes/Stripe-v10.8.0/Spree_Gateway_StripeSCA/_void/with_a_voidable_payment/void_the_payment.yml deleted file mode 100644 index f265e280d7..0000000000 --- a/spec/fixtures/vcr_cassettes/Stripe-v10.8.0/Spree_Gateway_StripeSCA/_void/with_a_voidable_payment/void_the_payment.yml +++ /dev/null @@ -1,738 +0,0 @@ ---- -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.8.0 - Authorization: - - Bearer - Content-Type: - - application/x-www-form-urlencoded - X-Stripe-Client-Telemetry: - - '{"last_request_metrics":{"request_id":"req_v39bGC0NS2ATEx","request_duration_ms":499}}' - Stripe-Version: - - '2023-10-16' - X-Stripe-Client-User-Agent: - - '{"bindings_version":"10.8.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: - - Sun, 18 Feb 2024 23:31:59 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: - - 8f008bd6-9ce8-428b-9327-a5b768f25be2 - Original-Request: - - req_gHdtWKWo8Ywyim - Request-Id: - - req_gHdtWKWo8Ywyim - 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_1OlJpx4FpDs6HNTb", - "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": 1708299118, - "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_1OlJpx4FpDs6HNTb/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: Sun, 18 Feb 2024 23:31:59 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.8.0 - Authorization: - - Bearer - Content-Type: - - application/x-www-form-urlencoded - X-Stripe-Client-Telemetry: - - '{"last_request_metrics":{"request_id":"req_gHdtWKWo8Ywyim","request_duration_ms":1712}}' - Stripe-Version: - - '2023-10-16' - X-Stripe-Client-User-Agent: - - '{"bindings_version":"10.8.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_1OlJpx4FpDs6HNTb - 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: - - Sun, 18 Feb 2024 23:31:59 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: - - ee9d6e1c-4298-444c-b7b7-19d6fbc01eb0 - Original-Request: - - req_Z8fycI2zLmmQsU - Request-Id: - - req_Z8fycI2zLmmQsU - Stripe-Account: - - acct_1OlJpx4FpDs6HNTb - 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_3OlJpz4FpDs6HNTb0Iz2h8vT", - "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_3OlJpz4FpDs6HNTb0Iz2h8vT_secret_I512Wt8V0ucFAWLSMwHPWXvCA", - "confirmation_method": "automatic", - "created": 1708299119, - "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_1OlJpz4FpDs6HNTbKam9f2S3", - "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: Sun, 18 Feb 2024 23:32:00 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.8.0 - Authorization: - - Bearer - Content-Type: - - application/x-www-form-urlencoded - X-Stripe-Client-Telemetry: - - '{"last_request_metrics":{"request_id":"req_Z8fycI2zLmmQsU","request_duration_ms":720}}' - Stripe-Version: - - '2023-10-16' - X-Stripe-Client-User-Agent: - - '{"bindings_version":"10.8.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: - - Sun, 18 Feb 2024 23:32:01 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_ja6110bAf7mNnp - 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_1OlJq0KuuB1fWySnfoDRqyeT", - "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": 1708299120, - "customer": null, - "livemode": false, - "metadata": {}, - "type": "card" - } - recorded_at: Sun, 18 Feb 2024 23:32:01 GMT -- request: - method: get - uri: https://api.stripe.com/v1/payment_intents/pi_3OlJpz4FpDs6HNTb0Iz2h8vT - body: - encoding: US-ASCII - string: '' - headers: - User-Agent: - - Stripe/v1 RubyBindings/10.8.0 - Authorization: - - Bearer - Content-Type: - - application/x-www-form-urlencoded - X-Stripe-Client-Telemetry: - - '{"last_request_metrics":{"request_id":"req_ja6110bAf7mNnp","request_duration_ms":538}}' - Stripe-Version: - - '2023-10-16' - X-Stripe-Client-User-Agent: - - '{"bindings_version":"10.8.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_1OlJpx4FpDs6HNTb - 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: - - Sun, 18 Feb 2024 23:32:01 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_7o6W2mEV9dHwzj - Stripe-Account: - - acct_1OlJpx4FpDs6HNTb - 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_3OlJpz4FpDs6HNTb0Iz2h8vT", - "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_3OlJpz4FpDs6HNTb0Iz2h8vT_secret_I512Wt8V0ucFAWLSMwHPWXvCA", - "confirmation_method": "automatic", - "created": 1708299119, - "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_1OlJpz4FpDs6HNTbKam9f2S3", - "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: Sun, 18 Feb 2024 23:32:01 GMT -- request: - method: post - uri: https://api.stripe.com/v1/payment_intents/pi_3OlJpz4FpDs6HNTb0Iz2h8vT/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_1OlJpx4FpDs6HNTb - 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: - - Sun, 18 Feb 2024 23:32:02 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: - - add367a8-a518-4762-9e62-16695b6a49ca - Original-Request: - - req_juZ0k8HqCGOhHL - Request-Id: - - req_juZ0k8HqCGOhHL - Stripe-Account: - - acct_1OlJpx4FpDs6HNTb - 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_3OlJpz4FpDs6HNTb0Iz2h8vT", - "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": 1708299122, - "cancellation_reason": null, - "capture_method": "manual", - "charges": { - "object": "list", - "data": [], - "has_more": false, - "total_count": 0, - "url": "/v1/charges?payment_intent=pi_3OlJpz4FpDs6HNTb0Iz2h8vT" - }, - "client_secret": "pi_3OlJpz4FpDs6HNTb0Iz2h8vT_secret_I512Wt8V0ucFAWLSMwHPWXvCA", - "confirmation_method": "automatic", - "created": 1708299119, - "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_1OlJpz4FpDs6HNTbKam9f2S3", - "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: Sun, 18 Feb 2024 23:32:02 GMT -recorded_with: VCR 6.2.0