fix payment issues
Tests / PHPUnit (push) Successful in 1m17s

This commit is contained in:
root
2026-07-18 19:12:13 -04:00
parent 4aac9472af
commit 068e739408
8 changed files with 1204 additions and 40 deletions
+20 -1
View File
@@ -34,12 +34,18 @@ class PaymentModel extends Model
'number_of_installments',
'installment_seq',
'transaction_id',
'idempotency_key',
'check_file',
'check_number',
'payment_method',
'payment_date',
'school_year',
'status',
'is_void',
'reversal_of_payment_id',
'voided_at',
'voided_by',
'void_reason',
'updated_by',
];
@@ -69,11 +75,17 @@ class PaymentModel extends Model
'number_of_installments' => 'permit_empty|integer|greater_than[0]',
'installment_seq' => 'permit_empty|integer|greater_than[0]',
'transaction_id' => 'permit_empty|max_length[100]',
'transaction_id' => 'required|max_length[100]',
'idempotency_key' => 'permit_empty|max_length[36]',
'payment_method' => 'required|in_list[cash,check,card]',
'payment_date' => 'required|valid_date',
'school_year' => 'required|string|max_length[9]',
'status' => 'required|max_length[50]',
'is_void' => 'permit_empty|in_list[0,1]',
'reversal_of_payment_id' => 'permit_empty|integer',
'voided_at' => 'permit_empty|valid_date',
'voided_by' => 'permit_empty|integer',
'void_reason' => 'permit_empty|max_length[255]',
'check_file' => 'permit_empty|max_length[255]',
'check_number' => 'permit_empty|max_length[100]',
'updated_by' => 'permit_empty|integer',
@@ -124,10 +136,17 @@ class PaymentModel extends Model
'integer' => 'Number of installments must be an integer.',
'greater_than' => 'Number of installments must be greater than zero.',
],
'transaction_id' => [
'required' => 'Transaction ID is required.',
'max_length' => 'Transaction ID must not exceed 100 characters.',
],
'installment_seq' => [
'integer' => 'Installment sequence must be an integer.',
'greater_than' => 'Installment sequence must be greater than zero.',
],
'idempotency_key' => [
'max_length' => 'Idempotency key must not exceed 36 characters.',
],
'check_number' => [
'max_length' => 'Check number must not exceed 100 characters.',
],