Hello,

Thanks for the very useful module.

I am trying to use the uc_order.getOrdersBetween method. But I keep getting Access Denied. I may not be passing the Start Time correctly. I know that says it is supposed to be an int. but based on what? How do I convert a data to an int that the service understands?

Thanks

Todd

Comments

toddgeist’s picture

Title: uc_order.getOrdersBetween start time question » uc_order.getAllOrdersBetween start time question

Correction: the call is to "uc_order.getAllOrdersBetween" I had left out the "all" in the post.

toddgeist’s picture

Is this just the number of seconds since the start of the unix epoch?

I have been trying that, but it still gives me Access denied. Calls to other uc_services work just fine.

Checking the log I see that there is a SQL error

User warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1 query: SELECT p.perm FROM role r INNER JOIN permission p ON p.rid = r.rid WHERE r.rid IN () in _db_query() (line 141 of /data/all/002/pressflow/includes/database.mysqli.inc).

So I guess there is an issue with permissions, but I don't know how to fix it.

I also don't know why calls to uc_order.getAllOrdersBetween fail, but calls to uc_order.getOrders works just fine. Looking at the module code, I don't see much in the way of a difference

toddgeist’s picture

So even using the services browser I get Access denied if I try to pass anything into the endtime parameter of the method uc_order.getAllOrdersBetween call

why?