Run a transaction using payment data stored in the customer database.
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 addCustomer, addCustomerPaymentMethod
TransactionResponse runCustomerTransaction ( ueSecurityToken Token, integer CustNum, integer PaymentMethodID, CustomerTransactionRequest Parameters )
Type |
Name |
Description |
Token |
Merchant security token: used to identify merchant and validate transaction. |
|
integer |
CustNum |
Customer Reference number assigned by the gateway |
integer |
PaymentMethodID |
ID of payment method to use for transaction. Send 0 to use default method |
Parameters |
Transaction amount, invoice number, etc. |
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. |
<?php
try {
$Parameters=array(
'Command'=>'Sale',
'Details'=>array(
'Invoice' => rand(),
'PONum' => '',
'OrderID' => '',
'Description' => 'Sample Credit Card Sale',
'Amount'=>'1.50' )
);
$CustNum='123456';
$PayMethod='0';
$res=$client->runCustomerTransaction($token, $CustNum, $PayMethod, $Parameters);
print_r($res);
}
catch (SoapFault $e) {
echo $client->__getLastRequest();
echo $client->__getLastResponse();
die("runCustomerTransaction failed :" .$e->getMessage());
}
?>
Dim custnum As String
custnum = "103125"
Dim paymentMethodID As String
paymentMethodID = "39"
Dim tran As eBizCharge.CustomerTransactionRequest = New eBizCharge.CustomerTransactionRequest
tran.Details = New eBizCharge.TransactionDetail
tran.Details.Invoice = "123456"
tran.Details.Description = "Sample Credit Card Sale"
tran.Details.Amount = 1.05
tran.Details.AmountSpecified = True
Dim response As eBizCharge.TransactionResponse
response = New eBizCharge.TransactionResponse
response = client.runCustomerTransaction(token, custnum, paymentMethodID, tran)
MessageBox.Show(String.Concat(response.Result))
string custNum = "89147";
string paymentMethodID = "19";
eBizCharge.CustomerTransactionRequest tran = new eBizCharge.CustomerTransactionRequest();
tran.Details = new eBizCharge.TransactionDetail();
tran.Details.Invoice = "123456";
tran.Details.Description = "Sample Credit Card Sale";
tran.Details.Amount = 1.05;
tran.Details.AmountSpecified = true;
eBizCharge.TransactionResponse response = new eBizCharge.TransactionResponse();
try
{
response = client.runCustomerTransaction(token, custNum, paymentMethodID, tran);
MessageBox.Show(string.Concat(response.Result));
}
catch (Exception err)
{
MessageBox.Show(err.Message);
}
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns1="urn:eBizCharge" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<ns1:runCustomerTransaction>
<Token xsi:type="ns1:ueSecurityToken">
<ClientIP xsi:type="xsd:string">192.168.0.1</ClientIP>
<PinHash xsi:type="ns1:ueHash">
<HashValue xsi:type="xsd:string">11ac55b0a0b59f8f028dbf85bc32266fa973dd0e</HashValue>
<Seed xsi:type="xsd:string">12678150211876663375</Seed>
<Type xsi:type="xsd:string">sha1</Type>
</PinHash>
<SourceKey xsi:type="xsd:string">HB4P7C4K2w2ZCQQQXRqrxDj6agrS2NIT</SourceKey>
</Token>
<CustNum xsi:type="xsd:integer">51353</CustNum>
<Details xsi:type="ns1:CustomerTransactionDetail">
<Amount xsi:type="xsd:double">1.5</Amount>
<Description xsi:type="xsd:string">Sample Credit Card Sale</Description>
<Invoice xsi:type="xsd:string">1694755200</Invoice>
<OrderID xsi:type="xsd:string"></OrderID>
<PONum xsi:type="xsd:string"></PONum>
</Details>
<Command xsi:type="xsd:string">Sale</Command>
<PaymentMethodID xsi:type="xsd:integer">0</PaymentMethodID>
</ns1:runCustomerTransaction>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>