I'm trying to integrate bluesnap payment gateway into a react/ts project. I've included their hosted javascript into my public/index.html and have proceeded with the integration within a component, but on compiling I'm getting the error of
'bluesnap' is not defined no-undef
I've tried to supress the error with ts-ignore
// @ts-ignore
bluesnap.hostedPaymentFieldsSubmitData((callback: any) => {
However it's still not liking that I'm calling bluesnap without defining it. The bluesnap is defined though within the public/index.html head
<script type="text/javascript" src="https://sandbox.bluesnap.com/web-sdk/4/bluesnap.js"></script>
Any ideas?
Thanks
Solved by appending window. ie:
window.bluesnap.somefuction