Sha256: 51182d38a43e413156a69484b1757791ecaef0b7a3af25f54eabd2fb516c96e9

Contents?: true

Size: 1.45 KB

Versions: 1

Compression:

Stored size: 1.45 KB

Contents

require "pagseguro/version"
require "hashie"
require "active_support/core_ext/string/inflections"
require "active_support/core_ext/module/delegation"
require "active_support/core_ext/hash/reverse_merge"
require "active_support/core_ext/string/conversions"
require "active_support/core_ext/object/json"

module PagSeguro
  autoload :API,            "pagseguro/api"
  autoload :Base,           "pagseguro/base"
  autoload :Subscriptions,  "pagseguro/subscriptions"
  autoload :PaymentOrders,  "pagseguro/payment_orders"
  autoload :Sessions,       "pagseguro/sessions"
  autoload :Plans,          "pagseguro/plans"
  autoload :Authorizations, "pagseguro/authorizations"
  autoload :Checkout,       "pagseguro/checkout"
  autoload :Transactions,   "pagseguro/transactions"
  autoload :Response,       "pagseguro/response"

  FORMATS = {
    json: "application/vnd.pagseguro.com.br.v3+json;charset=ISO-8859-1",
    xml: "application/xml;charset=ISO-8859-1"
  }

  class << self
    attr_accessor :token
    attr_accessor :email
    attr_accessor :app_id
    attr_accessor :app_key
    attr_accessor :environment
  end

  def self.configure(&block)
    instance_eval(&block)
  end

  def self.uris
    @uris ||= {
      production: {
        api: "https://ws.pagseguro.uol.com.br",
        site: "https://pagseguro.uol.com.br"
      },
      sandbox: {
        site: "https://sandbox.pagseguro.uol.com.br",
        api:  "https://ws.sandbox.pagseguro.uol.com.br"
      }
    }
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
pagseguro_next-0.1.0 lib/pagseguro.rb