Skip to content

Commit c4ddff8

Browse files
committed
fixed Pasargad form generator problems
1 parent 1e8b925 commit c4ddff8

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/Adapter/Pasargad.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ protected function generateForm(): string
5050
$timeStamp = date("Y/m/d H:i:s");
5151
$invoiceDate = date("Y/m/d H:i:s");
5252
$action = 1003; // sell code
53+
$submitLabel = !empty($this->submit_label) ? $this->submit_label : trans("larapay::larapay.goto_gate");
54+
$autoSubmit = boolval($this->auto_submit);
5355

5456
$data = "#" . $merchantCode . "#" . $terminalCode . "#" . $invoiceNumber . "#" . $invoiceDate . "#" . $amount . "#" . $redirectUrl . "#" . $action . "#" . $timeStamp . "#";
5557
$data = sha1($data, true);
@@ -66,7 +68,9 @@ protected function generateForm(): string
6668
'merchantCode',
6769
'timeStamp',
6870
'action',
69-
'sign'
71+
'sign',
72+
'submitLabel',
73+
'autoSubmit'
7074
));
7175

7276
return $form->__toString();

views/pasargad-form.blade.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<form id="goto_pasargad_bank" class="form-horizontal goto-bank-form" method="POST" target="_self" action="{!! $url !!}">
2-
<input type="hidden" name="token" value="{{$refId}}" />
32
<input type="hidden" name="invoiceNumber" value="{{$invoiceNumber}}" />
43
<input type="hidden" name="invoiceDate" value="{!! $invoiceDate !!}" />
54
<input type="hidden" name="amount" value="{{$amount}}" />

0 commit comments

Comments
 (0)