Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

X2 wmb denomination #116

Merged
merged 3 commits into from
Jul 27, 2017
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Здесь нужно исправить форматирование (у нас применяются пробелы для отступов)

$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;
}
}