Sha256: 0535b14ad58d0c86c41830a55eab488f4418ff96e0600e06880ca4ec46d1d133
Contents?: true
Size: 524 Bytes
Versions: 1
Compression:
Stored size: 524 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 render json: @payment_method.gateway.create_order(@order, @payment_method.auto_capture), status: :ok end private def load_payment_method @payment_method = ::Spree::PaymentMethod.find(params[:payment_method_id]) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
solidus_paypal_commerce_platform-0.0.1 | app/controllers/solidus_paypal_commerce_platform/paypal_orders_controller.rb |