Skip to content

Instantly share code, notes, and snippets.

@joelbradbury
Created November 14, 2013 15:00
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joelbradbury/4d458d4b8c7c8c308389 to your computer and use it in GitHub Desktop.
Save joelbradbury/4d458d4b8c7c8c308389 to your computer and use it in GitHub Desktop.
Charge for Craft, success template
{% extends "_layout" %}
{% set hash = craft.request.getSegment(3) %}
{% if charge is not defined %}
{% set charge = craft.charge.charges.hash(hash).first() %}
{% endif %}
<h2>Success</h2>
<p>Payment Taken</p>
{% if charge is defined %}
<div class="well">
<h2>Payment of {{ charge.formatPlanAmount() }}</h2>
<p>From : {{ charge.customerName }} , {{ charge.customerEmail }}</p>
<p>{{ charge.formatPlanAmount }}, {{ charge.formatCard() }}</p>
</div>
{% endif %}
@wjthomas9
Copy link

Craft doesn't seem to be liking the hash in the last segment, so I had to change it to a url query parameter. Should that be ok?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment