0

Using the standard / included Braintree payment method - i get the following error on Safari console when at the Checkout page for payment. The payment method is not shown on checkout, the others are (i.e paypal, cheque etc)

[Error] TypeError: undefined is not an object (evaluating 'this.messageContainer.addErrorMessage')

initObservablecc-form.js:159

initObservable
(anonymous function)
initialize
(anonymous function)
_super
initialize
(anonymous function)
_super
initialize
(anonymous function)
constr
initComponent
fire
fireWith
(anonymous function)
fire
fireWith
(anonymous function)
(anonymous function)
execCb
check
(anonymous function)
(anonymous function)
(anonymous function)
each
emit
check
(anonymous function)
(anonymous function)
(anonymous function)
each
emit
check
(anonymous function)
(anonymous function)
(anonymous function)
each
emit
check
(anonymous function)
(anonymous function)
(anonymous function)
each
emit
check
enable
init
callGetModule
completeLoad
onScriptLoad

What I have tried:

Apache, Ngnix, Litespeed webservers PHP7.0.* & 5.6.16+

The only time I have had it working was using apache+php5.6.18 using mod_php but never using FPM; Never had php70 working with it regardless of install type.

It seems like it wants to throw and error on screen but can't ?

Has anyone had any success with Braintree payment method? Did you encounter this error? IF so did you get around it?

1 Answer 1

1

Hi we have had exactly the same issue. We have tested on apache & nginx php5.6 and above only.. not php5.5.

Although the braintree composer requires php 5.5/5.6/7.0.0 It seems that the braintree payment method will only work with php 5.6.

We noted that for php 5.6 tokens are successfully generated but for php 7.0.0 and 7.0.3 they are not. The keys are encrypted in php 7.0.0 and above (which they are not in php5.6) and so braintree can not decrypt them and so the payment method can not initialise and in turn will not show on the checkout.

Although the keys are encrypted magento still saves the unencrypted keys in the database, we have had a quick play and can get it to work on php 7.0.0 by editing core files to test, but we have not had a chance to to figure out a proper solution.

Hope this helps.

2
  • Appreciate the response, at least i know its not a user error. Have you logged anything on Github? Just don't want to double up. In the mean time i am using a 3rd party module for Braintree which doesn't have the issue. This will get me through until the out of the box solution works with php7.
    – Rudi
    Mar 15, 2016 at 22:52
  • Yes added to github. hopefully they can resolve this one quite quickly.
    – b athey
    Mar 15, 2016 at 23:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.