안녕하세요
const paymentSuccessController = async (req, res) => {
try {
const userId = req.userId;
const { orderId, amount, paymentKey } = req.query; // usePoint added
const { usePoint, letterId } = req.body;
const response = await axios.post(
"https://api.tosspayments.com/v1/payments/confirm",
{
orderId,
amount,
paymentKey,
},
{
headers: {
Authorization:
"Basic " + Buffer.from(secretKey + ":").toString("base64"),
"Content-Type": "application/json",
},
responseType: "json",
}
);
이런식으로 토스페이먼츠로 필수값을 보내는데 혹시 뭐가 잘못됬는지
code: 'NOT_FOUND_PAYMENT_SESSION',
message: '결제 시간이 만료되어 결제 진행 데이터가 존재하지 않습니다.'
이런 오류가 발생했네요 db에는 정상적으로 데이터가 저장되었습니다 이후 failUrl로 이동하네요...
try {
const userId = req.userId;
const { orderId, amount, paymentKey } = req.query; // usePoint added
const { usePoint, letterId } = req.body;
const response = await axios.post(
"https://api.tosspayments.com/v1/payments/confirm",
{
orderId,
amount,
paymentKey,
},
{
headers: {
Authorization:
"Basic " + Buffer.from(secretKey + ":").toString("base64"),
"Content-Type": "application/json",
},
responseType: "json",
}
);
이런식으로 토스페이먼츠로 필수값을 보내는데 혹시 뭐가 잘못됬는지
code: 'NOT_FOUND_PAYMENT_SESSION',
message: '결제 시간이 만료되어 결제 진행 데이터가 존재하지 않습니다.'
이런 오류가 발생했네요 db에는 정상적으로 데이터가 저장되었습니다 이후 failUrl로 이동하네요...
