#tjon_api

1 messages ยท Page 1 of 1 (latest)

nimble breachBOT
#

๐Ÿ‘‹ 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/1265708304697528441

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

broken coyoteBOT
#

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.

gleaming epoch
#

Hello
Have you tried setting the same payment_method_types on PaymentIntent creation request as you're setting it on your client-side code?

empty cliff
#

I believe so

#

I'll double check but I think that was one of the first things I tried I also tried removing them all to see if that would work

gleaming epoch
#

On my end I see you're setting

      "card",
      "us_bank_account",
 ]
#

on client-side

#

when you initialise the element.. You'd want to set the same values when you create the PaymentIntent server-side

empty cliff
#

server side
var options = new PaymentIntentCreateOptions
{
Amount = longValue,
Customer = donor.Id,
Currency = "usd",
ConfirmationToken = saleData.CreditCardCryptogram,
Confirm = true,
AutomaticPaymentMethods = new PaymentIntentAutomaticPaymentMethodsOptions
{
Enabled = true,
AllowRedirects = "never"
},
PaymentMethodOptions = new PaymentIntentPaymentMethodOptionsOptions
{
Card = new PaymentIntentPaymentMethodOptionsCardOptions
{
SetupFutureUsage = "off_session"
},
UsBankAccount = new PaymentIntentPaymentMethodOptionsUsBankAccountOptions
{
SetupFutureUsage = "off_session"
}
},
Metadata = new Dictionary<string, string>
{
{ "Form_Name", "test_form" },
}

};

CLient side
const options = {
mode: 'payment',
amount: 100,
paymentMethodCreation: 'manual',
currency: 'usd',
paymentMethodTypes: ['card', 'us_bank_account'],
//confirm = true,

        setupFutureUsage: 'off_session',
        payment_method_options: {
            card: {
                setup_future_usage: 'off_session'
            },
            us_bank_account: {
                setup_future_usage: 'off_session'

}
},
automatic_payment_methods: {
enabled: true,
allow_redirects: 'never'
},

    };
#

I have tried variations of removing / changing the automatic payment method and the payment method options

gleaming epoch
#

In your server side code you have

AutomaticPaymentMethods = new PaymentIntentAutomaticPaymentMethodsOptions
     {
         Enabled = true,
         AllowRedirects = "never"
     },
#

Can you remove that?

empty cliff
#

yes

#

serverside only

#

or both sides

gleaming epoch
#

Just server-side

#

oh actually

#

both

#

I missed that in your client-side code ๐Ÿ˜…

empty cliff
#

ok running it now

gleaming epoch
#

You either need paymentMethodTypes or automatic_payment_methods, you don't need to set both

#

If you don't pass any of the above parameters then we default to automatic_payment_methods

empty cliff
#

yeah I'm pretty sure I had that turned off but turned it back on in the case of testing everything i could

#

yeah same error

#

confirm token :req_XPbrVIn27exU18
PI : req_1lAQPRTpyzYO6Y

gleaming epoch
#

Yes because you still have paymentMethodTypes on client-side..

Let me ask you a clarifying question, is there a reason you're setting that parameter in your code? Are you trying to manually specify the payment method types for a specific reason?

empty cliff
#

Yes we are trying to go live asap and we are a connect account so we need to limit what our customers will be using to what we have setup.

#

as we expand our coverage we will allow more options but to begin with we just need to match our current offerings of card and ach

gleaming epoch
#

Got it. So you'd need to match the configuration on client-side and server-side by passing payment_method_types on your server-side request too

empty cliff
#

ok since it was created after I didnt think about adding it

#

it works

#

thanks for the help