Preform the following steps for accepting payments using PayPal:
Now add a button on the Shopping Cart page (optionally with Checkout by PayPal Image). This button should link to the
paypalExpressCheckoutAction()
function.Add a method in the store controller which will be used to generate the PayPal request:
protected function getPaypalRequest() { $config = $this->getServiceLocator()->get('config'); $paypalConfig = new \SpeckPaypal\Element\Config( $config['speck-paypal-api']); $adapter = new \Zend\Http\Client\Adapter\Curl(); $adapter->setOptions(array( 'curloptions' => array( CURLOPT_SSL_VERIFYPEER => false, ) )); $client = new \Zend\Http\Client; $client->setMethod('POST'); $client->setAdapter($adapter); $paypalRequest = new \SpeckPaypal\Service\Request; $paypalRequest->setClient($client); $paypalRequest->setConfig($paypalConfig); return $paypalRequest...