/** * Gets one or more payment methods. * * @param int $customer_id Customer ID. * @param int $id Payment method ID. * * @return void */ public function get_index($customer_id = null, $id = null) { $customer = $this->get_customer($customer_id); if (!$id) { $payment_methods = \Service_Customer_Paymentmethod::find(array('customer' => $customer)); } else { $payment_methods = $this->get_paymentmethod($id, $customer); } $this->response($payment_methods); }
/** * Displays a customer's payment methods. * * @param int $customer_id Customer ID. * * @return void */ public function action_index($customer_id = null) { $customer = $this->get_customer($customer_id); $this->view->customer = $customer; $this->view->paymentmethods = Service_Customer_Paymentmethod::find(array('customer' => $customer, 'status' => 'all')); }