Viewing file: IgfsCgVerify.php (3.7 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
require_once("IGFS_CG_API/init/BaseIgfsCgInit.php"); require_once("IGFS_CG_API/Level3Info.php");
class IgfsCgVerify extends BaseIgfsCgInit {
public $paymentID;
public $tranID; public $authCode; public $enrStatus; public $authStatus; public $brand; public $maskedPan; public $addInfo1; public $addInfo2; public $addInfo3; public $addInfo4; public $addInfo5; public $payInstrToken; public $expireMonth; public $expireYear; public $level3Info; public $additionalFee; public $status;
function __construct() { parent::__construct(); }
protected function resetFields() { parent::resetFields(); $this->paymentID = NULL;
$this->tranID = NULL; $this->authCode = NULL; $this->enrStatus = NULL; $this->authStatus = NULL; $this->brand = NULL; $this->maskedPan = NULL; $this->addInfo1 = NULL; $this->addInfo2 = NULL; $this->addInfo3 = NULL; $this->addInfo4 = NULL; $this->addInfo5 = NULL; $this->payInstrToken = NULL; $this->expireMonth = NULL; $this->expireYear = NULL; $this->level3Info = NULL; $this->additionalFee = NULL; $this->status = NULL; }
protected function checkFields() { parent::checkFields(); if ($this->paymentID == NULL || "" == $this->paymentID) throw new IgfsMissingParException("Missing paymentID"); }
protected function buildRequest() { $request = parent::buildRequest(); $request = $this->replaceRequest($request, "{paymentID}", $this->paymentID); return $request; }
protected function setRequestSignature($request) { $fields = array( $this->getVersion(), // APIVERSION $this->tid, // TID $this->shopID, // SHOPID $this->paymentID); // PAYMENTID // signature dove il buffer e' cosi composto APIVERSION|TID|SHOPID|PAYMENTID $signature = $this->getSignature($this->kSig, // KSIGN $fields); $request = $this->replaceRequest($request, "{signature}", $signature); return $request; }
protected function getSoapResponseName() { return "ns1:VerifyResponse"; }
protected function parseResponseMap($response) { parent::parseResponseMap($response); // Opzionale $this->tranID = $response["tranID"]; // Opzionale $this->authCode = $response["authCode"]; // Opzionale $this->enrStatus = $response["enrStatus"]; // Opzionale $this->authStatus = $response["authStatus"]; // Opzionale $this->brand = $response["brand"]; // Opzionale $this->maskedPan = $response["maskedPan"]; // Opzionale $this->addInfo1 = $response["addInfo1"]; // Opzionale $this->addInfo2 = $response["addInfo2"]; // Opzionale $this->addInfo3 = $response["addInfo3"]; // Opzionale $this->addInfo4 = $response["addInfo4"]; // Opzionale $this->addInfo5 = $response["addInfo5"]; // Opzionale $this->payInstrToken = $response["payInstrToken"]; // Opzionale $this->expireMonth = $response["expireMonth"]; // Opzionale $this->expireYear = $response["expireYear"]; // Opzionale $this->level3Info = Level3Info::fromXml($response["level3Info"]); // Opzionale $this->additionalFee = $response["additionalFee"]; // Opzionale $this->status = $response["status"]; }
protected function getResponseSignature($response) { $fields = array( $response["tid"], // TID $response["shopID"], // SHOPID $response["rc"], // RC $response["errorDesc"],// ERRORDESC $response["paymentID"],// PAYMENTID $response["tranID"],// ORDERID $response["authCode"],// AUTHCODE $response["enrStatus"],// ENRSTATUS $response["authStatus"]);// AUTHSTATUS // signature dove il buffer e' cosi composto TID|SHOPID|RC|ERRORDESC|PAYMENTID|REDIRECTURL return $this->getSignature($this->kSig, // KSIGN $fields); } protected function getFileName() { return "IGFS_CG_API/init/IgfsCgVerify.request"; }
}
?>
|