Added Bulk Payments

This commit is contained in:
Deon George
2012-01-11 19:59:20 +11:00
parent f0c1f8800e
commit 8d53924988
9 changed files with 176 additions and 4 deletions

View File

@@ -13,6 +13,7 @@
class Controller_Admin_Payment extends Controller_TemplateDefault_Admin {
protected $secure_actions = array(
'add'=>TRUE,
'addbulk'=>TRUE,
'list'=>TRUE,
'view'=>TRUE,
'autocomplete'=>FALSE,
@@ -203,5 +204,38 @@ class Controller_Admin_Payment extends Controller_TemplateDefault_Admin {
'body'=>$this->add_view($id,$output),
));
}
public function action_addbulk() {
$supported = array(
'ezypay'=>'Ezypay',
);
$output = '';
if ($_POST AND isset($_POST['payer'])) {
$c = sprintf('payment_bulk_%s',$_POST['payer']);
$o = new $c();
if (! $_FILES) {
$output .= $o->form();
} else {
$output .= $o->process();
}
// We dont know what sort of payment type yet
} else {
$output .= Form::open();
$output .= Form::select('payer',$supported);
$output .= Form::submit('submit','submit',array('class'=>'form_button'));
$output .= Form::close();
}
Block::add(array(
'title'=>_('Bulk Payments Received'),
'body'=>$output,
));
}
}
?>