Skip to content

Commit

Permalink
Merge c65623a into 3acc355
Browse files Browse the repository at this point in the history
  • Loading branch information
Ishodnikov committed Jan 10, 2019
2 parents 3acc355 + c65623a commit 8226219
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 4 deletions.
22 changes: 22 additions & 0 deletions src/Message/AbstractRequest.php
Expand Up @@ -17,6 +17,28 @@ abstract class AbstractRequest extends \Omnipay\Common\Message\AbstractRequest
{
protected $zeroAmountAllowed = false;

/**
* Get the purse.
*
* @return integer invid
*/
public function getInvId()
{
return $this->getParameter('invid');
}

/**
* Set the purse.
*
* @param integer $invid invid
*
* @return self
*/
public function setInvId($value)
{
return $this->setParameter('invid', $value);
}

/**
* Get the purse.
*
Expand Down
3 changes: 1 addition & 2 deletions src/Message/CompletePurchaseResponse.php
Expand Up @@ -50,9 +50,8 @@ public function generateSignature()
public function getCustomFields()
{
$fields = array_filter([
'Shp_TransactionId' => $this->getTransactionId(),
'Shp_Client' => $this->getClient(),
'Shp_Currency' => $this->getCurrency(),
'Shp_TransactionId' => $this->getTransactionId(),
]);

ksort($fields);
Expand Down
4 changes: 2 additions & 2 deletions src/Message/PurchaseRequest.php
Expand Up @@ -19,7 +19,7 @@ public function getData()
);

return [
'InvId' => '0',
'InvId' => $this->getInvId(),
'MrchLogin' => $this->getPurse(),
'OutSum' => $this->getAmount(),
'Desc' => $this->getDescription(),
Expand All @@ -34,7 +34,7 @@ public function generateSignature()
$params = [
$this->getPurse(),
$this->getAmount(),
'0',
$this->getInvId(),
$this->getSecretKey()
];

Expand Down

0 comments on commit 8226219

Please sign in to comment.