PDA

View Full Version : Add order by custom remote form bypassing API



kmm2908
02-24-10, 03:21 AM
Having drawn a frustrated blank on trying to use the API to achieve what I want I am now working on a full bypass of the API by adding a client order directly to the whmcs database tables.

Has anyone else achieved this successfully and can they share any tips, warnings or advice?

First off I am trying to identify tables that are affected by placing of an order and have the following so far:
tblclients
tblorders
tblinvoices
tblinvoiceitems
tbldomains
tblhosting
tblactivitylog

Any missed, any other suggestions?

Quite prepared to share all code and experiences here if I get some help and assistance.

dsaunier
02-24-10, 07:04 AM
I've add to use the API in an older WHMCS version (to migrate existing clients from a custom base) and was quite happy of its use that let us add a client account and domain in one go. However after the upgrade to the latest WHMCS our code to use the API was rendered useless and I was told by support I'd be better off using standard mysql queries, so I pretty much stand where you do. Also because of custom separate features we've added fuctions that store data in existing tables such as the activity log, so I've had a look at the tables structure too. Finally I'm setting up a new site that will sell our services, and plan to have clients manage all their infos into our WHMCS site so I'll need remote adding and started testing forms. From the top of my head the ones you quote are all you need to add a client account and infos.
Anyway it makes sense to share knowledge rather than work on the same things separately, we are in the same business but not competitors ! Cheers.

kmm2908
02-24-10, 07:49 AM
Thanks for the reply dsaunier - and exactly my way of thinking!
I'll keep you updated with anything of note.