} /* * * Capture an authorized transaction * */ if ($_bcs['Operations']['Capture'] == 'true') { $capDiffData = new CaptureDifferenceData(); $capDiffData->TransactionId = $response['TransactionId']; if (Settings::IndustryType == 'Restaurant') { $capDiffData->TipAmount = '2.00'; $capDiffData->Amount = $response->Amount + $capDiffData->TipAmount; } $capDiffData->Amount = '2.00'; $capDiffXML = buildCaptureXML($capDiffData); $response2 = $client->capture($capDiffXML, $credentials); printCaptureResults($response2, $merchProfileId); } if ($_bcs['Operations']['CaptureSelective'] == 'true') { $response = $client->authorize($bcpTxnXML); printTransactionResults($response, 'Authorize For CaptureSelective', $merchProfileId); $txnIdCs[0] = $response['TransactionId']; $capDiffData = new CaptureDifferenceData(); $capDiffData->TransactionId = $txnIdCs; if (Settings::IndustryType == 'Restaurant') { $capDiffData->TipAmount = '2.00'; $capDiffData->Amount = $response->Amount + $capDiffData->TipAmount; } $capDiffData->Amount = '2.00'; $capDiffXML = buildCaptureSelectiveXML($capDiffData); $txnIdsXML = buildTxnIdsXML($txnIdCs);