MrPeterss
MrPeterss
TPToss payments 개발자 커뮤니티
Created by MrPeterss on 8/28/2024 in #🌎┃global-support
Getting success URL on toss but money not going through
Hi. For some reason I am getting my success url but the money is not going through. I am stuck and can't figure out why this may be occuring???
10 replies
Next.js + Springboot with Payment Widget SDK
Hi everyone. I am having some trouble coming up with a solution for my Next.js Frontend and Springboot Backend. I want the payment to be confirmed in my springboot backend when the payment request is succeeded from toss. Previously, I was doing this with the successUrl parameter in the requestPayment method (shown below). However, I don't want to expose my endpoints so that anyone can call it. I only want toss to be able to call my endpoint. I was thinking of using an api key, but i have no clue how i might be able to do this without exposing the key to the browser in the nextwork tab when the method is called. The last thing i want to happen is people going in and confirming a bunch of orders that were not paid.
await paymentWidget?.requestPayment({
orderId: order,
orderName: "order for " + name,
customerName: name,
customerEmail: email,
customerMobilePhone: phoneNumber,
successUrl: `${window.location.origin}/api/orders/confirm/${order}`,
failUrl: `${window.location.origin}/api/orders/fail/${order}`,
});
await paymentWidget?.requestPayment({
orderId: order,
orderName: "order for " + name,
customerName: name,
customerEmail: email,
customerMobilePhone: phoneNumber,
successUrl: `${window.location.origin}/api/orders/confirm/${order}`,
failUrl: `${window.location.origin}/api/orders/fail/${order}`,
});
8 replies