1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-01-18 07:52:23 +01:00

(bug) unable to confirm payment of store for admin

This commit is contained in:
Du Peng 2023-07-10 13:49:39 +02:00
parent 390cf72ddf
commit 1ff61c9380
3 changed files with 4 additions and 4 deletions

View File

@ -1,5 +1,7 @@
# Changelog Fab-manager
- Fix a bug: unable to confirm payment of store for admin
## v6.0.9 2023 July 07
- Fix a bug: unable to show project step image in markdown file

View File

@ -31,7 +31,7 @@ class API::CheckoutController < API::APIController
def confirm_payment
authorize @current_order, policy_class: CheckoutPolicy
res = Checkout::PaymentService.new.confirm_payment(@current_order, current_user, params[:coupon_code], params[:payment_id])
res = Checkout::PaymentService.new.confirm_payment(@current_order, params[:coupon_code], params[:payment_id])
render json: res
rescue StandardError => e
render json: e, status: :unprocessable_entity

View File

@ -29,9 +29,7 @@ class Checkout::PaymentService
end
end
def confirm_payment(order, operator, coupon_code, payment_id = '')
return unless operator.member?
def confirm_payment(order, coupon_code, payment_id = '')
if Stripe::Helper.enabled?
Payments::StripeService.new.confirm_payment(order, coupon_code, payment_id)
elsif PayZen::Helper.enabled?