Pass on redirect path instead of URL

Fixes https://github.com/openfoodfoundation/openfoodnetwork/issues/2376

The checkout doesn't deal with absolute URLs since
fc2cc09ea5.
This commit is contained in:
Maikel Linke
2018-06-14 16:49:52 +10:00
parent 24c6b940f6
commit 561a73e911

View File

@@ -208,7 +208,7 @@ class CheckoutController < Spree::CheckoutController
payment_method = Spree::PaymentMethod.find(params[:order][:payments_attributes].first[:payment_method_id])
return unless payment_method.kind_of?(Spree::Gateway::PayPalExpress)
render json: {path: spree.paypal_express_url(payment_method_id: payment_method.id)}, status: 200
render json: {path: spree.paypal_express_path(payment_method_id: payment_method.id)}, status: 200
true
end