#shakilkhan496_api

1 messages ยท Page 1 of 1 (latest)

restive citrusBOT
#

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

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

slate verge
#

// Fetch Client Secret
const fetchClientSecret = async (amount) => {
try {
const response = await fetch("https://api.stripe.com/v1/payment_intents", {
method: "POST",
headers: {
Authorization: Bearer ${import.meta.env.VITE_STRIPE_SK},
"Content-Type": "application/x-www-form-urlencoded",
},
body: new URLSearchParams({
amount: (amount * 100).toString(),
currency: "gbp",
"payment_method_types[]": "card",
}),
});

const data = await response.json();
return data.client_secret;

} catch (error) {
console.error("โŒ Error creating payment intent:", error);
throw error;
}
};

#

This is my code part

#

I want to disable AMEX card

#

any way to do that ?

exotic charm
#

Otherwise you can try reaching out to support and mention blocking amex in the payment element, there may be something they can enable for you but I am not sure