/*
  *
  * Undo funds based on previous transactionId
  * May also include , $amount) where $amount is what you want to return e.g. 10.00
  *
  */
 if ($_bcs['Operations']['Undo'] == 'true') {
     // First send an Authorize to Void
     $response3 = $client->authorize($bcpTxnXML);
     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