diff --git a/app/mailers/payment_mailer.rb b/app/mailers/payment_mailer.rb index 97db37e053..0bd1ec6532 100644 --- a/app/mailers/payment_mailer.rb +++ b/app/mailers/payment_mailer.rb @@ -17,12 +17,14 @@ class PaymentMailer < ApplicationMailer def authorization_required(payment) @payment = payment - shop_owner = @payment.order.distributor.owner + @order = @payment.order + shop_owner = @order.distributor.owner subject = I18n.t('spree.payment_mailer.authorization_required.subject', - order: @payment.order) + order: @order) I18n.with_locale valid_locale(shop_owner) do mail(to: shop_owner.email, - subject:) + subject:, + reply_to: @order.email) end end end