Skip to content
This repository has been archived by the owner on Mar 27, 2021. It is now read-only.

Update example createToken usage #9

Merged
merged 1 commit into from
May 14, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,12 +106,12 @@ class CheckoutForm extends React.Component {

// Within the context of `Elements`, this call to createToken knows which Element to
// tokenize, since there's only one in this group.
this.props.stripe.createToken({owner: {name: 'Jenny Rosen'}}).then(({token}) => {
this.props.stripe.createToken({name: 'Jenny Rosen'}).then(({token}) => {
console.log('Received Stripe token:', token);
});

// However, this line of code will do the same thing:
// this.props.stripe.createToken({type: 'card', owner: {name: 'Jenny Rosen'}});
// this.props.stripe.createToken({type: 'card', name: 'Jenny Rosen'});
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also type doesn't appear to be mentioned in the docs: https://stripe.com/docs/elements/reference#stripe-create-token

}

render() {
Expand Down