From be0d3dd20fad57acd7eeb92934d3cfd1757dbe4e Mon Sep 17 00:00:00 2001 From: "plaban@agiliq.com" Date: Mon, 26 Dec 2011 15:12:00 +0530 Subject: [PATCH] slightly modified credit method --- billing/gateways/stripe_gateway.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/billing/gateways/stripe_gateway.py b/billing/gateways/stripe_gateway.py index 31b3cfa6..8a64fea4 100644 --- a/billing/gateways/stripe_gateway.py +++ b/billing/gateways/stripe_gateway.py @@ -22,7 +22,7 @@ def purchase(self, amount, credit_card): try: response = self.stripe.Charge.create( amount=amount * 100, - currency="usd", + currency=self.default_currency.lower(), card={ 'number': credit_card.number, 'exp_month': credit_card.month, @@ -45,7 +45,7 @@ def store(self, credit_card, options=None): }, description="Storing for future use" ) - return customer + return {'status': 'SUCCESS', 'response': customer} def recurring(self, credit_card, options=None): if not self.validate_card(credit_card): @@ -81,7 +81,7 @@ def unstore(self, identification, options=None): except self.stripe.InvalidRequestError, error: return {"status": "FAILED", "response": error} - def credit(self, money, identification, options=None): + def credit(self, identification, money=None, options=None): try: charge = self.stripe.Charge.retrieve(identification) response = charge.refund(amount=money)