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

[PW-7032] Add unit tests for Adyen Order Payment helper #1732

Merged
merged 14 commits into from
Sep 28, 2022
Merged

Conversation

RokPopov
Copy link
Contributor

@RokPopov RokPopov commented Sep 27, 2022

Description
This PR will increase the unit test coverage of the Adyen Order Payment helper class.
Added unit tests for the following methods:

  • /Helper/AdyenOrderHelper::isFullAmountFinalized
  • /Helper/AdyenOrderHelper::isFullAmountAuthorized
  • /Helper/AdyenOrderHelper::refundAdyenOrderPayment

RokPopov and others added 9 commits September 22, 2022 10:32
* Update adyen method call for virtual products

* Remove checking for shipping adress before doing the payment methods call

Co-authored-by: Jeantwan Teuma <Morerice@users.noreply.github.com>
Co-authored-by: Peter Ojo <peterojo@users.noreply.github.com>
* create adyen and magento invoice from webhook if captured manually in CA

* remove code smells

* throw exception if adyen_invoice null and canInvoice is false

* throw exception in case of CA initiated partial manual capture

* use AdyenWebhookException instead of a generic one

* rename method

Co-authored-by: Can Demiralp <ecandemiralp@gmail.com>

* use renamed method

Co-authored-by: Can Demiralp <ecandemiralp@gmail.com>

* update $adyenInvoice

Co-authored-by: Michael Paul <michael.paul@adyen.com>

* resolve merge conflicts

* get rid of code smells

* remove final code smells

* use $adyenInvoiceObject instead of $adyenInvoice

* remove code smell

Co-authored-by: Can Demiralp <ecandemiralp@gmail.com>
Co-authored-by: Michael Paul <michael.paul@adyen.com>
Co-authored-by: Peter Ojo <peterojo@users.noreply.github.com>
@RokPopov RokPopov changed the title Pw 7032 [PW-7032] Add unit tests for Adyen Order Payment helper Sep 27, 2022
@RokPopov RokPopov marked this pull request as ready for review September 28, 2022 12:58
@RokPopov RokPopov requested a review from a team as a code owner September 28, 2022 12:58
@sonarcloud
Copy link

sonarcloud bot commented Sep 28, 2022

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

@RokPopov RokPopov merged commit 2479621 into develop Sep 28, 2022
@RokPopov RokPopov deleted the PW-7032 branch September 28, 2022 15:58
@AlexandrosMor AlexandrosMor mentioned this pull request Oct 4, 2022
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.

None yet

5 participants