X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   X-Payments issues & questions (https://forum.x-cart.com/forumdisplay.php?f=50)
-   -   3.1.2 API Changes Amount Behavior (https://forum.x-cart.com/showthread.php?t=76285)

joestern 05-29-2018 12:38 PM

3.1.2 API Changes Amount Behavior
 
In 3.1.2, XPayments API now expects the "amount" field to be the total, where in earlier versions, it was the total minus tax, assuming a tax amount was transmitted separately.

I'm using the same modified sample code (I haven't updated it in months) and this behavior changed when we upgraded our server to 3.1.2.

random 05-29-2018 11:02 PM

Re: 3.1.2 API Changes Amount Behavior
 
Quote:

Originally Posted by joestern
In 3.1.2, XPayments API now expects the "amount" field to be the total, where in earlier versions, it was the total minus tax, assuming a tax amount was transmitted separately.

I'm using the same modified sample code (I haven't updated it in months) and this behavior changed when we upgraded our server to 3.1.2.


The "amount" field was always used to be a "Grand total" that includes taxes and etc, and it was only related to recurring charge requests. For initial payment requests "totalCost" field is used, and it was for "Grand total" as well.

The only thing that is changed is that previously if both "amount" and cart's "totalCost" is specified in recurring charge request, then the "totalCost" is used, but now in 3.1.2 the "amount" value will override it.


All times are GMT -8. The time now is 03:39 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.