Код: Выделить всё
const { unmount } = renderTapCard("card-sdk-id", {
publicKey: "pk_live_....",
merchant: { id: "496..." },
transaction: {
amount: 65 * formData.travellers.length,
currency: Currencies.GBP,
reference: formData.applicationId,
description: "Application Fee",
},
acceptance: {
supportedBrands: ["AMERICAN_EXPRESS", "VISA", "MASTERCARD", "MADA"],
supportedCards: "ALL",
},
fields: { cardHolder: true },
addons: { displayPaymentBrands: true, loader: true, saveCard: false },
interface: {
locale: Locale.EN,
theme: Theme.LIGHT,
edges: Edges.CURVED,
direction: Direction.LTR,
},
onSuccess: async (data: any) => {
setTapToken(data.id);
},
onError: (err) => {
console.log("CARD ERROR:", err);
setError("Card validation failed. Please try again.");
},
onReady: () => {
console.log("CARD READY");
setIsCardReady(true);
},
});
введите описание изображения здесь
Подробнее здесь: https://stackoverflow.com/questions/798 ... gration-on