mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-26 01:33:22 +00:00
Include amount in refund email
This commit is contained in:
@@ -24,6 +24,7 @@ class PaymentMailer < ApplicationMailer
|
||||
def refund_available(payment, taler_order_status_url)
|
||||
@order = payment.order
|
||||
@shop = @order.distributor.name
|
||||
@amount = payment.display_amount
|
||||
@taler_order_status_url = taler_order_status_url
|
||||
|
||||
I18n.with_locale valid_locale(@order.user) do
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
%p= t(".message", shop: @shop)
|
||||
%p= t(".message", shop: @shop, amount: @amount)
|
||||
%p= link_to @taler_order_status_url, @taler_order_status_url
|
||||
|
||||
@@ -468,7 +468,7 @@ en:
|
||||
refund_available:
|
||||
subject: "Refund from %{shop}"
|
||||
message: |
|
||||
Your payment to %{shop} is being refunded.
|
||||
Your payment of %{amount} to %{shop} is being refunded.
|
||||
Accept your refund following the link below.
|
||||
producer_mailer:
|
||||
order_cycle:
|
||||
|
||||
@@ -49,8 +49,8 @@ RSpec.describe PaymentMailer do
|
||||
mail = PaymentMailer.refund_available(payment, link)
|
||||
|
||||
expect(mail.subject).to eq "Refund from Carrot Castle"
|
||||
expect(mail.body).to match "Your payment to Carrot Castle is being refunded."
|
||||
expect(mail.body).to match link
|
||||
expect(mail.body).to include "Your payment of $45.75 to Carrot Castle is being refunded."
|
||||
expect(mail.body).to include link
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user