printTransactionResults($response3, 'Authorize for Undo', $merchProfileId); // Now send the Void using TransactionId from above transaction response $undoDiffData = new UndoDifferenceData(); $undoDiffData->TransactionId = $response3['TransactionId']; $undoDiffData->Amount = '2.00'; $undoDiffXML = buildUndoXML($undoDiffData); $response4 = $client->undo($undoDiffXML, null); printTransactionResults($response4, 'Undo', $merchProfileId); } /* * * Authorize and Capture using credit card * Note: in a terminal capture environment AuthorizeAndCapture is only available for PINDebit transactions */ if ($_bcs['Operations']['AuthAndCapture'] == 'true' && $_bcs['AutoBatch'] == 'true') { $response5 = $client->authorizeAndCapture($bcpTxnXML); printTransactionResults($response5, 'AuthorizeAndCapture', $merchProfileId); } /* * * Return funds based on previous transactionId * May also incluse , $amount) where $amount is what you want to return e.g. 10.00 * */ if ($_bcs['Operations']['ReturnById'] == 'true' && $_bcs['AutoBatch'] == 'true') { // Note: You must provide an already captured Authorize TransactionId for ReturnById // Now send the Void using TransactionId from above transaction response $returnDiffData = new ReturnByIdDifferenceData(); $returnDiffData->TransactionId = $response5['TransactionId']; $returnDiffData->Amount = '2.00'; $returnDiffXML = buildReturnByIdXML($returnDiffData);