Skip to content

Commit

Permalink
lang param not requirenment added
Browse files Browse the repository at this point in the history
  • Loading branch information
aahmetgaliev committed Jun 17, 2020
1 parent 4b0b2a2 commit 4a371ca
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/ShopSettings.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class ShopSettings
* @param string|null $Integrated
* @param string $lang
*/
public function __construct(string $merchantKey, string $Integrated = "NO", string $lang = 'en')
public function __construct(string $merchantKey, string $Integrated = "NO", string $lang = null)
{
$this->merchantKey = $merchantKey;
$this->Integrated = $Integrated;
Expand Down
8 changes: 6 additions & 2 deletions src/Transaction.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,19 @@ public function __construct(
*/
public function toArray(): array
{
return [
$params = [
"MerchantKey"=> $this->shopSettings->merchantKey,
"RefOrder" => $this->order->refOrder,
"amount" => $this->order->amount,
"Customer_Name" => $this->customer->customerName,
"Customer_Email" => $this->customer->customerEmail,
"Customer_Phone" => $this->customer->customerPhone,
"Integrated" => $this->shopSettings->Integrated,
"lang" => $this->shopSettings->lang
];
if(!empty($this->shopSettings->lang)) {
$params["lang"] = $this->shopSettings->lang;
}

return $params;
}
}

0 comments on commit 4a371ca

Please sign in to comment.