I would like to implement Apple Pay for web. I was getting a little bit confused by the documentations of Sandbox and Production. I'm using Mac mini (late 2012) with Sierra and iPad mini 3 with IOS 10.
Can you please help me understand what is needed for Sandbox testing? I was following: Apple Pay Sandbox Testing.
- Both devices are on the same WIFI, bluetooth is on, handoff is on and AirDrop is on.
- I created a sandbox user and logged in with it to icould on both devices.
- I added a test credit card to the Wallet app in my iPad
- Do I need to configure merchant id, certificate and merchant domain?
I'm using this simple code that I found here. I can't get canMakePayments() to return true. I receive: "ApplePay is possible on this browser, but not currently activated."
window.onload = function() {
if (window.ApplePaySession) {
var merchantIdentifier = 'example.com.store';
var promise = ApplePaySession.canMakePaymentsWithActiveCard(merchantIdentifier);
promise.then(function (canMakePayments) {
if (canMakePayments) {
console.log("Hi, I can do ApplePay");
document.getElementById("applePay").style.display = "block";
}
else {
console.log("ApplePay is possible on this browser, but not currently activated.");
document.getElementById("got_notactive").style.display = "block";
}
});
}
else {
console.log("ApplePay is not available on this browser");
document.getElementById("notgot").style.display = "block";
}
}
Aucun commentaire:
Enregistrer un commentaire