0
我想请求标记为新的REST API使用Perl的净:: SSLeay的(我的提供商只支持的Net :: SSLeay的,像NET模块令牌请求::贝宝不安装),但请求失败。我究竟做错了什么?特别是我不知道,热设置'grant_type'...用Perl的净:: SSLeay的
use Net::SSLeay qw(get_https make_form make_headers post_https);
use MIME::Base64;
use strict;
my $site = "api.sandbox.paypal.com";
my $port = "443";
my $path = "/v1/oauth2/token?grant_type=client_credentials";
my $uname = "my_client_id";
my $password = "my_secret";
$uname = encode_base64($uname);
$password = encode_base64($password);
my $cred = "Basic $uname:$password";
my ($page, $result, %headers) = post_https($site, $port, $path, make_headers(
'Accept'=>"application/json",
'Accept-Language'=>"en_US",
'Authorization'=>"$cred"
));
在这里有人可以帮助吗?
最好的问候, 拉尔斯
请显示错误代码! – fedorqui 2013-03-16 22:14:55