[in-commerce] Wrong Amount Sent to Paypal Gateway

1 view
Skip to first unread message

Phil

unread,
Jun 7, 2012, 5:49:18 PM6/7/12
to in-port...@googlegroups.com
Hi,

while I was doing some tests, I've found that paypal.php gateway class have a bug: amount sent to gateway is SubTotal, instead of being TotalAmount:

#51:  $ret['amount'] = $this->ConvertCurrency($item_data['SubTotal'], $target);

I've manually checked that this is not the case for all other built-in gateway classes.

And I'm still very happy to see I can't access Mantis in-commerce related tasks... Surely because I can't bring anything good there ;-)

p

Alexander Obuhovich

unread,
Jun 8, 2012, 2:22:39 PM6/8/12
to in-port...@googlegroups.com
Have you checked paypal api, maybe he really expects only subtotal in that fields and all processing fees should go into other field?

Also is this happening to simple paypal or to paypal pro?



p

--
You received this message because you are subscribed to the Google Groups "In-Portal Bugs Team" group.
To post to this group, send email to in-port...@googlegroups.com.
To unsubscribe from this group, send email to in-portal-bug...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/in-portal-bugs?hl=en.



--
Best Regards,

http://www.in-portal.com
http://www.alex-time.com

Phil

unread,
Jun 8, 2012, 2:28:13 PM6/8/12
to in-port...@googlegroups.com
Well, you are partially right: other paypal fields are intended to send shipping cost and VAT to paypal, but there's no such field for processing fees, so they'd need to be added to SubTotal, or we could simply get rid of all paypal details (which are not mandatory), and just send TotalAmount, like we do for all other gateways.

As you could have guessed from php class filename, it's for "paypal", not "paypal pro".


Le vendredi 8 juin 2012 à 20:22, Alexander Obuhovich a écrit :

> Have you checked paypal api, maybe he really expects only subtotal in that fields and all processing fees should go into other field?
>
> Also is this happening to simple paypal or to paypal pro?
>
>
> On Thu, Jun 7, 2012 at 11:49 PM, Phil <ph...@wbtc.fr (mailto:ph...@wbtc.fr)> wrote:
> > Hi,
> >
> > while I was doing some tests, I've found that paypal.php gateway class have a bug: amount sent to gateway is SubTotal, instead of being TotalAmount:
> >
> > #51: $ret['amount'] = $this->ConvertCurrency($item_data['SubTotal'], $target);
> >
> > I've manually checked that this is not the case for all other built-in gateway classes.
> >
> > And I'm still very happy to see I can't access Mantis in-commerce related tasks... Surely because I can't bring anything good there ;-)
> >
> > p
> >
> > --
> > You received this message because you are subscribed to the Google Groups "In-Portal Bugs Team" group.
> > To post to this group, send email to in-port...@googlegroups.com (mailto:in-port...@googlegroups.com).
> > To unsubscribe from this group, send email to in-portal-bug...@googlegroups.com (mailto:in-portal-bugs%2Bunsu...@googlegroups.com).
> > For more options, visit this group at http://groups.google.com/group/in-portal-bugs?hl=en.
>
>
>
>
> --
> Best Regards,
>
> http://www.in-portal.com
> http://www.alex-time.com
> --
> You received this message because you are subscribed to the Google Groups "In-Portal Bugs Team" group.
> To post to this group, send email to in-port...@googlegroups.com (mailto:in-port...@googlegroups.com).
> To unsubscribe from this group, send email to in-portal-bug...@googlegroups.com (mailto:in-portal-bug...@googlegroups.com).

Alexander Obuhovich

unread,
Jun 8, 2012, 2:33:27 PM6/8/12
to in-port...@googlegroups.com
From paypal docs ( https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_html_Appx_websitestandard_htmlvariables ):

The price or amount of the product, service, or contribution, not including shipping, handling, or tax. If this variable is omitted from Buy Now or Donate buttons, buyers enter their own amount at the time of payment. 

I've found, that processing (handling in paypal page) fee should be specified in optional "handling" parameter. Then we just forgot to add that I guess.


To post to this group, send email to in-port...@googlegroups.com.
To unsubscribe from this group, send email to in-portal-bug...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/in-portal-bugs?hl=en.

Phil

unread,
Jun 8, 2012, 2:41:13 PM6/8/12
to in-port...@googlegroups.com
ok, then this parameter is missing.

By the way, I really don't like the way paypal acts with their clients, by prompting them to disclose their price breakdown :-( just a personal note.


Envoyé avec Sparrow (http://www.sparrowmailapp.com/?sig)


Le vendredi 8 juin 2012 à 20:33, Alexander Obuhovich a écrit :

> From paypal docs ( https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_html_Appx_websitestandard_htmlvariables ):
>
> The price or amount of the product, service, or contribution, not including shipping, handling, or tax. If this variable is omitted from Buy Now or Donate buttons, buyers enter their own amount at the time of payment.
>
> I've found, that processing (handling in paypal page) fee should be specified in optional "handling" parameter. Then we just forgot to add that I guess.
>
>
> On Fri, Jun 8, 2012 at 8:28 PM, Phil <ph...@wbtc.fr (mailto:ph...@wbtc.fr)> wrote:
> > Well, you are partially right: other paypal fields are intended to send shipping cost and VAT to paypal, but there's no such field for processing fees, so they'd need to be added to SubTotal, or we could simply get rid of all paypal details (which are not mandatory), and just send TotalAmount, like we do for all other gateways.
> >
> > As you could have guessed from php class filename, it's for "paypal", not "paypal pro".
> >
> >
> > Le vendredi 8 juin 2012 à 20:22, Alexander Obuhovich a écrit :
> >
> > > Have you checked paypal api, maybe he really expects only subtotal in that fields and all processing fees should go into other field?
> > >
> > > Also is this happening to simple paypal or to paypal pro?
> > >
> > >
> > > On Thu, Jun 7, 2012 at 11:49 PM, Phil <ph...@wbtc.fr (mailto:ph...@wbtc.fr) (mailto:ph...@wbtc.fr)> wrote:
> > > > Hi,
> > > >
> > > > while I was doing some tests, I've found that paypal.php gateway class have a bug: amount sent to gateway is SubTotal, instead of being TotalAmount:
> > > >
> > > > #51: $ret['amount'] = $this->ConvertCurrency($item_data['SubTotal'], $target);
> > > >
> > > > I've manually checked that this is not the case for all other built-in gateway classes.
> > > >
> > > > And I'm still very happy to see I can't access Mantis in-commerce related tasks... Surely because I can't bring anything good there ;-)
> > > >
> > > > p
> > > >
> > > > --
> > > > You received this message because you are subscribed to the Google Groups "In-Portal Bugs Team" group.
> > > > To post to this group, send email to in-port...@googlegroups.com (mailto:in-port...@googlegroups.com) (mailto:in-port...@googlegroups.com).
> > > > To unsubscribe from this group, send email to in-portal-bug...@googlegroups.com (mailto:in-portal-bugs%2Bunsu...@googlegroups.com) (mailto:in-portal-bugs%2Bunsu...@googlegroups.com (mailto:in-portal-bugs%252Buns...@googlegroups.com)).
> > > > For more options, visit this group at http://groups.google.com/group/in-portal-bugs?hl=en.
> > >
> > >
> > >
> > >
> > >
> > > --
> > > Best Regards,
> > >
> > > http://www.in-portal.com
> > > http://www.alex-time.com
> > > --
> > > You received this message because you are subscribed to the Google Groups "In-Portal Bugs Team" group.
> > > To post to this group, send email to in-port...@googlegroups.com (mailto:in-port...@googlegroups.com) (mailto:in-port...@googlegroups.com).
> > > To unsubscribe from this group, send email to in-portal-bug...@googlegroups.com (mailto:in-portal-bugs%2Bunsu...@googlegroups.com) (mailto:in-portal-bug...@googlegroups.com (mailto:in-portal-bugs%2Bunsu...@googlegroups.com)).

Dmitry A.

unread,
Jun 9, 2012, 2:10:20 AM6/9/12
to in-port...@googlegroups.com
We also missing Email address in PayPal Pro - quite useful.

DA

Phil

unread,
Jun 9, 2012, 3:53:51 AM6/9/12
to in-port...@googlegroups.com
yes it is :)



Envoyé avec Sparrow (http://www.sparrowmailapp.com/?sig)


Le samedi 9 juin 2012 à 08:10, Dmitry A. a écrit :

> We also missing Email address in PayPal Pro - quite useful.
>
> DA
>
> --
> You received this message because you are subscribed to the Google Groups "In-Portal Bugs Team" group.
> To view this discussion on the web visit https://groups.google.com/d/msg/in-portal-bugs/-/m5wE_C7TOkEJ.
Reply all
Reply to author
Forward
0 new messages