def __init__(self): super(AuthorizeNetDpmIntegration, self).__init__() merchant_settings = getattr(settings, "MERCHANT_SETTINGS") if not merchant_settings or not merchant_settings.get("authorize_net"): raise IntegrationNotConfigured("The '%s' integration is not correctly " "configured." % self.display_name) self.authorize_net_settings = merchant_settings["authorize_net"]
def __init__(self): super(StripeIntegration, self).__init__() merchant_settings = getattr(settings, "MERCHANT_SETTINGS") if not merchant_settings or not merchant_settings.get("stripe"): raise IntegrationNotConfigured("The '%s' integration is not correctly " "configured." % self.display_name) stripe_settings = merchant_settings["stripe"] self.gateway = get_gateway("stripe") self.publishable_key = stripe_settings['PUBLISHABLE_KEY']
def __init__(self): super(SamuraiIntegration, self).__init__() merchant_settings = getattr(settings, "MERCHANT_SETTINGS") if not merchant_settings or not merchant_settings.get("samurai"): raise IntegrationNotConfigured( "The '%s' integration is not correctly " "configured." % self.display_name) samurai_settings = merchant_settings["samurai"] self.merchant_key = samurai_settings['MERCHANT_KEY'] self.gateway = get_gateway("samurai")
def __init__(self, options=None): if not options: options = {} super(OgonePaymentsIntegration, self).__init__(options=options) merchant_settings = getattr(settings, "MERCHANT_SETTINGS") if not merchant_settings or not merchant_settings.get("ogone_payments"): raise IntegrationNotConfigured("The '%s' integration is not correctly " "configured." % self.display_name) bunch = Bunch() bunch.update(merchant_settings["ogone_payments"]) self.settings = bunch
def __init__(self, options=None): if not options: options = {} super(GoogleCheckoutIntegration, self).__init__(options=options) merchant_settings = getattr(settings, "MERCHANT_SETTINGS") if not merchant_settings or not merchant_settings.get( "google_checkout"): raise IntegrationNotConfigured( "The '%s' integration is not correctly " "configured." % self.display_name) google_checkout_settings = merchant_settings["google_checkout"] self.merchant_id = google_checkout_settings['MERCHANT_ID'] self.merchant_key = google_checkout_settings['MERCHANT_KEY'] self._signature = None
def __init__(self): merchant_settings = getattr(settings, "MERCHANT_SETTINGS") if not merchant_settings or not merchant_settings.get("pay_pal"): raise IntegrationNotConfigured("The '%s' integration is not correctly " "configured." % self.display_name) pay_pal_settings = merchant_settings["pay_pal"] # Required Fields. Just a template for the user self.fields = {"business": pay_pal_settings['RECEIVER_EMAIL'], "item_name": "", "invoice": "", "notify_url": "", "return_url": "", "cancel_return": "", "amount": 0, }
def __init__(self, access_code=None): super(EwayAuIntegration, self).__init__() merchant_settings = getattr(settings, "MERCHANT_SETTINGS") if not merchant_settings or not merchant_settings.get("eway"): raise IntegrationNotConfigured("The '%s' integration is not correctly " "configured." % self.display_name) eway_settings = merchant_settings["eway"] self.customer_id = eway_settings["CUSTOMER_ID"] self.username = eway_settings["USERNAME"] self.password = eway_settings["PASSWORD"] # Don't use X-Forwarded-For. It doesn't really matter if REMOTE_ADDR # isn't their *real* IP, we're only interested in what IP they're going # to use for their POST request to eWAY. If they're using a proxy to # connect to us, it's fair to assume they'll use the same proxy to # connect to eWAY. self.access_code = access_code
def __init__(self, options=None): if not options: options = {} super(BraintreePaymentsIntegration, self).__init__(options=options) merchant_settings = getattr(settings, "MERCHANT_SETTINGS") if not merchant_settings or not merchant_settings.get("braintree_payments"): raise IntegrationNotConfigured("The '%s' integration is not correctly " "configured." % self.display_name) braintree_payments_settings = merchant_settings["braintree_payments"] test_mode = getattr(settings, "MERCHANT_TEST_MODE", True) if test_mode: env = braintree.Environment.Sandbox else: env = braintree.Environment.Production braintree.Configuration.configure( env, braintree_payments_settings['MERCHANT_ACCOUNT_ID'], braintree_payments_settings['PUBLIC_KEY'], braintree_payments_settings['PRIVATE_KEY'] )