On This Page
Capture
Use this information to capture a pre-authorized transaction. The capture request
references the approved pre-authorization request.
- Create the online payment service and callcaptureTransaction(withID:partiallyWithAmount:)with the transaction identifier and capture amount.// Throws MposUIReaderError.notActivated if device is not activated let online = try await reader.mposUIOnline() let capture = await online.captureTransaction( withID: "transactionIdentifier", partiallyWithAmount: (Decimal(1.00), .USD) ) switch capture { case .success(let transaction): print("Capture successful.") case .cancelledByUser: print("Capture cancelled.") case .error(let developerInfo): print("Capture failed. Info: \(developerInfo)") }