From 73aa0316ef0d448a620ed27628ef541cc627eb1d Mon Sep 17 00:00:00 2001 From: bkw535 Date: Wed, 13 Aug 2025 10:38:44 +0900 Subject: [PATCH] =?UTF-8?q?[REFACTOR]=20=EA=B2=B0=EC=A0=9C=20api=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/common/swagger/payment.json | 5 ++-- src/payment/controller/payment.controller.js | 4 +-- views/client-paytest.ejs | 31 +++++++++++++------- 3 files changed, 25 insertions(+), 15 deletions(-) diff --git a/src/common/swagger/payment.json b/src/common/swagger/payment.json index a133476..43c4fd8 100644 --- a/src/common/swagger/payment.json +++ b/src/common/swagger/payment.json @@ -20,13 +20,14 @@ "example": { "userId": 1, "productId": 1, - "impUid": "imp_1234567890" + "impUid": "imp_1234567890", + "merchantUid": "order_no_1753062110278" } } } }, "responses": { - "200": { + "201": { "description": "결제 완료 성공", "content": { "application/json": { diff --git a/src/payment/controller/payment.controller.js b/src/payment/controller/payment.controller.js index 15ef90a..7c320a3 100644 --- a/src/payment/controller/payment.controller.js +++ b/src/payment/controller/payment.controller.js @@ -5,7 +5,7 @@ import { PaymentService } from "../service/payment.service.js"; export const paymentConfirm = async (req, res, next) => { try { - const userId = req.user.id; + const userId = req.user.userId; const dto = new CreatePaymentDto({ impUid: req.body.impUid, @@ -24,7 +24,7 @@ export const paymentConfirm = async (req, res, next) => { export const getPayments = async (req, res, next) => { try { - const userId = req.user.id; + const userId = req.user.userId; const payments = await PaymentService.getPayments(userId); const responseData = parseWithBigInt(stringifyWithBigInt(payments)); diff --git a/views/client-paytest.ejs b/views/client-paytest.ejs index ace34cd..6c2e732 100644 --- a/views/client-paytest.ejs +++ b/views/client-paytest.ejs @@ -7,27 +7,28 @@

아임포트 결제 테스트 페이지

- + +