Problem/Motivation

Drupal Commerce 2 supports decimals in VAT%.
Paytrail added support for that in June 20 https://www.google.com/amp/s/www.paytrail.com/kumppaniportaali/uutiset/a...

Proposed resolution

Test if new VAT works out of the box. If not create a follow-up issue to implement support.

Remaining tasks

  1. Test payments with 25.5% VAT
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

simohell created an issue. See original summary.

tvalimaa’s picture

Paytrail works fine in testing mode with VAT% set to 25.5 on commerce settings

jgullstr’s picture

Status: Active » Needs work

Currently, the payments pass, but get registered remotely with a truncated VAT rate. "setVatPercentage"-calls in the module cast VAT percentages to integer values, which removes the fractional part of the VAT rate, eg 25.5 turns into 25.

The API library probably needs to be regenerated before decimal values can be used, I have created an issue for that here.

tuutti made their first commit to this issue’s fork.

  • tuutti authored dd84e89f on 3.x
    Issue #3461921: Test support for 25.5% VAT
    
    
tuutti’s picture

Thanks! This should be fixed in 3.1.0 release.

The updated OpenAPI spec introduced some BC breaks and I had to bump the API library version. You might have to run composer update with -W flag (composer update drupal/commerce_paytrail -W) to get the updated API library.

tuutti’s picture

Status: Needs work » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.