cancel
Showing results for 
Search instead for 
Did you mean: 

Magento 2.4.8 – PayPal Braintree getGrandTotalAmount() TypeError

Magento 2.4.8 – PayPal Braintree getGrandTotalAmount() TypeError

We are working on a custom payment integration in Magento 2.4.8.
After completing the payment, we are encountering the following error from the PayPal_Braintree module (screenshot attached):

Details:

  • We did not extend or override the PayPal Braintree module.

  • The error occurs right after order placement is completed.

  • It seems the getGrandTotalAmount() method is returning a string instead of a float, which triggers a type error in PHP 8.

Has anyone else run into this issue when using a custom payment method in Magento 2.4.8?
What would be the best way to fix the issue that the PayPal_Braintree module does not break?

paypal_issue.png