Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Use attribute gateway instead of *_gateway to make the usage uniform.

  • Loading branch information...
commit 6e56ff34fa9d2e0320a06e66c79ae2205e30a271 1 parent 6d5887b
@theju theju authored
View
2  billing/integrations/samurai_integration.py
@@ -9,7 +9,7 @@ class SamuraiIntegration(Integration):
def __init__(self):
super(SamuraiIntegration, self).__init__()
self.merchant_key = settings.SAMURAI_MERCHANT_KEY
- self.samurai_gateway = get_gateway("samurai")
+ self.gateway = get_gateway("samurai")
def generate_form(self):
initial_data = self.fields
View
2  billing/integrations/stripe_integration.py
@@ -7,7 +7,7 @@
class StripeIntegration(Integration):
def __init__(self):
super(StripeIntegration, self).__init__()
- self.stripe_gateway = get_gateway("stripe")
+ self.gateway = get_gateway("stripe")
self.publishable_key = settings.STRIPE_PUBLISHABLE_KEY
def generate_form(self):
View
2  example/app/integrations/samurai_example_integration.py
@@ -11,5 +11,5 @@
class SamuraiExampleIntegration(SamuraiIntegration):
@csrf_exempt
def transaction(self, request):
- resp = self.samurai_gateway.purchase(1, request.POST["payment_method_token"])
+ resp = self.gateway.purchase(1, request.POST["payment_method_token"])
return HttpResponse(resp["response"].to_json())
View
2  example/app/integrations/stripe_example_integration.py
@@ -4,6 +4,6 @@
class StripeExampleIntegration(StripeIntegration):
def transaction(self, request):
- resp = self.stripe_gateway.purchase(100, request.POST["stripeToken"])
+ resp = self.gateway.purchase(100, request.POST["stripeToken"])
return HttpResponseRedirect("%s?status=%s" %(reverse("app_offsite_stripe"),
resp["status"]))
Please sign in to comment.
Something went wrong with that request. Please try again.