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 JSON-formatted minimum amount details to Amount_Too_Small_Exception error message #10350

Open
mgascam opened this issue Feb 11, 2025 · 0 comments · May be fixed by #10351
Open

Add JSON-formatted minimum amount details to Amount_Too_Small_Exception error message #10350

mgascam opened this issue Feb 11, 2025 · 0 comments · May be fixed by #10351

Comments

@mgascam
Copy link
Contributor

mgascam commented Feb 11, 2025

Description

This issue follows up on #10092. Previously, we added metadata to the error, but we noticed that this metadata is stripped by the Jetpack REST API endpoint of WPCOM. This endpoint is used by mobile apps to access the store's capture_terminal_payment endpoint of the WooCommerce REST API.

In this pull request, we are including the JSON-formatted error metadata within the error message, as the error message itself is not stripped from the response.

Acceptance criteria

  • Include the JSON-formatted metadata as part of the error message.
  • The metadata should include:
    • Minimum amount: The amount in the smallest currency unit (e.g., 50).
    • Currency: The currency code in ISO 4217 format (e.g., USD).

Additional context

Discussion in Slack: p1738161784891029-slack-C025A8VV728

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