I'm interfacing with a payment gateway and not having any luck with Net::SSLeay and its post_https subroutine. The payment gateway has issued me a client certificate that must be used for authentication. The Net::SSLeay perldoc has the following example:
($page, $response, %reply_headers)
= post_https('www.bacus.pt', 443, '/foo.cgi', # 3b
make_headers('Authorization' =>
'Basic ' . MIME::Base64::encode("$user:$pass",'')),
make_form(OK => '1', name => 'Sampo'),
$mime_type6, $path_to_crt7, $path_to_key8);
My own version is below and returns the error Too many arguments for Net::SSLeay::post_https:
#!/usr/bin/perl
use strict;
use warnings;
use Net::SSLeay qw(post_https);
my %post = (
#snip
);
my ($page, $response, %reply_headers) = post_https(
'www.example.com',
443,
'/submit',
'',
make_form(%post),
'text/xml',
'/path/to/cert',
'/path/to/key',
);
Why is this error occurring?