dev add reset password
Test Workflow / test (push) Successful in 3s

This commit is contained in:
vladp
2026-02-18 16:14:17 +07:00
parent 8811f3ce0e
commit 3d5856d302
7 changed files with 232 additions and 2 deletions
@@ -0,0 +1,33 @@
package ru.soune.nocopy.controller;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;
import ru.soune.nocopy.entity.payment.Payment;
import ru.soune.nocopy.service.payment.PaymentService;
import java.util.Map;
@RestController
@RequestMapping("/api/payments")
@RequiredArgsConstructor
@Slf4j
public class PaymentController {
private final PaymentService paymentService;
@PostMapping("/create")
public Payment createPayment(@RequestParam String email, @RequestParam Long tariffId,
@RequestParam String operationType, @RequestParam String operationUuid) {
return paymentService.createPayment(email, tariffId, operationType, operationUuid);
}
@PostMapping("webhook/yookassa")
public void handleYooKassaNotification(@RequestBody Map<String, Object> notification) {
try {
paymentService.handlePaymentNotification(notification);
} catch (Exception e) {
log.error("Error processing payment notification", e);
}
}
}