diff --git a/app/controllers/api/v1/payment_providers/stripe_connect_controller.rb b/app/controllers/api/v1/payment_providers/stripe_connect_controller.rb index 13c98fa00139..9620cd923e39 100644 --- a/app/controllers/api/v1/payment_providers/stripe_connect_controller.rb +++ b/app/controllers/api/v1/payment_providers/stripe_connect_controller.rb @@ -31,6 +31,9 @@ def create else render_error_response(result) end + rescue BaseService::NotFoundFailure => e + # Raised by the service when billing_entity_code does not resolve. + not_found_error(resource: e.resource) end private diff --git a/app/controllers/api/v1/subscriptions_controller.rb b/app/controllers/api/v1/subscriptions_controller.rb index dc1b5fc9eddd..30fddb5152f8 100644 --- a/app/controllers/api/v1/subscriptions_controller.rb +++ b/app/controllers/api/v1/subscriptions_controller.rb @@ -52,7 +52,7 @@ def create customer.default_payment_method end - result = PaymentProviders::Stripe::Payments::AuthorizeService.call( + result = ::PaymentProviders::Stripe::Payments::AuthorizeService.call( amount: params[:authorization].fetch(:amount_cents), currency: params[:authorization].fetch(:amount_currency), provider_customer: customer.provider_customer,