Skip to content

Commit d742067

Browse files
committed
post stripe token
1 parent 94bb7b5 commit d742067

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

server/client/src/components/Payments.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import React, { Component } from 'react';
22
import StripeCheckout from 'react-stripe-checkout';
3+
import { connect } from 'react-redux';
4+
import * as actions from '../actions';
35

46
class Payments extends Component {
57
render() {
@@ -8,7 +10,7 @@ class Payments extends Component {
810
name="Emaily"
911
description="$5 for 5 email credits"
1012
amount={500}
11-
token={token => console.log(token)}
13+
token={token => this.props.handleToken(token)}
1214
stripeKey={process.env.REACT_APP_STRIPE_KEY}
1315
>
1416
<button className="btn">
@@ -19,4 +21,4 @@ class Payments extends Component {
1921
}
2022
}
2123

22-
export default Payments;
24+
export default connect(null, actions)(Payments);

0 commit comments

Comments
 (0)