We are transitioning over to a new forum platform. Please post new issues there. Existing threads will be dealt with here unless you choose to move them over. Visit the new forum

Forum

Thread tagged as: Question, Configuration, Shop

Braintree hosted fields

Hi! Is perch shop “prepared” for braintree hosted fields instead of the drop-in UI? https://www.braintreepayments.com/en-gb/products-and-features/custom-ui/hosted-fields

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

Braintree_ClientToken::generate()

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

  • 2 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 https://github.com/thephpleague/omnipay-braintree#basic-usage

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 2637 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 2637 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 2637 points
Perch Support

Ok, great!