Skip to content

Conversation

@SamNie2027
Copy link
Contributor

Description

Exposes the PaymentsService via a controller that maps CreatePaymentIntent to a route.
New mappers and dtos for the controller

Changes Made

Dtos:

  • CreatePaymentIntentDto
  • PaymentIntentResponseDto

Mappers:

  • Map CreatePaymentIntentDto to CreatePaymentIntentRequest
  • Map PaymentIntentResponse to PaymentIntentResponseDto

Payment Controller:

  • Accepts a CreatePaymentIntentDto, calls the payment service, returns a PaymentIntentResponseDto

Testing & Verification

All tests pass, new tests added:

Mappers:

  • Map CreatePaymentIntentDto to CreatePaymentIntentRequest with optional params
  • Map PaymentIntentResponse to PaymentIntentResponseDto with optional params
  • Map CreatePaymentIntentDto to CreatePaymentIntentRequest without optional params
  • Map PaymentIntentResponse to PaymentIntentResponseDto without optional params

PaymentsService:

  • Testing that all stripe statuses map correctly to our DonationStatus enum

PaymentsController:

  • create a payment intent and return a valid payment intent DTO with all optional parameters
  • it should create a payment intent and return all the fields given with no optional parameters

Verification Steps:

Future Improvements/Notes

This does not update our database or call any methods from the donations component

Related Issues

Closes #36

@SamNie2027 SamNie2027 requested a review from thaninbew December 4, 2025 17:17
@thaninbew thaninbew merged commit 80c0378 into main Dec 5, 2025
4 checks passed
@thaninbew thaninbew deleted the 36-Payments-Service-Controller branch December 5, 2025 18:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PaymentsService controller

3 participants