From af1ceb9eca563302b78981c655b258ff3de8b457 Mon Sep 17 00:00:00 2001 From: smarcet Date: Thu, 2 Oct 2025 13:23:36 -0300 Subject: [PATCH 1/6] chore: add to table SummitAttendeeTicket fild summit id to improve performance chore: add needed IDX --- ...DoctrineSummitAttendeeTicketRepository.php | 40 +++++++++---------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/app/Repositories/Summit/DoctrineSummitAttendeeTicketRepository.php b/app/Repositories/Summit/DoctrineSummitAttendeeTicketRepository.php index 9629a92fd..769fb9d63 100644 --- a/app/Repositories/Summit/DoctrineSummitAttendeeTicketRepository.php +++ b/app/Repositories/Summit/DoctrineSummitAttendeeTicketRepository.php @@ -52,26 +52,26 @@ public function __construct(EntityManagerInterface $em, ClassMetadata $class) /** @var array}> */ private array $joinCatalog = [ - 'o' => ['e.order', 'join', []], - 's' => ['e.summit', 'join', []], - 'ord_m' => ['o.owner', 'leftJoin', ['o']], - 'a' => ['e.owner', 'leftJoin', []], - 'a_c' => ['a.company', 'leftJoin', ['a']], - 'm' => ['a.member', 'leftJoin', ['a']], - 'am' => ['a.manager', 'leftJoin', ['a']], - 'm2' => ['am.member', 'leftJoin', ['am']], - 'b' => ['e.badge', 'leftJoin', []], - 'bt' => ['b.type', 'leftJoin', ['b']], - 'al' => ['bt.access_levels', 'leftJoin', ['bt']], - 'bf' => ['b.features', 'leftJoin', ['b']], - 'bt_bf' => ['bt.badge_features', 'leftJoin', ['bt']], - 'prt' => ['b.prints', 'leftJoin', ['b']], - 'rr' => ['e.refund_requests', 'leftJoin', []], - 'ta' => ['e.applied_taxes', 'leftJoin', []], - 'tt' => ['e.ticket_type', 'join', []], - 'pc' => ['e.promo_code', 'leftJoin', []], - 'pct' => ['pc.tags', 'leftJoin', ['pc']], - 'avt' => ['bt.allowed_view_types', 'join', ['bt']], + 'o' => ['e.order', 'join', []], + 's' => ['e.summit', 'join', []], + 'ord_m' => ['o.owner', 'leftJoin', ['o']], + 'a' => ['e.owner', 'leftJoin', []], + 'a_c' => ['a.company', 'leftJoin', ['a']], + 'm' => ['a.member', 'leftJoin', ['a']], + 'am' => ['a.manager', 'leftJoin', ['a']], + 'm2' => ['am.member', 'leftJoin', ['am']], + 'b' => ['e.badge', 'leftJoin', []], + 'bt' => ['b.type', 'leftJoin', ['b']], + 'al' => ['bt.access_levels', 'leftJoin', ['bt']], + 'bf' => ['b.features', 'leftJoin', ['b']], + 'bt_bf' => ['bt.badge_features', 'leftJoin', ['bt']], + 'prt' => ['b.prints', 'leftJoin', ['b']], + 'rr' => ['e.refund_requests', 'leftJoin', []], + 'ta' => ['e.applied_taxes', 'leftJoin', []], + 'tt' => ['e.ticket_type', 'join', []], + 'pc' => ['e.promo_code', 'leftJoin', []], + 'pct' => ['pc.tags', 'leftJoin', ['pc']], + 'avt' => ['bt.allowed_view_types', 'join', ['bt']], ]; private function ensureJoin(QueryBuilder $qb, string $alias): void From 407c8e6b1939adb6ebee848ed42c77abbc0e34e3 Mon Sep 17 00:00:00 2001 From: Jose Andres Tejerina Date: Wed, 12 Nov 2025 16:19:48 -0300 Subject: [PATCH 2/6] feat: Extend Swagger Coverage for controller PaymentGatewayWebHookController --- .../PaymentGatewayWebHookController.php | 89 +++++++++++++++++++ app/Swagger/schemas.php | 19 ++++ 2 files changed, 108 insertions(+) diff --git a/app/Http/Controllers/PaymentGatewayWebHookController.php b/app/Http/Controllers/PaymentGatewayWebHookController.php index 3f9743a4d..79d850802 100644 --- a/app/Http/Controllers/PaymentGatewayWebHookController.php +++ b/app/Http/Controllers/PaymentGatewayWebHookController.php @@ -16,6 +16,8 @@ use App\Services\Model\IProcessPaymentService; use App\Services\Model\ISummitOrderService; use Illuminate\Http\Request as LaravelRequest; +use Illuminate\Http\Response; +use Illuminate\Support\Facades\Cache; use models\oauth2\IResourceServerContext; use models\summit\IPaymentConstants; use models\summit\ISummitRepository; @@ -24,6 +26,8 @@ use models\exceptions\EntityNotFoundException; use models\exceptions\ValidationException; use Exception; +use OpenApi\Attributes as OA; + /** * Class PaymentGatewayWebHookController * @package App\Http\Controllers @@ -96,6 +100,45 @@ private function getProcessPaymentService(string $application_type):?IProcessPay * @param LaravelRequest $request * @return \Illuminate\Http\JsonResponse|mixed */ + #[OA\Post( + path: "/api/public/v1/summits/all/payments/{application_name}/confirm", + summary: "Generic payment gateway webhook confirmation", + description: "Handles payment gateway webhook callbacks for a given application type.", + operationId: "genericConfirm", + tags: ["PaymentGatewayHook"], + security: [], + parameters: [ + new OA\Parameter( + name: "application_name", + in: "path", + required: true, + description: "Application name (e.g. Show admin)", + schema: new OA\Schema(type: "string") + ) + ], + requestBody: new OA\RequestBody( + required: false, + content: new OA\JsonContent(ref: '#/components/schemas/PaymentGatewayWebhookRequest') + ), + responses: [ + new OA\Response( + response: Response::HTTP_OK, + description: "Payment processed successfully" + ), + new OA\Response( + response: Response::HTTP_ALREADY_REPORTED, + description: "Already reported" + ), + new OA\Response( + response: Response::HTTP_BAD_REQUEST, + description: "Payload error" + ), + new OA\Response( + response: Response::HTTP_PRECONDITION_FAILED, + description: "Precondition failed - missing configuration or invalid data" + ) + ] + )] public function genericConfirm($application_type, LaravelRequest $request){ try { @@ -150,6 +193,52 @@ public function genericConfirm($application_type, LaravelRequest $request){ * @param LaravelRequest $request * @return \Illuminate\Http\JsonResponse|mixed */ + #[OA\Post( + path: "/api/public/v1/summits/{summit_id}/payments/{application_name}/confirm", + summary: "Summit payment gateway webhook confirmation", + description: "Handles payment gateway webhook callbacks for a given summit and application type.", + operationId: "confirm", + tags: ["PaymentGatewayHook"], + security: [], + parameters: [ + new OA\Parameter( + name: "summit_id", + in: "path", + required: true, + description: "Summit identifier", + schema: new OA\Schema(type: "integer") + ), + new OA\Parameter( + name: "application_name", + in: "path", + required: true, + description: "Application Name (e.g ShowAdmin)", + schema: new OA\Schema(type: "string") + ) + ], + requestBody: new OA\RequestBody( + required: false, + content: new OA\JsonContent(ref: '#/components/schemas/PaymentGatewayWebhookRequest') + ), + responses: [ + new OA\Response( + response: Response::HTTP_OK, + description: "Payment processed successfully" + ), + new OA\Response( + response: Response::HTTP_ALREADY_REPORTED, + description: "Already reported" + ), + new OA\Response( + response: Response::HTTP_BAD_REQUEST, + description: "Payload error" + ), + new OA\Response( + response: Response::HTTP_PRECONDITION_FAILED, + description: "Precondition failed - missing configuration or invalid data" + ) + ] + )] public function confirm($summit_id, $application_type, LaravelRequest $request){ try { diff --git a/app/Swagger/schemas.php b/app/Swagger/schemas.php index 35b230377..4ceb5a842 100644 --- a/app/Swagger/schemas.php +++ b/app/Swagger/schemas.php @@ -350,6 +350,25 @@ class RSVPUpdateRequestSchema_{ )] class RSVPAdminAddRequestSchema {} +#[OA\Schema( + schema: 'PaymentGatewayWebhookRequest', + type: 'object', + description: 'Generic payment gateway webhook payload. The structure depends on the payment provider (e.g., Stripe, etc.)', + example: [ + 'id' => 'evt_1234567890', + 'cart_id' => '1234567890', + 'type' => 'charge.succeeded', + 'data' => [ + 'object' => [ + 'id' => 'ch_1234567890', + 'status' => 'succeeded' + ] + ] + ] +)] +class PaymentGatewayWebhookRequestSchema {} + + // Legal Documents #[OA\Schema( From bcf2aab1f30081ce10f85447ce9bf2deaea1126c Mon Sep 17 00:00:00 2001 From: Matias Perrone Date: Fri, 5 Dec 2025 20:50:10 +0000 Subject: [PATCH 3/6] fix: route path, tags --- .../Controllers/PaymentGatewayWebHookController.php | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/app/Http/Controllers/PaymentGatewayWebHookController.php b/app/Http/Controllers/PaymentGatewayWebHookController.php index 79d850802..a85c19532 100644 --- a/app/Http/Controllers/PaymentGatewayWebHookController.php +++ b/app/Http/Controllers/PaymentGatewayWebHookController.php @@ -105,8 +105,7 @@ private function getProcessPaymentService(string $application_type):?IProcessPay summary: "Generic payment gateway webhook confirmation", description: "Handles payment gateway webhook callbacks for a given application type.", operationId: "genericConfirm", - tags: ["PaymentGatewayHook"], - security: [], + tags: ["Payment Gateway Webhook"], parameters: [ new OA\Parameter( name: "application_name", @@ -194,15 +193,14 @@ public function genericConfirm($application_type, LaravelRequest $request){ * @return \Illuminate\Http\JsonResponse|mixed */ #[OA\Post( - path: "/api/public/v1/summits/{summit_id}/payments/{application_name}/confirm", + path: "/api/public/v1/summits/{id}/payments/{application_name}/confirm", summary: "Summit payment gateway webhook confirmation", description: "Handles payment gateway webhook callbacks for a given summit and application type.", - operationId: "confirm", - tags: ["PaymentGatewayHook"], - security: [], + operationId: "summitConfirm", + tags: ["Payment Gateway Webhook"], parameters: [ new OA\Parameter( - name: "summit_id", + name: "id", in: "path", required: true, description: "Summit identifier", From a262fad02a428c5c28a54246d8fff645d7138168 Mon Sep 17 00:00:00 2001 From: Jose Andres Tejerina Date: Thu, 13 Nov 2025 14:53:13 -0300 Subject: [PATCH 4/6] feat: Extend Swagger Coverage for controller PaymentGatewayWebHookController --- .../PaymentGatewayWebHookController.php | 91 +++++++++++++++++++ app/Swagger/PaymentGatewayWebhookSchemas.php | 44 +++++++++ 2 files changed, 135 insertions(+) create mode 100644 app/Swagger/PaymentGatewayWebhookSchemas.php diff --git a/app/Http/Controllers/PaymentGatewayWebHookController.php b/app/Http/Controllers/PaymentGatewayWebHookController.php index 3f9743a4d..b61973430 100644 --- a/app/Http/Controllers/PaymentGatewayWebHookController.php +++ b/app/Http/Controllers/PaymentGatewayWebHookController.php @@ -16,6 +16,8 @@ use App\Services\Model\IProcessPaymentService; use App\Services\Model\ISummitOrderService; use Illuminate\Http\Request as LaravelRequest; +use Illuminate\Http\Response; +use Illuminate\Support\Facades\Cache; use models\oauth2\IResourceServerContext; use models\summit\IPaymentConstants; use models\summit\ISummitRepository; @@ -24,6 +26,8 @@ use models\exceptions\EntityNotFoundException; use models\exceptions\ValidationException; use Exception; +use OpenApi\Attributes as OA; + /** * Class PaymentGatewayWebHookController * @package App\Http\Controllers @@ -96,6 +100,46 @@ private function getProcessPaymentService(string $application_type):?IProcessPay * @param LaravelRequest $request * @return \Illuminate\Http\JsonResponse|mixed */ + #[OA\Post( + path: "/api/public/v1/summits/all/payments/{application_name}/confirm", + summary: "Generic payment gateway webhook confirmation", + description: "Handles payment gateway webhook callbacks for a given application type.", + operationId: "genericConfirm", + tags: ["PaymentGatewayHook"], + security: [], + parameters: [ + new OA\Parameter( + name: "application_name", + in: "path", + required: true, + description: "Application name (e.g. Show admin)", + schema: new OA\Schema(type: "string") + ) + ], + requestBody: new OA\RequestBody( + required: false, + content: new OA\JsonContent(ref: '#/components/schemas/PaymentGatewayWebhookRequest') + ), + responses: [ + new OA\Response( + response: Response::HTTP_OK, + description: "Payment processed successfully", + content: new OA\JsonContent(ref: '#/components/schemas/PaymentProcessingResponse') + ), + new OA\Response( + response: Response::HTTP_ALREADY_REPORTED, + description: "Already reported" + ), + new OA\Response( + response: Response::HTTP_BAD_REQUEST, + description: "Payload error" + ), + new OA\Response( + response: Response::HTTP_PRECONDITION_FAILED, + description: "Precondition failed - missing configuration or invalid data" + ) + ] + )] public function genericConfirm($application_type, LaravelRequest $request){ try { @@ -150,6 +194,53 @@ public function genericConfirm($application_type, LaravelRequest $request){ * @param LaravelRequest $request * @return \Illuminate\Http\JsonResponse|mixed */ + #[OA\Post( + path: "/api/public/v1/summits/{summit_id}/payments/{application_name}/confirm", + summary: "Summit payment gateway webhook confirmation", + description: "Handles payment gateway webhook callbacks for a given summit and application type.", + operationId: "confirm", + tags: ["PaymentGatewayHook"], + security: [], + parameters: [ + new OA\Parameter( + name: "summit_id", + in: "path", + required: true, + description: "Summit identifier", + schema: new OA\Schema(type: "integer") + ), + new OA\Parameter( + name: "application_name", + in: "path", + required: true, + description: "Application Name (e.g ShowAdmin)", + schema: new OA\Schema(type: "string") + ) + ], + requestBody: new OA\RequestBody( + required: false, + content: new OA\JsonContent(ref: '#/components/schemas/PaymentGatewayWebhookRequest') + ), + responses: [ + new OA\Response( + response: Response::HTTP_OK, + description: "Payment processed successfully", + content: new OA\JsonContent(ref: '#/components/schemas/PaymentProcessingResponse') + ), + new OA\Response( + response: Response::HTTP_ALREADY_REPORTED, + description: "Already reported" + ), + new OA\Response( + response: Response::HTTP_BAD_REQUEST, + description: "Payload error" + ), + new OA\Response( + response: Response::HTTP_PRECONDITION_FAILED, + description: "Precondition failed - missing configuration or invalid data" + ) + ] + )] public function confirm($summit_id, $application_type, LaravelRequest $request){ try { diff --git a/app/Swagger/PaymentGatewayWebhookSchemas.php b/app/Swagger/PaymentGatewayWebhookSchemas.php new file mode 100644 index 000000000..cae279fe4 --- /dev/null +++ b/app/Swagger/PaymentGatewayWebhookSchemas.php @@ -0,0 +1,44 @@ + Date: Mon, 8 Dec 2025 14:49:18 +0000 Subject: [PATCH 5/6] fix: issue with merge --- app/Http/Controllers/PaymentGatewayWebHookController.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/app/Http/Controllers/PaymentGatewayWebHookController.php b/app/Http/Controllers/PaymentGatewayWebHookController.php index c55848d7d..a85c19532 100644 --- a/app/Http/Controllers/PaymentGatewayWebHookController.php +++ b/app/Http/Controllers/PaymentGatewayWebHookController.php @@ -18,8 +18,6 @@ use Illuminate\Http\Request as LaravelRequest; use Illuminate\Http\Response; use Illuminate\Support\Facades\Cache; -use Illuminate\Http\Response; -use Illuminate\Support\Facades\Cache; use models\oauth2\IResourceServerContext; use models\summit\IPaymentConstants; use models\summit\ISummitRepository; From 80dc7018e30ce2c75d0598284f9e40612068523c Mon Sep 17 00:00:00 2001 From: Matias Perrone Date: Mon, 8 Dec 2025 14:51:40 +0000 Subject: [PATCH 6/6] fix: remove repeated schema --- app/Swagger/schemas.php | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/app/Swagger/schemas.php b/app/Swagger/schemas.php index 4ceb5a842..35b230377 100644 --- a/app/Swagger/schemas.php +++ b/app/Swagger/schemas.php @@ -350,25 +350,6 @@ class RSVPUpdateRequestSchema_{ )] class RSVPAdminAddRequestSchema {} -#[OA\Schema( - schema: 'PaymentGatewayWebhookRequest', - type: 'object', - description: 'Generic payment gateway webhook payload. The structure depends on the payment provider (e.g., Stripe, etc.)', - example: [ - 'id' => 'evt_1234567890', - 'cart_id' => '1234567890', - 'type' => 'charge.succeeded', - 'data' => [ - 'object' => [ - 'id' => 'ch_1234567890', - 'status' => 'succeeded' - ] - ] - ] -)] -class PaymentGatewayWebhookRequestSchema {} - - // Legal Documents #[OA\Schema(