Sha256: 17c5d53b99cb63bf51bf7f181e6fc5ba808bc545eacae0a9ae9c3e9350a8fcf7

Contents?: true

Size: 863 Bytes

Versions: 6

Compression:

Stored size: 863 Bytes

Contents

module Killbill #:nodoc:
  module <%= class_name %> #:nodoc:
    class <%= class_name %>PaymentMethod < ::Killbill::Plugin::ActiveMerchant::ActiveRecord::PaymentMethod

      self.table_name = '<%= identifier %>_payment_methods'

      def self.from_response(kb_account_id, kb_payment_method_id, kb_tenant_id, cc_or_token, response, options, extra_params = {})
        super(kb_account_id,
              kb_payment_method_id,
              kb_tenant_id,
              cc_or_token,
              response,
              options,
              {
                  # Pass custom key/values here
                  #:params_id => extract(response, 'id'),
                  #:params_card_id => extract(response, 'card', 'id')
              }.merge!(extra_params),
              ::Killbill::<%= class_name %>::<%= class_name %>PaymentMethod)
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
killbill-3.1.7 generators/active_merchant/templates/lib/models/payment_method.rb
killbill-3.1.6 generators/active_merchant/templates/lib/models/payment_method.rb
killbill-3.1.5 generators/active_merchant/templates/lib/models/payment_method.rb
killbill-3.1.4 generators/active_merchant/templates/lib/models/payment_method.rb
killbill-3.1.3 generators/active_merchant/templates/lib/models/payment_method.rb
killbill-3.1.2 generators/active_merchant/templates/lib/models/payment_method.rb