Skip to content

Commit

Permalink
fixed getData in PurchaseRequest
Browse files Browse the repository at this point in the history
  • Loading branch information
hiqsol committed Mar 29, 2017
1 parent 6db840f commit 365c098
Showing 1 changed file with 13 additions and 24 deletions.
37 changes: 13 additions & 24 deletions src/Message/PurchaseRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@ public function setSignature($value)
return $this->setParameter('signature', $value);
}

public function getInvId()
public function getOrderId()
{
return $this->getParameter('inv_id');
return $this->getParameter('order_id');
}

public function setInvId($value)
public function setOrderId($value)
{
return $this->setParameter('inv_id', $value);
return $this->setParameter('order_id', $value);
}

public function getClient()
Expand All @@ -72,16 +72,6 @@ public function setTime($value)
return $this->setParameter('time', $value);
}

public function getShpCart()
{
return $this->getParameter('shp_cart');
}

public function setShpCart($value)
{
return $this->setParameter('shp_cart', $value);
}

public function getData()
{
$this->validate(
Expand All @@ -91,16 +81,15 @@ public function getData()
);

return [
'Desc' => $this->getDescription(),
'MrchLogin' => $this->getPurse(),
'OutSum' => $this->getAmount(),
'IncCurrLabel' => $this->getCurrency(),
'InvId' => $this->getInvId(),
'Culture' => $this->getLanguage(),
'ShpCart' => $this->getShpCart(),
'ShpClient' => $this->getClient(),
'ShpTime' => $this->getTime(),
'SignatureValue' => $this->getSignature(),
'o' => $this->getOrderId(),
'm' => $this->getPurse(),
'oa' => $this->getAmount(),
'i' => $this->getCurrency(),
'lang' => $this->getLanguage(),
'us_system' => 'freekassa',
'us_client' => $this->getClient(),
'us_time' => $this->getTime(),
's' => $this->getSignature(),
];
}

Expand Down

0 comments on commit 365c098

Please sign in to comment.