indico / indico-plugins

Indico plugins developed by the Indico team
MIT License
28 stars 44 forks source link

Allow customized invoice number #50

Open ThiefMaster opened 7 years ago

ThiefMaster commented 7 years ago

I need an invoice number (also for possible other payment plugins) that is compatible to our books (e.g. the correct cost center)

Currently it's hardcoded:

<input type="hidden" name="invoice" value="{{ registration.event_id }}_{{ registration.id }}">

It would be nice to allow some placeholders to be configured, just like we do in payment_manual. There would be an option in the plugin's settings for the default and another one in the plugin's event settings so it can be customized on the event level.

ThiefMaster commented 7 years ago

Note: Whoever works on this, please check if PayPal has any restrictions on what can be used in the "invoice" argument and if there are any, these restrictions should be applied after replacing the placeholders.

Problemkerze commented 7 years ago

Note: Would be nice if this was a event-wide-variable so that other payment plugins could use this argument, too.

ThiefMaster commented 7 years ago

Since various payment systems may have different restrictions (and maybe not all of them use something like an invoice number at all) I think it makes more sense to keep the setting local to each payment plugin.

Problemkerze commented 7 years ago

I disagree. Nearly every payment system has an intended purpose where you usually state an invoice number. For the books of the event creator, some kind of prefix may be helpful (in our case it's the cost center, in other cases it may be the name of the event itself or something). Should the payment system not give the possibility to include an intended purpose, you just don't use this variable.