Simplify_FraudCheck

Copyright (c) 2013 - 2015 MasterCard International Incorporated All rights reserved.

Defined (1)

The class is defined in the following location(s).

/includes/gateways/simplify-commerce/includes/Simplify/FraudCheck.php  
  1. class Simplify_FraudCheck extends Simplify_Object { 
  2. /** 
  3. * Creates an Simplify_FraudCheck object 
  4. * @param array $hash a map of parameters; valid keys are:<dl style="padding-left:10px;"> 
  5. * <dt><tt>amount</tt></dt> <dd>Amount of the transaction to be checked for fraud (in the smallest unit of your currency). Example: 100 = $1.00USD </dd> 
  6. * <dt><tt>card.addressCity</tt></dt> <dd>City of the cardholder. [max length: 50, min length: 2] </dd> 
  7. * <dt><tt>card.addressCountry</tt></dt> <dd>Country code (ISO-3166-1-alpha-2 code) of residence of the cardholder. [max length: 2, min length: 2] </dd> 
  8. * <dt><tt>card.addressLine1</tt></dt> <dd>Address of the cardholder. [max length: 255] </dd> 
  9. * <dt><tt>card.addressLine2</tt></dt> <dd>Address of the cardholder if needed. [max length: 255] </dd> 
  10. * <dt><tt>card.addressState</tt></dt> <dd>State of residence of the cardholder. For the US, this is a 2-digit USPS code. [max length: 255, min length: 2] </dd> 
  11. * <dt><tt>card.addressZip</tt></dt> <dd>Postal code of the cardholder. The postal code size is between 5 and 9 characters in length and only contains numbers or letters. [max length: 9, min length: 3] </dd> 
  12. * <dt><tt>card.cvc</tt></dt> <dd>CVC security code of the card. This is the code on the back of the card. Example: 123 </dd> 
  13. * <dt><tt>card.expMonth</tt></dt> <dd>Expiration month of the card. Format is MM. Example: January = 01 [min value: 1, max value: 12] <strong>required </strong></dd> 
  14. * <dt><tt>card.expYear</tt></dt> <dd>Expiration year of the card. Format is YY. Example: 2013 = 13 [min value: 0, max value: 99] <strong>required </strong></dd> 
  15. * <dt><tt>card.name</tt></dt> <dd>Name as it appears on the card. [max length: 50, min length: 2] </dd> 
  16. * <dt><tt>card.number</tt></dt> <dd>Card number as it appears on the card. [max length: 19, min length: 13] <strong>required </strong></dd> 
  17. * <dt><tt>currency</tt></dt> <dd>Currency code (ISO-4217) for the transaction to be checked for fraud. </dd> 
  18. * <dt><tt>description</tt></dt> <dd>- Description of the fraud check. </dd> 
  19. * <dt><tt>mode</tt></dt> <dd>Fraud check mode. *simple* only does an AVS and CVC check; *advanced* does a complete fraud check, running the input against the set up rules. [valid values: simple, advanced, full] <strong>required </strong></dd> 
  20. * <dt><tt>sessionId</tt></dt> <dd>Session ID usd during data collection. [max length: 255] </dd> 
  21. * <dt><tt>token</tt></dt> <dd>Description </dd></dl> 
  22. * @param $authentication - information used for the API call. If no value is passed the global keys Simplify::public_key and Simplify::private_key are used. <i>For backwards compatibility the public and private keys may be passed instead of the authentication object.<i/> 
  23. * @return FraudCheck a FraudCheck object. 
  24. */ 
  25. static public function createFraudCheck($hash, $authentication = null) { 
  26.  
  27. $args = func_get_args(); 
  28. $authentication = Simplify_PaymentsApi::buildAuthenticationObject($authentication, $args, 2); 
  29.  
  30. $instance = new Simplify_FraudCheck(); 
  31. $instance->setAll($hash); 
  32.  
  33. $object = Simplify_PaymentsApi::createObject($instance, $authentication); 
  34. return $object; 
  35.  
  36.  
  37.  
  38. /** 
  39. * Retrieve Simplify_FraudCheck objects. 
  40. * @param array criteria a map of parameters; valid keys are:<dl style="padding-left:10px;"> 
  41. * <dt><tt>filter</tt></dt> <dd>Allows for ascending or descending sorting of the list. </dd> 
  42. * <dt><tt>max</tt></dt> <dd>Allows up to a max of 50 list items to return. [min value: 0, max value: 50, default: 20] </dd> 
  43. * <dt><tt>offset</tt></dt> <dd>Used in paging of the list. This is the start offset of the page. [min value: 0, default: 0] </dd> 
  44. * <dt><tt>sorting</tt></dt> <dd>Used in paging of the list. This is the start offset of the page. The value maps properties to the sort direction (either <tt>asc</tt> for ascending or <tt>desc</tt> for descending). Sortable properties are: .</dd></dl> 
  45. * @param $authentication - information used for the API call. If no value is passed the global keys Simplify::public_key and Simplify::private_key are used. <i>For backwards compatibility the public and private keys may be passed instead of the authentication object.</i> 
  46. * @return ResourceList a ResourceList object that holds the list of FraudCheck objects and the total 
  47. * number of FraudCheck objects available for the given criteria. 
  48. * @see ResourceList 
  49. */ 
  50. static public function listFraudCheck($criteria = null, $authentication = null) { 
  51.  
  52. $args = func_get_args(); 
  53. $authentication = Simplify_PaymentsApi::buildAuthenticationObject($authentication, $args, 2); 
  54.  
  55. $val = new Simplify_FraudCheck(); 
  56. $list = Simplify_PaymentsApi::listObject($val, $criteria, $authentication); 
  57.  
  58. return $list; 
  59.  
  60.  
  61. /** 
  62. * Retrieve a Simplify_FraudCheck object from the API 
  63. * @param string id the id of the FraudCheck object to retrieve 
  64. * @param $authentication - information used for the API call. If no value is passed the global keys Simplify::public_key and Simplify::private_key are used. <i>For backwards compatibility the public and private keys may be passed instead of the authentication object.</i> 
  65. * @return FraudCheck a FraudCheck object 
  66. */ 
  67. static public function findFraudCheck($id, $authentication = null) { 
  68.  
  69. $args = func_get_args(); 
  70. $authentication = Simplify_PaymentsApi::buildAuthenticationObject($authentication, $args, 2); 
  71.  
  72. $val = new Simplify_FraudCheck(); 
  73. $val->id = $id; 
  74.  
  75. $obj = Simplify_PaymentsApi::findObject($val, $authentication); 
  76.  
  77. return $obj; 
  78.  
  79. /** 
  80. * @ignore 
  81. */ 
  82. public function getClazz() { 
  83. return "FraudCheck";