paymentMethods.on("customRequest", paymentMethodKey => {
if (paymentMethodKey === "CARD") {
var clientKey = "{CARD_CLIENT_KEY}" // 해외 카드 상점아이디(MID)에 연결된 클라이언트 키
var tossPayments = TossPayments(clientKey)
tossPayments.requestPayment("카드", {
amount: 10000,
orderId: "PHDsPSLho_fmHn1gPQPl2",
orderName: "테스트 결제",
customerName: "김토스",
successUrl: "http://localhost:8080/success",
failUrl: "http://localhost:8080/fail",
useInternationalCardOnly: true // 다국어 결제창 열기
})
}
})
paymentMethods.on("customRequest", paymentMethodKey => {
if (paymentMethodKey === "CARD") {
var clientKey = "{CARD_CLIENT_KEY}" // 해외 카드 상점아이디(MID)에 연결된 클라이언트 키
var tossPayments = TossPayments(clientKey)
tossPayments.requestPayment("카드", {
amount: 10000,
orderId: "PHDsPSLho_fmHn1gPQPl2",
orderName: "테스트 결제",
customerName: "김토스",
successUrl: "http://localhost:8080/success",
failUrl: "http://localhost:8080/fail",
useInternationalCardOnly: true // 다국어 결제창 열기
})
}
})