• Resolved ericthomson

    (@ericthomson)


    When I setup a WooCommerce product (digital download) the cart works correctly (item added) and credit card is processed by Square. Order Note says “Customercreated on Square”; Square charge complete; Order status changed from Pending to Processing.

    But when I setup an event (Modern Events Calendar with payment gateway: Pay by WooCommerce) the event is not counted by the cart (still shows 0) and the payment fails. When I look at the order in WooCommerce it has this Order Note: Array
    ( [0] => stdClass Object (
    [category] => INVALID_REQUEST_ERROR
    [code] => INVALID_ENUM_VALUE
    [detail] => “ is not a valid enum value for billing_address.country.
    [field] => billing_address.country ) )
    Order status changed from Pending payment to Failed.

    Does anyone have a clue why or what I can test to investigate?
    Sincerely Eric

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Support 3 Sons Development – a11n

    (@3sonsdevelopment)

    Hello @ericthomson,

    Sorry to hear about the trouble you’ve run into. I did a bit of digging into that error and ran across a thread you apparently found as well at:

    https://webnus.ticksy.com/ticket/1412296/

    If I understand how this is set up on your site, Modern Events is a plugin that can sell events. One of its options is to use WooCommerce as a payment gateway. There are several other plugins that do that as well like Sprout Invoices.

    How exactly it passes this I’m not clear on. The video in their documentation does not show what happens when someone actually checks out with WooCommerce. So I don’t know at this point if the calendar isn’t sending all the information that will be needed on through the WooCommerce Checkout.

    This error means that Square is rejecting the transaction as it is not receiving a transaction value that aligns with the currency for your country. The first thing to do is make sure the Square and WooCommerce are set to use the same currency.

    You can check and change the currency for your WooCommerce site by going to WooCommerce > Settings > General. If you are unsure of what currency your Square account uses, you can contact Square customer support and they will be able to tell you.

    Since the calendar is also part of this, make sure that it has the same currency set as well.

    Let us know what you uncover after looking at the currency settings.

    Thread Starter ericthomson

    (@ericthomson)

    WooCommerce Currency: United States (US) dollar ($)
    MEC Currency: USD $
    Square: All Square charges are made in the currency of your country of activation (USD for you). The country of your account will dictate the currency symbol and currency formatting of your Square Point of Sale app. Note: You must be located in the country where you activated your account to process card payments.

    Ticket response from MEC support: Please Note: The event has not added to cart, In other words, an event is not a product. MEC function and its integration with WooCommerce is as follow:
    In MEC, payment is set on Woo, when the user who is booking clicks on checkout, the payment data are sent to WooCommerce.
    If the payment is done completely and successfully, it returns “true” answer but if not, it will return “false” and the payment won’t be done.

    Plugin Support 3 Sons Development – a11n

    (@3sonsdevelopment)

    Hey @ericthomson,

    Here’s what I would do next. Go to WooCommerce > Settings > Payments > Square, and enable Logging (if it is not already enabled)

    Next, please try to make a test order to generate logs. After that, please check WooCommerce > Status > Logs, select Square from the drop-down at the top right, and click “View”.

    This log will have a record of the request that is sent to Square as well as their response back. We may be able to find the source of that error from that.

    Take a look at that log and see if you spot anything off with the currency in particular. It does have sensitive information so make sure not to post it here, but see if you can spot any clues as to what is failing there.

    Let me know what you turn up.

    Thread Starter ericthomson

    (@ericthomson)

    Here is the log:
    03-08-2019 @ 23:48:37 – Info: Begin processing payment for order 8398 for the amount of 1.00
    03-08-2019 @ 23:48:38 – Error: Array
    (
    [0] => stdClass Object
    (
    [category] => INVALID_REQUEST_ERROR
    [code] => INVALID_ENUM_VALUE
    [detail] => is not a valid enum value for billing_address.country.
    [field] => billing_address.country
    )

    )

    So I processed a Product (works fine) and then an Event (fails) and the difference is that the Product checkout included a Billing form while the Event checkout did not.

    So I opened this ticket https://webnus.ticksy.com/ticket/1935210
    ?When I go to checkout for a product, I am prompted to complete a Billing Information form (above the MEC credit card form) but when I checkout for an event I am not.
    WooCommerce is passing an empty array to my payment gateway, Square. The order fails because the billing information is not filled in.
    My question is, how can I add the billing form to events?

    So I think the issue is on their end. Thanks for helping me trouble-shoot this. I will post the final resolution for anyone else that has this same issue.

    Eric

    Plugin Support 3 Sons Development – a11n

    (@3sonsdevelopment)

    Hey Eric,

    We’re always happy to help out. Thanks for being willing to share the solution they give you.

    Take care,

    Thread Starter ericthomson

    (@ericthomson)

    I reported the issue to Webnus in a ticket “What I really need is to add the [woocomerce_checkout] shortcode to the event billing page. That will include the correct Billing form.”
    They replied “MEC does not have this feature yet. However, since we have already forwarded this to our developer team, this feature will most certainly be added to MEC in its upcoming updates.”
    Yesterday they did push a new version which included another ticket I had opened, so I have hope that this will be addressed as well. Not sure how they will implement the change, it could be just adding direct support for Square. Have to wait and see.
    If you don’t close it, I will update and mark it resolved when I have the final resolution.

    Plugin Support John Coy a11n

    (@johndcoy)

    Automattic Happiness Engineer

    Hi @ericthomson

    We’ll mark this thread as closed for now but you can reference it in a new thread should any additional assistance from us be needed.

    Thanks again!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Event orders fail: INVALID_ENUM_VALUE’ is closed to new replies.