Skip to content

Commit b0d2c6d

Browse files
authored
fixed: incorrect to register cancel callback in PaymentRequest (#2170)
When cancel Google Pay in chrome, never show the native payment sheet again.
1 parent e54eef9 commit b0d2c6d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/stripe_js/lib/src/js/payment_requests/payment_request.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class PaymentRequest {
3636
}
3737

3838
void onCancel(void Function() callback) {
39-
_js.on('cancel', ([_]) => callback);
39+
_js.on('cancel', ([_]) => callback());
4040
}
4141
}
4242

0 commit comments

Comments
 (0)