HTML Templates: Show Payment details or Card Information

Hey Folks, 

I'm curious if it's possible to add payment details or card information to the HTML templates for Order Confirmations? I've been pretty successful in converting all of my invoices or receipts to HTML Templates, but I've gotten a few requests from patrons asking about adding payment details like "$100.00 on Visa 1234" or "$75.00 on Check 12345". 

After my meddling, I've only been able to get it to show just "Total Paid: $100.00" 

Any and all help is greatly appreciated!

Katrina
Broadway Rose Theatre Company

  • Would you mind emailing me a copy as well? My email is hoffmans@sigtheatre.org. Thanks!

  • I'd love a copy, please? jordan@sunsetcenter.org

  • I'm a little late to the party. Would you mind sending my way too? mdummerth@centerstage.org Thanks!

  • Hello Katrina,

    I've just started looking into this as well and was wondering if you've found a solution for adding payment details.

  • Hi Ultima, I have unfortunately not found a way to list payment details or payment date :(. Not sure if submitting a help ticket at this point would work? 

  • I'm really new to editing HTML and using C#, so I'll keep poking around. Thanks!

  • I have been locked in the quagmire of HTML templates and would be most interested to see what you have achieved. Any chance you could send me a copy of your HTML templates.  c.lipscombe@grangeparkopera.co.uk

    Thanks

    Carole

  • Former Member
    Former Member $organization in reply to Carole Lipscombe

    Hi Kaley, if you wouldn't mind sending on to me to please? vicky.wormald@royalexchange.co.uk 

    Cheers, Vicky

  • This can help

    Above the HTML, You can use this code block for last 4 CC and its description

    var Payments = Model.OrderProductView.Payments;
    var ccnum="N/A";
    var ccdesc="N/A";
    if(Payments!=null){
    ccnum = Model.OrderProductView.Payments[0].LastFourCreditCardNumber;
    }
        if(Payments!=null){
    ccdesc = Model.OrderProductView.Payments[0].PaymentMethod.AccountType.Description;
    }
  • Hi Troy, 

    Thank you for your reply! I just tried implementing the code in the section of my HTML and it doesn't seem to be taking. I'm not *the best* at HTML, so perhaps I'm missing something. 

    Below is my current code for everyone to copy and edit. 

    Warning: This is a lot of text!

    @*using statement required for access to Constituencies object type when making REST call to CRM/Constituencies*@
    @using Tessitura.Service.Client.CRM;
    <tr>
    <table width="700" style="font-size: 12px; text-align:left; color: #000000; font-family:Arial, Helvetica, sans-serif;">
    <tr>
    <td align="left" valign="top">

    <table style="vertical-align: top;text-align:left">
    <tr>
    <td colspan="2" style="text-align:left">
    <p><h2>Thank you for booking a group to attend Broadway Rose Theatre Company!</p></h2>
    <br><b>Below are your order details.</b><br><br>The total amount, minus your deposit will be charged 30 days prior to the performance.<br>An email reminder will be sent two weeks prior to the due date so you may get the final headcount in order.
    <h3>Group Policy Info:</strong></h3>
    <p><strong><em> The card used to make the deposit will be automatically charged 30 days prior to the performance. Check payments must be recieved 30 days prior to the performance, otherwise the seats will be released and the deposit refunded. Prior to the due date, you may add or subtract tickets, exchange dates, or ask to cancel your booking. After final payment is processed, there are no refunds or exchanges. If a group drops below 10 individuals, the standard single ticket price will apply.&nbsp;</em></strong></p>
    <p>To review the full Broadway Rose Group Information, <a href="">www.broadwayrose.org/groups">click here&nbsp;</a></p>
    <br>If you have any questions at all, please don&rsquo;t hesistate to ask! The box office is open Monday through Friday from noon to 6:00 p.m. at 503.620.5262 or by email at boxoffice@broadwayrose.org. <i>Please do not respond directly to this email address as it is not monitored.</i>
    <p>We look forward to having you all join us at the theatre!</p>
    @{
    var hasConstituent = Model.OrderProductView.Constituent != null;
    var hasAddress = Model.Address != null;
    var hasElectronicAddress = Model.ElectronicAddress != null;
    var hasBooking = Model.Booking != null;
    var isInSpecialConstituency = false;
    var constituencyMessage = Model.GetPropertyValue("ConstituencyMessage") ?? "Thank you for being a part of Friend's Circle!";
    var constituency = Model.GetPropertyValue("Constituency") ?? "FRC";
    var hasState = hasAddress && Model.Address.State != null;
    var hasProducts = Model.OrderProductView.Products != null && Model.OrderProductView.Products.Count > 0;
    }

    @if (hasConstituent)
    {
    var url = "CRM/Constituencies?constituentId=" + Model.OrderProductView.Constituent.Id + "&includeAffiliations=true";
    var constituencies = Model.RestClient.AtUrl(url).Get<Constituencies>().ResponseObject;
    isInSpecialConstituency = constituencies != null && constituencies.Count(x => x.ConstituencyType.ShortDescription == constituency) > 0;
    }

    <table width="700" style="font-size: 12px; text-align:left; color: #000000; font-family:Arial, Helvetica, sans-serif;">
    <tr>
    <td align="left" valign="top">

    <table style="vertical-align: top;text-align:left">
    <tr>
    <td colspan="2" style="text-align:left">
    <h3>Below Are The Order Details</h3>
    <p><h4><i>This confirmation doubles as both your receipt and your invoice.</p></h4></i>
    <b>Order Date:</b> @Model.OrderProductView.OrderDateTime <br />
    <b>Order Number:</b> @Model.OrderProductView.Id<br />
    @if (hasConstituent)
    {
    <b>Customer Number:</b>
    @Model.OrderProductView.Constituent.Id
    <br />
    <br />
    }
    <p style="margin-top: -10px; padding-bottom: 20px;"><small>Please retain this email for your reference.</small></p>
    </td>
    </tr>

    </tr>
    @{
    var state = hasState ? ", " + Model.Address.State.StateCode : "";
    var electronicAddress = hasElectronicAddress ? Model.ElectronicAddress.Address : "";
    }

    <tr>
    <td width="50%" style="padding-bottom: 20px; vertical-align: top;">
    <b>Your Account Information:</b><BR />
    @if (isInSpecialConstituency)
    {
    @constituencyMessage <br />
    }
    @if (hasConstituent)
    {
    @Model.OrderProductView.Constituent.DisplayName <br />
    }
    @if (hasAddress)
    {
    @Model.Address.Street1<br />
    @Model.Address.City@state @Model.Address.PostalCode<br />
    }
    @electronicAddress<br />
    </td>
    <td width="50%" style="padding-bottom: 20px; text-align: left;vertical-align: top">
    <b>Order Shipping Information</b><BR />
    @if (Model.OrderProductView.DeliveryMethod.Id == -1)
    {
    <text> Hold order at Box Office</text><br />
    <i>Please pick up your tickets no later than 30 minutes before curtain</i>
    }
    else if (hasAddress)
    {
    <text>
    @Model.Address.Street1<br />
    @Model.Address.City@state @Model.Address.PostalCode<br />
    </text>
    }


    </td>
    </tr>
    </table>
    </td>
    </tr>
    @if (hasProducts)
    {
    /* PERFORMANCES */
    var perfs = Model.OrderProductView.Products.Where(x => x.ProductClass.Description == "Performance");

    // If the order has performances, loop through them and display them in a table
    if (perfs != null && perfs.Count() > 0)
    {
    <tr>
    <td align="left" valign="top">
    <table align="left" style="font-size: 12px; color: #000000; font-family: Arial, Helvetica, sans-serif;">
    <tr>
    <th style="background-color: #BE1E24; color: #ffffff; font-weight: bold; font-size: 12px; text-align: left; vertical-align: top">
    <b>Performances</b>
    </th>
    </tr>
    <tr>
    <td style="text-align: left; vertical-align: top">
    <table width="700" style="vertical-align: top; text-align: left">
    <tr>
    <th width="250" style="background-color: #FFFFFF ! important; font-size: 11px ! important; font-weight: bold; text-decoration: underline; color: #BE1E24; vertical-align: center; text-align: left">Description</th>
    <th width="110" style="background-color: #FFFFFF ! important; font-size: 11px ! important; font-weight: bold; text-decoration: underline; color: #BE1E24; vertical-align: center; text-align: left">Number of Seats</th>
    <th width="100" style="background-color: #FFFFFF ! important; font-size: 11px ! important; font-weight: bold; text-decoration: underline; color: #BE1E24; vertical-align: top; text-align: left">Seat Location</th>
    <th width="85" style="background-color: #FFFFFF ! important; font-size: 11px ! important; font-weight: bold; text-decoration: underline; color: #BE1E24; vertical-align: top; text-align: right">Price</th>
    <th style="background-color: #FFFFFF ! important; font-size: 11px ! important; font-weight: bold; text-decoration: underline; color: #BE1E24; vertical-align: top; text-align: right">Total</th>
    </tr>

    @{
    var performanceTotal = @perfs.Sum(x => x.Performance.LineItem.TotalDue);
    }

    @foreach (var product in perfs)
    {
    var performance = product.Performance.LineItem.Performance;
    <tr>
    <td>
    @performance.Description<br />
    @performance.Facility.Description<br />
    @performance.PerformanceDateTime
    </td>
    <td style="vertical-align: top; text-align: center">
    @foreach (var group in product.Performance.LineItem.SubLineItems.GroupBy(item => item.PriceType.Description))
    {
    int count = 0;
    foreach (var item in group)
    {
    count = count + 1;
    }
    @count<br/>
    }
    <td style="vertical-align: top">
    @foreach (var subLineItem in product.Performance.LineItem.SubLineItems)
    {
    var seatRow = string.IsNullOrEmpty(subLineItem.Seat.Number) ? "TBD" : subLineItem.Seat.Row + " " + subLineItem.Seat.Number;
    @seatRow<br />
    }
    </td>
    <td style="vertical-align: top; text-align: right">
    @foreach (var subLineItem in product.Performance.LineItem.SubLineItems)
    {
    var amount = string.Format("{0:C}", subLineItem.DueAmount);
    @amount<br />
    }
    </td>
    <td style="vertical-align: top; text-align: right">
    @string.Format("{0:C}", product.Performance.LineItem.TotalDue)
    </td>
    </tr>
    }
    <tr>
    <td colspan="4" style="border-top: 1px solid #BE1E24; color: #6e6d6d; vertical-align: top; text-align: right;">
    <b>Total Single Tickets Cost:</b>
    </td>
    <td style="border-top: 1px solid #BE1E24; color: #6e6d6d; vertical-align: top; text-align: right;">
    <b>@string.Format("{0:C}", performanceTotal)</b>
    </td>
    </tr>
    </table>

    </td>
    </tr>
    </table>
    </td>
    </tr>

    }

    /* PACKAGES */
    var packages = Model.OrderProductView.Products.Where(x => x.ProductClass.Description == "Package");

    // If the order has packages, loop through them and display them in a table
    if (packages != null && packages.Count() > 0)
    {
    <tr>
    <td align="left" valign="top">

    <table align="left" style="font-size: 12px; color: #000000; font-family: Arial, Helvetica, sans-serif;">
    <tr>
    <th style="background-color: #BE1E24; color: #ffffff; font-weight: bold; font-size: 12px; text-align: left; vertical-align: top">
    <b>Packages</b>
    </th>
    </tr>
    <tr>
    <td style="text-align: left; vertical-align: top">
    <table width="700" style="vertical-align: top; text-align: left">
    <tr>
    <th width="255" style="background-color: #FFFFFF ! important; font-size: 11px ! important; font-weight: bold; text-decoration: underline; color: #BE1E24; vertical-align: top; text-align: left">Description</th>
    <th width="150" style="background-color: #FFFFFF ! important; font-size: 11px ! important; font-weight: bold; text-decoration: underline; color: #BE1E24; vertical-align: top; text-align: left">Location</th>
    <th width="100" style="background-color: #FFFFFF ! important; font-size: 11px ! important; font-weight: bold; text-decoration: underline; color: #BE1E24; vertical-align: top; text-align: left">Seat(s)</th>
    <th width="85" style="background-color: #FFFFFF ! important; font-size: 11px ! important; font-weight: bold; text-decoration: underline; color: #BE1E24; vertical-align: top; text-align: left">Price</th>
    <th style="background-color: #FFFFFF ! important; font-size: 11px ! important; font-weight: bold; text-decoration: underline; color: #BE1E24; vertical-align: top; text-align: right">Total</th>
    </tr>
    @{
    var packageTotal = packages.Sum(x => x.Package.LineItems.Sum(y => y.TotalDue));
    }

    @foreach (var product in packages)
    {
    foreach (var lineItem in product.Package.LineItems)
    {
    if (lineItem.Performance == null)
    {
    <tr>
    <td colspan="5" style="text-align: left; vertical-align: top">
    <b>@lineItem.Package.Description</b>
    </td>
    </tr>
    }
    else
    {
    var performance = lineItem.Performance;
    <tr>
    <td>
    @performance.Description<br />
    @performance.Facility.Description<br />
    @performance.PerformanceDateTime
    </td>
    <td style="vertical-align: top">
    @lineItem.SubLineItems[0].Zone.Description
    </td>
    <td style="vertical-align: top">
    @foreach (var subLineItem in lineItem.SubLineItems)
    {
    var seatRow = string.IsNullOrEmpty(subLineItem.Seat.Number) ? "TBD" : subLineItem.Seat.Row + " " + subLineItem.Seat.Number;
    @seatRow<br />
    }
    </td>
    <td style="vertical-align: top; text-align: right">
    @foreach (var subLineItem in lineItem.SubLineItems)
    {
    var amount = string.Format("{0:C}", subLineItem.DueAmount);
    @amount<br />
    }
    </td>
    <td style="vertical-align: top; text-align: right">
    @string.Format("{0:C}", lineItem.TotalDue)
    </td>
    </tr>
    }
    }
    }
    <tr>
    <td colspan="4" style="border-top: 1px solid #BE1E24; color: #6e6d6d; vertical-align: top; text-align: right">
    <b>Total Packages Cost:</b>
    </td>
    <td style="border-top: 1px solid #BE1E24; color: #6e6d6d; text-align: right">
    <b>@string.Format("{0:C}", packageTotal)</b>
    </td>
    </tr>
    </table>
    </td>
    </tr>
    </table>
    </td>
    </tr>
    }

    /* CONTRIBUTIONS */
    var contributions = Model.OrderProductView.Products.Where(x => x.ProductClass.Description == "Contribution");
    var contributionTotal = contributions.Sum(x => x.Contribution.Amount);

    // If the order has contributions, loop through them and display them in a table
    if (contributions != null && contributions.Count() > 0)
    {
    <tr>
    <td align="left" valign="top">

    <table style="font-size: 12px; color: #000000; font-family: Arial, Helvetica, sans-serif;">
    <tr>
    <th style="background-color: #BE1E24; color: #ffffff; font-weight: bold; font-size: 12px; text-align: left; vertical-align: top">
    <b>Contributions</b>
    </th>
    </tr>
    <tr>
    <td style="text-align: left; vertical-align: top">
    <table width="700" style="vertical-align: top; text-align: left">
    <tr>
    <th width="600" style="background-color: #FFFFFF ! important; font-size: 11px ! important; font-weight: bold; text-decoration: underline; color: #BE1E24; text-align: left; vertical-align: top">Description</th>
    <th style="background-color: #FFFFFF ! important; font-size: 11px ! important; font-weight: bold; text-decoration: underline; color: #BE1E24; text-align: right; vertical-align: top">Total</th>
    </tr>
    @foreach (var contribution in contributions)
    {
    <tr>
    <td>
    @contribution.Contribution.Fund.Description
    </td>
    <td style="vertical-align: top; text-align: right">
    @string.Format("{0:C}", contribution.Contribution.Amount)
    </td>
    </tr>
    }
    <tr>
    <td style="border-top: 1px solid #BE1E24; color: #6e6d6d; vertical-align: top; text-align: right">
    <b>Total Contribution Cost:</b>
    </td>
    <td style="border-top: 1px solid #BE1E24; color: #6e6d6d; text-align: right">
    <b>@string.Format("{0:C}", contributionTotal)</b>
    </td>
    </tr>
    </table>
    </td>
    </tr>
    </table>
    </td>
    </tr>
    }

    var memberships = Model.OrderProductView.Products.Where(x => x.ProductClass.Description == "Membership");
    var membershipTotal = memberships.Sum(x => x.Membership.Amount);

    if (memberships != null && memberships.Count() > 0)
    {
    <tr>
    <td align="left" valign="top">

    <table style="font-size: 12px; color: #000000; font-family: Arial, Helvetica, sans-serif; text-align: left">
    <tr>
    <th style="background-color: #BE1E24; color: #ffffff; font-weight: bold; font-size: 12px; text-align: left; vertical-align: top">
    <b>Memberships</b>
    </th>
    </tr>
    <tr>
    <td style="text-align: left; vertical-align: top">
    <table width="700" style="vertical-align: top; text-align: left">
    <tr>
    <th width="600" style="background-color: #FFFFFF ! important; font-size: 11px ! important; font-weight: bold; text-decoration: underline; color: #BE1E24; text-align: left; vertical-align: top">Description</th>
    <th style="background-color: #FFFFFF ! important; font-size: 11px ! important; font-weight: bold; text-decoration: underline; color: #BE1E24; text-align: right; vertical-align: top">Total</th>
    </tr>
    @foreach (var membership in memberships)
    {
    <tr>
    <td>
    @membership.Membership.MembershipLevel.Description
    </td>
    <td style="vertical-align: top; text-align: right">
    @string.Format("{0:C}", membership.Membership.Amount)
    </td>
    </tr>
    }
    <tr>
    <td style="border-top: 1px solid #BE1E24; color: #6e6d6d; vertical-align: top; text-align: right">
    <b>Total Membership Cost:</b>
    </td>
    <td style="border-top: 1px solid #BE1E24; color: #6e6d6d; text-align: right">
    <b>@string.Format("{0:C}", membershipTotal)</b>
    </td>
    </tr>
    </table>
    </td>
    </tr>
    </table>
    </td>
    </tr>
    }

    var giftCertificates = Model.OrderProductView.Products.Where(x => x.ProductClass.Description == "Gift Certificate");
    var giftCertificateTotal = giftCertificates.Sum(x => -x.GiftCertificate.Amount);

    if (giftCertificates != null && giftCertificates.Count() > 0)
    {
    <tr>
    <td align="left" valign="top">

    <table style="font-size: 12px; color: #000000; font-family: Arial, Helvetica, sans-serif; text-align: left">
    <tr>
    <th style="background-color: #BE1E24; color: #ffffff; font-weight: bold; font-size: 12px; text-align: left; vertical-align: top">
    <b>Gift Certificates</b>
    </th>
    </tr>
    <tr>
    <td style="text-align: left; vertical-align: top">
    <table width="700" style="vertical-align: top; text-align: left">
    <tr>
    <th width="600" style="background-color: #FFFFFF ! important; font-size: 11px ! important; font-weight: bold; text-decoration: underline; color: #BE1E24; text-align: left; vertical-align: top">Description</th>
    <th style="background-color: #FFFFFF ! important; font-size: 11px ! important; font-weight: bold; text-decoration: underline; color: #BE1E24; text-align: right; vertical-align: top">Total</th>
    </tr>
    @foreach (var giftCertificate in giftCertificates)
    {
    var amount = -giftCertificate.GiftCertificate.Amount;
    <tr>
    <td>
    Redemption Code: @giftCertificate.GiftCertificate.GiftCertificateNumber
    </td>
    <td style="vertical-align: top; text-align: right">
    @string.Format("{0:C}", amount)
    </td>
    </tr>
    }
    <tr>
    <td style="border-top: 1px solid #BE1E24; color: #6e6d6d; vertical-align: top; text-align: right">
    <b>Total Gift Certificate Cost:</b>
    </td>
    <td style="border-top: 1px solid #BE1E24; color: #6e6d6d; text-align: right">
    <b>@string.Format("{0:C}", giftCertificateTotal)</b>
    </td>
    </tr>
    </table>
    </td>
    </tr>
    </table>
    </td>
    </tr>
    }


    var subTotal = string.Format("{0:C}", Model.OrderProductView.TotalPurchaseAmount + Model.OrderProductView.TotalContributionAmount);

    <tr>
    <td colspan="2">
    <table width="700" style="padding-top: 20px;">
    <tr>
    <td width="600" style="color: #6e6d6d; vertical-align: top; text-align: right">
    <b>Order Subtotal:</b>
    </td>
    <td style="color: #6e6d6d; vertical-align: top; text-align: right">@subTotal</td>
    </tr>
    <tr>
    <td style="color: #6e6d6d; vertical-align: top; text-align: right">
    <b>Total Paid:</b>
    </td>
    <td style="color: #6e6d6d; vertical-align: top; text-align: right">
    <b>@string.Format("{0:C}", Model.OrderProductView.TotalPaidAmount)</b>
    </td>
    </tr>
    <tr>
    </tr>
    </table>
    </td>
    </tr>
    }
    <tr><tr>
    <td width="600" style="color: #6e6d6d; vertical-align: top; text-align: right">
    <p><i>The remaining balance will be charged 30 days prior to the performance.</P></i></tr></td>

  • Using Troy's code block you may need a few @ signs for it to work within your HTML template. The @ccdesc and @ccnum variables use within your html code will output the payment type and account numbers

    @{

    var Payments = Model.OrderProductView.Payments;
    var ccnum="N/A";
    var ccdesc="N/A";
    if(Payments!=null){
    ccnum = Model.OrderProductView.Payments[0].LastFourCreditCardNumber;
    }

    }

        @if(Payments!=null){
    ccdesc = Model.OrderProductView.Payments[0].PaymentMethod.AccountType.Description;
    }

    @ccdesc
    @ccnum

  • Hello Everyone,

    Given the uptick for this, we are currently working on documentation on how to copy an existing template that has this parameter for your organization to use as you are processing refunded orders. We will include the link to these instructions here as well as on our Business Continuity section as soon as possible.

    Thank you,

    Melissa

  • Hi Everyone, 

    A quick update on this - We are working on a new sample HTML template for order confirmations that clearly displays refund details. We anticipate this being a part of our next Service Packs, 15.0.16 and 15.1.9.

    Thanks, 

    Chris Szalaj

    Product Owner, Business Facing Products

    Tessitura Network

  • Hi Katrina,

    I would love to see your code too if possible! megan.morgan@wethecurious.org

  • Hi Katrina, 

    Did you happen to get a good template going?