tuyakhov / yii2-braintree

Integrate a credit card payment form with Braintree's API into Yii2
3 stars 11 forks source link

Taking it further #4

Open andrewblake1 opened 8 years ago

andrewblake1 commented 8 years ago

Hi

Thanks for great extension - seems pretty sturdy so far :)

I believe that you might be using this in an application where you have customers perhaps sign up and add a payment method.

My application takes payment from joe public rather than existing users.

For this I only needed to add a paymentMethodNonce into your BraintreeForm.

I also needed to initialise the form a little differently - due to client side validation amongst other things.

Do you want to keep this as just your work or are you happy for me to potentially contribute in the form of a pull request for some new functionality - and maybe add some more documentation.

I need to add refunds, and probably more things in the future. My thoughts are that it is best to have one good braintree extension than many different forks employing different parts of the Braintree API.

I am not sure if you do any client side validation or what braintree has to offer for client side validation. I have created an extension based on an offering from stripe that works fine your extension (a couple of tweaks). It validates credit card numbers as being typed, sets a card type icon when card type is determinable (fontawesome) and validates future date, csv as well as suitably masking and working with yiiactiveform for success and error e.g. similar to http://stripe.github.io/jquery.payment/example/.

I would need to alter further, as currently that extension is based on bootstrap activeform (puts credit card icon into addon).

tuyakhov commented 8 years ago

Hi @andrewblake1 Thanks for your comment. I am sorry for delay. This extension is oriented for simple websites and for simple charging using Braintree. There are a lot of cool and necessary features that Braintree provides. And it would be great if you will help me to implement those. But i believe it would be more efficient to start from scratch. Or maybe it would be better to keep it simple as possible. I didn't use this extension for a long time. And i am sure if i will use it in near future. So it would be hard for me to find a free time to maintain it. But anyway i am open for propositions