silverapp/silver

Execute a transaction manually is painful

Opened this issue · 0 comments

In order to execute a transaction via a payment processor, one needs to go to the transaction, retrieve its payment processor via its payment method and pass that transaction to the execute method of the payment processor.

Something like

from silver.models import Transaction
t = Transaction.objects.get(pk=X)
pp = t.payment_method.get_payment_processor()
pp.execute_transaction(t)

Maybe an idea would be to let the transaction.execute() to perform payment_processor.execute(self)