tuyakhov / yii2-braintree Goto Github PK
View Code? Open in Web Editor NEWIntegrate a credit card payment form with Braintree's API into Yii2
Integrate a credit card payment form with Braintree's API into Yii2
Re: BrainTreeForm->addErrorFromResponse
Could you provide and example of $key and attribute for:
$key . '_' . $error->attribute
I suspect things must be happening a little different with payment_method_nonce or perhaps becuase using (braintreeClient.tokenizeCard) - to the point, errors errors arn't being added for me.
I can get work around with:
foreach ($result->errors->deepAll() as $error) {
$this->addError(($error->attribute), $error->message);
}
however for example with an invalid expiry I get an attribute name of expirationDate rather than creditCard_expirationDate - which would perhaps indicate that your $key somehow might be creditCard for that attribute but unclear as to why.
I am not sure about paymentMethodToken, but with nonce at least, credit card number etc arn't posted hence loading into the model doesn't happen therefore $values doesn't contain any keys for credit card number, expiry etc.
As per a previous issue - I am hoping to be able to make this extension more versatile as opposed to creating a different one.
Thank you for the extension, but there is no drop-in container inside the form, would you please update it so it will be more easy to implement with validations. Is there a step by step guide on how to use it?
Regards;;
Thanks for the extension.
Just going thru integrating with my application now, noticed credit card create is deprecated so though I would mention.
I tried to get this extantoin by using
php composer.phar require --prefer-dist tuyakhov/yii2-braintree "*"
and get error like that:
Your requirements could not be resolved to an installable set of packages.
Problem 1
- The requested package tuyakhov/yii2-braintree could not be found in any version, there may be a typo in the package name.
Potential causes:
Read https://getcomposer.org/doc/articles/troubleshooting.md for further common problems.
What I did wrong ? I will confess that I am not good at using composer
Hey,
I added "tuyakhov/yii2-braintree": "*"
to my composer.json which already contains "braintree/braintree_php" : "3.5.0"
and ran composer update
. I got this error message:
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for tuyakhov/yii2-braintree * -> satisfiable by tuyakhov/yii2-braintree[1.0.1].
- tuyakhov/yii2-braintree 1.0.1 requires npm-asset/braintree-web 2.10.* -> no matching package found.
Potential causes:
- A typo in the package name
- The package is not available in a stable-enough version according to your minimum-stability setting
see <https://groups.google.com/d/topic/composer-dev/_g3ASeIFlrc/discussion> for more details.
Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.
After some research in the composer repos I added "npm-asset/braintree-web": "2.10.*"
to the composer.json but that didn't help.
What am I doing wrong?
Thanks in advance for the help
lx4r
Hi Dear,
I need to implement the Braintree in yii2, Please suggest if this is working?
I checked issues tab but there is no issue.
Please provide setup details also. Thanks in advance.
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).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.