Skip to content

Commit 98c8560

Browse files
parsian sending AditionalData in params
1 parent 822c5c0 commit 98c8560

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

src/Adapter/Parsian.php

+11-10
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,15 @@ class Parsian extends AdapterAbstract implements AdapterInterface
2424

2525
protected $requestType = '';
2626

27-
protected $soapOptions = array('soap_version'=>'SOAP_1_1','cache_wsdl'=>WSDL_CACHE_NONE ,'encoding'=>'UTF-8');
27+
protected $soapOptions = array('soap_version' => 'SOAP_1_1', 'cache_wsdl' => WSDL_CACHE_NONE, 'encoding' => 'UTF-8');
2828

2929

30-
public function init() {
30+
public function init()
31+
{
3132
ini_set("default_socket_timeout", config('larapay.parsian.timeout'));
3233

3334
}
35+
3436
/**
3537
* @return array
3638
* @throws Exception
@@ -50,19 +52,18 @@ protected function requestToken()
5052

5153
$sendParams = [
5254

53-
'LoginAccount' => $this->pin,
54-
'Amount' => intval($this->amount),
55-
'OrderId' => intval($this->order_id),
56-
'CallBackUrl' => $this->redirect_url,
55+
'LoginAccount' => $this->pin,
56+
'Amount' => intval($this->amount),
57+
'OrderId' => intval($this->order_id),
58+
'CallBackUrl' => $this->redirect_url,
59+
'AdditionalData' => $this->additional_data ? $this->additional_data : '',
60+
5761
// 'authority' => 0, //default authority
5862
// 'status' => 1, //default status
5963

6064
];
6165

6266

63-
64-
65-
6667
try {
6768
$this->requestType = 'request';
6869
$soapClient = $this->getSoapClient();
@@ -95,8 +96,8 @@ protected function requestToken()
9596
*/
9697
protected function generateForm()
9798
{
98-
$authority = $this->requestToken();
9999

100+
$authority = $this->requestToken();
100101
return view('larapay::parsian-form', [
101102
'endPoint' => $this->getEndPoint(),
102103
'refId' => $authority,

0 commit comments

Comments
 (0)