Merge branch 'fix/localhost-domain-in-refund-emails' into 'master'

Fix localhost domain issue in economically unviable refund emails

See merge request engineering/make-post-sell/make_post_sell!53
This commit is contained in:
Russell Ballestrini 2025-10-03 21:57:12 +00:00
commit 973f82ba59

View file

@ -2144,8 +2144,12 @@ def process_payment(
# Send refund email notification
if crypto_payment.invoice and crypto_payment.invoice.user:
try:
# Create shop context request
email_request = create_shop_context_request(
env_request, crypto_payment
)
send_refund_email(
env_request,
email_request,
crypto_payment.invoice.user.email,
crypto_payment,
refund_details,
@ -2904,8 +2908,12 @@ def process_payment(
# Send refund email notification
if crypto_payment.invoice and crypto_payment.invoice.user:
try:
# Create shop context request
email_request = create_shop_context_request(
env_request, crypto_payment
)
send_refund_email(
env_request,
email_request,
crypto_payment.invoice.user.email,
crypto_payment,
refund_details,
@ -3279,10 +3287,10 @@ def process_refund_confirmations(request, settings):
# Send refund email notification
if payment.invoice and payment.invoice.user:
try:
# Create a basic request object for email context
from pyramid.testing import DummyRequest
email_request = DummyRequest()
email_request.registry = request.registry
# Create shop context request
email_request = create_shop_context_request(
request, payment
)
send_refund_email(
email_request,
payment.invoice.user.email,