I am doing a registration form online that connects to a soap web service and should be able to save payment information through it. The PHP is like this
The best way without having to declare classes is to use the stdClass. To make it work, preserve the name of the fields in your object and object properties.
$TMemberFee = new stdClass();
$TMemberV2 = new stdClass();
...
$TMemberV2->RecordID = $id_holder_var;
...
$TMemberFee->Member = $TMemberV2;
...
This worked for me, I hope it works for you.