MarkSurchargePaymentAsApplied
Description
The MarkSurchargePaymentAsApplied method marks surcharge payments as applied by setting IsApplied to true and updating DateApplied in the Surcharge object.
Syntax
MarkSurchargePaymentAsAppliedResponse MarkSurchargePaymentAsApplied(SecurityToken securityToken, string surchargeInternalId)
Arguments
| Type | Name | Description |
|---|---|---|
| SecurityToken | securityToken | A unique token that is used to identify a merchant and authenticate the API request. |
| string | surchargeInternalId | Internal ID of the Surcharge object to mark as applied. |
Return Value
| Type | Description |
|---|---|
| MarkSurchargePaymentAsAppliedResponse | Indicates whether the surcharge payment was marked as applied. |
Example Request
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ebiz="http://eBizCharge.ServiceModel.SOAP">
<soapenv:Header/>
<soapenv:Body>
<ebiz:MarkSurchargePaymentAsApplied>
<ebiz:securityToken>
<ebiz:SecurityId>************4621-b899-*************</ebiz:SecurityId>
<ebiz:UserId/>
<ebiz:Password/>
</ebiz:securityToken>
<ebiz:surchargeInternalId>********-1287-2345-kn23-************</ebiz:surchargeInternalId>
</ebiz:MarkSurchargePaymentAsApplied>
</soapenv:Body>
</soapenv:Envelope>private static void MarkSurchargePaymentAsApplied()
{
IeBizService apiClient = new IeBizServiceClient();
SecurityToken securityToken = new SecurityToken()
{
SecurityId = "**************70-ba92-**************",
UserId = "",
Password = ""
};
Surcharge surcharge = new Surcharge()
{
SurchargeInternalId = "**************-6b59-48ac-**************",
};
string surchargeInternalId = surcharge.SurchargeInternalId;
var response = apiClient.MarkSurchargePaymentAsApplied(securityToken, surchargeInternalId);
Console.WriteLine($" Result : {response.Status}");
Console.WriteLine($" Error : {response.Error}");
}// Initialize the SOAP client (replace with your actual endpoint URL)
$client = new SoapClient();
// Define the merchant security token
$securityToken = array(
'SecurityId' => '**************0-ba92-**************', // Replace with actual SecurityId
'UserId' => '',
'Password' => ''
);
// Prepare parameters for the MarkEbizWebFormPaymentAsApplied call
$params = array(
'securityToken' => $securityToken,
'surchargeInternalId' => '**************8ac-b6db-**************' // Replace with actual SurchargeInternalId
);
try {
// Make the SOAP request
$response = $client->MarkSurchargePaymentAsApplied($params);
// Extract result object from response
$result = $response->MarkSurchargePaymentAsAppliedResult;
// Display the response
echo "<pre>";
print_r($result);
echo "</pre>";
} catch (SoapFault $e) {
// Handle any SOAP errors
echo "SOAP Error: " . $e->getMessage();
}Example Response
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<MarkSurchargePaymentAsAppliedResponse xmlns="http://eBizCharge.ServiceModel.SOAP">
<MarkSurchargePaymentAsAppliedResult>
<SurchargeInternalId>********-602c-469f-a39a-************</SurchargeInternalId>
<Status>Success</Status>
<StatusCode>1</StatusCode>
<Error/>
<ErrorCode>0</ErrorCode>
</MarkSurchargePaymentAsAppliedResult>
</MarkSurchargePaymentAsAppliedResponse>
</s:Body>
</s:Envelope><s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<MarkSurchargePaymentAsAppliedResponse xmlns="http://eBizCharge.ServiceModel.SOAP">
<MarkSurchargePaymentAsAppliedResult>
<SurchargeInternalId/>
<Status>Failed</Status>
<StatusCode>0</StatusCode>
<Error>Not Found</Error>
<ErrorCode>3</ErrorCode>
</MarkSurchargePaymentAsAppliedResult>
</MarkSurchargePaymentAsAppliedResponse>
</s:Body>
</s:Envelope>Updated 4 months ago
