array( /*array ( 'id' => '18', 'price' => '39.17', 'quantity' => 1, 'description' => 'Case Logic PNC-218 18-Inch', ),*/ ), 'billingInfo' => array( 'name' => 'Vitalii Ternopilskyi', 'address1' => '10700 Highway 55', 'city' => 'Plymouth', 'state' => 'MN', 'zip' => '55441', 'email' => 'vityk@adaptainc.com', 'userid' => '999999', ), 'shippingInfo' => array( 'name' => 'Vitalii Ternopilskyi', 'address1' => '10700 Highway 55', 'city' => 'Plymouth', 'state' => 'MN', 'zip' => '55441', ), 'orderId' => null, 'invoiceId' => null, 'tax' => '0.00', 'shipping' => '25.00', 'total' => '64.20', 'cardnumber' => '4111111111111111', 'cardexpmonth' => '01', 'cardexpyear' => '2014', 'cvmvalue' => '111', 'cvmindicator' => 'provided', ); protected function _doInsert() { $form = $this->_getNewForm(); if ($form->validate()) { $data = $this->_defaults; $data['orderId'] = 1000000 + rand(1, 1000); $data['invoiceId'] = $data['orderId']; $payment = App_Service_Payment::factory('linkPoint', array('data' => $data)); $result = $payment->getResponse()->isSuccess(); $paymentData = $payment->getResponse()->getData(); echo 'Result: ', intval($result), '
', 'Response:
' . print_r($paymentData, true) . '

'; exit(); } $this->_addFormItem($form); return $this; } protected function _getNewForm() { $form = new Qs_Form($this->_getFormOptions()); $form->addElement('hidden', 'action', array('value' => 'insert')); $this->_bindFormFields($form); //$form->setDefaults($this->_formDefaults); return $form; } protected function _bindFormFields(Qs_Form $form) { $subForm = new Qs_Form_SubForm(); $form->addSubForm($subForm, 'payment'); return $this; } }