[BlueOnyx:14890] Re: trouble with API
Michael Stauber
mstauber at blueonyx.it
Sat Mar 8 14:03:11 -05 2014
Hi Chris,
> Ah, sorry no. It is not working. We still have the same symptom.
Ah, bummer. :-(
> It wouldn't have anything to do with the SSL certificate, would it? I
> put a wildcard cert on the admserv side...
Shouldn't make a difference. When I worked on the API I was even using a
self signed certificate.
The thing here is that the API throws an error to adm_error on every
imaginable transaction that fails. But not so much on success.
Please do this:
In /usr/sausalito/ui/web/base/api/index.php you find this code on the
lines 117 and 118:
$payload = json_decode($_POST['payload']);
if (isset($payload->clientsdetails)) {
Wiggle this line in between them:
error_log("BlueOnyx API Payload: $payload");
So the result looks like this:
$payload = json_decode($_POST['payload']);
error_log("BlueOnyx API Payload: $_POST['payload']");
if (isset($payload->clientsdetails)) {
Then try that transaction again and watch /var/log/admserv/adm_error to
see if the line "BlueOnyx API Payload:" shows up. The $_POST['payload']
is the JSON encoded array with key/value pairs that got passed to your
BlueOnyx. Please do *not* post that here, as it contains sensitive
information.
It should not be empty, though. If it is empty, then that might be the
problem.
--
With best regards
Michael Stauber
More information about the Blueonyx
mailing list