Closed vojtasvoboda closed 8 years ago
Hmmm. Do you need it pass to paymet's items? Gopay does not accept negative values?
Yes, customers should see what they pay for. Yes, Gopay does not accept negative amounts - see documentation -> Objects -> Items -> amount (long > 0).
There is also second problem, if you don't pass rounding as payment item, total sum doesn't match:
I get your point. If some webservice does not support it, you use it bad.
So... how can I solve it? :-) Cents rounding is pretty common thing.
Gopay technical support suggested me add this rounding to final price. So maybe some config switch "Turn off validation" will be great?
I'm not sure if it is allowed on Gopay side. You can pass different items price and payment price?
Yes to Gopay you can send different items price, but in this library is some Validator, see last screenshot above.
Ok. I have added 2nd parameter validators.
PaymentFactory - https://github.com/Markette/GopayInline/blob/9a8be30ba3d160d91f0628a8d62e14d8b58fbb89/src/Api/Entity/PaymentFactory.php#L148-L152
It is backward compatible. Just use create($data, $validators = [])
Please test it on master and I will tag it.
markette/gopay-inline: 1.1.0
should target to master, minimum-stability: dev
"markette/gopay-inline": "~1.1.0@dev"
Thank you, works great!
Great.
It is not issue, but I don't now how to solve when I have negative cents rounding (in czech "Haléřové vyrovnání"). Because it's not possible to send negative value to gateway.
Eshop owner don't want to turn off cents rounding for payment by card.
When I try to add product with price -0,30 Kč:
Guys, any idea?