Class CommercialFraudMockService

java.lang.Object
de.hybris.platform.fraud.impl.AbstractFraudServiceProvider
de.hybris.platform.fraud.impl.mock.CommercialFraudMockService
All Implemented Interfaces:
FraudServiceProvider

public class CommercialFraudMockService extends AbstractFraudServiceProvider
Mock implementation of external fraud detection provider.
  • Constructor Details

    • CommercialFraudMockService

      public CommercialFraudMockService()
  • Method Details

    • isFreeEmailService

      public int isFreeEmailService(String email)
      whether the given email is from a free email service
      Parameters:
      email - the email to check
      Returns:
      the score (0 if no free email, otherwise DEFAULT_INCREMENT)
    • isBannedDomain

      public int isBannedDomain(String domain)
      whether the given domain is banned
      Parameters:
      domain - the domain to check
      Returns:
      the score (0 if not banned, otherwise DEFAULT_INCREMENT)
    • isBannedIP

      public int isBannedIP(String ipAddress)
      whether the given ip address is banned
      Parameters:
      ipAddress - the ip address to check
      Returns:
      the score (0 if not banned, otherwise DEFAULT_INCREMENT)
    • isFraudulentCreditCard

      public int isFraudulentCreditCard(String hashedNumber)
      whether the given hashed credit card number is fraudulent
      Parameters:
      hashedNumber - the hashed credit card number to check
      Returns:
      the score (0 if not fraudulent, otherwise DEFAULT_INCREMENT)
    • isFraudulentEmailAddress

      public int isFraudulentEmailAddress(String email)
      whether the given email address is fraudulent
      Parameters:
      email - the email to check
      Returns:
      the score (0 if not fraudulent, otherwise DEFAULT_INCREMENT)
    • isFraudulentGeolocation

      public int isFraudulentGeolocation(String ipAddress, String country, String zipCode, String state)
      whether the given geolocation is fraudulent
      Parameters:
      ipAddress - the ip address to check
      country - the country to check
      zipCode - the zip code to check
      state - the state to check
      Returns:
      the score (0 if not fraudulent, otherwise DEFAULT_INCREMENT)
    • decomposeOrderModel

      protected Map<String,String> decomposeOrderModel(AbstractOrderModel order)
    • recognizeOrderFraudSymptoms

      public FraudServiceResponse recognizeOrderFraudSymptoms(AbstractOrderModel order)
    • doAll

      protected Map<String,Double> doAll(Map<String,String> parameters)
    • recognizeUserActivitySymptoms

      public FraudServiceResponse recognizeUserActivitySymptoms(UserModel order)