mirror of
https://github.com/valitydev/fraudo.git
synced 2024-11-06 01:45:16 +00:00
Add TRUST ResultStatus (#45)
This commit is contained in:
parent
df4ac1de4d
commit
3f5aa6c9b6
@ -93,7 +93,8 @@ country_by
|
||||
;
|
||||
|
||||
result
|
||||
: 'accept'
|
||||
: 'trust'
|
||||
| 'accept'
|
||||
| '3ds'
|
||||
| 'highRisk'
|
||||
| 'decline'
|
||||
@ -103,7 +104,8 @@ result
|
||||
;
|
||||
|
||||
catch_result
|
||||
: 'accept'
|
||||
: 'trust'
|
||||
| 'accept'
|
||||
| '3ds'
|
||||
| 'highRisk'
|
||||
| 'notify'
|
||||
|
@ -5,6 +5,7 @@ import java.util.Map;
|
||||
|
||||
public enum ResultStatus {
|
||||
|
||||
TRUST("trust"),
|
||||
ACCEPT("accept"),
|
||||
ACCEPT_AND_NOTIFY("acceptAndNotify"),
|
||||
THREE_DS("3ds"),
|
||||
|
@ -27,6 +27,13 @@ public class CustomTest extends AbstractPaymentTest {
|
||||
MockitoAnnotations.initMocks(this);
|
||||
}
|
||||
|
||||
@Test
|
||||
void trustTest() throws Exception {
|
||||
InputStream resourceAsStream = CustomTest.class.getResourceAsStream("/rules/trust.frd");
|
||||
ResultModel result = parseAndVisit(resourceAsStream);
|
||||
assertEquals(ResultStatus.TRUST, ResultUtils.findFirstNotNotifyStatus(result).get().getResultStatus());
|
||||
}
|
||||
|
||||
@Test
|
||||
void threeDsTest() throws Exception {
|
||||
InputStream resourceAsStream = CustomTest.class.getResourceAsStream("/rules/three_ds.frd");
|
||||
|
2
src/test/resources/rules/trust.frd
Normal file
2
src/test/resources/rules/trust.frd
Normal file
@ -0,0 +1,2 @@
|
||||
rule: rand(2) < 3
|
||||
-> trust;
|
Loading…
Reference in New Issue
Block a user