@rebilly/framepay-react 4.0.6 → 5.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -0
- package/build/index.d.ts +1 -1
- package/build/index.spec.js +1 -1
- package/build/lib/components/elements/applepay-element.js +2 -2
- package/build/lib/components/elements/bank-element.js +3 -3
- package/build/lib/components/elements/base-element.js +14 -13
- package/build/lib/components/elements/card-element.js +3 -3
- package/build/lib/components/elements/googlepay-element.js +2 -2
- package/build/lib/components/elements/iban-element.js +4 -4
- package/build/lib/components/elements/paypal-element.js +2 -2
- package/build/lib/components/injector.js +20 -20
- package/build/lib/components/provider.js +11 -11
- package/build/lib/constants.js +1 -1
- package/build/lib/context.js +2 -4
- package/build/lib/dom-util.js +1 -5
- package/build/lib/framepay-error.d.ts +1 -1
- package/build/lib/framepay-error.js +4 -4
- package/build/lib/get-rebilly-api.js +2 -2
- package/package.json +6 -16
- package/src/index.spec.ts +1 -1
- package/src/index.ts +3 -3
- package/src/lib/components/elements/applepay-element.tsx +2 -2
- package/src/lib/components/elements/bank-element.spec.tsx +12 -12
- package/src/lib/components/elements/bank-element.tsx +4 -4
- package/src/lib/components/elements/base-element.tsx +16 -16
- package/src/lib/components/elements/card-element.spec.tsx +13 -13
- package/src/lib/components/elements/card-element.tsx +4 -4
- package/src/lib/components/elements/googlepay-element.tsx +2 -2
- package/src/lib/components/elements/iban-element.spec.tsx +9 -9
- package/src/lib/components/elements/iban-element.tsx +4 -4
- package/src/lib/components/elements/paypal-element.tsx +2 -2
- package/src/lib/components/injector.spec.tsx +3 -4
- package/src/lib/components/injector.tsx +50 -48
- package/src/lib/components/provider.spec.tsx +5 -7
- package/src/lib/components/provider.tsx +15 -15
- package/src/lib/constants.ts +1 -1
- package/src/lib/context.ts +1 -3
- package/src/lib/dom-util.ts +0 -4
- package/src/lib/framepay-error.ts +9 -6
- package/src/lib/get-rebilly-api.ts +1 -1
- package/test/e2e/cypress-support.js +1 -1
- package/test/e2e/fixtures/apple-pay.js +4 -8
- package/test/e2e/fixtures/bank-separate.js +68 -67
- package/test/e2e/fixtures/card-separate-brands.js +256 -139
- package/test/e2e/fixtures/card-separate-rebilly-fields.js +48 -57
- package/test/e2e/fixtures/card-separate.js +214 -112
- package/test/e2e/fixtures/checkout-combined.js +145 -95
- package/test/e2e/fixtures/google-pay.js +6 -10
- package/test/e2e/fixtures/iban.js +47 -45
- package/test/e2e/fixtures/multiple-methods.js +104 -98
- package/test/e2e/fixtures/nav.js +3 -4
- package/test/e2e/fixtures/paypal.js +5 -12
- package/test/e2e/fixtures/util.js +50 -37
- package/test/e2e/specs/card-separate-brands.cy.ts +2 -2
- package/test/e2e/specs/react-version.cy.ts +1 -1
- package/test/e2e/switch-react-version.js +5 -6
- package/test/unit/jest.config.js +18 -28
- package/test/unit/specs/declaration-mock.spec.tsx +1 -0
- package/tslint.json +0 -36
|
@@ -18,11 +18,11 @@ const params = {
|
|
|
18
18
|
fontStretch: 'none',
|
|
19
19
|
fontSomething: 'not-included',
|
|
20
20
|
fontOtherThing: 'not-included',
|
|
21
|
-
lineHeight: '20px'
|
|
21
|
+
lineHeight: '20px',
|
|
22
22
|
},
|
|
23
23
|
invalid: {
|
|
24
|
-
fontWeight: 'bold'
|
|
25
|
-
}
|
|
24
|
+
fontWeight: 'bold',
|
|
25
|
+
},
|
|
26
26
|
},
|
|
27
27
|
classes: {
|
|
28
28
|
base: 'rebilly-framepay',
|
|
@@ -30,17 +30,16 @@ const params = {
|
|
|
30
30
|
valid: 'rebilly-framepay-valid',
|
|
31
31
|
invalid: 'rebilly-framepay-invalid',
|
|
32
32
|
buttons: 'rebilly-framepay-buttons',
|
|
33
|
-
webkitAutofill: 'rebilly-framepay-webkit-autofill'
|
|
33
|
+
webkitAutofill: 'rebilly-framepay-webkit-autofill',
|
|
34
34
|
},
|
|
35
35
|
icon: {
|
|
36
36
|
foobar: 123,
|
|
37
37
|
display: true,
|
|
38
|
-
color: 'blue'
|
|
39
|
-
}
|
|
38
|
+
color: 'blue',
|
|
39
|
+
},
|
|
40
40
|
};
|
|
41
41
|
|
|
42
42
|
class CardElementComponent extends Component {
|
|
43
|
-
|
|
44
43
|
constructor(props) {
|
|
45
44
|
super(props);
|
|
46
45
|
this.state = {
|
|
@@ -49,19 +48,19 @@ class CardElementComponent extends Component {
|
|
|
49
48
|
onError: null,
|
|
50
49
|
onChange: null,
|
|
51
50
|
onFocus: null,
|
|
52
|
-
onBlur: null
|
|
51
|
+
onBlur: null,
|
|
53
52
|
},
|
|
54
53
|
billingAddress: {
|
|
55
54
|
firstName: 'first-name-value',
|
|
56
55
|
lastName: 'last-name-value',
|
|
57
56
|
address: 'address-value',
|
|
58
57
|
country: 'GB',
|
|
59
|
-
region: 'region-value'
|
|
58
|
+
region: 'region-value',
|
|
60
59
|
},
|
|
61
60
|
token: {
|
|
62
61
|
error: null,
|
|
63
|
-
data: null
|
|
64
|
-
}
|
|
62
|
+
data: null,
|
|
63
|
+
},
|
|
65
64
|
};
|
|
66
65
|
this.handleSubmit = this.handleSubmit.bind(this);
|
|
67
66
|
}
|
|
@@ -74,126 +73,177 @@ class CardElementComponent extends Component {
|
|
|
74
73
|
*
|
|
75
74
|
*/
|
|
76
75
|
const billingAddress = {
|
|
77
|
-
...this.state.billingAddress
|
|
76
|
+
...this.state.billingAddress,
|
|
78
77
|
};
|
|
79
78
|
if (billingAddress.emails) {
|
|
80
79
|
billingAddress.emails = [
|
|
81
80
|
{
|
|
82
81
|
label: 'Email',
|
|
83
|
-
value: billingAddress.emails
|
|
84
|
-
}
|
|
82
|
+
value: billingAddress.emails,
|
|
83
|
+
},
|
|
85
84
|
];
|
|
86
85
|
}
|
|
87
86
|
if (billingAddress.phoneNumbers) {
|
|
88
87
|
billingAddress.phoneNumbers = [
|
|
89
88
|
{
|
|
90
89
|
label: 'Phone Number',
|
|
91
|
-
value: billingAddress.phoneNumbers
|
|
92
|
-
}
|
|
90
|
+
value: billingAddress.phoneNumbers,
|
|
91
|
+
},
|
|
93
92
|
];
|
|
94
93
|
}
|
|
95
94
|
|
|
96
95
|
this.props.Rebilly.createToken(this.formNode, { billingAddress })
|
|
97
|
-
.then(data => {
|
|
96
|
+
.then((data) => {
|
|
98
97
|
this.deepUpdateState({ token: { error: false, data } });
|
|
99
98
|
})
|
|
100
|
-
.catch(err => {
|
|
99
|
+
.catch((err) => {
|
|
101
100
|
this.deepUpdateState({ token: { error: true, data: err } });
|
|
102
101
|
});
|
|
103
102
|
}
|
|
104
103
|
|
|
105
104
|
deepUpdateState(data) {
|
|
106
|
-
this.setState(prevState => {
|
|
105
|
+
this.setState((prevState) => {
|
|
107
106
|
return deepMerge(prevState, data);
|
|
108
107
|
});
|
|
109
108
|
}
|
|
110
109
|
|
|
111
110
|
render() {
|
|
112
|
-
return (
|
|
113
|
-
<
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
<
|
|
119
|
-
<
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
111
|
+
return (
|
|
112
|
+
<div>
|
|
113
|
+
<h2>{this.props.title}</h2>
|
|
114
|
+
<h3>FramePay version: {this.props.Rebilly.version}</h3>
|
|
115
|
+
<div className="flex-wrapper">
|
|
116
|
+
{prettyDebugRender(this.state)}
|
|
117
|
+
<div className="example-2">
|
|
118
|
+
<form
|
|
119
|
+
id="form"
|
|
120
|
+
ref={(node) => (this.formNode = node)}
|
|
121
|
+
method="post"
|
|
122
|
+
onSubmit={this.handleSubmit}
|
|
123
|
+
>
|
|
124
|
+
<fieldset>
|
|
125
|
+
<div className="field">
|
|
126
|
+
<input
|
|
127
|
+
type="text"
|
|
128
|
+
name="firstName"
|
|
129
|
+
placeholder="First Name"
|
|
130
|
+
defaultValue={
|
|
131
|
+
this.state.billingAddress.firstName
|
|
132
|
+
}
|
|
133
|
+
onChange={(e) => {
|
|
134
|
+
this.deepUpdateState({
|
|
135
|
+
billingAddress: {
|
|
136
|
+
firstName: e.target.value,
|
|
137
|
+
},
|
|
138
|
+
});
|
|
139
|
+
}}
|
|
140
|
+
/>
|
|
141
|
+
</div>
|
|
142
|
+
<div className="field">
|
|
143
|
+
<input
|
|
144
|
+
type="text"
|
|
145
|
+
name="lastName"
|
|
146
|
+
placeholder="Last Name"
|
|
147
|
+
defaultValue={
|
|
148
|
+
this.state.billingAddress.lastName
|
|
149
|
+
}
|
|
150
|
+
onChange={(e) => {
|
|
151
|
+
this.deepUpdateState({
|
|
152
|
+
billingAddress: {
|
|
153
|
+
lastName: e.target.value,
|
|
154
|
+
},
|
|
155
|
+
});
|
|
156
|
+
}}
|
|
157
|
+
/>
|
|
158
|
+
</div>
|
|
159
|
+
<div className="field">
|
|
160
|
+
<input
|
|
161
|
+
type="text"
|
|
162
|
+
name="email"
|
|
163
|
+
placeholder="Email"
|
|
164
|
+
defaultValue={
|
|
165
|
+
this.state.billingAddress.emails
|
|
166
|
+
}
|
|
167
|
+
onChange={(e) => {
|
|
168
|
+
this.deepUpdateState({
|
|
169
|
+
billingAddress: {
|
|
170
|
+
emails: e.target.value,
|
|
171
|
+
},
|
|
172
|
+
});
|
|
173
|
+
}}
|
|
174
|
+
/>
|
|
175
|
+
</div>
|
|
176
|
+
<div className="field">
|
|
177
|
+
<input
|
|
178
|
+
type="text"
|
|
179
|
+
name="phone"
|
|
180
|
+
placeholder="Phone"
|
|
181
|
+
defaultValue={
|
|
182
|
+
this.state.billingAddress
|
|
183
|
+
.phoneNumbers
|
|
184
|
+
}
|
|
185
|
+
onChange={(e) => {
|
|
186
|
+
this.deepUpdateState({
|
|
187
|
+
billingAddress: {
|
|
188
|
+
phoneNumbers:
|
|
189
|
+
e.target.value,
|
|
190
|
+
},
|
|
191
|
+
});
|
|
192
|
+
}}
|
|
193
|
+
/>
|
|
194
|
+
</div>
|
|
195
|
+
<div className="field">
|
|
196
|
+
<this.props.CardElement
|
|
197
|
+
onError={(err) =>
|
|
198
|
+
this.deepUpdateState({
|
|
199
|
+
events: { onError: err },
|
|
200
|
+
})
|
|
201
|
+
}
|
|
202
|
+
onReady={() =>
|
|
203
|
+
this.deepUpdateState({
|
|
204
|
+
events: { onReady: true },
|
|
205
|
+
})
|
|
206
|
+
}
|
|
207
|
+
onChange={(data) =>
|
|
208
|
+
this.deepUpdateState({
|
|
209
|
+
events: { onChange: data },
|
|
210
|
+
})
|
|
211
|
+
}
|
|
212
|
+
onFocus={() =>
|
|
213
|
+
this.deepUpdateState({
|
|
214
|
+
events: { onFocus: true },
|
|
215
|
+
})
|
|
216
|
+
}
|
|
217
|
+
onBlur={() =>
|
|
218
|
+
this.deepUpdateState({
|
|
219
|
+
events: { onBlur: true },
|
|
220
|
+
})
|
|
221
|
+
}
|
|
222
|
+
/>
|
|
223
|
+
</div>
|
|
224
|
+
</fieldset>
|
|
225
|
+
<button id="submit">Make Payment</button>
|
|
226
|
+
</form>
|
|
227
|
+
</div>
|
|
172
228
|
</div>
|
|
173
229
|
</div>
|
|
174
|
-
|
|
230
|
+
);
|
|
175
231
|
}
|
|
176
232
|
}
|
|
177
233
|
|
|
178
234
|
const CardElement = withFramePayCardComponent(CardElementComponent);
|
|
179
235
|
|
|
180
236
|
class App extends Component {
|
|
181
|
-
|
|
182
237
|
render() {
|
|
183
|
-
return (
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
<div>
|
|
192
|
-
{ReactVersion()}
|
|
193
|
-
<CardElement/>
|
|
194
|
-
</div>
|
|
195
|
-
</FramePayProvider>);
|
|
238
|
+
return (
|
|
239
|
+
<FramePayProvider injectStyle {...params}>
|
|
240
|
+
<div>
|
|
241
|
+
{ReactVersion()}
|
|
242
|
+
<CardElement />
|
|
243
|
+
</div>
|
|
244
|
+
</FramePayProvider>
|
|
245
|
+
);
|
|
196
246
|
}
|
|
197
247
|
}
|
|
198
248
|
|
|
199
|
-
ReactDOM.render(<App/>, document.getElementById('app'));
|
|
249
|
+
ReactDOM.render(<App />, document.getElementById('app'));
|
|
@@ -3,7 +3,7 @@ import ReactDOM from 'react-dom';
|
|
|
3
3
|
|
|
4
4
|
import {
|
|
5
5
|
FramePayProvider,
|
|
6
|
-
withFramePayGooglePayComponent
|
|
6
|
+
withFramePayGooglePayComponent,
|
|
7
7
|
} from '../../../build';
|
|
8
8
|
import { prettyDebugRender, ReactVersion } from './util';
|
|
9
9
|
import './style.css';
|
|
@@ -15,12 +15,11 @@ const params = {
|
|
|
15
15
|
transactionData: {
|
|
16
16
|
amount: 10,
|
|
17
17
|
currency: 'USD',
|
|
18
|
-
label: 'Purchase label 1'
|
|
19
|
-
}
|
|
18
|
+
label: 'Purchase label 1',
|
|
19
|
+
},
|
|
20
20
|
};
|
|
21
21
|
|
|
22
22
|
class App extends Component {
|
|
23
|
-
|
|
24
23
|
constructor(props) {
|
|
25
24
|
super(props);
|
|
26
25
|
this.state = {
|
|
@@ -36,10 +35,10 @@ class App extends Component {
|
|
|
36
35
|
onReady={() => {
|
|
37
36
|
console.log('FramePayProvider.onReady');
|
|
38
37
|
}}
|
|
39
|
-
onError={err => {
|
|
38
|
+
onError={(err) => {
|
|
40
39
|
console.log('FramePayProvider.onError', err);
|
|
41
40
|
}}
|
|
42
|
-
onTokenReady={token => this.setState({ token })}
|
|
41
|
+
onTokenReady={(token) => this.setState({ token })}
|
|
43
42
|
>
|
|
44
43
|
<div>
|
|
45
44
|
{ReactVersion()}
|
|
@@ -57,7 +56,4 @@ class App extends Component {
|
|
|
57
56
|
}
|
|
58
57
|
|
|
59
58
|
const WrappedApp = withFramePayGooglePayComponent(App);
|
|
60
|
-
ReactDOM.render(
|
|
61
|
-
<WrappedApp />,
|
|
62
|
-
document.getElementById('app')
|
|
63
|
-
);
|
|
59
|
+
ReactDOM.render(<WrappedApp />, document.getElementById('app'));
|
|
@@ -6,7 +6,7 @@ import { deepMerge, prettyDebugRender, ReactVersion } from './util';
|
|
|
6
6
|
import './style.css';
|
|
7
7
|
|
|
8
8
|
const params = {
|
|
9
|
-
publishableKey: 'pk_sandbox_c6cqKLddciVikuBOjhcng-rLccTz70NT4W_qZ_h'
|
|
9
|
+
publishableKey: 'pk_sandbox_c6cqKLddciVikuBOjhcng-rLccTz70NT4W_qZ_h',
|
|
10
10
|
};
|
|
11
11
|
|
|
12
12
|
const emptyEvents = {
|
|
@@ -14,8 +14,8 @@ const emptyEvents = {
|
|
|
14
14
|
onReady: null,
|
|
15
15
|
onChange: null,
|
|
16
16
|
onFocus: null,
|
|
17
|
-
onBlur: null
|
|
18
|
-
}
|
|
17
|
+
onBlur: null,
|
|
18
|
+
},
|
|
19
19
|
};
|
|
20
20
|
|
|
21
21
|
class IBANlementComponent extends Component {
|
|
@@ -23,19 +23,19 @@ class IBANlementComponent extends Component {
|
|
|
23
23
|
super(props);
|
|
24
24
|
this.state = {
|
|
25
25
|
events: {
|
|
26
|
-
...emptyEvents
|
|
26
|
+
...emptyEvents,
|
|
27
27
|
},
|
|
28
28
|
billingAddress: {
|
|
29
29
|
firstName: 'first-name-value',
|
|
30
30
|
lastName: 'last-name-value',
|
|
31
31
|
address: 'address-value',
|
|
32
32
|
country: 'GB',
|
|
33
|
-
region: 'region-value'
|
|
33
|
+
region: 'region-value',
|
|
34
34
|
},
|
|
35
35
|
token: {
|
|
36
36
|
error: null,
|
|
37
|
-
data: null
|
|
38
|
-
}
|
|
37
|
+
data: null,
|
|
38
|
+
},
|
|
39
39
|
};
|
|
40
40
|
this.handleSubmit = this.handleSubmit.bind(this);
|
|
41
41
|
}
|
|
@@ -49,37 +49,38 @@ class IBANlementComponent extends Component {
|
|
|
49
49
|
*/
|
|
50
50
|
|
|
51
51
|
const billingAddress = {
|
|
52
|
-
...this.state.billingAddress
|
|
52
|
+
...this.state.billingAddress,
|
|
53
53
|
};
|
|
54
54
|
if (billingAddress.emails) {
|
|
55
55
|
billingAddress.emails = [
|
|
56
56
|
{
|
|
57
57
|
label: 'Email',
|
|
58
|
-
value: billingAddress.emails
|
|
59
|
-
}
|
|
58
|
+
value: billingAddress.emails,
|
|
59
|
+
},
|
|
60
60
|
];
|
|
61
61
|
}
|
|
62
62
|
if (billingAddress.phoneNumbers) {
|
|
63
63
|
billingAddress.phoneNumbers = [
|
|
64
64
|
{
|
|
65
65
|
label: 'Phone Number',
|
|
66
|
-
value: billingAddress.phoneNumbers
|
|
67
|
-
}
|
|
66
|
+
value: billingAddress.phoneNumbers,
|
|
67
|
+
},
|
|
68
68
|
];
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
this.props.Rebilly.createToken(this.formNode, { billingAddress })
|
|
72
|
-
.then(data => {
|
|
72
|
+
.then((data) => {
|
|
73
73
|
this.deepUpdateState({
|
|
74
74
|
events: { ...emptyEvents },
|
|
75
75
|
token: {
|
|
76
|
-
error: false,
|
|
77
|
-
|
|
76
|
+
error: false,
|
|
77
|
+
data,
|
|
78
|
+
},
|
|
78
79
|
});
|
|
79
80
|
})
|
|
80
|
-
.catch(err => {
|
|
81
|
+
.catch((err) => {
|
|
81
82
|
this.deepUpdateState({
|
|
82
|
-
token: { error: true, data: err }
|
|
83
|
+
token: { error: true, data: err },
|
|
83
84
|
});
|
|
84
85
|
});
|
|
85
86
|
}
|
|
@@ -97,7 +98,7 @@ class IBANlementComponent extends Component {
|
|
|
97
98
|
<div className="example-2">
|
|
98
99
|
<form
|
|
99
100
|
id="form"
|
|
100
|
-
ref={node => (this.formNode = node)}
|
|
101
|
+
ref={(node) => (this.formNode = node)}
|
|
101
102
|
method="post"
|
|
102
103
|
onSubmit={this.handleSubmit}
|
|
103
104
|
>
|
|
@@ -110,11 +111,11 @@ class IBANlementComponent extends Component {
|
|
|
110
111
|
defaultValue={
|
|
111
112
|
this.state.billingAddress.firstName
|
|
112
113
|
}
|
|
113
|
-
onChange={e => {
|
|
114
|
+
onChange={(e) => {
|
|
114
115
|
this.deepUpdateState({
|
|
115
116
|
billingAddress: {
|
|
116
|
-
firstName: e.target.value
|
|
117
|
-
}
|
|
117
|
+
firstName: e.target.value,
|
|
118
|
+
},
|
|
118
119
|
});
|
|
119
120
|
}}
|
|
120
121
|
/>
|
|
@@ -127,11 +128,11 @@ class IBANlementComponent extends Component {
|
|
|
127
128
|
defaultValue={
|
|
128
129
|
this.state.billingAddress.lastName
|
|
129
130
|
}
|
|
130
|
-
onChange={e => {
|
|
131
|
+
onChange={(e) => {
|
|
131
132
|
this.deepUpdateState({
|
|
132
133
|
billingAddress: {
|
|
133
|
-
lastName: e.target.value
|
|
134
|
-
}
|
|
134
|
+
lastName: e.target.value,
|
|
135
|
+
},
|
|
135
136
|
});
|
|
136
137
|
}}
|
|
137
138
|
/>
|
|
@@ -144,11 +145,11 @@ class IBANlementComponent extends Component {
|
|
|
144
145
|
defaultValue={
|
|
145
146
|
this.state.billingAddress.emails
|
|
146
147
|
}
|
|
147
|
-
onChange={e => {
|
|
148
|
+
onChange={(e) => {
|
|
148
149
|
this.deepUpdateState({
|
|
149
150
|
billingAddress: {
|
|
150
|
-
emails: e.target.value
|
|
151
|
-
}
|
|
151
|
+
emails: e.target.value,
|
|
152
|
+
},
|
|
152
153
|
});
|
|
153
154
|
}}
|
|
154
155
|
/>
|
|
@@ -162,11 +163,12 @@ class IBANlementComponent extends Component {
|
|
|
162
163
|
this.state.billingAddress
|
|
163
164
|
.phoneNumbers
|
|
164
165
|
}
|
|
165
|
-
onChange={e => {
|
|
166
|
+
onChange={(e) => {
|
|
166
167
|
this.deepUpdateState({
|
|
167
168
|
billingAddress: {
|
|
168
|
-
phoneNumbers:
|
|
169
|
-
|
|
169
|
+
phoneNumbers:
|
|
170
|
+
e.target.value,
|
|
171
|
+
},
|
|
170
172
|
});
|
|
171
173
|
}}
|
|
172
174
|
/>
|
|
@@ -177,36 +179,36 @@ class IBANlementComponent extends Component {
|
|
|
177
179
|
this.deepUpdateState({
|
|
178
180
|
events: {
|
|
179
181
|
iban: {
|
|
180
|
-
onReady: true
|
|
181
|
-
}
|
|
182
|
-
}
|
|
182
|
+
onReady: true,
|
|
183
|
+
},
|
|
184
|
+
},
|
|
183
185
|
})
|
|
184
186
|
}
|
|
185
|
-
onChange={data =>
|
|
187
|
+
onChange={(data) =>
|
|
186
188
|
this.deepUpdateState({
|
|
187
189
|
events: {
|
|
188
190
|
iban: {
|
|
189
|
-
onChange: data
|
|
190
|
-
}
|
|
191
|
-
}
|
|
191
|
+
onChange: data,
|
|
192
|
+
},
|
|
193
|
+
},
|
|
192
194
|
})
|
|
193
195
|
}
|
|
194
196
|
onFocus={() =>
|
|
195
197
|
this.deepUpdateState({
|
|
196
198
|
events: {
|
|
197
199
|
iban: {
|
|
198
|
-
onFocus: true
|
|
199
|
-
}
|
|
200
|
-
}
|
|
200
|
+
onFocus: true,
|
|
201
|
+
},
|
|
202
|
+
},
|
|
201
203
|
})
|
|
202
204
|
}
|
|
203
205
|
onBlur={() =>
|
|
204
206
|
this.deepUpdateState({
|
|
205
207
|
events: {
|
|
206
208
|
iban: {
|
|
207
|
-
onBlur: true
|
|
208
|
-
}
|
|
209
|
-
}
|
|
209
|
+
onBlur: true,
|
|
210
|
+
},
|
|
211
|
+
},
|
|
210
212
|
})
|
|
211
213
|
}
|
|
212
214
|
/>
|
|
@@ -229,11 +231,11 @@ class App extends Component {
|
|
|
229
231
|
<FramePayProvider injectStyle {...params}>
|
|
230
232
|
<div>
|
|
231
233
|
{ReactVersion()};
|
|
232
|
-
<IBANElement/>
|
|
234
|
+
<IBANElement />
|
|
233
235
|
</div>
|
|
234
236
|
</FramePayProvider>
|
|
235
237
|
);
|
|
236
238
|
}
|
|
237
239
|
}
|
|
238
240
|
|
|
239
|
-
ReactDOM.render(<App/>, document.getElementById('app'));
|
|
241
|
+
ReactDOM.render(<App />, document.getElementById('app'));
|