I’d appreciate some help for implementing the Tryon Taler integration. I tried to learn from account_payment_braintree and …_strip, with limit success.
For the Taler Merchant Backend integration I need to map the payment states from those in Taler and those in Tryton. In addition Taler support refunding partially and several refunds (up to the total payment, of course). Also the payment system can charge fees from the merchant, reducing the amount transferred to the bank account.
Taler works a bit different than credit card payments or direct debit: With Taler, for paying the customer transfers “coins” to the merchant backend. The payment has status “paid” then. Refunds can be granted until the “refund deadline”. After the “refund deadline” (and some other delay), the coins are transferred (“wired”) to the bank account.
(You can learn more about this in the Taler Merchant API docuentation.)
Due to this complex scheme (and some other technical reasons), a payment in Taler has several states:
- paid
- refunded
- wired
Now I wonder:
- In Tryton, shall the payment “succeed” if the it is “paid” in Taler? Or only after it ha been “wired”?
- How are refunds handled in regard to the payment status?
- Anythng to keep in mind in regard to multiple refunds on the same payment?
- Does the
account_payment_talermodule need to take care about financial accounting for refunds? Or is this done by some other part if Tryton? - Does
account_payment_talerneed to take care about financial accounting for fees?
PS: Taler also provides an API to track wire transfers and match these to payments and fees. Currently there are no plans to implement this.