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

Fix wrong data types being sent to Insurance API #603

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

olance
Copy link
Contributor

@olance olance commented Nov 13, 2024

Reason for change

In most recent versions of PrestaShop, order ID and cart ID gets passed as integers instead of string, and the default birthdate is now a DateTime instead of a Date.

Those differences in data types cause our API to reject our calls to create a subscripiton.

Linear task

Code changes

  • Enforced string types for order/cart ID
  • Changed how we detect PrestaShop's "empty" birth date to work with both Date (0000-00-00) and DateTime (0000-00-00 00:00:00)
  • Improved error reporting

How to test

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

  • Run on a 8.1.16/8.1.7 and buy a product with insurance: the insurance should be correctly activated upon checkout

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...)

@github-actions github-actions bot added the type: bugfix Bug fix label Nov 13, 2024
Copy link

sonarcloud bot commented Nov 13, 2024

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

Successfully merging this pull request may close these issues.

1 participant