Skip to content

Latest commit

 

History

History
61 lines (39 loc) · 3.7 KB

File metadata and controls

61 lines (39 loc) · 3.7 KB

< Return to Overview

prepayment optional (prepayment-optional)

Support for booking with optional payment

https://www.openactive.io/open-booking-api/EditorsDraft/#booking-without-payment

Coverage Status: complete

Test prerequisites - Opportunities

Opportunities that match the following criteria must exist in the booking system (for each configured bookableOpportunityTypesInScope) for the configured primary Seller in order to use useRandomOpportunities: true. Alternatively the following testOpportunityCriteria values must be supported by the test interface of the booking system for useRandomOpportunities: false.

TestOpportunityBookableNonFreePrepaymentOptional x8

Running tests for only this feature

npm start -- --runInBand test/features/payment/prepayment-optional/

'Implemented' tests

Update default.json within packages/openactive-integration-tests/config/ as follows to enable 'Implemented' testing for this feature:

"implementedFeatures": {
  ...
  "prepayment-optional": true,
  ...
}
Identifier Name Description Prerequisites per Opportunity Type Required Test Interface Actions
opportunity-paid-incomplete-payment-details IncompletePaymentDetailsError must be returned in the case that payment identifier is not supplied An unsuccessful end to end booking, because identifier is missing in the payment property in B request. TestOpportunityBookableNonFreePrepaymentOptional x2
payment-mismatch Expect a TotalPaymentDueMismatchError when the totalPaymentDue property does not match Run B for a valid opportunity, with totalPaymentDue not matching the value returned by C2, expecting a TotalPaymentDueMismatchError to be returned (C1 and C2 ignored as they do not have totalPaymentDue) TestOpportunityBookableNonFreePrepaymentOptional x2
with-payment Prepayment optional, with payment supplied, is successful Opportunity paid, prepayment optional TestOpportunityBookableNonFreePrepaymentOptional x2
without-payment Prepayment optional, without payment supplied, is successful Opportunity paid, prepayment optional, no payment (error) TestOpportunityBookableNonFreePrepaymentOptional x2

'Not Implemented' tests

Update default.json within packages/openactive-integration-tests/config/ as follows to enable 'Not Implemented' testing for this feature:

"implementedFeatures": {
  ...
  "prepayment-optional": false,
  ...
}
Identifier Name Description Prerequisites per Opportunity Type Required Test Interface Actions
prepayment-optional-not-in-use The openBookingPrepayment property must not contain the value https://openactive.io/Optional Assert that no opportunities that match criteria 'TestOpportunityBookableNonFreePrepaymentOptional' are available in the opportunity feeds.