Skip to content

Commit 0601553

Browse files
committed
Add 3DS to credit_card validation
1 parent 6e0fbf5 commit 0601553

File tree

5 files changed

+9
-1
lines changed

5 files changed

+9
-1
lines changed

HISTORY.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ History
1414
* ``dlocal``
1515
* ``onpay``
1616
* ``safecharge``
17+
* Adds ``rule_label`` to minFraud output ``/disposition``.
18+
* Adds ``was_3d_secure_successful`` to ``/credit_card`` validation
1719

1820
2.3.1 (2021-02-12)
1921
++++++++++++++++++

README.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,7 @@ Score, Insights and Factors Example
195195
>>> 'cvv_result': 'N',
196196
>>> 'bank_name': 'Bank of No Hope',
197197
>>> 'issuer_id_number': '411111'
198+
>>> 'was_3ds_secure_successful': True
198199
>>> },
199200
>>> 'payment': {
200201
>>> 'decline_code': 'invalid number',

minfraud/validation.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,7 @@ def _uri(s: str) -> str:
302302
"issuer_id_number": _iin,
303303
"last_4_digits": _credit_card_last_4,
304304
"token": _credit_card_token,
305+
"was_3d_secure_successful": bool,
305306
},
306307
"custom_inputs": {_custom_input_key: _custom_input_value},
307308
"device": {

tests/data/full-transaction-request.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@
5353
"bank_phone_number": "123-456-1234",
5454
"avs_result": "Y",
5555
"cvv_result": "N",
56-
"token": "123456abc1234"
56+
"token": "123456abc1234",
57+
"was_3d_secure_successful": true
5758
},
5859
"order": {
5960
"amount": 323.21,

tests/test_validation.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,9 @@ def test_token(self):
185185
for invalid in ("\x20", "123456", "x" * 256):
186186
self.check_invalid_transaction({"credit_card": {"token": invalid}})
187187

188+
def test_was_3d_secure_successful(self):
189+
self.check_bool("credit_card", "was_3d_secure_successful")
190+
188191

189192
class TestCustomInputs(ValidationBase, unittest.TestCase):
190193
def test_valid_inputs(self):

0 commit comments

Comments
 (0)