결제 위젯 failUrl 문의

데 failUrl고 successUrl?
.

try {
await tossWidgets.requestPayment({
orderId: orderCode,
orderName: ${orderName},
metadata: {
userId: user?.id ?? null,
quantity: amount,
productId: productId,
},
successUrl: window.location.origin + '/shop/success',
failUrl: window.location.origin + '/shop/fail',
});
} catch (e) {
console.error(e);
}
};

return (
<TossModalWrapper visible={display} onClose={onClose}>
<div className="rounded-16 w-full bg-white p-[5px] pb-[20px]">
<div id="payment-method" className="w-full"></div>
<button
id="payment-request-button"
className="rounded-8 mx-auto block w-full max-w-[calc(100%-40px)] border-0 bg-[#3282f6] px-[22px] py-[11px] text-[17px] font-semibold text-[#f9fcff]"
type="button"
onClick={handleTossPay}
>

</button>
</div>
</TossModalWrapper>
Was this page helpful?