SearchApplicationTransactions
Description
This method allows searching the application transactions against the sales orders or customer.
Syntax
public ApplicationTransactionSearchResult SearchApplicationTransactions(SecurityToken securityToken,
SearchFilter[] filters,
bool countOnly,
int start,
int limit,
string sort)
Arguments
Type | Name | Description |
---|---|---|
SecurityToken | securityToken | Merchant security token: used to identify merchant and validate transaction. (required) |
SearchFilter | filters | Search filters. |
Bool | countOnly | Count Only. |
Int | start | Start position, defaults to 0 (first payment found). (required) |
Int | limit | Maximum number of payments to return in result. Default Max 1000. (required) |
String | sort | Field name to sort the results by. (optional) |
Return Value
Type | Description |
---|---|
ApplicationTransactionSearchResult | Returns result of ApplicationTransactionSearchResult. |
Example
public function SearchApplicationTransactions()
{
$client = new SoapClient('End point URL');
$securityToken = array(
'SecurityId' => '******-454757-4567457-********',
'UserId' => 'merchant1',
'Password' => 'merchant1'
);
$response = $this->soapClient->SearchApplicationTransactions(
array(
'securityToken' => $securityToken,
'countOnly' => false,
'start' => 0,
'limit' => 1000,
)
);
$result = $response->SearchApplicationTransactionsResult;
}
Request:
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ebiz="http://eBizCharge.ServiceModel.SOAP">
<soapenv:Header />
<soapenv:Body>
<ebiz:SearchApplicationTransactions>
<ebiz:securityToken>
<ebiz:SecurityId>********-766e-44e8-9e9b-********</ebiz:SecurityId>
<ebiz:UserId>odoocrm</ebiz:UserId>
<ebiz:Password>odoocrm</ebiz:Password>
</ebiz:securityToken>
<ebiz:filters>
<ebiz:SearchFilter>
<ebiz:FieldName>CustomerInternalId</ebiz:FieldName>
<ebiz:ComparisonOperator>=</ebiz:ComparisonOperator>
<ebiz:FieldValue>********-657e-40c3-9f8c-********</ebiz:FieldValue>
</ebiz:SearchFilter>
<ebiz:SearchFilter>
<ebiz:FieldName>LinkedToInternalId</ebiz:FieldName>
<ebiz:ComparisonOperator>=</ebiz:ComparisonOperator>
<ebiz:FieldValue>********-57b0-45bd-90ba-********</ebiz:FieldValue>
</ebiz:SearchFilter>
</ebiz:filters>
<ebiz:countOnly>0</ebiz:countOnly>
<ebiz:start>0</ebiz:start>
<ebiz:limit>1000</ebiz:limit>
</ebiz:SearchApplicationTransactions>
</soapenv:Body>
</soapenv:Envelope>
Response:
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SearchApplicationTransactionsResponse xmlns="http://eBizCharge.ServiceModel.SOAP">
<SearchApplicationTransactionsResult>
<ApplicationTransactions>
<ApplicationTransactionDetails>
<ApplicationTransactionInternalId>********-a2d5-4d40-a58f-********</ApplicationTransactionInternalId>
<CustomerInternalId>********-657e-40c3-9f8c-********</CustomerInternalId>
<TransactionId>3123884845</TransactionId>
<TransactionTypeId>Captured</TransactionTypeId>
<SoftwareId>Odoo</SoftwareId>
<LinkedToTypeId>SalesOrder</LinkedToTypeId>
<LinkedToInternalId>********-57b0-45bd-90ba-********</LinkedToInternalId>
<LinkedToExternalUniqueId>307</LinkedToExternalUniqueId>
<TransactionDate>2021-07-19</TransactionDate>
<TransactionNotes>Order No: S00305</TransactionNotes>
<TransactionExternalReferenceNumber />
<TransactionCustomFields />
<TransactionAmount>0.0000</TransactionAmount>
<IsTransactionApplied>true</IsTransactionApplied>
<PaymentMethodLast4 />
<PaymentMethodType />
</ApplicationTransactionDetails>
<ApplicationTransactionDetails>
<ApplicationTransactionInternalId>********-5819-4195-9fee-********</ApplicationTransactionInternalId>
<CustomerInternalId>********-657e-40c3-9f8c-********</CustomerInternalId>
<TransactionId>3123884845</TransactionId>
<TransactionTypeId>Authorized</TransactionTypeId>
<SoftwareId>Odoo</SoftwareId>
<LinkedToTypeId>SalesOrder</LinkedToTypeId>
<LinkedToInternalId>********-57b0-45bd-90ba-********</LinkedToInternalId>
<LinkedToExternalUniqueId>307</LinkedToExternalUniqueId>
<TransactionDate>2021-07-19</TransactionDate>
<TransactionNotes>Order No: S00305</TransactionNotes>
<TransactionExternalReferenceNumber />
<TransactionCustomFields />
<TransactionAmount>750.0000</TransactionAmount>
<IsTransactionApplied>false</IsTransactionApplied>
<PaymentMethodLast4>2224</PaymentMethodLast4>
<PaymentMethodType>Visa</PaymentMethodType>
</ApplicationTransactionDetails>
</ApplicationTransactions>
<Start>1</Start>
<Limit>1000</Limit>
<Count>2</Count>
</SearchApplicationTransactionsResult>
</SearchApplicationTransactionsResponse>
</s:Body>
</s:Envelope>
public void SearchApplicationTransactions()
{
eBizService apiClient = new eBizService();
SecurityToken securityToken = new SecurityToken
{
SecurityId = "*******-c870-41b8-aa5c-********",
UserId = "",
Password = ""
};
//Declare the Array of searchfilters
SearchFilter[] searchFilters = new SearchFilter[1];
//Declare a SearchFilter
SearchFilter searchFilter = new SearchFilter();
searchFilter.FieldName = "DateUploaded";
searchFilter.ComparisonOperator = "gt";
searchFilter.FieldValue = "04/01/2022";
//Add SearchFilter to Array for SearchFilters
searchFilters[0] = searchFilter;
var response = apiClient.SearchApplicationTransactions(securityToken,searchFilters,false,0,100,"");
Console.WriteLine(response.Count);
Console.ReadLine();
}
Updated over 2 years ago