Open nickevansuk opened 3 years ago
ToDo: @lukedawilson test the following:
TotalPaymentDue.Prepayment
)TotalPaymentDue.Prepayment
)TotalPaymentDue.Prepayment
)TotalPaymentDue.Prepayment
)ToDo: @nickevansuk create the following:
Note for TestOpportunityBookableFreePrepaymentOptional and TestOpportunityBookableFreePrepaymentRequired we should:
1. For the first table of https://openactive.io/open-booking-api/EditorsDraft/#booking-without-payment
https://github.com/openactive/OpenActive.Server.NET/blob/5c117d1abd779696a3a2f6f5547715a92c32c31e/OpenActive.Server.NET/OpenBookingHelper/OrderCalculations/OrderCalculations.cs#L70-L70
AugmentOrderWithTotals
should include logic to setorder.TotalPaymentDue.Prepayment
based on e.g.order.OrderedItem.Any(x => x.AcceptedOffer.Prepayment == RequiredStatusType.Required)
(according to the first table in the spec)2. For the second table of https://openactive.io/open-booking-api/EditorsDraft/#booking-without-payment
https://github.com/openactive/OpenActive.Server.NET/blob/29cff7750305c3a45a50f9d32fe70e5f8c419aaf/OpenActive.Server.NET/StoreBookingEngine/StoreBookingEngine.cs#L613-L613
Logic in
CheckOrderIntegrity
needs to be updated to inspect theresponseOrder.TotalPaymentDue?.Prepayment
and then include logic within it to implement the errorsUnnecessaryPaymentDetailsError
andMissingPaymentDetailsError
based on the second table in the spec and https://openactive.io/open-booking-api/EditorsDraft/#payment-error-conditions3. Fake booking system stores Prepayment next to Price (to be outputted within the Offer)
FakeBookingSystem random data must include Prepayment, just randomly for now.
4. Stores and feeds need to pull through Prepayment from the FakeBookingSystem
The following should include
Prepayment =
pulled from the fake databasehttps://github.com/openactive/OpenActive.Server.NET/blob/b87ccae7eb00efe9fe74da125dad84750263128a/Examples/BookingSystem.AspNetCore/Stores/SessionStore.cs#L186-L193
https://github.com/openactive/OpenActive.Server.NET/blob/d3b839fdcafba5c0dbf9e3b2032b190e3d722873/Examples/BookingSystem.AspNetCore/Feeds/SessionsFeeds.cs#L122-L141
5. Test interface
Stores need to implement
TestOpportunityBookablePrepaymentOptional
andTestOpportunityBookablePrepaymentUnavailable