At the moment we use autogenerated API library (https://github.com/tuutti/php-paytrail-payment-api) because Paytrail's own SDK library had multiple issues (if I remember correctly) when I was developing the 3.x version.
Dealing with the broken/limited OpenAPI spec is major PITA.
Replace the current implementation with official SDK library. This is a major BC break so this requires 4.x release.
Fixed
4.0
Code