Skip to content

Paypal Undefined class constant 'PAYMENT_INFO_BUTTON'  #1333

Closed
@chesuch-smarte

Description

@chesuch-smarte

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions