class Stall::Payments::FakeGatewayPaymentNotification
Attributes
cart[R]
Public Class Methods
new(cart)
click to toggle source
# File lib/stall/payments/fake_gateway_payment_notification.rb, line 6 def initialize(cart) @cart = cart end
Public Instance Methods
params()
click to toggle source
# File lib/stall/payments/fake_gateway_payment_notification.rb, line 10 def params raise 'FakeGatewayPaymentNotification subclasses must define the ' \ '#params method to return a valid notification params hash.' end
raw_post()
click to toggle source
# File lib/stall/payments/fake_gateway_payment_notification.rb, line 15 def raw_post params.to_query end
Private Instance Methods
gateway()
click to toggle source
# File lib/stall/payments/fake_gateway_payment_notification.rb, line 25 def gateway @gateway ||= gateway_class.new(cart) end
gateway_class()
click to toggle source
# File lib/stall/payments/fake_gateway_payment_notification.rb, line 29 def gateway_class @gateway_class ||= Stall::Payments::Gateway.for(cart.payment.payment_method) end
transaction_id()
click to toggle source
# File lib/stall/payments/fake_gateway_payment_notification.rb, line 21 def transaction_id ['FAKE', cart.reference, 0].join('-') end