Class: Workarea::Checkout::Fraud::TestAnalyzer
- Defined in:
- app/models/workarea/checkout/fraud/test_analyzer.rb
Instance Attribute Summary
Attributes inherited from Analyzer
Instance Method Summary collapse
Methods inherited from Analyzer
#decide!, #error_decision, #initialize
Constructor Details
This class inherits a constructor from Workarea::Checkout::Fraud::Analyzer
Instance Method Details
#make_decision ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'app/models/workarea/checkout/fraud/test_analyzer.rb', line 5 def make_decision if order.email == "[email protected]" Workarea::Order::FraudDecision.new( decision: :declined, message: "Forced test fraud decline." ) elsif order.email == "[email protected]" Workarea::Order::FraudDecision.new( decision: :approved, message: "Forced test fraud approval." ) else Workarea::Order::FraudDecision.new( decision: :no_decision, message: "Workarea default fraud check. Automatic no decision." ) end end |