mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-04-04 07:09:14 +00:00
add email template to notify hub that auth is required
This commit is contained in:
@@ -7,8 +7,22 @@ class PaymentMailer < Spree::BaseMailer
|
||||
@payment = payment
|
||||
subject = I18n.t('spree.payment_mailer.authorize_payment.subject',
|
||||
distributor: @payment.order.distributor.name)
|
||||
mail(to: payment.order.user.email,
|
||||
from: from_address,
|
||||
subject: subject)
|
||||
I18n.with_locale valid_locale(@payment.order.user) do
|
||||
mail(to: payment.order.user.email,
|
||||
from: from_address,
|
||||
subject: subject)
|
||||
end
|
||||
end
|
||||
|
||||
def authorization_required(payment)
|
||||
@payment = payment
|
||||
shop_owner = @payment.order.distributor.owner
|
||||
subject = I18n.t('spree.payment_mailer.authorization_required.subject',
|
||||
order: @payment.order)
|
||||
I18n.with_locale valid_locale(shop_owner) do
|
||||
mail(to: shop_owner.email,
|
||||
from: from_address,
|
||||
subject: subject)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
= t('spree.payment_mailer.authorization_required.message', order_number: @payment.order.number)
|
||||
= link_to spree.edit_admin_order_url(@payment.order), spree.edit_admin_order_url(@payment.order)
|
||||
@@ -0,0 +1,3 @@
|
||||
= t('spree.payment_mailer.authorization_required.message', order_number: @payment.order.number)
|
||||
|
||||
= link_to spree.edit_admin_order_url(@payment.order), spree.edit_admin_order_url(@payment.order)
|
||||
Reference in New Issue
Block a user