Docstrings (module, models, plugins)
- exception indico.modules.events.payment.models.transactions.DoublePaymentTransaction¶
- exception indico.modules.events.payment.models.transactions.IgnoredTransactionAction¶
- exception indico.modules.events.payment.models.transactions.InvalidManualTransactionAction¶
- exception indico.modules.events.payment.models.transactions.InvalidTransactionAction¶
- exception indico.modules.events.payment.models.transactions.InvalidTransactionStatus¶
- class indico.modules.events.payment.models.transactions.PaymentTransaction(**kwargs)¶
A simple constructor that allows initialization from kwargs.
Sets attributes on the constructed instance using the names and values in
Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.
the base amount the user needs to pay (without payment-specific fees)
- classmethod create_next(registration, amount, currency, action, provider=None, data=None)¶
the currency of the payment (ISO string, e.g. EUR or USD)
plugin-specific data of the payment
- property is_manual¶
- property plugin¶
the provider of the payment (e.g. manual, PayPal etc.)
- query: IndicoBaseQuery¶
The associated registration
ID of the associated registration
Render the transaction details.
the date and time the transaction was recorded
- class indico.modules.events.payment.models.transactions.TransactionAction(value)¶
- cancel = 2¶
- complete = 1¶
- pending = 3¶
- reject = 4¶
- class indico.modules.events.payment.models.transactions.TransactionStatus(value)¶
- cancelled = 2¶
payment cancelled manually
- failed = 3¶
payment attempt failed
- pending = 4¶
payment on hold pending approval of merchant
- rejected = 5¶
payment rejected after being pending
- successful = 1¶
payment attempt succeeded
Return a dict containing the active payment plugins of an event.
Return a dict containing the available payment plugins.
- indico.modules.events.payment.util.register_transaction(registration, amount, currency, action, provider=None, data=None)¶
Create a new transaction for a certain transaction action.
registration – the Registration associated to the transaction
amount – the (strictly positive) amount of the transaction
currency – the currency used for the transaction
action – the TransactionAction of the transaction
provider – the payment method name of the transaction, or ‘_manual’ if no payment method has been used
data – arbitrary JSON-serializable data specific to the transaction’s provider
- class indico.modules.events.payment.plugins.PaymentPluginMixin¶
Update the payment form data if necessary.
This method can be overridden to update e.g. the amount based on choices the user makes in the payment form or to provide additional data to the form. To do so, data must be modified.
data – a dict containing event, registration, amount, currency, settings and event_settings
- can_be_modified(user, event)¶
Check if the user is allowed to enable/disable/modify the payment method.
user – the
Userrepesenting the user
event – the
- category = 'Payment'¶
- property default_settings¶
- get_event_management_url(event, **kwargs)¶
Return registration forms with incompatible currencies.
Return the (customized) name of the payment method.
Check if the transaction is pending but expired.
If this returns true, it will show up as unpaid instead of pending for the user and they can proceed to payment once again.
- property logo_url¶
Return the payment form shown to the user.
registration – a
Render the transaction details in event management.
Override this (or inherit from the template) to show more useful data such as transaction IDs
transaction – the
- valid_currencies = None¶
Set containing all valid currencies. Set to None to allow all.