eurofurence / reg-payment-service

EF Registration backend micro-service for dues and payments booking and accounting
MIT License
0 stars 1 forks source link

for new transactions, effective date should default to today #43

Closed Jumpy-Squirrel closed 1 year ago

Jumpy-Squirrel commented 1 year ago

This came out of our end to end test with our new payment provider, compare https://github.com/eurofurence/reg-payment-service/commit/3b7d63dc064897cf96ed1ff15e118ea0be4373e1 for our scratch changes during the test.

When we create a new transaction, if the effective date is not supplied, we should assume a sensible default: that the effective date will be today. In the final payment, it may be changed to the actual valuta (which we can only know after the money has been transferred), but this is a "best guess".

This becomes especially important when the initiate-payment endpoint is used, without setting an effective date, the transaction could not be stored to the database.

Noroth commented 1 year ago

As this is a "best guess" do you think we are safe to put the current date as default or do we need more investigation here?

Jumpy-Squirrel commented 1 year ago

By best guess I meant: It's the best information we have at the time of payment creation, and will be correct 95% of the time.

The sending bank decides the effective date, and you can only know after the money has been received and is shown on your bank statement (Kontoauszug/online banking). Especially for money transfers from a foreign country, this date often fluctuates around the actual transfer date by a few days, and the payment may take a few more days to show up in your account. Only then will you know what it is.

While the payment is still tentative or pending, we may have the wrong date, but it will be fixed when changing to valid.