switched to MIT license
This commit is contained in:
parent
33c14a9ef4
commit
3bd287e577
27
LICENSE
27
LICENSE
@ -1,14 +1,19 @@
|
||||
Copyright 2017 Joe Black
|
||||
|
||||
Copyright 2017 Jose Black
|
||||
Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of this software and associated documentation files (the "Software"),
|
||||
to deal in the Software without restriction, including without limitation
|
||||
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
and/or sell copies of the Software, and to permit persons to whom the
|
||||
Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
DEALINGS IN THE SOFTWARE.
|
||||
|
||||
@ -1,12 +1,13 @@
|
||||
Metadata-Version: 1.1
|
||||
Name: btcpay
|
||||
Version: 1.0.0
|
||||
Version: 1.0.1
|
||||
Summary: Accept bitcoin with BTCPay
|
||||
Home-page: https://github.com/joeblackwaslike/btcpay-python
|
||||
Author: Joe Black
|
||||
Author-email: me@joeblack.nyc
|
||||
License: Apache 2.0
|
||||
Download-URL: https://github.com/joeblackwaslike/btcpay-python/tarball/v1.0.0
|
||||
Download-URL: https://github.com/joeblackwaslike/btcpay-python/tarball/v1.0.1
|
||||
Description-Content-Type: UNKNOWN
|
||||
Description: UNKNOWN
|
||||
Keywords: bitcoin,payments,crypto
|
||||
Platform: UNKNOWN
|
||||
|
||||
@ -1,2 +1,2 @@
|
||||
ecdsa
|
||||
requests
|
||||
ecdsa
|
||||
|
||||
@ -55,9 +55,9 @@ class BTCPayClient:
|
||||
uri = self.host + path
|
||||
if payload:
|
||||
payload = json.dumps(payload)
|
||||
r = self.s.post(uri, headers=headers, data=payload)
|
||||
r = self.s.post(uri, data=payload)
|
||||
else:
|
||||
r = self.s.get(uri, headers=headers)
|
||||
r = self.s.get(uri)
|
||||
r.raise_for_status()
|
||||
return r.json()['data']
|
||||
|
||||
@ -85,10 +85,19 @@ class BTCPayClient:
|
||||
if re.match(r'^\w{7,7}$', code) is None:
|
||||
raise ValueError("pairing code is not legal")
|
||||
payload = {'id': self.client_id, 'pairingCode': code}
|
||||
return self._unsigned_request('/tokens', payload)
|
||||
data = self._unsigned_request('/tokens', payload)
|
||||
data = data[0]
|
||||
return {
|
||||
data['facade']: data['token']
|
||||
}
|
||||
|
||||
def __repr__(self):
|
||||
return '{}({})'.format(
|
||||
type(self).__name__,
|
||||
self.host
|
||||
)
|
||||
|
||||
# from btcpay import BTCPayClient
|
||||
client = BTCPayClient(host=shop.gateway.client.uri, insecure=True, pem=shop.gateway.client.pem, tokens=shop.gateway.client.tokens)
|
||||
|
||||
client = BTCPayClient(host=shop.gateway.client.uri, insecure=True, pem=shop.gateway.client.pem, tokens={'merchant': 'ET9rzVZUJLg9xnWo7pcjw32fPnqLj7KocfP3XyDptrCo'})
|
||||
|
||||
BIN
dist/btcpay-1.0.1-py3-none-any.whl
vendored
Normal file
BIN
dist/btcpay-1.0.1-py3-none-any.whl
vendored
Normal file
Binary file not shown.
BIN
dist/btcpay-1.0.1.tar.gz
vendored
Normal file
BIN
dist/btcpay-1.0.1.tar.gz
vendored
Normal file
Binary file not shown.
8
setup.py
8
setup.py
@ -4,13 +4,13 @@ from setuptools import setup, find_packages
|
||||
setup(
|
||||
name="btcpay",
|
||||
packages=find_packages(),
|
||||
version="1.0.1",
|
||||
version="1.0.2",
|
||||
description="Accept bitcoin with BTCPay",
|
||||
author="Joe Black",
|
||||
author_email="me@joeblack.nyc",
|
||||
url="https://github.com/joeblackwaslike/btcpay-python",
|
||||
download_url="https://github.com/joeblackwaslike/btcpay-python/tarball/v1.0.1",
|
||||
license='Apache 2.0',
|
||||
download_url="https://github.com/joeblackwaslike/btcpay-python/tarball/v1.0.2",
|
||||
license='MIT',
|
||||
keywords=["bitcoin", "payments", "crypto"],
|
||||
install_requires=[
|
||||
"requests",
|
||||
@ -24,7 +24,7 @@ setup(
|
||||
"Development Status :: 5 - Production/Stable",
|
||||
"Environment :: Web Environment",
|
||||
"Intended Audience :: Developers",
|
||||
"License :: OSI Approved :: Apache Software License",
|
||||
"License :: OSI Approved :: MIT License",
|
||||
"Operating System :: OS Independent",
|
||||
"Topic :: Software Development :: Libraries :: Python Modules",
|
||||
"Topic :: Office/Business :: Financial"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user