Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,13 @@ define(
return applePayConfiguration;
},

/**
* Checks if the current browser supports Apple Pay.
* @returns {boolean}
*/
checkBrowserCompatibility: function () {
// Disables Apple Pay for non-Safari browsers
return /^((?!android).)*safari/i.test(navigator.userAgent);
// Apple Pay is only available if the browser is Safari and the ApplePaySession API exists
return /^((?!android).)*safari/i.test(navigator.userAgent) && 'ApplePaySession' in window;
}
})
}
Expand Down