academe / OmniPay-Payone

A PAYONE gateway driver for the OmniPay framework
MIT License
15 stars 16 forks source link

Question regarding VAT field in item objects #28

Closed aimeos closed 6 years ago

aimeos commented 6 years ago

What is the "vat" property for? Tax rate or tax value?

$lines[] = new \Omnipay\Payone\Extend\Item([
    'id' => '{merchant-site-stock-ID}',
    'vat' => 20, // Optional
]);
judgej commented 6 years ago

Good question. I believe it is both :-) (Actually, no, basis points are not a tax value - it's the percentage. but expressed in two different possible ways)

I added a note here:

https://github.com/academe/OmniPay-Payone/blob/master/src/Extend/ItemInterface.php#L26

(values <100 and >100 have different meanings) value < 100 = percent; value > 99 = basis points

From the docs:

VAT rate (% or bp) value < 100 = percent value > 99 = basis points (e.g. 1900 = 19%)

Final answer: it is the VAT rate expressed as NN% or NNNN‱ basis points

judgej commented 6 years ago

I've added a note to the README. Please reopen if the note is not clear.