Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vat amount not send to sage pay request #138

Closed
arnavdots opened this issue Aug 6, 2019 · 2 comments
Closed

vat amount not send to sage pay request #138

arnavdots opened this issue Aug 6, 2019 · 2 comments

Comments

@arnavdots
Copy link

arnavdots commented Aug 6, 2019

sagepay - omnipay plugin for laravel and facing an issue regarding sending order data into sagepay basket. All data is going well except the VAT amount/ tax code.

We’re adding data into the basket using ItemBag Class and setting below fields:-

setProductCode => E8 (sage 50 isn’t reading this field as well, unfortunately we need to put it in the name field like this name => "[E8] storage pod")

name => XXXX

description => XXXX (sage 50 isn’t reading this field as well, we also need to send description in the name field)

quantity => 1

price => 1343

vat => 45 (this isn’t showing in Sagepay and it shows like 00, screenshot attached)

all fields going out into basket except VAT field.

@judgej
Copy link
Member

judgej commented Aug 6, 2019

Couple of things to check.

Firstly, are you using the extended Item class https://github.com/thephpleague/omnipay-sagepay/blob/master/src/Extend/Item.php ? This supports VAT (though check the documentation on the format you need to supply). It also supports the product code as a separate field, instead of adding it to the description.

However, there are two basket formats: CSV and XML. Sage's products are not as joined up as people would like to hope, so it is possible one basket format works for integration with some accounting products and not others. By default the XML basket is used, but you can go back to the older CSV format by setting the useOldBasketFormat option.

In summary:

  • Both the older CSV and the newer XML baskets support VAT, but only the extended Item for this driver supports VAT (Omnipay core does not support VAT for basket items).
  • The XML format basket has a separate field for product codes, while the CSV format basket does not, which is why you need to add it to the description in [square brackets]. I expect the [workaround] does not work in the XML basket.
  • If you use the extended Item, put the product code into the dedicated product code field. If using the CSV basket format, this driver will automatically add it to the description for you.
  • Which basket works with Sage 50 - I have not idea. It may be one and not the other, it may be both.

Does this make sense? Does it fix your problem? Have totally missed the point?

@judgej judgej added the awaiting response Awaiting response label Aug 14, 2019
@judgej
Copy link
Member

judgej commented Jan 14, 2020

No response - closing.

@judgej judgej closed this as completed Jan 14, 2020
@judgej judgej removed the awaiting response Awaiting response label Jan 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants