diff --git a/ui/component/cardVerify/view.jsx b/ui/component/cardVerify/view.jsx index 744cf02cb..901ed4963 100644 --- a/ui/component/cardVerify/view.jsx +++ b/ui/component/cardVerify/view.jsx @@ -37,6 +37,7 @@ class CardVerify extends React.Component { super(props); this.state = { open: false, + scriptFailedToLoad: false, }; } @@ -117,7 +118,7 @@ class CardVerify extends React.Component { }; onScriptError = (...args) => { - throw new Error('Unable to load credit validation script.'); + this.setState({ scriptFailedToLoad: true }); }; onClosed = () => { @@ -159,13 +160,21 @@ class CardVerify extends React.Component { }; render() { + const { scriptFailedToLoad } = this.props; + return ( - +