Esempio n. 1
0
 public static function fromXml($xml)
 {
     if ($xml == "" || $xml == NULL) {
         return;
     }
     $dom = new \SimpleXMLElement($xml, LIBXML_NOERROR, false);
     if (count($dom) == 0) {
         return;
     }
     $response = IgfsUtils::parseResponseFields($dom);
     $terminal = NULL;
     if (isset($response) && count($response) > 0) {
         $terminal = new TerminalInfo();
         $terminal->tid = IgfsUtils::getValue($response, "tid");
         $terminal->description = IgfsUtils::getValue($response, "description");
         $terminal->payInstr = IgfsUtils::getValue($response, "payInstr");
         $terminal->payInstrDescription = IgfsUtils::getValue($response, "payInstrDescription");
         if (isset($response["imgURL"])) {
             $imgURL = array();
             foreach ($dom->children() as $item) {
                 if ($item->getName() == "imgURL") {
                     $imgURL[] = $item->__toString();
                 }
             }
             $terminal->imgURL = $imgURL;
         }
     }
     return $terminal;
 }
Esempio n. 2
0
 protected function getResponseSignature($response)
 {
     $fields = array(IgfsUtils::getValue($response, "tid"), IgfsUtils::getValue($response, "shopID"), IgfsUtils::getValue($response, "rc"), IgfsUtils::getValue($response, "errorDesc"), IgfsUtils::getValue($response, "tranID"), IgfsUtils::getValue($response, "date"), IgfsUtils::getValue($response, "addInfo1"), IgfsUtils::getValue($response, "addInfo2"), IgfsUtils::getValue($response, "addInfo3"), IgfsUtils::getValue($response, "addInfo4"), IgfsUtils::getValue($response, "addInfo5"));
     // UDF5
     // signature dove il buffer e' cosi composto TID|SHOPID|RC|ERRORDESC|ORDERID|DATE|UDF1|UDF2|UDF3|UDF4|UDF5
     return $this->getSignature($this->kSig, $fields);
 }
Esempio n. 3
0
 protected function getResponseSignature($response)
 {
     $fields = array(IgfsUtils::getValue($response, "tid"), IgfsUtils::getValue($response, "shopID"), IgfsUtils::getValue($response, "rc"), IgfsUtils::getValue($response, "errorDesc"), IgfsUtils::getValue($response, "authStatus"), IgfsUtils::getValue($response, "cavv"), IgfsUtils::getValue($response, "eci"));
     // ECI
     // signature dove il buffer e' cosi composto TID|SHOPID|RC|ERRORCODE|AUTHSTATUS|CAVV|ECI
     return $this->getSignature($this->kSig, $fields);
 }
Esempio n. 4
0
 protected function getResponseSignature($response)
 {
     $fields = array(IgfsUtils::getValue($response, "tid"), IgfsUtils::getValue($response, "shopID"), IgfsUtils::getValue($response, "rc"), IgfsUtils::getValue($response, "errorDesc"), IgfsUtils::getValue($response, "paymentID"), IgfsUtils::getValue($response, "redirectURL"));
     // REDIRECTURL
     // signature dove il buffer e' cosi composto TID|SHOPID|RC|ERRORDESC|PAYMENTID|REDIRECTURL
     return $this->getSignature($this->kSig, $fields);
 }
Esempio n. 5
0
 protected function getUniqueBoundaryValue()
 {
     return IgfsUtils::getUniqueBoundaryValue();
 }
Esempio n. 6
0
 protected function parseResponseMap($response)
 {
     parent::parseResponseMap($response);
     // Opzionale
     $this->xid = IgfsUtils::getValue($response, "xid");
 }
Esempio n. 7
0
 protected function getResponseSignature($response)
 {
     $fields = array(IgfsUtils::getValue($response, "tid"), IgfsUtils::getValue($response, "shopID"), IgfsUtils::getValue($response, "rc"), IgfsUtils::getValue($response, "errorDesc"), IgfsUtils::getValue($response, "enrStatus"), IgfsUtils::getValue($response, "paReq"), IgfsUtils::getValue($response, "md"), IgfsUtils::getValue($response, "acsURL"), IgfsUtils::getValue($response, "acsPage"));
     // ACSPAGE
     // signature dove il buffer e' cosi composto TID|SHOPID|RC|ERRORCODE|ENRSTATUS|PAREQ|MD|ACSURL|ACSPAGE
     return $this->getSignature($this->kSig, $fields);
 }
Esempio n. 8
0
 protected function getResponseSignature($response)
 {
     $fields = array(IgfsUtils::getValue($response, "tid"), IgfsUtils::getValue($response, "shopID"), IgfsUtils::getValue($response, "rc"), IgfsUtils::getValue($response, "errorDesc"), IgfsUtils::getValue($response, "tranID"), IgfsUtils::getValue($response, "date"), IgfsUtils::getValue($response, "paymentID"), IgfsUtils::getValue($response, "authCode"));
     // AUTHCODE
     // signature dove il buffer e' cosi composto TID|SHOPID|RC|ERRORCODE|ORDERID|PAYMENTID|AUTHCODE
     return $this->getSignature($this->kSig, $fields);
 }