Skip to content

Commit

Permalink
add description
Browse files Browse the repository at this point in the history
  • Loading branch information
shaxzodbek-uzb committed Feb 4, 2022
1 parent 82d9b39 commit 9b4c5e8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
7 changes: 7 additions & 0 deletions src/Http/Classes/BaseGateway.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
<?php

namespace Goodoneuz\PayUz\Http\Classes;

abstract class BaseGateway
{
const CUSTOM_FORM = '';
public $hasDescription = false;
public function setDescription($hasDescription)
{
$this->hasDescription = $hasDescription;
return $this;
}
}
6 changes: 5 additions & 1 deletion src/Http/Classes/Payme/Payme.php
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,8 @@ public function getReport($from_date, $to_date)
}
public function getRedirectParams($model, $amount, $currency, $url)
{
return [

$params = [
'merchant' => $this->config['merchant_id'],
'amount' => $amount * 100,
'account[key]' => PaymentService::convertModelToKey($model),
Expand All @@ -458,5 +459,8 @@ public function getRedirectParams($model, $amount, $currency, $url)
'callback_timeout' => 20000,
'url' => "https://checkout.paycom.uz/",
];
if ($this->hasDescription)
$params['account[description]'] = 'Оплата за №' . $model->id;
return $params;
}
}

0 comments on commit 9b4c5e8

Please sign in to comment.