Skip to content

Commit

Permalink
Added features field to AuthorizeRequest.php, updated OrderStatusResp…
Browse files Browse the repository at this point in the history
…onse.php, temporary change endpoint protocol for test environment
  • Loading branch information
Tata230 committed Jan 22, 2023
1 parent bc58cc5 commit ab4122e
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/Gateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,10 @@ public function getDefaultParameters()
*/
public function setTestMode($testMode)
{
//TODO
//temp set http for test env!
$this->setEndPoint(
$testMode ? 'https://3dsec.sberbank.ru/payment/rest/' : 'https://securepayments.sberbank.ru/payment/rest/'
$testMode ? 'http://3dsec.sberbank.ru/payment/rest/' : 'https://securepayments.sberbank.ru/payment/rest/'
);

return $this->setParameter('testMode', $testMode);
Expand Down
20 changes: 19 additions & 1 deletion src/Message/AuthorizeRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ public function getData()
'jsonParams',
'sessionTimeoutSecs',
'expirationDate',
'bindingId'
'bindingId',
'features',
];

return $this->specifyAdditionalParameters($data, $additionalParams);
Expand Down Expand Up @@ -229,6 +230,23 @@ public function setBindingId($value)
return $this->setParameter('bindingId', $value);
}

/**
* @return mixed
*/
public function getFeatures()
{
return $this->getParameter('features');
}

/**
* @param $value
* @return mixed
*/
public function setFeatures($value)
{
return $this->setParameter('features', $value);
}

/**
* @param mixed $data
* @return object|\Omnipay\Common\Message\ResponseInterface
Expand Down
2 changes: 1 addition & 1 deletion src/Message/OrderStatusResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ public function getIp()
*/
public function getBindingInfo()
{
return array_key_exists('BindingInfo', $this->data) ? $this->data['BindingInfo'] : [];
return array_key_exists('bindingInfo', $this->data) ? $this->data['bindingInfo'] : [];
}

/**
Expand Down

0 comments on commit ab4122e

Please sign in to comment.