Skip to content

Commit

Permalink
X2 wmb denomination (#116)
Browse files Browse the repository at this point in the history
* Добавлен параметр wmb_denomination

* Правка описания wmb_denomination

* Исправлено форматирование
  • Loading branch information
fedorovvldmr authored and baibaratsky committed Jul 27, 2017
1 parent 0cce44e commit d2629e6
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion Api/X/X2/Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ class Request extends X\Request
/** @var bool trans/onlyauth */
protected $onlyAuth = true;

/** @var bool wmb_denomination */
protected $wmbDenomination = true;

/**
* @param string $authType
*
Expand Down Expand Up @@ -72,7 +75,7 @@ protected function getValidationRules()
return array(
RequestValidator::TYPE_REQUIRED => array(
'transactionExternalId', 'payerPurse', 'payeePurse', 'amount',
'invoiceId', 'onlyAuth',
'invoiceId', 'onlyAuth', 'wmbDenomination'
),
RequestValidator::TYPE_DEPEND_REQUIRED => array(
'signerWmid' => array('authType' => array(self::AUTH_CLASSIC)),
Expand Down Expand Up @@ -100,6 +103,7 @@ public function getData()
$xml .= self::xmlElement('wminvid', $this->invoiceId);
$xml .= self::xmlElement('onlyauth', (int)$this->onlyAuth);
$xml .= '</trans>';
$xml .= self::xmlElement('wmb_denomination', $this->wmbDenomination);
$xml .= '</w3s.request>';

return $xml;
Expand Down Expand Up @@ -277,4 +281,20 @@ public function setOnlyAuth($onlyAuth)
{
$this->onlyAuth = (bool)$onlyAuth;
}

/**
* @return bool
*/
public function getWmbDenomination()
{
return $this->wmbDenomination;
}

/**
* @param bool $wmbDenomination
*/
public function setWmbDenomination($wmbDenomination)
{
$this->wmbDenomination = (bool)$wmbDenomination;
}
}

0 comments on commit d2629e6

Please sign in to comment.