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.
Code:
[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.
Re: Use of undefined constant MODULE_PAYMENT_PAYFLOW_TRANSACTION_MODE
Quote:
Originally Posted by
DigitalShadow
1.5.6c - php 7.3.22
Getting this error alot, admin folder has been renamed.
Code:
[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.
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
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:
Code:
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
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.
Re: Use of undefined constant MODULE_PAYMENT_PAYFLOW_TRANSACTION_MODE
Quote:
Originally Posted by
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:
Code:
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.
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?
Re: Use of undefined constant MODULE_PAYMENT_PAYFLOW_TRANSACTION_MODE
Quote:
Originally Posted by
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.
Re: Use of undefined constant MODULE_PAYMENT_PAYFLOW_TRANSACTION_MODE
The Software Guy is spot on, thank you for the fix!
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.