bcgov / bcgov/reserve-rec-api

Payment: Admin-initiated cancellation and refund

Open
#173 3 comments 0 reactions 1 assignee Claimed by @davidclaveau View on GitHub
Reservations
Dominant language
JavaScript
Stars
2
Forks
7
Avg merge
15h 49m
Merged PRs (30d)
57

Description

#### Description:

If an admin would like to initiate a cancellation/refund for a booking, they should be able to initiate this process in the Customer's account page.

#### Acceptance Criteria:

Given I'm an admin
When I've decided to initiate a cancellation and refund
Then I should be able to see the user's bookings in their account (which I can cancel).

Given I'm an admin
When I click "Cancel" for a booking
Then I can initiate the cancellation and refund process (after confirmation prompt)

Given I'm an admin
When I cancel a booking
Then I can expect that a status update for the booking will show as "Refunded/Cancelled" (or to that extent)

Given I'm an admin
When I've cancelled a booking recently
Then I can expect the refund to be (partially) returned to the user's credit card

#### Development Checklist:
- [ ] Pull appropriate [Fee and/or Change Policy](https://github.com/bcgov/reserve-rec-api/wiki/Data-Model#fee-policies) and ensure correct amount is refunded to user.
- [ ] Policies should be revisited (#177) and properly generated (#179) so that, when it's pulled for a refund, it can accurately calculate properties like refund amount, if user is within cancellation window, etc.
- [ ] Confirm the following items are available in Dynamo for the original transaction:
- [ ] `adjId` - Worldline transaction ID specific to refund query (this would be the `trnId` from the inital transaction)
- [ ] `trnAmount` - amount to be refunded
- [ ] Cross-reference that the refund amount (`trnAmount`) is equal to the allotted amount, as outlined in the item's refund policy
- [ ] Initiate refund by POST request to Wordline with refund string query
- [ ] Await webhook confirmation or query for status
- [ ] Update transaction in Dynamo accordingly

#### Dependencies

- Blocked by
- #177 and #179
- Blocking

**Relevant documentation as reference**
- https://app.mural.co/t/bcparks2575/m/bcparks2575/1748032558935/974a8730dfbbf58fa129f5fa5d757c3166346e97
- https://bcgov.sharepoint.com/:w:/r/teams/08548/Shared%20Documents/General/Project%20Documentation/4.%20Reservations/Business%20rules/Backcountry%20registration%20policy%20for%20Admin%20cancellations%20and%20refunds.docx?d=w720c0c4f7bdd4caaaa2b0477caecec19&csf=1&web=1&e=HIKsTr
-

**Definition of Ready**

- [ ] Acceptance criteria are included
- [ ] Wireframes are included (if applicable)
- [ ] Design / Solution is accepted by Product Owner (if applicable)
- [ ] Dependencies are identified (technical, business, regulatory/policy)
- [ ] Story has been estimated (under 13 pts)

**Definition of Done**
- In progress:
- [ ] Acceptance criteria are tested (Functionality meets the acceptance criteria defined in the ticket)
- [ ] UI meets accessibility requirements
- [ ] Unit tests are written
- [ ] Work is traceable in GitHub
- [ ] PR linked to ticket number
- [ ] If needed/required - Dev adds flag/label to highlight any migration steps necessary prior to PROD deployment
- Code review:
- [ ] Code is peer reviewed and has passed CI/CD tests
- QA:
- [ ] Acceptance criteria are tested (Functionality meets the acceptance criteria defined in the ticket)
- [ ] Code is potentially shippable to the production environment
- [ ] Functional features have been tested and passed by QA
- [ ] UI components tested by designer
- [ ] Code is deployed to PROD when moved to 'done' column (unless requested otherwise by PO)
- PO Review:
- [ ] Acceptance criteria are tested (Functionality meets the acceptance criteria defined in the ticket)
- [ ] Reviewed and approved by Product Owner

#### Notes:
-
-

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.