STRACT: PayPal Permissions
use strict;
use warnings;
use Carp qw/croak/;
use LWP::UserAgent;
use JSON;
use URI::Escape 'uri_escape';
use MIME::Base64 'encode_base64';
use Digest::HMAC_SHA1 'hmac_sha1
fault_header( 'X-PAYPAL-REQUEST-DATA-FORMAT', 'JSON' )
; ## JSON is more readable
$ua->default_header( 'X-PAYPAL-RESPONSE-DATA-FORMAT', 'JSON' );
$ua->default_header( 'X-PAYPAL-APPLIC
sions",
Content => encode_json( \%x ) );
return { error => [ { message => $res->status_line } ] }
unless $res->is_success;
my $data = decode_json( $res->content );
return $da