Viewing file: IgfsCgMpiAuth.php (2.23 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
require_once("IGFS_CG_API/mpi/BaseIgfsCgMpi.php");
class IgfsCgMpiAuth extends BaseIgfsCgMpi {
public $paRes; public $md;
public $authStatus; public $cavv; public $eci;
function __construct() { parent::__construct(); }
protected function resetFields() { parent::resetFields(); $this->paRes = NULL; $this->md = NULL;
$this->authStatus = NULL; $this->cavv = NULL; $this->eci = NULL; }
protected function checkFields() { parent::checkFields();
if ($this->paRes != NULL) { if ($this->paRes == "") throw new IgfsMissingParException("Missing paRes"); } if ($this->md != NULL) { if ($this->md == "") throw new IgfsMissingParException("Missing md"); }
}
protected function buildRequest() { $request = parent::buildRequest();
$request = $this->replaceRequest($request, "{paRes}", $this->paRes); $request = $this->replaceRequest($request, "{md}", $this->md);
return $request; }
protected function setRequestSignature($request) { // signature dove il buffer e' cosi composto APIVERSION|TID|SHOPID|PARES|MD $fields = array( $this->getVersion(), // APIVERSION $this->tid, // TID $this->shopID, // SHOPID $this->paRes, // PARES $this->md); // MD $signature = $this->getSignature($this->kSig, // KSIGN $fields); $request = $this->replaceRequest($request, "{signature}", $signature); return $request; }
protected function getSoapResponseName() { return "ns1:AuthResponse"; }
protected function parseResponseMap($response) { parent::parseResponseMap($response); $this->authStatus = $response["authStatus"]; // Opzionale $this->cavv = $response["cavv"]; // Opzionale $this->eci = $response["eci"]; }
protected function getResponseSignature($response) { $fields = array( $response["tid"], // TID $response["shopID"], // SHOPID $response["rc"], // RC $response["errorDesc"],// ERRORDESC $response["authStatus"], // AUTHSTATUS $response["cavv"], // CAVV $response["eci"]); // ECI // signature dove il buffer e' cosi composto TID|SHOPID|RC|ERRORCODE|AUTHSTATUS|CAVV|ECI return $this->getSignature($this->kSig, // KSIGN $fields); } protected function getFileName() { return "IGFS_CG_API/mpi/IgfsCgMpiAuth.request"; }
}
?>
|