<?php
// STEP 1 : soap flow options
$options = array(
	'compression' => SOAP_COMPRESSION_ACCEPT | SOAP_COMPRESSION_GZIP,
	'cache_wsdl' => WSDL_CACHE_NONE,
	'soap_version' => SOAP_1_1,
	'encoding' => 'UTF-8'
);
// STEP 2 : Soap client initialization
$client = new SoapClient('https://test-ws.hipay.com/soap/user-account-v2?wsdl', $options);
// STEP 3 : Soap call on createFullUserAccount method of user-account-v2 webservice
$result = $client->createFullUserAccount(array('parameters'=>array(
	'wsLogin'=> '4f8c3e80fd4e476f1e227c68fefdb3e5',
	'wsPassword'=> '2f0c4099c4254f819bf7246d6202d192',
	'userAccountBasic'=> array(
		'email'=> 'jdupont@free.fr',
		'title'=> 1,
		'firstname'=> 'James',
		'lastname'=> 'Dupont',
		'currency'=> 'EUR',
		'locale' => 'en_GB',
		'ipAddress'=> '127.0.0.1'
	),
	'userAccountDetails'=> array(
		'legalStatus'=> 1,
		'structure'=> 'ltd',
		'companyName'=> 'your company',
		'directorTitle'=> 1,
		'directorRole'=> 'CEO',
		'address' => 'victoria st, 1200',
		'zipCode' => '34512',
		'city'=> 'london',
		'country' => 'GB',
		'language'=> 'en',
		'timeZone'=> 'Europe/Dublin',
		'birthDate'=> '12/11/1965',
		'contactEmail'=> 'jdupont@free.fr',
		'phoneNumber'=> '',
		'mobilePhoneNumber'=> '',
		'faxNumber'=> '123456',
		'instantMessagingAddress' => 'jdupont@free.fr',
		'europeanVATNumber'=> '123456',
		'businessId'=> '123456',
		'businessLineId' => 12,
		'question1'=> 1,
		'answer1' => 'test',
		'question2'=> 2,
		'answer2' => 'test',
		'antiPhishingKey' => 'testtest',
		'receiveHipayInformation' => 1,
		'receiveCommercialInformation'=>1,
		'termsAgreed'=>1
	),
	'websites'=> array(
		'item'=> array(
			'websiteBusinessLineId'=> 12,
			'websiteTopicId' => 13,
			'websiteContactEmail'=> 'jdupont@free.fr',
			'websiteName'=> 'merchant.com',
			'websiteUrl'=> 'http://www.merchant.com',
			'websiteMerchantPassword' => 'passwdtest'
		)
	),
	'merchantDatas'=> array(
	)
)));
// STEP 4 : Response
var_dump($result);
?>