本文整理汇总了PHP中Security::IntegrityHash方法的典型用法代码示例。如果您正苦于以下问题:PHP Security::IntegrityHash方法的具体用法?PHP Security::IntegrityHash怎么用?PHP Security::IntegrityHash使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Security
的用法示例。
在下文中一共展示了Security::IntegrityHash方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: BuildSignature
/**
* 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);
}
示例2: BuildSignature
/**
* 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);
}
示例3: BuildSignature
/**
* Builds the integrity signature of the parameters.
* @see Security::IntegrityHash
*/
protected function BuildSignature()
{
return Security::IntegrityHash($this->Tid, IntegrationData::CreditConsultKey, IntegrationData::Pid);
}
示例4: GenerateSignature
/**
* 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);
}
示例5: GetRawXml
/**
* 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;
}