Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
buttonType: 'short'
}, self.googlePayConfiguration.button, {
onClick: function (event) {
event.preventDefault();
self.preventUserAction();
self.tokenize().then(function () {
self.allowUserAction();
});
}
});
self.model.asyncDependencyStarting();
return btGooglePay.create({
client: self.client,
googlePayVersion: googlePayVersion,
googleMerchantId: merchantId
}).then(function (googlePayInstance) {
self.googlePayInstance = googlePayInstance;
self.paymentsClient = createPaymentsClient(self.client);
}).then(function () {
var buttonContainer = self.getElementById('google-pay-button');
buttonContainer.appendChild(self.paymentsClient.createButton(buttonOptions));
self.model.asyncDependencyReady();
}).catch(function (err) {
self.model.asyncDependencyFailed({
view: self.ID,
error: new DropinError(err)