• Resolved fourstepper

    (@fourstepper)


    Packeta error: Invalid value '', please provide a literal that is among the set of character sequences denoted by the regular expression /\s*(\+?42[01])?\s*[0-9]{3}\s*[0-9]{3}\s*[0-9]{3}\s*/

    Payload:

    {"first_name":"<redacted>","last_name":"<redacted>","order_number":"1062","email":"<redacted>","phone":"","total":76.45,"currency":"EUR","street":"<redacted>","city":"<redacted>","zip":"<redacted>","address_id":<redacted>,"weight":"4.9"}

    I have also tested this with a Vienna ZIP and city and it seems that the regexp that Packeta is trying to enforce within it’s API doesn’t reflect that at all (maybe that would change later, no idea)

    If I had to guess, the code responsible for this can be found here: https://gitlab.com/wpify/wpify-woo/-/blob/master/lib/PacketeraSDK/src/WpifyWoo/PacketeraSDK/StructType/ClaimAttributes.php#L202 – eh probably not…, but something similar

    My use-case is that: 1) I don’t want to collect user’s phone numbers, because why should I 2) I want to sell to many different countries with Packeta, and this bug obvisouly avoids me from doing that ??

    According to the API docs, phone number is not required. If a phone number is not present in the order, the plugin should handle this and not include this parameter at all, IMO

    What do you think?

    • This topic was modified 2 years, 10 months ago by fourstepper.
    • This topic was modified 2 years, 10 months ago by fourstepper.
    • This topic was modified 2 years, 10 months ago by fourstepper.
    • This topic was modified 2 years, 10 months ago by fourstepper.
    • This topic was modified 2 years, 10 months ago by fourstepper.
Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Contributor Martin Svoboda

    (@martinsvoboda)

    Hello,
    This is a bug in the SDK, which is generated from Packet’s sources. Even though APi does not require a phone number if an email is entered, the SDK does. The SDK also only validates Czech and Slovak zip code and phone number formats. We are communicating with Packeta to correct the errors.

    Thread Starter fourstepper

    (@fourstepper)

    I understand. I have actually since posting this switched to the official plugin, where the issue of the phone number being required is also present, but unlike here, it’s possible to checkout and send the order to packeta using a different country’s ZIP and phone number.

    I tested this with Germany and it worked well.

    It also has support for different shipping classes, the only thing that doesn’t seem to work all that well is selecting pickup points, but I am mostly in this for home delivery anyway.

    Best regards!

    Plugin Author Václav Greif

    (@vasikgreif)

    Hi,
    what exactly you mean by “official plugin”? Is far as I know there’s no official plugin for Packeta.

    Thread Starter fourstepper

    (@fourstepper)

    Hi!

    This seems relatively official https://github.com/Zasilkovna/WooCommerce

    Plugin Author Václav Greif

    (@vasikgreif)

    Oh, thanks for the link, I had no idea this exists! They started the development in July 2021, and yes, that’s an official integration plugin.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Pakceta – Error if phone number isn’t specified’ is closed to new replies.