braintree-react
Advanced tools
Comparing version 3.0.0 to 3.0.1
@@ -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` |
'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 [](https://travis-ci.org/jeffcarp/braintree-react) [](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 @@ |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
11053
68
0