Sha256: cdfe7f52985f13927f22ccc2705df27153943bac901ec1fc9bcd20b21b5599bd
Contents?: true
Size: 969 Bytes
Versions: 18
Compression:
Stored size: 969 Bytes
Contents
module ActiveMerchant module Billing module Integrations module Citrus class Return < ActiveMerchant::Billing::Integrations::Return def initialize(query_string, options = {}) super @notification = Notification.new(query_string, options) end def transaction_id @notification.transaction_id end def status( order_id, order_amount ) if @notification.invoice_ok?( order_id ) && @notification.amount_ok?( BigDecimal.new(order_amount) ) @notification.status else 'Mismatch' end end def success? status( @params['TxId'], @params['amount'] ) == 'Completed' end def message @notification.message end def cancelled? @notification.status == 'Cancelled' end end end end end end
Version data entries
18 entries across 18 versions & 1 rubygems