developer:soap:methods:runtransactionapi

Soap API v1.2

runTransactionAPI

This method provides a Soap based interface to the Transaction API.

Description

The parameters argument is an array containing any of the variable names supported by the Transaction API.

This method requires more work to implement than the runTransaction method, and typically should not be your first choice for processing transactions. The one benefit of using this method is that it provides a direct interface to the transaction processing engine of the gateway. As new fields are added to the system they can be used immediately via this method without having to wait for the next Soap release or generate a new WSDL link. The runTransaction method on the other hand has its TransactionRequestObject tied to the Soap release (and wsdl url). To access new fields you would have to generate a new WSDL link.

NOTE: In previous releases this method was called runOldApi.

See also: runTransaction

Syntax

TransactionResponse runTransactionAPI ( ueSecurityToken Token, FieldValue Parameters )

Arguments

Type Name Description
ueSecurityToken Token Merchant security token: used to identify merchant and validate transaction.
FieldValue Parameters List of variables to pass to Transaction API.

Return Value

TransactionResponse Returns a TransactionResponse object containing the results of the transaction and all relevant data.

Examples

PHP

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

 <?php
 
  $Request=array(
    array('Field'=>'UMname', 'Value'=>'Tester Jones'),
    array('Field'=>'UMdescription', 'Value'=>'runTrasactionAPI sale'),
    array('Field'=>'UMamount', 'Value'=>'3.51'),
    array('Field'=>'UMinvoice', 'Value'=>'12345'),
    array('Field'=>'UMcard', 'Value'=>'4444555566667779'),
    array('Field'=>'UMexpir', 'Value'=>'0909'),
    array('Field'=>'UMstreet', 'Value'=>'1234 Main Street'),
    array('Field'=>'UMzip', 'Value'=>'99281'),
    array('Field'=>'UMcvv2', 'Value'=>'444')
 
   );
 
  $res=$client->runTransactionAPI($token, $Request);
 
  print_r($res);

XML

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" 
xmlns:ns1="urn:usaepay" 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:runTransactionAPI>
<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">1d6334156a63e7fe307c4273fddec1e983d87936</HashValue>
<Seed xsi:type="xsd:string">11936972591815259703</Seed>
<Type xsi:type="xsd:string">sha1</Type>
</PinHash>
<SourceKey xsi:type="xsd:string">HB4P7C4K2w2ZCQQQXRqrxDj6agrS2NIT</SourceKey>
</Token>
<Parameters SOAP-ENC:arrayType="ns1:FieldValue[9]" xsi:type="ns1:FieldValueArray">
<item xsi:type="ns1:FieldValue">
<Field xsi:type="xsd:string">UMname</Field>
<Value xsi:type="xsd:string">Tester Jones</Value>
</item>
<item xsi:type="ns1:FieldValue">
<Field xsi:type="xsd:string">UMdescription</Field>
<Value xsi:type="xsd:string">runTrasactionAPI sale</Value>
</item>
<item xsi:type="ns1:FieldValue">
<Field xsi:type="xsd:string">UMamount</Field>
<Value xsi:type="xsd:string">3.51</Value>
</item>
<item xsi:type="ns1:FieldValue">
<Field xsi:type="xsd:string">UMinvoice</Field>
<Value xsi:type="xsd:string">12345</Value>
</item>
<item xsi:type="ns1:FieldValue">
<Field xsi:type="xsd:string">UMcard</Field>
<Value xsi:type="xsd:string">4444555566667779</Value>
</item>
<item xsi:type="ns1:FieldValue">
<Field xsi:type="xsd:string">UMexpir</Field>
<Value xsi:type="xsd:string">0909</Value>
</item>
<item xsi:type="ns1:FieldValue">
<Field xsi:type="xsd:string">UMstreet</Field>
<Value xsi:type="xsd:string">1234 Main Street</Value>
</item>
<item xsi:type="ns1:FieldValue">
<Field xsi:type="xsd:string">UMzip</Field>
<Value xsi:type="xsd:string">99281</Value>
</item>
<item xsi:type="ns1:FieldValue">
<Field xsi:type="xsd:string">UMcvv2</Field>
<Value xsi:type="xsd:string">444</Value>
</item>
</Parameters>
</ns1:runTransactionAPI>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
developer/soap/methods/runtransactionapi.txt · Last modified: 2010/04/07 10:40 by charlie

Page Tools