EARS: When the ORA sends a clearance, the system shall accept it unless it repeats a clearance already accepted, and record only accepted clearances.
Story: As an airline, I want the Clearance Manager to accept each payment's clearance once, so that no payment is settled twice.
Acceptance criteria:
-
ONE-803.1: If a clearance repeats the clearance ID of one already accepted, then the system shall reject it.
-
ONE-803.2: If a clearance not signed by both parties repeats the order ID and payment ID of one already accepted, then the system shall reject it.
-
ONE-803.3: When the Clearance Manager accepts a clearance, the system shall add it to the accepted clearances and change none of the others.
-
ONE-803.4: The system shall accept at most one clearance for each pair of order ID and payment ID.
A payment split across two payment methods has a transaction per method, each
with its own payment ID, and so two clearances. Whether a signed clearance is
checked for a repeated order and payment is a reading of the sources
(RepeatReading). The result is the accepted clearances afterwards, or
the reason for the rejection.