About API search transaction

Any issue about Cyclos 4 scripting and Webservices

Moderators: hugo, alexandre, rmvanarkel

Post Reply
trustpay
Posts: 61
Joined: Mon Aug 03, 2015 10:19 am

About API search transaction

Post by trustpay » Sat Dec 08, 2018 1:35 pm

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!

luis
Posts: 179
Joined: Fri Feb 17, 2006 11:01 am

Re: About API search transaction

Post by luis » Mon Dec 10, 2018 7:28 am

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?
Luis Fernando Planella Gonzalez
Cyclos development team

trustpay
Posts: 61
Joined: Mon Aug 03, 2015 10:19 am

Re: About API search transaction

Post by trustpay » Mon Dec 10, 2018 1:57 pm

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!

luis
Posts: 179
Joined: Fri Feb 17, 2006 11:01 am

Re: About API search transaction

Post by luis » Tue Dec 11, 2018 12:25 pm

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.
Luis Fernando Planella Gonzalez
Cyclos development team

Post Reply