Zen Cart Logo
Forums / Addon Payment Modules / PHP Fatal error: Class 'dps_pxpay' not found

PHP Fatal error: Class 'dps_pxpay' not found

Views: 1,822

Results 1 to 13 of 13
14 Feb 2017, 10:28 PM
#1
nsanford avatar

nsanford

New Zenner

Join Date:
Dec 2007
Posts:
69
Plugin Contributions:
1

PHP Fatal error: Class 'dps_pxpay' not found

Hello,

Would anyone have an idea on why I am getting the following debug logs? The PxPay module works well, but my debug folder is filling up with the below error. It's appears we get a couple of these errors just prior to an actual transaction going through.

[15-Feb-2017 09:38:32 Pacific/Auckland] PHP Fatal error:  Class 'dps_pxpay' not found in /home/***/public_html/shop/dps_pxpay_result_handler.php on line 44
15 Feb 2017, 12:06 AM
#2
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: PHP Fatal error: Class 'dps_pxpay' not found

Don't know if the plugin is downloadable or not, but if you post the code from the beginning of that file in the error message up to or a few lines after line 44, then it may be possible to identify the coding/installation error.

27 Apr 2017, 2:32 AM
#3
mikecnz avatar

mikecnz

New Zenner

Join Date:
Mar 2009
Location:
New Zealand
Posts:
76
Plugin Contributions:
0

Re: PHP Fatal error: Class 'dps_pxpay' not found

Hi,

Did you ever manage to get this sorted out? We are experiencing the same issue.

Thanks,

Mike

27 Apr 2017, 2:32 AM
#4
mikecnz avatar

mikecnz

New Zenner

Join Date:
Mar 2009
Location:
New Zealand
Posts:
76
Plugin Contributions:
0

Re: PHP Fatal error: Class 'dps_pxpay' not found

Hi,

We have experienced an issue with people combining carts after logging out and back in; once payment is made an error occurs and no order is created - however the customer is charged. Has anyone else experienced this issue and been able to solve it?

Thanks,

Mike

27 Apr 2017, 4:07 AM
#5
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: PHP Fatal error: Class 'dps_pxpay' not found

mikecnz:

Hi,

We have experienced an issue with people combining carts after logging out and back in; once payment is made an error occurs and no order is created - however the customer is charged. Has anyone else experienced this issue and been able to solve it?

Thanks,

Mike
Everyone experiences this issue when their plugins experience a fatal PHP error, since a fatal error stops PHP from executing past the point of the error .... thus, if it happens during processing a payment, the order won't get saved to the database even if the payment is collected.

The fix is in fixing the problems with the payment gateway. This usually starts with inspecting the exact errors that are occurring: http://www.zen-cart.com/content.php?124-blank-page

27 Apr 2017, 11:07 PM
#6
mikecnz avatar

mikecnz

New Zenner

Join Date:
Mar 2009
Location:
New Zealand
Posts:
76
Plugin Contributions:
0

Re: PHP Fatal error: Class 'dps_pxpay' not found

Hi,

The problem only occurs if the customer logs out and then logs in again and has items remaining in their cart from a previous session.
When the customer checks out they are able to make payment; however instead of being returned to our website after payment the customer is
presented with an HTTP 500 error.

The only error in the logs is the PHP Fatal error: Class 'dps_pxpay' not found in.... the odd thing is that this also appears when a successful transaction occurs.

Thanks,

Mike.

28 Apr 2017, 4:40 AM
#7
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: PHP Fatal error: Class 'dps_pxpay' not found

Been trying to follow the bouncing ball of this conversation/issue, not sure of sequence of events seeing as there have been post modifications. I also realize that two posts ago (in this thread) a suggestion was made that offers "global" solution advise. With the tidbit of information that has thus far been provided, would suggest as part of that code and myDebug log review to follow the existing "thread" of looking for where dps_dxpay is used/referenced. Also to investigate where the original code was provided (forum thread? Download? Etc...) and at least first validate that all files are included, and then to figure out if it is compatible with the existing system.

Otherwise, hopefully the discussion of the issue can stay in a single thread. :)

1 May 2017, 1:29 AM
#8
mikecnz avatar

mikecnz

New Zenner

Join Date:
Mar 2009
Location:
New Zealand
Posts:
76
Plugin Contributions:
0

Re: PHP Fatal error: Class 'dps_pxpay' not found

Thanks mc12345678,

The plugin was downloaded from here: https://www.zen-cart.com/downloads.php?do=file&id=658

As noted the sole error message in the log is:
PHP Fatal error: Class 'dps_pxpay' not found in ****/dps_pxpay_result_handler.php on line 44
This error shows in the log regardless of whether the transaction is successful (defined as order and payment received) or not (payment received but no order received).
There is no additional error in instances where the payment is received but not no order comes through.
If it helps, it appears that 6 instances of this error occur with each transaction.

Below is the code up to line 44 of dps_pxpay_result_handler.php:

?>
<?php


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

    // assume this is an DPS PxPay callback or redirect
    require('includes/application_top.php');
    // set language things
    $language_page_directory = DIR_WS_LANGUAGES . $_SESSION['language'] . '/';
    require(DIR_WS_CLASSES . 'payment.php');
    // this will load everything we need...
    $payment_modules = new payment($_SESSION['payment']);

    // create own instance
    $dpspxpay = new dps_pxpay(); 

My apologies; I know only a little HTML/CSS and very little about PHP. When I saw the error and googled it, I found this thread and hope that nsanford
may have resolved the issue.

Regards,

Mike.

27 Jul 2017, 9:43 AM
#9
dencom avatar

dencom

New Zenner

Join Date:
Sep 2006
Posts:
12
Plugin Contributions:
0

Re: PHP Fatal error: Class 'dps_pxpay' not found

Hi.
Just installed the DPS PXPAY gateway, same error messages appear in the log and had our first missing order.
Did you find a solution ?

Ross

27 Jul 2017, 1:17 PM
#10
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: PHP Fatal error: Class 'dps_pxpay' not found

I've never used this module, but it's possible that your cart is configured in such a way that the module's dependence on callbacks is failing.

You could explore making the following change:

/includes/modules/payment/dps_pxpay.php

        // support for fail proof result notification
        $this->_dpsResultRedirect = ('true' == ENABLE_SSL ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_HTTPS_CATALOG . 'dps_pxpay_result_handler.php';
        // without
        #$this->_dpsResultRedirect = zen_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL', false);

change to:

        // support for fail proof result notification
        $this->_dpsResultRedirect = ('true' == ENABLE_SSL ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_HTTPS_CATALOG . 'dps_pxpay_result_handler.php';
        // without
        [B]$this[/B]->_dpsResultRedirect = zen_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL', [B]true[/B]);

Note the removal of # and the change to true

28 Jul 2017, 3:06 AM
#11
dencom avatar

dencom

New Zenner

Join Date:
Sep 2006
Posts:
12
Plugin Contributions:
0

Re: PHP Fatal error: Class 'dps_pxpay' not found

Hi
The above has corrected the Debug log from been created. Thanks
On further testing I suspect the missing order is because, once the customer is forwarded to DPS, enters in there details and submits, the transaction result are shown with a Big Red 'Next' button, if they do not select it to return to zencart, the transaction is not completed, although DPS has processed the credit card.

Ross

28 Jul 2017, 5:51 AM
#12
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: PHP Fatal error: Class 'dps_pxpay' not found

dencom:

Hi
The above has corrected the Debug log from been created. Thanks
On further testing I suspect the missing order is because, once the customer is forwarded to DPS, enters in there details and submits, the transaction result are shown with a Big Red 'Next' button, if they do not select it to return to zencart, the transaction is not completed, although DPS has processed the credit card.

Ross
Yes, if the payment gateway doesn't automatically send them back, then you'll be vulnerable to this problem. Ask them if they have a more reliable way. Else you could be losing orders.

21 Dec 2017, 11:44 PM
#13
mikecnz avatar

mikecnz

New Zenner

Join Date:
Mar 2009
Location:
New Zealand
Posts:
76
Plugin Contributions:
0

Re: PHP Fatal error: Class 'dps_pxpay' not found

Hi,

Further to the above I have spoken with DPS and they say the issue is with the plugin (no elaboration on what exactly the issue is). They did however offer to switch off the requirement to hit the next button and return the customer directly to my own confirmation page - this appears to have solved our issue.

Regards,

Michael Cammell