function PaymentMethodControllerUnavailable::execute in Payment 7
Execute a payment.
Note that payments may be executed even if their owner is not logged into the site. This means that if you need to do access control in your execute() method, you cannot use global $user.
Parameters
Payment $payment:
Return value
boolean Whether the payment was successfully executed or not.
Overrides PaymentMethodController::execute
File
- ./
payment.classes.inc, line 981 - The API and related functions for executing and managing payments.
Class
- PaymentMethodControllerUnavailable
- A payment method controller that essentially disables payment methods.
Code
function execute(Payment $payment) {
$payment
->setStatus(new PaymentStatusItem(PAYMENT_STATUS_UNKNOWN));
}