Skip to content

feat: add Payment schemas - #71

Merged
NouhJama merged 1 commit into
mainfrom
feature/payment-schemas
Sep 1, 2026
Merged

NouhJama merged 1 commit into
mainfrom
feature/payment-schemas

Conversation

@NouhJama

@NouhJama NouhJama commented Sep 1, 2026

Copy link
Copy Markdown
Owner

PaymentBase/Create/Cancel/Response following Charge's pattern. No PaymentUpdate class by design -- with the amount forced to equal the charge amount and method/reference being incidental, there is nothing meaningful to edit. Void and re-record instead.

The schema can only validate amount > 0. The real rule, that amount must exactly equal the charge's amount, needs the Charge row and so lives in PaymentService.

method and reference are independently optional -- a reference without a method is deliberately allowed, since a staff member might record an M-Pesa code without selecting the method, and rejecting that would discard useful information over a formality.

PaymentBase/Create/Cancel/Response following Charge's pattern.
No PaymentUpdate class by design -- with the amount forced to
equal the charge amount and method/reference being incidental,
there is nothing meaningful to edit. Void and re-record instead.

The schema can only validate amount > 0. The real rule, that
amount must exactly equal the charge's amount, needs the Charge
row and so lives in PaymentService.

method and reference are independently optional -- a reference
without a method is deliberately allowed, since a staff member
might record an M-Pesa code without selecting the method, and
rejecting that would discard useful information over a
formality.
@NouhJama
NouhJama merged commit b9b783b into main Sep 1, 2026
1 check passed
@NouhJama
NouhJama deleted the feature/payment-schemas branch September 1, 2026 09:04
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.

1 participant