Class ProcessLink
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
createCustomerCodeAndProcessACHEFT(array $parameters) : mixed
North America clients only.
array
An 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'
mixed
Client response array or API error.
createCustomerCodeAndProcessCreditCard(array $parameters) : mixed
array
An 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'
mixed
Client response array or API error.
getBatchProcessResultFile(array $parameters) : mixed
array
An associative array with the following possible values. 'customerIPAddress' => '' // Optional. The client IP address. 'batchId' => '1' // The ID of the existing iATS batch process.
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
processACHEFT(array $parameters) : mixed
North America clients only.
array
An 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'
mixed
Client response array or API error.
processACHEFTChargeBatch(array $parameters) : mixed
North America clients only.
array
An 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
mixed
Client response array or API error.
processACHEFTRefundBatch(array $parameters) : mixed
North America clients only.
array
An 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
mixed
Client response array or API error.
processACHEFTRefundWithTransactionId(array $parameters) : mixed
Partial refunds are valid. North America clients only.
array
An 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.
mixed
Client response array or API error.
processACHEFTWithCustomerCode(array $parameters) : mixed
North America clients only.
endcode |
---|
array
An 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'
mixed
Client response array or API error.
processCreditCard(array $parameters) : mixed
array
An 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'
mixed
Client response array or API error.
processCreditCardBatch(array $parameters) : mixed
array
An 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
mixed
Client response array or API error.
processCreditCardRefundWithTransactionId(array $parameters) : mixed
Partial refunds are valid.
array
An 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.
mixed
Client response array or API error.
processCreditCardWithCustomerCode(array $parameters) : mixed
array
An 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'
mixed
Client response array or API error.
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
SOAP response.
string
API result name.
mixed
Restriction, error or API result.
setServer(string $serverid)
throws | |
---|---|
string
Server identifier ('UK' or 'NA'.)
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