requestAction somewhere? In a view, or beforeRender, or afterFilter maybe? On Dec 10, 5:05 am, bujanga <[email protected]> wrote: > I have looked over this code many times and really just don't know why > this is happening. It seems that cake is performing the action twice. > How do I know this? I am receiving 2 of each email. If I put an exit > statement before the end of the action, I only receive 1 of each > email. > > As a background, I am using Security->requireSecure() in my > beforeFilter along with the blackHoleCallback = 'forceSSL' callback > shown in the book.http://book.cakephp.org/view/268/Usage > > Here is my action: > ---------- > function pmt_receipt($tid=NULL, $pid=NULL, $cid=NULL){ > if ( isset($this->params['named']['tid']) ){ > $tid = $this->params['named']['tid']; > $pid = $this->params['named']['pid']; > $cid = $this->params['named']['cid']; > } > if ( is_null($tid) || is_null($pid) || is_null($cid) ) > $this->redirect(array('action'=>'pmt_error', 0008)); > > $purchase_formatted = > $this->PurchaseModel->ggis_format_purchase($pid); > $purchase_formatted .= > $this->CcPaymentechChpp->ggis_format_payment($cid); > // NOTIFY BY EMAIL > $this->Transaction->emailnotify($tid); > // SUBSCRIBE TO EMAIL LIST > $this->Transaction->newslettersubscribe($tid); > // REMOVE DATA FROM THE SESSION > $this->Session->delete('purchase'); > > $purchase_msg = '<h4>Your credit card has been successfully > processed. Please print a copy of this page as your receipt.</h4>'; > $purchase_msg .= '<p>Shortly you will receive an email, reiterating > the information on this page.</p>'; > $this->CreditCard = ClassRegistry::init('CreditCard'); > $this->set('formOptions', $this->CreditCard->get_formOptions()); > $this->set('purchase_msg', $purchase_msg); > $this->set('purchase_formatted', $purchase_formatted);} > > ---------- > > The emailnotify and newslettersubscribe methods have been working > without issue for other controllers for quite some time. > > Any help would be greatly appreciated. Thank you. > > Gary Dalton
Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
