function payment_method_access_token in Payment 7
Check if a user has access to perform a certain payment method operation and do additional token validation.
Parameters
string $token: A token to validate, that was generated with value "payment_method".
string $operation:
PaymentMethod $payment_method:
stdClass $account:
See also
payment_method_access
1 string reference to 'payment_method_access_token'
- payment_menu in ./
payment.module - Implements hook_menu().
File
- ./
payment.module, line 1043 - Hook implementations and shared functions.
Code
function payment_method_access_token($token, $operation, PaymentMethod $payment_method = NULL, $account = NULL) {
return drupal_valid_token($token, 'payment') && payment_method_access($operation, $payment_method, $account);
}