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 hmac verification on ipn #281

Open
wants to merge 9 commits into
base: develop
Choose a base branch
from

Conversation

joyet-simon
Copy link
Contributor

@joyet-simon joyet-simon commented Sep 25, 2024

Reason for change

Linear task

Need to implement the verification of HMAC signature on IPN.

Code changes

  • Add a securityHelper to call php-client's function to check HMAC signature.
  • Call this helper in the PaymentHelper.
  • Add some unit tests.

How to test

As a reviewer, you are encouraged to test the PR locally.

You can run unit test locally.

QA ENV

Create a payment and check on Datadog if the log of IPN is ok.
You can try to use Postman to call the IPN url with no signature and bad signature and check the error message.

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
  • Documentation is updated (API, developer documentation, ADR, Notion...)

Non applicable

@joyet-simon joyet-simon requested a review from a team as a code owner September 25, 2024 09:52

This comment has been minimized.

This comment has been minimized.

src/composer.json Show resolved Hide resolved
src/includes/Helpers/PaymentHelper.php Outdated Show resolved Hide resolved
src/tests/Helpers/PaymentHelperTest.php Show resolved Hide resolved
src/tests/Helpers/PaymentHelperTest.php Show resolved Hide resolved
src/tests/Helpers/SecurityHelperTest.php Show resolved Hide resolved
src/tests/Helpers/SecurityHelperTest.php Show resolved Hide resolved

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

Copy link

github-actions bot commented Oct 1, 2024

⏳E2E tests are currently running.
➡️ You can follow their progression here.

Copy link

sonarcloud bot commented Oct 1, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants