Skip to content
Advertisement

Hosted fields in braintree gives error “Cannot determine payment method” PHP Laravel

Can anyone please explain me how could i make a working Braintree payment with hosted fields, in Laravel. I tried to look at the documentation myself but i couldn’t make it working.

i created the token in the controller to be sent to the view like:

JavaScript

On the blade view i have this JS:

JavaScript

});

Here is the method in were i process the payment:

JavaScript

can anyone help me, understand what is missing?

Advertisement

Answer

i solved it, i actually found an workaround, i had to create a controller for the hosted fields, and it worked.

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement