trebol-ecommerce / trebol-backend-monolith

Monolithic eCommerce backend web application that exposes a RESTful API.
MIT License
16 stars 21 forks source link

Billing Address is required for checkout, contrary to the API spec #246

Closed bglamadrid closed 1 year ago

bglamadrid commented 1 year ago

Build context

Project version

v0.1.0

Summary

Customers should not be required to submit any address during checkout, unless they are a business or have requested to include shipping.

How to Reproduce

Method A: Through the frontend

  1. Start the frontend and navigate to it in your browser.
  2. Add products to your shopping cart.
  3. Proceed through the checkout page as normal, requesting a normal Bill as billing method and filling all important details.
  4. Except addresses: do not request shipping and do not provide any address at all.
  5. Hit Request transaction or the equivalent "submit" action button.
  6. The request should have failed.

Method B: Interfacing

  1. Get a JSON representing a valid SellPojo object (the API spec document has some examples)
  2. Ready it through a third-party (curl, Postman, etc).
  3. Ensure billingAddress is an invalid address (can be absent or null).
  4. Send a request to /public/checkout using this JSON.
  5. It should respond with a 400 Bad Request, indicating that the billingAddress is not meeting the validation requirements.

Expected behavior

In either of these cases, the request should have succeeded, leaving the respective billingAddress as null and proceeding through the internal checkout process.

bglamadrid commented 1 year ago

This is likely still present in v0.2.0.