fix typo, additional comment
[Biblio-SIP2.git] / sc-emulator.pl
1 #!/usr/bin/perl
2
3 use warnings;
4 use strict;
5
6 our $user     = 'sip2-user';
7 our $password = 'sip2-passwd';
8 our $patron   = 200000000042;
9 our $barcode  = 1302029710;
10 our $loc      = 'FFZG';
11
12 require 'config.pl' if -e 'config.pl';
13
14 use lib 'lib';
15 use SIP2::SC;
16
17 my $sc = SIP2::SC->new( $ENV{ACS} || '10.60.0.251:6001' );
18
19 # login
20 $sc->message("9300CN$user|CO$password|");
21
22 # SC Status
23 $sc->message("9900302.00");
24
25 # Patron Information
26 $sc->message("6300020091214    085452          AO$loc|AA$patron|AC$password|");
27
28 # Checkout
29 $sc->message("11YN20091214    124436                  AO$loc|AA$patron|AB$barcode|AC$password|BON|BIN|");
30
31 # Checkin
32 $sc->message("09N20091214    08142820091214    081428AP|AO$loc|AB$barcode|AC|BIN|");
33
34
35 # checkout - invalid barcode
36 $sc->message("09N20091216    15320820091216    153208AP|AOFFZG|AB200903160190|ACviva2koha|BIN|");
37
38 # status
39 $sc->message("9900302.00");
40