• The APS Catalog has been deprecated and removed from all Plesk Obsidian versions.
    Applications already installed from the APS Catalog will continue working. However, Plesk will no longer provide support for APS applications.
  • Please be aware: with the Plesk Obsidian 18.0.78 release, the support for the ngx_pagespeed.so module will be deprecated and removed from the sw-nginx package.

CreateAccount planId problem.

D

d_nn_s

Guest
Hey everyone,

I have been trying to simply create a new client and select a specific plan for it.
Everything is working fine, except selecting a plan, because no matter what I do it will select the default (I think) plan.
The following is from the corresponding database:

mysql> select id, uuid from plan;

| id | uuid

| 1 | 06cbd4eb-560f-c3a4-a4e0-fd73846d4293
| 2 | 652cf383-61a2-0908-8302-ba2b8b7f51e0
| 3 | 0c49eb20-9fd6-6f6e-f0f0-9aba713af10f
| 4 | 3ee76b09-0824-7821-cd95-43dc11086141
| 5 | 2f5d599e-fdab-75f5-5810-eb4da762f863
| 6 | 2409bad5-a13b-1a73-fdc8-345eaa2774c3

This is the code that I'm using:

$struct = new stdClass();
$struct->username = $parcelUser;
$struct->password = $parcelPwd;
$struct->firstName = $firstName;
$struct->lastName = $surname;
$struct->email = $email;
$struct->role = 'SiteOwner';

// I have tried all of these, none work.
//$struct->planId = 3;
//$struct->planId = '3';
//$struct->planId = '0c49eb20-9fd6-6f6e-f0f0-9aba713af10f';

$result = $accountService->CreateAccount(new SoapVar($struct, SOAP_ENC_OBJECT));
$accountId = $result->UserAccount->AccountId;

As you can see, no matter what I try, planId won't respond to any changes.
it will always select the plan with id = 2 (from the MySQL query).

Has anyone experienced something similar or knows the solution to my problem?
Thanks in advance.
 
Back
Top