File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
src/main/kotlin/goodspace/teaming/payment/service Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -30,8 +30,15 @@ class PaymentService(
3030){
3131 @Transactional
3232 fun requestApprove (paymentVerifyRespondDto : PaymentVerifyRespondDto ): ResponseEntity <Void > {
33- if (paymentVerifyRespondDto.authResultCode != " 0000" ){
34- throw RuntimeException (" 카드사인증 인증 실패: ${paymentVerifyRespondDto.authResultCode} in requestApprove Service Layer" )
33+ if (paymentVerifyRespondDto.authResultCode != " 0000" ) {
34+ val platform = paymentVerifyRespondDto.mallReserved.split(" :" )[2 ]
35+
36+ val redirectUrl = if (platform == " APP" ) " teaming://payment/fail"
37+ else " https://teaming-three.vercel.app/payment/fail"
38+
39+ return ResponseEntity .status(HttpStatus .FOUND )
40+ .header(" Location" , redirectUrl)
41+ .build()
3542 }
3643
3744 val amount = paymentVerifyRespondDto.amount
You can’t perform that action at this time.
0 commit comments