Skip to content

Commit

Permalink
Merge pull request #12 from michi88/py3-support
Browse files Browse the repository at this point in the history
add minimal support for python 3 and 2
  • Loading branch information
Daan van Marsbergen committed Nov 16, 2015
2 parents 09195e5 + 893b256 commit 4c74da4
Show file tree
Hide file tree
Showing 20 changed files with 61 additions and 41 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
/dist
/*.egg-info
.DS_Store
*.pyc
*.pyc
.python-version
4 changes: 2 additions & 2 deletions Mollie/API/Client.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

import requests

import Resource
from Error import *
from . import Resource
from .Error import *


class Client:
Expand Down
2 changes: 1 addition & 1 deletion Mollie/API/Object/Issuer.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from Base import *
from .Base import *


class Issuer(Base):
Expand Down
2 changes: 1 addition & 1 deletion Mollie/API/Object/List.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from Base import *
from .Base import *


class List(Base):
Expand Down
2 changes: 1 addition & 1 deletion Mollie/API/Object/Method.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from Base import *
from .Base import *


class Method(Base):
Expand Down
2 changes: 1 addition & 1 deletion Mollie/API/Object/Payment.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from Base import *
from .Base import *


class Payment(Base):
Expand Down
10 changes: 5 additions & 5 deletions Mollie/API/Object/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from Base import *
from Payment import *
from Issuer import *
from Method import *
from List import *
from .Base import *
from .Payment import *
from .Issuer import *
from .Method import *
from .List import *
2 changes: 1 addition & 1 deletion Mollie/API/Resource/Issuers.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from Base import *
from .Base import *
from Mollie.API.Object import Issuer


Expand Down
2 changes: 1 addition & 1 deletion Mollie/API/Resource/Methods.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from Base import *
from .Base import *
from Mollie.API.Object import Method


Expand Down
2 changes: 1 addition & 1 deletion Mollie/API/Resource/Payments.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from Base import *
from .Base import *
from Mollie.API.Error import *
from Mollie.API.Object import Payment, Refund

Expand Down
8 changes: 4 additions & 4 deletions Mollie/API/Resource/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from Base import *
from Payments import *
from Issuers import *
from Methods import *
from .Base import *
from .Payments import *
from .Issuers import *
from .Methods import *
8 changes: 4 additions & 4 deletions Mollie/API/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from Object import *
from Resource import *
from Error import *
from Client import *
from .Object import *
from .Resource import *
from .Error import *
from .Client import *
2 changes: 1 addition & 1 deletion Mollie/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
import API
from . import API
4 changes: 3 additions & 1 deletion examples/1-new-payment.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
#
# Example 1 - How to prepare a new payment with the Mollie API.
#
from __future__ import print_function

import sys, os, time, flask
from app import database_write

Expand Down Expand Up @@ -62,4 +64,4 @@ def main():


if __name__ == '__main__':
print main()
print(main())
4 changes: 3 additions & 1 deletion examples/2-webhook-verification.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#
# Example 2 - How to verify Mollie API Payments in a webhook.
#
from __future__ import print_function

import sys, os, flask
from app import database_write

Expand Down Expand Up @@ -63,4 +65,4 @@ def main():
return 'API call failed: ' + e.message

if __name__ == '__main__':
print main()
print(main())
4 changes: 3 additions & 1 deletion examples/3-return-page.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
# In this example we retrieve the order stored in the database.
# Here, it's unnecessary to use the Mollie API Client.
#
from __future__ import print_function

import flask
from app import database_read

Expand All @@ -21,4 +23,4 @@ def main():


if __name__ == '__main__':
print main()
print(main())
4 changes: 3 additions & 1 deletion examples/4-ideal-payment.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
#
# Example 4 - How to prepare an iDEAL payment with the Mollie API.
#
from __future__ import print_function

import sys, os, time, flask
from app import database_write

Expand Down Expand Up @@ -88,4 +90,4 @@ def main ():


if __name__ == '__main__':
print main()
print(main())
4 changes: 3 additions & 1 deletion examples/5-payments-history.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
#
# Example 5 - How to retrieve your payments history.
#
from __future__ import print_function

import sys, os

#
Expand Down Expand Up @@ -39,4 +41,4 @@ def main():
return 'API call failed: ' + e.message

if __name__ == '__main__':
print main()
print(main())
4 changes: 3 additions & 1 deletion examples/6-list-activated-methods.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
#
# Example 6 - How to get the currently activated payment methods.
#
from __future__ import print_function

import sys, os

#
Expand Down Expand Up @@ -41,4 +43,4 @@ def main():
return 'API call failed: ' + e.message

if __name__ == '__main__':
print main()
print(main())
29 changes: 18 additions & 11 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
from setuptools import setup, find_packages

setup(
name = 'mollie-api-python',
version = '1.0.3',
license = 'BSD',
packages = find_packages(),
include_package_data = True,
description = 'Mollie API client for Python',
author = 'Mollie B.V.',
author_email = '[email protected]',
keywords = ['mollie', 'payment', 'service', 'ideal', 'creditcard', 'mistercash', 'bancontact', 'sofort', 'sofortbanking', 'sepa', 'bitcoin', 'paypal', 'paysafecard', 'podiumcadeaukaart', 'banktransfer', 'direct debit', 'belfius', 'belfius direct net', 'refunds', 'payments', 'gateway'],
url = 'https://github.com/mollie/mollie-api-python'
)
name='mollie-api-python',
version='1.0.3',
license='BSD',
packages=find_packages(),
include_package_data=True,
description='Mollie API client for Python',
author='Mollie B.V.',
author_email='[email protected]',
keywords=['mollie', 'payment', 'service', 'ideal', 'creditcard', 'mistercash', 'bancontact', 'sofort',
'sofortbanking', 'sepa', 'bitcoin', 'paypal', 'paysafecard', 'podiumcadeaukaart', 'banktransfer',
'direct debit', 'belfius', 'belfius direct net', 'refunds', 'payments', 'gateway'],
url='https://github.com/mollie/mollie-api-python',
classifiers=[
'Programming Language :: Python',
'Programming Language :: Python :: 3',
]
)

0 comments on commit 4c74da4

Please sign in to comment.