Optional Operations (SOAP)

SOAP API Reference

Optional Operations (SOAP)

 

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.
 

Operation

Response Acknowledge(string sessionToken, string transactionId, string applicationProfileId, string workflowId);
 

Parameters

Parameter Data Type Description
sessionToken String The limited-life 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 serviceIdreturned by GetServiceInformation.
 

Return Type

Data Type Description
Response Transaction response data. Note: For Bankcard (BCP) transactions, the response object is BankcardTransactionResponsePro.
 

Exceptions

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 inquiry on 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.
 

Operation

Response QueryAccount(string sessionToken, Transaction transaction, string applicationProfileId, MerchantProfile merchantProfile, string merchantProfileId, string workflowId);
 

Parameters

Parameter Data Type Description
sessionToken String The limited-life 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.
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 serviceIdreturned by GetServiceInformation.
 

Return Type

Data Type Description
Response Transaction response data. Note: For Bankcard (BCP) transactions, the response object is BankcardTransactionResponsePro.
 

Exceptions

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.
 

Code Snippets

 
/* $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 ();
  }
}

The Disburse operation is used to submit a disbursement request to the service provider who then electronically disburses funds from the payer’s bank account to the payee’s account.

 

Operation

Response Disburse(string sessionToken, Transaction transaction, string applicationProfileId, MerchantProfile merchantProfile, string merchantProfileId, string workflowId);
 

Parameters

Parameter Data Type Description
sessionToken String The limited-life 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.
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 serviceIdreturned by GetServiceInformation.
 

Return Type

Data Type Description
Response Transaction response data. Note: For Bankcard (BCP) transactions, the response object is BankcardTransactionResponsePro.
 

Exceptions

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.
 

Operation

Response Verify(string sessionToken, Transaction transaction, string applicationProfileId, MerchantProfile merchantProfile, string merchantProfileId, string workflowId);
 

Parameters

Parameter Data Type Description
sessionToken String The limited-life 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.
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 serviceIdreturned by GetServiceInformation.
 

Return Type

Data Type Description
Response Transaction response data. Note: For Bankcard (BCP) transactions, the response object is BankcardTransactionResponsePro.
 

Exceptions

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.
 

Operation

List RequestTransaction(string sessionToken, string merchantProfileId, TransactionTenderData tenderData);
 

Parameters

Parameter Data Type Description
sessionToken String The limited-life token used to authenticate to CWS.
merchantProfileId String The specific Merchant Profile Identifier to use.
tenderData TransactionTenderData The tender data to match.
 

Return Type

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.
 

Exceptions

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.