73c73
<         module_invoke($txn->payment_method, 'paymentapi', $txn, 'on checkout');
---
>         module_invoke(payment_get_modulename($txn->payment_method), 'paymentapi', $txn, 'on checkout');
484,491c484,492
<     //get the list of modules. It'd be really cool if I could confine it only
<     //to payment modules.
<     foreach (module_list() as $pm) {
<       if (function_exists($pm. '_name')) {
<          if($modulename = module_invoke($pm, 'name', $name))
<             return $modulename;
<       }
<     }  
---
>   //get the list of modules. It'd be really cool if I could confine it only
>   //to payment modules.
>   foreach (module_list() as $pm) {
>     if (function_exists($pm. '_name')) {
>        if($name == ($modulename = module_invoke($pm, 'name', $name)))
>           return $modulename;
>     }
>   }  
> 
