uniqueID_cifre_timestamp per prendere meno cifre dal timestamp e più dall'identificativo var $identificativo = ""; //dopo aver chiamato getPaymentUrl() qui trovo l'id generato dalla banca che è l'unico riferimento che torna in caso di pagamento annullato var $paymentid = ""; var $step_var = "cc_step"; var $lingua = "ITA";//ITA, USA, SPA, FRA, DEU /* var $response_codes = array( '00' => 'TRANSAZIONE AUTORIZZATA', '000' => 'TRANSAZIONE AUTORIZZATA', '100' => 'AUTORIZZAZIONE NEGATA', '101' => 'CARTA SCADUTA O DATA SCADENZA INVALIDA', '102' => 'SOSPETTA FRODE', '104' => 'CARTA NON VALIDA', '107' => 'CHIAMARE EMITTENTE', '109' => 'COMMERCIANTE NON VALIDO', '110' => 'IMPORTO NON VALIDO', '111' => 'NUMERO CARTA NON VALIDO', '116' => 'FONDI INSUFFICIENTI', '117' => 'CODICE SEGRETO ERRATO', '119' => 'OPERAZIONE NON PERMESSA', '120' => 'OPERAZIONE NON PERMESSA', '129' => 'SOSPETTA CARTA CONTRAFFATTA', '200' => 'AUTORIZZAZIONE NEGATA', '208' => 'CARTA SMARRITA', ); */ var $response_codes = array( '000' => 'Transazione Autorizzata', '100' => 'Autorizzazione Negata (Generico)', '101' => 'Carta Scaduta o Data Scadenza Invalida', '102' => 'Sospetta Frode', '104' => 'Carta non Valida', '106' => 'Numero Tentativi PIN Superato', '109' => 'Merchant non Valido', '110' => 'Importo non Valido', '111' => 'Numero Carta non Valido', '115' => 'Funzione Richiesta non Supportata', '116' => 'Disponibilità Insufficiente', '117' => 'Codice Segreto Errato', '118' => 'Carta Inesistente', '119' => 'Operazione non Permessa al Titolare Carta', '120' => 'Operazione non Permessa al Terminale', '121' => 'Limite Importo Superato', '122' => 'Operazione non Permessa', '123' => 'Numero Pagamenti Superato', '124' => 'Operazione non Permessa', '125' => 'Carta Inattiva', '126' => 'PIN Block Invalido', '129' => 'Sospetta Carta Contraffatta', '182' => 'Errore Wallet', '200' => 'Autorizzazione Negata', '202' => 'Sospetta Frode', '204' => 'Carta Limitata', '208' => 'Carta Smarrita', '209' => 'Carta Rubata', '210' => 'Sospetta Carta Contraffatta', '888' => 'Pending (Alipay)', '902' => 'Transazione Invalida', '903' => 'Transazione Ripetuta', '904' => 'Errore di Formato', '906' => 'Cutover in Corso', '907' => 'Malfunzionamento Emittente', '908' => 'Routing non Disponibile', '909' => 'Malfunzionamento di Sistema', '911' => 'Timeout Emittente', '913' => 'Trasmissione Duplicata', '999' => 'Errore Creazione Contratto per Parametri Merchant', //questi nella versione 2016 non ci sono più, ma li tengo per sicurezza '00' => 'TRANSAZIONE AUTORIZZATA', '107' => 'CHIAMARE EMITTENTE', ); function inquiry($paymnentId){ // $init_url = "https://".($this->demo?"test":"www").".monetaonline.it/monetaweb/payment/2/xml"; $init_url = "https://".($this->demo?"stg-ta":"xpay").".nexigroup.com/monetaweb/payment/2/xml"; $utente = $this->pulisci($this->utente); $password = $this->pulisci($this->password); $data="id=$utente&password=$password&operationType=Inquiry&paymentId=".$paymnentId; $curl_handle=curl_init(); curl_setopt($curl_handle, CURLOPT_URL, $init_url); curl_setopt($curl_handle, CURLOPT_RETURNTRANSFER,1); curl_setopt($curl_handle, CURLOPT_POST, 1); curl_setopt($curl_handle, CURLOPT_POSTFIELDS, $data); $buffer = curl_exec($curl_handle); curl_close($curl_handle); $xml = simplexml_load_string($buffer); $return = []; foreach($xml as $k=>$v) $return[$k] = (string)$v; return $return; //ritorno un array per passarla alla stessa funzione a cui passo il post della s2s, //usavo "return (array)$xml;", ma in caso di cancellazione la conversione non è perfetta // [result] => CANCELED // [paymentid] => 612220075138180409 // [transactiontime] => SimpleXMLElement Object // [amount] => SimpleXMLElement Object // [currencycode] => SimpleXMLElement Object // [merchantorderid] => SimpleXMLElement Object // [authorizationcode] => SimpleXMLElement Object // [threedsecure] => SimpleXMLElement Object // [responsecode] => SimpleXMLElement Object // [customfield] => SimpleXMLElement Object // [description] => SimpleXMLElement Object // [rrn] => SimpleXMLElement Object // [cardcountry] => SimpleXMLElement Object // [cardbrand] => SimpleXMLElement Object // [cardtype] => SimpleXMLElement Object // [maskedpan] => SimpleXMLElement Object // [securitytoken] => cf1ad4ff2b6a496aae1cddd537f258f7 // [cardholderip] => SimpleXMLElement Object } function demoInfo(){ return "Per il pagamento usare queste carte. Pannello di test 009999999/009999999/Setefi14. Prima di passare in produzione va fatta una transazione con lo specifico utente di test associato all'utenza."; } function auto(){ // if($_GET['Service_ID'] == '6A08DA76-A118-4A47-91A3-E315F72D291C') $this->importo = 0.1; $this->indiLingua(); if($this->demo){ $this->utente = $this->demo_utente; $this->password = $this->demo_password; // $this->utente = "93534472"; // $this->password = "Password1"; } switch($_GET[$this->step_var]){ default: // trigger_error("Pagamento dopo aggiornamento libreria Setefi, controllare"); // if(is_local()) $this->importo = 9999;//simula esito negativo $this->Procedura->iniziato($this->nome_metodo); $url = $this->getPaymentUrl(); if(!$url) return $this->Procedura->errore(); //qui posso leggermi $this->paymentid if(strpos($this->paymentid, "!ERROR!") === 0){ trigger_error("Errore durante la generazione dell'id pagamento sul server della banca: ".$this->paymentid, E_USER_ERROR); return $this->Procedura->errore(); } //lo concateno con l'identificativo, per evitare che cambiando l'url si possa utilizzare l'esito di un pagamento legato a un altro identificativo tramite inquiry $_SESSION['setefiPaymentId_'.$this->identificativo] = $this->paymentid;//mi serve per fare un interrogazione nel caso non arrivi una s2s if(false&&$this->demo){ return 'Quando online l\'utente viene automaticamente reindirizzato a '.$url.''; } else{ $this->Procedura->redirect($url); return; } break; case 'return_ok'://solo risposta all'utente qui, le operazioni in s2s return $this->Procedura->concluso(); case 'return_ko'://solo risposta all'utente qui, le operazioni in s2s return $this->Procedura->annulla(); case 'error': $paymentId = $_SESSION['setefiPaymentId_'.$this->identificativo]; if($_GET['forzaId']) $paymentId = $_GET['forzaId']; $messaggio = "Setefi ha rimandato l'utente sulla pagina di errore (s2s fallita/timeout oppure rari casi dopo mancata autenticazione 3D secure) ";//https://www.intercultura.it/admin_tnx/pagamenti/view/67140 if($paymentId) $messaggio .= "procedo con"; else $messaggio .= "non ho il PaymentId in sessione, quindi non posso fare"; $messaggio .= " una chiamata di inquiry per capire il reale esito"; // if($paymentId) $messaggio .= " (ID ".$paymentId.")"; // trigger_error($messaggio, E_USER_ERROR); $this->Procedura->logga(array( 'identificativo_ordine' => $this->identificativo, 'ultimo_stato' => $messaggio )); if($paymentId){ $response = $this->inquiry($paymentId); if(isset($response['result'])){//result è l'unico che c'è per CANCELED insieme a paymentid e securitytoken // [result] => NOT APPROVED // [paymentid] => 785758879998980409 // [transactiontime] => 2018-02-09T17:34:43.448+0100 // [amount] => 9999.00 // [currencycode] => 978 // [merchantorderid] => 3412324_1518194048 // [authorizationcode] => fakews // [threedsecure] => S // [responsecode] => 902 // [customfield] => null // [description] => Motivo del pagamento // [rrn] => 999999999999 // [cardcountry] => ITALY // [cardbrand] => MC // [cardtype] => NONE // [maskedpan] => 553389******9896 // [securitytoken] => 73256701a726488c972371573e69b63a // [cardholderip] => 213.243.232.46 $url = $this->concludiPagamento(false, $response); $this->Procedura->redirect($url); return; } //altrimenti do esito incerto (errore_mancata_s2s) // [errorcode] => GW00201 // [errormessage] => Transaction not found. //oppure // [result] => CANCELED // [paymentid] => 612220075138180409 // [transactiontime] => SimpleXMLElement Object // [amount] => SimpleXMLElement Object // [currencycode] => SimpleXMLElement Object // [merchantorderid] => SimpleXMLElement Object // [authorizationcode] => SimpleXMLElement Object // [threedsecure] => SimpleXMLElement Object // [responsecode] => SimpleXMLElement Object // [customfield] => SimpleXMLElement Object // [description] => SimpleXMLElement Object // [rrn] => SimpleXMLElement Object // [cardcountry] => SimpleXMLElement Object // [cardbrand] => SimpleXMLElement Object // [cardtype] => SimpleXMLElement Object // [maskedpan] => SimpleXMLElement Object // [securitytoken] => cf1ad4ff2b6a496aae1cddd537f258f7 // [cardholderip] => SimpleXMLElement Object } else return $this->Procedura->errore($this->errore_mancata_s2s); break; case 'inquiry': echo '
';
				print_r($this->inquiry($_GET['id']));
				die;
			case 's2s':
				// le info della banca sono in $_POST (un po' di info in fondo a questo file):
				// array (
				//   'paymentid' => '3138764381210190',
				//   'result' => 'CAPTURED',
				//   'auth' => '999999',
				//   'avr' => 'N',
				//   'ref' => '101926910619',
				//   'tranid' => '7047839391210190',
				//   'postdate' => '0119',
				//   'trackid' => '1295437116p1',
				//   'udf1' => 'mazzei.it - ord. Annullato  Cassano ProfGiovanni  #20110119_113630_4d36beae0c8e4',
				//   'udf2' => '',
				//   'udf3' => '99999999',
				//   'udf4' => '',
				//   'udf5' => '',
				//   'responsecode' => '00',
				//   'cvv2response' => '0',
				// )
				$url = $this->concludiPagamento(true, $_POST, $_POST['udf4']);
				$this->pulisciOutput();
				echo "REDIRECT=".$url;
				die;
				break;
		}
	}
	function concludiPagamento($isS2S, $array, $forzaIdentificativo = ''){
		// $body = "";
		// foreach($array as $k=>$v) $body .= "\n\t$k:\t$v";
		// mail("c@localhost", "debug", $this->response_codes[$array['responsecode']]." ".$body);
		// mail("carlotnx@gmail.com", $info, $body);
		
		
		//$s2s_ok = in_array($array['result'], array('CAPTURED', 'APPROVED'));
		
		
		$identificativo = $forzaIdentificativo ? $forzaIdentificativo : $this->identificativo;
		
		$s2s_ok = in_array($array['responsecode'], array('00', '000'));
		$info = $this->response_codes[$array['responsecode']]." ".$array['result']." ".($array['errorText']?("ERRORE: ".$array['errorText']):"");

		if($s2s_ok){
			$this->Procedura->comunicazione_s2s($identificativo, ($isS2S?"S2S":"INQUIRY").": ".$info);
			if($this->Procedura->isConfermato($identificativo)){
				$this->Procedura->logga(array(
					'identificativo_ordine' => $identificativo,
					'ultimo_stato' => 'La procedura di conferma risulta già eseguita'
				));
			}
			else{
	// 					$this->Procedura->comunicazione_s2s($identificativo, implode(" ", $array));//22/3/2017 potrebbe essere in ISO 8859-1, ma ora che ho fatto i test ho messo descrizione Björn e quando arriva sul sito della banca la pota in Bjrn quindi non ritornano caratteri particolari
				$tempoTotaleRichiesta = -$_SERVER['REQUEST_TIME'];
				$tempoConfermato = -time();
				
				$this->Procedura->logga(array(
					'identificativo_ordine' => $identificativo,
					'ultimo_stato' => 'Inizio procedura di conferma'
				));		
				//ATTENZIONE: setefi ha un timeout di 20 secondi (6/11/2014)		
				$this->Procedura->confermato($identificativo);
				$this->Procedura->logga(array(
					'identificativo_ordine' => $identificativo,
					'ultimo_stato' => 'Fine procedura di conferma'
				));
				
				$tempoTotaleRichiesta += time();
				$tempoConfermato += time();
				if($isS2S && $tempoTotaleRichiesta > 10){
					$e = "Pagina S2S Setefi lenta: $tempoTotaleRichiesta secondi, di cui $tempoConfermato funzione confermato(), il limite è 20";
					$this->Procedura->logga(array(
						'identificativo_ordine' => $identificativo,
						'ultimo_stato' => $e
					));
					trigger_error($e, E_USER_ERROR);
				}
			}
		}
		else{
			//in caso di annullamento le fave della banca passano solo il paymentid...devo fare sta cosa zozza perchè anche se me lo salvo su una colonna ogni ordine potrebbe avere più payment id
			/*
			$identificativo_ordine = $this->Procedura->db_qrs("select identificativo_ordine from ".$this->Procedura->tabella_log." where info like '%".$array['paymentid']."%'");
			if($identificativo_ordine){
				$this->Procedura->comunicazione_s2s($identificativo_ordine, $info);
			}
			else trigger_error("Non ho trovato il pagamento id da annullare!", E_USER_ERROR);
			*/
			//update: posso comunque usare $this->identificativo che viene calcolato dall'url
			$this->Procedura->comunicazione_s2s($this->identificativo, $info);
		}
		
		return $this->Procedura->genera_link_agg(array($this->step_var=>$s2s_ok ? "return_ok" : "return_ko"));

	}
	function indiLingua(){
		switch($GLOBALS['DATI']["lang"]) {
		    case "ita":
		        $this->lingua = "ITA";
		        break;
		    case "fra":
		        $this->lingua = "FRA";
		        break;
		    case "spa":
		        $this->lingua = "SPA";
		        break;
		    case "ger":
		        $this->lingua = "DEU";
		        break;
		    default:
		        $this->lingua = "USA";
		        break;
		}
	}
	function pulisci($val){
// 		if($_GET['Service_ID'] != '6A08DA76-A118-4A47-91A3-E315F72D291C') $val = str_replace("https://", "http://", $val);
		return rawurlencode($val);
	}
	function getPaymentUrl(){
		$action=4;//Campo numerico che può assumere il seguente valore: 4 – autorizzazione. Altri valori sono possibili ma non supportati.
		$amt=number_format($this->importo, 2, ".", "");//Importo della transazione (es: 1.00)
		$currencycode="978";//Valuta della transazione (euro: 978)
		$langid = $this->lingua;// Linguaggio utilizzato (es: ITA, USA, SPA, FRA)
		// se lo faccio adesso è un casino perchè c'è un 301 http > https e perdo il post! $responseurl = str_replace("https://", "http://", $this->Procedura->genera_link_agg(array($this->step_var=>"s2s")));//pagina di ricezione della risposta 2014/10/15: in seguito a rivelazione POODLE bug disattivo sslv3 su server e obbligo a usare protocollo http perchè attualemente usano un client java che utilizza sslv3
		$responseurl = $this->Procedura->genera_link_agg(array($this->step_var=>"s2s"));
		$errorurl = $this->Procedura->genera_link_agg(array($this->step_var=>"error"));//pagina di errore
		//Riferimento operazione commerciante (al massimo 18 caratteri) E’ un campo alfanumerico, può contenere solo lettere e numeri. 
		//Deve essere univoco in assoluto. E’ anche, di norma, riportato nell’estratto conto del cliente
		$trackid = $this->uniqueID(18, true);
		$this->Procedura->comunicazione_s2s($this->identificativo, "Generato id pagamento tnx: ".$trackid);
		$udf1= preg_replace("/[^a-z0-9\s]/ims", "", $this->descrizione);//Descrizione merce/servizio
		$udf2= str_replace(";","", preg_replace("/[^a-z0-9\s]/ims", "", $this->cliente_nome)).";".$this->cliente_email;
		// $init_url = "https://".($this->demo?"test":"www").".monetaonline.it/monetaweb/hosted/init/http";
		$init_url = "https://".($this->demo?"stg-ta":"xpay").".nexigroup.com/monetaweb/hosted/init/http";
		$utente = $this->pulisci($this->utente);
		$password = $this->pulisci($this->password);
		$action = $this->pulisci($action);
		$amt = $this->pulisci($amt);
		$currencycode = $this->pulisci($currencycode);
		$langid = $this->pulisci($langid);
		$responseurl = $this->pulisci($responseurl);
		$errorurl = $this->pulisci($errorurl);
		$trackid = $this->pulisci($trackid);
		$udf1 = substr($this->pulisci($udf1), 0, 64);//Garanzia che il campo DESCRIZIONE sia sempre: - con lunghezza massima di 64 CARATTERI - Stringa ALFANUMERICA (solo lettere e numeri, senza caratteri speciali)
		$udf2 = $this->pulisci($udf2);
		//$udf3 = $this->pulisci($this->dati1);//non lo uso perchè in fase di test nella risposta s2s ci trovo l'inizio del numero di carta di credito che sovrascrive i miei dati
		$udf4 = $this->pulisci($this->identificativo);
		$data="id=$utente&password=$password&action=$action&amt=$amt¤cycode=$currencycode&langid=$langid&responseurl=$responseurl&errorurl=$errorurl&trackid=$trackid&udf1=$udf1&udf2=$udf2&udf3=$udf3&udf4=$udf4";
		$curl_handle=curl_init();
		curl_setopt($curl_handle, CURLOPT_URL, $init_url);
		curl_setopt($curl_handle, CURLOPT_RETURNTRANSFER, 1);
		curl_setopt($curl_handle, CURLOPT_POST, 1);
		curl_setopt($curl_handle, CURLOPT_POSTFIELDS, $data);
		
		
		$tentativi = 3;
		for($i=0; $i<$tentativi; $i++){
			$buffer = curl_exec($curl_handle);//8508636460121029:https://xpay.nexigroup.com/monetaweb/hosted/page
			$token = explode(":", $buffer);
			// if(!$i) $token[0] = "a0";
			if(!preg_match("/^\d+$/", $token[0])){
				$this->Procedura->comunicazione_s2s($this->identificativo, "Errore setefi (".($i+1)." di $tentativi tentativi): ".$buffer);
				$token[0] = "";
				sleep(1);
			}
			else break;
		}
		
		curl_close($curl_handle);
		
		if(!$token[0]){
			trigger_error("Errore inizializzazione (provato $tentativi volte a distanza di un secondo), controlla https://easy-status.developers.nets.eu/");
			return false;
		}
		$this->paymentid = $token[0];
		$this->Procedura->comunicazione_s2s($this->identificativo, "Ricevuto id pagamento setefi: ".$this->paymentid);
		unset($token[0]);
		$url = implode(":", $token);
		return $url.'?PaymentID='.$this->paymentid;
	}
	/* ESEMPI RISPOSTE:
	paymentid:      474880920012932889
	result: CANCELED
	threedsecure:   N
	------
	error:  GV00004
	errorText:      GV00004-PARes status not sucessful
	paymentid:      116833857089332879
	auth:   250650
	avr:    N
	cvv2response:   0
	paymentid:      139688156965532879
	postdate:       1014
	ref:    328700055876
	responsecode:   00
	result: CAPTURED
	threedsecure:   S
	trackid:        STMengu_1381782843
	tranid: 139688156965532879
	udf1:   Iscrizione a Intercultura Marika Mengucci
	udf2:   Marika Mengucci;
	udf3:   53983203
	udf4:   STMengucciMarika
	udf5:   328700055876
	-------- ERRORI Durante transazioni 3-D Secure (presi da documentazione triveneto) ----------
	GV00001-Unknown 3-D Secure version
	GV00002-Cardholder not enrolled
	GV00003-Not a 3-D Secure Card
	GV00004-PARes status not successful
	GV00005-Certificate chain validation failed
	GV00006-Certificate chain validation error
	GV00007-Signature validation failed
	GV00008-Signature validation error
	GV00009-Invalid root certificate
	GV00010-Missing data type
	GV00011-Invalid expiration date
	GV00012-Invalid action type
	GV00013-Invalid Payment ID
	*/
// Nella pagina di ricezione dell’esito del pagamento, la cui URL viene valorizzata in fase di inizializzazione, 
// oltre al parsing del messaggio di risposta inviato Server to Server e alla storicizzazione dei dati, fondamentali dal punto di vista formale ma non indispensabili dal punto di vista funzionale, 
// MonetaWeb si aspetta di leggere dalla pagina (echo) la stringa "redirect=" seguita dall’URL della pagina di visualizzazione dell'esito al titolare carta (diversa dalla pagina di ricezione della risposta Server to Server) e dal parametro PaymentID (necessario per identificare univocamente la transazione in fase di visualizzazione dell'esito al titolare).
// Sarà MonetaWeb ad effettuare la redirezione, il codice per la redirezione non deve essere contenuto nella pagina di risposta, la stringa "redirect=" è una parola chiave che il Gateway è in grado di interpretare.
// Infine nella pagina di visualizzazione dell'esito al titolare carta si intercetterà il PaymentID passato come parametro e si estrarranno i dati precedentemente storicizzati utilizzando il PaymentID come chiave.
//IL SERVER VISITA QUESTA PAGINA E DA QUI LEGGE L'URL A CUI REINDIRIZZARE L'UTENTE
// Parametri di risposta al messaggio HTTP (SOTTO DETTAGLI):
// 
// paymentid		Identificativo univoco dell’ordine generato da MonetaWeb
// result		Esito della transazione (es: APPROVED, CAPTURED, ecc.)
// auth		Codice di autorizzazione, valorizzato se la transazione è stata autorizzata 		(‘999999’ se autorizzata in test)
// ref		Riferimento della transazione generato dal Sistema Autorizzativo
// tranid		Identificativo univoco della transazione generato da MonetaWeb
// trackid 		Riferimento operazione inviato dal commerciante
// udf1		Descrizione del pagamento, se valorizzato dal commerciante
// udf2 		Campo riservato
// udf3 		Campo riservato
// udf4 		Campo riservato
// udf5 		Campo riservato
// responsecode	Codice di risposta (es: ‘00’ o ‘000’ se autorizzata)
/*
o AUTORIZZATA: la richiesta di autorizzazione ha dato esito positivo
o NEGATA: la richiesta di autorizzazione ha dato esito negativo (es. “fondi insufficienti”, “carta scaduta”, etc.)
o CONFERMATA: il sistema ha preso in carico la richiesta di contabilizzazione
o STORNATA: il sistema ha preso in carico la richiesta di storno
o NON AUTENTICATA: la transazione di richiesta autorizzazione non è stata completata perché l’utente ha fallito l’autenticazione 3D Secure.
o ERRORE PARES: la transazione di richiesta autorizzazione non è stata completata per un errore tecnico in fase di autenticazione 3D Secure imputabile alla Banca emittente.
o TIME OUT: la transazione di richiesta di autenticazione non è stata completata poiché il sistema autorizzativo non era temporaneamente disponibile
*/
// preso da 3-D_Secure_Guide.pdf
// Response Definitions
// Result - Returned as the transaction response evaluator. Verify whether there is an
// error and then evaluate the transaction to determine if it performed successfully.
// CAPTURED Transaction was captured.
// APPROVED Transaction was approved.
// VOIDED Transaction was voided.
// NOT CAPTURED Transaction was not captured.
// NOT APPROVED Transaction was not approved.
// NOT VOIDED Transaction was not voided
// e24VbV API Raw Transaction Capturing System
// 3-5
// Jun-2006 R3.1 EC-AB100-06
// ACI Worldwide Inc.
// VbV Result Codes
// Auth - The resulting authorization number of the transaction.
// Ref - The resulting reference number of the transaction. This number or series of
// letters is used for referential purposes by some acquiring institutions and should be
// stored properly.
// CardBalance - The resulting card balance of the stored value transaction
// instrument. This result field will be transmitted only when the type field in the
// request contain a Stored Value (“SV”) indicator.
// AVR - AVR is a single letter providing information about the cardholder’s
// submitted data. The letter indicates how closely the submitted card number,
// address, and ZIP Code match at the card-issuing bank.
// Date - Transaction Date in the format of the authorization system.
// TransId - Unique transaction ID issued by ACI Commerce Gateway.
// TrackId - The Track ID sent by the merchant in the transaction request.
// DENIED BY RISK Risk denied the transaction.
// FAILED AVS Transaction did not pass Address Verification.
// HOST TIMEOUT The authorization system did not respond
// within the timeout limit.
// ENROLLED VEReq was successful.
// NOT SUPPORTED This Brand is not participating.
// VbV NOT
// AUTHENTICATED
// There was a problem with the PARes.
// ACS DIRECTORY
// TIMEOUT
// A problem occurred connecting to the Visa
// Directory Server.
// A Address matches.
// E Address match error.
// N No address match.
// R AVS not available.
// S Service not supported.
// U Address match not capable.
// W 9 digit ZIP Code matches.
// X Address and 9 digit ZIP Code matches.
// Y Address and 5 digit ZIP Code matches.
// Z 5 digit ZIP Code matches.
// 0 Address could not be verified.
// 3-6
// e24VbV API Raw Transaction Capturing System
// Jun-2006 R3.1 EC-AB100-06
// ACI Worldwide Inc.
// PAReq - The Verified by Visa PAReq.
// PARes - The Verified by Visa PARes.
// Url - The URL which to send to the PARes.
// udf1-udf5 - The user defines these fields. The field data is passed along with a
// transaction request and then returned in the transaction response.
// If present, the user-defined field data will be archived in the TRANLOG table with
// the transaction. This allows the Tranlog Search and Reporting feature to include
// the data as part of the search criteria.
// Also, the field can transmit additional data to an external host.
// Error Response Messages - If an error occurs during the processing of the
// transaction, then the response format will contain a single string indicating that an
// error occurred. All Response Error Messages begin with an !ERROR! identifier.
// Therefore, it is important for the developer to first look at the actual response
// message string to determine if an error occurred. Refer to the ACI Commerce
// Gateway Response and Error Code Support Guide for more information about
// these error codes.
}
?>