MarkEbizWebFormPaymentAsApplied

Description

The MarkEbizWebFormPaymentAsApplied method marks an EBizCharge Payment object that has been paid via WebForm as applied. Once a Payment object has been marked as applied, it will no longer be returned by SearchEbizWebFormReceivedPayments.

Syntax

PaymentResponse MarkEbizWebFormPaymentAsApplied(SecurityToken securityToken, string paymentInternalId)

Arguments

TypeNameReq.Description
SecurityToken securityTokenRA unique token that is used to identify a merchant and authenticate the API request.
stringpaymentInternalIdR

Payment internal ID automatically assigned by EBizCharge.

Note: Only Payment objects returned by SearchEbizWebFormReceivedPayments should be marked as applied. Marking a pending payment as applied will incorrectly prevent it from being returned by SearchEbizWebFormPendingPayments.

Return Value

TypeDescription
PaymentResponseIf the request is successful, the PaymentResponse object will return. Otherwise, a fault error is thrown.

Example Request

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ebiz="http://eBizCharge.ServiceModel.SOAP">
   <soapenv:Header/>
   <soapenv:Body>
      <ebiz:MarkEbizWebFormPaymentAsApplied>
         <ebiz:securityToken>
            <ebiz:SecurityId>6969*************************36c223</ebiz:SecurityId>
            <ebiz:UserId/>
            <ebiz:Password/>
         </ebiz:securityToken>
         <ebiz:paymentInternalId>7dbd6114***************0b9c9ebd559b</ebiz:paymentInternalId>
      </ebiz:MarkEbizWebFormPaymentAsApplied>
   </soapenv:Body>
</soapenv:Envelope>
private static void MarkEbizWebFormPaymentAsApplied()
{
  IeBizService apiClient = new IeBizServiceClient();
  SecurityToken securityToken = new SecurityToken
  {
    SecurityId = "*******-c870-41b8-aa5c-********", // Replace with your actual token
    UserId = "",
    Password = ""
    };
  string webFormPaymentInternalId = "*******-c870-41b8-aa5c-********"; // Replace with your actual Web Form Payment Internal ID
  PaymentResponse response = apiClient.MarkEbizWebFormPaymentAsApplied(securityToken, webFormPaymentInternalId);
  //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 MarkEbizWebFormPaymentAsApplied call
$params = array(
  'securityToken' => $securityToken,
  'paymentInternalId' => '*******-c870-41b8-aa5c-********' // Replace with actual payment internal ID
);

try {
  // Make the SOAP request
  $response = $client->MarkEbizWebFormPaymentAsApplied($params);

  // Extract result object from response
  $result = $response->MarkEbizWebFormPaymentAsAppliedResult;

  // 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">
      <MarkEbizWebFormPaymentAsAppliedResponse xmlns="http://eBizCharge.ServiceModel.SOAP">
         <MarkEbizWebFormPaymentAsAppliedResult>
            <PaymentInternalId>7dbd6114***************0b9c9ebd559b</PaymentInternalId>
            <Status>Success</Status>
            <StatusCode>1</StatusCode>
            <Error/>
            <ErrorCode>0</ErrorCode>
         </MarkEbizWebFormPaymentAsAppliedResult>
      </MarkEbizWebFormPaymentAsAppliedResponse>
   </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>