Forum OpenACS Development: Re: Pay Pal

8: Re: Pay Pal (response to 1)
Posted by Andrew Grumet on
More sample code here:

Also, I looked at IPN enough to get working code, below:
set form [ns_conn form]

for {set i 0} {$i < [ns_set size $form]} {incr i} {
    set key [ns_set key $form $i]
    set value [ns_set value $form $i]
    ns_log Notice "ipn: $key=$value"

set qsset [ns_set copy [ns_conn form]]
ns_set put $qsset cmd "_notify-validate"
set results [ns_httppost "" $qsset]

ns_set free $qsset

ns_log Notice "ipn: results=$results"

ns_return 200 text/plain done