Sha256: 424a859d379606c2cfbed4db913340dac7af96bcb1b5cc19c4bac597c8fbbc8d

Contents?: true

Size: 1.01 KB

Versions: 1

Compression:

Stored size: 1.01 KB

Contents

module Ipay
  module Rest
    class Error < StandardError; end

    class FailedTransactionError < StandardError
      def to_s
        'Failed transaction. Not all parameters fulfilled. A notification of this transaction sent to the merchant.'
      end
    end

    class PendingTransactionError < StandardError
      def to_s
        'Pending: Incoming Mobile Money Transaction Not found. Please try again in 5 minutes.'
      end
    end

    class UsedCodeError < StandardError
      def to_s
        'Used: This code has been used already. A notification of this transaction sent to the merchant.'
      end
    end

    class PaymentDeficitError < StandardError
      def to_s
        'Less: The amount that you have sent via mobile money is LESS than what was required to validate this transaction.'
      end
    end

    class OverPaymentError < StandardError
      def to_s
        'More: The amount that you have sent via mobile money is MORE than what was required to validate this transaction.'
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ipay-rest-0.1.1 lib/ipay/rest/error.rb