paypal 결제 지원

try {
await axios.post("/api/confirm/register", {
paymentKey,
orderId,
amount: amount.value,
orderName: "12345",
data: data
}, {
headers: {
Authorization: Bearer ${token} // Authorization
}
});

await widgets.requestPayment({
orderId,
orderName: "1234",
successUrl: window.location.origin +"/success",
failUrl: window.location.origin +"/fail"
});
//await onSave(data);
onClose(); //
} catch (error) {
alert("An error occurred while processing the payment. Please try again.");
console.error(error);
}finally {
setIsLoading(false); //
}


widgets.renderPaymentMethods({ selector: "#payment-method", variantKey: variantKey }),
widgets.renderAgreement({ selector: "#agreement", variantKey: "AGREEMENT" }),
variantKey땐 paypal

로 VPN("An error occurred while processing the payment. Please try again."); . Backend서 frontend?
Was this page helpful?