implement requesting of /membership (payment) api

This commit is contained in:
Keksike
2017-07-02 19:44:16 +03:00
parent 05811e529b
commit 278ecaec28
5 changed files with 42 additions and 18 deletions

View File

@@ -32,6 +32,7 @@ module.exports = React.createClass({
});
this.handleInfoFormSuccess();
//TODO handleError
},
handleInfoFormSuccess() {
this.setState({submitted: true, sending: false, infoFormSuccess: true});
@@ -51,7 +52,7 @@ module.exports = React.createClass({
});
},
handlePaymentSuccess() {
this.setState({paymentSuccess: true})
this.setState({paymentSuccess: true});
},
render() {
var formClasses = classSet({
@@ -139,12 +140,12 @@ module.exports = React.createClass({
} else if (this.state.infoFormSuccess && !this.state.paymentSuccess) {
return (
<div>
<StripeCheckout payerName={this.state.name} onPaymentSuccess={this.handlePaymentSuccess}></StripeCheckout>
<StripeCheckout payerName={this.state.name} payerEmail={this.state.email} onPaymentSuccess={this.handlePaymentSuccess}></StripeCheckout>
</div>
)
} else {
return (
<p> Onnee!
<p> Tervetuloa jäseneksi!
</p>
)
}