|
Lines 44-50
sub _initialize {
Link Here
|
| 44 |
$user = (@_ ? shift : C4::Context->preference('BakerTaylorUsername') ) || ''; # LL17984 |
44 |
$user = (@_ ? shift : C4::Context->preference('BakerTaylorUsername') ) || ''; # LL17984 |
| 45 |
$pass = (@_ ? shift : C4::Context->preference('BakerTaylorPassword') ) || ''; # CC82349 |
45 |
$pass = (@_ ? shift : C4::Context->preference('BakerTaylorPassword') ) || ''; # CC82349 |
| 46 |
$link_url = (@_ ? shift : C4::Context->preference('BakerTaylorBookstoreURL')); |
46 |
$link_url = (@_ ? shift : C4::Context->preference('BakerTaylorBookstoreURL')); |
| 47 |
$image_url = "http://contentcafe2.btol.com/ContentCafe/Jacket.aspx?UserID=$user&Password=$pass&Options=Y&Return=T&Type=S&Value="; |
47 |
$image_url = "https://contentcafe2.btol.com/ContentCafe/Jacket.aspx?UserID=$user&Password=$pass&Options=Y&Return=T&Type=S&Value="; |
| 48 |
$agent = "Koha/$VERSION [en] (Linux)"; |
48 |
$agent = "Koha/$VERSION [en] (Linux)"; |
| 49 |
#"Mozilla/4.76 [en] (Win98; U)", # if for some reason you want to go stealth, you might prefer this |
49 |
#"Mozilla/4.76 [en] (Win98; U)", # if for some reason you want to go stealth, you might prefer this |
| 50 |
} |
50 |
} |
|
Lines 70-76
sub content_cafe_url {
Link Here
|
| 70 |
($user and $pass) or return; |
70 |
($user and $pass) or return; |
| 71 |
my $isbn = (@_ ? shift : ''); |
71 |
my $isbn = (@_ ? shift : ''); |
| 72 |
$isbn =~ s/(p|-)//g; # sanitize |
72 |
$isbn =~ s/(p|-)//g; # sanitize |
| 73 |
return "http://contentcafe2.btol.com/ContentCafeClient/ContentCafe.aspx?UserID=$user&Password=$pass&Options=Y&ItemKey=$isbn"; |
73 |
return "https://contentcafe2.btol.com/ContentCafeClient/ContentCafe.aspx?UserID=$user&Password=$pass&Options=Y&ItemKey=$isbn"; |
| 74 |
} |
74 |
} |
| 75 |
|
75 |
|
| 76 |
sub http_jacket_link { |
76 |
sub http_jacket_link { |
|
Lines 90-96
sub availability {
Link Here
|
| 90 |
my $isbn = shift or return; |
90 |
my $isbn = shift or return; |
| 91 |
($user and $pass) or return; |
91 |
($user and $pass) or return; |
| 92 |
$isbn =~ s/(p|-)//g; # sanitize |
92 |
$isbn =~ s/(p|-)//g; # sanitize |
| 93 |
my $url = "http://contentcafe2.btol.com/ContentCafe/InventoryAvailability.asmx/CheckInventory?UserID=$user&Password=$pass&Value=$isbn"; |
93 |
my $url = "https://contentcafe2.btol.com/ContentCafe/InventoryAvailability.asmx/CheckInventory?UserID=$user&Password=$pass&Value=$isbn"; |
| 94 |
$debug and warn __PACKAGE__ . " request:\n$url\n"; |
94 |
$debug and warn __PACKAGE__ . " request:\n$url\n"; |
| 95 |
my $content = get($url); |
95 |
my $content = get($url); |
| 96 |
$debug and print STDERR $content, "\n"; |
96 |
$debug and print STDERR $content, "\n"; |