From c16cefef125ae58c46d46387f154670dbc55d29d Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Sun, 3 Dec 2023 09:21:30 +1300 Subject: [PATCH] Remove text version of payment_or_refund notification --- .../Contribute/Form/AdditionalPaymentTest.php | 33 +++-- tests/phpunit/api/v3/PaymentTest.php | 44 ++++--- .../payment_or_refund_notification_text.tpl | 116 ------------------ 3 files changed, 49 insertions(+), 144 deletions(-) diff --git a/tests/phpunit/CRM/Contribute/Form/AdditionalPaymentTest.php b/tests/phpunit/CRM/Contribute/Form/AdditionalPaymentTest.php index 8b63ffd47c..7b25b247a5 100644 --- a/tests/phpunit/CRM/Contribute/Form/AdditionalPaymentTest.php +++ b/tests/phpunit/CRM/Contribute/Form/AdditionalPaymentTest.php @@ -132,13 +132,14 @@ class CRM_Contribute_Form_AdditionalPaymentTest extends CiviUnitTestCase { 'From: site@something.com', 'Dear Anthony,', 'Payment Details', - 'Total Fee: $100.00', - 'This Payment Amount: $70.00', + 'Total Fee', + '$100.00', + 'This Payment Amount', + '$70.00', 'Billing Name and Address', 'Vancouver, BC 1321312', 'Visa', '***********1111', - 'Expires: May 2025', ]); } @@ -215,11 +216,16 @@ class CRM_Contribute_Form_AdditionalPaymentTest extends CiviUnitTestCase { $mut->checkMailLog([ 'Dear Anthony,', 'Below you will find a receipt for this payment.', - 'Total Fee: $100.00', - 'This Payment Amount: $50.00', - 'Balance Owed: $20.00 ', - 'Paid By: Check', - 'Check Number: check-12345', + 'Total Fee', + '$100.00', + 'This Payment Amount', + '$50.00', + 'Balance Owed', + '$20.00', + 'Paid By', + 'Check', + 'Check Number', + 'check-12345', ], [ 'Billing Name and Address', @@ -244,14 +250,15 @@ class CRM_Contribute_Form_AdditionalPaymentTest extends CiviUnitTestCase { $mut->checkMailLog([ 'Below you will find a receipt for this payment.', - 'Total Fee: $100.00', - 'This Payment Amount: $100.00', - 'Paid By: Credit Card', + 'Total Fee', + '$100.00', + 'This Payment Amount', + '$100.00', + 'Paid By', + 'Credit Card', '***********1111', 'Billing Name and Address', 'Vancouver, BC 1321312', - 'Expires: May 2025', - ]); $mut->stop(); $mut->clearMessages(); diff --git a/tests/phpunit/api/v3/PaymentTest.php b/tests/phpunit/api/v3/PaymentTest.php index 7a99e890e4..3996a45be1 100644 --- a/tests/phpunit/api/v3/PaymentTest.php +++ b/tests/phpunit/api/v3/PaymentTest.php @@ -258,14 +258,20 @@ class api_v3_PaymentTest extends CiviUnitTestCase { $mut->checkMailLog([ 'From: "FIXME" ', 'Dear Anthony,', - 'Total Fee: $300.00', - 'This Payment Amount: $50.00', + 'Total Fee', + '$300.00', + 'This Payment Amount', + '$50.00', //150 was paid in the 1st payment. - 'Balance Owed: $100.00', + 'Balance Owed', + '$100.00', 'Event Information and Location', - 'Paid By: Check', - 'Check Number: 345', - 'Transaction Date: August 13th, 2018 5:57 PM', + 'Paid By', + 'Check', + 'Check Number', + '345', + 'Transaction Date', + 'August 13th, 2018 5:57 PM', 'event place', 'streety street', ]); @@ -296,10 +302,13 @@ class api_v3_PaymentTest extends CiviUnitTestCase { 'From: "FIXME" ', 'Dear Anthony,', 'Below you will find a receipt for this payment.', - 'Total Fee: $300.00', - 'Total Paid: $300.00', - 'This Payment Amount: $150.00', - 'Thank you for completing this payment.', + 'Total Fee', + '$300.00', + 'Total Paid', ' + $300.00', + 'This Payment Amount', + '$150.00', + 'Thank you for completing this contribution.', ]); } @@ -347,12 +356,17 @@ class api_v3_PaymentTest extends CiviUnitTestCase { $mut->checkMailLog([ 'Dear Anthony,', 'A refund has been issued based on changes in your registration selections.', - 'Total Fee: $300' . $decimalSeparator . '00', - 'Refund Amount: -$30' . $decimalSeparator . '00', + 'Total Fee', + '$300' . $decimalSeparator . '00', + 'Refund Amount', + '-$30' . $decimalSeparator . '00', 'Event Information and Location', - 'Paid By: Check', - 'Transaction Date: November 13th, 2018 12:01 PM', - 'Total Paid: $170' . $decimalSeparator . '00', + 'Paid By', + 'Check', + 'Transaction Date', + 'November 13th, 2018 12:01 PM', + 'Total Paid', + '$170' . $decimalSeparator . '00', ]); } diff --git a/xml/templates/message_templates/payment_or_refund_notification_text.tpl b/xml/templates/message_templates/payment_or_refund_notification_text.tpl index 96657fddbb..e69de29bb2 100644 --- a/xml/templates/message_templates/payment_or_refund_notification_text.tpl +++ b/xml/templates/message_templates/payment_or_refund_notification_text.tpl @@ -1,116 +0,0 @@ -{if $emailGreeting}{$emailGreeting}, -{/if} - -{if $isRefund} -{ts}A refund has been issued based on changes in your registration selections.{/ts} -{else} -{ts}Below you will find a receipt for this payment.{/ts} -{/if} -{if $paymentsComplete} -{ts}Thank you for completing this payment.{/ts} -{/if} - -{if $isRefund} -=============================================================================== - -{ts}Refund Details{/ts} - -=============================================================================== -{ts}This Refund Amount{/ts}: {$refundAmount|crmMoney:$currency} ------------------------------------------------------------------------------------- - -{else} -=============================================================================== - -{ts}Payment Details{/ts} - -=============================================================================== -{ts}This Payment Amount{/ts}: {$paymentAmount|crmMoney:$currency} ------------------------------------------------------------------------------------- -{/if} -{if $receive_date} -{ts}Transaction Date{/ts}: {$receive_date|crmDate} -{/if} -{if !empty($trxn_id)} -{ts}Transaction #{/ts}: {$trxn_id} -{/if} -{if !empty($paidBy)} -{ts}Paid By{/ts}: {$paidBy} -{/if} -{if !empty($checkNumber)} -{ts}Check Number{/ts}: {$checkNumber} -{/if} - -=============================================================================== - -{ts}Contribution Details{/ts} - -=============================================================================== -{if $totalAmount} -{ts}Total Fee{/ts}: {$totalAmount|crmMoney:$currency} -{/if} -{if $totalPaid} -{ts}Total Paid{/ts}: {$totalPaid|crmMoney:$currency} -{/if} -{if $amountOwed} -{ts}Balance Owed{/ts}: {$amountOwed|crmMoney:$currency} {* This will be zero after final payment. *} -{/if} - - -{if !empty($billingName) || !empty($address)} - -=============================================================================== - -{ts}Billing Name and Address{/ts} - -=============================================================================== -{if !empty($billingName)} -{$billingName} -{/if} -{if !empty($address)} -{$address} -{/if} -{/if} - -{if !empty($credit_card_number)} -=========================================================== -{ts}Credit Card Information{/ts} - -=============================================================================== - -{$credit_card_type} -{$credit_card_number} -{ts}Expires{/ts}: {$credit_card_exp_date|truncate:7:''|crmDate} -{/if} -{if $component eq 'event'} -=============================================================================== - -{ts}Event Information and Location{/ts} - -=============================================================================== - -{$event.event_title} -{$event.event_start_date|crmDate}{if $event.event_end_date}-{if $event.event_end_date|crmDate:"%Y%m%d" == $event.event_start_date|crmDate:"%Y%m%d"}{$event.event_end_date|crmDate:0:1}{else}{$event.event_end_date|crmDate}{/if}{/if} - -{if !empty($event.participant_role)} -{ts}Participant Role{/ts}: {$event.participant_role} -{/if} - -{if !empty($isShowLocation)} -{$location.address.1.display|strip_tags:false} -{/if}{*End of isShowLocation condition*} - -{if !empty($location.phone.1.phone) || !empty($location.email.1.email)} - -{ts}Event Contacts:{/ts} -{foreach from=$location.phone item=phone} -{if $phone.phone} - -{if $phone.phone_type}{$phone.phone_type_display}{else}{ts}Phone{/ts}{/if}: {$phone.phone}{/if} {if $phone.phone_ext} {ts}ext.{/ts} {$phone.phone_ext}{/if} -{/foreach} -{foreach from=$location.email item=eventEmail} -{if $eventEmail.email} - -{ts}Email{/ts}: {$eventEmail.email}{/if}{/foreach} -{/if} -{/if} -- 2.25.1