-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
YEL-154 [develop] apple notification 개발 서버 배포
YEL-154 [develop] apple notification 개발 서버 배포
- Loading branch information
Showing
17 changed files
with
213 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
...main/java/com/yello/server/domain/purchase/controller/PurchaseNotificationController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package com.yello.server.domain.purchase.controller; | ||
|
||
import static com.yello.server.global.common.SuccessCode.POST_APPLE_NOTIFICATION_SUCCESS; | ||
|
||
import com.yello.server.domain.purchase.dto.request.AppleNotificationRequest; | ||
import com.yello.server.domain.purchase.service.PurchaseService; | ||
import com.yello.server.global.common.dto.BaseResponse; | ||
import com.yello.server.infrastructure.slack.annotation.SlackPurchaseNotification; | ||
import lombok.RequiredArgsConstructor; | ||
import org.springframework.web.bind.annotation.PostMapping; | ||
import org.springframework.web.bind.annotation.RequestBody; | ||
import org.springframework.web.bind.annotation.RestController; | ||
|
||
@RestController | ||
@RequiredArgsConstructor | ||
public class PurchaseNotificationController { | ||
|
||
private final PurchaseService purchaseService; | ||
|
||
@PostMapping("/v2/apple/notifications") | ||
@SlackPurchaseNotification | ||
public BaseResponse appleNotification( | ||
@RequestBody AppleNotificationRequest request | ||
) { | ||
purchaseService.appleNotification(request); | ||
return BaseResponse.success(POST_APPLE_NOTIFICATION_SUCCESS); | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
src/main/java/com/yello/server/domain/purchase/dto/apple/AppleNotificationPayloadVO.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package com.yello.server.domain.purchase.dto.apple; | ||
|
||
import lombok.Builder; | ||
|
||
@Builder | ||
public record AppleNotificationPayloadVO( | ||
String notificationType, | ||
String subType, | ||
ApplePayloadDataVO data, | ||
String notificationUUID | ||
|
||
) { | ||
|
||
} |
13 changes: 13 additions & 0 deletions
13
src/main/java/com/yello/server/domain/purchase/dto/apple/ApplePayloadDataVO.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package com.yello.server.domain.purchase.dto.apple; | ||
|
||
public record ApplePayloadDataVO( | ||
String appAppleId, | ||
String bundleId, | ||
String environment, | ||
String signedTransactionInfo, | ||
String signedRenewalInfo, | ||
int status | ||
|
||
) { | ||
|
||
} |
11 changes: 11 additions & 0 deletions
11
src/main/java/com/yello/server/domain/purchase/dto/apple/ApplePayloadSummaryVO.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package com.yello.server.domain.purchase.dto.apple; | ||
|
||
public record ApplePayloadSummaryVO( | ||
String requestIdentifier, | ||
String environment, | ||
String appAppleId, | ||
String bundleId, | ||
String productId | ||
) { | ||
|
||
} |
7 changes: 7 additions & 0 deletions
7
src/main/java/com/yello/server/domain/purchase/dto/request/AppleNotificationRequest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package com.yello.server.domain.purchase.dto.request; | ||
|
||
public record AppleNotificationRequest( | ||
String signedPayload | ||
) { | ||
|
||
} |
10 changes: 10 additions & 0 deletions
10
src/main/java/com/yello/server/domain/purchase/dto/response/AppleNotificationResponse.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package com.yello.server.domain.purchase.dto.response; | ||
|
||
import lombok.Builder; | ||
|
||
@Builder | ||
public record AppleNotificationResponse( | ||
|
||
) { | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.