Thread tagged as: Question, Configuration, Shop

Braintree hosted fields

Hi! Is perch shop “prepared” for braintree hosted fields instead of the drop-in UI?

I have limited PHP knowledge but was hoping to get it working with the online docs and some help. It looks like there is not too much to do server-side anyway once you have the PHP SDK. Tried to generate a client token with


but got some errors. I suppose that it is possible to set it up but don't really know where to look first.

Would be great to figure this out since the dropin UI is only available in english hence useless for non english sites.

Proko Mountrichas

Proko Mountrichas 3 points

  • 5 years ago
Rachel Andrew

Rachel Andrew 394 points
Perch Support

We've currently only tested the drop-in UI.

Does the other method work with OmniPay?

Yes I think it does. Just checked and found

The generated token will come in handy when using the Javascript SDK to display the Drop-in Payment UI or hosted fields used to collect payment method information.

In this repo I can see similarities with the Perch code. I'll have a closer look.

Do you think it could be something easy or possible to add to the shop?

Drew McLellan

Drew McLellan 2638 points
Perch Support

Everything we have currently focuses on passing the customer to the payment provider in order to collect credit card details. The hosted fields approach brings the credit card number etc onto your server and therefore opens up a host of PCI-DSS issues.

Technically I think this is something we can add, but we need to formulate a way of making sure the developer understands the implications before enabling this type of gateway implementation.

Thanks for your answer Drew. From their docs I get that drop-in UI and Hosted fields provide the same level of PCI compliance. Braintree PCI

In the case of hosted fields the cc fields are hosted in Braintree's servers and loaded through an iframe. Is there something they don't mention or I don't understand well?

Drew McLellan

Drew McLellan 2638 points
Perch Support

Ah, ok, I'd not realised that subtlety. I'll take another look.

Hi there. I followed their docs and just changing the gateway template file braintree_payment_form.html looks to be enough for hosted fields to work. I've documented some very basic details in the first post of my website

Drew McLellan

Drew McLellan 2638 points
Perch Support

Ok, great!