Jump to content

Add url to pdf invoice via the "addorder" api call


johan82

Recommended Posts

Hi All

 

I'm trying to create an order via the WHMCS api and have it add a custom url to the the invoice. I have attached a screenshot of the custom field I added for clients, named "VCS payment". I then make the api call using the ruby code below but the custom field does not appear on the invoice. I'm am obviously missing something and would appreciate some help.

 

Screenshot:

 

Screen Shot 2016-07-05 at 3.51.13 PM (3).png

 

Ruby Code:

 

payload = {"username" => @username,

"password" => md5_password,

"action" => "addorder",

"clientid" => "1",

"pid" => "1",

"domain" => "cinvoicetest1.co.za",

"billingcycle" => "monthly",

"domaintype" => "transfer",

"regperiod" => "1",

"paymentmethod" => "offlinecc",

"customfields" => Base64.encode64(PHP.serialize({"VCS payment" => "http://google.com"}))}

 

result = WhmcsHttpClient.new.post("whmcs/includes/api.php", payload)

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