Link to home
Start Free TrialLog in
Avatar of CarolClark
CarolClark

asked on

For prakashk or ozo, please

Michel Plungjan and I have been working on this situation.  He developed some outstanding Javascripts for the order form but we ran into a problem with the email output on this double submit order form and he suggested that I ask either prakashk or ozo to help.

Each of the two outputs (product order email and credit card processing) is controlled by a different cgi script.  I have control over the email script (it's a modified Matt script), but not over the credit card processing script (it's Virtual Merchant's).  At this point, if you fill out the order at www.imagebakers.com/neworder.html and order some merchandise, then click on "Continue to delivery & credit card info", you'll be transferred to the credit card form which will include a listing of your order.  If you then fill out the credit card info (you'll need to use real cc info, but the VM script is a testcgi script so your card wouldn't be charged), the next screen that comes up is one that tells you your card's been authorized, the amount of the authorization, etc. etc. For a brief moment, though, a thankyou.html page comes up (then gets hidden by the cc authorization screen).

Problems:

1. The email output (which goes to orders@imagebakers.com) contains the delivery instructions but not the order itself.

2. The email output has no "From" name.

3.  I'd also love for the rewritten order info on cc.html to all be in the same font instead of two different fonts and two different sizes!

If you want to tackle this, email me at carol@cdclark.com and I'll email you the cgi/Perl script that controls the email output.  Like I said before, I have no control over the VM script (which controls the credit card processing).

Thanks!

Carol
Avatar of Michel Plungjan
Michel Plungjan
Flag of Denmark image

Question is currently being answered offline

Michel
Avatar of clockwatcher
clockwatcher

Michel,

I may have a solution for your perl question-- if things don't work out with whoever's working on it now.  Basically, a script simply acts as the go-between the virtual merchant script and your page.  You call it, it calls the the virtual merchant script, parses the results (if needed-- you may just want to dump the results back to the user), sends out the appropriate email, and displays the results.

You can test out a similar script I wrote for someone else which handles an amazon.com query at:

 http://experts-exchange.yahright.com/10224657/amazon.htm

The following performs a experts-exchange search (the results are pretty much just dumped back to the browser-- you'll notice the addition of the BASE tag and a slight text change):

 http://experts-exchange.yahright.com/10224657/
Avatar of CarolClark

ASKER

Thanks, clockwatcher.  I'll run your comments by the two other people who are working on this.

Carol
Thanks!!

Does it do SSL too?

Michel
clockwatcher, can you contact me at carol@cdclark.com?  We have some questions for you about your script.

Thanks.

Carol
Carol,

Now that Michel has mentioned SSL, doing it with a "bridging" script would kind of ruin the whole point of using SSL-- unless you could place the bridging script under the SSL umbrella as well-- which I'm guessing isn't the case.

But, the script itself can make and handle the SSL request.  It's only a ten liner or so.

Check out the sample out:

http://experts-exchange.yahright.com/imagebakers/neworder.html

Please DO NOT include real credit card information, bogus information is good enough to show you that it is actually submitting the request to VM.  I'm not interested in knowing anyone's credit card info.

Here's the move.pl script that actually does everything.

  use HTTP::Request::Common qw(POST);
  use LWP::UserAgent;
  use CGI;
  $myCGI = new CGI;
  $ua = new LWP::UserAgent;

  print "Content-type: text/html\n\n";
  print "<HTML><BODY><h2>I was sent the follow params:</h2><ol>";
# Create a hash of the retrieved parameters
  foreach ($myCGI->param) {
      $myparams{$_} = $myCGI->param($_);
      print "<li>$_ : ".$myCGI->param($_)."\n";
  }
  print "</ol><hr>";
 
  my $req = POST 'https://www.thevmsecure.com/cgi-bin/remotedemo.cgi', [ %myparams ];
 
  my $page = $ua->request($req)->as_string;
  @entirepage = split("\n{2}|\n\r{2}", $page);
 
  $header = shift(@entirepage);
  $content = join("\n\n", @entirepage);
 
  print "<h2>Here's what Virtual Merchant said:</h2> <dir>".$content."</dir></p>";
 
  print "<hr><h2>If you wanted to send an email out based on the above params you could do it here or earlier</h2>";
 
  print "</body></html>";

----------------------------------------

If you'd like to contact me, you can do so at mark@yahright.com

Excellent show, Mark!

Michel
PS: Damn - it shows 100 in the date field AAAAAAAARRRRRRGGGGGG I am sooooooo embarrased
Oh no I'm not - not my script - I will fix it tho ;-)

Michel
Good night. (morning ???)
ASKER CERTIFIED SOLUTION
Avatar of cadabra
cadabra

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I'd like to give cadabra 400 points, and I'd like to give clockwatcher 400 points.

Thanks.

Carol