Skip to content

Commit

Permalink
switched to MIT license
Browse files Browse the repository at this point in the history
  • Loading branch information
joeblackwaslike committed Mar 7, 2018
1 parent 33c14a9 commit 3bd287e
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 21 deletions.
27 changes: 16 additions & 11 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -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.
5 changes: 3 additions & 2 deletions btcpay.egg-info/PKG-INFO
Original file line number Diff line number Diff line change
@@ -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: [email protected]
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
Expand Down
2 changes: 1 addition & 1 deletion btcpay.egg-info/requires.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
ecdsa
requests
ecdsa
15 changes: 12 additions & 3 deletions build/lib/btcpay/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ def _unsigned_request(self, path, payload=None):
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']

Expand Down Expand Up @@ -85,10 +85,19 @@ def pair_client(self, code):
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'})
Binary file added dist/btcpay-1.0.1-py3-none-any.whl
Binary file not shown.
Binary file added dist/btcpay-1.0.1.tar.gz
Binary file not shown.
8 changes: 4 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
setup(
name="btcpay",
packages=find_packages(),
version="1.0.1",
version="1.0.2",
description="Accept bitcoin with BTCPay",
author="Joe Black",
author_email="[email protected]",
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",
Expand All @@ -24,7 +24,7 @@
"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"
Expand Down

0 comments on commit 3bd287e

Please sign in to comment.