- This topic has 14 replies, 2 voices, and was last updated 1 year, 7 months ago by Christer Fernstrom.
- June 11, 2019 at 1:55 pm #814540Christer FernstromParticipant
I have been using the Woocommerce Payment plugin for quite some time without any problems until a few days ago. What happended (according to the bank) was that a customer first entered an erraneous credit card number, which resulted in a refusal of the transaction, then returned to the payment page and entered a correct number, and the payment went through. This resulted in the following sequence of state changes in Woocommerce:
(I’m translating from French so some of the wordings may be slightly wrong)
1) Customer directed to the payment page
2) Payment refused by the bank (error in card number)
3) The customer comes back from the payment page. The payment was refused by the bank. The order status changed from waiting for payment to cancelled
4) Payment accepted by the bank
5) Status of the order changed from cancelled to in progress
The problem is that the state changes 4 and 5 were not detected by Hotel Booking and the booking remained cancelled, while the order came through in Woocommerce.
This is fortunately a rare situation, but can never the less happen (and it did). Could this be fixed? I’m not sure if the problem lies in the Hotel Booking plugin or the Hotel Booking Woocommerce Payments plugin (or possibly both).
— christerJune 18, 2019 at 11:19 am #816657J. DavisKeymaster
Thank you for your question. If the payment was refused by bank the booking will be cancelled and as far as I know it is not possible to perform the same payment once again. If it has been done somehow we’d recommend to control such payments/bookings manually. Or recommend your guests to make a new booking instead of paying the same one again.
J. DavisJune 18, 2019 at 1:47 pm #816705Christer FernstromParticipant
Thanks for looking into this. I have talked to the bank and for them this was two payment transactions and they have no possibility to see that the second payment (after the first which was refused) relates to the same order.
The thing is that the Woocommerce order which corresponds to tbe booking was accepted (by Woocommerce), but this status change was not picked up by Hotel Booking.
If Woocommerce makes it possible for a user to return to the payment page and make a new attempt to pay I’m not sure we can prevent him/her from doing this.
I just had a very quick look into the code of your HB-Woocommerce-Payment plugin and saw that you have action hooks (in woocommerce-listener.php) for the Woocommerce order status changes and it must be that once you have processed a failed payment you do not accept a completed payment for the same booking. This sounds like something that could probably be fixed on your side. What do you think?June 27, 2019 at 11:52 am #819872J. DavisKeymaster
This case is rather an exception as other payment methods like PayPal, Stripe, etc. does not allow to pay for the order that was failed prior. So the plugin functions properly.
You may submit a request and indicate that Order that was failed first and then re-paid successfully. We’ll check this for you.
J. DavisJanuary 26, 2020 at 9:10 pm #909885ThomasParticipant
I have experienced the same issue several times, and I would suggest this is an issue from your HB Woocommerce payment plugin.
It does happen that a card transaction fails for different reasons, and in this case the customer is directed back to the woocommerce checkout page where he can try to pay again for the same order, which can then succeed in a second transaction.
The issue is that the payment post created by HB plugin is not updated when the Woocommerce order goes from “cancelled” to “in progress”, and so is not the booking post. In the end the customer gets a message that the bank transaction is fine but he does not receive confirmation email that the booking is done.
This issue also happened to me with a balance payment requested through the HB payment request plugin : the first transaction of the woocommerce order failed, then the customer tried again and succeeded on the second transaction within the same woocommerce order, but because the HB plugin did not pick up the updated status of order the customer still saw a balance payment to be paid when he was clicking again on the same payment link…
John, I think this is not an exception and you cannot say that the plugin functions properly. Can you look into it ?
ThomasJanuary 30, 2020 at 11:14 am #911659J. DavisKeymaster
Thank you for reporting this. This also depends in payment gateway as Retry option is not available for all payment gateways. I’d highly appreciate if you submit a request specifying the steps to replicate the issue or recommend a payment gateways with Retry option that can be easily set up for testing.
Probably we add a fix in the next version release.
J. DavisFebruary 4, 2020 at 10:04 am #913610Christer FernstromParticipant
For the steps, please se my initial description. We have again had this is issue this week and this time it was REALLY annoying, since it concerned a full week booking and the hotel is full, which means that the client needs to be hosted at another hotel at our cost.
Please notice that the Woocommerce order created by your gateway plugin has a correct state, i.e. that the transaction has been accepted by the bank. But this state change has not been propageted and the status of the booking is not updated. This must be and should really not be difficult to correct in your gateway plugin!
We use the payment gateway by Credit Agricole, which is one of the largest banks in France.February 9, 2020 at 4:42 pm #916046Christer FernstromParticipant
Until this is corrected: if anybody is interested I have written a small plugin that lists all booking payments that appear to have failed and highlights those where the customer in reality has paid. When I ran this against our bookings over the last year I found 3 such cases, which is not a lot, but still 3 too many, since these bookings appear as cancelled despite having been paid.February 10, 2020 at 3:06 pm #916403Alex MParticipant
Let me explain how it works.
1. The Hotel Booking plugin creates an order in WooCommerce and sends a customer to the WooCommerce checkout page to complete a payment.
2. The “Pending Payment” timer turns on. There is a specific amount of time we give to the user to pay for the booking.
If a user does not pay during this interval of time, the system sets the status of the booking as “Abandoned” and makes the accommodation available for further booking.
3. If a user makes a payment in WooCommerce and ends up with the “Completed” status, we capture this status and update the booking with the “Confirmed” status accordingly.
4. If a user makes a payment in WooCommerce and ends up with the “Failed” status, we capture this status and update the booking with the “Failed” status accordingly.
We do not allow direct future updates of the status from “Failed” to “Confirmed” because an accommodation may have already been booked by someone else.
We are working on this issue and we have two variants of further improvements:
1. To allow to change the status of a booking from “Failed” to “Confirmed” only during the “Pending Payment” time.
2. To allow to change the status of a booking from “Failed” to “Confirmed” anytime with an additional verification that booking is still possible. We don’t know what to do when booking won’t be possible.
Let me know what you think.February 10, 2020 at 3:17 pm #916414Alex MParticipant
Right now you can enable “Use Hotel Booking checkout endpoints instead of WooCommerce ones.” in the plugin settings to redirect a user to the Hotel Booking failed page.
This is not that user-friendly because a user will need to go through the accommodation search and booking process once more (because of a failed transaction), but it’ll eliminate the problem with the status change you described.February 10, 2020 at 4:42 pm #916474Christer FernstromParticipant
Thanks a lot for your explanaition. I think either 1) or 2) would work. But in addition you should also pick up the situation when the WC order status changes to “wc-processing” too late (after time-out or after the accomodation has become unavailable depending on which choice you make). When this happens you should send an alert to the hotel administrator. Doing this will allow the admin to take manual action, which is important because the customer HAS paid.
I had already enabled “Use HB checkout endpoints instead of WC ones” …February 14, 2020 at 9:22 am #918159ThomasParticipant
I also think both workarounds would be fine.
Maybe the 1st option is better to avoid cases you mention where accomodation could be booked by other client at the same time.
But, speaking personnally, we have a self-rental property with a few appartements and it is rather rare that 2 orders will be placed at the same time. The case you mention is more for large hotels with many rooms.
1st option is also good if the admin can decide how long he will allow for a payment and booking to be updated after the woocommerce order has changed (e.g. 2 minutes or 20 minutes).
@John thanks for the reply but I lack time to create a support case about this. And as Christer said the steps are described in his first post.February 14, 2020 at 9:32 am #918166ThomasParticipant
Hi Alex and John,
I would like to emphasize that the behaviour described here for the Woocommerce add-on is also an issue when it is combined with the Payment request add-on plugin : when the client goes to the payment link to pay balance, if the first transaction fails and the second succeeds (on the same woocommerce order), then the HB payment is not updated and so the client still sees “Failed” payment status on the payment link whereas the woocommerce order succeeds.
Another weird behaviour is that the admin receives a confirmation email of paid balance as soon as the HB payment post is created, no matter if the transation fails or succeed. But I will report this in the Payment request add-on forum.
ThomasFebruary 24, 2020 at 4:12 pm #921972Alex MParticipant
The issue is fixed in Hotel Booking WooCommerce Payments 1.0.5.
How it works:
1. The plugin accepts the status change from Failed to Complete anytime.
2. Before the plugin changes the status of the booking, it checks the accommodation availability to see if it’s possible.
If booking is possible, the status is changed to Complete.
If booking is not possible, a notification is sent to the website Admin requesting manual actions. You can find email template in the plugin settings.February 24, 2020 at 4:22 pm #921988Christer FernstromParticipant
- You must be logged in to reply to this topic.