contributte / gopay-inline

:credit_card: GoPay Inline Payment for Nette Framework
https://contributte.org/packages/contributte/gopay-inline.html
BSD 3-Clause "New" or "Revised" License
33 stars 32 forks source link

Implementation EET #19

Closed jakubsedlarik closed 7 years ago

jakubsedlarik commented 7 years ago

For stores having different tax rates (option B in GoPay doc.) https://help.gopay.com/cs/tema/propojeni-do-eet/jak-bude-fungovat-napojeni-gopay-do-eet#varianty

It is necessary to implement object EET (added to REST API): https://doc.gopay.com/cs/#eet

VAT rate list: https://doc.gopay.com/en/#vat_rate

Are you planning to implement EET?

f3l1x commented 7 years ago

@jakubsedlarik Hi, thank you for the ticket.

I don't need EET at this moment, but I think this library would support it. What changes do you think will be necessary?

tchamra commented 7 years ago

Hi, EET support would be very nice for me as well :)

I have investigated the API changes a bit and I have found 3 major changes:

  1. Item list now contains tax rates (in percents)
  2. There is now brand new EET object containing VAT info, including amounts for three VAT levels (corresponding to 21%, 15% and 10% rates)
  3. In verification response there is new EET_CODE object containing FIK, BKP and PKP codes

If the EET object is not present but EET is activated for the account, the whole amount is automatically reported with 21% VAT.

Transactions normally contain all three (FIK, BKP, PKP) codes but when EET system fails, FIK can be omitted (this is not in API but I believe this is how EET works).

jakubsedlarik commented 7 years ago

@tchamra Thanks, this is exactly what is needed modify.

jakubsedlarik commented 7 years ago

Hi, I am just making theese enhancement. Tomorrow I'll prepare PR.

haltuf commented 7 years ago

Great! Looking forward to it.