private static function voidReqResp($request, $response) { $error = false; if ($response['commErr'] != 0 || $response['httpCode'] != 200 || $response['validResponse'] != 1) { $error = _("Card transaction not successful"); } elseif ($request['live'] != PaycardLib::paycard_live(PaycardLib::PAYCARD_TYPE_CREDIT)) { // this means the transaction was submitted to the test platform, but we now think we're in live mode, or vice-versa // I can't imagine how this could happen (short of serious $_SESSION corruption), but worth a check anyway.. --atf 7/26/07 $error = _("Processor platform mismatch"); } elseif ($response['xResponseCode'] != 1) { $error = _("Card transaction not approved"); } elseif ($response['xTransactionID'] < 1) { $error = _("Invalid reference number"); } return $error; }