Jump to content
  • 0

Order Form Provisioning To Interworx Failing


aosoft

Question

Hello.  I'm new to Blesta and trying to get it set up to provision accounts to an Interworx server when a customer orders the service.  So far provisioning fails when the order is submitted from the client order form.  The error displayed in the admin interface when attempting to activate the service is fairly generic:  "An internal error occurred, or the server did not respond to the request."

 

However, the error shown in the module log is more informative and quite similar to the one posted here: http://www.blesta.com/forums/index.php?/topic/1825-another-interworx-issue/#entry14033

 

In this case, the input is shown as:

10.0.0.1|modifyAccount
a:5:{s:8:"password";s:12:"zdv0^*h2w%9m";s:16:"confirm_password";s:12:"zdv0^*h2w%9m";s:5:"email";s:19:"support@domain.com";s:8:"nickname";s:8:"somejunk";s:6:"domain";s:12:"somejunk.com";}

And the output is shown as:

10.0.0.1|modifyAccount
O:8:"stdClass":3:{s:6:"status";s:5:"error";s:8:"response";s:255:"reported_error There was a problem validating the form. Please see details below.
domain: "somejunk.com" This is not a valid option
Usage:
domain domain.net|example.com|clienttest.com|testdomain.com
";s:3:"log";s:2682:"DEBUG LOG:
Array
(
    [parameters] => Array
        (
            [apikey] => -----BEGIN INTERWORX API KEY-----
LKJDlasdlfkjhhlLKJALKISWEJNMVlksjfLKHASFLhjlkahsfsflkafLSADFL
SFLlkasjdflsjfLAKSFJLKJlaskdjf...redacted
-----END INTERWORX API KEY-----
            [ctrl_name] => /nodeworx/siteworx
            [action] => edit
            [input] => Array
                (
                    [password] => zdv0^*h2w%9m
                    [confirm_password] => zdv0^*h2w%9m
                    [email] => support@domain.com
                    [nickname] => somejunk
                    [domain] => somejunk.com
                    [perms] => Array
                        (
                            [0] => SWACCOUNTS
                        )

                )

        )

    [response] => Array
        (
            [status] => 11
            [payload] => There was a problem validating the form. Please see details below.
domain: "somejunk.com" This is not a valid option
Usage:
domain domain.net|example.com|clienttest.com|testdomain.com

        )

)
";}

Interestingly, this seems to only happen when the order is submitted through the client order form.  If the service is created manually through the admin interface, it is provisioned successfully.  Also, I noticed the first line in the input and output of the error calls 'modifyAccount', while the respective line in the log of the successful provision calls 'createAccount'.  Does this indicate I have something misconfigured with the order form?  Or is there something I'm missing?

 

Thanks for any insight.

 

 

Link to comment
Share on other sites

14 answers to this question

Recommended Posts

  • 0

The first lines that contain "createAccount" or "modifyAccount" simply say what method is being called to make the API request.

 

I can't find much information regarding that error from Interworx, so it may take some time to determine what's going on here.

 

I've just provisioned several Interworx accounts without incident, so all seems well on my end. You mentioned that creating an account works fine, but it errors out when modifying the account. You only modify the account when you go to save updates to an existing account through the admin interface--not in the client interface or via an order form. Ordering a service via the order form will add it as a pending service in Blesta, and you can either provision it manually as an admin, or the cron will provision it automatically when it has been paid for. In either case, the "createAccount" action takes place.

 

Could you clarify what you were doing (and what page(s) you were on) when you received that error message?

Link to comment
Share on other sites

  • 0

Thanks for the reply.  Yes, I'm clicking the Activate button to provision a service listed under Billing > Services > In Review, so as far as I know, it should be creating an account, not trying to modify an existing one.  Provisioning is successful when I log into Blesta as an admin and click Add Service under the client.  I'm only getting the error when I log in as the client and order the service through the order form.  That's why I thought is was strange that modifyAccount seemed to be getting called for a process that should be creating an account.

Link to comment
Share on other sites

  • 0

Ok...  this just got a little more confusing.  I just tried to add another account from the Blesta admin (which has previously been successful) and it failed with the following:

Oh noes!
unexpected character in filters : "/" at 282 on line 233 in /chroot/home/domain/domain.org/html/blesta/vendors/h2o/h2o/parser.php

Printing Stack Trace:
#0 /chroot/home/domain/domain.org/html/blesta/vendors/h2o/h2o/parser.php(114): ArgumentLexer->parse()
#1 /chroot/home/domain/domain.org/html/blesta/vendors/h2o/h2o/parser.php(75): H2o_Parser::parseArguments(' #2 /chroot/home/domain/domain.org/html/blesta/vendors/h2o/h2o.php(106): H2o_Parser->parse()
#3 /chroot/home/domain/domain.org/html/blesta/vendors/h2o/h2o.php(142): H2o->parse('
???Hi {conta...')
#4 /chroot/home/domain/domain.org/html/blesta/app/models/emails.php(806): H2o::parseString('
???Hi {conta...', Array)
#5 /chroot/home/domain/domain.org/html/blesta/app/models/emails.php(512): Emails->buildEmail('service_creatio...', '1', 'en_us', Array)
#6 /chroot/home/domain/domain.org/html/blesta/app/models/services.php(1191): Emails->send('service_creatio...', '1', 'en_us', 'helpdesk@mail.a...', Array, NULL, NULL, NULL, Array)
#7 /chroot/home/domain/domain.org/html/blesta/app/models/services.php(849): Services->sendNotificationEmail(Object(stdClass), Object(stdClass), '1')
#8 /chroot/home/domain/domain.org/html/blesta/app/controllers/admin_clients.php(3989): Services->add(Array, Array, true)
#9 /chroot/home/domain/domain.org/html/blesta/app/controllers/admin_clients.php(3900): AdminClients->createService(Array, Array)
#10 /chroot/home/domain/domain.org/html/blesta/app/controllers/admin_clients.php(3397): AdminClients->processServiceStep('confirm', Object(stdClass), Object(stdClass), Object(stdClass))
#11 /chroot/home/domain/domain.org/html/blesta/lib/dispatcher.php(111): AdminClients->addService()
#12 /chroot/home/domain/domain.org/html/blesta/index.php(21): Dispatcher::dispatch('/blesta/admin/c...')
#13 {main}

One other note:  I currently have Blesta installed on the Interworx server I'm trying to provision to.  Could this be a problem?

Link to comment
Share on other sites

  • 0

Ok...  this just got a little more confusing.  I just tried to add another account from the Blesta admin (which has previously been successful) and it failed with the following:

Oh noes!
unexpected character in filters : "/" at 282 on line 233 in /chroot/home/domain/domain.org/html/blesta/vendors/h2o/h2o/parser.php

 

That sounds like an issue with tags in the email template, e.g. {invoice}. My guess is the account was created in Interworx, but the email was simply not sent. Did you make recent changes to an email template to change tags? Maybe you copied+pasted content into the WYSIWYG? This thread may help you fix that issue.

 

 

One other note:  I currently have Blesta installed on the Interworx server I'm trying to provision to.  Could this be a problem?

 

I wouldn't think so, especially since it has worked for you in some instances.

 

 

It may be that the service is added "In Review" for you. In my tests, the service is added as Pending, and Blesta manually or automatically provisions it via the API by creating the account, not modifying it. That may be why it is not working for you, as it is attempting to modify an existing account (which doesn't exist) rather than creating it. I don't see anywhere in the logic that would result in attempting to modify the account unless you went to manage the service and tried to save service details before the account was created.

 

Provisioning is successful when I log into Blesta as an admin and click Add Service under the client.  I'm only getting the error when I log in as the client and order the service through the order form.  

What happens after you order a service as a client under the order form? Do you let the cron provision it, or do you go into the admin interface and attempt to do it yourself? I need to know exactly what you're doing, step-by-step (and as detailed as you can be), in order to duplicate the problem. At what point does the service get placed into "In Review" status?

Link to comment
Share on other sites

  • 0

That sounds like an issue with tags in the email template, e.g. {invoice}. My guess is the account was created in Interworx, but the email was simply not sent. Did you make recent changes to an email template to change tags? Maybe you copied+pasted content into the WYSIWYG? This thread may help you fix that issue.

 

Indeed, you were correct.  Didn't realize there was html in the text I copied.  I'll have to make a note to check the 'source' view in the future before saving.  That said, clearer error reporting on this would be helpful.

 

 

It may be that the service is added "In Review" for you. In my tests, the service is added as Pending, and Blesta manually or automatically provisions it via the API by creating the account, not modifying it. That may be why it is not working for you, as it is attempting to modify an existing account (which doesn't exist) rather than creating it. I don't see anywhere in the logic that would result in attempting to modify the account unless you went to manage the service and tried to save service details before the account was created.

 

What happens after you order a service as a client under the order form? Do you let the cron provision it, or do you go into the admin interface and attempt to do it yourself? I need to know exactly what you're doing, step-by-step (and as detailed as you can be), in order to duplicate the problem. At what point does the service get placed into "In Review" status?

 

And this, as well.  It would seem that orders were going into 'In Review' because the order form was configured with "Require Manual Review and Approval of All Orders".  Upon removing that from the order form and processing another order, it went into 'Pending'.  From there, I manually activated it by clicking the Activate button, and it provisioned successfully.  Interestingly, three of the services that had been sitting 'In Review' were moved to 'Pending' at that point as well.  Not sure why this would be.

 

In terms of a step-by-step, this is what I'm doing: 

 

1. Log in as the client (in a separate browser, just to keep cookies straight)

2. click on Order in the portal

3. click the Select button for the plan I want,

4. enter a test domain in the Domain field the Interworx module provides under configurable options,

5. click Continue,

6. click Checkout,

7. select the default payment account and check the TOS box (the payment acct is a cc configured via the Authorize.net module in test mode, so Blesta sees the payment go through upon checkout)

8. click Submit Order.  At this point, I get the Order Complete page.

9. log in as the admin and navigate to Services under Billing

10. I would see the order in 'In Review' (apparently due to the "Require Manual Review" option selected in the order form config) and click the Manage link for the order

11. Then click the Activate button.  This is where the error occurs.

 

Am I misunderstanding the function of the "Manual Review" option?  Is there another way to move an order from 'In Review' to 'Pending' so it will be provisioned by the cron?

 

As I mentioned after removing the "Manual Review" requirement from the order form, services go into Pending and can be manually activated from there.  As yet, though, I've not seen any services get autoprovisioned by the cron job.  The logs indicate the cron is running, but services seem to remain in Pending unless I manually activate them.  I'm troubleshooting that now.

Link to comment
Share on other sites

  • 0

As yet, though, I've not seen any services get autoprovisioned by the cron job.  The logs indicate the cron is running, but services seem to remain in Pending unless I manually activate them.  I'm troubleshooting that now.

 

Services remain pending until the invoice they are attached to has been paid (or you manually activate them anyway). Only then does the cron attempt to provision it. Unless there is an error of some kind preventing the service from being provisioned, that is how it would work.

 

Thanks for the step-by-step. I'll look into that as soon as I can.

Link to comment
Share on other sites

  • 0

The orders currently under Pending have been paid, as payment is recorded at checkout via test credit card.  This is confirmed when I go to record a payment, as there are no open invoices to apply a payment toward.  Yet the cron is still not provisioning the pending orders.  Is there a way to get error reporting from the cron task or more detail about what it's doing?

Link to comment
Share on other sites

  • 0

Yeah, I'm not sure why it's not working for me.  I'm open to any troubleshooting tips.  The logs indicate the cron is running, and manually running it from the Blesta admin, I get the following output:

 

Attempting to run all tasks for Aosoft.
All tasks have been completed.
Attempting to run all system tasks.
All system tasks have been completed.

 

 

As an aside, I noticed in your video when you clicked 'Log In' for the service, it logged you straight into Interworx.  That is what I was expecting, but it has not been working that way for me.  It just takes me to the Interworx login page with the domain auto-populated.  Did you have to do something special to get that to work?

Link to comment
Share on other sites

  • 0

Yeah, I'm not sure why it's not working for me.  I'm open to any troubleshooting tips.  The logs indicate the cron is running, and manually running it from the Blesta admin, I get the following output:

 

Attempting to run all tasks for Aosoft.

All tasks have been completed.

Attempting to run all system tasks.

All system tasks have been completed.

 

 

As an aside, I noticed in your video when you clicked 'Log In' for the service, it logged you straight into Interworx.  That is what I was expecting, but it has not been working that way for me.  It just takes me to the Interworx login page with the domain auto-populated.  Did you have to do something special to get that to work?

 

Nope I've print screened a few sections of my install for you, please note I'm using Blesta 3.1.1 and have PHP Soap installed.

 

InterWorx-Preview.PNG

InterWorx-Preview2.PNG

 

Then the nameservers in the boxes below it.

Link to comment
Share on other sites

  • 0

To follow up on this, I've found that when the 'Require manual review' option in the order form settings is unchecked, orders are placed in the Pending category, and provisioning works when I go in and click Activate for the pending service.  Viewing the module log, I can confirm the 'createAccount' method is called successfully in this case.  Whereas, the log shows the 'modifyAccount' method is called (and fails) when attempting to activate a service from an order processed with the 'Require manual review' option checked. This would appear to be a bug.

 

Also, the cronjob is still not provisioning pending services that are paid.  Is there any way to get debug output from the cronjob?

 

Thanks.

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
Answer this question...

×   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.

Loading...
×
×
  • Create New...