You are here

function commerce_cop_payment_access in Commerce Custom Offline Payments 7

User access callback for cashing cheque

1 string reference to 'commerce_cop_payment_access'
commerce_cop_menu in ./commerce_cop.module
Implements hook_menu().

File

./commerce_cop.module, line 90
Custom offline payment methods for Drupal Commerce.

Code

function commerce_cop_payment_access($order, $transaction) {
  if (custom_offline_payment_load($transaction->payment_method) && $transaction->status != COMMERCE_PAYMENT_STATUS_SUCCESS) {

    // Allow access if the user can update payments on this order.
    return commerce_payment_transaction_access('update', $transaction);
  }

  // Return FALSE if the transaction is not with a Custom offline Payment and is not pending.
  return FALSE;
}