JSHINER Posted July 11, 2008 Share Posted July 11, 2008 I currently have a page that is working with the PayPal API - however, if after payment you go back to that page, it submits the payment again. How can I avoid this? Link to comment https://forums.phpfreaks.com/topic/114291-question-about-sessions/ Share on other sites More sharing options...
waynew Posted July 11, 2008 Share Posted July 11, 2008 Give the session a variable upon arrival on the page and make them confirm if they're arriving again. Link to comment https://forums.phpfreaks.com/topic/114291-question-about-sessions/#findComment-587716 Share on other sites More sharing options...
JSHINER Posted July 11, 2008 Author Share Posted July 11, 2008 How can I do this?? Link to comment https://forums.phpfreaks.com/topic/114291-question-about-sessions/#findComment-587720 Share on other sites More sharing options...
waynew Posted July 11, 2008 Share Posted July 11, 2008 $_SESSION['payed_pagename'] = true; Link to comment https://forums.phpfreaks.com/topic/114291-question-about-sessions/#findComment-587724 Share on other sites More sharing options...
chronister Posted July 11, 2008 Share Posted July 11, 2008 Or do a redirect so that the post data is not present upon hitting back. <?php if($payment_sucessful) { header('Location:/redirect/to/some/location.php); } ?> Your script should be looking for some sort of trigger to send the payment to paypal and not just open on a page so that if they hit that page it sends it. Make sure there is an if statement somewhere that triggers the paypal communication. Link to comment https://forums.phpfreaks.com/topic/114291-question-about-sessions/#findComment-587759 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.