developer:soap:methods:runcustomertransaction

This is an old revision of the document!


Soap API v1.2

runCustomerTransaction

Run a transaction using payment data stored in the customer database.

Description

Processes a new transaction using the payment details stored for the customer. This is a one time charge and does not use or affect the recurring billing values, such as amount and description, that have been stored for the customer. The transaction result will be tied to the customer and will be visible in the customer's billing history. The customer does not need to have recurring billing enabled for this method to be used.

See also enableCustomer, disableCustomer, deleteCustomer, searchCustomerID, getCustomer, searchCustomers, getCustomerHistory, addCustomer, addCustomerPaymentMethod, deleteCustomerPaymentMethod, updateCustomer, quickUpdateCustomer

Syntax

TransactionResponse runCustomerTransaction ( ueSecurityToken Token, integer CustNum, CustomerTransactionDetail Details, string Command, integer PaymentMethodID )

Arguments

Type Name Description
ueSecurityToken Token Merchant security token: used to identify merchant and validate transaction.
integer CustNum Customer Reference number assigned by the gateway
CustomerTransactionDetail Details Transaction amount, invoice number, etc.
string Command Command to run. Possible values: Sale, AuthOnly, Credit, Check and CheckCredit. If a blank is passed, the default value is Sale for credit card or Check for checks
integer PaymentMethodID ID of payment method to use for transaction. Send 0 to use default method

Return Value

TransactionResponse Returns all applicable transaction results including transaction reference number, batch number, transaction result (approved, declined, error), result code, authorization code, AVS result, CVV2 result, Verified by Visa or SecureCode Mastercard results, and converted currency amount and rate.

Examples

PHP

For directions on how to set up the WSDL link, create “$token” and “$client”, go to PHP Soap How-to.

<?php 
 
try { 
 
  $Details=array( 
    'Invoice' => rand(), 
    'PONum' => '', 
    'OrderID' => '', 
    'Description' => 'Sample Credit Card Sale', 
    'Amount'=>'1.50' 
    ); 
 
  $CustNum='1575'; 
  $Command='Sale'; 
  $PayMethod='0'; 
 
  $res=$client->runCustomerTransaction($token, $CustNum, $Details, $Command, $PayMethod); 
  print_r($res); 
 
} 
 
catch (SoapFault $e) { 
  echo $client->__getLastRequest(); 
  echo $client->__getLastResponse(); 
  die("runCustomerTransaction failed :" .$e->getMessage()); 
 
} 
 
?> 

Change History

Version Change
1.2 Modify Details property to use CustomerTransactionsDetails
1.1 Soap 1.1 Release (no changes)
developer/soap/methods/runcustomertransaction.1248896005.txt.gz · Last modified: 2009/07/29 12:33 by tem

Page Tools