Forums / PayPal Website Payments Pro support / Use of undefined constant MODULE_PAYMENT_PAYFLOW_TRANSACTION_MODE

Use of undefined constant MODULE_PAYMENT_PAYFLOW_TRANSACTION_MODE

Views: 10,190

Results 1 to 10 of 10
11 Sep 2020, 4:16 PM
#1
digitalshadow avatar

digitalshadow

Totally Zenned

Join Date:
Mar 2009
Posts:
616
Plugin Contributions:
0

Use of undefined constant MODULE_PAYMENT_PAYFLOW_TRANSACTION_MODE

1.5.6c - php 7.3.22

Getting this error alot, admin folder has been renamed.

[11-Sep-2020 17:10:02 Europe/London] Request URI: /admin/orders.php?oID=613520&action=edit, IP address: removed
#1  require(/home/store/public_html/includes/modules/payment/paypal/paypalwpp_admin_notification.php) called at [/home/store/public_html/includes/modules/payment/paypaldp.php:987]
#2  paypaldp->admin_notification() called at [/home/store/public_html/admin/orders.php:863]
--> PHP Warning: Use of undefined constant MODULE_PAYMENT_PAYFLOW_TRANSACTION_MODE - assumed 'MODULE_PAYMENT_PAYFLOW_TRANSACTION_MODE' (this will throw an Error in a future version of PHP) in /home/store/public_html/includes/modules/payment/paypal/paypalwpp_admin_notification.php on line 419.
11 Sep 2020, 4:28 PM
#2
mc12345678 avatar

mc12345678

Totally Zenned

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

Re: Use of undefined constant MODULE_PAYMENT_PAYFLOW_TRANSACTION_MODE

DigitalShadow:

1.5.6c - php 7.3.22

Getting this error alot, admin folder has been renamed.

[11-Sep-2020 17:10:02 Europe/London] Request URI: /admin/orders.php?oID=613520&action=edit, IP address: removed
#1 require(/home/store/public_html/includes/modules/payment/paypal/paypalwpp_admin_notification.php) called at [/home/store/public_html/includes/modules/payment/paypaldp.php:987]
#2 paypaldp->admin_notification() called at [/home/store/public_html/admin/orders.php:863]
--> PHP Warning: Use of undefined constant MODULE_PAYMENT_PAYFLOW_TRANSACTION_MODE - assumed 'MODULE_PAYMENT_PAYFLOW_TRANSACTION_MODE' (this will throw an Error in a future version of PHP) in /home/store/public_html/includes/modules/payment/paypal/paypalwpp_admin_notification.php on line 419.

This is a value/constant that is installed as part of paypaldp when going through the install process of it.  if that is the version/type of paypal installed, would recommend capturing all of the pertinent data, remove the module from admin->modules->payment, then install it again and enter in the captured data.  There may be other things missing from the upgrade path/process used.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

11 Sep 2020, 6:11 PM
#3
digitalshadow avatar

digitalshadow

Totally Zenned

Join Date:
Mar 2009
Posts:
616
Plugin Contributions:
0

Re: Use of undefined constant MODULE_PAYMENT_PAYFLOW_TRANSACTION_MODE

I think it might be because I’m using payaplwpp in PayPal mode instead of payflow while still using paypaldp

15 Sep 2020, 8:48 AM
#4
terragirl avatar

terragirl

Zen Follower

Join Date:
Jun 2010
Location:
Austria
Posts:
123
Plugin Contributions:
0

Re: Use of undefined constant MODULE_PAYMENT_PAYFLOW_TRANSACTION_MODE

I have the same problem, and looking at the Zen Cart code I cannot find the "install" code for constant "MODULE_PAYMENT_PAYFLOW_TRANSACTION_MODE". It's mentioned twice in file /includes/modules/payment/paypal/paypalwpp_admin_notification.php:

    if (method_exists($this, '_doVoid') && (MODULE_PAYMENT_PAYPALDP_TRANSACTION_MODE == 'Auth Only' || MODULE_PAYMENT_PAYFLOW_TRANSACTION_MODE == 'Auth Only' || $authcapt_on)) {
        $output .= $outputVoid;
    }
    if (method_exists($this, '_doCapt') && (MODULE_PAYMENT_PAYPALDP_TRANSACTION_MODE == 'Auth Only' || MODULE_PAYMENT_PAYFLOW_TRANSACTION_MODE == 'Auth Only' || $authcapt_on)) {
        $output .= $outputCapt;
    }

But there's no code I can see which would install it. Is this a bug or am I missing something in the code? I would expect to find it in the paypaldp.php file, but it's not in there (Zen Cart version 1.5.7).

with kind regards, Edith

15 Sep 2020, 10:24 AM
#5
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,729
Plugin Contributions:
56

Re: Use of undefined constant MODULE_PAYMENT_PAYFLOW_TRANSACTION_MODE

This is a new more strict PHP producing this error, since you don't have Payflow installed

In includes/modules/payment/paypal/paypalwpp_admin_notification.php
change

MODULE_PAYMENT_PAYFLOW_TRANSACTION_MODE == 'Auth Only'

to

(defined('MODULE_PAYMENT_PAYFLOW_TRANSACTION_MODE') && MODULE_PAYMENT_PAYFLOW_TRANSACTION_MODE == 'Auth Only')

in the two places it is found.

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

15 Sep 2020, 10:34 AM
#6
mc12345678 avatar

mc12345678

Totally Zenned

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

Re: Use of undefined constant MODULE_PAYMENT_PAYFLOW_TRANSACTION_MODE

terraGirl:

I have the same problem, and looking at the Zen Cart code I cannot find the "install" code for constant "MODULE_PAYMENT_PAYFLOW_TRANSACTION_MODE". It's mentioned twice in file /includes/modules/payment/paypal/paypalwpp_admin_notification.php:

if (method_exists($this, '_doVoid') && (MODULE_PAYMENT_PAYPALDP_TRANSACTION_MODE == 'Auth Only' || MODULE_PAYMENT_PAYFLOW_TRANSACTION_MODE == 'Auth Only' || $authcapt_on)) {
    $output .= $outputVoid;
}
if (method_exists($this, '_doCapt') && (MODULE_PAYMENT_PAYPALDP_TRANSACTION_MODE == 'Auth Only' || MODULE_PAYMENT_PAYFLOW_TRANSACTION_MODE == 'Auth Only' || $authcapt_on)) {
    $output .= $outputCapt;
}
> 
> 
> But there's no code I can see which would install it. Is this a bug or am I missing something in the code? I would expect to find it in the paypaldp.php file, but it's not in there (Zen Cart version 1.5.7). 
> 
> with kind regards, Edith
Line 1070 of paypaldp.php from ZC 1.5.7 should have the install code. If not, then there is something else that is not quite right.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

15 Sep 2020, 10:51 AM
#7
digitalshadow avatar

digitalshadow

Totally Zenned

Join Date:
Mar 2009
Posts:
616
Plugin Contributions:
0

Re: Use of undefined constant MODULE_PAYMENT_PAYFLOW_TRANSACTION_MODE

I am using paypalwpp and paypaldp but cant use payflow-uk mode as it doesn't work for me, so using paypaldp with paypalwpp in paypal mode.

Is that the reason for the constant not being defined?

15 Sep 2020, 10:56 AM
#8
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,729
Plugin Contributions:
56

Re: Use of undefined constant MODULE_PAYMENT_PAYFLOW_TRANSACTION_MODE

mc12345678:

Line 1070 of paypaldp.php from ZC 1.5.7 should have the install code. If not, then there is something else that is not quite right.

It has MODULE_PAYMENT_PAYPALDP_TRANSACTION_MODE not MODULE_PAYMENT_PAYFLOW_TRANSACTION_MODE, and the issue is caused by the latter.

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

15 Sep 2020, 12:08 PM
#9
terragirl avatar

terragirl

Zen Follower

Join Date:
Jun 2010
Location:
Austria
Posts:
123
Plugin Contributions:
0

Re: Use of undefined constant MODULE_PAYMENT_PAYFLOW_TRANSACTION_MODE

The Software Guy is spot on, thank you for the fix!

15 Sep 2020, 3:56 PM
#10
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,729
Plugin Contributions:
56

Re: Use of undefined constant MODULE_PAYMENT_PAYFLOW_TRANSACTION_MODE

This has been accepted as a bugfix and will be included in 1.5.7a.

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.