From 17ead385249888c3ea737e684a13d7e79c0c8b3f Mon Sep 17 00:00:00 2001 From: Yu Sung Date: Fri, 6 Sep 2024 14:47:41 +0900 Subject: [PATCH] =?UTF-8?q?PG=20=EA=B2=B0=EC=A0=9C=20-=20=EC=B9=B4?= =?UTF-8?q?=EC=B9=B4=EC=98=A4=ED=8E=98=EC=9D=B4=20=EA=B2=B0=EC=A0=9C=20-?= =?UTF-8?q?=20=EA=B5=AC=EB=A7=A4=EC=9E=90=20=EC=A0=95=EB=B3=B4=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Can/Payment/CanPgPaymentViewModel.swift | 22 +++++++++---------- 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/SodaLive/Sources/MyPage/Can/Payment/CanPgPaymentViewModel.swift b/SodaLive/Sources/MyPage/Can/Payment/CanPgPaymentViewModel.swift index 520cc24..448cb0e 100644 --- a/SodaLive/Sources/MyPage/Can/Payment/CanPgPaymentViewModel.swift +++ b/SodaLive/Sources/MyPage/Can/Payment/CanPgPaymentViewModel.swift @@ -56,20 +56,18 @@ final class CanPgPaymentViewModel: ObservableObject { payload.orderId = "\(data.chargeId)" payload.method = paymentMethod!.rawValue - if paymentMethod != .kakaopay { - var username = UserDefaults.string(forKey: .nickname) - - if username.count > 10 { - username = "\(username.prefix(6))..." - } - - let bootUser = BootUser() - bootUser.userId = "\(UserDefaults.int(forKey: .userId))" - bootUser.username = UserDefaults.string(forKey: .nickname) - - payload.user = bootUser + var username = UserDefaults.string(forKey: .nickname) + + if username.count > 10 { + username = "\(username.prefix(6))..." } + let bootUser = BootUser() + bootUser.userId = "\(UserDefaults.int(forKey: .userId))" + bootUser.username = UserDefaults.string(forKey: .nickname) + + payload.user = bootUser + onSuccess() } else { if let message = decoded.message {