Skip to content

Commit

Permalink
fixing the signature generation error due to the order of the fields
Browse files Browse the repository at this point in the history
  • Loading branch information
RomM1 committed Jun 26, 2018
1 parent 6f7da7f commit 62f824d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/Message/Requests/PurchaseRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,8 @@ public function getData()
$data['MERCHANT'] = $this->getMerchantName();
$data['ORDER_REF'] = $this->getTransactionId();
$data['ORDER_DATE'] = $this->getOrderDate();
$data['PAY_METHOD'] = $this->getPaymentMethod();
$data['BACK_REF'] = $this->getReturnUrl();
$data['ORDER_TIMEOUT'] = $this->getOrderTimeout();
$data['PRICES_CURRENCY'] = $this->getCurrency();

foreach ($this->getItems() as $key => $item) {
$item->validate();
Expand All @@ -91,6 +89,12 @@ public function getData()
$data['ORDER_PRICE[' . $key . ']'] = $item->getPrice();
$data['ORDER_QTY[' . $key . ']'] = $item->getQuantity();
$data['ORDER_VAT[' . $key . ']'] = $item->getVat();
}

$data['PRICES_CURRENCY'] = $this->getCurrency();
$data['PAY_METHOD'] = $this->getPaymentMethod();

foreach ($this->getItems() as $key => $item) {
$data['ORDER_PRICE_TYPE[' . $key . ']'] = $item->getPriceType();
}

Expand Down

0 comments on commit 62f824d

Please sign in to comment.