Skip to content

Commit

Permalink
Merge pull request #237 from Genti2024/feat/pgreq-two
Browse files Browse the repository at this point in the history
Feat: #196 인앱결제 API Swagger UI에 표시
  • Loading branch information
LeeJae-H authored Dec 5, 2024
2 parents 4e12fbb + 4a0777a commit cc2895e
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
package com.gt.genti.purchase.api;

import com.gt.genti.error.ResponseCode;
import com.gt.genti.purchase.dto.request.PurchaseRequestDto;
import com.gt.genti.response.GentiResponse;
import com.gt.genti.swagger.AuthorizedUser;
import com.gt.genti.swagger.EnumResponse;
import com.gt.genti.swagger.EnumResponses;
import com.gt.genti.user.model.AuthUser;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.RequestBody;

@AuthorizedUser
@Tag(name = "[UserPurchaseController] 인앱 결제 컨트롤러", description = "결제 내용을 서버에서 검증합니다.")
public interface UserPurchaseApi {

@Operation(summary = "영수증 검증", description = "클라이언트로부터 받은 결제 내역을 검증합니다.")
@EnumResponses(value = {
@EnumResponse(ResponseCode.OK),
@EnumResponse(ResponseCode.UserNotFound)
})
ResponseEntity<GentiResponse.ApiResult<Boolean>> validateReceipt(
@AuthUser Long userId,
@RequestBody PurchaseRequestDto purchaseRequestDto);
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.gt.genti.purchase.controller;

import com.gt.genti.purchase.api.UserPurchaseApi;
import com.gt.genti.purchase.dto.request.PurchaseRequestDto;
import com.gt.genti.purchase.service.InAppPurchaseService;
import com.gt.genti.response.GentiResponse;
Expand All @@ -14,7 +15,7 @@
@RestController
@RequestMapping("/api/v1/users/in-app-purchases")
@RequiredArgsConstructor
public class UserPurchaseController {
public class UserPurchaseController implements UserPurchaseApi {

private final InAppPurchaseService inAppPurchaseService;

Expand Down

0 comments on commit cc2895e

Please sign in to comment.