Skip to content

Commit

Permalink
change in signature
Browse files Browse the repository at this point in the history
  • Loading branch information
nidjo17 authored and dakorpar committed Dec 23, 2022
1 parent bef5675 commit 623ed2d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Gateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public function getSignature()
public function setSignature(string $shopId, string $secretKey, string $shoppingCartId, string $amount)
{
$formatedAmount = $this->getFormatedPrice($amount);
$signature = md5($shopId . $secretKey . $shoppingCartId . $secretKey . $formatedAmount . $secretKey);
$signature = hash('sha512', $shopId . $secretKey . $shoppingCartId . $secretKey . $formatedAmount . $secretKey);

return $this->setParameter('Signature', $signature);
}
Expand Down
3 changes: 2 additions & 1 deletion src/Message/PurchaseRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ public function getData()
$data['CustomerEmail'] = $this->getCustomerEmail();
$data['CustomerPhone'] = $this->getCustomerPhone();
$data['CustomerCountry'] = $this->getCustomerCountry();
return $data;
$data['Version'] = '2.0';
return $data;
}

public function sendData($data)
Expand Down

0 comments on commit 623ed2d

Please sign in to comment.