Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.
Ruby b2b-commercee-commerceecommerceecommerce-apiecommerce-frameworkecommerce-platformheadlessheadless-commerceheadless-ecommercemarketplacemulti-tenantmulti-vendormulti-vendor-ecommerceopen-sourcespree-commerce
Drop Apple Pay domain registration and the payment intents concern
Damian Legawiec641c46de068c
diff --git a/docs/plans/6.0-payment-gateways-monorepo.md b/docs/plans/6.0-payment-gateways-monorepo.mdindex f42095bcbe..b42c4dc6d9 100644--- a/docs/plans/6.0-payment-gateways-monorepo.md+++ b/docs/plans/6.0-payment-gateways-monorepo.md@@ -4,7 +4,7 @@**Target:** Spree 6.0**Depends on:** Payment sessions infrastructure (shipped in core), `6.0-multi-vendor-marketplace.md` (Phase 3b consumes the Stripe gem)**Author:** Damian Legawiec-**Last updated:** 2026-08-09+**Last updated:** 2026-08-10## Summary@@ -136,22 +136,29 @@ session gateway, `Spree::Gateway::Bogus`, implements the same six. What left isthe machinery *around* them: creating intents for payments that never had asession, off-session confirmation, and the storefront's redirect/confirm flow.-**Stripe (45 files, ~1,650 LOC):**+**Stripe (39 files, ~1,400 LOC):**- `SpreeStripe::Gateway` + `Gateway::PaymentSessions`,- `Gateway::PaymentSetupSessions`, `Gateway::PaymentIntents`,- `Gateway::Webhooks` concerns (intents are Stripe-side API objects wrapped by- the session flow — no intent AR model exists)+ `Gateway::PaymentSetupSessions`, `Gateway::Webhooks` concerns (intents are+ Stripe-side API objects created by the session flow — no intent AR model and+ no separate intents concern)- `Spree::PaymentSessions::Stripe`, `Spree::PaymentSetupSessions::Stripe`(core-table STI subclasses)- Payment sources (Klarna, Affirm, Alipay, iDEAL, Link, SEPA, bank transfer,Przelewy24, AfterPay), services (CreatePayment, CreateSource,- CreatePaymentSession, CreateGatewayWebhooks, RegisterDomain,- UpdateCustomer), presenters, jobs, the `.stripe` scopes on- `PaymentMethod`/`GatewayCustomer`+ CreatePaymentSession, CreateGatewayWebhooks, UpdateCustomer), jobs, the+ `.stripe` scopes on `PaymentMethod`/`GatewayCustomer`-Apple Pay / Google Pay domain **registration** with Stripe stays — quick-checkout in the session flow depends on it. Serving the domain-association-**file** was a Rails-storefront route and left with the storefront.+**Apple Pay / Google Pay domain registration is dropped too** (2026-08-10).+It assumed Spree knows the storefront's domain, which a headless install does+not — the storefront is someone else's deployment, on a domain the backend+never sees. Registering `store.url` there registers the wrong host. Merchants+register their domains in the Stripe dashboard, which is where a headless setup+has to do it anyway. This removes `RegisterDomain`, its job, the+`CustomDomain` decorator and the domain accessors on `Store`.++Stripe payment **intents** are not a separate subsystem and have no concern of+their own: creating a payment session *is* creating an intent, so those calls+live in `Gateway::PaymentSessions` with the payload building private to it.### Core adaptations the port required@@ -196,6 +203,10 @@ sources):**- Assorted AR decorators (order/payment/store/custom_domain/user) tied to thelegacy flows- All `use_legacy_*` preferences and both branches of their conditionals+- **Apple Pay / Google Pay domain registration** (2026-08-10): `RegisterDomain`,+ `RegisterDomainJob`, the `CustomDomain` decorator and the domain accessors on+ `Store`. It presumed the backend knows the storefront's domain, which is false+ headless — merchants register domains in the Stripe dashboard instead.- **Classic-checkout payment machinery** (2026-08-09): Stripe Tax(`Calculators::StripeTax`, `TaxPresenter`, `CreateTaxTransactionJob`, theshipment decorator that fired it), `SpreeStripe::CompleteOrder` +diff --git a/docs/plans/decisions.md b/docs/plans/decisions.mdindex d21ee2be2d..9d3781646c 100644--- a/docs/plans/decisions.md+++ b/docs/plans/decisions.md@@ -705,6 +705,35 @@ means splitting first, and split-then-ship inside an `after_transition` callbackis exactly the shape `6.0-service-workflows.md` prohibits. The workflow wraps themachine as a low-level mechanic, mirroring how `Fulfillments::Create` alreadywraps `mark_shipped`.+## 2026-08-10 — Stripe drops Apple Pay domain registration; payment intents are not a subsystem++Two removals from the Stripe port, both from the same question: what does a+headless backend actually know?++**Apple Pay / Google Pay domain registration is gone.** The gateway registered+`store.url` with Stripe on create, and re-registered whenever a store code or+custom domain changed. That only works when Spree serves the storefront. Headless,+the storefront is someone else's deployment on a domain the backend never sees,+so the call registers the wrong host — worse than not running, because it looks+like it worked. Merchants register domains in the Stripe dashboard, which is+where a headless setup has to do it regardless. Removes `RegisterDomain`, its+job, the `CustomDomain` decorator and the `stripe_apple_pay_domain_id` /+`stripe_top_level_domain_id` accessors.++**Payment intents are not a parallel system.** A `Gateway::PaymentIntents`+concern alongside `Gateway::PaymentSessions` implied two paths, one of them+legacy. There is one: creating a payment session *is* creating a Stripe payment+intent, and the session stores the intent id as its external id. The intent+calls now live in `Gateway::PaymentSessions`, with payload building private to+it. `PaymentIntentPresenter` went too — it presented nothing, it built a request+body, and `update_payment_intent` proved the framing wrong by constructing the+full create-payload only to `slice` most of it away.++**Consequences:** the gem no longer touches storefront domains at all, and there+is no "intents" vocabulary suggesting a second code path. Net −2,000 lines+against the initial port. A gateway that wants to register domains needs the+storefront's real host as configuration, not `store.url`.+## 2026-08-09 — Stripe moves into the monorepo as a payment-session-only gem, with no tables`spree_stripe` ships from `spree/providers/stripe` in the monorepo, perdiff --git a/spree/providers/stripe/app/jobs/spree_stripe/register_domain_job.rb b/spree/providers/stripe/app/jobs/spree_stripe/register_domain_job.rbdeleted file mode 100644index 2a9a05d9c4..0000000000--- a/spree/providers/stripe/app/jobs/spree_stripe/register_domain_job.rb+++ /dev/null@@ -1,19 +0,0 @@-module SpreeStripe- class RegisterDomainJob < BaseJob- def perform(model_id, klass_type = 'store')- model = model_class(klass_type)&.find_by(id: model_id)- return if model.blank?-- RegisterDomain.new.call(model: model)- end-- private-- def model_class(klass_type)- case klass_type- when 'store' then Spree::Store- when 'custom_domain' then Spree::CustomDomain if defined?(Spree::CustomDomain)- end- end- end-enddiff --git a/spree/providers/stripe/app/models/spree_stripe/custom_domain_decorator.rb b/spree/providers/stripe/app/models/spree_stripe/custom_domain_decorator.rbdeleted file mode 100644index 0fd567b638..0000000000--- a/spree/providers/stripe/app/models/spree_stripe/custom_domain_decorator.rb+++ /dev/null@@ -1,18 +0,0 @@-module SpreeStripe- module CustomDomainDecorator- def self.prepended(base)- base.store_accessor :metadata, :stripe_apple_pay_domain_id- base.store_accessor :metadata, :stripe_top_level_domain_id-- base.after_create :register_stripe_domain- end-- def register_stripe_domain- return if store.stripe_gateway.blank?-- SpreeStripe::RegisterDomainJob.perform_later(id, 'custom_domain')- end- end-end--Spree::CustomDomain.prepend(SpreeStripe::CustomDomainDecorator) if defined?(Spree::CustomDomain)diff --git a/spree/providers/stripe/app/models/spree_stripe/gateway.rb b/spree/providers/stripe/app/models/spree_stripe/gateway.rbindex 46d01e8a4a..9f14eb2882 100644--- a/spree/providers/stripe/app/models/spree_stripe/gateway.rb+++ b/spree/providers/stripe/app/models/spree_stripe/gateway.rb@@ -3,7 +3,6 @@ module SpreeStripe# created and confirmed through sessions; core's payment lifecycle then drives# capture, refund and cancellation against the resulting intent.class Gateway < ::Spree::Gateway- include SpreeStripe::Gateway::PaymentIntentsinclude SpreeStripe::Gateway::PaymentSessionsinclude SpreeStripe::Gateway::PaymentSetupSessionsinclude SpreeStripe::Gateway::Webhooks@@ -14,8 +13,6 @@ module SpreeStripevalidates :preferred_secret_key, :preferred_publishable_key, presence: truevalidate :validate_secret_key, unless: -> { Rails.env.test? }, if: -> { preferred_secret_key.present? }- after_commit :register_domains, on: :create-def provider_classself.classend@@ -220,19 +217,6 @@ module SpreeStripeendend- # Apple Pay and Google Pay only appear on domains registered with Stripe.- def register_domains- return if store.blank?-- SpreeStripe::RegisterDomainJob.perform_later(store.id, 'store')-- return unless defined?(Spree::CustomDomain)-- store.custom_domains.each do |custom_domain|- SpreeStripe::RegisterDomainJob.perform_later(custom_domain.id, 'custom_domain')- end- end-def validate_secret_keyStripe::Refund.list({ limit: 0 }, api_options)rescue Stripe::AuthenticationErrordiff --git a/spree/providers/stripe/app/models/spree_stripe/gateway/payment_intents.rb b/spree/providers/stripe/app/models/spree_stripe/gateway/payment_intents.rbdeleted file mode 100644index 8414982d67..0000000000--- a/spree/providers/stripe/app/models/spree_stripe/gateway/payment_intents.rb+++ /dev/null@@ -1,117 +0,0 @@-module SpreeStripe- class Gateway < ::Spree::Gateway- # Stripe payment intents are API objects rather than Spree records — the- # payment session owns their lifecycle and stores the intent id as its- # external id.- module PaymentIntents- extend ActiveSupport::Concern-- # Banks confirm these asynchronously, so `processing` is as good as accepted.- DELAYED_NOTIFICATION_PAYMENT_METHOD_TYPES = %w[sepa_debit us_bank_account].freeze- # Funds arrive out of band, leaving the intent in `requires_action`.- BANK_PAYMENT_METHOD_TYPES = %w[customer_balance us_bank_account].freeze- MANUAL_CAPTURE_METHOD = 'manual'.freeze-- def payment_intent_accepted?(payment_intent)- payment_intent.status.in?(payment_intent_accepted_statuses(payment_intent))- end-- def payment_intent_successful?(payment_intent)- payment_intent.status == 'succeeded'- end-- def payment_intent_requires_capture?(payment_intent)- payment_intent.status == 'requires_capture'- end-- def payment_intent_delayed_notification?(payment_intent)- payment_intent_type_in?(payment_intent, DELAYED_NOTIFICATION_PAYMENT_METHOD_TYPES)- end-- # Bank transfers settle without a charge object, so the source has to be- # built from the intent instead.- def payment_intent_charge_not_required?(payment_intent)- payment_intent_type_in?(payment_intent, BANK_PAYMENT_METHOD_TYPES)- end-- def payment_intent_manual_capture?(payment_intent)- payment_intent.respond_to?(:capture_method) && payment_intent.capture_method == MANUAL_CAPTURE_METHOD- end-- # @param amount_in_cents [Integer]- # @param order [Spree::Order, Spree::Cart]- # @param payment_method_id [String, nil] Stripe payment method id, eg. pm_123- # @param customer_profile_id [String, nil] Stripe customer id, eg. cus_123- # @return [Spree::PaymentResponse]- def create_payment_intent(amount_in_cents, order, payment_method_id: nil, customer_profile_id: nil)- payload = SpreeStripe::PaymentIntentPresenter.new(- amount: amount_in_cents,- order: order,- customer: customer_profile_id,- payment_method_id: payment_method_id,- capture_method: stripe_capture_method- ).call-- protect_from_error do- response = send_request { |opts| Stripe::PaymentIntent.create(payload, opts) }-- success(response.id, response)- end- end-- # @param payment_intent_id [String] eg. pi_123- # @return [Spree::PaymentResponse]- def update_payment_intent(payment_intent_id, amount_in_cents, order, payment_method_id = nil)- protect_from_error do- payload = SpreeStripe::PaymentIntentPresenter.new(- amount: amount_in_cents,- order: order,- customer: fetch_or_create_customer(order: order)&.profile_id,- payment_method_id: payment_method_id- ).call.slice(:amount, :currency, :payment_method, :shipping, :customer)-- response = send_request { |opts| Stripe::PaymentIntent.update(payment_intent_id, payload, opts) }-- success(response.id, response)- end- end-- def retrieve_payment_intent(payment_intent_id)- send_request { |opts| Stripe::PaymentIntent.retrieve({ id: payment_intent_id, expand: ['payment_method'] }, opts) }- end-- def confirm_payment_intent(payment_intent_id)- send_request { |opts| Stripe::PaymentIntent.confirm(payment_intent_id, {}, opts) }- end-- def capture_payment_intent(payment_intent_id, amount_in_cents)- send_request { |opts| Stripe::PaymentIntent.capture(payment_intent_id, { amount_to_capture: amount_in_cents }, opts) }- end-- def cancel_payment_intent(payment_intent_id)- send_request { |opts| Stripe::PaymentIntent.cancel(payment_intent_id, {}, opts) }- end-- private-- def payment_intent_type_in?(payment_intent, types)- payment_method = payment_intent.payment_method- return false unless payment_method.respond_to?(:type)-- payment_method.type.in?(types)- end-- def stripe_capture_method- auto_capture? ? nil : MANUAL_CAPTURE_METHOD- end-- def payment_intent_accepted_statuses(payment_intent)- statuses = %w[succeeded]- statuses << 'requires_capture' if payment_intent_manual_capture?(payment_intent)- statuses << 'processing' if payment_intent_delayed_notification?(payment_intent)- statuses << 'requires_action' if payment_intent_charge_not_required?(payment_intent)- statuses- end- end- end-enddiff --git a/spree/providers/stripe/app/models/spree_stripe/gateway/payment_sessions.rb b/spree/providers/stripe/app/models/spree_stripe/gateway/payment_sessions.rbindex 91f301c000..601cac320e 100644--- a/spree/providers/stripe/app/models/spree_stripe/gateway/payment_sessions.rb+++ b/spree/providers/stripe/app/models/spree_stripe/gateway/payment_sessions.rb@@ -1,8 +1,18 @@module SpreeStripeclass Gateway < ::Spree::Gateway+ # A Stripe payment session is a Stripe payment intent: creating the session+ # creates the intent, and the session stores its id as the external id.+ # Intents are Stripe-side API objects — there is no intent record in Spree.module PaymentSessionsextend ActiveSupport::Concern+ # Banks confirm these asynchronously, so `processing` is as good as accepted.+ DELAYED_NOTIFICATION_PAYMENT_METHOD_TYPES = %w[sepa_debit us_bank_account].freeze+ # Funds arrive out of band, leaving the intent in `requires_action`.+ BANK_PAYMENT_METHOD_TYPES = %w[customer_balance us_bank_account].freeze+ MANUAL_CAPTURE_METHOD = 'manual'.freeze+ SETUP_FUTURE_USAGE = 'off_session'.freeze+def session_required?trueend@@ -105,8 +115,138 @@ module SpreeStripepayment_sessionend+ def retrieve_payment_intent(payment_intent_id)+ send_request { |opts| Stripe::PaymentIntent.retrieve({ id: payment_intent_id, expand: ['payment_method'] }, opts) }+ end++ def confirm_payment_intent(payment_intent_id)+ send_request { |opts| Stripe::PaymentIntent.confirm(payment_intent_id, {}, opts) }+ end++ def capture_payment_intent(payment_intent_id, amount_in_cents)+ send_request { |opts| Stripe::PaymentIntent.capture(payment_intent_id, { amount_to_capture: amount_in_cents }, opts) }+ end++ def cancel_payment_intent(payment_intent_id)+ send_request { |opts| Stripe::PaymentIntent.cancel(payment_intent_id, {}, opts) }+ end++ # Whether the intent has progressed far enough to record a payment. The+ # acceptable statuses depend on how the money moves: manual capture stops+ # at `requires_capture`, delayed-notification banks sit in `processing`,+ # and bank transfers wait for funds in `requires_action`.+ def payment_intent_accepted?(payment_intent)+ statuses = %w[succeeded]+ statuses << 'requires_capture' if payment_intent_manual_capture?(payment_intent)+ statuses << 'processing' if payment_intent_type_in?(payment_intent, DELAYED_NOTIFICATION_PAYMENT_METHOD_TYPES)+ statuses << 'requires_action' if payment_intent_charge_not_required?(payment_intent)++ payment_intent.status.in?(statuses)+ end++ def payment_intent_successful?(payment_intent)+ payment_intent.status == 'succeeded'+ end++ def payment_intent_requires_capture?(payment_intent)+ payment_intent.status == 'requires_capture'+ end++ # Bank transfers settle without a charge object, so the payment source has+ # to be built from the intent instead.+ def payment_intent_charge_not_required?(payment_intent)+ payment_intent_type_in?(payment_intent, BANK_PAYMENT_METHOD_TYPES)+ end++ def payment_intent_manual_capture?(payment_intent)+ payment_intent.respond_to?(:capture_method) && payment_intent.capture_method == MANUAL_CAPTURE_METHOD+ end+private+ # @param order [Spree::Cart, Spree::Order]+ # @return [Spree::PaymentResponse]+ def create_payment_intent(amount_in_cents, order, payment_method_id: nil, customer_profile_id: nil)+ payload = {+ amount: amount_in_cents,+ currency: order.currency,+ customer: customer_profile_id,+ payment_method: payment_method_id,+ capture_method: (MANUAL_CAPTURE_METHOD unless auto_capture?),+ statement_descriptor_suffix: statement_descriptor_suffix_for(order),+ automatic_payment_methods: { enabled: true },+ transfer_group: order.number,+ metadata: { spree_order_id: order.id },+ shipping: shipping_payload(order.ship_address)+ }.compact++ # A saved payment method is already tokenized; a new one is stored so it+ # can be charged off-session later.+ payload[:payment_method_options] = {+ card: { setup_future_usage: SETUP_FUTURE_USAGE },+ sepa_debit: { setup_future_usage: SETUP_FUTURE_USAGE }+ } if payment_method_id.blank?++ protect_from_error do+ response = send_request { |opts| Stripe::PaymentIntent.create(payload, opts) }++ success(response.id, response)+ end+ end++ # Only the fields that can legitimately change while a session is pending.+ def update_payment_intent(payment_intent_id, amount_in_cents, order, payment_method_id = nil)+ protect_from_error do+ payload = {+ amount: amount_in_cents,+ currency: order.currency,+ customer: fetch_or_create_customer(order: order)&.profile_id,+ payment_method: payment_method_id,+ shipping: shipping_payload(order.ship_address)+ }.compact++ response = send_request { |opts| Stripe::PaymentIntent.update(payment_intent_id, payload, opts) }++ success(response.id, response)+ end+ end++ # Stripe requires address1 on a shipping address; Spree does not always+ # demand one, so an incomplete address is omitted rather than rejected.+ #+ # @return [Hash, nil]+ def shipping_payload(ship_address)+ return if ship_address.blank?++ if ship_address.invalid? || ship_address.address1.blank?+ ship_address.errors.clear+ return+ end++ {+ address: {+ city: ship_address.city,+ country: ship_address.country_iso,+ line1: ship_address.address1,+ line2: ship_address.address2,+ postal_code: ship_address.zipcode,+ state: ship_address.state_abbr+ },+ name: ship_address.full_name+ }+ end++ def statement_descriptor_suffix_for(order)+ SpreeStripe::StatementDescriptorSuffixPresenter.new(order_description: order.number).call+ end++ def payment_intent_type_in?(payment_intent, types)+ payment_method = payment_intent.payment_method+ return false unless payment_method.respond_to?(:type)++ payment_method.type.in?(types)+ end+# Quick checkout (Apple Pay / Google Pay) confirms payment before the# storefront has a billing address, so it arrives on the Stripe charge.#diff --git a/spree/providers/stripe/app/models/spree_stripe/store_decorator.rb b/spree/providers/stripe/app/models/spree_stripe/store_decorator.rbindex 1474461d98..05ecb19815 100644--- a/spree/providers/stripe/app/models/spree_stripe/store_decorator.rb+++ b/spree/providers/stripe/app/models/spree_stripe/store_decorator.rb@@ -1,24 +1,9 @@module SpreeStripemodule StoreDecorator- def self.prepended(base)- base.store_accessor :metadata, :stripe_apple_pay_domain_id- base.store_accessor :metadata, :stripe_top_level_domain_id-- base.after_commit :register_stripe_domain, on: :update, if: -> { code_previously_changed? }- end-# @return [SpreeStripe::Gateway, nil]def stripe_gateway@stripe_gateway ||= payment_methods.stripe.active.lastend-- private-- def register_stripe_domain- return if stripe_gateway.blank?-- SpreeStripe::RegisterDomainJob.perform_later(id)- endendenddiff --git a/spree/providers/stripe/app/presenters/spree_stripe/payment_intent_presenter.rb b/spree/providers/stripe/app/presenters/spree_stripe/payment_intent_presenter.rbdeleted file mode 100644index bbe333b4e7..0000000000--- a/spree/providers/stripe/app/presenters/spree_stripe/payment_intent_presenter.rb+++ /dev/null@@ -1,87 +0,0 @@-module SpreeStripe- class PaymentIntentPresenter- SETUP_FUTURE_USAGE = 'off_session'.freeze-- # @param order [Spree::Cart, Spree::Order]- # @param customer [String, nil] Stripe customer id, eg. cus_123- # @param payment_method_id [String, nil] Stripe payment method id, eg. pm_123- def initialize(amount:, order:, customer: nil, payment_method_id: nil, capture_method: nil)- @amount = amount- @order = order- @customer = customer- @ship_address = order.ship_address- @payment_method_id = payment_method_id- @capture_method = capture_method- end-- # @return [Hash]- def call- payload = payment_method_id.present? ? saved_payment_method_payload : new_payment_method_payload- payload = payload.deep_merge(basic_payload)- payload = payload.merge(capture_method: Gateway::PaymentIntents::MANUAL_CAPTURE_METHOD) if manual_capture?-- return payload unless ship_address-- # Stripe requires address1, which Spree does not always demand.- if ship_address.invalid? || ship_address.address1.blank?- ship_address.errors.clear- return payload- end-- payload.merge(ship_address_payload)- end-- def ship_address_payload- {- shipping: {- address: {- city: ship_address.city,- country: ship_address.country_iso,- line1: ship_address.address1,- line2: ship_address.address2,- postal_code: ship_address.zipcode,- state: ship_address.state_abbr- },- name: ship_address.full_name- }- }- end-- private-- attr_reader :order, :amount, :customer, :ship_address, :payment_method_id, :capture_method-- def manual_capture?- capture_method.to_s == Gateway::PaymentIntents::MANUAL_CAPTURE_METHOD- end-- def basic_payload- {- amount: amount,- customer: customer,- currency: order.currency,- statement_descriptor_suffix: statement_descriptor_suffix,- automatic_payment_methods: { enabled: true },- transfer_group: order.number,- metadata: { spree_order_id: order.id }- }- end-- def statement_descriptor_suffix- SpreeStripe::StatementDescriptorSuffixPresenter.new(order_description: order.number).call- end-- def new_payment_method_payload- {- payment_method_options: {- card: { setup_future_usage: SETUP_FUTURE_USAGE },- sepa_debit: { setup_future_usage: SETUP_FUTURE_USAGE }- }- }- end-- def saved_payment_method_payload- { payment_method: payment_method_id }- end- end-enddiff --git a/spree/providers/stripe/app/services/spree_stripe/register_domain.rb b/spree/providers/stripe/app/services/spree_stripe/register_domain.rbdeleted file mode 100644index 34bc7c63ee..0000000000--- a/spree/providers/stripe/app/services/spree_stripe/register_domain.rb+++ /dev/null@@ -1,34 +0,0 @@-module SpreeStripe- # Registers a storefront domain with Stripe. Apple Pay and Google Pay only- # offer themselves on domains Stripe has verified, so quick checkout depends- # on this having run.- class RegisterDomain- # @param model [Spree::Store, Spree::CustomDomain]- # @return [Stripe::PaymentMethodDomain, nil]- def call(model:)- gateway = model.is_a?(Spree::Store) ? model.stripe_gateway : model.store.stripe_gateway- return if gateway.blank?-- payment_method_domain = gateway.send_request do |opts|- Stripe::PaymentMethodDomain.create({ domain_name: model.url }, opts)- end-- attributes_to_update = { stripe_apple_pay_domain_id: payment_method_domain.id }-- # A custom domain on a subdomain needs its apex registered too, or Apple Pay- # refuses to render there.- tld_length = model.url.split('.').length- if tld_length > 2 && defined?(Spree::CustomDomain) && model.is_a?(Spree::CustomDomain)- top_level_domain_name = model.url.split('.').last(tld_length - 1).join('.')- top_level_domain = gateway.send_request do |opts|- Stripe::PaymentMethodDomain.create({ domain_name: top_level_domain_name }, opts)- end- attributes_to_update[:stripe_top_level_domain_id] = top_level_domain.id- end-- model.update!(**attributes_to_update)-- payment_method_domain- end- end-enddiff --git a/spree/providers/stripe/spec/models/spree_stripe/gateway_spec.rb b/spree/providers/stripe/spec/models/spree_stripe/gateway_spec.rbindex f55e34c79f..1deed8af80 100644--- a/spree/providers/stripe/spec/models/spree_stripe/gateway_spec.rb+++ b/spree/providers/stripe/spec/models/spree_stripe/gateway_spec.rb@@ -149,46 +149,6 @@ RSpec.describe SpreeStripe::Gateway doendend- describe '#payment_intent_delayed_notification?' do- subject { gateway.payment_intent_delayed_notification?(stripe_payment_intent) }-- let(:stripe_payment_intent) do- Stripe::StripeObject.construct_from(- id: 'pi_123',- status: 'succeeded',- payment_method: stripe_payment_method- )- end-- let(:stripe_payment_method) do- { type: payment_method_type }- end-- context 'for a card payment method' do- let(:payment_method_type) { 'card' }-- it { is_expected.to be(false) }- end-- context 'for a sepa debit payment method' do- let(:payment_method_type) { 'sepa_debit' }-- it { is_expected.to be(true) }- end-- context 'when the payment method is not expanded' do- let(:stripe_payment_method) { 'pm_1234567890' }-- it { is_expected.to be(false) }- end-- context 'when the payment method type is not provided' do- let(:stripe_payment_method) { nil }-- it { is_expected.to be(false) }- end- end-describe '#payment_intent_charge_not_required?' dosubject { gateway.payment_intent_charge_not_required?(stripe_payment_intent) }@@ -285,24 +245,8 @@ RSpec.describe SpreeStripe::Gateway doendend- describe '#after_commit :register_domains' do- subject(:create_gateway) { gateway }-- it 'schedules a job to register the Apple Pay store domain' do- expect { create_gateway }.to have_enqueued_job(SpreeStripe::RegisterDomainJob).once.with(store.id, 'store')- end-- context 'on update' do- before { create_gateway }-- it 'does nothing' do- expect { gateway.update!(name: 'test') }.not_to have_enqueued_job(SpreeStripe::RegisterDomainJob)- end- end- end-- describe '#create_payment_intent' do- subject { gateway.create_payment_intent(amount, order) }+ describe 'creating the payment intent' do+ subject { gateway.send(:create_payment_intent, amount, order) }let(:order) { create(:order_with_line_items, store: store) }@@ -338,11 +282,7 @@ RSpec.describe SpreeStripe::Gateway docontext 'when auto_capture is false on the gateway' dobefore { gateway.update!(auto_capture: false) }- it 'forwards capture_method: manual to the PaymentIntentPresenter' do- expect(SpreeStripe::PaymentIntentPresenter).to receive(:new).with(- hash_including(capture_method: 'manual')- ).and_call_original-+ it 'asks Stripe for manual capture' doVCR.use_cassette('create_payment_intent_manual_capture') doexpect(subject.success?).to be(true)expect(subject.params['capture_method']).to eq('manual')@@ -354,20 +294,17 @@ RSpec.describe SpreeStripe::Gateway docontext 'when auto_capture is true on the gateway' dobefore { gateway.update!(auto_capture: true) }- it 'does not forward capture_method to the PaymentIntentPresenter' do- expect(SpreeStripe::PaymentIntentPresenter).to receive(:new).with(- hash_including(capture_method: nil)- ).and_call_original-+ it 'leaves the capture method to Stripe' doVCR.use_cassette('create_payment_intent') doexpect(subject.success?).to be(true)+ expect(subject.params['capture_method']).to eq('automatic')endendendend- describe '#update_payment_intent' do- subject { gateway.update_payment_intent(payment_intent_id, amount, order, payment_method_id) }+ describe 'updating the payment intent' do+ subject { gateway.send(:update_payment_intent, payment_intent_id, amount, order, payment_method_id) }let!(:gateway_customer) { create(:gateway_customer, customer: order.customer, payment_method: gateway, profile_id: customer_id) }let(:order) { create(:order_with_line_items, store: store) }diff --git a/spree/providers/stripe/spec/presenters/spree_stripe/payment_intent_presenter_spec.rb b/spree/providers/stripe/spec/presenters/spree_stripe/payment_intent_presenter_spec.rbdeleted file mode 100644index 6d2f6a2ca4..0000000000--- a/spree/providers/stripe/spec/presenters/spree_stripe/payment_intent_presenter_spec.rb+++ /dev/null@@ -1,154 +0,0 @@-require 'spec_helper'--RSpec.describe SpreeStripe::PaymentIntentPresenter do- subject { presenter.call }-- let(:presenter) do- described_class.new(- amount: amount,- order: order,- customer: customer,- payment_method_id: payment_method_id- )- end-- let(:order_number) { 'R123456789' }- let(:store) { @default_store }- let(:order) { create(:order, number: order_number, store: store) }- let(:customer) { 'cus_123' }- let(:amount) { 100 }- let(:payment_method_id) { nil }-- let(:statement_descriptor_prefix) { 'ORDER123' }- let(:statement_descriptor_stub) do- instance_double(SpreeStripe::StatementDescriptorSuffixPresenter, call: statement_descriptor_prefix)- end-- let(:base_payload) do- {- amount: amount,- customer: customer,- currency: order.currency,- statement_descriptor_suffix: statement_descriptor_prefix,- automatic_payment_methods: { enabled: true },- transfer_group: order.number,- metadata: { spree_order_id: order.id }- }- end-- let(:new_payment_method_payload) do- {- payment_method_options: {- card: { setup_future_usage: 'off_session' },- sepa_debit: { setup_future_usage: 'off_session' }- }- }- end-- before do- allow(SpreeStripe::StatementDescriptorSuffixPresenter).to receive(:new).- with(order_description: order.number).and_return(statement_descriptor_stub)- end-- context 'when payment_method_id is present' do- let(:payment_method_id) { 'pm_123' }-- it 'returns a payload with the saved payment method' do- expect(subject).to eq(base_payload.merge(payment_method: payment_method_id))- end- end-- context 'when payment_method_id is not present' do- it 'returns a payload asking Stripe to save the new payment method' do- expect(subject).to eq(base_payload.merge(new_payment_method_payload))- end- end-- context 'when the order has no customer' do- let(:order) { create(:order, customer: nil, email: '[email protected]', number: order_number, store: store) }-- it 'returns a payload asking Stripe to save the new payment method' do- expect(subject).to eq(base_payload.merge(new_payment_method_payload))- end- end-- context 'when ship_address is present' do- let(:ship_address) { create(:address) }-- before { allow(order).to receive(:ship_address).and_return(ship_address) }-- it 'returns a payload with the shipping address' do- expect(subject).to eq(- base_payload.merge(new_payment_method_payload).merge(- shipping: {- address: {- city: ship_address.city,- country: ship_address.country_iso,- line1: ship_address.address1,- line2: ship_address.address2,- postal_code: ship_address.zipcode,- state: ship_address.state_abbr- },- name: ship_address.full_name- }- )- )- end-- context 'when the ship address has no address1' do- let(:ship_address) { build(:address, address1: nil) }-- it 'omits the shipping address, which Stripe would reject' do- expect(subject).not_to have_key(:shipping)- end- end- end-- describe 'capture_method handling' do- context 'when capture_method is nil (default)' do- it 'does not include capture_method in the payload' do- expect(subject).not_to have_key(:capture_method)- end- end-- context 'when capture_method is "manual"' do- let(:presenter) do- described_class.new(- amount: amount,- order: order,- customer: customer,- payment_method_id: payment_method_id,- capture_method: 'manual'- )- end-- it 'includes capture_method: manual in the payload (new payment method flow)' do- expect(subject[:capture_method]).to eq('manual')- end-- context 'with a saved payment method' do- let(:payment_method_id) { 'pm_123' }-- it 'includes capture_method: manual in the payload' do- expect(subject[:capture_method]).to eq('manual')- end- end- end-- context 'when capture_method is "automatic"' do- let(:presenter) do- described_class.new(- amount: amount,- order: order,- customer: customer,- payment_method_id: payment_method_id,- capture_method: 'automatic'- )- end-- it 'does not include capture_method (Stripe default)' do- expect(subject).not_to have_key(:capture_method)- end- end- end-enddiff --git a/spree/providers/stripe/spec/services/spree_stripe/register_domain_spec.rb b/spree/providers/stripe/spec/services/spree_stripe/register_domain_spec.rbdeleted file mode 100644index a48ccf4f98..0000000000--- a/spree/providers/stripe/spec/services/spree_stripe/register_domain_spec.rb+++ /dev/null@@ -1,78 +0,0 @@-require 'spec_helper'--RSpec.describe SpreeStripe::RegisterDomain do- subject(:register_domain) { described_class.new.call(model: model) }-- let(:store) { create(:store) }- let!(:stripe_gateway) { create(:stripe_gateway, store: store) }-- let(:payment_method_domain) do- Stripe::PaymentMethodDomain.list({ domain_name: domain }, stripe_gateway.api_options).data.find do |stripe_domain|- stripe_domain.domain_name == domain- end- end-- let(:apple_pay_top_level_domain) do- Stripe::PaymentMethodDomain.list({ domain_name: tld_domain }, stripe_gateway.api_options).data.find do |stripe_domain|- stripe_domain.domain_name == tld_domain- end- end-- context 'for store' do- let(:model) { store }- let(:domain) { 'dare-gerhold-and-pagac.lvh.me' }-- before { allow(model).to receive(:url).and_return(domain) }-- it 'register only store domain', :vcr do- expect(Stripe::PaymentMethodDomain).to receive(:create).once.with({ domain_name: domain }, anything).and_call_original- register_domain-- expect(payment_method_domain).to be_present- expect(model.stripe_apple_pay_domain_id).to eq(payment_method_domain.id)- end- end-- # Custom domains ship in spree_multi_store, so these only run where it is loaded.- context 'for custom domain', if: defined?(Spree::CustomDomain) do- let(:model) { create(:custom_domain, url: domain, store: store) }-- context 'when tld length is more then 2' do- let(:tld_domain) { 'store-with-apple-pay.com' }- let(:domain) { "shop.#{tld_domain}" }-- it 'registers the Apple Pay domain and top level domain in Stripe', :vcr do- register_domain-- expect(payment_method_domain).to be_present- expect(apple_pay_top_level_domain).to be_present- expect(model.stripe_apple_pay_domain_id).to eq(payment_method_domain.id)- expect(model.stripe_top_level_domain_id).to eq(apple_pay_top_level_domain.id)- end- end-- context 'when tld length is 2' do- let(:tld_domain) { 'store-with-apple-pay.com' }- let(:domain) { tld_domain }-- it 'registers only custom domain', :vcr do- expect(Stripe::PaymentMethodDomain).to receive(:create).once.with({ domain_name: domain }, anything).and_call_original- register_domain-- expect(payment_method_domain).to be_present- expect(model.stripe_apple_pay_domain_id).to eq(payment_method_domain.id)- expect(model.stripe_top_level_domain_id).to be_nil- end- end- end-- context 'when the store has no Stripe gateway' do- let!(:stripe_gateway) { nil }- let(:model) { store }-- it 'does nothing' do- expect(Stripe::PaymentMethodDomain).not_to receive(:create)- expect(register_domain).to be_nil- end- end-enddiff --git a/spree/providers/stripe/spec/vcr/SpreeStripe_RegisterDomain/for_custom_domain/when_tld_length_is_2/registers_only_custom_domain.yml b/spree/providers/stripe/spec/vcr/SpreeStripe_RegisterDomain/for_custom_domain/when_tld_length_is_2/registers_only_custom_domain.ymldeleted file mode 100644index 01b325beaf..0000000000--- a/spree/providers/stripe/spec/vcr/SpreeStripe_RegisterDomain/for_custom_domain/when_tld_length_is_2/registers_only_custom_domain.yml+++ /dev/null@@ -1,387 +0,0 @@-----http_interactions:-- request:- method: post- uri: https://api.stripe.com/v1/apple_pay/domains- body:- encoding: UTF-8- string: domain_name=store-with-apple-pay.com- headers:- User-Agent:- - Stripe/v1 RubyBindings/10.1.0 PayRails/7.1.0 (https://github.com/pay-rails/pay)- Authorization:- - Bearer <STRIPE_SECRET_KEY>- Content-Type:- - application/x-www-form-urlencoded- Idempotency-Key:- - 6b1c174d-3557-4d9e-b402-a7128bd7e66e- Stripe-Version:- - '2023-10-16'- X-Stripe-Client-User-Agent:- - "<FILTERED>"- 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:- - Thu, 15 Feb 2024 09:46:05 GMT- Content-Type:- - application/json- Content-Length:- - '166'- 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%2Fapple_pay%2Fdomains; 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:- - 6b1c174d-3557-4d9e-b402-a7128bd7e66e- Original-Request:- - req_WEjy5iAPP7vrqT- Request-Id:- - req_WEjy5iAPP7vrqT- 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": "apwc_1OhWNdIhR0gIegIe8QpNWSqX",- "object": "apple_pay_domain",- "created": 1707394021,- "domain_name": "store-with-apple-pay.com",- "livemode": false- }- recorded_at: Thu, 15 Feb 2024 09:46:05 GMT-- request:- method: get- uri: https://api.stripe.com/v1/apple_pay/domains?domain_name=store-with-apple-pay.com- body:- encoding: US-ASCII- string: ''- headers:- User-Agent:- - Stripe/v1 RubyBindings/10.1.0 PayRails/7.1.0 (https://github.com/pay-rails/pay)- Authorization:- - Bearer <STRIPE_SECRET_KEY>- Content-Type:- - application/x-www-form-urlencoded- X-Stripe-Client-Telemetry:- - '{"last_request_metrics":{"request_id":"req_WEjy5iAPP7vrqT","request_duration_ms":396}}'- Stripe-Version:- - '2023-10-16'- X-Stripe-Client-User-Agent:- - "<FILTERED>"- 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:- - Thu, 15 Feb 2024 09:46:05 GMT- Content-Type:- - application/json- Content-Length:- - '289'- 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%2Fapple_pay%2Fdomains; 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_C8N8oANwwicBoO- 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: |-- {- "object": "list",- "data": [- {- "id": "apwc_1OhWNdIhR0gIegIe8QpNWSqX",- "object": "apple_pay_domain",- "created": 1707394021,- "domain_name": "store-with-apple-pay.com",- "livemode": false- }- ],- "has_more": false,- "url": "/v1/apple_pay/domains"- }- recorded_at: Thu, 15 Feb 2024 09:46:05 GMT-- request:- method: post- uri: https://api.stripe.com/v1/payment_method_domains- body:- encoding: UTF-8- string: domain_name=store-with-apple-pay.com- headers:- User-Agent:- - Stripe/v1 RubyBindings/10.1.0 Spree Stripe/1.0.0 (https://spreecommerce.org)- Authorization:- - Bearer <STRIPE_SECRET_KEY>- Content-Type:- - application/x-www-form-urlencoded- Stripe-Version:- - '2023-10-16'- X-Stripe-Client-User-Agent:- - "<FILTERED>"- 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:- - Tue, 31 Dec 2024 09:41:45 GMT- Content-Type:- - application/json- Content-Length:- - '408'- 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:- - base-uri 'none'; default-src 'none'; form-action 'none'; frame-ancestors 'none';- img-src 'self'; script-src 'self' 'report-sample'; style-src 'self'; upgrade-insecure-requests;- report-uri /csp-violation https://q.stripe.com/csp-violation?q=1ARCkfrIyfevu4VuIsPtIrYo-6G7s0xS8iNnIjwuARQZEuFIajmyq3-kmJylOPvCwlvi5KxqTg%3D%3D- Cross-Origin-Opener-Policy-Report-Only:- - same-origin; report-to="coop"- Idempotency-Key:- - e67f1ba1-79ef-484e-89b2-3c179b67cd40- Original-Request:- - req_lgqeYnYQU37zYu- Report-To:- - '{"group":"coop","max_age":8640,"endpoints":[{"url":"https://q.stripe.com/coop-report"}],"include_subdomains":true}'- Reporting-Endpoints:- - coop="https://q.stripe.com/coop-report"- Request-Id:- - req_lgqeYnYQU37zYu- Stripe-Should-Retry:- - 'false'- Stripe-Version:- - '2023-10-16'- Vary:- - Origin- X-Content-Type-Options:- - nosniff- X-Stripe-Priority-Routing-Enabled:- - 'true'- X-Stripe-Routing-Context-Priority-Tier:- - api-testmode- X-Wc:- - AB- Strict-Transport-Security:- - max-age=63072000; includeSubDomains; preload- body:- encoding: UTF-8- string: |-- {- "id": "pmd_1Qc1xM2ESifGlJez2fLCZgBp",- "object": "payment_method_domain",- "amazon_pay": {- "status": "active"- },- "apple_pay": {- "status": "active"- },- "created": 1735638104,- "domain_name": "store-with-apple-pay.com",- "enabled": true,- "google_pay": {- "status": "active"- },- "link": {- "status": "active"- },- "livemode": false,- "paypal": {- "status": "active"- }- }- recorded_at: Tue, 31 Dec 2024 09:41:45 GMT-- request:- method: get- uri: https://api.stripe.com/v1/payment_method_domains?domain_name=store-with-apple-pay.com- body:- encoding: US-ASCII- string: ''- headers:- User-Agent:- - Stripe/v1 RubyBindings/10.1.0 Spree Stripe/1.0.0 (https://spreecommerce.org)- Authorization:- - Bearer <STRIPE_SECRET_KEY>- Content-Type:- - application/x-www-form-urlencoded- Stripe-Version:- - '2023-10-16'- X-Stripe-Client-User-Agent:- - "<FILTERED>"- Api-Version:- - '2023-10-16'- 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:- - Tue, 31 Dec 2024 09:41:45 GMT- Content-Type:- - application/json- Content-Length:- - '600'- 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:- - base-uri 'none'; default-src 'none'; form-action 'none'; frame-ancestors 'none';- img-src 'self'; script-src 'self' 'report-sample'; style-src 'self'; upgrade-insecure-requests;- report-uri /csp-violation https://q.stripe.com/csp-violation?q=dmV-g1_CTnTu-N8tEOeQacDg4WqYUL-RkM_aVdAMCtZnw7JXzTC-DCktrKdLRpDguTp0San5Nw%3D%3D- Cross-Origin-Opener-Policy-Report-Only:- - same-origin; report-to="coop"- Report-To:- - '{"group":"coop","max_age":8640,"endpoints":[{"url":"https://q.stripe.com/coop-report"}],"include_subdomains":true}'- Reporting-Endpoints:- - coop="https://q.stripe.com/coop-report"- Request-Id:- - req_hLSQFCkPJIpimU- Stripe-Version:- - '2023-10-16'- Vary:- - Origin- X-Content-Type-Options:- - nosniff- X-Stripe-Priority-Routing-Enabled:- - 'true'- X-Stripe-Routing-Context-Priority-Tier:- - api-testmode- X-Wc:- - AB- Strict-Transport-Security:- - max-age=63072000; includeSubDomains; preload- body:- encoding: UTF-8- string: |-- {- "object": "list",- "data": [- {- "id": "pmd_1Qc1xM2ESifGlJez2fLCZgBp",- "object": "payment_method_domain",- "amazon_pay": {- "status": "active"- },- "apple_pay": {- "status": "active"- },- "created": 1735638104,- "domain_name": "store-with-apple-pay.com",- "enabled": true,- "google_pay": {- "status": "active"- },- "link": {- "status": "active"- },- "livemode": false,- "paypal": {- "status": "active"- }- }- ],- "has_more": false,- "url": "/v1/payment_method_domains"- }- recorded_at: Tue, 31 Dec 2024 09:41:45 GMT-recorded_with: VCR 6.2.0diff --git a/spree/providers/stripe/spec/vcr/SpreeStripe_RegisterDomain/for_custom_domain/when_tld_length_is_more_then_2/registers_the_Apple_Pay_domain_and_top_level_domain_in_Stripe.yml b/spree/providers/stripe/spec/vcr/SpreeStripe_RegisterDomain/for_custom_domain/when_tld_length_is_more_then_2/registers_the_Apple_Pay_domain_and_top_level_domain_in_Stripe.ymldeleted file mode 100644index d1e242da91..0000000000--- a/spree/providers/stripe/spec/vcr/SpreeStripe_RegisterDomain/for_custom_domain/when_tld_length_is_more_then_2/registers_the_Apple_Pay_domain_and_top_level_domain_in_Stripe.yml+++ /dev/null@@ -1,781 +0,0 @@-----http_interactions:-- request:- method: post- uri: https://api.stripe.com/v1/apple_pay/domains- body:- encoding: UTF-8- string: domain_name=shop.store-with-apple-pay.com- headers:- User-Agent:- - Stripe/v1 RubyBindings/10.1.0 PayRails/7.1.0 (https://github.com/pay-rails/pay)- Authorization:- - Bearer <STRIPE_SECRET_KEY>- Content-Type:- - application/x-www-form-urlencoded- X-Stripe-Client-Telemetry:- - '{"last_request_metrics":{"request_id":"req_C8N8oANwwicBoO","request_duration_ms":353}}'- Idempotency-Key:- - 30a16f4f-95ec-46c7-aa4f-a1dd5c68ebe4- Stripe-Version:- - '2023-10-16'- X-Stripe-Client-User-Agent:- - "<FILTERED>"- 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:- - Thu, 15 Feb 2024 09:46:06 GMT- Content-Type:- - application/json- Content-Length:- - '171'- 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%2Fapple_pay%2Fdomains; 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:- - 30a16f4f-95ec-46c7-aa4f-a1dd5c68ebe4- Original-Request:- - req_z1L95Y1eeucosu- Request-Id:- - req_z1L95Y1eeucosu- 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": "apwc_1OhVNaIhR0gIegIea5bTfT3R",- "object": "apple_pay_domain",- "created": 1707390174,- "domain_name": "shop.store-with-apple-pay.com",- "livemode": false- }- recorded_at: Thu, 15 Feb 2024 09:46:06 GMT-- request:- method: post- uri: https://api.stripe.com/v1/apple_pay/domains- body:- encoding: UTF-8- string: domain_name=store-with-apple-pay.com- headers:- User-Agent:- - Stripe/v1 RubyBindings/10.1.0 PayRails/7.1.0 (https://github.com/pay-rails/pay)- Authorization:- - Bearer <STRIPE_SECRET_KEY>- Content-Type:- - application/x-www-form-urlencoded- X-Stripe-Client-Telemetry:- - '{"last_request_metrics":{"request_id":"req_z1L95Y1eeucosu","request_duration_ms":245}}'- Idempotency-Key:- - 84248bdb-f430-4c5f-8f68-acce3bb60809- Stripe-Version:- - '2023-10-16'- X-Stripe-Client-User-Agent:- - "<FILTERED>"- 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:- - Thu, 15 Feb 2024 09:46:06 GMT- Content-Type:- - application/json- Content-Length:- - '166'- 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%2Fapple_pay%2Fdomains; 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:- - 84248bdb-f430-4c5f-8f68-acce3bb60809- Original-Request:- - req_XRRPlbEPkGFZHo- Request-Id:- - req_XRRPlbEPkGFZHo- 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": "apwc_1OhWNdIhR0gIegIe8QpNWSqX",- "object": "apple_pay_domain",- "created": 1707394021,- "domain_name": "store-with-apple-pay.com",- "livemode": false- }- recorded_at: Thu, 15 Feb 2024 09:46:06 GMT-- request:- method: get- uri: https://api.stripe.com/v1/apple_pay/domains?domain_name=shop.store-with-apple-pay.com- body:- encoding: US-ASCII- string: ''- headers:- User-Agent:- - Stripe/v1 RubyBindings/10.1.0 PayRails/7.1.0 (https://github.com/pay-rails/pay)- Authorization:- - Bearer <STRIPE_SECRET_KEY>- Content-Type:- - application/x-www-form-urlencoded- X-Stripe-Client-Telemetry:- - '{"last_request_metrics":{"request_id":"req_XRRPlbEPkGFZHo","request_duration_ms":250}}'- Stripe-Version:- - '2023-10-16'- X-Stripe-Client-User-Agent:- - "<FILTERED>"- 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:- - Thu, 15 Feb 2024 09:46:07 GMT- Content-Type:- - application/json- Content-Length:- - '294'- 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%2Fapple_pay%2Fdomains; 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_pxtwCV6Lsq6VVF- 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: |-- {- "object": "list",- "data": [- {- "id": "apwc_1OhVNaIhR0gIegIea5bTfT3R",- "object": "apple_pay_domain",- "created": 1707390174,- "domain_name": "shop.store-with-apple-pay.com",- "livemode": false- }- ],- "has_more": false,- "url": "/v1/apple_pay/domains"- }- recorded_at: Thu, 15 Feb 2024 09:46:06 GMT-- request:- method: get- uri: https://api.stripe.com/v1/apple_pay/domains?domain_name=store-with-apple-pay.com- body:- encoding: US-ASCII- string: ''- headers:- User-Agent:- - Stripe/v1 RubyBindings/10.1.0 PayRails/7.1.0 (https://github.com/pay-rails/pay)- Authorization:- - Bearer <STRIPE_SECRET_KEY>- Content-Type:- - application/x-www-form-urlencoded- X-Stripe-Client-Telemetry:- - '{"last_request_metrics":{"request_id":"req_pxtwCV6Lsq6VVF","request_duration_ms":233}}'- Stripe-Version:- - '2023-10-16'- X-Stripe-Client-User-Agent:- - "<FILTERED>"- 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:- - Thu, 15 Feb 2024 09:46:07 GMT- Content-Type:- - application/json- Content-Length:- - '289'- 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%2Fapple_pay%2Fdomains; 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_7Fz4Iub2PMVlr3- 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: |-- {- "object": "list",- "data": [- {- "id": "apwc_1OhWNdIhR0gIegIe8QpNWSqX",- "object": "apple_pay_domain",- "created": 1707394021,- "domain_name": "store-with-apple-pay.com",- "livemode": false- }- ],- "has_more": false,- "url": "/v1/apple_pay/domains"- }- recorded_at: Thu, 15 Feb 2024 09:46:07 GMT-- request:- method: post- uri: https://api.stripe.com/v1/payment_method_domains- body:- encoding: UTF-8- string: domain_name=shop.store-with-apple-pay.com- headers:- User-Agent:- - Stripe/v1 RubyBindings/10.1.0 Spree Stripe/1.0.0 (https://spreecommerce.org)- Authorization:- - Bearer <STRIPE_SECRET_KEY>- Content-Type:- - application/x-www-form-urlencoded- Stripe-Version:- - '2023-10-16'- X-Stripe-Client-User-Agent:- - "<FILTERED>"- 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:- - Tue, 31 Dec 2024 09:41:47 GMT- Content-Type:- - application/json- Content-Length:- - '413'- 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:- - base-uri 'none'; default-src 'none'; form-action 'none'; frame-ancestors 'none';- img-src 'self'; script-src 'self' 'report-sample'; style-src 'self'; upgrade-insecure-requests;- report-uri /csp-violation https://q.stripe.com/csp-violation?q=sx-GsN2cWpi7dFBpMr-DfZ2F6jTEvhCu2C2EvQMSjyQeijgA8FQWDX_o7rRwsVr-z8k0LxwgRw%3D%3D- Cross-Origin-Opener-Policy-Report-Only:- - same-origin; report-to="coop"- Idempotency-Key:- - b5226b62-65ca-4969-9a39-9757e171bfb9- Original-Request:- - req_s0QoJ38kGv6V6C- Report-To:- - '{"group":"coop","max_age":8640,"endpoints":[{"url":"https://q.stripe.com/coop-report"}],"include_subdomains":true}'- Reporting-Endpoints:- - coop="https://q.stripe.com/coop-report"- Request-Id:- - req_s0QoJ38kGv6V6C- Stripe-Should-Retry:- - 'false'- Stripe-Version:- - '2023-10-16'- Vary:- - Origin- X-Content-Type-Options:- - nosniff- X-Stripe-Priority-Routing-Enabled:- - 'true'- X-Stripe-Routing-Context-Priority-Tier:- - api-testmode- X-Wc:- - AB- Strict-Transport-Security:- - max-age=63072000; includeSubDomains; preload- body:- encoding: UTF-8- string: |-- {- "id": "pmd_1Qc1xO2ESifGlJezySi9qH6t",- "object": "payment_method_domain",- "amazon_pay": {- "status": "active"- },- "apple_pay": {- "status": "active"- },- "created": 1735638106,- "domain_name": "shop.store-with-apple-pay.com",- "enabled": true,- "google_pay": {- "status": "active"- },- "link": {- "status": "active"- },- "livemode": false,- "paypal": {- "status": "active"- }- }- recorded_at: Tue, 31 Dec 2024 09:41:47 GMT-- request:- method: post- uri: https://api.stripe.com/v1/payment_method_domains- body:- encoding: UTF-8- string: domain_name=store-with-apple-pay.com- headers:- User-Agent:- - Stripe/v1 RubyBindings/10.1.0 Spree Stripe/1.0.0 (https://spreecommerce.org)- Authorization:- - Bearer <STRIPE_SECRET_KEY>- Content-Type:- - application/x-www-form-urlencoded- X-Stripe-Client-Telemetry:- - '{"last_request_metrics":{"request_id":"req_s0QoJ38kGv6V6C","request_duration_ms":726}}'- Stripe-Version:- - '2023-10-16'- X-Stripe-Client-User-Agent:- - "<FILTERED>"- 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:- - Tue, 31 Dec 2024 09:41:47 GMT- Content-Type:- - application/json- Content-Length:- - '408'- 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:- - base-uri 'none'; default-src 'none'; form-action 'none'; frame-ancestors 'none';- img-src 'self'; script-src 'self' 'report-sample'; style-src 'self'; upgrade-insecure-requests;- report-uri /csp-violation https://q.stripe.com/csp-violation?q=sx-GsN2cWpi7dFBpMr-DfZ2F6jTEvhCu2C2EvQMSjyQeijgA8FQWDX_o7rRwsVr-z8k0LxwgRw%3D%3D- Cross-Origin-Opener-Policy-Report-Only:- - same-origin; report-to="coop"- Idempotency-Key:- - c9aceb45-b08c-4ac9-8d5b-c61dc4dbe716- Original-Request:- - req_NOXd5iE53skZPp- Report-To:- - '{"group":"coop","max_age":8640,"endpoints":[{"url":"https://q.stripe.com/coop-report"}],"include_subdomains":true}'- Reporting-Endpoints:- - coop="https://q.stripe.com/coop-report"- Request-Id:- - req_NOXd5iE53skZPp- Stripe-Should-Retry:- - 'false'- Stripe-Version:- - '2023-10-16'- Vary:- - Origin- X-Content-Type-Options:- - nosniff- X-Stripe-Priority-Routing-Enabled:- - 'true'- X-Stripe-Routing-Context-Priority-Tier:- - api-testmode- X-Wc:- - AB- Strict-Transport-Security:- - max-age=63072000; includeSubDomains; preload- body:- encoding: UTF-8- string: |-- {- "id": "pmd_1Qc1xM2ESifGlJez2fLCZgBp",- "object": "payment_method_domain",- "amazon_pay": {- "status": "active"- },- "apple_pay": {- "status": "active"- },- "created": 1735638104,- "domain_name": "store-with-apple-pay.com",- "enabled": true,- "google_pay": {- "status": "active"- },- "link": {- "status": "active"- },- "livemode": false,- "paypal": {- "status": "active"- }- }- recorded_at: Tue, 31 Dec 2024 09:41:47 GMT-- request:- method: get- uri: https://api.stripe.com/v1/payment_method_domains?domain_name=shop.store-with-apple-pay.com- body:- encoding: US-ASCII- string: ''- headers:- User-Agent:- - Stripe/v1 RubyBindings/10.1.0 Spree Stripe/1.0.0 (https://spreecommerce.org)- Authorization:- - Bearer <STRIPE_SECRET_KEY>- Content-Type:- - application/x-www-form-urlencoded- X-Stripe-Client-Telemetry:- - '{"last_request_metrics":{"request_id":"req_hLSQFCkPJIpimU","request_duration_ms":303}}'- Stripe-Version:- - '2023-10-16'- X-Stripe-Client-User-Agent:- - "<FILTERED>"- Api-Version:- - '2023-10-16'- 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:- - Tue, 31 Dec 2024 09:41:47 GMT- Content-Type:- - application/json- Content-Length:- - '605'- 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:- - base-uri 'none'; default-src 'none'; form-action 'none'; frame-ancestors 'none';- img-src 'self'; script-src 'self' 'report-sample'; style-src 'self'; upgrade-insecure-requests;- report-uri /csp-violation https://q.stripe.com/csp-violation?q=PsSIrpspD12C7yCoMcpVgJpYO3BWDbCrSWo2LGT6VyAXzd35uTrlD_gDlCV4mKpBVCNyOPkRhA%3D%3D- Cross-Origin-Opener-Policy-Report-Only:- - same-origin; report-to="coop"- Report-To:- - '{"group":"coop","max_age":8640,"endpoints":[{"url":"https://q.stripe.com/coop-report"}],"include_subdomains":true}'- Reporting-Endpoints:- - coop="https://q.stripe.com/coop-report"- Request-Id:- - req_2lQ7RHl1bgo61c- Stripe-Version:- - '2023-10-16'- Vary:- - Origin- X-Content-Type-Options:- - nosniff- X-Stripe-Priority-Routing-Enabled:- - 'true'- X-Stripe-Routing-Context-Priority-Tier:- - api-testmode- X-Wc:- - AB- Strict-Transport-Security:- - max-age=63072000; includeSubDomains; preload- body:- encoding: UTF-8- string: |-- {- "object": "list",- "data": [- {- "id": "pmd_1Qc1xO2ESifGlJezySi9qH6t",- "object": "payment_method_domain",- "amazon_pay": {- "status": "active"- },- "apple_pay": {- "status": "active"- },- "created": 1735638106,- "domain_name": "shop.store-with-apple-pay.com",- "enabled": true,- "google_pay": {- "status": "active"- },- "link": {- "status": "active"- },- "livemode": false,- "paypal": {- "status": "active"- }- }- ],- "has_more": false,- "url": "/v1/payment_method_domains"- }- recorded_at: Tue, 31 Dec 2024 09:41:47 GMT-- request:- method: get- uri: https://api.stripe.com/v1/payment_method_domains?domain_name=store-with-apple-pay.com- body:- encoding: US-ASCII- string: ''- headers:- User-Agent:- - Stripe/v1 RubyBindings/10.1.0 Spree Stripe/1.0.0 (https://spreecommerce.org)- Authorization:- - Bearer <STRIPE_SECRET_KEY>- Content-Type:- - application/x-www-form-urlencoded- X-Stripe-Client-Telemetry:- - '{"last_request_metrics":{"request_id":"req_2lQ7RHl1bgo61c","request_duration_ms":384}}'- Stripe-Version:- - '2023-10-16'- X-Stripe-Client-User-Agent:- - "<FILTERED>"- Api-Version:- - '2023-10-16'- 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:- - Tue, 31 Dec 2024 09:41:48 GMT- Content-Type:- - application/json- Content-Length:- - '600'- 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:- - base-uri 'none'; default-src 'none'; form-action 'none'; frame-ancestors 'none';- img-src 'self'; script-src 'self' 'report-sample'; style-src 'self'; upgrade-insecure-requests;- report-uri /csp-violation https://q.stripe.com/csp-violation?q=PsSIrpspD12C7yCoMcpVgJpYO3BWDbCrSWo2LGT6VyAXzd35uTrlD_gDlCV4mKpBVCNyOPkRhA%3D%3D- Cross-Origin-Opener-Policy-Report-Only:- - same-origin; report-to="coop"- Report-To:- - '{"group":"coop","max_age":8640,"endpoints":[{"url":"https://q.stripe.com/coop-report"}],"include_subdomains":true}'- Reporting-Endpoints:- - coop="https://q.stripe.com/coop-report"- Request-Id:- - req_ZONtgAiSWfhine- Stripe-Version:- - '2023-10-16'- Vary:- - Origin- X-Content-Type-Options:- - nosniff- X-Stripe-Priority-Routing-Enabled:- - 'true'- X-Stripe-Routing-Context-Priority-Tier:- - api-testmode- X-Wc:- - AB- Strict-Transport-Security:- - max-age=63072000; includeSubDomains; preload- body:- encoding: UTF-8- string: |-- {- "object": "list",- "data": [- {- "id": "pmd_1Qc1xM2ESifGlJez2fLCZgBp",- "object": "payment_method_domain",- "amazon_pay": {- "status": "active"- },- "apple_pay": {- "status": "active"- },- "created": 1735638104,- "domain_name": "store-with-apple-pay.com",- "enabled": true,- "google_pay": {- "status": "active"- },- "link": {- "status": "active"- },- "livemode": false,- "paypal": {- "status": "active"- }- }- ],- "has_more": false,- "url": "/v1/payment_method_domains"- }- recorded_at: Tue, 31 Dec 2024 09:41:48 GMT-recorded_with: VCR 6.2.0diff --git a/spree/providers/stripe/spec/vcr/SpreeStripe_RegisterDomain/for_store/register_only_store_domain.yml b/spree/providers/stripe/spec/vcr/SpreeStripe_RegisterDomain/for_store/register_only_store_domain.ymldeleted file mode 100644index f3fcf4aca3..0000000000--- a/spree/providers/stripe/spec/vcr/SpreeStripe_RegisterDomain/for_store/register_only_store_domain.yml+++ /dev/null@@ -1,389 +0,0 @@-----http_interactions:-- request:- method: post- uri: https://api.stripe.com/v1/apple_pay/domains- body:- encoding: UTF-8- string: domain_name=dare-gerhold-and-pagac.lvh.me- headers:- User-Agent:- - Stripe/v1 RubyBindings/10.1.0 PayRails/7.1.0 (https://github.com/pay-rails/pay)- Authorization:- - Bearer <STRIPE_SECRET_KEY>- Content-Type:- - application/x-www-form-urlencoded- Idempotency-Key:- - f22b062e-f4a4-4318-87c5-d5e33ff21117- Stripe-Version:- - '2023-10-16'- X-Stripe-Client-User-Agent:- - "<FILTERED>"- 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:- - Thu, 15 Feb 2024 10:22:13 GMT- Content-Type:- - application/json- Content-Length:- - '171'- 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%2Fapple_pay%2Fdomains; 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:- - f22b062e-f4a4-4318-87c5-d5e33ff21117- Original-Request:- - req_K0lMqfwyi53yWN- Request-Id:- - req_K0lMqfwyi53yWN- 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": "apwc_1Ok252IhR0gIegIemv7L2GYk",- "object": "apple_pay_domain",- "created": 1707992532,- "domain_name": "dare-gerhold-and-pagac.lvh.me",- "livemode": false- }- recorded_at: Thu, 15 Feb 2024 10:22:12 GMT-- request:- method: get- uri: https://api.stripe.com/v1/apple_pay/domains?domain_name=dare-gerhold-and-pagac.lvh.me- body:- encoding: US-ASCII- string: ''- headers:- User-Agent:- - Stripe/v1 RubyBindings/10.1.0 PayRails/7.1.0 (https://github.com/pay-rails/pay)- Authorization:- - Bearer <STRIPE_SECRET_KEY>- Content-Type:- - application/x-www-form-urlencoded- X-Stripe-Client-Telemetry:- - '{"last_request_metrics":{"request_id":"req_K0lMqfwyi53yWN","request_duration_ms":2956}}'- Stripe-Version:- - '2023-10-16'- X-Stripe-Client-User-Agent:- - "<FILTERED>"- 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:- - Thu, 15 Feb 2024 10:22:13 GMT- Content-Type:- - application/json- Content-Length:- - '294'- 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%2Fapple_pay%2Fdomains; 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_ppI4p4poGhYkA6- 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: |-- {- "object": "list",- "data": [- {- "id": "apwc_1Ok252IhR0gIegIemv7L2GYk",- "object": "apple_pay_domain",- "created": 1707992532,- "domain_name": "dare-gerhold-and-pagac.lvh.me",- "livemode": false- }- ],- "has_more": false,- "url": "/v1/apple_pay/domains"- }- recorded_at: Thu, 15 Feb 2024 10:22:13 GMT-- request:- method: post- uri: https://api.stripe.com/v1/payment_method_domains- body:- encoding: UTF-8- string: domain_name=dare-gerhold-and-pagac.lvh.me- headers:- User-Agent:- - Stripe/v1 RubyBindings/10.1.0 Spree Stripe/1.0.0 (https://spreecommerce.org)- Authorization:- - Bearer <STRIPE_SECRET_KEY>- Content-Type:- - application/x-www-form-urlencoded- Stripe-Version:- - '2023-10-16'- X-Stripe-Client-User-Agent:- - "<FILTERED>"- 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:- - Tue, 31 Dec 2024 09:41:50 GMT- Content-Type:- - application/json- Content-Length:- - '413'- 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:- - base-uri 'none'; default-src 'none'; form-action 'none'; frame-ancestors 'none';- img-src 'self'; script-src 'self' 'report-sample'; style-src 'self'; upgrade-insecure-requests;- report-uri /csp-violation https://q.stripe.com/csp-violation?q=sx-GsN2cWpi7dFBpMr-DfZ2F6jTEvhCu2C2EvQMSjyQeijgA8FQWDX_o7rRwsVr-z8k0LxwgRw%3D%3D- Cross-Origin-Opener-Policy-Report-Only:- - same-origin; report-to="coop"- Idempotency-Key:- - ffa20cc8-fd99-423a-8933-9393215cb1b0- Original-Request:- - req_zIaZPMBhfNSczy- Report-To:- - '{"group":"coop","max_age":8640,"endpoints":[{"url":"https://q.stripe.com/coop-report"}],"include_subdomains":true}'- Reporting-Endpoints:- - coop="https://q.stripe.com/coop-report"- Request-Id:- - req_zIaZPMBhfNSczy- Stripe-Should-Retry:- - 'false'- Stripe-Version:- - '2023-10-16'- Vary:- - Origin- X-Content-Type-Options:- - nosniff- X-Stripe-Priority-Routing-Enabled:- - 'true'- X-Stripe-Routing-Context-Priority-Tier:- - api-testmode- X-Wc:- - AB- Strict-Transport-Security:- - max-age=63072000; includeSubDomains; preload- body:- encoding: UTF-8- string: |-- {- "id": "pmd_1Qc1xR2ESifGlJezaInTCWpb",- "object": "payment_method_domain",- "amazon_pay": {- "status": "active"- },- "apple_pay": {- "status": "active"- },- "created": 1735638109,- "domain_name": "dare-gerhold-and-pagac.lvh.me",- "enabled": true,- "google_pay": {- "status": "active"- },- "link": {- "status": "active"- },- "livemode": false,- "paypal": {- "status": "active"- }- }- recorded_at: Tue, 31 Dec 2024 09:41:50 GMT-- request:- method: get- uri: https://api.stripe.com/v1/payment_method_domains?domain_name=dare-gerhold-and-pagac.lvh.me- body:- encoding: US-ASCII- string: ''- headers:- User-Agent:- - Stripe/v1 RubyBindings/10.1.0 Spree Stripe/1.0.0 (https://spreecommerce.org)- Authorization:- - Bearer <STRIPE_SECRET_KEY>- Content-Type:- - application/x-www-form-urlencoded- X-Stripe-Client-Telemetry:- - '{"last_request_metrics":{"request_id":"req_ZONtgAiSWfhine","request_duration_ms":213}}'- Stripe-Version:- - '2023-10-16'- X-Stripe-Client-User-Agent:- - "<FILTERED>"- Api-Version:- - '2023-10-16'- 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:- - Tue, 31 Dec 2024 09:41:50 GMT- Content-Type:- - application/json- Content-Length:- - '605'- 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:- - base-uri 'none'; default-src 'none'; form-action 'none'; frame-ancestors 'none';- img-src 'self'; script-src 'self' 'report-sample'; style-src 'self'; upgrade-insecure-requests;- report-uri /csp-violation https://q.stripe.com/csp-violation?q=PsSIrpspD12C7yCoMcpVgJpYO3BWDbCrSWo2LGT6VyAXzd35uTrlD_gDlCV4mKpBVCNyOPkRhA%3D%3D- Cross-Origin-Opener-Policy-Report-Only:- - same-origin; report-to="coop"- Report-To:- - '{"group":"coop","max_age":8640,"endpoints":[{"url":"https://q.stripe.com/coop-report"}],"include_subdomains":true}'- Reporting-Endpoints:- - coop="https://q.stripe.com/coop-report"- Request-Id:- - req_WuhbKq0Go1Jmn7- Stripe-Version:- - '2023-10-16'- Vary:- - Origin- X-Content-Type-Options:- - nosniff- X-Stripe-Priority-Routing-Enabled:- - 'true'- X-Stripe-Routing-Context-Priority-Tier:- - api-testmode- X-Wc:- - AB- Strict-Transport-Security:- - max-age=63072000; includeSubDomains; preload- body:- encoding: UTF-8- string: |-- {- "object": "list",- "data": [- {- "id": "pmd_1Qc1xR2ESifGlJezaInTCWpb",- "object": "payment_method_domain",- "amazon_pay": {- "status": "active"- },- "apple_pay": {- "status": "active"- },- "created": 1735638109,- "domain_name": "dare-gerhold-and-pagac.lvh.me",- "enabled": true,- "google_pay": {- "status": "active"- },- "link": {- "status": "active"- },- "livemode": false,- "paypal": {- "status": "active"- }- }- ],- "has_more": false,- "url": "/v1/payment_method_domains"- }- recorded_at: Tue, 31 Dec 2024 09:41:50 GMT-recorded_with: VCR 6.2.0