Order refund notification needs changing

The email sent to a customer who was refunded via PayPal needs updating.
Screenshot 2026-04-24 113000
How can I update the template so that it says PayPal instead of an unknown credit card?

HI Firstly i would like to as a few questions

  1. Where is your email template stored?
  2. How is the payment method currently referenced in the template?
  3. Do you want PayPal to always show, or only when PayPal was used?
  1. in Shopify
  2. you didn’t see the image I posted?
  3. only when used

I believe this is the part of the code that isn’t working:

{% if transaction.kind == ‘refund’ and transaction.gateway != “shop_offer” %}
{% if transaction.payment_details.credit_card_company %}
{% assign refund_method_title = transaction.payment_details.credit_card_company %}
{% else %}
{% assign refund_method_title = transaction.gateway_display_name %}
{% endif %}