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 Cancellation Reasons to Lock Payment Order Endpoints #400

Open
chibie opened this issue Jan 23, 2025 · 7 comments · May be fixed by #406
Open

Add Cancellation Reasons to Lock Payment Order Endpoints #400

chibie opened this issue Jan 23, 2025 · 7 comments · May be fixed by #406

Comments

@chibie
Copy link
Contributor

chibie commented Jan 23, 2025

User Story
As a provider, I want to see the cancellation reasons when viewing my orders, so I can better understand why orders were cancelled and improve my service accordingly.

Acceptance Criteria

  1. GIVEN a provider fetches their orders list
    WHEN the orders are returned
    THEN cancellation_reasons are included in the response for each order

  2. GIVEN a provider fetches a specific order by ID
    WHEN the order is returned
    THEN cancellation_reasons are included in the response

  3. GIVEN an order has no cancellations
    WHEN the order details are returned
    THEN cancellation_reasons shows empty array

Tech Details

  • Update LockPaymentOrderResponse type to include cancellation_reasons field
  • Update GetLockPaymentOrders controller to include cancellation reasons in response
  • Update GetLockPaymentOrderByID controller to include cancellation reasons in response
  • Update tests in provider_test.go to verify cancellation reasons in responses:
    • Test list endpoint with cancelled orders
    • Test single order endpoint with cancelled order
    • Verify empty array returned for orders without cancellations in both endpoints

Notes/Assumptions

  • LockPaymentOrder entity already has cancellation_reasons field
  • Default empty array should be handled correctly
  • No changes needed to order creation/update logic
  • Existing test data will need to include orders with cancellation reasons

Open Questions

@od-hunter
Copy link

Hi, please can I be assigned this please? This would be my first time contributing to this project and I would love to be the given the opportunity to solve this issue please. I am good with tests and I have experience in html, css, JavaScript,TypeScript and solidity, and Cairo.

@Amizeey
Copy link

Amizeey commented Jan 23, 2025

I’d like to resolve this.

@jancris100
Copy link

Hey! I'm Jan.
Member of Dojo Coding. I have contributed before to other projects like:

• Dojo
Can I work on this issue?

@Supa-mega
Copy link

Can I take this issue? first time contributor

@caxtonacollins
Copy link

I’d like to help with this.

@chibie
Copy link
Contributor Author

chibie commented Jan 28, 2025

@od-hunter are you working on this ticket?

@od-hunter
Copy link

od-hunter commented Jan 28, 2025

@od-hunter are you working on this ticket?

Yes sir

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

Successfully merging a pull request may close this issue.

6 participants