kellymeeks Posted June 10, 2003 Posted June 10, 2003 NOTE - I also posted this accidently in the 'Contributions' forum, which I don't think is the correct place - apologies for the annoyance... I've got a client using payflow link, and I've run into a interesting problem. I'm hoping I just don't have something configured correctly. If you go thru the whole process, and you click on the 'Confirm Order' button, it takes you to the Payflow Link screen that tells you if your order is confirmed, declined, etc. If it is confirmed, and the user doesn't click the confirming button at the bottom of the screen - their card is charged, an oscommerce never records the order, because as far as it's concerned, it never gets finalized. What should be set in payflow link to prevent this? I currently have the return url with a post method as http://www.mysite.com/catalog/verisignreturn.php Are there correct settings for : silent post url force silent url post confirmation failed silent post return url that will correct this? Please help!
sokkerbob Posted June 11, 2003 Posted June 11, 2003 First of all, I am no expert. Here is what I did First, in verisignreturn.php I changed code from this <?php /* $Id: verisignreturn.php,v 1.0 2002/05/13 10:28:06 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2002 osCommerce Released under the GNU General Public License */ global $HTTP_POST_VARS,$HTTP_GET_VARS; $HTTP_POST_VARS[$HTTP_POST_VARS['USER1']] = $HTTP_POST_VARS['USER2']; $$HTTP_GET_VARS[$HTTP_POST_VARS['USER1']] = $HTTP_POST_VARS['USER2']; reset ($HTTP_POST_VARS); reset ($HTTP_GET_VARS); $postparameters=''; while (list ($key, $val) = each ($HTTP_POST_VARS)) { $postparameters .= $key.'='.urlencode($val).'&'; } include('includes/application_top.php'); $_SESSION['verisign_ref'] = $HTTP_POST_VARS['PNREF']; // echo $HTTP_POST_VARS['PNREF']; tep_redirect(tep_href_link(FILENAME_CHECKOUT_PROCESS, $postparameters , 'SSL', false, false)); ?> to this <?php /* $Id: verisignreturn.php,v 1.0 2002/05/13 10:28:06 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2002 osCommerce Released under the GNU General Public License */ if ($HTTP_POST_VARS['RESULT']==0){ global $HTTP_POST_VARS,$HTTP_GET_VARS; $HTTP_POST_VARS[$HTTP_POST_VARS['USER1']] = $HTTP_POST_VARS['USER2']; $$HTTP_POST_VARS[$HTTP_POST_VARS['USER1']] = $HTTP_POST_VARS['USER2']; reset ($HTTP_POST_VARS); reset ($HTTP_GET_VARS); $postparameters=''; while (list ($key, $val) = each ($HTTP_POST_VARS)) { $postparameters .= $key.'='.urlencode($val).'&'; } include('includes/application_top.php'); $_SESSION['verisign_ref'] = $HTTP_POST_VARS['PNREF']; // echo $HTTP_POST_VARS['PNREF']; // echo $postparamters tep_redirect(tep_href_link(FILENAME_CHECKOUT_PROCESS, $postparameters , 'SSL', false, false)); } ?> The reason for this is because if for some reason the credit card fails, you do not want the silent post to update the script. Your verisignreturn.php file might be a little different depending on which contribution you are using. Second, I set up my payflow link like this Return URL Method: Link Return URL: http://mydomain.com/catalog/checkout_success.php Silent Post URL : http://mydomain.com/catalog/verisignreturn.php I have not done anything with the force silent post option yet. The documentation says that the it waits for a "200 success response" and I am not quite sure how to make that work. FYI, this was working until I changed my settings in admin to force cookie use to true. I added this code to catalog/application_top.php and it made everything better Original // start the session $session_started = false; if (SESSION_FORCE_COOKIE_USE == 'True') { tep_setcookie('cookie_test', 'please_accept_for_session', time()+60*60*24*30, '/', $current_domain); if (isset($HTTP_COOKIE_VARS['cookie_test'])) { tep_session_start(); $session_started = true; } } elseif (SESSION_BLOCK_SPIDERS == 'True') { Change to // start the session $current_domain2 = '.'. $current_domain; $session_started = false; if (SESSION_FORCE_COOKIE_USE == 'True') { tep_setcookie('cookie_test', 'please_accept_for_session', time()+60*60*24*30, '/', $current_domain); if (isset($HTTP_COOKIE_VARS['cookie_test'])) { tep_session_start(); $session_started = true; } if ($HTTP_POST_VARS['RESULT']==0) { tep_session_start(); $session_started = true; } } elseif (SESSION_BLOCK_SPIDERS == 'True') { Bear in mind, that I just hack away at things until they work. I do not know all the consequences of my actions. Any feedback is appreciated.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.