Skip to main content

Create account wrong package when customer orders via API

Comments

5 comments

  • cPRex Jurassic Moderator
    Hey there! It sounds like the issue would be with whatever tool is sending data to the API. The API itself doesn't have the ability to "think" so it wouldn't pick a random package, but just processes the information it has. Unfortunately the API also doesn't have any logging at this level. Do you have a way to capture the API call that is being sent? If so, you could try running that outside of your order system to see if it completes properly there.
    0
  • evilcrytk
    Thank you for responding Currently, in my hosting order system, the customer will choose the "package" and enter the "domain". The customer system will automatically generate hosting account information (user, pass) based on the domain, then send the api link to the cPanel server (including all params - (user, pass, domain, plan-package)) For example: I have 3 plans (userreseller_Enterprise1, userreseller_Enterprise2, userreseller_Enterprise3), - Customer order package (userreseller_Enterprise1, userreseller_Enterprise2) then api link works fine. When the customer selects userreseller_Enterprise3, it points to the default package - I restart the server, the api packages (serreseller_Enterprise2, userreseller_Enterprise3) are working fine, but the userreseller_Enterprise1 package is pointing back to the default package. It seems that, every time I restart the server, the api link that is failing will work properly and the properly working links will randomly fail (pointing to the default package) This error is weird, is there any way to fix it?
    0
  • cPRex Jurassic Moderator
    Thanks for the additional details. With the information I have here I can't say for sure what the problem may be. It would be best to open a ticket with our team so we could check the issue on your specific server while replicating the actual API calls in use. If you are able to submit a ticket, please post the number here so I can follow along.
    0
  • evilcrytk
    I found the cause My password constructor encloses characters as plaintext ( including "#&" characters), when "#" or "&&" characters appear will lose the params after it. So it can't find the "plan" param
    0
  • cPRex Jurassic Moderator
    Nice catch!
    0

Please sign in to leave a comment.