GetPaymentsCount
Description
This method is used to return the number of payments based on the search terms.
Syntax
int GetPaymentsCount(SecurityToken securityToken, string customerId, string customerInternalId, System.DateTime fromDateTime, System.DateTime toDateTime)
Arguments
Type | Name | Description |
---|---|---|
SecurityToken | securityToken | Merchant security token: used to identify merchant and validate transaction. (required) |
string | customerId | Unique customer ID number assigned by the system. (required) |
string | customerInternalId | Unique invoice ID number assigned by the internal system. (required) |
System.DateTime | fromDateTime | From date. (required) |
System.DateTime | toDateTime | To date. (required) |
Return Value
Type | Description |
---|---|
int | Returns the number of payments based on the search terms. |
Examples
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;
}
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>
<!--Optional:-->
<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>
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>
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();
}
Updated about 2 years ago