![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
braintree-web-drop-in
Advanced tools
[![Build Status](https://github.com/braintree/braintree-web-drop-in/workflows/Unit%20Tests/badge.svg)](https://github.com/braintree/braintree-web-drop-in/actions?query=workflow%3A%22Unit+Tests%22) [![Build Status](https://github.com/braintree/braintree-we
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.
For setup and usage, see our reference.
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.37.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>
Drop-in is supported in all browsers supported by the Braintree JavaScript Client SDK.
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.
Drop-in is open source and available under the MIT license. See the LICENSE file for more info.
1.37.0
promise-polyfill
FAQs
[![Build Status](https://github.com/braintree/braintree-web-drop-in/workflows/Unit%20Tests/badge.svg)](https://github.com/braintree/braintree-web-drop-in/actions?query=workflow%3A%22Unit+Tests%22) [![Build Status](https://github.com/braintree/braintree-we
The npm package braintree-web-drop-in receives a total of 15,161 weekly downloads. As such, braintree-web-drop-in popularity was classified as popular.
We found that braintree-web-drop-in demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.