Class CustomerLink
| package |
iATS |
|---|
__construct(string $agentcode, string $password, string $serverid = 'NA')
| see |
\iATS\Core::setServer()
For options |
|---|---|
stringiATS account agent code.
stringiATS account password.
stringServer identifier. (Defaults to 'NA')
apiCall(string $method, array $parameters) : object
| throws |
|---|
stringThe name of the method to call.
arrayParameters to pass the API.
objectXML object or boolean.
checkMOPCurrencyRestrictions(string $serverid, string $currency, string $mop) : boolean
stringServer identifier
stringCurrency
stringMethod of Payment
booleanResult of check
checkRestrictions(array $parameters, boolean $forceCurrencyCheck = FALSE) : boolean|string
arrayRequest parameters.
booleanTrue to force a currency check even when currency or method of payment are missing.
boolean|stringFALSE if no restrictions. Message if restricted.
checkServerRestrictions(string $serverid, array $restrictedservers) : boolean
stringServer identifier
arrayRestricted servers array
booleanResult of server restricted check
createACHEFTCustomerCode(array $parameters) : mixed
arrayAn 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'
mixedClient response array or API error.
createCreditCardCustomerCode(array $parameters) : mixed
arrayAn 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'
mixedClient response array or API error.
deleteCustomerCode(array $parameters) : mixed
arrayAn associative array with the following possible values. 'customerIPAddress' => '' // Optional. The client IP address. 'customerCode' => '' // The iATS Customer Code.
mixedClient response array or API error.
getCustomerCodeDetail(array $parameters) : mixed
arrayAn associative array with the following possible values. 'customerIPAddress' => '' // Optional. The client IP address. 'customerCode' => 'A10396688' // The iATS Customer Code.
mixedClient response array or API error.
getCustomerListByCreationTimeCSV(array $parameters) : mixed
arrayAn 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
mixedClient response array or API error.
getCustomerListByCreationTimeXML(array $parameters) : mixed
arrayAn 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
mixedClient response array or API error.
getFormattedDate(integer $timestamp) : string
integerThe timestamp to convert.
stringThe formatted date string.
getMOPCurrencyMatrix() : array
arrayArray of Server/Currency/MOP
getSoapClient(string $endpoint, array $options = array()) : \SoapClient
stringService endpoint
\SoapClientReturns IATS SoapClient object
rejectMessage(integer $reject_code) : array
integeriATS rejection code.
arrayRejection code and message as in array in the format: [ 'code' => 19, 'message' => 'Incorrect CVV2 security code', ]
responseHandler(object $response, string $result_name) : mixed
objectRestriction, error or API result.
stringAPI result name.
mixedRestriction, error or API result.
setServer(string $serverid)
| throws | |
|---|---|
stringServer identifier ('UK' or 'NA'.)
updateACHEFTCustomerCode(array $parameters) : mixed
arrayAn 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'
mixedClient response array or API error.
updateCreditCardCustomerCode(array $parameters) : mixed
arrayAn 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'
mixedClient response array or API error.
xml2array(string $xmlstring) : array
stringAn XML string to be processed.
arrayArray.
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