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

Fix for Express facade refund/capture/void methods #81

Merged
merged 1 commit into from
Sep 2, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions paypal/express/facade.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def refund_transaction(token, amount, currency, note=None):
txn = Transaction.objects.get(token=token,
method=DO_EXPRESS_CHECKOUT)
is_partial = amount < txn.amount
return refund_txn(txn.value('TRANSACTIONID'), is_partial, amount, currency)
return refund_txn(txn.value('PAYMENTINFO_0_TRANSACTIONID'), is_partial, amount, currency)


def capture_authorization(token, note=None):
Expand All @@ -110,7 +110,7 @@ def capture_authorization(token, note=None):
"""
txn = Transaction.objects.get(token=token,
method=DO_EXPRESS_CHECKOUT)
return do_capture(txn.value('TRANSACTIONID'),
return do_capture(txn.value('PAYMENTINFO_0_TRANSACTIONID'),
txn.amount, txn.currency, note=note)


Expand All @@ -120,4 +120,4 @@ def void_authorization(token, note=None):
"""
txn = Transaction.objects.get(token=token,
method=DO_EXPRESS_CHECKOUT)
return do_void(txn.value('TRANSACTIONID'), note=note)
return do_void(txn.value('PAYMENTINFO_0_TRANSACTIONID'), note=note)