From 10166117797ce68e21619bdada9db943ebd85586 Mon Sep 17 00:00:00 2001 From: Seamus Lee Date: Wed, 30 Oct 2019 06:24:06 +1100 Subject: [PATCH] dev/core#1344 Fix logic for displaying BillingName and Credit Card Details in email Receipts --- tests/phpunit/api/v3/ContributionTest.php | 2 -- .../contribution_online_receipt_html.tpl | 16 +++++++--------- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/tests/phpunit/api/v3/ContributionTest.php b/tests/phpunit/api/v3/ContributionTest.php index 5e9e5f820d..c61e89182e 100644 --- a/tests/phpunit/api/v3/ContributionTest.php +++ b/tests/phpunit/api/v3/ContributionTest.php @@ -3450,8 +3450,6 @@ class api_v3_ContributionTest extends CiviUnitTestCase { 'payment_processor_id' => $this->paymentProcessorID, ]); $mut->checkMailLog([ - // credit card header - 'Credit Card Information', // billing header 'Billing Name and Address', // billing name diff --git a/xml/templates/message_templates/contribution_online_receipt_html.tpl b/xml/templates/message_templates/contribution_online_receipt_html.tpl index 1bf1802538..dfade862ed 100644 --- a/xml/templates/message_templates/contribution_online_receipt_html.tpl +++ b/xml/templates/message_templates/contribution_online_receipt_html.tpl @@ -311,35 +311,33 @@ {/if} - {if ! ($contributeMode eq 'notify' OR $contributeMode eq 'directIPN') and $is_monetary} - {if $is_pay_later && !$isBillingAddressRequiredForPayLater} + {if $billingName} - {ts}Registered Email{/ts} + {ts}Billing Name and Address{/ts} + {$billingName}
+ {$address|nl2br}
{$email} - {elseif $amount GT 0} + {elseif $email} - {ts}Billing Name and Address{/ts} + {ts}Registered Email{/ts} - {$billingName}
- {$address|nl2br}
{$email} - {/if} {/if} - {if $contributeMode eq 'direct' AND !$is_pay_later AND $amount GT 0} + {if $credit_card_type} {ts}Credit Card Information{/ts} -- 2.25.1