TrogloGeek / prestashop-tggatos-module

TggAtos Module for Prestashop (1.4 to 1.7), ATOS SIPS 6xx payment gateway
61 stars 34 forks source link

1% fee relative to cart amount - failure to confirm payment #47

Closed npirlot closed 6 years ago

npirlot commented 8 years ago

Hi,

Thanks for a very useful module, which is almost perfect. I tried to implement it, however I came up with a problem when I put 1% fee relative to cart amount (I'm using single payment only). The fee is calculated and added correctly, however when the bank returns to the shop after successful payment, PrestaShop still sends the shopper a "payment failed" email as the total amount paid, after recalculation by the module (i.e. removal of fee applied before going to payment) is out by 1 or 2 cents.

I believe this may be caused by the rounding utilities or the way the amount of the fee, deducted from the order amount, is all re-calculated. I tried all the various rounding options in PrestaShop, but none of them seemed to fix the problem.

I would also make an improvement suggestion for the module: the ability to make the fees for the transaction (which are extremely useful) added to the order, so they are visible to the shopper on the invoice, and that admins can see how much is being collected in fees.

Thanks again for your work and efforts in putting together this module!

PS: Versions info for environment on which the above problem occurred:

TrogloGeek commented 8 years ago

Hello,

I'll have to check my code, not being able to substract correctly payment fee is definitely a bug. I'm seriously lacking time now as I joined french LiveMon start up, so this may take a while.

I would also make an improvement suggestion for the module: the ability to make the fees for the transaction (which are extremely useful) added to the order, so they are visible to the shopper on the invoice, and that admins can see how much is being collected in fees.

I intended to do so using a specialized product for this but did not found time to implement it, especially when so few people use the payment fee feature. I already flagged this as a wanted feature but will not probably find time in a near future to work on it.

TrogloGeek commented 8 years ago

Version 4.1.1 should fix your issue.

Martialdelastic commented 8 years ago

Hi,

Thanks for you module.

I have the same problem. after looking for. it can be a problem with the specific price. and discount all calcul are right for the payment, but during the verification it's fail.

in fact il you use reduction and specific price( for group) during the verification the module calcul the discount of the original price and not of the specific price. so at the end the order fail.

do you have any idea for fix that ?

Thx

TrogloGeek commented 8 years ago

Hi @Martialdelastic, please write down your PrestaShop and TggAtos version numbers.

Could you please re-phrase your explanation? I don't understand your case. If you are not comfortable explaining it in english you can explain it in French. You are talking about specific prices and discounts, but do you actually use payment fee options of the module?

Martialdelastic commented 8 years ago

Bonjour, en effet je ne suis pas a l'aise en anglais. je suis avec :

le soucis que je rencontre est que plusieurs de mes commandes sont en erreur de paiement car le montant du panier est different de ce que le client a vraiment payé.

il se trouve que le module calcul les reduction sur le prix des produits et non le prix des produits spécifique lien a un groupe client.

par exemple : un produit X a un prix de 100€ le produit X a un prix spécifique de 50€ si l'utilisateur appartient au groupe 2.

un client du groupe 2 achète le produit X à 50€ et utilise un code de reduction de 10%

son panier set donc de 50 - (50*0,10) = 45€

il règle et lors de la verification du paiement le module attend un montant de 50 - (100*0,10) = 40€ votre module calcule la reduction sur le prix du produit X non spécifique au groupe 2 .

Ainsi a commande est annulé car le client a payé 45€ (le bon montant) mais le module attend un panier de 40€

avez vous une idée pour résoudre ce soucis.

Merci

TrogloGeek commented 8 years ago

Si les frais de traitement bancaires ne sont pas utilisées le problème n'est pas lié à ce ticket.

Pour résoudre ce genre de soucis l'idéal est généralement d'essayer de répliquer le problème sur une installation fraiche de PrestaShop pour cerner la cinématique la plus simples permettant de résoudre le problème. Si vous pouvez me donner un tutoriel sur comment reproduire à coup sur le problème en partant d'une nouvelle installation, alors le problème est déjà quasiment corrigé.

Martialdelastic commented 8 years ago

Bonsoir, Merci de votre concideration pour ce soucis. Je vais reproduire cette incident sur une installation fraîche de prestashop 1.6..0.6 avec un produit qui a un prix spécifique au groupe et une réduction et je vous tiens au jus du résultat. Bonne soiré à vous.

Le mer. 11 mai 2016 23:04, Damien VERON notifications@github.com a écrit :

Si les frais de traitement bancaires ne sont pas utilisées le problème n'est pas lié à ce ticket.

Pour résoudre ce genre de soucis l'idéal est généralement d'essayer de répliquer le problème sur une installation fraiche de PrestaShop pour cerner la cinématique la plus simples permettant de résoudre le problème. Si vous pouvez me donner un tutoriel sur comment reproduire à coup sur le problème en partant d'une nouvelle installation, alors le problème est déjà quasiment corrigé.

— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub https://github.com/TrogloGeek/prestashop-tggatos-module/issues/47#issuecomment-218589844