When somebody pays and something is odd about the payment (the subscriber name is unknown, the amounts don't match up, etc.) the payment transaction is marked as under review (txn.stage = money_models.Transaction.Stage.REVIEW). (I think at the moment the receipt email is also not sent.) We need a proper review flow for handling such payments:
- We might want to stick with not sending the payer a receipt, but we definitely need to send appropriate officers an email telling them to look. (I think we should use a different address than tech-squares-payments@ -- the list gets emails on every payment, and there's probably more people who are happy to help deal with weird payments than who want to know about every payment.)
- We need to allow updating the person on the payment attempt
- We need a button to say "this payment is now okay, go process it again"
- It should probably send the receipt email
- It should create
SubscriptionPayment objects from SubscriptionLineItem objects -- probably this should involve calling desc.save_txn(txn) again (possibly with some flag)
- We're going to need to avoid creating duplication
SubscriptionPayments if some were created when processing the original transaction. It looks like there is currently no explicit link between the two models, and there probably should be.
My guess is that most of these steps should just use the usual admin edit functionality, with an admin action for re-processing transactions. There are a couple existing admin actions -- look for the @admin.action decorator.
When somebody pays and something is odd about the payment (the subscriber name is unknown, the amounts don't match up, etc.) the payment transaction is marked as under review (
txn.stage = money_models.Transaction.Stage.REVIEW). (I think at the moment the receipt email is also not sent.) We need a proper review flow for handling such payments:SubscriptionPaymentobjects fromSubscriptionLineItemobjects -- probably this should involve callingdesc.save_txn(txn)again (possibly with some flag)SubscriptionPayments if some were created when processing the original transaction. It looks like there is currently no explicit link between the two models, and there probably should be.My guess is that most of these steps should just use the usual admin edit functionality, with an admin action for re-processing transactions. There are a couple existing admin actions -- look for the
@admin.actiondecorator.