Delete an ACH/eCheck payment method
Delete an ACH/eCheck payment method from a customer's account.
Example
Use the $API->delete(ChargeOverAPI_Object::TYPE_ACH, $the_ach_id);
method to delete an ACH/eCheck payment method from a customer's account.
<?php
header('Content-Type: text/plain');
// Require the library
require '../ChargeOverAPI.php';
require 'config.php';
$API = new ChargeOverAPI($url, $authmode, $username, $password);
// This is the unique ach ID value
$the_ach_id = 1;
// Delete the payment method
$resp = $API->delete(ChargeOverAPI_Object::TYPE_ACH, $the_ach_id);
// Check for errors
if (!$API->isError($resp))
{
print('ACH was deleted!');
}
else
{
print('The ACH COULD NOT BE DELETED!');
print("\n\n\n\n");
print($API->lastRequest());
print("\n\n\n\n");
print($API->lastResponse());
print("\n\n\n\n");
}