コード例 #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')
        )