Hello -
Is anyone out there using an order confirmation template which includes payment dates? Most of our orders contain multiple payments before being paid off entirely, whether it's a partial deposit on a program or a monthly payment plan.
https://www.tessituranetwork.com/Help_System/Content/Recipe%20Books/HTML%20Templates/Payments.htm
^ I'm looking for exactly what we see here, but just with the payment date included somewhere along with the last 4 digits and amount. I haven't had luck figuring this out myself, if someone has a code they could easily copy and paste?
Thank you!
We only show payment due dates from order payment plans... but glancing at it, I believe you could get the order number and use that in a separate call to TXN/Payments?referenceId={referenceId}
Something like:
string paymentURL = "TXN/Payments?referenceId=" + orderNum; var paymentResponse = Model.RestClient.AtUrl(planurl).WithContentType(ContentType.Json).Get<Payments>().ResponseObject;
That returns a payment datetime in the response.
The dynamic content example is useful.
Best,
Ryan
Hi Ryan, thank you! I am also interested in adding payment plan information to the template. I am still in v15 and wondering if this code for payment plans is something you'd mind sharing as well?
Those are available on 15 (we're on 15 too still.)
If you're using multiple plans (our groups only ever have one, so I grab the first plan item), it should be pretty much the same as the example you referenced, except iterating over Model.OrderProductView.PaymentPlans instead of Payments. Something like, e.g.,
@foreach (var p in Model.OrderProductView.PaymentPlans) {
<html tags> @p.AmountDue </html tags>
<html tags> @p.DateDue </html tags>
}
--and perhaps converting to and formatting strings as needed.
Also, I found it immensely helpful to explore the various response objects within OrderProductView when first acquainting myself (and continue to).
Cheers,