fix(apple): 增加无效收据原因日志并补充订阅过期时间调试输出
This commit is contained in:
@@ -36,6 +36,7 @@ public class AppleReceiptController {
|
||||
private final ApplePurchaseService applePurchaseService;
|
||||
private final SignedDataVerifier signedDataVerifier;
|
||||
|
||||
|
||||
public AppleReceiptController(AppleReceiptService appleReceiptService,
|
||||
ApplePurchaseService applePurchaseService,
|
||||
SignedDataVerifier signedDataVerifier) {
|
||||
@@ -83,12 +84,13 @@ public class AppleReceiptController {
|
||||
*/
|
||||
@PostMapping("/notification")
|
||||
public BaseResponse<Boolean> receiveNotification(@RequestBody Map<String, String> body, HttpServletRequest request) {
|
||||
|
||||
|
||||
if (body == null) {
|
||||
throw new BusinessException(ErrorCode.PARAMS_ERROR, "body 不能为空");
|
||||
}
|
||||
// 从请求体中获取 Apple 签名的载荷
|
||||
String signedPayload = body.get("signedPayload");
|
||||
|
||||
// 校验 signedPayload 是否为空
|
||||
if (signedPayload == null || signedPayload.isBlank()) {
|
||||
throw new BusinessException(ErrorCode.PARAMS_ERROR, "signedPayload 不能为空");
|
||||
|
||||
Reference in New Issue
Block a user