braintree-web
Version:
A suite of tools for integrating Braintree in the browser
24 lines (19 loc) • 558 B
JavaScript
;
var venmoConstants = require("./constants");
function getVenmoUrl(options) {
if (options.useAllowDesktopWebLogin) {
if (
options.enableVenmoSandbox &&
options.environment &&
options.environment !== "production"
) {
return venmoConstants.VENMO_WEB_LOGIN_SANDBOX_URL;
}
return venmoConstants.VENMO_WEB_LOGIN_URL;
}
if (options.mobileWebFallBack) {
return venmoConstants.VENMO_APP_OR_MOBILE_AUTH_URL;
}
return venmoConstants.VENMO_MOBILE_APP_AUTH_ONLY_URL;
}
module.exports = getVenmoUrl;