Class ProcessLink
| 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
createCustomerCodeAndProcessACHEFT(array $parameters) : mixed
North America clients only.
arrayAn associative array with the following possible values. 'customerIPAddress' => '' // Optional. The client IP address. 'firstName' => 'Test' // The customer's first name. 'lastName' => 'Account' // The customer's last 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. 'accountNum' => '02100002100000000000000001' // The customer's bank account number. 'accountType' => 'CHECKING' // The customer's bank account type. // Options: CHECKING, SAVING (North America only.) 'invoiceNum' => '00000001' // Optional. The invoice number for this transaction. 'total' => '5' // The total payment amount. 'comment' => 'Process ACH / EFT test.' // Optional. A comment describing this transaction. 'title' => 'string' 'phone' => '1234567890' 'phone2' => '1234567890' 'fax' => '1234567890' 'email' => 'email@example.com' 'country' => 'string' 'item1' => 'string' 'item2' => 'string' 'item3' => 'string' 'item4' => 'string' 'item5' => 'string' 'item6' => 'string'
mixedClient response array or API error.
createCustomerCodeAndProcessCreditCard(array $parameters) : mixed
arrayAn associative array with the following possible values. 'customerIPAddress' => '' // Optional. The client IP address. 'invoiceNum' => '00000001' // Optional. The invoice number for this transaction. 'ccNum' => '4222222222222220' // The customer's credit card number. 'ccExp' => '12/17' // The customer's credit card expiration date. 'firstName' => 'Test' // The customer's first name. 'lastName' => 'Account' // The customer's last 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. 'cvv2' => '000' // Optional. The customer's credit card CVV2 code. 'total' => '5' // The total payment amount. 'comment' => 'string' 'title' => 'string' 'phone' => '1234567890' 'phone2' => '1234567890' 'fax' => '1234567890' 'email' => 'email@example.com' 'country' => 'string' 'item1' => 'string' 'item2' => 'string' 'item3' => 'string' 'item4' => 'string' 'item5' => 'string' 'item6' => 'string'
mixedClient response array or API error.
getBatchProcessResultFile(array $parameters) : mixed
arrayAn associative array with the following possible values. 'customerIPAddress' => '' // Optional. The client IP address. 'batchId' => '1' // The ID of the existing iATS batch process.
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
processACHEFT(array $parameters) : mixed
North America clients only.
arrayAn associative array with the following possible values. 'customerIPAddress' => '' // Optional. The client IP address. 'invoiceNum' => '00000001' // Optional. The invoice number for this transaction. 'accountNum' => '02100002100000000000000001' // The customer's bank account number. 'accountType' => 'CHECKING' // The customer's bank account type. // Options: CHECKING, SAVING (North America only.) 'firstName' => 'Test' // Optional. The customer's first name. 'lastName' => 'Account' // Optional. The customer's last 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. 'total' => '5' // The total payment amount. 'comment' => 'Process ACH / EFT test.' // Optional. A comment describing this transaction. 'title' => 'string' 'phone' => '1234567890' 'phone2' => '1234567890' 'fax' => '1234567890' 'email' => 'email@example.com' 'country' => 'string' 'item1' => 'string' 'item2' => 'string' 'item3' => 'string' 'item4' => 'string' 'item5' => 'string' 'item6' => 'string'
mixedClient response array or API error.
processACHEFTChargeBatch(array $parameters) : mixed
North America clients only.
arrayAn associative array with the following possible values. 'customerIPAddress' => '' // Optional. The client IP address. 'batchFile' => {base64Binary file} // CSV file encoded using base64_encode. // File format without Customer Codes: // Invoice #, First Name, Last Name, Account Type, Account # (no spaces or dashes), Amount (no $), Comment // File format with Customer Codes: // Invoice #, Customer Code, Amount, Comment
mixedClient response array or API error.
processACHEFTRefundBatch(array $parameters) : mixed
North America clients only.
arrayAn associative array with the following possible values. 'customerIPAddress' => '' // Optional. The client IP address. 'batchFile' => {base64Binary file} // CSV file encoded using base64_encode. // File format without Customer Codes: // Invoice #, First Name, Last Name, Account Type, Account # (no spaces or dashes), Amount (no $), Comment // File format with Customer Codes: // Invoice #, Customer Code, Amount, Comment
mixedClient response array or API error.
processACHEFTRefundWithTransactionId(array $parameters) : mixed
Partial refunds are valid. North America clients only.
arrayAn associative array with the following possible values. 'customerIPAddress' => '' // Optional. The client IP address. 'transactionId' => '0000001' // The ID of the transaction to refund. 'total' => '-10' // The amount to refund. Must be a negative number. 'comment' => 'ACH / EFT refund test.' // Optional. A comment describing this transaction.
mixedClient response array or API error.
processACHEFTWithCustomerCode(array $parameters) : mixed
North America clients only.
| endcode |
|---|
arrayAn associative array with the following possible values. 'customerIPAddress' => '' // Optional. The client's IP address. 'customerCode' => '' // The iATS Customer Code. 'invoiceNum' => '00000001' // Optional. The invoice number for this transaction. 'total' => '5' // The total payment amount. 'comment' => 'Process ACH / EFT test.' // Optional. A comment describing this transaction. 'item1' => 'string' 'item2' => 'string' 'item3' => 'string' 'item4' => 'string' 'item5' => 'string' 'item6' => 'string'
mixedClient response array or API error.
processCreditCard(array $parameters) : mixed
arrayAn associative array with the following possible values. 'customerIPAddress' => '' // Optional. The client's IP address. 'invoiceNum' => '00000001' // Optional. The invoice number for this transaction. 'creditCardNum' => '4222222222222220' // The customer's credit card number. 'creditCardExpiry' => '12/17' // The customer's credit card expiration date. MM/YY. 'cvv2' => '000' // The customer's credit card CVV2 code. 'mop' => 'VISA' // The customer's method of payment. // North America options: VISA, MC, AMX, DSC // UK options: VISA, MC, AMX, MAESTR 'firstName' => 'Test' // The customer's first name. 'lastName' => 'Account' // The customer's last 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. 'total' => '5' // The total payment amount. 'comment' => 'Process credit card test.' // Optional. A comment describing this transaction. 'title' => 'string' 'phone' => '1234567890' 'phone2' => '1234567890' 'fax' => '1234567890' 'email' => 'email@example.com' 'country' => 'string' 'item1' => 'string' 'item2' => 'string' 'item3' => 'string' 'item4' => 'string' 'item5' => 'string' 'item6' => 'string'
mixedClient response array or API error.
processCreditCardBatch(array $parameters) : mixed
arrayAn associative array with the following possible values. 'customerIPAddress' => '' // Optional. The client's IP address. 'batchFile' => {base64Binary file} // CSV file encoded using base64_encode. // File format without Customer Codes for US and UK clients: // Date, Invoice #, First Name, Last Name, Street, City, State, Zip Code, Amount, MOP, Credit Card #, Expiry // File format without Customer Codes for Canadian clients: // Date, Invoice #, Full Name, Amount, MOP, Credit Card #, Expiry // File format with Customer Codes: // Invoice #, Customer Code, Amount, Comment
mixedClient response array or API error.
processCreditCardRefundWithTransactionId(array $parameters) : mixed
Partial refunds are valid.
arrayAn associative array with the following possible values. 'customerIPAddress' => '' // Optional. The client's IP address. 'transactionId' => '0000001' // The ID of the transaction to refund. 'total' => '-10' // The total amount to refund. Must be a negative number. 'comment' => 'Credit card refund test.' // Optional. A comment describing this transaction.
mixedClient response array or API error.
processCreditCardWithCustomerCode(array $parameters) : mixed
arrayAn associative array with the following possible values. 'customerIPAddress' => '' // Optional. The client's IP address. 'customerCode' => '' // The iATS Customer Code. 'invoiceNum' => '00000001' // Optional. The invoice number for this transaction. 'cvv2' => '000' // Optional. The customer's credit card CVV2 code. 'total' => '5' // The total payment amount. 'comment' => 'Process credit card test with Customer Code.' // Optional. A comment describing this transaction. 'item1' => 'string' 'item2' => 'string' 'item3' => 'string' 'item4' => 'string' 'item5' => 'string' 'item6' => 'string'
mixedClient response array or API error.
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
objectSOAP response.
stringAPI result name.
mixedRestriction, error or API result.
setServer(string $serverid)
| throws | |
|---|---|
stringServer identifier ('UK' or 'NA'.)
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