Closed henzan02 closed 2 years ago
Hi @henzan02 Can you try to modify for customer_notification_preference
to become like below?
Referring to developers.xendit.co
'customer_notification_preference' => [
'invoice_created' => ['whatsapp','email']
]
Wowww.. Thanks a lot @xen-HendryZheng it works!!
Hello, I've got this error when running create invoice with customer details.
Fatal error: Uncaught Xendit\Exceptions\ApiException: There was an error with the format submitted to the server. in C:\xampp\htdocs\xendit\vendor\xendit\xendit-php\src\HttpClient\GuzzleClient.php:171 Stack trace: #0 C:\xampp\htdocs\xendit\vendor\xendit\xendit-php\src\HttpClient\GuzzleClient.php(144): Xendit\HttpClient\GuzzleClient::_handleAPIError(Array) #1 C:\xampp\htdocs\xendit\vendor\xendit\xendit-php\src\HttpClient\GuzzleClient.php(90): Xendit\HttpClient\GuzzleClient->_executeRequest(Array, '/v2/invoices') #2 C:\xampp\htdocs\xendit\vendor\xendit\xendit-php\src\ApiRequestor.php(84): Xendit\HttpClient\GuzzleClient->sendRequest('POST', '/v2/invoices', Array, Array) #3 C:\xampp\htdocs\xendit\vendor\xendit\xendit-php\src\ApiRequestor.php(43): Xendit\ApiRequestor->_requestRaw('POST', '/v2/invoices', Array, Array) #4 C:\xampp\htdocs\xendit\vendor\xendit\xendit-php\src\ApiOperations\Request.php(94): Xendit\ApiRequestor->request('POST', '/v2/invoices', Array, Array) #5 C:\xampp\htdocs\xendit\vendor\xendit\xendit-php\src\ApiOp in C:\xampp\htdocs\xendit\vendor\xendit\xendit-php\src\HttpClient\GuzzleClient.php on line 171
When I add customer_notification_preference, and customer array, its got an error above, but if I remove customer_notification_preference, and customer it's works well. I tried in development mode with PHP.
here's my code :
What is the correct code format?