Linas
Linas

Reputation: 4408

Redirect to paypal checkout page

I'm trying to implement paypal into my website. So what i have is a form and after submiting that form i would like to redirect user to paypal page, like this:

if($validator->check()){
  //do some things like adding data to database, etc
  //redirect user to paypal here
}

how can i do this?

EDIT: i can't just use header, i also need to send my encrypted data to paypal, here is the form that i would use if i would be using paypal provided button: http://pastebin.com/w65LkmBE

Upvotes: 0

Views: 861

Answers (2)

Nick Baluk
Nick Baluk

Reputation: 2275

It is not possible. You should use JS (AJAX) for this. If the form method would be GET and not POST, than that would be real.

Upvotes: 2

fflorent
fflorent

Reputation: 1646

if you did not echoed anything :

header("Location: http://paypal.com/...")

Upvotes: 1

Related Questions