Closed cnight closed 12 years ago
Is this class supposed to be defined in ActiveMerchant? Is it one of ours?
Looks like it's from ActiveMerchant. Is that the exact error you're getting? Perhaps we're not requiring whatever defines this constant.
Yes it is certainly some type of loading issue. Here is the error in spree_core-1.0.0/app/views/spree/admin/payments/_list.html.erb:
ActionView::Template::Error (undefined class/module ActiveMerchant::Billing::PaypalExpressResponse): 13:
I was able to fix this error by adding the following line to one of the controller decorators (doesnt seem like the right place to put it, but it works):
require 'active_merchant/billing/gateways/paypal/paypal_express_response'
I would recommend that you create a new file in config/initializers
in the gem (as it is an engine, so this will work) called paypal_express.rb
and put this line in it:
require 'active_merchant/billing/gateways/paypal_express'
This will require the necessary components and should fix the error. Once you've validated that it's fixed it, please submit it as a pull request and I'll look at merging it. Keep in mind that it's getting late here, so I may do it tonight or it may wait until tomorrow.
It depends on the scotch intake.
Will do.
Just about time for valentines beers here too ;)
Error when trying to access order/payments in admin:
undefined class/module ActiveMerchant::Billing::PaypalExpressResponse
To recreate, simply restart the spree site and try to view payment on a paypal express payment in the admin without first doing an order checkout using paypal express. The error disappears once you do a checkout in the store using paypal express.
This looks like a required class is not being loaded in the admin but is being loaded in the checkout process.