Repository navigation
Fix PaymentProviders constant resolution and stripe connect not-found response - #23
Merged
Merged
Conversation
… 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
Api::V1::SubscriptionsController#create: reference::PaymentProviders::Stripe::Payments::AuthorizeServicewith a leading::. Unqualified, it resolved againstApi::V1::PaymentProvidersand raisedNameErrorwhen a subscription was created with payment authorization.Api::V1::PaymentProviders::StripeConnectController#create: rescueBaseService::NotFoundFailure(raised whenbilling_entity_codeis unknown) and return the standard not-found error response.No other unqualified
PaymentProviders::references exist underapp/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)