#adro3030_error

1 messages · Page 1 of 1 (latest)

dusky fulcrumBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1420192371332878469

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

tall steppe
#
# GET    /account/bank(.:format)
      def bank
        @button = {
          base: "https://connect.stripe.com/express/oauth/authorize",
          client_id: WeddingExpo.credentials(:stripe, :client_id),
          redirect_uri: bank_complete_account_user_url,
          user:
            "stripe_user[business_type]=individual&stripe_user[email]=#{current_user.email}&stripe_user[first_name]=#{current_user.first_name}&stripe_user[last_name]=#{current_user.last_name}"
        }
        if current_user.phone
          @button[:user] += "&stripe_user[phone_number]=#{current_user.phone}"
        end
      end

      # GET    /account/bank_complete(.:format)
      def bank_complete
        @domain = "expo"
        if code = params[:code]
          url =
            "https://connect.stripe.com/oauth/token?code=#{code}&client_secret=#{WeddingExpo.credentials(:stripe, :secret_key)}&grant_type=authorization_code"
          resp = HTTP.post(url)

          if resp.parse["stripe_user_id"]
            @user.update(stripe_user_id: "#{resp.parse["stripe_user_id"]}")
            Thread.new do
              Rails.application.executor.wrap do
                StripePayoutScheduler.call("#{@user.stripe_user_id}")
              end
            end
            flash[
              :notice
            ] = "Setup completed! You can now receive payouts from The Wedding Expo"
          else
            flash[
              :alert
            ] = "There was a problem creating your account. Please try again or contact us. => #{resp}"
          end
        else
          flash[:alert] = "Could not complete setup."
        end
        redirect_to bank_account_user_path
      end

dire rover
#

hello! do you have an example request ID where you're seeing this error?

tall steppe
#

Lemme check - could I find that in our stripe dashboard?

dire rover
dusky fulcrumBOT
tall steppe
#

i can't find it. i reproduced the error in dev, but now can't find any request in dev data... im in the new workbench dev thing. well sorry idk where to tart - should I be in the workbench, a sandbox or just toggle test data on?

#

oh wait, I am working locally but it's still using the live connect setup. so we are in prod but I can't find the logs

#

{"error":{"message":"Cannot onboard via express oauth due to gated access.","code":"forbidden"}}

analog granite
#

hello! taking over from solanum! So, to clarify, you're currently already using Express with OAuth in production, but want to do some new development in testmode and/or sandboxes and are currently running into that error message?

tall steppe
#

hey! thanks - we have an existing integration that has been working for a while. one of our new staff got that error in prod, and I can reproduce the error locally too.

#

we are on a really old api version. could that affect it?

analog granite
tall steppe
#

acct_103E3e2RDM5ZUbA0

analog granite
#

gimme a while, taking a look

#

I think this is going to take a while to look into so I'm going to share with you a link to create a ticket and we'll get back to you on it, is that alright?

tall steppe
#

yes thanks

dusky fulcrumBOT
#

Hello @tall steppe, we have sent you a direct message, please check it at https://discord.com/channels/@me/1420205747614126172

  • 🔗The message has instructions on how to open a direct support case with our Developer Support team, in order to help you more effectively.
analog granite
#

you'll need to already be logged in to your Stripe Account for this link to work as you expect it to

tall steppe
#

ok all set. thanks for your hlep

analog granite
#

aha! onesec

#

i just wanted to mention, I think on 16 of July, we sent an email to your admin@ email address, mentioning that express oauth will be disabled for your account. That would be the reason for it not working

tall steppe
#

ohh ok lemme check

analog granite
#

This is the exact subject if it helps "Express OAuth has been disabled for your platform"

tall steppe
#

ah dang ok found it. so we an still create connected accounds, just gotta use the api now and not the oauth/links setup

analog granite
#

yep!

tall steppe
#

ok cool looks pretty staight forward. thanks!

analog granite
#

feel free to reach out here if you're running into issues trying to get things working! I'll just send a reply to your ticket mentioning the email about disabling OAuth to wrap things up on it