Skip to content

Commit

Permalink
Fields update
Browse files Browse the repository at this point in the history
  • Loading branch information
andchir committed Feb 9, 2020
1 parent dc60f95 commit 8daf876
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
5 changes: 2 additions & 3 deletions src/Message/CompletePurchaseResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,7 @@ public function getCustomFields()
{
$fields = array_filter([
'Shp_TransactionId' => $this->getTransactionId(),
'Shp_Client' => $this->getClient(),
'Shp_Currency' => $this->getCurrency(),
'Shp_Client' => $this->getClient()
]);

ksort($fields);
Expand Down Expand Up @@ -87,7 +86,7 @@ public function getTransactionId()

public function getCurrency()
{
return $this->data['Shp_Currency'];
return $this->data['OutSumCurrency'] ?? '';
}

/**
Expand Down
7 changes: 3 additions & 4 deletions src/Message/PurchaseRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ public function getData()

return [
'InvId' => $this->getInvId(),
'MrchLogin' => $this->getPurse(),
'MerchantLogin' => $this->getPurse(),
'OutSum' => $this->getAmount(),
'Desc' => $this->getDescription(),
'Description' => $this->getDescription(),
'IncCurrLabel' => $this->getCurrencyLabel(),
'OutSumCurrency' => $this->getCurrency(),
'SignatureValue' => $this->generateSignature(),
Expand Down Expand Up @@ -57,8 +57,7 @@ public function getCustomFields()
{
$fields = array_filter([
'Shp_TransactionId' => $this->getTransactionId(),
'Shp_Client' => $this->getClient(),
'Shp_Currency' => $this->getCurrency()
'Shp_Client' => $this->getClient()
]);

ksort($fields);
Expand Down

0 comments on commit 8daf876

Please sign in to comment.