Skip to content

Commit

Permalink
slightly modified credit method
Browse files Browse the repository at this point in the history
  • Loading branch information
hayyat committed Dec 26, 2011
1 parent a10872a commit be0d3dd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions billing/gateways/stripe_gateway.py
Expand Up @@ -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,
Expand All @@ -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):
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit be0d3dd

Please sign in to comment.