From b347917f1fbcda6e635108e88f401a0014cabff5 Mon Sep 17 00:00:00 2001 From: Alessandro Desantis Date: Thu, 31 Jan 2019 15:49:46 +0100 Subject: [PATCH] Add API payment source view for Braintree payments The solidus_paypal_braintree does not provide an API view for their payment sources, which causes errors in the admin panel and when using the API. See https://github.com/solidusio/solidus_paypal_braintree/issues/167. --- .../spree/api/source_views/_paypal_braintree.json.jbuilder | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 app/views/spree/api/source_views/_paypal_braintree.json.jbuilder diff --git a/app/views/spree/api/source_views/_paypal_braintree.json.jbuilder b/app/views/spree/api/source_views/_paypal_braintree.json.jbuilder new file mode 100644 index 00000000..4816b81f --- /dev/null +++ b/app/views/spree/api/source_views/_paypal_braintree.json.jbuilder @@ -0,0 +1,3 @@ +# frozen_string_literal: true + +json.call(payment_source, :id, :token, :created_at)