function pay_method::delete in Pay 7
Delete this payment method.
File
- includes/
handlers/ pay_method.inc, line 198 - The base class for payment activities. All payment method classes should extend this class.
Class
- pay_method
- @file The base class for payment activities. All payment method classes should extend this class.
Code
function delete() {
// Disable this instead, if there are any transactions.
if ($this
->transactionCount() > 0) {
return $this
->disable();
}
// Call any actions that might want to know about this.
$this
->drupal_invoke('pay_method_delete');
// Delete this payment method from pay_method.
db_delete('pay_method')
->condition('pmid', $this->pmid)
->execute();
return TRUE;
}