• On Dec 1, we had a situation where a customer attempted to purchase a physical product using the Stripe payment option. However, despite the customer’s credit card failing to process the payment (evident in our stripe account), our WC system erroneously marked the order as completed and dispatched the product without payment was successfully received.
    It even skipped the PENDING phase.

    1. Why is Pending skipped?
    2. Why does anything further happen if stripe payment failed?
    3. How to prevent this?
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Payment Plugins

    (@mrclayton)

    Why is Pending skipped?

    The Stripe plugin only calls WC_Order::payment_complete() if the payment is actually successful in Stripe. That method is how WooCommerce updates the order’s status after a successful payment. The Stripe plugin never calls WC_Order::payment_complete() unless Stripe confirms the payment is successful. It’s likely you have some other plugin that updated the order status. What do the order notes say on the order details page? A screenshot of that would be helpful.

    Why does anything further happen if stripe payment failed?

    It doesn’t, that’s why I suspect you have some functionality on your site that updates the order’s status.

    How to prevent this?

    You would need to provide more information like the order notes so they can be reviewed.

    Kind Regards

    Thread Starter clickingclients

    (@clickingclients)

    Thanks for replying.
    We are connected with shippingeasy.com which does update the order status to COMPLETED after they have shipped it.

    This error order never goes: “Pending payment to Processing” (see normal version at end).

    Payment never arrived in Stripe.

    Order was created at the same time the shipping label was set.

    The top 3 notes happened after we switched it back to Pending while reaching out to the customer for payment.
    We resent the cart for the customer to checkout.

    However, it auto flipped to Cancelled after some weird timeout. We cannot determine from logs if the customer cancelled it or what.

    Error order:

    • Unpaid order cancelled – time limit reached. Order status changed from Pending payment to Cancelled.March 13, 2024 at 3:05 pm Delete note
    • Charge voided in Stripe.March 13, 2024 at 3:05 pm Delete note
    • Order status changed from Completed to Pending payment.March 13, 2024 at 1:43 pm by clickingclients Delete note
    • Order status changed from Pending payment to Completed.December 1, 2023 at 11:49 pm Delete note
    • Shipment Tracking Number: 1ZXXXXXXXXXXX3
      Carrier Key: ups
      Carrier Service Key: ups_ground
      Cost: 14.73December 1, 2023 at 11:49 pm Delete note

    Normal Order

    • Order status changed from Processing to Completed.November 20, 2023 at 11:00 pm Delete note
    • Shipment Tracking Number: 1ZCXXXXXXXX20
      Carrier Key: ups
      Carrier Service Key: ups_ground
      Cost: 25.02November 20, 2023 at 11:00 pm Delete note
    • Order status changed from Pending payment to Processing.November 18, 2023 at 3:13 am Delete note

    EVET DATA in stripe when it “cancelled” yesterday:

    EVENT: payment_intent.canceled

    “canceled_at”: 1710306308,

    “cancellation_reason”: null,

    “failure_code”: “payment_intent_authentication_failure”,

    “failure_message”: “The provided PaymentMethod has failed authentication. You can provide payment_method_data or a new PaymentMethod to attempt to fulfill this PaymentIntent again.”,

    “outcome”: {

    “network_status”: “declined_by_network”,

    “reason”: “generic_decline”,

    “risk_level”: “normal”,

    “seller_message”: “The bank did not return any further details with this decline.”,

    “type”: “issuer_declined”

    },

    “url”: “/v1/charges?payment_intent=pi_XXXXXXXXXXXXXXX”

    “status”: “canceled”,

    Plugin Author Payment Plugins

    (@mrclayton)

    However, it auto flipped to Cancelled after some weird timeout. We cannot determine from logs if the customer cancelled it or what.

    WooCommerce will cancel an order that remains pending for a certain amount of time.

    Whenever the Stripe plugin process a payment, an order note like the following will be added:

    Order charge successful in Stripe. Charge: py_3Otyy4Ju44Ba3shr03pL70qK. Payment Method: Visa ending in 1111

    I don’t see that in the order notes you provided but I can see where authentication failed for the payment method and then the payment intent was cancelled within Stripe.

    Something changed the order from pending to processing which you can see in this note:

    Order status changed from Pending payment to Processing.November 18, 2023 at 3:13 am?Delete note

    I don’t see anything here to indicate there was an issue with the Stripe plugin.

    Kind Regards,

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘WC erroneously marked the order as completed on failed stripe payment’ is closed to new replies.