Skip to content

Commit

Permalink
Merge b413884 into af070a3
Browse files Browse the repository at this point in the history
  • Loading branch information
jhsaraja committed Dec 17, 2018
2 parents af070a3 + b413884 commit dbf3608
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 4 deletions.
5 changes: 5 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
History
=======

0.1.6 (2018-12-17)
------------------

* Added 'dynamic_feedback' to method 'generate_payment_data'.

0.1.5 (2018-12-14)
------------------

Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.1.5
current_version = 0.1.6
commit = True
tag = True

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

setup(
name='verifone',
version='0.1.5',
version='0.1.6',
description="Python package for Verifone",
long_description=readme + '\n\n' + history,
author="Jaana Sarajärvi",
Expand Down
4 changes: 3 additions & 1 deletion tests/test_verifone.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,8 @@ def test_010_generate_payment_data(self):
'amount_net': 1.22,
'unit_cost_gross': 1.51,
},
]
],
'dynamic_feedback': 's-t-1-4_error-code,i-t-6-6_card-pan-first6,i-t-4-4_card-pan-last4',
}

data = self._verifone_client.generate_payment_data(params)
Expand All @@ -184,6 +185,7 @@ def test_010_generate_payment_data(self):
self.assertEqual(data['l-f-1-20_order-vat-amount'], 29)
self.assertEqual(data['s-t-1-255_buyer-external-id'], customer_id)
self.assertEqual(data['s-t-1-36_order-note'], note)
self.assertIsNotNone(data['s-t-1-1024_dynamic-feedback'])

def test_011_generate_payment_data(self):
""" Test to generate payment data when all data is not defined """
Expand Down
2 changes: 1 addition & 1 deletion verifone/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@

__author__ = """Jaana Sarajärvi"""
__email__ = 'jaana.sarajarvi@vilkas.fi'
__version__ = '0.1.5'
__version__ = '0.1.6'
2 changes: 2 additions & 0 deletions verifone/verifone.py
Original file line number Diff line number Diff line change
Expand Up @@ -514,6 +514,7 @@ def generate_payment_data(self, data):
unit gross cost is not filled, otherwise must not be used (optional)
- payment_timestamp: the payment start time, format is yyyy-MM-dd HH:mm:ss (optional)
- order_timestamp: the orders time from web shop point of view, format is yyyy-MM-dd HH:mm:ss (optional)
- dynamic_feedback: comma separated list of optional parameters to be added to the response if available, string (optional)
:return: generated payment data, dictionary
"""
Expand Down Expand Up @@ -583,6 +584,7 @@ def generate_payment_data(self, data):
'postal_code': 's-t-1-30_delivery-address-postal-code',
'save_method': 'i-t-1-1_save-payment-method',
'payment_method': 's-t-1-30_payment-method-code',
'dynamic_feedback': 's-t-1-1024_dynamic-feedback',
}

for key, field in extra_fields.items():
Expand Down

0 comments on commit dbf3608

Please sign in to comment.