Skip to content
Ryan Suzuki edited this page Mar 25, 2022 · 2 revisions

The Order object

State of an Order

  • UNKNOWN = Initial state
  • PROCESSING = Transaction in progress
  • VALIDATING = Validation in progress
  • COMPLETE = Validations confirmed by seller, and acknowledged or consumed by the billing client's server
  • CANCELED = Order has been canceled by either the buyer or the seller
  • PENDING = Orders that did not finish at the original time of purchase, and require action.

Lifecycle of a successful order

  • PROCESSING
  • VALIDATING
  • COMPLETE
  1. startOrder
    This will start the billing UI flow for the user. On a successful transaction, order will move to PROCESSING.

  2. Orders will tentatively move to VALIDATING, where the developer must implement OrderValidatorListener with their own validation checks.

  3. Call the parameterized callback function validated() to notify billing client to continue on to completing the transaction.

  4. After successfully notifying the billing client's server that the transaction has concluded, COMPLETE status will be returned by subscribing LiveData observers (for UI related use-cases), and also by the OrderUpdaterListener's callback onComplete

Clone this wiki locally