- 1. Update
PaymentStatusenum inlib.rs(addAuthorized = 5, shiftScheduledPending = 6) - 2. Add
capture_deadline: u64field toPaymentstruct inlib.rs - 3. Update all
Payment { ... }constructors inlib.rsto includecapture_deadline: 0 - 4. Extract
finalize_paymentsettlement helper fromcomplete_payment_internalinlib.rs - 5. Add
authorize_paymentfunction inlib.rs - 6. Add
capture_paymentfunction inlib.rs - 7. Update
expire_paymentto allowAuthorizedstatus inlib.rs - 8. Update
dispute_paymentto allowAuthorizedstatus inlib.rs - 9. Update
bulk_expire_paymentsto allowAuthorizedstatus inlib.rs - 10. Add
PaymentAuthorizedandPaymentCapturedevents inevents.rs - 11. Add emitter functions for new events in
events.rs - 12. Add tests for authorization, capture within window, missed window, dispute during auth in
test.rs - 13. Run
cargo test -p ahjoor-paymentsand fix any issues