Sha256: d5994d3f7e6ddc978b3b3a0dbef52c2e2ba2e71da5e0af557d5734d9f9f028d6
Contents?: true
Size: 592 Bytes
Versions: 7
Compression:
Stored size: 592 Bytes
Contents
# frozen_string_literal: true module SolidusPaypalCommercePlatform class PaypalOrdersController < ::Spree::Api::BaseController before_action :load_payment_method skip_before_action :authenticate_user def show authorize! :show, @order, order_token order_request = @payment_method.gateway.create_order(@order, @payment_method.auto_capture?) render json: order_request, status: order_request.status_code end private def load_payment_method @payment_method = ::Spree::PaymentMethod.find(params.require(:payment_method_id)) end end end
Version data entries
7 entries across 7 versions & 1 rubygems