Update transferwise integration for new APIs
authorMagnus Hagander <magnus@hagander.net>
Tue, 3 Jun 2025 13:17:58 +0000 (15:17 +0200)
committerMagnus Hagander <magnus@hagander.net>
Wed, 11 Jun 2025 13:55:22 +0000 (15:55 +0200)
commit645409a12fd76cd44eda768315f288baa9c9f550
tree36781bc4784c77b0fa8ef86f3e153e33d021ff77
parentbe056612bed3145098aac94db6f7f71c19cb9412
Update transferwise integration for new APIs

Unfortunately, Wise decided one is no longer allowed to access
information about ones own transactions when in Europe, unless
registered as a European payment provider. This is of course stupid, but
what can we do.

Attempt to re-implement the transferwise support over their new
activities API.

Unfortunately there are likely bugs still hiding around, since for
example amounts are now returned in some self-invented html-like markup
like '<positive> 2,000 EUR</positive>' instead of as a number like
before (and sometimes they are returned as <positive> with a negative
number inside). But we have to start somewhere...

Unfortunately, it seems there's a permanent loss of funcionality in that
the account number (IBAN) of the sender is no longer available anywhere
in the API. This means that in practice, automatic refunds of transfers
are no longer possible. (This information appears to also no longer be
available on their website). We keep the refund functionality itself in
the system for now, as we might want to extend it later with the ability
to refund while manually specifying an IBAN number.
postgresqleu/transferwise/api.py
postgresqleu/transferwise/management/commands/transferwise_fetch_transactions.py
postgresqleu/util/payment/transferwise.py