More namespacing
This commit is contained in:
parent
508461dbc7
commit
6e6b553313
|
@ -1,4 +1,5 @@
|
|||
Spree::CheckoutController.class_eval do
|
||||
module Spree
|
||||
CheckoutController.class_eval do
|
||||
before_filter :redirect_to_paypal_express_form_if_needed, :only => [:update]
|
||||
|
||||
def paypal_checkout
|
||||
|
@ -60,7 +61,7 @@ Spree::CheckoutController.class_eval do
|
|||
if @ppx_details.success?
|
||||
# now save the updated order info
|
||||
|
||||
PaypalAccount.create(:email => @ppx_details.params["payer"],
|
||||
Spree::PaypalAccount.create(:email => @ppx_details.params["payer"],
|
||||
:payer_id => @ppx_details.params["payer_id"],
|
||||
:payer_country => @ppx_details.params["payer_country"],
|
||||
:payer_status => @ppx_details.params["payer_status"])
|
||||
|
@ -121,7 +122,7 @@ Spree::CheckoutController.class_eval do
|
|||
ppx_auth_response = gateway.authorize((@order.total*100).to_i, opts)
|
||||
end
|
||||
|
||||
paypal_account = PaypalAccount.find_by_payer_id(params[:PayerID])
|
||||
paypal_account = Spree::PaypalAccount.find_by_payer_id(params[:PayerID])
|
||||
|
||||
payment = @order.payments.create(
|
||||
:amount => ppx_auth_response.params["gross_amount"].to_f,
|
||||
|
@ -365,4 +366,4 @@ Spree::CheckoutController.class_eval do
|
|||
end
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
class PaypalAccount < ActiveRecord::Base
|
||||
class Spree::PaypalAccount < ActiveRecord::Base
|
||||
has_many :payments, :as => :source
|
||||
|
||||
def actions
|
Loading…
Reference in New Issue