PaymentDetails => {
endpoint => 'https://svcs.paypal.com/AdaptivePayments',
soapaction => 'urn:PaymentDetails',
namespace => 'http://svcs.paypal.com/services',
parameters => [
SOAP::Data->new(name => 'PaymentDetailsRequest', type => 'ap:PaymentDetailsRequest', attr => {}),
],
},
####
####
#!/usr/bin/perl
use warnings;
use strict;
use HTTP::Request::Common;
use LWP::UserAgent;
my $user = '';
my $password = '';
my $signature = '';
my $application_id = ''
my $url = 'https://svcs.sandbox.paypal.com/AdaptivePayments/PaymentDetails';
my $ua = LWP::UserAgent->new();
my $headers = HTTP::Headers->new(
'X-PAYPAL-SECURITY-USERID' => $user,
'X-PAYPAL-SECURITY-PASSWORD' => $password,
'X-PAYPAL-SECURITY-SIGNATURE' => $signature,
'X-PAYPAL-APPLICATION-ID' => $application_id,
'X-PAYPAL-MESSAGE-PROTOCOL' => 'SOAP11');
my $format = '%s' x 8;
my $content = sprintf( $format,
'',
'',
'',
'en_US',
'AP-xxxxxxxxxxxxx',
'',
'',
'');
my $request = HTTP::Request->new( 'POST', $url, $headers, $content );
my $response = $ua->request( $request );
print $response->status_line, "\n";
####
#!/usr/bin/perl
use warnings;
use strict;
use SOAP::Lite;
my $xmlns = 'http://svcs.paypal.com/services';
my $endpoint = 'https://svcs.sandbox.paypal.com/AdaptivePayments/';
my $soapaction = 'urn:PaymentDetails';
my $method = 'PaymentDetails';
my $user = '';
my $password = '';
my $signature = '';
my $application_id = '';
my $pp = SOAP::Lite->new( uri => $soapaction, proxy => $endpoint );
my $header = SOAP::Header->name( '' =>
SOAP::Data->name( 'X-PAYPAL-SECURITY-USERID' => $user ),
SOAP::Data->name( 'X-PAYPAL-SECURITY-PASSWORD' => $password ),
SOAP::Data->name( 'X-PAYPAL-SECURITY-SIGNATURE' => $signature ),
SOAP::Data->name( 'X-PAYPAL-APPLICATION-ID' => $application_id ),
SOAP::Data->name( 'X-PAYPAL-MESSAGE-PROTOCOL' => 'SOAP11' ),
);
my $request = SOAP::Data->new( name => 'PaymentDetailsRequest',
type => 'ap:PaymentDetailsRequest',
attr => {}
);
my $response = $pp->call( $header, $request );