vue-square icon indicating copy to clipboard operation
vue-square copied to clipboard

Remove async from payment form script tag

Open wonder95 opened this issue 5 years ago • 0 comments

The script tag in index.html for the paymentform library is like this:

<script async type="text/javascript" src="https://js.squareup.com/v2/paymentform"></script>

However, this causes an SqPaymentForm is not defined error when loading the form, because paymentform is not loaded when it's called within the mounted hook. Removingh the asyanc from the tag like so

<script type="text/javascript" src="https://js.squareup.com/v2/paymentform"></script>

fixes the problem (this was pointed out to me by a Square engineer).

wonder95 avatar Mar 15 '19 23:03 wonder95