/** * Builds the integrity signature of the parameters. * @see Security::IntegrityHash */ protected function BuildSignature() { return Security::IntegrityHash(IntegrationData::CancelationKey, $this->Prodid, $this->Tid, $this->Custom, IntegrationData::Pid, $this->Source); }
/** * Builds the integrity signature of the parameters. * @see Security::IntegrityHash */ protected function BuildSignature() { return Security::IntegrityHash($this->Tid, IntegrationData::OnlineCreditKey, $this->Quant, $this->ValueReceived, $this->Prodid, IntegrationData::Pid); }
/** * Builds the integrity signature of the parameters. * @see Security::IntegrityHash */ protected function BuildSignature() { return Security::IntegrityHash($this->Tid, IntegrationData::CreditConsultKey, IntegrationData::Pid); }
/** * Generates the integrity hash signature for the Payment DataPush xml. * @param $encXml The encrypted xml from GetEncryptedXml(). * @returns A string hash. */ public function GenerateSignature($encXml) { return Security::IntegrityHash(IntegrationData::PaymentDataPushSignatureKey, $encXml); }
/** * Gets this DataPush instance serialized as Xml. * @returns A xml string. */ public function GetRawXml() { $xml = ""; if (isset($this->InternalID)) { $xml .= "<InternalID>{$this->InternalID}</InternalID>"; } if (isset($this->Login)) { $xml .= "<Login>{$this->Login}</Login>"; } if (isset($this->Name)) { $xml .= "<Name>{$this->Name}</Name>"; } if (isset($this->CPF)) { $xml .= "<CPF>{$this->CPF}</CPF>"; } if (isset($this->RG)) { $xml .= "<RG>{$this->RG}</RG>"; } if (isset($this->DateOfBirth)) { $xml .= "<DateOfBirth>{$this->DateOfBirth}</DateOfBirth>"; } if (isset($this->ClientSince)) { $xml .= "<ClientSince>{$this->ClientSince}</ClientSince>"; } if (isset($this->LastUpdate)) { $xml .= "<LastUpdate>{$this->LastUpdate}</LastUpdate>"; } if (isset($this->Emails) && count($this->Emails) > 0) { $xml .= "<Emails>"; foreach ($this->Emails as $email) { $xml .= "<Email>{$email}</Email>"; } $xml .= "</Emails>"; } if (isset($this->Phones) && count($this->Phones) > 0) { $xml .= "<Phones>"; foreach ($this->Phones as $tel) { $xml .= "<Phone type=\"{$tel->Type}\">{$tel->Number}</Phone>"; } $xml .= "</Phones>"; } if (isset($this->Addresses) && count($this->Addresses) > 0) { $xml .= "<Addresses>"; foreach ($this->Addresses as $addr) { $xml .= "<Address city=\"{$addr->City}\" state=\"{$addr->State}\" zip=\"{$addr->ZipCode}\" update=\"{$addr->Update}\"><![CDATA[{$addr->Address}]]></Address>"; } $xml .= "</Addresses>"; } if (isset($this->Orders) && count($this->Orders) > 0) { $xml .= "<Orders>"; foreach ($this->Orders as $o) { $xml .= "<Order id=\"{$o->Id}\" date=\"{$o->Date}\" name=\"{$o->Name}\" value=\"{$o->Value}\" method=\"{$o->Method}\" loginMethod=\"{$o->LoginMethod}\" status=\"{$o->Status}\" />"; } $xml .= "</Orders>"; } if (isset($this->Resources) && count($this->Resources) > 0) { $xml .= "<Resources>"; foreach ($this->Resources as $r) { $xml .= "<Resource name=\"{$r->Name}\" date=\"{$r->Date}\" description=\"{$r->Description}\" mimeType=\"{$r->MimeType}\"><![CDATA[{$r->Data}]]></Resource>"; } $xml .= "</Resources>"; } $validation = Security::IntegrityHash(IntegrationData::DataPushKey, $xml); $xml = "<Data-Push Validation=\"{$validation}\"><Push>" . $xml . "</Push></Data-Push>"; return $xml; }