Skip to content

Commit fca78f6

Browse files
committed
FIX url encoding
1 parent 3d6b832 commit fca78f6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Client.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ class Client
2626
private $status;
2727
private $curl_result = null;
2828
private $json = null;
29+
private $ch = null;
2930

3031
public function __construct($user = null, $password = null, $endpoint = null, $debug = false, $logfile = null)
3132
{
@@ -44,7 +45,7 @@ public function isValidAuth($merchant = '')
4445
$this->initCurl(
4546
$this->_endpoint .
4647
'/merchants' .
47-
urlencode($merchant?'/'.$merchant:'').
48+
($merchant?'/'.urlencode($merchant):'').
4849
'/credentials'
4950
);
5051
curl_setopt($this->ch, CURLOPT_CUSTOMREQUEST, 'GET');

0 commit comments

Comments
 (0)