Skip to content

Commit

Permalink
fix rendering express checkout
Browse files Browse the repository at this point in the history
  • Loading branch information
Remon Helmond committed Jul 31, 2024
1 parent 563dd87 commit 3e3478e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,7 @@ class _ThemeCardExampleState extends State<ExpressCheckoutElementExample> {
},
body: json.encode({
'currency': 'usd',
'amount': 1099,
'payment_method_types': ['card'],
'request_three_d_secure': 'any',
'amount': 5099,
}),
);
return json.decode(response.body)['clientSecret'];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@ class ExpressCheckoutElementState extends State<ExpressCheckoutElement> {
super.initState();
}

js.PaymentElement? get element => WebStripe.element as js.PaymentElement?;
js.ExpressCheckoutElement? get element =>
WebStripe.element as js.ExpressCheckoutElement?;
set element(js.StripeElement? value) => WebStripe.element = value;

js.StripeElements? get elements => WebStripe.elements;
Expand All @@ -125,7 +126,7 @@ class ExpressCheckoutElementState extends State<ExpressCheckoutElement> {
// return;
// }

final FocusNode _focusNode = FocusNode(debugLabel: 'CardField');
final FocusNode _focusNode = FocusNode(debugLabel: 'ExpressField');
FocusNode get _effectiveNode => widget.focusNode ?? _focusNode;

@override
Expand Down

0 comments on commit 3e3478e

Please sign in to comment.