With this PR, we are implementing connector integrity checks for the authorize and sync flow. After receiving a response from the connector, we will validate on our end whether the data sent to the connector matches the data received from their end.
At api level the response will be 5xx with connector_transaction_id in response for merchant to reference in case if integrity failures for both sync and authorize.
How did you test it?
Since its a blackbox scenario, we cannot test until and unless there is a error data from connectors end!
Local testing scenario
Scenario[1] Where Connector send wrong currency in both authorize and sync flow
Type of Change
Description
With this PR, we are implementing connector integrity checks for the authorize and sync flow. After receiving a response from the connector, we will validate on our end whether the data sent to the connector matches the data received from their end.
If the validation fails we will mark the transaction as processing so that if the connector fixes the response in sync, the status will move to respective terminal state.
At api level the response will be 5xx with connector_transaction_id in response for merchant to reference in case if integrity failures for both sync and authorize.
How did you test it?
Since its a blackbox scenario, we cannot test until and unless there is a error data from connectors end!
Local testing scenario
Scenario[1] Where Connector send wrong currency in both authorize and sync flow
Payments Create
Payments Sync
with force_sync as False
response
we should get error message as integrity check failed with status as processing.
with force_sync as true
Scenario[2] Where Connector send wrong currency in both authorize but fixes the same sync flow
Payments Create
Payments Sync
with force_sync true
Response
Status should move to succeeded!
Scenario[3] Where connector sends correct data in both authorize and sync flow
Payments Create
Response
Payments Sync
Response
Checklist
cargo +nightly fmt --all
cargo clippy