Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Execute a transaction manually is painful #535

Open
vtemian opened this issue May 30, 2017 · 0 comments
Open

Execute a transaction manually is painful #535

vtemian opened this issue May 30, 2017 · 0 comments

Comments

@vtemian
Copy link
Contributor

vtemian commented May 30, 2017

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants