We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 94bb7b5 commit d742067Copy full SHA for d742067
server/client/src/components/Payments.js
@@ -1,5 +1,7 @@
1
import React, { Component } from 'react';
2
import StripeCheckout from 'react-stripe-checkout';
3
+import { connect } from 'react-redux';
4
+import * as actions from '../actions';
5
6
class Payments extends Component {
7
render() {
@@ -8,7 +10,7 @@ class Payments extends Component {
8
10
name="Emaily"
9
11
description="$5 for 5 email credits"
12
amount={500}
- token={token => console.log(token)}
13
+ token={token => this.props.handleToken(token)}
14
stripeKey={process.env.REACT_APP_STRIPE_KEY}
15
>
16
<button className="btn">
@@ -19,4 +21,4 @@ class Payments extends Component {
19
21
}
20
22
23
-export default Payments;
24
+export default connect(null, actions)(Payments);
0 commit comments