Jump to content

API question: integrating a custom item order form into WHMCS


switch

Recommended Posts

I've take a close look at the API docs, and they _appear_ to support what I'm trying to do, but before investing a lot of time in trial and error, I'm posting this to the community for some feedback.

 

So:

I want to have an order form on my main web site. The order form asks for a wide range of extra information which I am storing. After the user completes the order form, I want to do two things:

 

1) Create a hosting account based on a pre-existing plan (nothing complicated about this, it simply involves passing client information, plan, payment info, and creating the account).

 

2) I want to charge the customer $X as part of the order process for the fee I'm providing (I'm thinking I could do this by making a special hosting plan that had that amount as the setup fee)

 

----

 

Assuming I'm approaching this the right way, I see that it's very easy to create a new client in WHMCS:

 

http://wiki.whmcs.com/API:Add_Client

 

What I'm not so clear on is how to order a plan for that client, charge their card, get a positive response, and act accordingly.

 

At the very least, I would need to assign the plan to the client, assign the credit card they provide, then set the order as "pending" or whatever. From there, I could log into the WHMCS admin and do things as normal.

 

Does anyone have any thoughts or experience doing this kind of thing?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated