mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-01-19 08:52:25 +01:00
set operator_profile_id after payment
This commit is contained in:
parent
5030f5e1bc
commit
8d52768031
@ -18,6 +18,7 @@ module Payments::PaymentConcern
|
|||||||
def payment_success(order, payment_method = '')
|
def payment_success(order, payment_method = '')
|
||||||
ActiveRecord::Base.transaction do
|
ActiveRecord::Base.transaction do
|
||||||
WalletService.debit_user_wallet(order, order.statistic_profile.user)
|
WalletService.debit_user_wallet(order, order.statistic_profile.user)
|
||||||
|
order.operator_profile_id = order.statistic_profile.user.invoicing_profile.id if order.operator_profile.nil?
|
||||||
order.payment_method = if order.total == order.wallet_amount
|
order.payment_method = if order.total == order.wallet_amount
|
||||||
'wallet'
|
'wallet'
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user