4 # THIS IS FROM CYBERCASH (is there a newer version?)
7 $paymentserverhost = 'localhost';
8 $paymentserverport = 8000;
9 $paymentserversecret = 'two-turntables';
10 use CCLib qw(sendmserver);
12 # first lets fake up some data
13 # use time of day and pid to give me my pretend
15 # you obviously need to get real data from somewhere...
17 $oid = "test$$"; #fake order number.
18 $amount = 'usd 42.42';
19 $ramount = 'usd 24.24';
20 $pan = '4111111111111111';
21 $name = 'John Q. Doe';
22 $addr = '17 Richard Rd.';
30 %result = &sendmserver('mauthcapture',
35 'Card-Address', $addr,
39 'Card-Country', $country,
43 # just dump results to stdout.
44 # you should process them...
45 # to allow results to affect operation of your fulfillment...
47 foreach (keys(%result)) {
48 print " $_ ==> $result{$_}\n";
55 $trans=$result{'MTransactionNumber'};
56 $code=$result{'MRetrievalCode'};
58 %result = &sendmserver('return',
60 'Return-Amount',$ramount,
64 foreach (keys(%result)) {
65 print " $_ ==> $result{$_}\n";