Skip to content
This repository has been archived by the owner on Sep 10, 2019. It is now read-only.

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

Open
sechix opened this issue May 2, 2018 · 3 comments
Open

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

sechix opened this issue May 2, 2018 · 3 comments

Comments

@sechix
Copy link

sechix commented May 2, 2018

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
Copy link

octave commented May 14, 2018

Same error using solidus_paypal_braintree with solidus 2.6.0rc1

@sechix Did you find a workaround? Thanks!

@sechix
Copy link
Author

sechix commented May 15, 2018

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
Copy link

octave commented May 15, 2018

Thanks @sechix! Works fine now 👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants