braintree-web-drop-in

WebJar for braintree-web-drop-in

License

License

MIT
Categories

Categories

Github Development Tools Version Controls
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

github-com-braintree-braintree-web-drop-in
Last Version

Last Version

1.21.0
Release Date

Release Date

Type

Type

jar
Description

Description

braintree-web-drop-in
WebJar for braintree-web-drop-in
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/braintree/braintree-web-drop-in

Download github-com-braintree-braintree-web-drop-in

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/github-com-braintree-braintree-web-drop-in/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>github-com-braintree-braintree-web-drop-in</artifactId>
    <version>1.21.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/github-com-braintree-braintree-web-drop-in/
implementation 'org.webjars.npm:github-com-braintree-braintree-web-drop-in:1.21.0'
// https://jarcasting.com/artifacts/org.webjars.npm/github-com-braintree-braintree-web-drop-in/
implementation ("org.webjars.npm:github-com-braintree-braintree-web-drop-in:1.21.0")
'org.webjars.npm:github-com-braintree-braintree-web-drop-in:jar:1.21.0'
<dependency org="org.webjars.npm" name="github-com-braintree-braintree-web-drop-in" rev="1.21.0">
  <artifact name="github-com-braintree-braintree-web-drop-in" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='github-com-braintree-braintree-web-drop-in', version='1.21.0')
)
libraryDependencies += "org.webjars.npm" % "github-com-braintree-braintree-web-drop-in" % "1.21.0"
[org.webjars.npm/github-com-braintree-braintree-web-drop-in "1.21.0"]

Dependencies

compile (7)

Group / Artifact Type Version
org.webjars.npm : braintree-web jar [3.55.0]
org.webjars.npm : braintree__wrap-promise jar [2.0.0]
org.webjars.npm : braintree__event-emitter jar [0.3.0]
org.webjars.npm : braintree__asset-loader jar [0.3.1]
org.webjars.npm : promise-polyfill jar [8.1.3]
org.webjars.npm : braintree__browser-detection jar [1.9.0]
org.webjars.npm : braintree__class-list jar [0.1.0]

Project Modules

There are no modules declared in this project.

Braintree Web Drop-in

Build Status Build Status Build Status Build Status

npm version

A pre-made payments UI for accepting cards and alternative payments in the browser built using version 3 of the Braintree JS client SDK.

If you have any feedback or questions, create an issue or contact Braintree support.

What's new

  • Updated UI to easily accommodate multiple payment methods
  • Not in an iframe; feel free to style Drop-in to blend in with your website
  • Now available in 23 languages
  • Open source and open development

Getting started

For setup and usage, see our reference.

Full example

This is a full example of a Drop-in integration that only accepts credit cards.

<!DOCTYPE html>
<html lang="en">
 <head>
   <meta charset="utf-8">
   <title>Checkout</title>
 </head>
 <body>
   <div id="dropin-container"></div>
   <button id="submit-button">Purchase</button>

   <script src="https://js.braintreegateway.com/web/dropin/1.26.0/js/dropin.min.js"></script>

   <script>
     var submitButton = document.querySelector('#submit-button');

     braintree.dropin.create({
       authorization: 'CLIENT_AUTHORIZATION',
       selector: '#dropin-container'
     }, function (err, dropinInstance) {
       if (err) {
         // Handle any errors that might've occurred when creating Drop-in
         console.error(err);
         return;
       }
       submitButton.addEventListener('click', function () {
         dropinInstance.requestPaymentMethod(function (err, payload) {
           if (err) {
             // Handle errors in requesting payment method
           }

           // Send payload.nonce to your server
         });
       });
     });
   </script>
 </body>
</html>

Browser support

Drop-in is supported in all browsers supported by the Braintree JavaScript Client SDK.

Customization

The design of Drop-in is intentionally opinionated, and while we aimed to make the design work in many scenarios, the design of your website may conflict with the default design of Drop-in.

For minor UI customizations, review our documentation.

For more substantial changes, you may fork Drop-in, make your desired changes and build the assets by running npm run build. By default, Drop-in uses a hosted version of the built stylesheet. To override this behavior and use a custom stylesheet instead, simply add <link> tag to your page with the id braintree-dropin-stylesheet.

Drop-in uses the Braintree JavaScript SDK. So if a fully customized UI is what you're looking for, Drop-in may be used as a reference implementation for using the JavaScript SDK.

License

Drop-in is open source and available under the MIT license. See the LICENSE file for more info.

org.webjars.npm

Braintree

Versions

Version
1.21.0