Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Paypal Undefined class constant 'PAYMENT_INFO_BUTTON' #1333

Closed
chesuch-smarte opened this issue Dec 9, 2020 · 1 comment
Closed

Paypal Undefined class constant 'PAYMENT_INFO_BUTTON' #1333

chesuch-smarte opened this issue Dec 9, 2020 · 1 comment
Labels

Comments

@chesuch-smarte
Copy link

Summary (*)

When returning from Paypal Express Checkout, experience fatal error.

[error] 573178#0: *24104 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught Error: Undefined class constant 'PAYMENT_INFO_BUTTON' in /var/www/vhosts/staging/brooktaverner/htdocs/app/code/core/Mage/Paypal/Block/Express/Review.php:227
Stack trace:
#0 /var/www/vhosts/staging/brooktaverner/htdocs/app/code/core/Mage/Core/Block/Abstract.php(936): Mage_Paypal_Block_Express_Review->_beforeToHtml()
#1 /var/www/vhosts/staging/brooktaverner/htdocs/app/code/core/Mage/Core/Block/Text/List.php(45): Mage_Core_Block_Abstract->toHtml()
#2 /var/www/vhosts/staging/brooktaverner/htdocs/app/code/core/Mage/Core/Block/Abstract.php(937): Mage_Core_Block_Text_List->_toHtml()
#3 /var/www/vhosts/staging/brooktaverner/htdocs/app/code/core/Mage/Core/Block/Abstract.php(655): Mage_Core_Block_Abstract->toHtml()
#4 /var/www/vhosts/staging/brooktaverner/htdocs/app/code/core/Mage/Core/Block/Abstract.php(599): Mage_Core_Block_Abstract->_getChildHtml('content', true)

I have noticed that this file:
app/code/core/Mage/Paypal/Block/Express/Review.php - _beforeToHtml()

has the code change from:
// misc shipping parameters $this->setShippingMethodSubmitUrl($this->getUrl("{$this->_paypalActionPrefix}/express/saveShippingMethod")) ->setCanEditShippingAddress($this->_quote->getMayEditShippingAddress()) ->setCanEditShippingMethod($this->_quote->getMayEditShippingMethod()) ;

to this code
$canEditShippingAddress = $this->_quote->getMayEditShippingAddress() && $this->_quote->getPayment() ->getAdditionalInformation(Mage_Paypal_Model_Express_Checkout::PAYMENT_INFO_BUTTON) == 1; // misc shipping parameters $this->setShippingMethodSubmitUrl($this->getUrl("{$this->_paypalActionPrefix}/express/saveShippingMethod")) ->setCanEditShippingAddress($canEditShippingAddress) ->setCanEditShippingMethod($this->_quote->getMayEditShippingMethod()) ;

and I checked the quote.getAdditionalInformation record and it had no "button" data within it.

Is anybody else experiencing this issue?

Examples (*)

Proposed solution

@fballiano
Copy link
Contributor

In my code the Mage_Paypal_Model_Express_Checkout::PAYMENT_INFO_BUTTON is correctly defined.

I'm closing this issue since there was no feedback for more than a year, feel free to reopen it if you can add more info or possibly a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants