Sha256: a0eed8f3b0ac619029f555f5324fddd1d6eeac520a8e923f23cc40e71ddf91e5

Contents?: true

Size: 1.14 KB

Versions: 12

Compression:

Stored size: 1.14 KB

Contents

module ActiveMerchant #:nodoc:
  module Billing #:nodoc:
    class EpsilonGmoIdGateway < EpsilonBaseGateway
      PATHS = {
        purchase:                'receive_order_gmo2.cgi',
        void:                    'cancel_payment.cgi',
      }.freeze

      def purchase(amount, detail = {})
        params = {
          contract_code: self.contract_code,
          user_id: detail[:user_id],
          user_name: detail[:user_name],
          user_mail_add: detail[:user_email],
          item_code: detail[:item_code],
          item_name: detail[:item_name],
          order_number: detail[:order_number],
          st_code: '10000-0000-00000-00000-00000-00000-00000',
          mission_code: EpsilonMissionCode::PURCHASE,
          item_price: amount,
          process_code: EpsilonProcessCode::REGISTERED,
          gmo_id: detail[:gmo_id],
          gmo_card_id: detail[:gmo_card_id],
        }

        commit(PATHS[:purchase], params)
      end

      def void(order_number)
        params = {
          contract_code: self.contract_code,
          order_number:  order_number,
        }

        commit(PATHS[:void], params)
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
active_merchant-epsilon-0.14.0 lib/active_merchant/billing/gateways/epsilon_gmo_id.rb
active_merchant-epsilon-0.13.0 lib/active_merchant/billing/gateways/epsilon_gmo_id.rb
active_merchant-epsilon-0.12.0 lib/active_merchant/billing/gateways/epsilon_gmo_id.rb
active_merchant-epsilon-0.11.0 lib/active_merchant/billing/gateways/epsilon_gmo_id.rb
active_merchant-epsilon-0.10.0 lib/active_merchant/billing/gateways/epsilon_gmo_id.rb
active_merchant-epsilon-0.9.4 lib/active_merchant/billing/gateways/epsilon_gmo_id.rb
active_merchant-epsilon-0.9.3 lib/active_merchant/billing/gateways/epsilon_gmo_id.rb
active_merchant-epsilon-0.9.2 lib/active_merchant/billing/gateways/epsilon_gmo_id.rb
active_merchant-epsilon-0.9.1 lib/active_merchant/billing/gateways/epsilon_gmo_id.rb
active_merchant-epsilon-0.9.0 lib/active_merchant/billing/gateways/epsilon_gmo_id.rb
active_merchant-epsilon-0.8.1 lib/active_merchant/billing/gateways/epsilon_gmo_id.rb
active_merchant-epsilon-0.8.0 lib/active_merchant/billing/gateways/epsilon_gmo_id.rb