Class CustomerLink
package |
iATS |
---|
__construct(string $agentcode, string $password, string $serverid = 'NA')
see |
\iATS\Core::setServer()
For options |
---|---|
string
iATS account agent code.
string
iATS account password.
string
Server identifier. (Defaults to 'NA')
apiCall(string $method, array $parameters) : object
throws |
---|
string
The name of the method to call.
array
Parameters to pass the API.
object
XML object or boolean.
checkMOPCurrencyRestrictions(string $serverid, string $currency, string $mop) : boolean
string
Server identifier
string
Currency
string
Method of Payment
boolean
Result of check
checkRestrictions(array $parameters, boolean $forceCurrencyCheck = FALSE) : boolean|string
array
Request parameters.
boolean
True to force a currency check even when currency or method of payment are missing.
boolean|string
FALSE if no restrictions. Message if restricted.
checkServerRestrictions(string $serverid, array $restrictedservers) : boolean
string
Server identifier
array
Restricted servers array
boolean
Result of server restricted check
createACHEFTCustomerCode(array $parameters) : mixed
array
An associative array with the following possible values. 'customerIPAddress' => '' // Optional. The client IP address. 'customerCode' => '' // Optional. The iATS Customer Code. 'firstName' => 'Test' // The customer's first name. 'lastName' => 'Account' // The customer's last name. 'companyName' => 'Test Co.' // Optional. The customer's company name. 'address' => '1234 Any Street' // The customer's address. 'city' => 'Schenectady' // The customer's city. 'state' => 'NY' // The customer's state or province. 'zipCode' => '12345' // The customer's ZIP code. 'phone' => '555-555-1234' // Optional. The customer's phone number. 'fax' => '555-555-4321' // Optional. The customer's FAX number. 'alternatePhone' => '555-555-5555' // Optional. The customer's alternate phone number. 'email' => 'email@test.co' // Optional. The customer's email address. 'comment' => 'Customer code creation test.' // Optional. A comment describing this transaction. 'recurring' => FALSE // Optional. TRUE if a recurring payment should be created. 'amount' => '5' // Optional. The payment amount. 'beginDate' => '2014-07-23T00:00:00+00:00' // Optional. The begin date of the recurring payment, if used. 'endDate' => '2024-07-23T23:59:59+00:00' // Optional. The end date of the recurring payment, if used. 'scheduleType' => 'Annually' // Optional. The recurring payment schedule. // Options: Weekly, Monthly Quarterly, Annually. 'scheduleDate' => '' // Optional. The recurring payment schedule date. // Options: Monthly: 1-28,29,30 or 31; Weekly: 1-7; Quarterly or Annually: empty string. 'accountCustomerName' => 'Test Account' // Optional. The customer's name as appears on the bank account. 'accountNum' => '999999999' // Optional. The customer's bank account number. 'accountType' => 'CHECKING' // Optional. The customer's bank account type. // Options: CHECKING, SAVING (North America only.) 'title' => 'string' 'country' => 'string' 'item1' => 'string' 'item2' => 'string' 'item3' => 'string' 'item4' => 'string' 'item5' => 'string' 'item6' => 'string'
mixed
Client response array or API error.
createCreditCardCustomerCode(array $parameters) : mixed
array
An associative array with the following possible values. 'customerIPAddress' => '' // The client IP address. 'customerCode' => '' // Optional. The iATS Customer Code. 'firstName' => 'Test' // The customer's first name. 'lastName' => 'Account' // The customer's last name. 'companyName' => 'Test Co.' // The customer's company name. 'address' => '1234 Any Street' // The customer's address. 'city' => 'Schenectady' // The customer's city. 'state' => 'NY' // The customer's state or province. 'zipCode' => '12345' // The customer's ZIP code. 'phone' => '555-555-1234' // The customer's phone number. 'fax' => '555-555-4321' // The customer's FAX number. 'alternatePhone' => '555-555-5555' // The customer's alternate phone number. 'email' => 'email@test.co' // The customer's email address. 'comment' => 'Customer code creation test.' // A comment describing this transaction. 'recurring' => FALSE // TRUE if a recurring payment should be created. 'amount' => '5' // The payment amount. 'beginDate' => '2014-07-23T00:00:00+00:00' // The begin date of the recurring payment, if used. 'endDate' => '2024-07-23T23:59:59+00:00' // The end date of the recurring payment, if used. 'scheduleType' => 'Annually' // The recurring payment schedule. // Options: Weekly, Monthly, Quarterly, Annually. 'scheduleDate' => '' // The recurring payment schedule date. // Options: Monthly: 1-28,29,30 or 31; Weekly: 1-7; Quarterly or Annually: empty string. 'creditCardCustomerName' => 'Test Account' // The customer's name as appears on the credit card. 'creditCardNum' => '4222222222222220' // The customer's credit card number. 'creditCardExpiry' => '12/17' // The customer's credit card expiration date. 'mop' => 'VISA' // Optional. The customer's method of payment. 'title' => 'string' 'country' => 'string' 'item1' => 'string' 'item2' => 'string' 'item3' => 'string' 'item4' => 'string' 'item5' => 'string' 'item6' => 'string'
mixed
Client response array or API error.
deleteCustomerCode(array $parameters) : mixed
array
An associative array with the following possible values. 'customerIPAddress' => '' // Optional. The client IP address. 'customerCode' => '' // The iATS Customer Code.
mixed
Client response array or API error.
getCustomerCodeDetail(array $parameters) : mixed
array
An associative array with the following possible values. 'customerIPAddress' => '' // Optional. The client IP address. 'customerCode' => 'A10396688' // The iATS Customer Code.
mixed
Client response array or API error.
getCustomerListByCreationTimeCSV(array $parameters) : mixed
array
An associative array with the following possible values. 'customerIPAddress' => '' // Optional. The client IP address. 'customerCode' => 'A10396688' // The iATS Customer Code. 'fromDate => '2014-07-23T00:00:00+00:00' // Customer creation start date 'toDate' => '2024-07-23T23:59:59+00:00' // Customer creation to date
mixed
Client response array or API error.
getCustomerListByCreationTimeXML(array $parameters) : mixed
array
An associative array with the following possible values. 'customerIPAddress' => '' // Optional. The client IP address. 'customerCode' => 'A10396688' // The iATS Customer Code. 'fromDate => '2014-07-23T00:00:00+00:00' // Customer creation start date 'toDate' => '2024-07-23T23:59:59+00:00' // Customer creation to date
mixed
Client response array or API error.
getFormattedDate(integer $timestamp) : string
integer
The timestamp to convert.
string
The formatted date string.
getMOPCurrencyMatrix() : array
array
Array of Server/Currency/MOP
getSoapClient(string $endpoint, array $options = array()) : \SoapClient
string
Service endpoint
\SoapClient
Returns IATS SoapClient object
rejectMessage(integer $reject_code) : array
integer
iATS rejection code.
array
Rejection code and message as in array in the format: [ 'code' => 19, 'message' => 'Incorrect CVV2 security code', ]
responseHandler(object $response, string $result_name) : mixed
object
Restriction, error or API result.
string
API result name.
mixed
Restriction, error or API result.
setServer(string $serverid)
throws | |
---|---|
string
Server identifier ('UK' or 'NA'.)
updateACHEFTCustomerCode(array $parameters) : mixed
array
An associative array with the following possible values. 'customerIPAddress' => '' // Optional. The client IP address. 'customerCode' => '' // The iATS Customer Code. 'firstName' => 'Test' // Optional. The customer's first name. 'lastName' => 'Account' // Optional. The customer's last name. 'companyName' => 'Test Co.' // Optional. The customer's company name. 'address' => '1234 Any Street' // Optional. The customer's address. 'city' => 'Schenectady' // Optional. The customer's city. 'state' => 'NY' // Optional. The customer's state or province. 'zipCode' => '12345' // Optional. The customer's ZIP code. 'phone' => '555-555-1234' // Optional. The customer's phone number. 'fax' => '555-555-4321' // Optional. The customer's FAX number. 'alternatePhone' => '555-555-5555' // Optional. The customer's alternate phone number. 'email' => 'email@test.co' // Optional. The customer's email address. 'comment' => 'Customer code creation test.' // Optional. A comment describing this transaction. 'recurring' => FALSE // Optional. TRUE if a recurring payment should be created. 'amount' => '5' // Optional. The payment amount. 'beginDate' => '2014-07-23T00:00:00+00:00' // Optional. The begin date of the recurring payment, if used. 'endDate' => '2024-07-23T23:59:59+00:00' // Optional. The end date of the recurring payment, if used. 'scheduleType' => 'Annually' // Optional. The recurring payment schedule. // Options: Weekly, Monthly Quarterly, Annually. 'scheduleDate' => '' // Optional. The recurring payment schedule date. // Options: Monthly: 1-28,29,30 or 31; Weekly: 1-7; Quarterly or Annually: empty string. 'accountCustomerName' => 'Test Account' // Optional. The customer's name as appears on the bank account. 'accountNum' => '999999999' // Optional. The customer's bank account number. 'accountType' => 'CHECKING' // Optional. The customer's bank account type. // Options: CHECKING, SAVING (North America only.) 'updateAccountNum' => FALSE // Optional. True if the customer's account number should be updated. 'title' => 'string' 'country' => 'string' 'item1' => 'string' 'item2' => 'string' 'item3' => 'string' 'item4' => 'string' 'item5' => 'string' 'item6' => 'string'
mixed
Client response array or API error.
updateCreditCardCustomerCode(array $parameters) : mixed
array
An associative array with the following possible values. 'customerIPAddress' => '' // Optional. The client IP address. 'customerCode' => '' // The iATS Customer Code. 'firstName' => 'Test' // Optional. The customer's first name. 'lastName' => 'Account' // Optional. The customer's last name. 'companyName' => 'Test Co.' // Optional. The customer's company name. 'address' => '1234 Any Street' // Optional. The customer's address. 'city' => 'Schenectady' // Optional. The customer's city. 'state' => 'NY' // Optional. The customer's state or province. 'zipCode' => '12345' // Optional. The customer's ZIP code. 'phone' => '555-555-1234' // Optional. Optional. The customer's phone number. 'fax' => '555-555-4321' // Optional. The customer's FAX number. 'alternatePhone' => '555-555-5555' // Optional. The customer's alternate phone number. 'email' => 'email@test.co' // Optional. The customer's email address. 'comment' => 'Customer code creation test.' // Optional. A comment describing this transaction. 'recurring' => FALSE // Optional. TRUE if a recurring payment should be created. 'amount' => '5' // Optional. The payment amount. 'beginDate' => '2014-07-23T00:00:00+00:00' // Optional. The begin date of the recurring payment, if used. 'endDate' => '2024-07-23T23:59:59+00:00' // Optional. The end date of the recurring payment, if used. 'scheduleType' => 'Annually' // Optional. The recurring payment schedule. // Options: Weekly, Monthly, Quarterly, Annually. 'scheduleDate' => '' // Optional. The recurring payment schedule date. // Options: Monthly: 1-28,29,30 or 31; Weekly: 1-7; Quarterly or Annually: empty string. 'creditCardCustomerName' => 'Test Account' // Optional. The customer's name as appears on the credit card. 'creditCardNum' => '4222222222222220' // Optional. The customer's credit card number. 'creditCardExpiry' => '12/17' // Optional. The customer's credit card expiration date. 'mop' => 'VISA' // Optional. The customer's method of payment. 'updateCreditCardNum' => FALSE // Optional. TRUE when the customer's credit card number should be updated. 'title' => 'string' 'country' => 'string' 'item1' => 'string' 'item2' => 'string' 'item3' => 'string' 'item4' => 'string' 'item5' => 'string' 'item6' => 'string'
mixed
Client response array or API error.
xml2array(string $xmlstring) : array
string
An XML string to be processed.
array
Array.
na_server : string
var |
North America server url. |
---|
string
uk_server : string
var |
UK server url. |
---|
string
agentcode : string
var |
iATS account agent code. |
---|
string
password : string
var |
iATS account password. |
---|
string
serverid : string
var |
Server identifier. @see Core::setServer() |
---|
string
server : string
var |
Server url. |
---|
string
endpoint : string
var |
Service endpoint |
---|
string
params : string
var |
Requrest parameters |
---|
string
resultname : string
var |
The result name |
---|
string
format : string
var |
Format |
---|
string
restrictedservers : array
var |
Restricted servers array |
---|
array