I have an error in the shopping cart

LiteCart Fan
Från United States
Medlem sedan feb. 2024

Hello,

We have this error in the shopping cart. How do we fix it?

Deprecated: Passing geo zone last preceeded by zone is deprecated. Instead do \$country->in_geo_zones($geo_zones, $address) in ~/includes/references/ref_country.inc.php (Line 109)

Thank you in advance.
Dan

LiteCart Fan
Från United States
Medlem sedan feb. 2024

Never mind. We fixed it. It was an incorrect "location" in the Square app settings.

LiteCart Fan
Från United States
Medlem sedan feb. 2024

OK, we disabled the geozone in the square app, so the depreciated error went away, but we still have the "Missing Order I.D." error. any ideas?

tim
Founder
Från Sweden
Medlem sedan maj 2013
tim

Your customers don't see this. The deprecation notice is saying a piece of code in the module needs to be updated as a future version of LiteCart will remove old compatibility. Do [b]->in_geo_zone($geo_zones, $address) [/b]as it's the newer use. I dunno if this is an old typo but in_geo_zones() is in_geo_zone() without the extra s.


        if (!reference::country($customer['country_code'])->in_geo_zone($this->settings['geo_zone_id'], $customer)) return;
      }```
Project Leader
Från United States
Medlem sedan apr. 2024

danshea

Having the same issue.
I looked in my square dashboard to disable as you state, cannot find how to do it.

Can you tell me how exactly you fixed this issue please? 
or I will be glad to pay you to do it.

Deprecated: Passing geo zone last preceeded by zone is deprecated. Instead do \$country->in_geo_zones($geo_zones, $address) in ~/includes/references/ref_country.inc.php (Line 109)

tim
Founder
Från Sweden
Medlem sedan maj 2013
tim

In the file includes/modules/payment/pm_square_checkout.inc.php.

Find

        if (!reference::country($customer['country_code'])->in_geo_zone($customer['zone_code'], $this->settings['geo_zone_id'])) return;

Replace with

       if (!reference::country($customer['country_code'])->in_geo_zone($this->settings['geo_zone_id'], $customer)) return;

This is for compatibility with 2.5.x.
@mishochu

Project Leader
Från United States
Medlem sedan apr. 2024

thank you, made the change.

Developer
Från United States
Medlem sedan mars 2021

Is everyone aware that this is an open source addon? You are more than free to make a PR at any time.

In any case, the change has been made here (https://github.com/mishfit/litecart_square_addon) and will be available on the next release.

tim
Founder
Från Sweden
Medlem sedan maj 2013
tim

@mishochu I just saw that after I posted. My mistake. This is the right place to discuss the addon. But it's not ok to disturb the one who made it public domain. 🙂 Apologies.

Developer
Från United States
Medlem sedan mars 2021

I'm not disturbed by it...obviously I need to make a new release.

It just looks like a few people fixed issues for themselves (which means they are technically competent) but didn't share it with everyone.

I've added the Github link and video I made to the README. Square is slightly different from Stripe, PayPal or BTCPayServer (my only other non-enterprise experience).

tim
Founder
Från Sweden
Medlem sedan maj 2013
tim

It just looks like a few people fixed issues for themselves (which means they are technically competent) but didn't share it with everyone.

That's the world we live in, in a nutshell. I see this a lot. :(

Square is slightly different from Stripe

The implementation looked very straight forward industry standard. A heads up about that currency amount formatting part. Do they request amounts in cents like Stripe does? If not, a regular currency::format_raw() should be enough.

Du
Denna webbplats använder inga kakor och ingen spårningsteknik från tredje part . Vi tror att vi kan göra det bättre än andra och tänker verkligen på din integritet.