コード例 #1
0
         echo 'Authorize Successful!</br>';
         echo 'Masked PAN: ' . $response['MaskedPAN'] . '</br>';
         echo 'Approval Code: ' . $response['ApprovalCode'] . '</br>';
         echo 'Amount: ' . $response['Amount'] . '</br>';
         echo 'TransactionId: ' . $response['TransactionId'] . '</br></br>';
     } else {
         // some error
         print_r($response);
     }
     $authTransactionid = $response['TransactionId'];
 } catch (Exception $e) {
     echo $e->getMessage();
 }
 /******************************************************Capture******************************************************************************** */
 try {
     $response = $velocityProcessor->capture(array('amount' => 6.03, 'TransactionId' => $authTransactionid));
     //print_r($response);
     if (isset($response['Status']) && $response['Status'] == 'Successful') {
         echo 'Capture Successful!</br>';
         echo 'Amount: ' . $response['TransactionSummaryData']['NetTotals']['NetAmount'] . '</br></br>';
     } else {
         // some error
         print_r($response);
     }
     $captxnid = $response['TransactionId'];
 } catch (Exception $e) {
     echo $e->getMessage();
 }
 /******************************************************Adjust******************************************************************************** */
 try {
     $response = $velocityProcessor->adjust(array('amount' => 3.01, 'TransactionId' => $captxnid));