I am trying to call the external js file using requiresjs
require-js-config.js:
var config = {
map: {
'*': {
Stronghold:'https://api.strongholdpay.com/v2/js'
}
},shim: {
"Stronghold": {
'deps': ["jquery"]
}
}
};
Js file call
require(['jquery','jquery/ui','Stronghold'], function($,Stronghold){
var strongholdPay = Stronghold.Pay({
environment: 'xxxxxxxxx',
publishableKey: 'xxxxxxxxxx'
});
});
Error:
Uncaught TypeError: Stronghold is undefined