amount must be greater than zero

  • Posts: 163
  • Thank you received: 11
10 years 2 months ago #145932

-- url of the page with the problem -- : Merci de me demander par message privé
-- HikaShop version -- : 2.3.0 + Hikamarket 1.3.2
-- Joomla version -- : 3.2.2
-- PHP version -- : 5.4.22
-- Browser(s) name and version -- : Firefox 27.0.1
-- Error-message(debug-mod must be tuned on) -- : vois ci-dessous

Bonsoir,

Premier test de paiement et premier message d'erreur pour lequel je ne trouve aucun sujet sur le forum... :blush:

Le message est donc : Invalid request parameter: amount must be greater than zero

array(11) {
  ["requestEnvelope"]=>
  array(1) {
    ["errorLanguage"]=>
    string(5) "en_US"
  }
  ["actionType"]=>
  string(3) "PAY"
  ["currencyCode"]=>
  string(3) "EUR"
  ["receiverList"]=>
  array(2) {
    [0]=>
    array(2) {
      ["email"]=>
      string(34) "contact-facilitator@mon-site.com" /* mail paypal sandbox pour le vendeur principal touchant la commission */
      ["amount"]=>
      float(33)
    }
    [1]=>
    array(2) {
      ["email"]=>
      string(27) "vendeur@adresse-fictive-pour-paypal.fr" /* mail fictif utilisé pour enregistrer le vendeur dans le sandbox Paypal */
      ["amount"]=>
      float(-3)
    }
  }
  ["feePayer"]=>
  string(12) "EACHRECEIVER"
  ["trackingId"]=>
  string(16) "20#0000000000000" /* modifié par sécurité */
  ["cancelUrl"]=>
  string(181) "http://adresse-modifiee.com/index.php?option=com_hikashop&ctrl=checkout&task=notify¬if_payment=paypaladaptive&mode=popup&task=cancel_order&order_id=20&tmpl=component&lang=fr&Itemid=129" /* modifié par sécurité */
  ["returnUrl"]=>
  string(178) "http://adresse-modifiee.com/index.php?option=com_hikashop&ctrl=checkout&task=notify¬if_payment=paypaladaptive&mode=popup&task=after_end&order_id=20&tmpl=component&lang=fr&Itemid=129" /* modifié par sécurité */
  ["ipnNotificationUrl"]=>
  string(152) "http://adresse-modifiee.com/index.php?option=com_hikashop&ctrl=checkout&task=notify¬if_payment=paypaladaptive&order_id=20&tmpl=component&lang=fr&Itemid=129" /* modifié par sécurité */
  ["reverseAllParallelPaymentsOnError"]=>
  string(5) "false"
  ["clientDetails"]=>
  array(3) {
    ["applicationId"]=>
    string(8) "HikaShop"
    ["ipAddress"]=>
    string(14) "00.000.000.000"  /* modifié par sécurité */
    ["customerId"]=>
    string(2) "80"
  }
}

array(12) {
  ["responseEnvelope.timestamp"]=>
  string(35) "2014-02-26T08%3A05%3A33.216-08%3A00"
  ["responseEnvelope.ack"]=>
  string(7) "Failure"
  ["responseEnvelope.correlationId"]=>
  string(13) "f99779c0ba022"
  ["responseEnvelope.build"]=>
  string(7) "9641252"
  ["error(0).errorId"]=>
  string(6) "580022"
  ["error(0).domain"]=>
  string(8) "PLATFORM"
  ["error(0).subdomain"]=>
  string(11) "Application"
  ["error(0).severity"]=>
  string(5) "Error"
  ["error(0).category"]=>
  string(11) "Application"
  ["error(0).message"]=>
  string(61) "Invalid+request+parameter%3A+amount+must+be+greater+than+zero"
  ["error(0).parameter(0)"]=>
  string(6) "amount"
  ["error(0).parameter(1)"]=>
  string(2) "-3"
}

L'erreur se produit lorsque je valide le paiement avec Paypal adaptive. J'ai testé avec un ou plusieurs produits et l'erreur se produit à chaque fois.

Sauriez-vous pourquoi le montant n'est pas transmis ?

Je vous remercie encore une fois pour votre aide !
Cordialement, Nossibé

Please Log in or Create an account to join the conversation.

  • Posts: 26017
  • Thank you received: 4004
  • MODERATOR
10 years 2 months ago #145955

Bonsoir,

Pouvez vous me donner des informations supplémentaires sur votre configuration de fees.
Je vois un prix négatif pour "This email address is being protected from spambots. You need JavaScript enabled to view it." et c'est assez normal que paypal adaptive refuse que le vendeur, devant se faire payer, doive "perdre" de l'argent sur la commande.

Cordialement,

PS : Pour vos question HikaMarket, même en français, merci d'utiliser la section "HikaMarket" le cas échéant je ne suis pas prévenu des messages et je dois vérifier à la main ou être notifié par l'équipe de support HikaShop.


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 163
  • Thank you received: 11
10 years 2 months ago #145963

Merci pour votre réponse Jérome, je posterai mes messages dans le forum approprié la prochaine fois :)

Voici ma configuration "Options des taxes et commissions" :
- Mode du market : Commission ;
- Prix du vendeur avec taxe : Oui ;
- Market en mode commission :
- Prix forfaitaire 0.00000
- - Devise €
- - Percentage : 10.00
- - Qté mini : 1


Le cadre "Frais des vendeur" dans la configuration du vendeur en question ne contient aucune Frais vendeur supplémentaire.

Voici une commande résultant d'un des tests qui a généré l'erreur :

N° de commande : B2A3
Client : Particulier ( particulier ) This email address is being protected from spambots. You need JavaScript enabled to view it.
Mode de paiement : PayPal
Date : 2014-02-26 16:15
Dernière Modification : 2014-02-26 16:15
Statut : créée
Total : 30,00 €
Total vendeur : -3,00 €
Vendeur : Vendeur
ID : 23

J'espère ne rien avoir oublié...
Cordialement, Nossibé

PS : Les mails destinés au client et à l'administrateur sont bien envoyés mais le mail destiné au vendeur ne l'est pas.

Last edit: 10 years 2 months ago by nossibe63.

Please Log in or Create an account to join the conversation.

  • Posts: 26017
  • Thank you received: 4004
  • MODERATOR
10 years 2 months ago #145964

Bonsoir,

Je vois le soucis.
Merci de remplacer dans le plugin "plugins/hikashoppayment/paypaladaptivve/paypaladaptive.php"

$full_amount -= round(hikashop_toFloat($suborder->order_vendor_price), (int)$this->currency->currency_locale['int_frac_digits']);
Par
$full_amount -= abs(round(hikashop_toFloat($suborder->order_vendor_price), (int)$this->currency->currency_locale['int_frac_digits']));
Ainsi que
$price = round(hikashop_toFloat($suborder->order_vendor_price), (int)$this->currency->currency_locale['int_frac_digits']);
Par:
$price = abs(round(hikashop_toFloat($suborder->order_vendor_price), (int)$this->currency->currency_locale['int_frac_digits']));
Cela devrait éviter que le plugin change de comportement si le mode commission ou fees est activé.

Cordialement,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
The following user(s) said Thank You: nossibe63

Please Log in or Create an account to join the conversation.

  • Posts: 163
  • Thank you received: 11
10 years 2 months ago #145966

Merci beaucoup Jérome ! Ca c'est de la rapidité et de l'efficacité !!!

Le problème est résolu :cheer:

Juste pour info, dois-je prévoir de faire la modification manuellement lors des maj ou sera-t-elle intégrée au prochaines versions ?

Last edit: 10 years 2 months ago by nossibe63.

Please Log in or Create an account to join the conversation.

  • Posts: 26017
  • Thank you received: 4004
  • MODERATOR
10 years 2 months ago #145969

Bonsoir,

Le patch sera bien évidement dans la prochaine release d'HikaMarket.

Cordialement,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 163
  • Thank you received: 11
10 years 2 months ago #145977

Me revoila :whistle:

Le test fonctionne parfaitement avec un seul vendeur mais avec deux vendeurs le problème se reproduit.

Le message d'erreur est le même : Invalid request parameter: amount must be greater than zero

Et voici le debug :

array(11) {
  ["requestEnvelope"]=>
  array(1) {
    ["errorLanguage"]=>
    string(5) "en_US"
  }
  ["actionType"]=>
  string(3) "PAY"
  ["currencyCode"]=>
  string(3) "EUR"
  ["receiverList"]=>
  array(3) {
    [0]=>
    array(2) {
      ["email"]=>
      string(34) "contact-facilitator@email.com" /* modifié par sécurité */
      ["amount"]=>
      float(-23)
    }
    [1]=>
    array(2) {
      ["email"]=>
      string(27) "vendeur@email.fr" /* modifié par sécurité */
      ["amount"]=>
      float(203)
    }
    [2]=>
    array(2) {
      ["email"]=>
      string(28) "vendeur2@email.fr" /* modifié par sécurité */
      ["amount"]=>
      float(50)
    }
  }
  ["feePayer"]=>
  string(12) "EACHRECEIVER"
  ["trackingId"]=>
  string(16) "42#000000000000" /* modifié par sécurité */
  ["cancelUrl"]=>
  string(103) "http://adresse-modifiee.com/index.php?option=com_hikashop&ctrl=order&task=cancel_order&order_id=42&Itemid=149" /* modifié par sécurité */
  ["returnUrl"]=>
  string(103) "http://adresse-modifiee.com/index.php?option=com_hikashop&ctrl=checkout&task=after_end&order_id=42&Itemid=149" /* modifié par sécurité */
  ["ipnNotificationUrl"]=>
  string(152) "http://adresse-modifiee.com/index.php?option=com_hikashop&ctrl=checkout&task=notify¬if_payment=paypaladaptive&order_id=42&tmpl=component&lang=fr&Itemid=149" /* modifié par sécurité */
  ["reverseAllParallelPaymentsOnError"]=>
  string(5) "false"
  ["clientDetails"]=>
  array(3) {
    ["applicationId"]=>
    string(8) "HikaShop"
    ["ipAddress"]=>
    string(14) "00.000.000.000" /* modifié par sécurité */
    ["customerId"]=>
    string(2) "87"
  }
}

array(12) {
  ["responseEnvelope.timestamp"]=>
  string(35) "2014-02-26T11%3A59%3A45.372-08%3A00"
  ["responseEnvelope.ack"]=>
  string(7) "Failure"
  ["responseEnvelope.correlationId"]=>
  string(13) "9a847bbbbd388"
  ["responseEnvelope.build"]=>
  string(7) "9641252"
  ["error(0).errorId"]=>
  string(6) "580022"
  ["error(0).domain"]=>
  string(8) "PLATFORM"
  ["error(0).subdomain"]=>
  string(11) "Application"
  ["error(0).severity"]=>
  string(5) "Error"
  ["error(0).category"]=>
  string(11) "Application"
  ["error(0).message"]=>
  string(61) "Invalid+request+parameter%3A+amount+must+be+greater+than+zero"
  ["error(0).parameter(0)"]=>
  string(6) "amount"
  ["error(0).parameter(1)"]=>
  string(3) "-23"
}

Pour info :
This email address is being protected from spambots. You need JavaScript enabled to view it. doit bien toucher 23€
This email address is being protected from spambots. You need JavaScript enabled to view it. devrait toucher 180€
This email address is being protected from spambots. You need JavaScript enabled to view it. devrait toucher 27€

Auriez-vous une autre solution magique pour régler le problème ? :)

Merci encore pour votre aide !
Cordialement, Nossibé

PS : la fonction display mode Popup du plugin Paypal adaptive me renvoit sur une page d'erreur de Paypal :

Votre dernière action n'a pas pu être terminée

Si vous étiez en train d'effectuer un achat ou d'envoyer de l'argent, nous vous conseillons de vérifier votre compte PayPal et vos emails dans 30 minutes pour vous assurer que la transaction a bien été effectuée.

Si vous êtes parvenu sur cette page à partir d'un autre site, veuillez retourner sur ce site et reprendre votre opération.
Dispatch Error, please check logfile for more information

Display mod Redirect ne pose pas de problème par contre.

Last edit: 10 years 2 months ago by nossibe63.

Please Log in or Create an account to join the conversation.

  • Posts: 26017
  • Thank you received: 4004
  • MODERATOR
10 years 2 months ago #146122

Bonjour,

Avez-vous bien ajouté la modification pour le premier élément ?

Serait-il possible d'avoir un accès back-end à votre site afin de pouvoir installer un plugin (en version debug) afin de vérifier le bon fonctionnement et les valeurs envoyé par le plugin à paypal ?

Cordialement,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 163
  • Thank you received: 11
10 years 2 months ago #146130

Bonjour,

J'ai bien ajouté les modifications du fichier paypaladaptive.php

Je vous ai envoyé un message privé avec les accès à l'administration du site.

Merci encore :)

Please Log in or Create an account to join the conversation.

  • Posts: 26017
  • Thank you received: 4004
  • MODERATOR
10 years 2 months ago #146188

Bonsoir,

Navré vous avez du recevoir pas mal d'email avec la création des commandes.
J'ai eu un petit mélange de variable durant mes tests qui m'a donné un peu de fils à retordre.

Mais l'algorithme est désormais bon et gère bien le cas de la commission.
J'en ai profité pour faire des tests en plus afin de faire des améliorations dans le mode de commission pour la prochaine release.
Je vais patcher le package courant d'HikaMarket afin de faire profiter tout le monde de ce bug fix.

Cordialement,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
The following user(s) said Thank You: nossibe63

Please Log in or Create an account to join the conversation.

  • Posts: 163
  • Thank you received: 11
10 years 2 months ago #146424

Bonjour,

C'est génial !!! Je vous remercie encore pour votre travail !!!

Cordialement, Nossibé

Please Log in or Create an account to join the conversation.

  • Posts: 163
  • Thank you received: 11
10 years 1 month ago #147560

Bonjour,

J'ai mis à jour Hikamarket sans penser que le plugin Paypal adaptive serait mis à jour en même temps, du coup la modification que vous avez apporté a été supprimée... :blush:

Pouvez-vous m'indiquer la modification à effectuer s'il vous plait ?


Cordialement, Nossibé

Edit : Désolé, ce dernier message était inutile, il suffisait de mettre à jour Hikamarket... :blush: :blush: :blush:

Last edit: 10 years 1 month ago by nossibe63.
The following user(s) said Thank You: Jerome

Please Log in or Create an account to join the conversation.

Moderators: Obsidev
Time to create page: 0.087 seconds
Powered by Kunena Forum