Using Geolocation Utility IPStack in order to hide express payment methods by country

New Member
1 0 0

Hi, I'm trying to use an API call to IPstack in order to hide the express payment options for customers coming from Japan (JP). It worked a few times when testing via browser stack, but now my api call is getting the following consolve log error 'because it violates the following Content Security Policy directive: "script-src 'self' 'unsafe-inline' 'unsafe-eval' blob:'. Does anyone know any other way to hide elements by geolocation on the shopify checkout.liquid page? 

            <div class ="alt-payments">{{ alternative_payment_methods }}</div>
       				url: '',
       				dataType: 'jsonp',
                   	success: function(location) {
                        // If the visitor is browsing from JP.
                        if (location.country_code === 'JP') {
                        // display none express payments.
                    } );