#!/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 );