Sha256: 1081f2ec8a99c3876ea1bb926d3d67aa187501d0230ceeb474de1d208ede4abd

Contents?: true

Size: 579 Bytes

Versions: 10

Compression:

Stored size: 579 Bytes

Contents

# frozen_string_literal: true

module SolidusBolt
  module Transactions
    class BaseService < SolidusBolt::BaseService
      attr_reader :payment_method

      def initialize(payment_method:, **args)
        @payment_method = payment_method
        super
      end

      private

      def api_base_url
        payment_method.preferred_bolt_api_url
      end

      def authentication_header
        { 'X-API-KEY' => payment_method.preferred_bolt_api_key }
      end

      def publishable_key
        payment_method.preferred_bolt_publishable_key
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
solidus_bolt-0.7.2 app/services/solidus_bolt/transactions/base_service.rb
solidus_bolt-0.7.1 app/services/solidus_bolt/transactions/base_service.rb
solidus_bolt-0.7.0 app/services/solidus_bolt/transactions/base_service.rb
solidus_bolt-0.6.0 app/services/solidus_bolt/transactions/base_service.rb
solidus_bolt-0.5.0 app/services/solidus_bolt/transactions/base_service.rb
solidus_bolt-0.4.0 app/services/solidus_bolt/transactions/base_service.rb
solidus_bolt-0.3.0 app/services/solidus_bolt/transactions/base_service.rb
solidus_bolt-0.2.0 app/services/solidus_bolt/transactions/base_service.rb
solidus_bolt-0.1.0 app/services/solidus_bolt/transactions/base_service.rb
solidus_bolt-0.0.1 app/services/solidus_bolt/transactions/base_service.rb