-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
7 changed files
with
53 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?php | ||
|
||
use Craftgate\Model\FraudValueType; | ||
|
||
require_once('config/sample_config.php'); | ||
|
||
$response = SampleConfig::craftgate()->fraud()->addValueToValueList(array( | ||
'listName' => "cardList", | ||
'type' => FraudValueType::CARD, | ||
'label' => "John Doe's Card", | ||
'paymentId' => 11675, | ||
)); | ||
|
||
print_r($response); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,15 @@ | ||
<?php | ||
|
||
use Craftgate\Model\FraudValueType; | ||
|
||
require_once('config/sample_config.php'); | ||
|
||
$response = SampleConfig::craftgate()->fraud()->addValueToValueList("ipList", "127.0.0.2", 60); | ||
$response = SampleConfig::craftgate()->fraud()->addValueToValueList(array( | ||
'listName' => "ipList", | ||
'label' => "local ip 2", | ||
'type' => FraudValueType::IP, | ||
'value' => "127.0.0.2", | ||
'durationInSeconds' => 60 | ||
)); | ||
|
||
print_r($response); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,14 @@ | ||
<?php | ||
|
||
use Craftgate\Model\FraudValueType; | ||
|
||
require_once('config/sample_config.php'); | ||
|
||
$response = SampleConfig::craftgate()->fraud()->addValueToValueList("ipList", "127.0.0.1"); | ||
$response = SampleConfig::craftgate()->fraud()->addValueToValueList(array( | ||
'listName' => "ipList", | ||
'type' => FraudValueType::IP, | ||
'label' => "local ip 1", | ||
'value' => "127.0.0.1", | ||
)); | ||
|
||
print_r($response); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
<?php | ||
|
||
use Craftgate\Model\FraudValueType; | ||
|
||
require_once('config/sample_config.php'); | ||
|
||
$response = SampleConfig::craftgate()->fraud()->createValueList("ipList"); | ||
$response = SampleConfig::craftgate()->fraud()->createValueList("ipList", FraudValueType::IP); | ||
|
||
print_r($response); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?php | ||
|
||
namespace Craftgate\Model; | ||
|
||
class FraudValueType | ||
{ | ||
const CARD = 'CARD'; | ||
const IP = 'IP'; | ||
const PHONE_NUMBER = 'PHONE_NUMBER'; | ||
const EMAIL = 'EMAIL'; | ||
const OTHER = 'OTHER'; | ||
} |