Prestashop: [BOOM-2711] Order message OK even if Payment KO

Created on 23 Aug 2018  ·  13Comments  ·  Source: PrestaShop/PrestaShop

This issue has been migrated from the Forge. Read the original ticket here.

  • _Reporter:_ vincentbz
  • _Created at:_ Fri, 24 Mar 2017 11:24:08 +0100

Hi,

When I order, my payment is done via a payment gateway. Once the payment is done, i'm redirected to the order confirmation page, with the "your order is confirmed" even if the payment is KO.

It's from Addons and Kamel can make us a demonstration of the bug.

Before fixing this, we need a little workaround with Addons to find the better solution (several ways to do it). See with them how it works in 1.6

Thanks !

  • How to reproduce the issue ?

Create an order from FO

The payment needs to fail (credit card : see with Kamel)

See the order confirmation page

1.7.1.0 1.7.4.2 Bug Checkout FO L Major Payment To Do

Most helpful comment

This makes me think if the error header shouldn't actually be handled by the payment module instead of core. Provide a general error by default but add a hook for the payment module to provide more info.

All 13 comments

This comment has been migrated from the Forge. Read the original comment here.

  • _Author:_ guillaumeb
  • _Created at:_ Mon, 27 Mar 2017 11:38:51 +0200

Hello !
Tu peux nous mettre plus de screenshots et de description stp ?
Merci

This comment has been migrated from the Forge. Read the original comment here.

  • _Author:_ kboukhateb
  • _Created at:_ Mon, 27 Mar 2017 11:52:07 +0200

Yo,

Pas vraiment non ^^
La description faite pour le ticket et la screenshot postée résument parfaitement la situation.
Si la commande revient en erreur de paiement (KO), on a quand même le message "Votre commande est confirmée".
Juste en dessous du message, on peut trouver le hook "HOOK_ORDER_CONFIRMATION' qui permet d'ajouter ce qu'on veut. Mais il s'agit bien d'un contenu additionnel au message déjà affiché.

Je reste dispo.

This comment has been migrated from the Forge. Read the original comment here.

  • _Author:_ guillaumeb
  • _Created at:_ Mon, 27 Mar 2017 12:06:18 +0200

ok merci quand même pour ces petites précisions je passe le ticket en "open"

This comment has been migrated from the Forge. Read the original comment here.

  • _Author:_ marion_francois
  • _Created at:_ Tue, 9 Jan 2018 15:29:27 +0100

Kamel Boukhateb

Je voudrais bien voir avec toi pour la reproduction, quel module de paiement tu utilises ?
J'ai testé avec Paypal & Payplug, quand la carte n'est pas bonne on n'est pas redirigé sur le site, on reste sur la plateforme de paiement.
Et si je retourne sur le site, je retrouve mon panier.

Du coup je voudrai voir avec toi si ça fonctionnait en 1.6 et quel était le message

This comment has been migrated from the Forge. Read the original comment here.

  • _Author:_ marion_francois
  • _Created at:_ Wed, 17 Jan 2018 16:34:19 +0100

Le problème ici est qu'il n'y a aucune condition pour l'affichage du message "Your order is confirmed", que le paiement soit accepté ou en erreur.
Il faudrait donc ajouter une condition.
Si le status de la commande est payment error, alors on affiche un message "Payment error" sinon on affiche "Your order is confirmed".

Icone: error outline
Couleur: #C45C67

Louise Bonnard peut-on ajouter la chaine "Payment error" ?
Il me semble que le domaine est Shop.Theme.Checkout

This comment has been migrated from the Forge. Read the original comment here.

  • _Author:_ louise bonnard
  • _Created at:_ Thu, 18 Jan 2018 11:56:48 +0100

Indeed ! La chaîne Payment error existe déjà ici :

1.7.2/Admin/Orderscustomers/Feature
1.7.3/Admin/Orderscustomers/Feature

Any news here? Just tested it with wirecard module and yes - no matter the payment status, the message is always OK. Eaven worse, the e-mail sent to the customer is "order confirmation" instead of "payment error".
This is a major bug.

@LouiseBonnard don't you think we should do the same here as what we have done in the transactional email ?

@colinegin, @rdy4ever, indeed, it would be great if this could be fixed!

Here are how things should work: as @marionf said, we must add a condition to check if the payment encountered an error. If yes, the text in the header must be replaced, cf. the screenshots below. Besides, the email sent to the customer must be the _payment_error_ one instead of _order_conf_.

In the case the order status is one of the blue ones, it should be this header:
Capture d’écran 2019-12-18 à 14 37 10

In the case the order status is the red one, it should be this header:
Capture du 2018-01-17 16-27-21

Thanks @LouiseBonnard !

I think the error should also include the reason of the error. Like "Payment error. Reason: Your bank refused the transaction. Please try again later or contact yor bank if this happens again"

I don't know if we can get this information from all payment modules at this time and place - and it is probably handled by gateways in most credit card cases. My suggestion is to stay neutral in the header. Also, it might not be a great idea since the _payment_error_ email sent tells the customer to reach the merchant to know more about it. :-)

This makes me think if the error header shouldn't actually be handled by the payment module instead of core. Provide a general error by default but add a hook for the payment module to provide more info.

Was this page helpful?
0 / 5 - 0 ratings