I am trying to send some xml to a server for credit card verification using perl.
I'm using LWP::UserAgent and running it from the command line in Linux.
I continually get this error -
500 Can't connect to MERCHANTassword-test.submission.com:443 (Bad hostname 'MERCHANTassword-test.bibit.com' at submission.pl line 48.
AT first I thought this was due to trying to send it via https so I made sure the these modules were installed -
use Crypt::SSLeay;
use LWP::Protocol::https;
use Crypt::SSLeay::CTX;
use Crypt::SSLeay::Conn;
use Crypt::SSLeay::X509;
use HTTP::Request::Common;

Here is the bit of code. I am behind a proxy by the way. Does anybody have any ideas about this?


# post xml
my $ua = LWP::UserAgent->new;
$ua->protocols_allowed( [ 'http', 'https'] );
$ua->proxy([qw( 'https', 'http' )], 'http://wwwcache.nottingham.ac.uk:1111);
my $response =$ua->post($url, [ 'name' => $xml ]);

if (!$response->is_success) {
# this is line 48 by the way
   die $response->status_line;

#Displays the response on screen in a text area for review
print "Remote Site : $url<br /><hr />";
print "<textarea cols=140 rows=20>$response</textarea><hr/>";