API Docs
The following optional operations can be implemented based on the the specific requirements of the application:
Optional Operations | |
Acknowledge (BCP only) | QueryAccount (BCP/PIN Debit only, ECK, SVA) |
Disburse (BCP only) | RequestTransaction (BCP only) |
ManageAccount/ManageAccountById (SVA only) | Verify (BCP/Credit only) |
Note: Despite being optional operations, the boolean value indicating support for the Acknowledge, and RequestTransaction operations will not be returned in ServiceInformation.Operations.
Important! All parameters in each operation are considered “required” unless otherwise noted.
The Acknowledge operation is used to mark a transaction as “acknowledged” after receiving a successful transaction response. This acknowledgement is useful when performing transaction management functions, such as those provided by the Transaction Management Service API.
Once a successful transaction processing response has been received, the Acknowledge operation can be called to set an IsAcknowledged flag to “true” in the transaction database for a specific transactionId. In the event that a transaction response is not received, specific Transaction Management operations can be called to query the transaction database for transactions that have the IsAcknowledged flag set to “false”. This is helpful when troubleshooting the reason for a failed transaction.
For more information about transaction reporting and the Transaction Management Service API, refer to the Transaction Management Service Developer’s Guide.
Response Acknowledge(string sessionToken, string transactionId, string applicationProfileId, string workflowId);
Parameter | Data Type | Description |
sessionToken | String | The short-lived token used to authenticate to CWS. |
transactionId | String | The transactionId to acknowledge. |
applicationProfileId | String | A token representing the PTLS Socket ID unique to each Service Key and configuration data combination. Returned by the SaveApplicationData operation. |
workflowId | String | Identifies the workflow to use for the transaction. If not supporting custom workflows, pass the servideId returned by GetServiceInformation. |
Data Type | Description |
Response | Transaction response data. Note: For Bankcard (BCP) transactions, the response object is BankcardTransactionResponsePro. For Electronic Checking (ECK) transactions, the response object is ElectronicCheckingTransactionResponse. For Stored Value Account (SVA) transactions, the response object is StoredValueTransactionResponse. |
CWSFault | CWSInvalidOperationFault |
AuthenticationFault | CWSInvalidServiceInformationFault |
ExpiredTokenFault | CWSOperationNotSupportedFault |
InvalidTokenFault | CWSTransactionAlreadySettledFault |
CWSConnectionFault | CWSTransactionFailedFault |
CWSExtendedDataNotSupportedFault | CWSTransactionServiceUnavailableFault |
CWSInvalidMessageFormatFault | CWSValidationResultFault |
For additional details about each fault, refer to Transaction Processing Faults in the CWS Developer API Reference.
Note: The HTTP Authorization Header must contain the required sessionToken value.
URL | https://api.cert.nabcommerce.com/REST/2.0.18/Txn/{workflowId} |
UMP URL | https://api.cert.nabcommerce.com/REST/2.0.18UMP/Txn/{workflowId} |
Action | PUT |
Parameter | Data Type | Description |
workflowId | String | Identifies the workflow to use for the transaction. If not supporting custom workflows, pass the servideId returned by GetServiceInformation. |
transactionId | String | The transaction ID to acknowledge. |
Data Type | Description |
Rest.Acknowledge | The message body containing transaction data. |
Data Type | Description |
Response | Transaction response data. Note: For Bankcard (BCP) transactions, the response object is BankcardTransactionResponsePro. For Electronic Checking (ECK) transactions, the response object is ElectronicCheckingTransactionResponse. For Stored Value Account (SVA) transactions, the response object is StoredValueTransactionResponse. |
CWSFault | CWSInvalidOperationFault |
AuthenticationFault | CWSInvalidServiceInformationFault |
ExpiredTokenFault | CWSOperationNotSupportedFault |
InvalidTokenFault | CWSTransactionAlreadySettledFault |
CWSConnectionFault | CWSTransactionFailedFault |
CWSExtendedDataNotSupportedFault | CWSTransactionServiceUnavailableFault |
CWSInvalidMessageFormatFault | CWSValidationResultFault |
For additional details about each fault, refer to Transaction Processing Faults in the CWS Developer API Reference.
The ManageAccount operation is used to activate, reload, deactivate an account or to transfer the balance from another card.
Response ManageAccount(string sessionToken, Manage differenceData, string applicationProfileId, MerchantProfile merchantProfile, string merchantProfileId, string workflowId);
Parameter | Data Type | Description |
sessionToken | String | The short-lived token used to authenticate to CWS. |
transaction | Transaction | Contains information necessary to update an account. |
applicationProfileId | String | A token representing the PTLS Socket ID unique to each Service Key and configuration data combination. Returned by the SaveApplicationData operation. |
merchantProfile | MerchantProfile | Conditional. The specific Merchant Profile to include in the transaction request. Required only if supporting Unmanaged Merchant Profiles (UMP). |
merchantProfileId | String | The specific Merchant Profile Identifier to use. |
workflowId | String | Identifies the workflow to use for the transaction. If not supporting custom workflows, pass the servideId returned by GetServiceInformation. |
Data Type | Description |
Response | Transaction response data. Note: For Bankcard (BCP) transactions, the response object is BankcardTransactionResponsePro. For Electronic Checking (ECK) transactions, the response object is ElectronicCheckingTransactionResponse. For Stored Value Account (SVA) transactions, the response object is StoredValueTransactionResponse. |
CWSFault | CWSInvalidOperationFault |
AuthenticationFault | CWSInvalidServiceInformationFault |
ExpiredTokenFault | CWSOperationNotSupportedFault |
InvalidTokenFault | CWSTransactionAlreadySettledFault |
CWSConnectionFault | CWSTransactionFailedFault |
CWSExtendedDataNotSupportedFault | CWSTransactionServiceUnavailableFault |
CWSInvalidMessageFormatFault | CWSValidationResultFault |
For additional details about each fault, refer to Transaction Processing Faults in the CWS Developer API Reference.
Note: The HTTP Authorization Header must contain the required sessionToken value.
URL | https://api.cert.nabcommerce.com/REST/2.0.18/Txn/{workflowId}/manageAccount |
UMP URL | https://api.cert.nabcommerce.com/REST/2.0.18UMP/Txn/{workflowId}/manageAccount |
Action | PUT |
Parameter | Data Type | Description |
workflowId | String | Identifies the workflow to use for the transaction. If not supporting custom workflows, pass the servideId returned by GetServiceInformation. |
Data Type | Description |
Rest.ManageAccount | The message body containing transaction data. |
Rest.ManageAccountWithProfile | The message body containing transaction data and complete MerchantProfile required by UMP implementations. |
Data Type | Description |
Response | Transaction response data. Note: For Bankcard (BCP) transactions, the response object is BankcardTransactionResponsePro. For Electronic Checking (ECK) transactions, the response object is ElectronicCheckingTransactionResponse. For Stored Value Account (SVA) transactions, the response object is StoredValueTransactionResponse. |
CWSFault | CWSInvalidOperationFault |
AuthenticationFault | CWSInvalidServiceInformationFault |
ExpiredTokenFault | CWSOperationNotSupportedFault |
InvalidTokenFault | CWSTransactionAlreadySettledFault |
CWSConnectionFault | CWSTransactionFailedFault |
CWSExtendedDataNotSupportedFault | CWSTransactionServiceUnavailableFault |
CWSInvalidMessageFormatFault | CWSValidationResultFault |
For additional details about each fault, refer to Transaction Processing Faults in the CWS Developer API Reference.
The ManageAccountById operation is used to update an existing account.
Response ManageAccountById(string sessionToken, Manage differenceData, string applicationProfileId, MerchantProfile merchantProfile, string merchantProfileId, string workflowId);
Parameter | Data Type | Description |
sessionToken | String | The short-lived token used to authenticate to CWS. |
differenceData | Manage | Contains information necessary to update an account. |
applicationProfileId | String | A token representing the PTLS Socket ID unique to each Service Key and configuration data combination. Returned by the SaveApplicationData operation. |
workflowId | String | Identifies the workflow to use for the transaction. If not supporting custom workflows, pass the servideId returned by GetServiceInformation. |
Data Type | Description |
Response | Transaction response data. Note: For Bankcard (BCP) transactions, the response object is BankcardTransactionResponsePro. For Electronic Checking (ECK) transactions, the response object is ElectronicCheckingTransactionResponse. For Stored Value Account (SVA) transactions, the response object is StoredValueTransactionResponse. |
CWSFault | CWSInvalidOperationFault |
AuthenticationFault | CWSInvalidServiceInformationFault |
ExpiredTokenFault | CWSOperationNotSupportedFault |
InvalidTokenFault | CWSTransactionAlreadySettledFault |
CWSConnectionFault | CWSTransactionFailedFault |
CWSExtendedDataNotSupportedFault | CWSTransactionServiceUnavailableFault |
CWSInvalidMessageFormatFault | CWSValidationResultFault |
For additional details about each fault, refer to Transaction Processing Faults in the CWS Developer API Reference.
Note: The HTTP Authorization Header must contain the required sessionToken value.
URL | https://api.cert.nabcommerce.com/REST/2.0.18/Txn/{workflowId} |
UMP URL | https://api.cert.nabcommerce.com/REST/2.0.18UMP/Txn/{workflowId} |
Action | PUT |
Parameter | Data Type | Description |
workflowId | String | Identifies the workflow to use for the transaction. If not supporting custom workflows, pass the servideId returned by GetServiceInformation. |
Data Type | Description |
Rest.ManageAccountById | The message body containing transaction data. |
Data Type | Description |
Response | Transaction response data. Note: For Bankcard (BCP) transactions, the response object is BankcardTransactionResponsePro. For Electronic Checking (ECK) transactions, the response object is ElectronicCheckingTransactionResponse. For Stored Value Account (SVA) transactions, the response object is StoredValueTransactionResponse. |
CWSFault | CWSInvalidOperationFault |
AuthenticationFault | CWSInvalidServiceInformationFault |
ExpiredTokenFault | CWSOperationNotSupportedFault |
InvalidTokenFault | CWSTransactionAlreadySettledFault |
CWSConnectionFault | CWSTransactionFailedFault |
CWSExtendedDataNotSupportedFault | CWSTransactionServiceUnavailableFault |
CWSInvalidMessageFormatFault | CWSValidationResultFault |
For additional details about each fault, refer to Transaction Processing Faults in the CWS Developer API Reference.
The QueryAccount operation is used to perform a balance inquiry on a cardholder’s account to determine the current account balance. It can also be used to perform a balance invon pre-paid credit cards.
Note: The QueryAccount operation is specific to PIN Debit and pre-paid credit card balance inquiries only, based on service provider support.
Response QueryAccount(string sessionToken, Transaction transaction, string applicationProfileId, MerchantProfile merchantProfile, string merchantProfileId, string workflowId);
Parameter | Data Type | Description |
sessionToken | String | The short-lived token used to authenticate to CWS. |
transaction | Transaction | Transaction detail data. |
applicationProfileId | String | A token representing the PTLS Socket ID unique to each Service Key and configuration data combination. Returned by the SaveApplicationData operation. |
merchantProfile | MerchantProfile | Conditional. The specific Merchant Profile to include in the transaction request. Required only if supporting Unmanaged Merchant Profiles (UMP). |
merchantProfileId | String | The specific Merchant Profile Identifier to use. |
workflowId | String | Identifies the workflow to use for the transaction. If not supporting custom workflows, pass the servideId returned by GetServiceInformation. |
Data Type | Description |
Response | Transaction response data. Note: For Bankcard (BCP) transactions, the response object is BankcardTransactionResponsePro. For Electronic Checking (ECK) transactions, the response object is ElectronicCheckingTransactionResponse. For Stored Value Account (SVA) transactions, the response object is StoredValueTransactionResponse. |
CWSFault | CWSInvalidOperationFault |
AuthenticationFault | CWSInvalidServiceInformationFault |
ExpiredTokenFault | CWSOperationNotSupportedFault |
InvalidTokenFault | CWSTransactionAlreadySettledFault |
CWSConnectionFault | CWSTransactionFailedFault |
CWSExtendedDataNotSupportedFault | CWSTransactionServiceUnavailableFault |
CWSInvalidMessageFormatFault | CWSValidationResultFault |
For additional details about each fault, refer to Transaction Processing Faults in the CWS Developer API Reference.
/* $credit_info is class type creditCard
* $trans_info is class type transData
* $amount and $tip_amount: ('#.##'} (At least $1, two decimals required (1.00))*/
public function queryAccount($ach_info, $trans_info)
{
if (! $this->signOn ())
return false;
$ach_trans = buildACHTransaction($ach_info, $trans_info);
// Build QueryAccount
$queryAccount = new QueryAccount();
$queryAccount->sessionToken = $this->session_token;
$queryAccount->transaction = $ach_trans;
$queryAccount->merchantProfileId = $this->merchantProfileID;
$queryAccount->workflowId = $this->workflowId;
$queryAccount->applicationProfileId = $this->appProfileID;
try
{
$authResponse = $this->bankCard->QueryAccount( $queryAccount )->QueryAccountResult;
//var_dump($queryAccount);
//echo ($this->bankCard->__getLastRequest ());
//echo ('
' . $this->bankCard->__getLastResponse ());
return $authResponse;
}
catch ( SoapFault $e )
{
echo 'SERVER ERROR: Error trying to Query Account.
';
//var_dump($queryAccount);
//echo('
'.$this->bankCard->__getLastRequestHeaders());
//echo ('
' . $this->bankCard->__getLastRequest ());
//echo ('
' . $this->bankCard->__getLastResponse ());
$xmlFault = $this->bankCard->__getLastResponse ();
$errors = handleTxnFault ( $e, $xmlFault );
echo $errors;
exit ();
}
}
Note: The HTTP Authorization Header must contain the required sessionToken value.
URL | https://api.cert.nabcommerce.com/REST/2.0.18/Txn/{workflowId}/query |
UMP URL | https://api.cert.nabcommerce.com/REST/2.0.18UMP/Txn/{workflowId}/query |
Action | POST |
Parameter | Data Type | Description |
workflowId | String | Identifies the workflow to use for the transaction. If not supporting custom workflows, pass the servideId returned by GetServiceInformation. |
Data Type | Description |
Rest.AuthorizeTransaction | The message body containing transaction data. Note: A QueryAccount request is identical to an Authorize request except it must be a PIN Debit transaction. |
Rest.AuthorizeTransactionWithProfile | The message body containing transaction data and complete MerchantProfile required by UMP implementations. |
Data Type | Description |
Response | Transaction response data. Note: For Bankcard (BCP) transactions, the response object is BankcardTransactionResponsePro. For Electronic Checking (ECK) transactions, the response object is ElectronicCheckingTransactionResponse. For Stored Value Account (SVA) transactions, the response object is StoredValueTransactionResponse. |
CWSFault | CWSInvalidOperationFault |
AuthenticationFault | CWSInvalidServiceInformationFault |
ExpiredTokenFault | CWSOperationNotSupportedFault |
InvalidTokenFault | CWSTransactionAlreadySettledFault |
CWSConnectionFault | CWSTransactionFailedFault |
CWSExtendedDataNotSupportedFault | CWSTransactionServiceUnavailableFault |
CWSInvalidMessageFormatFault | CWSValidationResultFault |
For additional details about each fault, refer to Transaction Processing Faults in the CWS Developer API Reference.
/* $trans_info is class type transData
* $amount and $tip_amount: ('#.##'} (At least $1, two decimals required (1.00))*/
public function queryAccount($ach_info, $trans_info)
{
// INCOMPLETE
}
Response Disburse(string sessionToken, Transaction transaction, string applicationProfileId, MerchantProfile merchantProfile, string merchantProfileId, string workflowId);
Parameter | Data Type | Description |
sessionToken | String | The short-lived token used to authenticate to CWS. |
transaction | Transaction | Transaction detail data. Note: You must send in BankcardTransaction for Bankcard transactions. |
applicationProfileId | String | A token representing the PTLS Socket ID unique to each Service Key and configuration data combination. Returned by the SaveApplicationData operation. |
merchantProfile | MerchantProfile | Conditional. The specific Merchant Profile to include in the disbursement request. Required only if supporting Unmanaged Merchant Profiles (UMP). |
merchantProfileId | String | The specific Merchant Profile Identifier to use. |
workflowId | String | Identifies the workflow to use for the transaction. If not supporting custom workflows, pass the servideId returned by GetServiceInformation. |
Data Type | Description |
Response | Transaction response data. Note: For Bankcard (BCP) transactions, the response object is BankcardTransactionResponsePro. For Electronic Checking (ECK) transactions, the response object is ElectronicCheckingTransactionResponse. For Stored Value Account (SVA) transactions, the response object is StoredValueTransactionResponse. |
CWSFault | CWSInvalidOperationFault |
AuthenticationFault | CWSInvalidServiceInformationFault |
ExpiredTokenFault | CWSOperationNotSupportedFault |
InvalidTokenFault | CWSTransactionAlreadySettledFault |
CWSConnectionFault | CWSTransactionFailedFault |
CWSExtendedDataNotSupportedFault | CWSTransactionServiceUnavailableFault |
CWSInvalidMessageFormatFault | CWSValidationResultFault |
For additional details about each fault, refer to Transaction Processing Faults in the CWS Developer API Reference.
The RequestTransaction operation allows for the retrieval of any transaction matching the supplied tender data. This is useful in situations when the application does not receive a response from CWS indicating the TransactionState.
For more information, refer to Transaction and Capture States in the Transaction Management Developer’s Guide.
List RequestTransaction(string sessionToken, string merchantProfileId, TransactionTenderData tenderData);
Parameter | Data Type | Description |
sessionToken | String | The short-lived token used to authenticate to CWS. |
merchantProfileId | String | The specific Merchant Profile Identifier to use. |
tenderData | TransactionTenderData | The tender data to match. |
Data Type | Description |
List<Response> | Returns one or more transactions that match the supplied tender data. Note: For Bankcard (BCP) transactions, the response object is BankcardTransactionResponsePro. For Electronic Checking (ECK) transactions, the response object is ElectronicCheckingTransactionResponse. For Stored Value Account (SVA) transactions, the response object is StoredValueTransactionResponse. |
CWSFault | CWSInvalidOperationFault |
AuthenticationFault | CWSInvalidServiceInformationFault |
ExpiredTokenFault | CWSOperationNotSupportedFault |
InvalidTokenFault | CWSTransactionAlreadySettledFault |
CWSConnectionFault | CWSTransactionFailedFault |
CWSExtendedDataNotSupportedFault | CWSTransactionServiceUnavailableFault |
CWSInvalidMessageFormatFault | CWSValidationResultFault |
For additional details about each fault, refer to Transaction Processing Faults in the CWS Developer API Reference.
Note: The HTTP Authorization Header must contain the required sessionToken value.
URL | https://api.cert.nabcommerce.com/REST/2.0.18/Txn/{workflowId}/search |
UMP URL | https://api.cert.nabcommerce.com/REST/2.0.18UMP/Txn/{workflowId}/search |
Action | POST |
Parameter | Data Type | Description |
workflowId | String | Identifies the workflow to use for the transaction. If not supporting custom workflows, pass the servideId returned by GetServiceInformation. |
Data Type | Description |
Rest.TransactionRequest | The message body containing the tender data to match. |
Data Type | Description |
List<Response> | Returns one or more transactions that match the supplied tender data. Note: For Bankcard (BCP) transactions, the response object is BankcardTransactionResponsePro. For Electronic Checking (ECK) transactions, the response object is ElectronicCheckingTransactionResponse. For Stored Value Account (SVA) transactions, the response object is StoredValueTransactionResponse. |
CWSFault | CWSInvalidOperationFault |
AuthenticationFault | CWSInvalidServiceInformationFault |
ExpiredTokenFault | CWSOperationNotSupportedFault |
InvalidTokenFault | CWSTransactionAlreadySettledFault |
CWSConnectionFault | CWSTransactionFailedFault |
CWSExtendedDataNotSupportedFault | CWSTransactionServiceUnavailableFault |
CWSInvalidMessageFormatFault | CWSValidationResultFault |
For additional details about each fault, refer to Transaction Processing Faults in the CWS Developer API Reference.
The Verify operation is used to verify information about a payment account, such as address verification data (AVSData) on a credit card account, without reserving any funds.
Note: The Verify operation is specific to Credit transactions only.
Response Verify(string sessionToken, Transaction transaction, string applicationProfileId, MerchantProfile merchantProfile, string merchantProfileId, string workflowId);
Parameter | Data Type | Description |
sessionToken | String | The short-lived token used to authenticate to CWS. |
transaction | Transaction | Transaction detail data. Note: You must send in BankcardTransaction for Bankcard transactions. |
applicationProfileId | String | A token representing the PTLS Socket ID unique to each Service Key and configuration data combination. Returned by the SaveApplicationData operation. |
merchantProfile | MerchantProfile | Conditional. The specific Merchant Profile to include in the transaction request. Required only if supporting Unmanaged Merchant Profiles (UMP). |
merchantProfileId | String | The specific Merchant Profile Identifier to use. |
workflowId | String | Identifies the workflow to use for the transaction. If not supporting custom workflows, pass the servideId returned by GetServiceInformation. |
Data Type | Description |
Response | Transaction response data. Note: For Bankcard (BCP) transactions, the response object is BankcardTransactionResponsePro. For Electronic Checking (ECK) transactions, the response object is ElectronicCheckingTransactionResponse. For Stored Value Account (SVA) transactions, the response object is StoredValueTransactionResponse. |
CWSFault | CWSInvalidOperationFault |
AuthenticationFault | CWSInvalidServiceInformationFault |
ExpiredTokenFault | CWSOperationNotSupportedFault |
InvalidTokenFault | CWSTransactionAlreadySettledFault |
CWSConnectionFault | CWSTransactionFailedFault |
CWSExtendedDataNotSupportedFault | CWSTransactionServiceUnavailableFault |
CWSInvalidMessageFormatFault | CWSValidationResultFault |
For additional details about each fault, refer to Transaction Processing Faults in the CWS Developer API Reference.
<?php
require_once(dirname(__FILE__) . '/ServiceCalls.php');
require_once(dirname(__FILE__) . '/TransactionClasses.php');
require_once(dirname(__FILE__) . '/Client.php');
$cardData = new CardData();
$cardData->PAN = '5100000000000016';
$cardData->Expire = '1215';
$cardData->CardType = 'MasterCard';
$cardData->Track2Data = '36438999910011=10121010134988000010';
$cardSecurityData = new CardSecurityData();
$cardSecurityData->AVSData = new AVSData();
$cardSecurityData->AVSData->CardholderName = 'Joe Blough';
$cardSecurityData->AVSData->City = 'Arcata';
$cardSecurityData->AVSData->PostalCode = '95521';
$cardSecurityData->CVDataProvided = 'NotSet';
$billingAddressData = new AddressInfo();
$billingAddressData->Street1 = '2150 Easy St.';
$billingAddressData->Street2 = 'Apt 200';
$billingAddressData->City = 'Denver';
$billingAddressData->StateProvince = 'CO';
$billingAddressData->PostalCode = '95521';
$billingAddressData->CountryCode = 'USA';
$customerData = new CustomerData();
$customerData->CustomerId = 'custie123';
$customerData->BillingData = new BillingData();
$customerData->BillingData->BusinessName = 'MomCorp';
$customerDataParam = '<ns2:CustomerData xmlns:ns2="http://schemas.ipcommerce.com/CWS/v2.0/Transactions">
<ns2:BillingData>
<ns2:Address>
<ns2:Street1>'.$billingAddressData->Street1.'</ns2:Street1>
<ns2:Street2>'.$billingAddressData->Street1.'</ns2:Street2>
<ns2:City>'.$billingAddressData->City.'</ns2:City>
<ns2:StateProvince>'.$billingAddressData->StateProvince.'</ns2:StateProvince>
<ns2:PostalCode>'.$billingAddressData->PostalCode.'</ns2:PostalCode>
<ns2:CountryCode>'.$billingAddressData->CountryCode.'</ns2:CountryCode>
</ns2:Address>
</ns2:BillingData>
<ns2:CustomerId>'.$customerData->CustomerId.'</ns2:CustomerId>
</ns2:CustomerData>';
$tenderData = new TenderData();
$tenderDataParam = '<ns1:TenderData>
<ns1:CardData>
<ns1:CardType>'. $cardData->CardType .'</ns1:CardType>
<ns1:PAN>'.$cardData->PAN . '</ns1:PAN>
<ns1:Expire>'.$cardData->Expire . '</ns1:Expire>
</ns1:CardData>
<ns1:CardSecurityData>
<ns1:AVSData>
<ns1:CardholderName>'.$cardSecurityData->AVSData->CardholderName.'</ns1:CardholderName>
<ns1:City>'.$cardSecurityData->AVSData->City.'</ns1:City>
<ns1:PostalCode>'.$cardSecurityData->AVSData->PostalCode.'</ns1:PostalCode>
</ns1:AVSData>
</ns1:CardSecurityData>
</ns1:TenderData>';
$dt = date('Y-m-d H:i:s');
$datetime = str_replace (" ", "T", $dt);
$transactionData = new TransactionData();
$transactionData->EntryMode = 'Keyed';
$transactionData->CustomerPresent = 'Ecommerce';
$transactionData->TransactionDateTime = $datetime;
$transactionData->OrderNumber = '123456';
$transactionData->SignatureCaptured = 'false';
$transactionData->Amount = '12.00';
$transactionData->CurrencyCode = 'USD';
$transactionData->EmployeeId = '11';
$transactionDataParam = '<ns1:TransactionData>
<ns1:Amount>'.$transactionData->Amount.'</ns1:Amount>
<ns1:CurrencyCode>'.$transactionData->CurrencyCode.'</ns1:CurrencyCode>
<ns10:TransactionDateTime xmlns:ns10="http://schemas.ipcommerce.com/CWS/v2.0/Transactions">'.$datetime.'</ns10:TransactionDateTime>
<ns1:CustomerPresent>'.$transactionData->CustomerPresent.'</ns1:CustomerPresent>
<ns1:EmployeeId>' . $transactionData->EmployeeId . '</ns1:EmployeeId>
<ns1:EntryMode>'. $transactionData->EntryMode . '</ns1:EntryMode>
<ns1:OrderNumber>' . $transactionData->OrderNumber . '</ns1:OrderNumber>
<ns1:SignatureCaptured>'.$transactionData->SignatureCaptured.'</ns1:SignatureCaptured>
</ns1:TransactionData>';
$transaction = new Transaction();
$transaction->TransactionData = $transactionDataParam;
$transaction->TenderData = $tenderDataParam;
$transactionParam = $tenderDataParam . $transactionDataParam;
$transactionVerify = '<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">'
. '<SOAP-ENV:Body>
<Verify xmlns="http://schemas.ipcommerce.com/CWS/v2.0/TransactionProcessing">
<sessionToken>'.$sessionTokenString.'</sessionToken>
<transaction xmlns:ns1="http://schemas.ipcommerce.com/CWS/v2.0/Transactions/Bankcard" xsi:type="ns1:BankcardTransaction">'
.$customerDataParam
.$tenderDataParam
.$transactionDataParam.
'</transaction>'
.'<applicationProfileId>'.$applicationIdString.'</applicationProfileId>'
.'<merchantProfileId>'.$merchantProfileId.'</merchantProfileId>'
.'<workflowId>'.$serviceId.'</workflowId>'
.'</Verify>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>';
$call = 'Verify';
$xmlRequest = $transactionVerify;
$response = curl_call($xmlRequest, $sessionTokenString, $call);
echo nl2br("<h1>Verify Transaction Results</h1> \r\n
<h3>StatusMessage: " .
Note: The HTTP Authorization Header must contain the required sessionToken value.
URL | https://api.cert.nabcommerce.com/REST/2.0.18/Txn/{workflowId}/verify |
UMP URL | https://api.cert.nabcommerce.com/REST/2.0.18UMP/Txn/{workflowId}/verify |
Action | POST |
Parameter | Data Type | Description |
workflowId | String | Identifies the workflow to use for the transaction. If not supporting custom workflows, pass the servideId returned by GetServiceInformation. |
Data Type | Description |
Rest.AuthorizeTransaction | The message body containing transaction data. Note: A Verify request is identical to an Authorize request with the inclusion of AVSData. |
Rest.AuthorizeTransactionWithProfile | The message body containing transaction data and complete MerchantProfile required by UMP implementations. |
Data Type | Description |
Response | Transaction response data. Note: For Bankcard (BCP) transactions, the response object is BankcardTransactionResponsePro. For Electronic Checking (ECK) transactions, the response object is ElectronicCheckingTransactionResponse. For Stored Value Account (SVA) transactions, the response object is StoredValueTransactionResponse. |
CWSFault | CWSInvalidOperationFault |
AuthenticationFault | CWSInvalidServiceInformationFault |
ExpiredTokenFault | CWSOperationNotSupportedFault |
InvalidTokenFault | CWSTransactionAlreadySettledFault |
CWSConnectionFault | CWSTransactionFailedFault |
CWSExtendedDataNotSupportedFault | CWSTransactionServiceUnavailableFault |
CWSInvalidMessageFormatFault | CWSValidationResultFault |
For additional details about each fault, refer to Transaction Processing Faults in the CWS Developer API Reference.
Updated: June 2, 2017
SUBMIT A DEVELOPER SUPPORT REQUEST
Agent or a merchant? Contact NAB support at 866.485.8999 EXT 2341