By putting in a url like: http://www.mysite.com/index.php?page=mypaypalreturnpage (note, internal pretty urls won't work here), you can then trap the status information, the transaction ID and whatever other information Paypal sends back either via GET or via POST.
Here's my simple little test page that displays the result information:
Code: Select all
<table>
{foreach from=$smarty.request key='key' item='value'}
<tr>
<td>{$key}</td><td>{$value}</td>
</tr>
{/foreach}
</table>
page test_return
tx 7BF799858W276125D
st Completed
amt 20.00
cc CAD
cm
item_number
sig K64sVryvATBv/nd6eZcPuR0aQZC3Fcl1Hh/o112gYNfAyXeopAmOlwgrCOpo5Fe0AnAzpHtFeY1Ungw6+j/kgvaupTEMOOXMmmtDpoHwAk7iB3KOikOsrRLDFkfDSVJgxvcRi05fQhTTLHqNW/iiaLJIfdqWOBOex/bpA1GtOJE=
CMSSESSIDdf3a8d9c 46h0cm948uii8l3i2qdihu7sc6
__utma 242930624.216378756.1206634449.1206634449.1206634449.1
__utmc 242930624.1
__utmz 242930624.1206634449.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)
CMSSESSID548057e9 vp39dv039u0hnednmo36550kn7
Notice the status, the amount, signature and other variables that are availalbe for doing certain logic.
i.e: You could put some logic like this into your return page
Code: Select all
{if isset($smarty.get.st) && $smarty.get.st == 'Completed'}
Thank you very much, your order will be processed within the next one to two business days
{else}
Was there a problem with your transaction?
{/if}
Next I'm gonna work with the link that you can also get when creating a button, and see if I can integrate that with formbuilder.