Code Monkey home page Code Monkey logo

Comments (8)

diafygi avatar diafygi commented on September 14, 2024

Agreed. There is no reference in the Javascript SDK documentation for what functions and objects are available and what parameters can be used.

Questions I have for braintree.setup('your-client-token', 'custom', {container: 'payment-form'});

  1. What does the 2nd argument mean and what can you put there?
  2. What keys and values can be used in the config object (assuming that's what the 3rd argument is)?

Also, in the README, it references other low-level functions like tokenizeCard, but there is no documentation for those at all.

from braintree-web.

kt32291 avatar kt32291 commented on September 14, 2024

+1! It took me a stupid long time to figure this out (esp that you could define a container for a paypal option with a custom form), and I eventually found the answer I was looking for on a stack overflow question that had barely had any traffic.

braintree.setup("client-token", "custom", {
  id: "payment-form",
  paypal: {
    container: "paypal-container"
  }
});

from braintree-web.

jeffcarp avatar jeffcarp commented on September 14, 2024

Hey @diafygi & @kt32291, thanks for echoing this - braintree.setup is sparsely documented which is frustrating to all parties involved.

I'm opening a PR here (#11) that begins to add comprehensive documentation for it. I'm not sure whether people will want the final version to live in this README or on our docs site, but it's a start and hopefully it helps answer some questions.

from braintree-web.

lordspace avatar lordspace commented on September 14, 2024

Yes! It should be better!

from braintree-web.

rturumella avatar rturumella commented on September 14, 2024

Hi all,

We updated our documentation a while back - take a look at these links and let us know if that helps clear things up!

https://developers.braintreepayments.com/javascript+dotnet/guides/hosted-fields/setup-and-integration#braintree.setup

https://developers.braintreepayments.com/javascript+dotnet/guides/client-sdk#global-setup

from braintree-web.

mackstann avatar mackstann commented on September 14, 2024

For what it's worth, the new documentation is great, but I had no idea how to find it. Nothing in that left side menu looked obviously related, and the search function did not help. I had to google and go through this Github ticket in order to find it. I would have never thought it would be in the "Additional Features -> Hosted Fields (beta)" menu. It seems like a pretty core piece of functionality; it should probably be much more obvious to find.

from braintree-web.

crookedneighbor avatar crookedneighbor commented on September 14, 2024

Closing this issue because the links @rturumella provided should answer the original issue.

@mackstann I've passed your feedback onto our documentation team. Thanks for letting us know you had difficulty getting to the page. We'll keep it in mind as we improve the docs site.

from braintree-web.

pblesi avatar pblesi commented on September 14, 2024

Hi everyone,

I'm pleased to announce that we have consolidated documentation for braintree.setup and posted it in the Client References section of our docs site.

from braintree-web.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.