const allMethods = checkout.paymentMethods.value
const method = allMethods.find((method) => method.method === "creditcard");
if (!method) {
console.error("Payment method not found");
return;
}
const paymentElement = method.getPaymentElement({
hostedForm: {
panInputLabel: "Card number",
cvvInputLabel: "Security code"
},
theme: {
colors: {
'surface-primary': '#ffffff'
},
typography: {
'font-family': 'Arial, sans-serif'
}
}
})
paymentElement.appendTo("a-container");