• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion
  • Inviting everyone to the UX test of a new security feature in the WP Toolkit
    For WordPress site owners, threats posed by hackers are ever-present. Because of this, we are developing a new security feature for the WP Toolkit. If the topic of WordPress website security is relevant to you, we would be grateful if you could share your experience and help us test the usability of this feature. We invite you to join us for a 1-hour online session via Google Meet. Select a convenient meeting time with our friendly UX staff here.

Creating an account?????

J

jeffm@

Guest
I am having a problem trying to create an account for site builder through php. I am using the same code as the example scripts given but am getting an error about the plan id.

Am I missing something obvious?

The error:
Fatal error: Uncaught SoapFault exception: [soap:Server] Server was unable to process request. ---> Incorrect plan Parameter name: planId in F:\devel.www\hosting\includes\classes\sitebuilder\sitebuilder_client.php:26 Stack trace: #0 [internal function]: SoapClient->__call('CreateAccount', Array) #1 F:\devel.www\hosting\includes\classes\sitebuilder\sitebuilder_client.php(26): Utils_SoapClient->CreateAccount(Object(SoapVar)) #2 {main} thrown in F:\devel.www\hosting\includes\classes\sitebuilder\sitebuilder_client.php on line 26

my code:
$serviceUrl = 'http://blahblah.com.au:2006/ServiceFacade/4.1/';
$serviceLogin = 'login';
$servicePassword = 'password';
$accountService = new Utils_SoapClient ( $serviceUrl . '/AccountWebService.asmx?WSDL', array () );
$accountService->setCredentialsHeader ( $serviceLogin, $servicePassword );

$struct = new stdClass ( );
$struct->username = 'user';
$struct->password = 'pwd';
$struct->firstName = 'john';
$struct->lastName = 'ofl';
$struct->email = '[email protected]';
$struct->role = 'SiteOwner';
$struct->planId = '30b07cc2-1bb3-4cec-922f-ba1b5ebe5981';
$struct->changePasswordAllowed = 'true';

$svar = new SoapVar ( $struct, SOAP_ENC_OBJECT );
$result = $accountService->CreateAccount ( $svar );

the svar:
SoapVar Object
(
[enc_type] => 301
[enc_value] => stdClass Object
(
[username] => user
[password] => pwd
[firstName] => john
[lastName] => ofl
=> [email protected]
[role] => SiteOwner
[planId] => 30b07cc2-1bb3-4cec-922f-ba1b5ebe5981
[changePasswordAllowed] => true
)

)
 
Back
Top