Feature(core): Added a new CaptureMethod : SequentialAutomatic to Support CIT Mandates for Paybox
Type of Change
- [ ] Bugfix
- [x] New feature
- [ ] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
Description
- Added a new CaptureMethod : SequentialAutomatic -> does Auth and capture in two api calls one after the other
-
For Paybox:
- If the payment is a Customer-Initiated Transaction (CIT), two API calls will be made:
- First for Authorization (
Auth) - Followed by Capture (
Capture)
- First for Authorization (
- For all other payment types,
SequentialAutomaticwill function the same asAutomatic.
- If the payment is a Customer-Initiated Transaction (CIT), two API calls will be made:
-
For other connectors:
SequentialAutomaticwill behave the same asAutomatic.
Additional Changes
- [x] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [ ] This PR modifies application configuration/environment variables
Motivation and Context
For Customer-Initiated Transactions (CIT) with Paybox, authorization and capture must be performed as two separate operations. Paybox does not support a combined authorization and capture in a single request. To avoid requiring the merchant to handle this process, we introduced a new capture method: SequentialAutomatic, which ensures that two API calls are made automatically.
How did you test it?
Checklist
- [x] I formatted the code
cargo +nightly fmt --all - [x] I addressed lints thrown by
cargo clippy - [x] I reviewed the submitted code
- [ ] I added unit tests for my changes where possible
Changed Files
Can we add cypress test for this ?
@likhinbopanna we dont support SequentialAutomatic capture method yet in the cypress tests(only have manual and automatic) So can we merge this without cypress for now?