Issue
I have a payment method Apple Pay it is restricted to only Apple Compatible devices. I need to show the Apple Pay Button if only the Apple Compatible devices.
How do I check Apple Compatible devices like Iphone,Ipad,Apple Watch and Mac in checkout html page using javascript?
Solution
You need to check the Applepay is available using the below code. Link to details here
if (window.ApplePaySession) {
var merchantIdentifier = 'example.com.store';
var promise = ApplePaySession.canMakePaymentsWithActiveCard(merchantIdentifier);
promise.then(function (canMakePayments) {
if (canMakePayments)
// Display Apple Pay button here.
}); }
Answered By - B L Praveen Answer Checked By - Robin (PHPFixing Admin)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.