import { loadTossPayments } from "@tosspayments/payment-sdk";
...
const tossClient = await loadTossPayments(clientKEy);
await tossClient.requestPayment("카드", {
amount: product.salesPrice,
orderId: `${product.shopId}${dayjs().format("YYYYMMDDhhmmss")}`,
orderName: product.itemName,
customerName: user?.user.nickname,
successUrl: `${location.href}/success`,
failUrl: `${location.href}/fail`,
});
import { loadTossPayments } from "@tosspayments/payment-sdk";
...
const tossClient = await loadTossPayments(clientKEy);
await tossClient.requestPayment("카드", {
amount: product.salesPrice,
orderId: `${product.shopId}${dayjs().format("YYYYMMDDhhmmss")}`,
orderName: product.itemName,
customerName: user?.user.nickname,
successUrl: `${location.href}/success`,
failUrl: `${location.href}/fail`,
});