solidusio / solidus_gateway

A collection of payment methods for Solidus
https://solidus.io
BSD 3-Clause "New" or "Revised" License
45 stars 61 forks source link

Error due to spree/api/payments/source_views #81

Open sechix opened 6 years ago

sechix commented 6 years ago

Steps to reproduce Iam getting error in orders that not load shipment and line items, I realized debugging that gets error because doesn't exist _stripe.json.jbuilder in spree/api/payments/source_views

image

This file 'sources_views' has been created 1 month ago in solidus master.

System configuration Solidus master last version, solidus_stripe

octave commented 6 years ago

Same error using solidus_paypal_braintree with solidus 2.6.0rc1

@sechix Did you find a workaround? Thanks!

sechix commented 6 years ago

Yes, It works for me now with this workaround: I created '_stripe.json.jbuilder' in spree/api/payments/source_views with the same code ,

attrs = [:id, :month, :year, :cc_type, :last_digits, :name] if @current_user_roles.include?("admin") attrs += [:gateway_customer_profile_id, :gateway_payment_profile_id] end

json.(payment_source, *attrs)

Create the same withe braintree instead of stripe

octave commented 6 years ago

Thanks @sechix! Works fine now 👍