Support

Home Forums Event Espresso Premium Apple Pay Option

Apple Pay Option

Posted: December 11, 2024 at 12:45 pm

Viewing 16 reply threads


Katelyn

December 11, 2024 at 12:45 pm

I’ve set-up Apple Pay via Square, but am having issues with Apple Pay verifying our domain.

There’s also an issue that’s occurring that took down the website for a few seconds:
This error indicates a type mismatch in a PHP function. Let’s break it down:

Error Explanation
The function EED_SquareOnsiteOAuth::errorLogAndExit() is defined to accept an array as its third parameter ($data).
However, when this function is called on line 437, the third argument passed is a boolean value (true) instead of an array.
The error explicitly points to:

The function definition in /EED_SquareOnsiteOAuth.module.php on line 828.
The location of the problematic call in /EED_SquareOnsiteOAuth.module.php on line 437.
Key Details in the Error
Function Call:

php
Copy code
EED_SquareOnsiteOAuth::errorLogAndExit(Object(EE_Payment_Method), ‘Invalid domain …’, true, true)
The third argument passed here is true (a boolean).
The function errorLogAndExit() expects the third argument to be an array.
Function Definition:

php
Copy code
function errorLogAndExit($paymentMethod, $message, array $data, $exit = true)
Notice the array $data type hint. PHP 7+ enforces this type hint, so passing a non-array value (like true) triggers a TypeError.
Steps to Fix
1. Locate the Code
Go to /EED_SquareOnsiteOAuth.module.php line 437.
Find the function call to errorLogAndExit().
2. Analyze the Arguments
Review the third argument passed to the function. It’s currently true, which is a boolean.
Update this argument to ensure it is an array, e.g., an empty array [] or a properly structured array.


Tony

  • Support Staff

December 11, 2024 at 2:18 pm

Hi there,

I’ve set-up Apple Pay via Square, but am having issues with Apple Pay verifying our domain.

What issues are you running into? Whats happening? Any errors?

There’s also an issue that’s occurring that took down the website for a few seconds:

Confirmed, I’ll get an update to fix this.


Katelyn

December 11, 2024 at 2:23 pm

This reply has been marked as private.


Tony

  • Support Staff

December 11, 2024 at 3:40 pm

I’ve jsut pushed an update for the Square payment method to fix the type errors, along with all of out mot recent fixes within that payment method.

Go to Dashboard -> Event Espresso -> General Settings.

Don’t make any changes and just hit save to force an update check, it should then show the available update in the plugins menu.

However, that shouldn’t cause any issues with the Apple Pay validation.

Which domain are you validating?


Katelyn

December 12, 2024 at 6:55 am

This reply has been marked as private.


Tony

  • Support Staff

December 12, 2024 at 1:02 pm

This reply has been marked as private.


Katelyn

December 12, 2024 at 1:03 pm

This reply has been marked as private.


Tony

  • Support Staff

December 12, 2024 at 1:15 pm

It shouldn’t be, all that’s happening is is their server sends a request to yours to see if that file downloads…. that’s it.

Even if the contents of that request were cached… the file doesn’t change.


Tony

  • Support Staff

December 12, 2024 at 1:17 pm

Infact, I tried validating your domain on my test account.

The response is:

"Invalid domain {domain}: expected GET https://{domain}/.well-known/apple-developer-merchantid-domain-association to return a 200 response code but instead returned 403."

Something is blocking the request from Square.

A security plugin, mod_sec, on your server; I’m not sure what, but something is blocking that request.


Katelyn

December 12, 2024 at 1:20 pm

This reply has been marked as private.


Tony

  • Support Staff

December 12, 2024 at 1:23 pm

No problem, please do let me know what they say. I’m curious now 🙂


Katelyn

December 12, 2024 at 1:48 pm

This reply has been marked as private.


Tony

  • Support Staff

December 12, 2024 at 1:58 pm

You would need to contact them directly as the request is from their servers.

Can they not see from the access logs? I’m guessing there wont be many access accepts to apple-developer-merchantid-domain-association so should be easy to find.


Katelyn

December 13, 2024 at 10:38 am

This reply has been marked as private.


Tony

  • Support Staff

December 13, 2024 at 12:21 pm

Oh, so all good? Did you manage to get the domain verified?


Katelyn

December 13, 2024 at 12:23 pm

Yes. Thank you for all of your help!


Tony

  • Support Staff

December 13, 2024 at 12:24 pm

Awesome! Glad its sorted 🙂

Viewing 16 reply threads

The support post ‘Apple Pay Option’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso