File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
src/app/components/user/SubscribeForm Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,8 @@ import styled from 'styled-components';
33
44import { injectStripe , CardElement } from 'react-stripe-elements' ;
55
6+ import reportError from 'app/utils/error' ;
7+
68import Input from 'app/components/Input' ;
79import Button from 'app/components/buttons/Button' ;
810
@@ -84,7 +86,7 @@ class CheckoutForm extends React.PureComponent {
8486 // Within the context of `Elements`, this call to createToken knows which Element to
8587 // tokenize, since there's only one in this group.
8688 const { token, error } = await this . props . stripe . createToken ( {
87- name : this . props . name ,
89+ name : this . state . name ,
8890 } ) ;
8991 if ( error ) {
9092 return this . setState ( {
@@ -98,6 +100,8 @@ class CheckoutForm extends React.PureComponent {
98100 try {
99101 await this . props . subscribe ( token . id ) ;
100102 } catch ( e ) {
103+ reportError ( e ) ;
104+
101105 return this . setState ( {
102106 loading : false ,
103107 errors : {
You can’t perform that action at this time.
0 commit comments