Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add partial capture in deferred capture #84

Merged
merged 14 commits into from
Oct 11, 2023

Conversation

joyet-simon
Copy link
Contributor

@joyet-simon joyet-simon commented Oct 10, 2023

Reason for change

Linear task
We need to implement the possibility to make a partial capture in the deferred capture feature.

Code changes

  • We add a status PartialCaptured in field order.custom.ALMA_Deferred_Capture_Status.
  • We add a field order.custom.ALMA_Deferred_Capture_Partial_Amount.
  • If ALMA_Deferred_Capture_Partial_Amount is filled, the job fill the amount with this value for the capture.
  • We create lot of variables to simplify the capture code.
  • We rectify and add unit tests.

How to test

On the SFCC dev env, create 2 orders.
In the bo go to Merchant tools > Ordering > Orders
In one order, go to the Attributes tab and fill the Amount for partial capture field.
Run the job CapturePaymentOrders (Administration > Operations > Jobs)
When it’s completed, return on the 2 last orders and, in the Attributes tab, check this two fields: Capture Status and Amount captured

Checklist for authors and reviewers

  • The title of the PR uses business wording, not technical jargon, for the changelog readers to understand it
  • The PR implements the changes asked in the referenced task / issue
  • The automated tests are compliant with the testing strategy
  • The tests are relevant, and cover the corner/error cases, not only the happy path
  • You understand the impact of this PR on existing code/features
  • The changes include adequate logging and Datadog traces

Non applicable

  • Documentation is updated (API, developer documentation, ADR, Notion...)

@sonarcloud
Copy link

sonarcloud bot commented Oct 11, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@joyet-simon joyet-simon merged commit 8872100 into develop Oct 11, 2023
3 checks passed
@joyet-simon joyet-simon deleted the feature/MPP-648_partial_capture branch October 11, 2023 12:52
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.

2 participants