Added Bulk Payments
This commit is contained in:
@@ -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,
|
||||
));
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
Reference in New Issue
Block a user