CustomerObject
Contains customer data.
Description
This object contains all relevant customer data, including CustNum (a unique customer number assigned by the gateway); CustID (a merchant-assigned customer ID); and customer name, address, and recurring billing status and schedule, as well as any other relevant data.
Properties
Type | Name | Description |
---|---|---|
string | CustNum | Customer number (assigned by system). (required) |
string | CustomerID | Customer ID (merchant-assigned). (required) |
GwAddress | BillingAddress | Customer address information (uses Address object). (required) |
PaymentMethod | PaymentMethods | Array of PaymentMethod objects. Multiple credit cards or ACH accounts may be stored for each customer. (required) |
string | Notes | Notes (visible to merchant only). (optional) |
string | CustomData | Custom data is a raw text field; please serialize and encode (i.e., base64) your data so that complex types are stored and retrieved correctly. (optional) |
FieldValue | CustomFields | Array of field values containing the merchant-defined customer fields. These fields are defined in the merchant console. (optional) |
string | URL | URL for customer's website. (optional) |
datetime | Created | Date/time customer was created (read-only). (optional) |
datetime | Modified | Date/time customer was last changed (read-only). (optional) |
<?php
// for directions on how to set up the
// WSDL link and create "$token" and "$client,"
// see: http://wiki.eBizCharge.com/developer/soap/howto/php
$CustomerObject=array(
'BillingAddress'=>array(
'FirstName'=>'John',
'LastName'=>'Doe',
'Company'=>'Acme Corp',
'Street'=>'1234 main st',
'Street2'=>'Suite #123',
'City'=>'Los Angeles',
'State'=>'CA',
'Zip'=>'12345',
'Country'=>'US',
'Email'=>'[email protected]',
'Phone'=>'333-333-3333',
'Fax'=>'333-333-3334'
),
'PaymentMethods' =>
array(
array(
'CreditCardData' =>
array(
'CardNumber'=>'4444555566667779',
'CardExpiration'=>'0908',
'CardType'=>'',
'CardCode'=>'',
'AvsStreet'=>'',
'AvsZip'=>'',
'CardPresent'=>'',
'MagStripe'=>'',
'TermType'=>'',
'MagSupport'=>'',
'XID'=>'',
'CAVV'=>'',
'ECI'=>'',
'InternalCardAuth'=>'',
'Pares'=>''
),
"Expires"=>"",
"MethodName"=>"My Visa",
"SecondarySort"=>1
)
),
'CustomData'=>base64_encode(serialize(array("mydata"=>"We could put anything in here!"))),
'CustomFields'=>array(
array('Field'=>'Foo', 'Value'=>'Testing'),
array('Field'=>'Bar', 'Value'=>'Tested')
),
'CustomerID'=>123123 + rand(),
'Description'=>'Weekly Bill',
'Enabled'=>false,
'Amount'=>'44.93',
'Tax'=>'0',
'Next'=>'2012-01-21',
'Notes'=>'Testing the soap addCustomer Function',
'NumLeft'=>'50',
'OrderID'=>rand(),
'ReceiptNote'=>'addCustomer test Created Charge',
'Schedule'=>'weekly',
'SendReceipt'=>true,
'Source'=>'Recurring',
'CustNum'=>'C'.rand()
);
$CustomerNumber=$this->client->addCustomer($this->token,$CustomerObject);
$CustomerObject= $this->client->getCustomer($this->token, $CustomerNumber);
echo $CustomerObject->CustNum;
?>
eBizCharge.CustomerObject customer = new eBizCharge.CustomerObject();
eBizCharge.Address address = new eBizCharge.Address();
address.FirstName = "John";
address.LastName = "Doe";
address.Company = "Acme";
address.Street = "123 main st.";
address.City = "Hollywood";
address.State = "ca";
address.Zip = "91607";
address.Country = "USA";
customer.BillingAddress = address;
customer.Enabled = true;
customer.Amount = 5.00;
customer.Next = "2010-08-15";
customer.Schedule = "monthly";
eBizCharge.PaymentMethod[] payMethod = new eBizCharge.PaymentMethod[1];
payMethod[0] = new eBizCharge.PaymentMethod();
payMethod[0].CardExpiration = "1212";
payMethod[0].CardNumber = "4444555566667779";
payMethod[0].AvsStreet = "123 Main st.";
payMethod[0].AvsZip = "90046";
payMethod[0].MethodName = "My Visa";
customer.PaymentMethods = payMethod;
Updated over 1 year ago