Prerequisites
- You have installed eCommerce Module v1.1.4 or later. Check out Modules Overview to find out how you can install the latest version.
- You have set up a Basic Payment Form using the Stripe Payment Gateway
Introduction
You can now add details of a customer's Basic Payment Form to Workflow and Autoresponder transactional emails.
Give your Client and the customer peace of mind, as well as valuable records for their safekeeping.
Within the email, you can also access any fields that were submitted along with the original Form. Learn more here: Dynamic Content in Workflow and Autoresponder Emails
Syntax
Add the following Liquid tag to include the details of the customer's most recent Order.
{% include 'ecommerce/payment_details', layout: 'default' %}
In an email notification, this will always be based on the Form that triggered the email. Only an Payment generated by that Form submission will be visible in this context. This means that Autoresponder emails will always show Form Submission data from the correct User.
Layouts
File Structure
You can use an existing Layout, or create a new one in this File Structure:
layouts/modules/module_14/payment/my_layout.liquid
Note: Unlike the similar Order Details Layout, Payment Details is simpler, so there are no wrapper and item files.
Developing the Layout
Inside your email notification file, you'll have access to the Form object:
{{form.properties}}
This contains the fields submitted with the Form. Learn more here: Dynamic Content in Workflow and Autoresponder Emails
You'll still have access to these fields throughout the Payment Details Layouts.
Inside your order_details
Layout you'll find an item.liquid
and wrapper.liquid
file.
Accessing Payment Details
The item.liquid
file will have access to the This object, which will contain details about the Payment:
{{this}}
Within this object, you'll have access to the following fields:
Tag | Description | Example Output |
| Currency code | gbp |
| Currency symbol | £ |
| Amount Paid | 100 |
| Amount Paid Formatted | 1.00 |
| Stripe Payment ID | pi* |