Skip to content

Fix PaymentProviders constant resolution and stripe connect not-found response - #23

Merged
rrader26 merged 1 commit into
mainfrom
fix/subscription-preauth-namespace
Oct 17, 2026
Merged

rrader26 merged 1 commit into
mainfrom
fix/subscription-preauth-namespace

Conversation

@rrader26

Copy link
Copy Markdown

Changes

  • Api::V1::SubscriptionsController#create: reference ::PaymentProviders::Stripe::Payments::AuthorizeService with a leading ::. Unqualified, it resolved against Api::V1::PaymentProviders and raised NameError when a subscription was created with payment authorization.
  • Api::V1::PaymentProviders::StripeConnectController#create: rescue BaseService::NotFoundFailure (raised when billing_entity_code is unknown) and return the standard not-found error response.

No other unqualified PaymentProviders:: references exist under app/controllers/api/v1.

Testing

  • spec/requests/api/v1/subscriptions_controller_spec.rb (110 examples, 0 failures; lines 484, 504, 518, 535 failed before this change)
  • spec/requests/api/v1/payment_providers/stripe_connect_controller_spec.rb (0 failures; line 72 failed before)
  • rubocop: no offenses on changed files

… response

- Fully qualify ::PaymentProviders::Stripe::Payments::AuthorizeService in
  Api::V1::SubscriptionsController so it does not resolve against the
  Api::V1::PaymentProviders namespace.
- Return the standard not-found error from the stripe connect endpoint
  when billing_entity_code does not match a billing entity.
@rrader26
rrader26 merged commit dba7e4d into main Oct 17, 2026
2 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants