vendure-ecommerce/real-world-vendure

How to add braintree plugin to the plugin array

dhuber666 opened this issue · 2 comments

Hiho,

awesome library so far. I wanted to add payment to the server and followed the readme from over here:

https://github.com/vendure-ecommerce/real-world-vendure/tree/master/src/plugins/braintree

But after installing braintree I can't just import it and then add it to the plugins array. This is missing in the docs? How to add this plugin?

I want to just test payment. Right now I'm at the last step of the first test order and it's adding payment and the actual payment.

There is also a option in the vendure-config.ts that caught my eye:

paymentOptions: { paymentMethodHandlers: [examplePaymentHandler], },

Does this mean there is already a fake payment in place to test it out?

Hi,

Does this mean there is already a fake payment in place to test it out?

Yes, we bundle a fake payment provider, so you should already be able to complete the order flow with that.

But after installing braintree I can't just import it and then add it to the plugins array.

I'm not sure what you mean by "after installing braintree". Did you copy the entire /braintree directory to your project? If so, you should indeed be able to then add the BraintreePlugin to your config plugins array, as seen here:

Hi,

nope I did it like this:

yarn add braintree @types/braintree

And then tried to import braintree and add it to the plugins array.
So I also need the whole braintree folder and copy it into my project? I think I got it now.

Thanks for getting back to me so quickly.