Closed ErvanAdetya closed 4 years ago
same with me
Fatal error: Uncaught Xendit\Exceptions\ApiException: There was an error with the format submitted to the server. in C:\xampp\htdocs\tester\xendit-php-master\src\HttpClient\GuzzleClient.php:166 Stack trace: #0 C:\xampp\htdocs\tester\xendit-php-master\src\HttpClient\GuzzleClient.php(139): Xendit\HttpClient\GuzzleClient::_handleAPIError(Array) #1 C:\xampp\htdocs\tester\xendit-php-master\src\HttpClient\GuzzleClient.php(92): Xendit\HttpClient\GuzzleClient->_executeRequest(Array, '/balance?accoun...') #2 C:\xampp\htdocs\tester\xendit-php-master\src\ApiRequestor.php(84): Xendit\HttpClient\GuzzleClient->sendRequest('GET', '/balance?accoun...', Array, Array) #3 C:\xampp\htdocs\tester\xendit-php-master\src\ApiRequestor.php(43): Xendit\ApiRequestor->_requestRaw('GET', '/balance?accoun...', Array, Array) #4 C:\xampp\htdocs\tester\xendit-php-master\src\ApiOperations\Request.php(76): Xendit\ApiRequestor->request('GET', '/balance?accoun...', Array, Array) #5 C:\xampp\htdocs\tester\xendit-php-master\src\Balance.php(70): Xendit\Balance:: in C:\xampp\htdocs\tester\xendit-php-master\src\HttpClient\GuzzleClient.php on line 166
Just found the issue of mine, it's IP Whitelist, I think it's better if we returned proper error message for it
@fujitsu826 I think your error is quite unrelated with mine, the error returned is different. I think this issue is more related to https://github.com/xendit/xendit-php/issues/63.
Hi, I think it's caused by the User-Agent from Guzzle, not about the IP whitelisting. I tried to reproduce using Postman. Here is the result.
But after I remove the User-Agent of Guzzle, it works fine!
It's better to investigate from Xendit side, why the "GET" request from Guzzle client is blocked.
For a temporary solution, you can use the pure CURL from PHP.
Resolved with backend change from Xendit
I'm using version 2.17 and 7.0.1 for guzzlehttp, still facing this issue and have no idea
Got this error when running balance PHP
`Fatal error: Uncaught Xendit\Exceptions\ApiException: Please contact customer support in /Users/ervan/Documents/xendit/project/php/xendit-php/src/HttpClient/GuzzleClient.php:166 Stack trace:
0 /Users/ervan/Documents/xendit/project/php/xendit-php/src/HttpClient/GuzzleClient.php(139): Xendit\HttpClient\GuzzleClient::_handleAPIError(Array)
1 /Users/ervan/Documents/xendit/project/php/xendit-php/src/HttpClient/GuzzleClient.php(92): Xendit\HttpClient\GuzzleClient->_executeRequest(Array, '/balance?accoun...')
2 /Users/ervan/Documents/xendit/project/php/xendit-php/src/ApiRequestor.php(84): Xendit\HttpClient\GuzzleClient->sendRequest('GET', '/balance?accoun...', Array, Array)
3 /Users/ervan/Documents/xendit/project/php/xendit-php/src/ApiRequestor.php(43): Xendit\ApiRequestor->_requestRaw('GET', '/balance?accoun...', Array, Array)
4 /Users/ervan/Documents/xendit/project/php/xendit-php/src/ApiOperations/Request.php(76): Xendit\ApiRequestor->request('GET', '/balance?accoun...', Array, Array)
5 /Users/ervan/Documents/xendit/proj in /Users/ervan/Documents/xendit/project/php/xendit-php/src/HttpClient/GuzzleClient.php on line 166`