Module: GoogleCheckout

Included in:
Cart
Defined in:
lib/google-checkout.rb,
lib/google-checkout/cart.rb,
lib/google-checkout/command.rb,
lib/google-checkout/notification.rb

Overview

TODO

* Use standard ssl certs

Defined Under Namespace

Classes: APIError, AuthorizationAmountNotification, Cart, ChargeAmountNotification, ChargeOrder, ChargebackAmountNotification, CheckoutRedirect, Command, DeliverOrder, Error, NewOrderNotification, Notification, OrderCommand, OrderStateChangeNotification, RefundAmountNotification, RequestReceived, RiskInformationNotification, SendBuyerMessage

Constant Summary collapse

VERSION =
'0.5.1'
ButtonSizes =

These are the only sizes allowed by Google. These shouldn’t be needed by most people; just specify the :size and :buy_or_checkout options to Cart#checkout_button and the sizes are filled in automatically.

{
  :checkout => {
    :small => { :w => 160, :h => 43 },
    :medium => { :w => 168, :h => 44 },
    :large => { :w => 180, :h => 46 },
  },

  :buy_now => {
    :small => { :w => 117, :h => 48 },
    :medium => { :w => 121, :h => 44 },
    :large => { :w => 121, :h => 44 },
  },
}
@@live_system =
true

Class Method Summary collapse

Class Method Details

.production?Boolean

Returns:

  • (Boolean)


55
56
57
# File 'lib/google-checkout.rb', line 55

def self.production?
  @@live_system
end

.sandbox?Boolean

Returns:

  • (Boolean)


51
52
53
# File 'lib/google-checkout.rb', line 51

def self.sandbox?
  !@@live_system
end

.use_productionObject

The default.



47
48
49
# File 'lib/google-checkout.rb', line 47

def self.use_production
  @@live_system = true
end

.use_sandboxObject

Submit commands to the Google Checkout test servers.



40
41
42
# File 'lib/google-checkout.rb', line 40

def self.use_sandbox
  @@live_system = false
end