From 935c5d9367b233d65e373591220485d7f60580f6 Mon Sep 17 00:00:00 2001 From: Benjamin Dauvergne Date: Wed, 15 May 2013 15:19:46 +0200 Subject: [PATCH] dummy: only keep useful variable in the generated URL not all the locals --- eopayment/dummy.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/eopayment/dummy.py b/eopayment/dummy.py index 8367d25..6b8a829 100644 --- a/eopayment/dummy.py +++ b/eopayment/dummy.py @@ -88,7 +88,11 @@ class Payment(PaymentCommon): 'direct_notification_url': self.direct_notification_url, 'origin': self.origin } - query.update(locals()) + query.update(dict(name=name, address=address, email=email, phone=phone, + info1=info1, info2=info2, info3=info3)) + for key in query.keys(): + if query[key] is None: + del query[key] url = '%s?%s' % (SERVICE_URL, urllib.urlencode(query)) return transaction_id, URL, url