Skip to content

Commit 822c5c0

Browse files
Merge pull request #3 from iamtartan/parsian-timeout
parsian timeout done
2 parents 367df77 + 763960b commit 822c5c0

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

config/larapay.php

+4-2
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,9 @@
4848
*/
4949
'parsian' => [
5050
'pin' => env('PARSIAN_PIN', ''),
51-
],
51+
'timeout' => env('PARSIAN_TIMEOUT',15)
52+
53+
],
5254
/*
5355
|--------------------------------------------------------------------------
5456
| Pasargad gateway configuration
@@ -132,5 +134,5 @@
132134
]
133135
),
134136
]
135-
]
137+
],
136138
];

src/Adapter/Parsian.php

+6
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,12 @@ class Parsian extends AdapterAbstract implements AdapterInterface
2525
protected $requestType = '';
2626

2727
protected $soapOptions = array('soap_version'=>'SOAP_1_1','cache_wsdl'=>WSDL_CACHE_NONE ,'encoding'=>'UTF-8');
28+
29+
30+
public function init() {
31+
ini_set("default_socket_timeout", config('larapay.parsian.timeout'));
32+
33+
}
2834
/**
2935
* @return array
3036
* @throws Exception

0 commit comments

Comments
 (0)