Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
DropinModel.prototype.initialize = function () {
var self = this;
return vaultManager.create({
client: self._options.client
}).then(function (vaultManagerInstance) {
self._vaultManager = vaultManagerInstance;
return getSupportedPaymentOptions(self._options);
}).then(function (paymentOptions) {
self.supportedPaymentOptions = paymentOptions;
return self.getVaultedPaymentMethods();
}).then(function (paymentMethods) {
self._paymentMethods = paymentMethods;
self._paymentMethodIsRequestable = self._paymentMethods.length > 0;
});
};