#om_code

1 messages ¡ Page 1 of 1 (latest)

hot coralBOT
#

👋 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/1376867293971353660

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

Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

tidal jewel
#

As per the error, Affirm doesn't support s_f_u so we validate against those params. What does your p_m_t list look like?

gilded ridge
#

["card", "affirm", "acss_debit", "us_bank_account"]

tidal jewel
#

You'd need to set s_f_u at the PM-level for the ones that do support it (like here)

gilded ridge
#

can you give me some example

tidal jewel
#

I just did?

payment_method_options: {
  card: {
    setup_future_usage: 'on_session'
  }
}
gilded ridge
#

like I am doinghere for access debit

if params[:payment_method_types].include?('acss_debit')
params[:payment_method_options] = {
acss_debit: {
mandate_options: {
payment_schedule: 'combined',
interval_description: gateway.gateway_configuration["ca_pad_interval"] || 'N/A',
transaction_type: 'personal'
}
}
}
end

#

do you mean this?

tidal jewel
#

Yes

#

You can add s_f_u for each PM to the existing payment_method_options hash

#

Card supports it, as does ACH Debit and ACSS Debit

gilded ridge
#

okay so we dont want to add it in

params = {
customer: @stripe_customer.id,
amount: amount,
currency: currency,
payment_method_types: payment_method_types|| [],
# setup_future_usage: "on_session"
}

right?

tidal jewel
#

Yes, remove the top-level param

gilded ridge
#

I removed top level param and passed it like

params[:payment_method_options] = {
card:
{
setup_future_usage: 'on_session'
}
}

but this didnt work

tidal jewel
#

What does 'didn't work' mean?

gilded ridge
#

however if I passed s_f_u in top level params I am able to hide the checkbox

#

but problem is it is not allowing me to pass affirm

tidal jewel
#

Can you share the ID of the request or the Payment Intent

gilded ridge
#

can you tell me which Id

tidal jewel
#

req_xxx or pi_xxx

gilded ridge
#

for the one which is working(without affirm) ??

gilded ridge
#

pi_3RTL06IwAx2JTcjp18Twdcd3

tidal jewel
#

Where's the intent/request with s_f_u in the p_m_o hash like I advised?

tidal jewel
tidal jewel
gilded ridge
#

you mean create payment intent one right?

tidal jewel
#

yes

gilded ridge
#

ohh got it worked

#

It was not worked correctly

tidal jewel
#

Great!

gilded ridge
#

can you tell me one last thing for what payment method types setup_future_usage is supported

#

like for affirmits not

hot coralBOT
gilded ridge
#

?

tidal jewel
gilded ridge
#

okay thank you so much !!

hasty onyx
#

hi! I'm taking over this thread. let me know if you have other questions.