Skip to content

Commit

Permalink
Merge pull request #24 from itdelta-prog/auto_payment_feature
Browse files Browse the repository at this point in the history
Added features field to AuthorizeRequest.php, updated OrderStatusResp…
  • Loading branch information
AndrewNovikof authored Jan 24, 2023
2 parents bc58cc5 + ab4122e commit eeae7bc
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 eeae7bc

Please sign in to comment.