From 87b2c1f43ced75ea135ba602815627adde80bca0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Avil=C3=A9s?= Date: Wed, 21 Jan 2015 16:53:18 +0100 Subject: [PATCH] Payment/Paypal: Adapt to transaction simpler API --- payment_paypal/indico_payment_paypal/controllers.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/payment_paypal/indico_payment_paypal/controllers.py b/payment_paypal/indico_payment_paypal/controllers.py index 1dfe4d8..90a3390 100644 --- a/payment_paypal/indico_payment_paypal/controllers.py +++ b/payment_paypal/indico_payment_paypal/controllers.py @@ -78,8 +78,7 @@ class RHPaypalIPN(RH): "Data received: {}".format(payment_status, request.form)) return self._verify_amount() - register_transaction(event_id=request.view_args['confId'], - registrant_id=request.args['registrantId'], + register_transaction(registrant=self.registrant, amount=float(request.form['mc_gross']), currency=request.form['mc_currency'], action=paypal_transaction_action_mapping[payment_status], @@ -100,7 +99,7 @@ class RHPaypalIPN(RH): if expected == amount: return True current_plugin.logger.warning("Paid amount doesn't match event's fee: {} != {}".format(amount, expected)) - notify_amount_inconsistency(self.event, self.registrant, amount) + notify_amount_inconsistency(self.registrant, amount) return False def _is_transaction_duplicated(self):