Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

3.1.2 API Changes Amount Behavior

 
Reply
   X-Cart forums > X-Payments > X-Payments issues & questions
 
Thread Tools
  #1  
Old 05-29-2018, 12:38 PM
 
joestern joestern is offline
 

Senior Member
  
Join Date: Apr 2004
Posts: 187
 

Default 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.
__________________
X-Cart version 4.7.12
Reply With Quote

The following user thanks joestern for this useful post:
kevinrm (05-29-2018)
  #2  
Old 05-29-2018, 11:02 PM
  random's Avatar 
random random is offline
Advanced Staff Users
 

X-Cart team
  
Join Date: Dec 2008
Posts: 79
 

Default 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.
__________________
Sincerely yours,
Vladimir Petrov
Senior X-Payments Developer
Reply With Quote
Reply
   X-Cart forums > X-Payments > X-Payments issues & questions



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 07:50 PM.

   

 
X-Cart forums © 2001-2020