On This Page
Capture
Use this information to capture a pre-authorized transaction. The capture request references the
approved pre-authorization request.
Follow these steps to process a capture.
- Use thecaptureTransactionmethod to start the transaction flow.let capture = await mposUi.captureTransaction(withID: "transactionIdentifier", //Specify amount and currency for partial captures partiallyWithAmount: (Decimal(1.00), .USD))
- After the transaction is completed, get the results of the transaction.switch capture { case .success(let transaction): print("Transaction with id: %@ completed with state: %@", transaction.identifier, transaction.status) case .cancelledByUser: print("Transaction canceled.") case .error(let developerInfo): print("Transaction failed. Info: %@", developerInfo)
- To get complete transaction details, access thetransactionobject.