We are using securenetshop.com's Shopping Cart for our site... It
works well, we design our store pages with forms which go to
their site and they maintain the shopping cart and calculate
totals based on hidden vars on our forms and connect with the
cc processing company.
So they have an advanced feature called silent post in which they
SecureNetShop can POST order data to a file on your server. From
their settings page:
The silent post will occur at the end of the ordering
process and will be transparent to the shopper. The Silent Post URL
should point to a CGI script or asp file that can accept url encoded
data.
Example: http://www.mydomain.com/cgi-bin/updatedb.cgi
I wrote a tcl script and built a database table to stuff the vars
into. Here is an excerpt:
# securenetshop silent post return.
set_form_variables 0
if { ![info exists total] } {
set total "-1"
}
if { ![info exists b_fname] } {
set b_fname "No F name"
}
if { ![info exists b_lname] } {
set b_lname "No L name"
}
# etc...
set db [ns_db gethandle]
set insert_statement "insert into ewcart
(b_lname,b_fname, total, pdatetime, #more....)
values ('$b_lname', '$b_fname', '$total', sysdate(), #more...))"
ns_db dml $db $insert_statement
ns_db releasehandle $db
ns_returnredirect "http://www.greatestnetworker.com"
This script works both with form variables from my adp test page
and if I just paste vars into the URL.
Mike at SecureShopNet can do the URL vars/ Form Vars but his test
script (to simulate the silent post) does NOT work. It returns
this header response info:
HTTP/1.0 302 Found
Connection: close
Date: Tue, 18 Sep 2001 13:11:15 GMT
Location:
http://www.greatestnetworker.com/ssnet/ssnet_post.tcl?
total=999&b_lname=OConnor&b_fname=Bob
Server: AOLserver/3.2+ad12
Content-Length: 384
Content-Type: text/html; charset=iso-8859-1
Client-Date: Tue, 18 Sep 2001 12:57:40 GMT
Client-Peer: 208....
MIME-Version: 1.0
Title: Redirection
(DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN")
(HTML)
(HEAD)
(TITLE)Redirection(/TITLE)
(/HEAD)
(BODY)
(H2)Redirection(/H2)
(A
HREF="http://www.greatestnetworker.com/ss_net/ssn_post.tcl?total=999
&b_lname=OConnor&b_fname=Bob")The requested URL has moved here.(/A)
(P ALIGN=RIGHT)(SMALL)(I)AOLserver/3.2+ad12 on
http://www.greatestnetworker.com(/I)(/SMALL)
My AolServer uses Jerry's Virtual Server setup
to redirect from Main to the TGN instance of AOLserver.
Is is possible that the silent post isn't working because of the
redirects? I also have an ns_returnredirect at the end of my code just
to go somewhere so that the serverlog doesn't show an error.
SUMMARY
Mike and I CAN post to this new table with both URL vars and FORM
vars.
SecureShopNet Server Can NOT post.
IS there something I can do so I can get these VARS back from
SecureShopNet?
IF I can, then I can update our database with purchase info and
make the memberships TOTALLY automatic rather than make members
click a link (which they sometimes don't.)
Thank you
-Bob