GetPaymentsCount
Description
The GetPaymentsCount method returns the number of Payment objects matching the search values.
Syntax
int GetPaymentsCount(SecurityToken securityToken, string customerId, string customerInternalId, DateTime fromDateTime, DateTime toDateTime)
Arguments
Type | Name | Description | |
|---|---|---|---|
securityToken | R | A unique token that is used to identify a merchant and authenticate the API request. | |
string | customerId | S | Filter payments by customer ID. |
string | customerInternalId | O | Filter payments by internal customer ID. |
DateTime | fromDateTime | R | Only count payments after this date. Note: YYYY-MM-DD |
DateTime | toDateTime | R | Only count payments before this date. Note: YYYY-MM-DD |
Return Value
| Type | Description |
|---|---|
| int | On success, returns the number of Payment objects matching the search values. Otherwise, a fault is returned. |
Example Request
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ebiz="http://eBizCharge.ServiceModel.SOAP">
<soapenv:Header/>
<soapenv:Body>
<ebiz:GetPaymentsCount>
<ebiz:securityToken>
<ebiz:SecurityId>********-23f6-4466-a993-********</ebiz:SecurityId>
<ebiz:UserId/>
<ebiz:Password/>
</ebiz:securityToken>
<ebiz:customerId>US-011</ebiz:customerId>
<ebiz:customerInternalId>********-0a98-4242-9486-********</ebiz:customerInternalId>
<ebiz:fromDateTime>2018-01-01</ebiz:fromDateTime>
<ebiz:toDateTime>2021-07-30</ebiz:toDateTime>
</ebiz:GetPaymentsCount>
</soapenv:Body>
</soapenv:Envelope>public void GetPaymentsCount()
{
eBizService apiClient = new eBizService();
SecurityToken securityToken = new SecurityToken
{
SecurityId = "********-c870-41b8-aa5c-********",
UserId = "",
Password = ""
};
int count = apiClient.GetPaymentsCount(securityToken, "1010120", "12345645", DateTime.Parse("01/01/2016"), DateTime.Parse("01/03/2016"));
Console.WriteLine(count);
Console.ReadLine();
}public function GetPaymentsCount()
{
$client = new SoapClient('End point URL');
$securityToken = array(
'SecurityId' => '******-454757-4567457-********',
'UserId' => 'merchant1',
'Password' => 'merchant1'
);
$response = $client->GetPaymentsCount(array(
'securityToken' => $securityToken,
'customerId' => '1',
'fromDateTime' => '2021-01-09',
'toDateTime' => '2022-04-09',
));
$result = $response->GetPaymentsCountResult;
}Example 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">
<GetPaymentsCountResponse xmlns="http://eBizCharge.ServiceModel.SOAP">
<GetPaymentsCountResult>9</GetPaymentsCountResult>
</GetPaymentsCountResponse>
</s:Body>
</s:Envelope><s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body>
<s:Fault>
<faultcode>s:Client</faultcode>
<faultstring xml:lang="en-US">The conversion of a nvarchar data type to a datetime data type resulted in an out-of-range value.</faultstring>
</s:Fault>
</s:Body>
</s:Envelope>Updated 6 months ago
