• Resolved shiningsoldier

    (@shiningsoldier)


    Hello!
    Here is the prooblem:

    1. The client adds the product to cart and presses the “Place order” button
    2. If he doesn’t have enough money to buy this product, he receives an error message

    But the order is still created with the status “Pending payment”. Is it possible to prevent the order creation if the client doesn’t have enough money?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Senff

    (@senff)

    Hey @shiningsoldier

    What payment method are you using for this? If this is by credit card, and they don’t have enough funds, their bank should refuse the transaction (when your site tries to charge their card).

    If you’re using another payment method to accept payments, let us know which one and we can help you further.

    Thread Starter shiningsoldier

    (@shiningsoldier)

    I think the main problem is that I’m using the custom gateway (we’re using the special tokens instead of money).
    I implemented the process_payment method in my custom gateway where I send all requests. But this method runs after the process_checkout method from the standard WooCommerce functionality. So, the process_checkout creates the order, and only after that my custom gateway checks whether the user has enough tokens or not.

    Plugin Support Damianne P (a11n)

    (@drwpcom)

    Hi @shiningsoldier. Sorry that we missed your last response.

    There isn’t a way built into WooCommerce to prevent the order from being created but if you set the Hold stock minutes in WooCommerce > Settings > Products > Inventory, the order will be cancelled once that time is up.

    Plugin Support Gabriel – a11n

    (@gabrielfuentes)

    Since it’s been a while since we last heard back from you, I’m going to mark this thread resolved.

    Hopefully, you were able to find a solution to your problem! If you have further questions, please feel free to open a new topic.

    Cheers! ??

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Prevent order creation if client doesn’t have enoough money’ is closed to new replies.