Module: OmiseProviderChecker
- Extended by:
- ActiveSupport::Concern
- Included in:
- TicketService::Transaction, TicketTransaction
- Defined in:
- app/models/concerns/omise_provider_checker.rb
Overview
Shared concern for checking if a provider value represents Omise payment gateway This module provides a standardized way to identify Omise provider across models and services
Can be used in two ways:
-
Include in a class for instance method usage
-
Call as module function for standalone usage
Class Method Summary collapse
-
.omise_provider?(provider_value) ⇒ Boolean
Class-level helper method for checking if a provider represents Omise This can be called without including the module.
Class Method Details
.omise_provider?(provider_value) ⇒ Boolean
Class-level helper method for checking if a provider represents Omise This can be called without including the module
39 40 41 42 43 |
# File 'app/models/concerns/omise_provider_checker.rb', line 39 def self.omise_provider?(provider_value) return false if provider_value.blank? provider_value.to_s == Externals::Omise::Source::OMISE_SOURCE_ID end |