Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions agms/response/report_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ def __init__(self, response, op):
'createuser': 'created_by',
'moduser': 'modified_by',
'useragent': 'user_agent',
'cardpresent': 'card_present',
'cardtype': 'card_type'
}

arr = response['transactions']['transaction']
Expand Down
4 changes: 2 additions & 2 deletions agms/test/remote/test_agms.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ def __init__(self):
class AgmsTest(unittest.TestCase):

def setUp(self):
Configuration.configure('agmsdevdemo', 'nX1m*xa9Id', '1001789',
'b00f57326f8cf34bbb705a74b5fcbaa2b2f3e58076dc81f', 'requests')
Configuration.configure('osdgithub', 'Ks1m32aF@', '1002186',
'accf69cefaeb1d19702e33b0a9bfc9f8f0ab3c065d937fc', 'requests')
self.agms = Dummy()
self.agms._set_parameter('transaction_type', {'value': 'sale'})

Expand Down
12 changes: 6 additions & 6 deletions agms/test/remote/test_configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ def setUp(self):
self.config = Configuration.instantiate()

def testConfigurationInit(self):
self.assertEqual(Configuration.gateway_username, 'agmsdevdemo')
self.assertEqual(Configuration.gateway_account, '1001789')
self.assertEqual(Configuration.gateway_api_key, 'b00f57326f8cf34bbb705a74b5fcbaa2b2f3e58076dc81f')
self.assertEqual(Configuration.gateway_username, 'osdgithub')
self.assertEqual(Configuration.gateway_account, '1002186')
self.assertEqual(Configuration.gateway_api_key, 'accf69cefaeb1d19702e33b0a9bfc9f8f0ab3c065d937fc')

def testConfigurationInstantiate(self):
self.assertEqual(self.config.gateway_username, 'agmsdevdemo')
self.assertEqual(self.config.gateway_account, '1001789')
self.assertEqual(self.config.gateway_api_key, 'b00f57326f8cf34bbb705a74b5fcbaa2b2f3e58076dc81f')
self.assertEqual(self.config.gateway_username, 'osdgithub')
self.assertEqual(self.config.gateway_account, '1002186')
self.assertEqual(self.config.gateway_api_key, 'accf69cefaeb1d19702e33b0a9bfc9f8f0ab3c065d937fc')

def testHttpClient(self):
self.assertTrue(isinstance(self.config._http_client, RequestsClient))
Expand Down
2 changes: 1 addition & 1 deletion agms/test/remote/test_hpp.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
class HPPTest(unittest.TestCase):

def setUp(self):
Configuration.configure('agmsdevdemo', 'nX1m*xa9Id', '1001789', 'b00f57326f8cf34bbb705a74b5fcbaa2b2f3e58076dc81f', 'requests')
Configuration.configure('osdgithub', 'Ks1m32aF@', '1002186', 'accf69cefaeb1d19702e33b0a9bfc9f8f0ab3c065d937fc', 'requests')
self.hpp = HPP()

def testHPPClassAssignment(self):
Expand Down
2 changes: 1 addition & 1 deletion agms/test/remote/test_invoicing.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
class InvoicingTest(unittest.TestCase):

def setUp(self):
Configuration.configure('agmsdevdemo', 'nX1m*xa9Id', None, None, 'requests')
Configuration.configure('osdgithub', 'Ks1m32aF@', None, None, 'requests')
self.invoicing = Invoicing()

def testInvoicingClassAssignment(self):
Expand Down
2 changes: 1 addition & 1 deletion agms/test/remote/test_recurring.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
class RecurringTest(unittest.TestCase):

def setUp(self):
Configuration.configure('agmsdevdemo', 'nX1m*xa9Id', None, None, 'requests')
Configuration.configure('osdgithub', 'Ks1m32aF@', None, None, 'requests')
self.recurring = Recurring()

def testRecurringClassAssignment(self):
Expand Down
2 changes: 1 addition & 1 deletion agms/test/remote/test_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
class ReportTest(unittest.TestCase):

def setUp(self):
Configuration.configure('agmsdevdemo', 'nX1m*xa9Id', '1001789', 'b00f57326f8cf34bbb705a74b5fcbaa2b2f3e58076dc81f', 'requests')
Configuration.configure('osdgithub', 'Ks1m32aF@', '1002186', 'accf69cefaeb1d19702e33b0a9bfc9f8f0ab3c065d937fc', 'requests')
self.report = Report()

def testReportClassAssignment(self):
Expand Down
2 changes: 1 addition & 1 deletion agms/test/remote/test_safe.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
class SAFETest(unittest.TestCase):

def setUp(self):
Configuration.configure('agmsdevdemo', 'nX1m*xa9Id', None, None, 'requests')
Configuration.configure('osdgithub', 'Ks1m32aF@', None, None, 'requests')
self.safe = SAFE()

def testSAFEClassAssignment(self):
Expand Down
2 changes: 1 addition & 1 deletion agms/test/remote/test_transaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
class RemoteTransactionTest(unittest.TestCase):

def setUp(self):
Configuration.configure('agmsdevdemo', 'nX1m*xa9Id', None, None, 'requests')
Configuration.configure('osdgithub', 'Ks1m32aF@', None, None, 'requests')
self.transaction = Transaction()

def testTransactionClassAssignment(self):
Expand Down
2 changes: 1 addition & 1 deletion agms/test/unit/response/test_hpp_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
class HPPResponseTest(unittest.TestCase):

def setUp(self):
Configuration.configure('agmsdevdemo', 'nX1m*xa9Id', '1001789', 'b00f57326f8cf34bbb705a74b5fcbaa2b2f3e58076dc81f', 'pycurl')
Configuration.configure('osdgithub', 'Ks1m32aF@', '1002186', 'accf69cefaeb1d19702e33b0a9bfc9f8f0ab3c065d937fc', 'pycurl')
self.hpp = HPP()

@httpretty.activate
Expand Down
4 changes: 2 additions & 2 deletions agms/test/unit/response/test_report_response.py

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion agms/test/unit/response/test_safe_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
class SAFEResponseTest(unittest.TestCase):

def setUp(self):
Configuration.configure('agmsdevdemo', 'nX1m*xa9Id', '1001789', 'b00f57326f8cf34bbb705a74b5fcbaa2b2f3e58076dc81f', 'requests')
Configuration.configure('osdgithub', 'Ks1m32aF@', '1002186', 'accf69cefaeb1d19702e33b0a9bfc9f8f0ab3c065d937fc', 'requests')
self.safe = SAFE()


Expand Down
2 changes: 1 addition & 1 deletion agms/test/unit/response/test_transaction_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

class TransactionResponseTest(unittest.TestCase):
def setUp(self):
Configuration.configure('agmsdevdemo', 'nX1m*xa9Id', '1001789', 'b00f57326f8cf34bbb705a74b5fcbaa2b2f3e58076dc81f', 'requests')
Configuration.configure('osdgithub', 'Ks1m32aF@', '1002186', 'accf69cefaeb1d19702e33b0a9bfc9f8f0ab3c065d937fc', 'requests')
self.transaction = Transaction()


Expand Down
2 changes: 1 addition & 1 deletion agms/test/unit/test_agms.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def __init__(self):
class AgmsTest(unittest.TestCase):

def setUp(self):
Configuration.configure('agmsdevdemo', 'nX1m*xa9Id', '1001789', 'b00f57326f8cf34bbb705a74b5fcbaa2b2f3e58076dc81f', 'requests')
Configuration.configure('osdgithub', 'Ks1m32aF@', '1002186', 'accf69cefaeb1d19702e33b0a9bfc9f8f0ab3c065d937fc', 'requests')
self.agms = Dummy()
self.agms._set_parameter('transaction_type', {'value': 'sale'})

Expand Down
16 changes: 8 additions & 8 deletions agms/test/unit/test_configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,19 @@
class AgmsTest(unittest.TestCase):

def setUp(self):
Configuration.configure('agmsdevdemo', 'nX1m*xa9Id', '1001789',
'b00f57326f8cf34bbb705a74b5fcbaa2b2f3e58076dc81f', 'requests')
Configuration.configure('osdgithub', 'Ks1m32aF@', '1002186',
'accf69cefaeb1d19702e33b0a9bfc9f8f0ab3c065d937fc', 'requests')
self.config = Configuration.instantiate()

def testConfigurationInit(self):
self.assertEqual(Configuration.gateway_username, 'agmsdevdemo')
self.assertEqual(Configuration.gateway_account, '1001789')
self.assertEqual(Configuration.gateway_api_key, 'b00f57326f8cf34bbb705a74b5fcbaa2b2f3e58076dc81f')
self.assertEqual(Configuration.gateway_username, 'osdgithub')
self.assertEqual(Configuration.gateway_account, '1002186')
self.assertEqual(Configuration.gateway_api_key, 'accf69cefaeb1d19702e33b0a9bfc9f8f0ab3c065d937fc')

def testConfigurationInstantiate(self):
self.assertEqual(self.config.gateway_username, 'agmsdevdemo')
self.assertEqual(self.config.gateway_account, '1001789')
self.assertEqual(self.config.gateway_api_key, 'b00f57326f8cf34bbb705a74b5fcbaa2b2f3e58076dc81f')
self.assertEqual(self.config.gateway_username, 'osdgithub')
self.assertEqual(self.config.gateway_account, '1002186')
self.assertEqual(self.config.gateway_api_key, 'accf69cefaeb1d19702e33b0a9bfc9f8f0ab3c065d937fc')



Expand Down
2 changes: 1 addition & 1 deletion agms/test/unit/test_hpp.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
class HPPTest(unittest.TestCase):

def setUp(self):
Configuration.configure('agmsdevdemo', 'nX1m*xa9Id', '1001789', 'b00f57326f8cf34bbb705a74b5fcbaa2b2f3e58076dc81f', 'requests')
Configuration.configure('osdgithub', 'Ks1m32aF@', '1002186', 'accf69cefaeb1d19702e33b0a9bfc9f8f0ab3c065d937fc', 'requests')
self.hpp = HPP()

def testHPPClassAssignment(self):
Expand Down
2 changes: 1 addition & 1 deletion agms/test/unit/test_invoicing.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
class InvoicingTest(unittest.TestCase):

def setUp(self):
Configuration.configure('agmsdevdemo', 'nX1m*xa9Id', '1001789', 'b00f57326f8cf34bbb705a74b5fcbaa2b2f3e58076dc81f', 'requests')
Configuration.configure('osdgithub', 'Ks1m32aF@', '1002186', 'accf69cefaeb1d19702e33b0a9bfc9f8f0ab3c065d937fc', 'requests')
self.invoicing = Invoicing()

def testInvoicingClassAssignment(self):
Expand Down
2 changes: 1 addition & 1 deletion agms/test/unit/test_recurring.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
class RecurringTest(unittest.TestCase):

def setUp(self):
Configuration.configure('agmsdevdemo', 'nX1m*xa9Id', '1001789', 'b00f57326f8cf34bbb705a74b5fcbaa2b2f3e58076dc81f', 'requests')
Configuration.configure('osdgithub', 'Ks1m32aF@', '1002186', 'accf69cefaeb1d19702e33b0a9bfc9f8f0ab3c065d937fc', 'requests')
self.recurring = Recurring()

def testRecurringClassAssignment(self):
Expand Down
6 changes: 3 additions & 3 deletions agms/test/unit/test_report.py

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion agms/test/unit/test_safe.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
class SAFETest(unittest.TestCase):

def setUp(self):
Configuration.configure('agmsdevdemo', 'nX1m*xa9Id', '1001789', 'b00f57326f8cf34bbb705a74b5fcbaa2b2f3e58076dc81f', 'requests')
Configuration.configure('osdgithub', 'Ks1m32aF@', '1002186', 'accf69cefaeb1d19702e33b0a9bfc9f8f0ab3c065d937fc', 'requests')
self.safe = SAFE()

def testSAFEClassAssignment(self):
Expand Down
2 changes: 1 addition & 1 deletion agms/test/unit/test_transaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
class TransactionTest(unittest.TestCase):

def setUp(self):
Configuration.configure('agmsdevdemo', 'nX1m*xa9Id', '1001789', 'b00f57326f8cf34bbb705a74b5fcbaa2b2f3e58076dc81f', 'requests')
Configuration.configure('osdgithub', 'Ks1m32aF@', '1002186', 'accf69cefaeb1d19702e33b0a9bfc9f8f0ab3c065d937fc', 'requests')
self.transaction = Transaction()

def testTransactionClassAssignment(self):
Expand Down
8 changes: 4 additions & 4 deletions examples/init.ini
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[gateway]
username = agmsdevdemo
password = nX1m*xa9Id
account = 1001789
api_key = b00f57326f8cf34bbb705a74b5fcbaa2b2f3e58076dc81f
username = osdgithub
password = Ks1m32aF@
account = 1002186
api_key = accf69cefaeb1d19702e33b0a9bfc9f8f0ab3c065d937fc
client = requests
max_amount = 10000
min_amount = 0.00
Expand Down
8 changes: 4 additions & 4 deletions init.ini
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[gateway]
username = agmsdevdemo
password = nX1m*xa9Id
account = 1001789
api_key = b00f57326f8cf34bbb705a74b5fcbaa2b2f3e58076dc81f
username = osdgithub
password = Ks1m32aF@
account = 1002186
api_key = accf69cefaeb1d19702e33b0a9bfc9f8f0ab3c065d937fc
client = requests
max_amount = 10000
min_amount = 0.00
Expand Down