Created
September 25, 2012 22:47
-
-
Save nclundsten/3784933 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function indexAction() | |
{ | |
$checkoutService = $this->getServiceLocator()->get('SpeckCheckout\Service\Checkout'); | |
$options = $checkoutService->getOptions(); | |
$paymentMethods = $options->getPaymentMethods(); | |
$methodForm = new \Zend\Form\Form; | |
foreach ($paymentMethods as $i) { | |
$valueOptions[$i->getPaymentMethod()] = $i->getDisplayName(); | |
} | |
$paymentMethod = $checkoutService->getCheckoutStrategy()->getPaymentMethod()->getPaymentMethod(); | |
$methodForm->add(array( | |
'name' => 'method', | |
'type' => 'Zend\Form\Element\Radio', | |
'options' => array( | |
'label' => 'Payment Method', | |
'value_options' => $valueOptions, | |
'value' => array($paymentMethod,), //not sure where it goes! | |
), | |
'value' => array($paymentMethod,), //not sure where it goes! | |
)); | |
return array('form' => $methodForm); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment