{source}
<?php
use Joomla\CMS\Factory;
$JInput = JFactory::getApplication()->input;
$txn_id = $JInput->get('txn_id','','string');
$item_number= $JInput->get('item_number','','string');
$status = $JInput->get('st','','string');
if ($txn_id != '' && $status == 'Completed') {
$db = Factory::getDBO();
$sql = $db->getQuery(true);
$sql = "SELECT id, params FROM #__convertforms_conversions WHERE JSON_UNQUOTE(JSON_EXTRACT(params, '$.item_number')) = ".$db->quote($item_number);
$db->setQuery($sql);
$row = $db->loadObject();
$params = json_decode($row->params);
$params->txn_id = $txn_id;
$u = new \stdClass();
$u->id = $row->id;
$u->params = json_encode($params);
$u->state = 1;
$update = Factory::getDBO()->updateObject("#__convertforms_conversions", $u, "id");
//DISPLAY A MESSAGE TO YOUR USER HERE
}
?>
{source}
Thank you for joining our training weekend.
With completion of your Paypal transaction, a receipt for your training camp has been emailed to you. If your payment was with your Paypal account you may log into your account at www.paypal.com/ca to view details of this transaction. If you paid with a credit card the name on the statement will be OttawaOC.
****************************************************************
Merci d'avoirjoindre notre training weekend
Une fois votre transaction Paypal effectuée, un reçu pour votre achat vous a été envoyé par e-mail. Si vous avez payé avec votre compte Paypal, vous pouvez vous connecter à votre compte sur www.paypal.com/ca pour consulter les détails de cette transaction. Si vous avez payé par carte de crédit, le nom figurant sur le relevé sera OttawaOC.