From 8d5276803186c1300ea7ed873b94ed458779a0ec Mon Sep 17 00:00:00 2001 From: Du Peng Date: Fri, 26 Aug 2022 14:07:18 +0200 Subject: [PATCH] set operator_profile_id after payment --- app/services/payments/payment_concern.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/services/payments/payment_concern.rb b/app/services/payments/payment_concern.rb index c3b9de1bb..db60263ed 100644 --- a/app/services/payments/payment_concern.rb +++ b/app/services/payments/payment_concern.rb @@ -18,6 +18,7 @@ module Payments::PaymentConcern def payment_success(order, payment_method = '') ActiveRecord::Base.transaction do 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 'wallet' else