• Resolved rqcmt

    (@rqcmt)


    I am using WooCommerce 7.1.0+ WooCommerce Square 3.3.0 for card payments.
    In this case, if there is an error or problem with the card information, the order will not be completed at that point.
    This has been working fine until now, but the other day we had a situation where the order was approved on the WooCommerce side, even though the payment was not completed on Square.
    There is no payment history on the Square side admin screen.

    First, I contacted Square Corporation in Japan, where I live, but was told that this is a Woocommerce issue and that I should contact them.

    I asked a question on the Woocommerce forum and was advised that this would be more appropriate, so I am asking again.

    https://www.ads-software.com/support/topic/order-is-approved-even-though-square-payment-has-not-been-made/#post-16293113

Viewing 13 replies - 1 through 13 (of 13 total)
  • Hi @rqcmt

    Thanks for creating a new thread.

    Can you please share with us a screenshot of the Order Notes similar to the image below as this portion was not included from your previous screenshot.

    WooCommerce Square: by WooCommerce – 3.3.0 (update to version 3.4.1 is available)

    As a first step, please update the plugin to its latest version, enable debugging under WooCommerce > Settings > Payments > Square > Debug Mode > Save to Log, then create an order using Square’s Sandbox Mode for testing purposes and see if this works?

    Sometimes, updating the plugin to its latest version usually resolves the issue.

    If so, then this kind of problem is usually caused by your theme or a third-party plugin present on your site. We can run a conflict test to verify this. I’d recommend cloning your site to a staging environment and performing the tests described on this guide without modifying your live site or impacting customers. Many hosts provide staging facilities, so it’s worth checking in with them. It’s also possible to do it using the free WP Staging plugin.

    If this was caused by a third-party plugin present on your site, it would be best to reach out to the developers for further assistance here.

    If this did not resolve the issue, please provide the fatal error logs (if any) under WooCommerce > Status > Logs.

    Let us know how it goes!

    Thread Starter rqcmt

    (@rqcmt)

    Hi,@xue28

    As a premise, this is a first time issue.
    No problems have occurred before or since.
    Would an update to the latest version help to find the cause of the one-time problem?

    If this did not resolve the issue, please provide the fatal error logs (if any) under WooCommerce > Status > Logs.

    No errors.

    Screenshots are below.
    https://snipboard.io/8dwDnu.jpg

    The Order Notes in the screenshot are in Japanese, so I will supplement them.

    1.System automatic processing
    Square Payment Failed (Status code PAN_FAILURE: Authorization error: ‘PAN_FAILURE’) Order status changed from pending to failed.

    The following is a coping action, so I don’t think it has anything to do with the issue.

    2.Customer Operation
    Cancellation of order by customer Order status changed from Failed to Pending.

    3.Administrator Operation
    Order status changed from pending to received (bank transfer).

    Thank you.

    Plugin Support Tseten a11n

    (@tibetanitech)

    Hi @rqcmt

    Thank you for sharing additional information about the issue you are having with your Square payment.

    It looks like the customer initiated the payment via Square but due to incorrect card information the payment failed. If you look at the following error code, Square Payment Failed (Status code PAN_FAILURE: Authorization error: ‘PAN_FAILURE’) in the link below you will understand why the order didn’t process:

    https://developer.squareup.com/reference/square/enums/ErrorCode#value-PAN_FAILURE

    Since you have confirmed that the payment was not received in Square this explains the reason.

    The third note in the order Order status changed from pending to received (bank transfer). says you’ve manually changed the order status.

    For more information on the different order status in WooCommerce please check the following support document: https://woocommerce.com/document/managing-orders/#order-statuses

    Let us know if you have further questions.

    Thread Starter rqcmt

    (@rqcmt)

    Hi,@tibetanitech

    I understand that the payment could not be made in Square due to an error in the card information.

    The problem is that the order has been established as an order in Woocommerce even though it has not been paid.

    At the very least, if I intentionally enter the wrong card information myself, I get an error on the cart and the order itself does not complete.
    In other words, I cannot reproduce this phenomenon.

    https://snipboard.io/LBtu2e.jpg

    Saif

    (@babylon1999)

    Hello @rqcmt,

    At the very least, if I intentionally enter the wrong card information myself, I get an error on the cart and the order itself does not complete.
    In other words, I cannot reproduce this phenomenon.

    Even when the payment information is incorrect, the order will still come through as the user can pay from their my-account page.


    Link to image.

    You can test this when in Sandbox mode using the following test card number with a faulty CVV 4111 1111 1111 1111 .

    Although I’m not sure, but it seems logical that if the card number itself was wrong the order not pass, otherwise this could be used to create spam orders. ??

    I hope this clears up the confusion, let us know if you have any other questions.

    Cheers!


    Thread Starter rqcmt

    (@rqcmt)

    Hi,@babylon1999

    I checked the error on the Square developer page and tested in sandbox mode.
    The explanation of this error is as follows.

    >The specified card number is invalid. For example, it is of incorrect length or is incorrectly formatted.

    https://developer.squareup.com/reference/square/enums/ErrorCode#value-PAN_FAILURE

    However, if the length of the card number is different on the cart, an error occurs on Javescript and the order itself is not completed.
    In other words, we cannot reproduce the phenomenon of an order being executed on Woocommerce even though the settlement failed on Square, as in this issue.

    https://snipboard.io/mCvJhU.jpg

    Plugin Support Ryan Ray, a11n

    (@ryanr14)

    Hi @rqcmt,

    Thanks for the reply and info. I believe the crux of our issue here is that you’re wondering why WooCommerce creates an order (no matter the status) even if the order doesn’t exist in the Square or any payment processor.

    I believe anytime the order is submitted it’s important it’s recorded, thus WooCommerce creates an order on the backend. That happens even if an error happens at checkout.

    In our example, I used the card here that triggers a PAN error. As a customer, I see this error on the front end.

    https://d.pr/i/Vairt6
    Image link: https://d.pr/i/Vairt6

    With that, I still see an order is created in the backend. Its order status is failed until the customer fixes the error and pays without issues. This order also does not show up in Square as any sort of transaction.

    Unless I am misunderstanding at the moment, which is possible, I believe I’ve replicated the error you’re talking about. Payment failed, order is created in WooCommerce set to failed, and ultimately doesn’t exist in Square.

    Is that correct?

    Thread Starter rqcmt

    (@rqcmt)

    Hi,@ryanr14

    Thank you.
    You are right.
    I need to understand this phenomenon and make sure that when problems occur, the management members and customers know the appropriate response.
    In other words, I have to reproduce the phenomenon.

    I have tested with the following card information and was able to reproduce the problem perfectly.

    Number: 4111 1111 1111 1111
    CVV: 911 or Postal code: 99999

    https://developer.squareup.com/docs/devtools/sandbox/payments

    Even though the payment has not been made, the order has been placed on Woocommerce.
    Square has access to this error at the time it occurs, right?
    But is it inevitable that there is no error left?

    Plugin Support Ryan Ray, a11n

    (@ryanr14)

    Thanks for the reply and understanding. I appreciate you working to make sure you understand how everything works together.

    You are right that Square gets this request from WooCommerce to process a payment. It returns the error, whichever that may be, to WooCommerce where it is logged IF you have logging enabled in your Square payment settings.

    There are also likely logs on Squares side of things. I am not certain on where to look for those, but they would surely log the request and response for any transactions coming into their system.

    Thread Starter rqcmt

    (@rqcmt)

    Hi,@ryanr14

    Understood.
    You have essentially understood my question and led me to an understanding.
    Thank you for everything.

    There are also likely logs on Squares side of things. I am not certain on where to look for those, but they would surely log the request and response for any transactions coming into their system.

    I will contact Square Customer in Japan again about this.

    Plugin Support Ryan Ray, a11n

    (@ryanr14)

    Hi @rqcmt,

    You are most welcome, it’s been my pleasure.

    I did do a little digging now and found, at least for my sandbox testing, where I can view the API requests and responses. See their own docs on this here.

    I was then able to view my previous test payments that we’d used to trigger errors, etc…

    https://d.pr/i/UsJ90m
    Image link: https://d.pr/i/UsJ90m

    Thread Starter rqcmt

    (@rqcmt)

    Hi,@ryanr14

    I generated an error with Enable Logging and it was definitely logged in the Square developer dashboard.
    This is consistent with the contents of the Order notes on the Woocomerce side.
    The screenshot is an example of an error in the post code.
    https://snipboard.io/3Q291B.jpg


    This completely solved my question.
    Thank you so much!!!

    Hi @rqcmt

    I’m glad we we’re able to help you here! ??

    Meanwhile, if you have a few minutes, we’d love it if you could leave us a review:

    https://www.ads-software.com/support/plugin/woocommerce-square/reviews/

    Thanks!

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Orders are approved even though payment has not been made in Square + Woocommerc’ is closed to new replies.