#reja_code
1 messages ยท Page 1 of 1 (latest)
๐ 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/1285224533699072032
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
protected function createSetupIntent($customer_id): SetupIntent
{
try
{
return $this->getStripeClient()->setupIntents->create(
[
'customer' => $customer_id,
]
);
}
catch (Exception $e)
{
$this->throwStripeException($e->getMessage());
}
}
Hi there ๐ if you want to avoid showing those payment method types in the Payment Element you'll need to do one of three things.
- Turn off the payment method completely in the Payment Method configuration that you showed a screenshot of. Disabling recurring payments doesn't disable the payment method type for use with dynamic payment methods.
- Create a new Payment Method Configuration to use with your flow that is limited to the payment method types you want to offer.
- Manually specify the desired payment method types by using
payment_method_typeswhen creating the Setup Intent: https://docs.stripe.com/api/setup_intents/create#create_setup_intent-payment_method_types
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
will try option 2, tried payment_method_types but it doenst not make a difference
{
or am i doing something wrong
You may need to do more on the frontend depending on exactly what flow you're using. Are you creating the Payment Element before you create your Setup Intent?
option 1 is not possible because we want the methods for invoice mailing
talked to frontend developer
const options = {
'mode': 'setup',
'currency': 'eur',
'setup_future_usage': 'off_session',
'appearance': appearance,
};
const elements = stripe.elements(options);
const paymentElement = elements.create(
'payment',
{
paymentMethodOrder: ['sepa_debit', 'card'],
fields: {
billingDetails: {
name: 'never',
email: 'never',
phone: 'never',
},
},
}
);
paymentElement.mount('#payment-element');
looks likes he created the element first