コード例 #1
0
    def _configure(self):
        if getattr(self, "configured", False):
            return
        where_da_cert = (
            Environment.braintree_root() + "/ssl/sandbox_braintreegateway_com.ca.crt"
        )  #  TODO move us into braintree

        Environment.Sandbox = Environment("sandbox.braintreegateway.com", "443", True, where_da_cert)

        braintree.Configuration.configure(
            braintree.Environment.Sandbox, "TODO", "config", "us"  #  TODO the vaunted is_test should key this!!
        )
コード例 #2
0
    def _configure(self):
        if getattr(self, 'configured', False):  return
        where_da_cert = Environment.braintree_root() + "/ssl/sandbox_braintreegateway_com.ca.crt"  #  TODO move us into braintree
        braintree.Configuration.use_unsafe_ssl = True

        Environment.Sandbox = Environment("sandbox.braintreegateway.com", "443", True, where_da_cert)

        # print self.options

        braintree.Configuration.configure(braintree.Environment.Sandbox, 'vixsw', '1632859', '2TyFqF68hEF43z84wsu8Rs5H24RbW52V' )    #  TODO  remove me

        braintree.Configuration.configure(
            braintree.Environment.Sandbox,  #  TODO the vaunted is_test should key this!!
            self.options.get('merchant_id', 'config_error TODO'),
            self.options.get('public_key', 'config_error TODO'),
            self.options.get('private_key', 'config_error TODO')
        )
コード例 #3
0
CART_SESSION_ID = 'cart'

LOGIN_REDIRECT_URL = 'shop:product_list'
LOGOUT_REDIRECT_URL = 'shop:product_list'
LOGIN_URL = 'shop:login'
LOGOUT_URL = 'shop:logout'

EMAIL_HOST = 'smtp.163.com'
EMAIL_HOST_USER = '******'  # 填写你的邮件地址
EMAIL_HOST_PASSWORD = '******'  # 邮箱的smtp授权码
EMAIL_PORT = 25
EMAIL_USE_TLS = True
DEFAULT_FROM_EMAIL = EMAIL_HOST_USER

# Braintree settings
BRAINTREE_MERCHANT_ID = '7v2bydr3s3v67wtp'
BRAINTREE_PUBLIC_KEY = 'dtdb8tbrg8z9th6x'
BRAINTREE_PRIVATE_KEY = 'ac32671a82d394d1d314aa6a3ff54223'

Configuration.configure(
    Environment.parse_environment("sandbox"),
    # Environment.parse_environment("product"),
    BRAINTREE_MERCHANT_ID,
    BRAINTREE_PUBLIC_KEY,
    BRAINTREE_PRIVATE_KEY)

REDIS_HOST = '222.25.2.37'
REDIS_PORT = 6379
REDIS_DB = 1