FILTER BY TAG

Sale

Use this information to process a sale transaction. This type of transaction combines an authorization and a capture into a single transaction.
Follow these steps to process a sale.
  1. Create a
    ChargeParameters
    object and provide the required information for the payment.
  2. Use the
    startChargeTransaction
    method to initiate the transaction flow.
    let chargeParameters = ChargeParameters(amount: Decimal(1.00), currency: .USD, customIdentifier: "yourReferenceForTheTransaction") let charge = await mposUi.startChargeTransaction(with: chargeParameters)
  3. When the transaction is complete, you can view the result of the transaction.
    switch charge { case .success(let transaction): print("Transaction with id: %@ completed with state: %@", transaction.identifier, transaction.status) case .failure(let error): print("Transaction failed with error: %@", error.localizedDescription) }
  4. To get complete transaction details, access the
    transaction
    object.