lib/paykassa.rb in paykassa-0.1.10 vs lib/paykassa.rb in paykassa-0.1.11

- old
+ new

@@ -4,17 +4,18 @@ require_relative "paykassa/order" require_relative "paykassa/pay" module Paykassa class Error < StandardError; end class Paykassa - def initialize(domain:, sci_id:, sci_key:, api_id: nil, api_key: nil, test:) - @paykassa_order = PaykassaOrder.new({domain: domain, sci_id: sci_id, sci_key: sci_key}) + def initialize(domain:, sci_id:, sci_key:, api_id: nil, api_key: nil, test:, logger: nil) + @logger=logger + @paykassa_order = PaykassaOrder.new({domain: domain, sci_id: sci_id, sci_key: sci_key}, logger) if api_id.nil? @paykassa_pay = nil else @paykassa_pay = PaykassaPay.new( domain: domain, api_id: api_id, - api_key: api_key, test: test + api_key: api_key, test: test, logger: logger ) end end def pay(amount: , shop: , currency: , system_name: , paid_commission: "shop", number:, tag:, priority:)