Jump to content


Corporate Sponsors


Latest News: (loading..)

- - - - -

DPS not redirecting to checkout_success.php


10 replies to this topic

#1 Denz

  • Community Member
  • 77 posts
  • Real Name:Denise
  • Gender:Female
  • Location:New Zealand

Posted 16 July 2009, 00:14

Hi,

I hope someone out there can help me - even if you do not know DPS you may be able to help.

I have downloaded and installed the DPS_PxPay_v1.1 contribution - all works fine - things go in cart, order processed, off to DPS, payment made, success BUT THEN.... when you click continue on the dps page it takes you off to login.php instead of checkout_success.php. Of course then as you know no email is generated of the order and sent to the client.

I rang DPS and they said it is in the dps_pxpay_result_handler.php - which says:

<?php
/*

dps_pxaccess.php, v1.00 osCommerce 07/04/2008
http://www.createhosting.co.nz
Copyright © 2008 Create Hosting Limited

Payment module for osCommerce Open Source E-Commerce Solution
http://www.createhosting.co.nz/
See http://www.dps.co.nz/technical_resources/e...sted/pxpay.html

Released under the GNU General Public License

Based on the zen-cart DPS PXPAY module by mixedmatter Ltd
Rewritten for osCommerce by Quentin Nel, Create Hosting Ltd
*/

//Check for DPS PxPay type request parameter
if (isset($_GET['result'])) {
// zen-cart dies silently without this line!
//define('GZIP_LEVEL', false);

require('includes/application_top.php'); // assume this is an DPS PxPay callback or redirect

$language_page_directory = DIR_WS_LANGUAGES . $_SESSION['language'] . '/';
require(DIR_WS_CLASSES . 'payment.php');
$payment_modules = new payment($_SESSION['payment']); // this should load everything we need...

$dpspxpay = new dps_pxpay(); // create own instance
$dpspxpay->log("dps_pxpay_result_handler called: " . serialize($_GET));

$dpspxpay->before_process(); // this will actually delegate to _processPxPayResponse()

// complete checkout; this will create the order, do some validation and then display the confirmation page
tep_redirect(tep_href_link(FILENAME_CHECKOUT_PROCESS, 'dps_done=true&txnId='.$dpspxpay->getTxnId(), 'SSL'));
}
?>


I have looked everywhere for where it might be getting the login.php, tried a few things but nothing works. I even tried changing the tep_redirect(tep_href_link(FILENAME_CHECKOUT_PROCESS, 'dps_done=true&txnId='.$dpspxpay->getTxnId(), 'SSL')); to tep_redirect(tep_href_link(FILENAME_CHECKOUT_SUCCESS, 'dps_done=true&txnId='.$dpspxpay->getTxnId(), 'SSL')); thinking it might bypass this and work, but still get the same result!

Please can someone help!!!

Thanks
Denz

#2 spooks

  • Community Member
  • 7,017 posts
  • Real Name:Sam
  • Gender:Male
  • Location:UK

Posted 16 July 2009, 01:55

I would look at sessions, somewhere u are loosing the session, causing the redirect to login
Sam

Remember, What you think I ment may not be what I thought I ment when I said it.

Contributions:


Auto Backup your Database, Easy way

Multi Images with Fancy Pop-ups, Easy way

Products in columns with multi buy etc etc

Disable any Category or Product, Easy way

Secure & Improve your account pages et al.

#3 Denz

  • Community Member
  • 77 posts
  • Real Name:Denise
  • Gender:Female
  • Location:New Zealand

Posted 16 July 2009, 04:41

View Postspooks, on Jul 16 2009, 01:55 PM, said:

I would look at sessions, somewhere u are loosing the session, causing the redirect to login

Hi Sam,

Where would I look for that? I am thinking .htaccess but could be way off there!

Thanks
Denz

#4 badbrad

  • Community Member
  • 10 posts
  • Real Name:Bradly Beukes

Posted 11 August 2009, 03:41

View PostDenz, on Jul 16 2009, 12:14 PM, said:

Hi,

I hope someone out there can help me - even if you do not know DPS you may be able to help.

I have downloaded and installed the DPS_PxPay_v1.1 contribution - all works fine - things go in cart, order processed, off to DPS, payment made, success BUT THEN.... when you click continue on the dps page it takes you off to login.php instead of checkout_success.php. Of course then as you know no email is generated of the order and sent to the client.

I rang DPS and they said it is in the dps_pxpay_result_handler.php - which says:

<?php
/*

dps_pxaccess.php, v1.00 osCommerce 07/04/2008
http://www.createhosting.co.nz
Copyright © 2008 Create Hosting Limited

Payment module for osCommerce Open Source E-Commerce Solution
http://www.createhosting.co.nz/
See http://www.dps.co.nz/technical_resources/e...sted/pxpay.html

Released under the GNU General Public License

Based on the zen-cart DPS PXPAY module by mixedmatter Ltd
Rewritten for osCommerce by Quentin Nel, Create Hosting Ltd
*/

//Check for DPS PxPay type request parameter
if (isset($_GET['result'])) {
// zen-cart dies silently without this line!
//define('GZIP_LEVEL', false);

require('includes/application_top.php'); // assume this is an DPS PxPay callback or redirect

$language_page_directory = DIR_WS_LANGUAGES . $_SESSION['language'] . '/';
require(DIR_WS_CLASSES . 'payment.php');
$payment_modules = new payment($_SESSION['payment']); // this should load everything we need...

$dpspxpay = new dps_pxpay(); // create own instance
$dpspxpay->log("dps_pxpay_result_handler called: " . serialize($_GET));

$dpspxpay->before_process(); // this will actually delegate to _processPxPayResponse()

// complete checkout; this will create the order, do some validation and then display the confirmation page
tep_redirect(tep_href_link(FILENAME_CHECKOUT_PROCESS, 'dps_done=true&txnId='.$dpspxpay->getTxnId(), 'SSL'));
}
?>


I have looked everywhere for where it might be getting the login.php, tried a few things but nothing works. I even tried changing the tep_redirect(tep_href_link(FILENAME_CHECKOUT_PROCESS, 'dps_done=true&txnId='.$dpspxpay->getTxnId(), 'SSL')); to tep_redirect(tep_href_link(FILENAME_CHECKOUT_SUCCESS, 'dps_done=true&txnId='.$dpspxpay->getTxnId(), 'SSL')); thinking it might bypass this and work, but still get the same result!

Please can someone help!!!

Thanks
Denz

Hi Denise,

Did you manage to find a solution for this? I am having the same problem with my shop.

Brad

#5 Denz

  • Community Member
  • 77 posts
  • Real Name:Denise
  • Gender:Female
  • Location:New Zealand

Posted 11 August 2009, 05:18

View Postbadbrad, on Aug 11 2009, 03:41 PM, said:

Hi Denise,

Did you manage to find a solution for this? I am having the same problem with my shop.

Brad


Yes, it was a SID issue. I turned off the secure server and it all went fine!!

Took me hours to find this... hope it works for you!

Denise

#6 badbrad

  • Community Member
  • 10 posts
  • Real Name:Bradly Beukes

Posted 11 August 2009, 22:36

View PostDenz, on Aug 11 2009, 05:18 PM, said:

Yes, it was a SID issue. I turned off the secure server and it all went fine!!

Took me hours to find this... hope it works for you!

Denise

Where exactly did you do that? Was it it in the configure.php file? The SSL in my configure.php file is switched to false.

Brad

#7 Denz

  • Community Member
  • 77 posts
  • Real Name:Denise
  • Gender:Female
  • Location:New Zealand

Posted 12 August 2009, 00:41

View Postbadbrad, on Aug 12 2009, 10:36 AM, said:

Where exactly did you do that? Was it it in the configure.php file? The SSL in my configure.php file is switched to false.

Brad


Hi Brad,

Yeah that is where I did it.. worked for me! Have you done it on both admin and catalog directory config files?

All I know is that I searched for days and days - in the end I turned off the secure server and it went fine. I figured the secure server was scrambling the sessionID so when directed back from DPS to your shop it gave a new ID - hence your shop not knowing who left. Does this make sence?

Denise

#8 Gibbo

  • Community Member
  • 16 posts
  • Real Name:Ian Gibbs
  • Location:Auckland, New Zealand

Posted 22 February 2010, 09:25

View Postbadbrad, on 11 August 2009, 22:36, said:

Where exactly did you do that? Was it it in the configure.php file? The SSL in my configure.php file is switched to false.

Brad

Did this work for you? I see in the log that the fail safe response is being redirected to the login page rather than order complete. Any Ideas?

#9 Gibbo

  • Community Member
  • 16 posts
  • Real Name:Ian Gibbs
  • Location:Auckland, New Zealand

Posted 22 February 2010, 10:06

Looking at the logic flow here in the access logs...

xxx.xxx.169.147 - - [22/Feb/2010:22:52:54 +1300] "POST /checkout_process.php HTTP/1.1" 302 941 "http://www.mysite.com/checkout_confirmation.php" "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; InfoPath.2; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)" 
xxx.xxx.103.101 - - [22/Feb/2010:22:53:10 +1300] "GET /dps_pxpay_result_handler.php?result=v5VnhkMCFPp5IT5C9B9nE7svYV6GqLp0gQiUCNH6X8fxuAnzn2dRkaif6xmVGcAgYpB7QyJj14oCixpYbz-JRTo40RopUyM-ycHQc0hIG22vyQOdz6JALStZjL9KVoB9Rsn_ikobiY3r7kE-CyKaCAWWLgXk4h-QShzTxX1btn4eCBgZYa3ZiMXtzQLAYF6VsItqQM0p-VzqUv7veb_2AIF_XqZWCEc-Aws6esXnFwZy0Jq9rDrr82Q-b-6Q2gMioYkBRUfusAfNAx3NIDmnYQVbtPVH2JyZY7KPn5uRy6M3ybfXlaIG23xXBbSkicm8MdTxpR0B2CkZpOZ9A_4XwwW-9EwmNauRO0d5aHXIGi2UlQL2sdbFXC4aqNlQKNXqjyyNhuzKgF0w8b7GorXHBJAj-s5wGVi4oV6BxWVN0HRxu5MV-lSnjtxfJYxWYD0BTa21SO3l2lAaOZxo6NUcqZrVRk8S3c29CkxScgclhlTztdQ5p9NcXntfDqJCDSinGjb1jEtCItf-nXIFGUDTY9m3-fuxeZQYE8&userid=PxPayUserAcc_dev HTTP/1.1" 302 542 "-" "PXHOST" 
xxx.xxx.103.101 - - [22/Feb/2010:22:53:10 +1300] "GET /checkout_process.php?dps_done=true&txnId=3054b8253f6b0bd1&osCsid=efba66172f96af673934cfc5d7b35b22 HTTP/1.1" 302 440 "-" "PXHOST" 
xxx.xxx.103.101 - - [22/Feb/2010:22:53:10 +1300] "GET /login.php?osCsid=efba66172f96af673934cfc5d7b35b22 HTTP/1.1" 200 32117 "-" "PXHOST" 

The Site checkout_process.php sends the user to the PxPay site. Once the user gets a success box but does NOT click the next button, the PxPay site calls the dps_pxpay_result_handler.php with the success string as it should. The dps_pxpay_result_handler.php then issues a redirect back to PxPay to the checkout_process.php with the osCsid of the original customers session. Since the PxPay is not signed in to the site, to redirects to the login.php.

How do you configure this to accept the PxPay with other customers osCid's? This is needed as if the customer does not click the next button in the PxPay site, we will never receive the order, but we do receive the money.


Advise and help appreciated...

#10 wilkiandrew

  • Community Member
  • 1 posts
  • Real Name:Andrew

Posted 12 May 2010, 05:13

View PostGibbo, on 22 February 2010, 10:06, said:

Looking at the logic flow here in the access logs...

xxx.xxx.169.147 - - [22/Feb/2010:22:52:54 +1300] "POST /checkout_process.php HTTP/1.1" 302 941 "http://www.mysite.com/checkout_confirmation.php" "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; InfoPath.2; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)" 
xxx.xxx.103.101 - - [22/Feb/2010:22:53:10 +1300] "GET /dps_pxpay_result_handler.php?result=v5VnhkMCFPp5IT5C9B9nE7svYV6GqLp0gQiUCNH6X8fxuAnzn2dRkaif6xmVGcAgYpB7QyJj14oCixpYbz-JRTo40RopUyM-ycHQc0hIG22vyQOdz6JALStZjL9KVoB9Rsn_ikobiY3r7kE-CyKaCAWWLgXk4h-QShzTxX1btn4eCBgZYa3ZiMXtzQLAYF6VsItqQM0p-VzqUv7veb_2AIF_XqZWCEc-Aws6esXnFwZy0Jq9rDrr82Q-b-6Q2gMioYkBRUfusAfNAx3NIDmnYQVbtPVH2JyZY7KPn5uRy6M3ybfXlaIG23xXBbSkicm8MdTxpR0B2CkZpOZ9A_4XwwW-9EwmNauRO0d5aHXIGi2UlQL2sdbFXC4aqNlQKNXqjyyNhuzKgF0w8b7GorXHBJAj-s5wGVi4oV6BxWVN0HRxu5MV-lSnjtxfJYxWYD0BTa21SO3l2lAaOZxo6NUcqZrVRk8S3c29CkxScgclhlTztdQ5p9NcXntfDqJCDSinGjb1jEtCItf-nXIFGUDTY9m3-fuxeZQYE8&userid=PxPayUserAcc_dev HTTP/1.1" 302 542 "-" "PXHOST" 
xxx.xxx.103.101 - - [22/Feb/2010:22:53:10 +1300] "GET /checkout_process.php?dps_done=true&txnId=3054b8253f6b0bd1&osCsid=efba66172f96af673934cfc5d7b35b22 HTTP/1.1" 302 440 "-" "PXHOST" 
xxx.xxx.103.101 - - [22/Feb/2010:22:53:10 +1300] "GET /login.php?osCsid=efba66172f96af673934cfc5d7b35b22 HTTP/1.1" 200 32117 "-" "PXHOST" 

The Site checkout_process.php sends the user to the PxPay site. Once the user gets a success box but does NOT click the next button, the PxPay site calls the dps_pxpay_result_handler.php with the success string as it should. The dps_pxpay_result_handler.php then issues a redirect back to PxPay to the checkout_process.php with the osCsid of the original customers session. Since the PxPay is not signed in to the site, to redirects to the login.php.

How do you configure this to accept the PxPay with other customers osCid's? This is needed as if the customer does not click the next button in the PxPay site, we will never receive the order, but we do receive the money.


Advise and help appreciated...
********
Did you sort this out, I have the same problem and cannot seem to work it out.

#11 Paul R1200

  • Community Member
  • 4 posts

Posted 20 November 2011, 22:19

Hi all, did anyone manage to fix this please?

thank you