Found out that another cookie called roia_cookie was needed. I added this code to the attached plugin:
$roia="";
if(isset($_COOKIE['roia_cookie']))
$roia = $_COOKIE['roia_cookie'];
else
return true;
Part of the message is hidden for the guests. Please log in or register to see it.
and added this to my thank-you page (after making my thank-you page my new return page):
<script type="text/javascript">document.write('<input type="hidden" name="roia" value="' + roia_cookie + '">')</script>
(I also learned that my editor strips off script tags

)
This script is in one of my modules to create the cookie:
<!--ROIA #1205-->
<script type="text/javascript">/*<![CDATA[*/
(function(D,u,q,i,p,c){if(D.cookie){q=D.cookie.split(';');for(i=0;i<q.length;++i)
{p=q[i].split('=',2);if(/^\s*roia1205$/.test(p[0])){c=p[1];break;}}}
if(c){u+=(u.indexOf('?')==-1?'?':';')+'_roia_js_cookie='+c;}
D.write('<'+'script type="text/javascript" src="http'+(/^https:/.test(D.URL)?'s':'')+'://'+u+'"></'+'script>');
})(document,'net.performance-based.com/j/1205');
/*]]>*/</script>
<!--/ROIA #1205-->
My logic must be flawed. i don't think the cookies are persisting through the authorize transaction to the thank you page.
I am trying to figure this out but my skills are nada.
P.S.
This error is on all my pages at the top. Will it go away when this is all done?
Notice: Undefined index: QUERY_STRING in /hermes/bosweb25b/b706/ipg.heatmisersavescom/libraries/joomla/environment/uri.php on line 161