In the documentation gender is defined as a enumerated type
(registerUser.regRequest[1].rUser[1].sex[1].Gender = "M";).
Now I also have a php example, and it seams quit easy to implement, I hope.
But in the other hand it is using nuSOAP lib that maybe takes care of the
tricky stuff..
If I dont manage to get it working soon, I go for the php solution, and have
the data source as the bridge between cf and php.
<?php
# $Id: wsdlclient1.php,v 1.2 2004/03/15 23:06:17 snichol Exp $
# WSDL client for the customer registration over SOAP.
# ClickandBuy Integration Sample
# created 11.04.2007
# Service: WSDL
# Payload: document/literal
# Transport: https
// Import NuSoap Lib
require_once('lib/nusoap.php');
// Defined customer info
$firstName = 'Luke';
$lastName = 'Wallwin';
$middleName = '';
$dateOfBirth = '19790101';
$language = 'en';
$sex = 'M';
$email = 'rmi001@tester.com';
$street = 'Im MediaPark 5';
$street2 = '';
$city = 'Koeln';
$ZIP = '50670';
$state = 'NRW';
$country = 'DE';
$telephoneNr =' 1234567890';
$mobileTelNr = '';
$fax = '';
$company = '';
// Defined payment info
$bankAccountNr = '12345678';
$bankSortCode = '123456';
$bankName = 'Bank Name';
// address array
$addr = array(
'email' => $email,
'street' => $street,
'street2' => $street2,
'city' => $city,
'ZIP' => $ZIP,
'state' => $state,
'country' => $country,
'telephoneNr' => $telephoneNr,
'mobileTelNr' => $mobileTelNr,
'fax' => $fax,
'company' => $company
);
// paymentCC element array
$paymentDD = array(
'bankAccountNr' => $bankAccountNr,
'bankSortCode' => $bankSortCode,
'bankName' => $bankName
);
// pData element array
$pData = array(
'paymentDD' => $paymentDD
);
// SellerID of your ClickandBuy Merchant Account
$sellerID = 1542382;
// Transactionmanager Password
$rmPassword ='******';
// Purchase link to register customer against
$linkID = 100673;
// rUser element array
$rUser = array(
'firstName' => $firstName,
'lastName' => $lastName,
'middleName' => $middleName,
'dateOfBirth' => $dateOfBirth,
'language' => $language,
'sex' => $sex,
'addr' => $addr,
'pData' => $pData
);
// RegistrationManager.Registration.RegistrationRequest
$regRequest = array(
'rUser' => $rUser,
'linkID' => $linkID
);
// Create Client Object
$client = new
soapclient('http://wsdl.eu.clickandbuy.com/RMI/2.1/RegistrationManagerbinding.ws
dl',true);
echo ('<h2>Application Started...</h2>');
$err = $client->getError();
if ($err) {
echo '<h2>Constructor error</h2><pre>' . $err . '</pre>';
}
// Begin Customer Registration
$subclient = array(
'sellerID' => $sellerID,
'rmPassword' => $rmPassword,
'regRequest' => $regRequest
);
print_r($subclient);
// Start Soap Request
$result = $client->call('registerUser',$subclient);
// Result
if ($client->fault) {
echo '<h2>Fault</h2><pre>';
print_r($result);
echo '</pre>';
} else {
// Display the error => Array
$err = $client->getError();
if ($err) {
// Display the error => Array
echo '<h2>Error</h2><pre>' . $err . '</pre>';
} else {
// Display the result => Array
echo '<h2>Result</h2><pre>';
print_r($result);
echo '</pre>';
}
// Output
echo '<br><br><br><br>';
echo '<h3>My Request</h3><pre>' . htmlspecialchars($client->request,
ENT_QUOTES) . '</pre>';
echo '<h3>ClickandBuy Response</h3><pre>' .
htmlspecialchars($client->response, ENT_QUOTES) . '</pre>';
echo '<h3>Debug</h3><pre>' . htmlspecialchars($client->debug_str, ENT_QUOTES)
. '</pre></font>';
}
?>