New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

braintree-react

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

braintree-react - npm Package Compare versions

Comparing version 3.0.0 to 3.0.1

6

CHANGELOG.md

@@ -1,3 +0,7 @@

# 3.0.0 - December 2015
### `3.0.1` - December 2015
- Replace `const` with `var` to obviate need for a transpiler [#18](https://github.com/jeffcarp/braintree-react/pull/18) (christensena)
# `3.0.0` - December 2015
- The `clientToken` prop is now required. `DropIn` will no longer fall back to using a fake client token.

@@ -4,0 +8,0 @@ - Removed the ability to rely on `window.react` - you now must use CommonJS to build `braintree-react`.

# Deploy checklist
- `npm test`
- Update [CHANGELOG.md](CHANGELOG.md)
- Bump version in `package.json`

@@ -5,0 +6,0 @@ - `git add package.json`

6

lib/dropin.js
'use strict';
const React = require('react');
const ReactDOM = require('react-dom');
var React = require('react');
var ReactDOM = require('react-dom');
const DropIn = React.createClass({
var DropIn = React.createClass({

@@ -8,0 +8,0 @@ displayName: 'BraintreeDropIn',

{
"name": "braintree-react",
"version": "3.0.0",
"version": "3.0.1",
"description": "A React component for Braintree Drop-In",

@@ -5,0 +5,0 @@ "main": "index.js",

# Braintree React Component [![Build Status](https://travis-ci.org/jeffcarp/braintree-react.svg?branch=master)](https://travis-ci.org/jeffcarp/braintree-react) [![npm version](http://img.shields.io/npm/v/braintree-react.svg?style=flat)](https://www.npmjs.org/package/braintree-react)
This is a React component that wraps the Drop-In integration from `braintree-web`. For issues and information concerning `braintree-web` in general, please [see that repo](https://github.com/braintree/braintree-web).
This is a React component that wraps the Drop-In integration from `braintree-web`. For issues and information concerning `braintree-web` in general, please see [`braintree/braintree-web`](https://github.com/braintree/braintree-web).

@@ -29,17 +29,23 @@ > Disclaimer: this is not an official Braintree module.

### `clientToken`
### `braintree` (required)
The client token used to perform the transaction.
This should be `braintree-web`.
### `onNonceReceived`
### `clientToken` (required)
The client token used to set up the integration. Learn [how to generate a client token](https://developers.braintreepayments.com/start/hello-server#generate-a-client-token).
### `onPaymentMethodReceived`
By default, once Drop-In receives a credit card nonce it submits the outer form. To intercept any nonce, use this callback:
```js
var nonceReceived = function(event, nonce) {
var nonceReceived = function (payload) {
console.log(nonce);
};
<DropIn braintree={braintree} onNonceReceived={nonceReceived} />
<DropIn braintree={braintree} onPaymentMethodReceived={nonceReceived} />
```
[See `onPaymentMethodReceived` in Braintree docs](https://developers.braintreepayments.com/guides/client-sdk/javascript/v2#global-setup)
### `onReady`

@@ -46,0 +52,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc