solidusio / solidus_paypal_braintree

⛔️ [Archived] Use solidus_braintree instead!
https://github.com/solidusio/solidus_braintree
BSD 3-Clause "New" or "Revised" License
37 stars 78 forks source link

Products invisible in Admin Order view / Crash in the log #159

Closed mntmn closed 4 years ago

mntmn commented 6 years ago

The first real order just came in in my production shop using solidus_paypal_braintree. But in the admin interface, the "Cart" section of the order does not show any products. The products show up on the "cancel items", though.

The error in the log is ActionView::Template::Error (undefined method 'month' for #<SolidusPaypalBraintree::Source:0x007fa5b89db808>)

I attached the trace: month-crash.log

Versions:

gem 'solidus', '2.5.0.beta2'
gem 'deface'
gem 'solidus_auth_devise', '2.1.0'
gem 'solidus_paypal_braintree', github: 'solidusio/solidus_paypal_braintree', branch: :master
chaumo commented 6 years ago

same issue here after updating to solidus 2.5.0.rc1

octave commented 6 years ago

Same after upgrade to 2.5.0

octave commented 6 years ago

Did anyone find a workaround for this issue?

hefan commented 6 years ago

the reason for this is explained here https://github.com/solidusio/solidus/issues/2512

in short: the payment source does not provide all attributes needed. my workaround is to set dummies for all those fields needed.

SolidusPaypalBraintree::Source.class_eval do

  def name() "Solidus PayPal Braintree" end
  def month() nil end
  def year() nil end
  def card_type() nil end
  def cc_type() nil end
  def gateway_customer_profile_id() nil end
  def gateway_payment_profile_id() nil end

end

but i guess it is fixed in the solidus api master https://github.com/solidusio/solidus/pull/2513/files

octave commented 6 years ago

@hefan Nice thank you for your help!

octave commented 6 years ago

@hefan I have a new error now after upgrading to 2.6.0rc1 when viewing an order in the admin:

ActionView::Template::Error (Missing partial spree/api/payments/source_views/_paypal_braintree with {:locale=>[:en], :formats=>[:json], :variants=>[], :handlers=>[:jbuilder]}

Do you know what could be the reason? Thanks!

octave commented 6 years ago

It seems like the path used to be spree/admin/ instead of spree/api.

octave commented 6 years ago

Same error in solidus_gateway: https://github.com/solidusio/solidus_gateway/issues/81

kennyadsl commented 4 years ago

This has been fixed in a recent change