Jump to content

martynnorman

Member
  • Posts

    4
  • Joined

  • Last visited

Everything posted by martynnorman

  1. I have seen this issue in old threads. Running the latest 5.2.8. After deleting several invoices, we've noticed that WHMCS is reusing the invoice numbers (which is fine I guess) BUT it also appears to be including invoice items from invoices that no longer exist.. The invoices belong to the same customer, so I don't think the problem is with invoice items from invoices of other customers where the invoice IDs are the same. But it does raise the question, why isn't WHMCS deleting invoice items along with invoices ? I assume it's a bug, is there a work around, like a mysql trigger ?
  2. Does the addinvoicepayment api method actually have any interaction with the payment gateway with an accounts saved card? Or is it just to associate a "payment" against an invoice, and we have to take the "payment" against the payment gateway outside of WHMCS?
  3. If anyone is wondering how to do it in .net - here's basically how I did it.... This formats the .net name-value-pair arrays into the php formatting for base64 encoding. NameValueCollection httpParam = new NameValueCollection(); Dictionary<string, string> configOption = new Dictionary<string, string>(); configOption.Add(strAddonId, strAddonOptionId); byte[] bytes = Encoding.UTF8.GetBytes(phpStringArray(configOption)); string base64String = Convert.ToBase64String(bytes); httpParam.Add("configoptions", base64String); public static string phpStringArray(Dictionary<string, string> arr) { StringBuilder sb = new StringBuilder("a:") .Append(arr.Count).Append(":{"); foreach (string key in arr.Keys) { sb.AppendFormat("s:{0}:\"{1}\";s:{2}:\"{3}\";", key.Length, key, arr[key].Length, arr[key]); } return sb.Append('}').ToString(); }
  4. I am having difficulties creating orders with ConfigOptions. Does anyone know what actually needs to be passed in? I'm assuming the IDs of the options, but that doesn't seem to do anything, and the documentation is not very informative on this particular parameter.. It's creating the Product itself, but it's not adding the additional configurable options, so the products/invoices are wrong.
×
×
  • 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