DeleteEbizWebFormPayment
Description
The DeleteEbizWebFormPayment method deletes (cancels) a webform Payment object generated by the GetEbizWebFormURL method. Once the Payment has been deleted, it will no longer be returned by SearchEbizWebFormPendingPayments or SeachEbizWebFormReceivedPayments.
Syntax
PaymentResponse DeleteEbizWebFormPayment(SecurityToken securityToken, string paymentInternalId)
Arguments
| Type | Name | Req. | Description |
|---|---|---|---|
| SecurityToken | securityToken | R | A unique token that is used to identify a merchant and authenticate the API request. |
| string | paymentInternalId | R | Identifies the webform Payment object to delete. |
Return Value
| Type | Description |
|---|---|
| PaymentResponse | Indicates whether the operation was successful. 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:DeleteEbizWebFormPayment>
<ebiz:securityToken>
<ebiz:SecurityId>*************-4621-b899-************</ebiz:SecurityId>
<ebiz:UserId/>
<ebiz:Password/>
</ebiz:securityToken>
<ebiz:paymentInternalId>********-fe2f-4873-94dc-************</ebiz:paymentInternalId>
</ebiz:DeleteEbizWebFormPayment>
</soapenv:Body>
</soapenv:Envelope>private static void DeleteEbizWebFormPayment()
{
IeBizService apiClient = new IeBizServiceClient();
SecurityToken securityToken = new SecurityToken
{
SecurityId = "*******-c870-41b8-aa5c-********", // Replace with your actual token
UserId = "",
Password = ""
};
string paymentInternalId = "*******-c870-41b8-aa5c-********"; // Replace with your actual Web Form Payment Internal ID
PaymentResponse response = apiClient.DeleteEbizWebFormPayment(securityToken, paymentInternalId);
//Display results
Console.WriteLine($"Status: {response.Status}");
Console.WriteLine($"Status Code: {response.StatusCode}");
Console.WriteLine($"Error: {response.Error}");
Console.WriteLine($"Error Code: {response.ErrorCode}");
Console.ReadLine();
} // Initialize the SOAP client (replace with your actual endpoint URL)
$client = new SoapClient("https://ebizsoapapidev1.ebizcharge.net/eBizService.svc?singleWsdl");
// Define the merchant security token
$securityToken = array(
'SecurityId' => '*******-c870-41b8-aa5c-********',
'UserId' => '',
'Password' => ''
);
// Prepare parameters for the DeleteEbizWebFormPayment call
$params = array(
'securityToken' => $securityToken,
'paymentInternalId' => '*******-c870-41b8-aa5c-********' // Replace with actual payment internal ID
);
try {
// Make the SOAP request
$response = $client->DeleteEbizWebFormPayment($params);
// Extract result object from response
$result = $response->DeleteEbizWebFormPaymentResult;
// 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">
<DeleteEbizWebFormPaymentResponse xmlns="http://eBizCharge.ServiceModel.SOAP">
<DeleteEbizWebFormPaymentResult>
<PaymentInternalId>********-fe2f-4873-94dc-************</PaymentInternalId>
<Status>Success</Status>
<StatusCode>1</StatusCode>
<Error/>
<ErrorCode>0</ErrorCode>
</DeleteEbizWebFormPaymentResult>
</DeleteEbizWebFormPaymentResponse>
</s:Body>
</s:Envelope><s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body>
<s:Fault>
<faultcode>s:Error</faultcode>
<faultstring xml:lang="en-US">Error: Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).</faultstring>
</s:Fault>
</s:Body>
</s:Envelope>Updated 4 months ago
