Having trouble the the payments SDK. Google is working fine however Apple pay is not displaying the apple pay button even after successfull initiation. Its not producing any errors so I am lost.
The #apple-pay-button html element remains empty.
Init method, within document.ready
// Initialize Apple Pay
try {
// Initialize Apple Pay (no attach needed)
const applePayInstance = await payments.applePay(paymentRequest);
jQuery('#apple-pay-button').on('click', async function (e) {
e.preventDefault();
await handleTokenizationAndVerification(applePayInstance, 'Apple Pay');
});
} catch (error) {
console.error('Failed to initialize Apple Pay:', error);
}
I get a valid applepay instance with this, but no button.
Payment request object:
{
"requestShippingContact": true,
"requestEmailAddress": true,
"requestBillingContact": true,
"countryCode": "AU",
"currencyCode": "AUD",
"shippingOptions": [
{
"id": "flat_rate:1",
"label": "Flat rate",
"amount": "15.00"
}
],
"total": {
"label": "SWS (via WooCommerce)",
"amount": "114.00",
"pending": false
},
"lineItems": [
{
"label": "Simple product",
"amount": "99.00",
"pending": false
},
{
"label": "Shipping",
"amount": "15.00",
"pending": false
}
]
}
Feel free to test yourself, Cart – SquareSync for Woo
Objects/instances are logged to console