Submitted Order Info

Returns transaction information about an order just placed. You should use this on any page specified as the return url for your checkout_form to show the customer success or failure of the order, as well as any other information saved to the order entry. This tag will natively parse ExpressionEngine channel entries variables, so it essentially acts as if it’s a channel entry tag, preset with the entry id of your customers most recent completed or in process order entry.

NOTE: This tag requires that you use an Orders channel. If you do not use an order channel, only the following variables will be parsed by this tag: order_id, cart_total, transaction_id, error_message.

Table of Contents

Variables

error_message

Error message returned by the selected payment gateway. Typically, if any error message is returned, then the order has not completed.

This accursed transaction failed!

transaction_id

The transaction id returned by the selected payment gateway

123424455155

cart_total

The total amount of the purchase that was just made

$129.95

order_id

The entry ID of the order stored in the “orders” channel

1425

Conditionals

{if authorized}

If the transaction completed successfully.

{if authorized}Yay!!!{/if}

{if declined}

If the transaction was declined by the payment gateway.

{if declined}Boo!!!{/if}

{if failed}

If the processing failed.

{if failed}Fail{/if}

Examples

{exp:cartthrob:submitted_order_info}
    {if authorized}
        Your payment is a success!
        Transaction ID: {transaction_id}
        Your total: {cart_total}
        Your order ID: {order_id}
    {if:elseif declined}
        Your credit card was declined: {error_message}
    {if:elseif failed}
        Your payment failed: {error_message}
    {/if}
{/exp:cartthrob:submitted_order_info}