PHP - Paypal - Auto Redirect

  • amer
  • Born
  • Born
  • amer
  • Posts: 4

Post 3+ Months Ago

Hi,

I need to redirect visitors back to the website in order to empty their basket.

Steps as follow:

Step 1: Add item to basket
Step 2: confirm order
Step 3: Checkout - (Go to PayPal)
Step 4: force visitors to come back to the website and empty the basket

is this possible?

Thx.
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • spork
  • Brewmaster
  • Silver Member
  • User avatar
  • Posts: 6243
  • Loc: Seattle, WA

Post 3+ Months Ago

It doesn't make sense to require users to have to empty their carts after completing an order. Instead, it should be emptied automatically once the purchase is complete.

If I recall correctly, PayPal lets you specify a URL to redirect to upon the completion of a transaction. One strategy would be to send the user to a "thank you" page that includes a unique identifier for the transaction in the query string. This would allow you to run cleanup for that user's cart before displaying the page.
  • amer
  • Born
  • Born
  • amer
  • Posts: 4

Post 3+ Months Ago

thank you spork,

i am aware of the "thank you" page that is provided by PayPal, however; Paypal requires 5 seconds till the redirection takes a place, if the user decides to close the browser or simply go to another URL i wont be able to clean up the basket.
  • spork
  • Brewmaster
  • Silver Member
  • User avatar
  • Posts: 6243
  • Loc: Seattle, WA

Post 3+ Months Ago

You can't go sidestepping PayPal's system or policies, so you'll have to explore other options:

1. Empty the cart before sending them to PayPal;
2. Set up a cron job to empty carts on a regular interval;
3. Choose a service other than PayPal.
  • amer
  • Born
  • Born
  • amer
  • Posts: 4

Post 3+ Months Ago

thanks spork
  • joebert
  • Fart Bubbles
  • Genius
  • User avatar
  • Posts: 13502
  • Loc: Florida

Post 3+ Months Ago

I have a feeling you're not using IPN. You get an opportunity where you can clear a shopping cart when IPN sends a notification to your server that checks out.

Paypal IPN or Instant Payment Notification might be what you're looking for.

Post Information

  • Total Posts in this topic: 6 posts
  • Users browsing this forum: No registered users and 90 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
cron
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.