Page 1 of 1

About API search transaction

Posted: Sat Dec 08, 2018 1:35 pm
by trustpay
Dear Cyclos team,

Currently, i am using Cyclos\TransactionService (PHP), function search($query) to search transactions. I using direction "DEDIT", it's ok, but when i've changed direction to "CREDIT", It does not return data, even though there was a transaction

Pls help, Thanks!

Re: About API search transaction

Posted: Mon Dec 10, 2018 7:28 am
by luis
I've just tested here, and both {"direction": "CREDIT"} and {"direction": "DEBIT"} works as expected.
Are you sure you're using the correct strings? Can you send the full query object?

Re: About API search transaction

Posted: Mon Dec 10, 2018 1:57 pm
by trustpay
Here's my code:

Code: Select all

$params = new stdclass();
$params->owner = $user;
$params->direction = 'DEBIT';
$data = $transactionService->search($params);
This code return list transations DEBIT for me, but when i've changed 'DEBIT' to 'CREDIT', it return empty list (i have data for Credit).
Note: when i delete 'direction', it's still return list DEBIT


Thanks for your reply!

Re: About API search transaction

Posted: Tue Dec 11, 2018 12:25 pm
by luis
As the transaction is not returned even when no direction filter is set, probably it is excluded by another filter, such as group visibility for admins.