using $this->redirect() is the best way to do it.

->redirect() forces the browser into an entirely new request (to a new
URL - either externally, or on the same site). ->forward() merely
passes the execution to another module/action, but does not force the
browser into a new request, so therefore it cannot be to a page
outside of symfony.

As for header(), if you ever need to set header parameters, you should
look at using sfWebResponse::setHttpHeader() (generally you'd do
something like $this->getResponse()->setHttpHeader('Location',
'https://www.paypal.com/...') - though obviously setting the location
header is a waste of time given that we have ->redirect() to do it for
us!)

On Jun 14, 1:36 am, slinky66 <[EMAIL PROTECTED]> wrote:
> Hello!
>
> I'm implementing PayPal Express Checkout in my cart. At a point in the
> process, the user must be sent to PayPal to execute the purchase.
>
> The logic that determines this is inside my executeProcessOrder()
> method in my shoppingCart module's actions class:
>
> if($payType=="PayPal"){
>
>    //redirect to //https://www.paypal.com/us/cgi-bin/webscr?
> cmd=_express-checkout&token=$token
>
> header("Location:https://www.paypal.com/us/cgi-bin/webscr?cmd=_express-checkout&token=...";);
>
> }
>
> I also tried $this->forward($this,"https://www.paypal.com/us/cgi-bin/
> webscr?cmd=_express-checkout&token=$token")
>
> What's the proper way to do this?


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to