SOAP::Lite and PayPal API

SOAP::Lite and PayPal API

am 08.03.2008 06:27:13 von fzarabozo

Hello All,

I'd like to know if any of you have successfuly used PayPal API (SOAP) with
SOAP::Lite.

I gave Business::PayPal::API a try but it has several limitations, although
it works. However, that module builds the SOAP::Lite request in a somehow
dirty way. The author actually put a note saying that the module exists only
until he figures out how the support for WSDL in SOAP::Lite works.

Well, I'm having that exact problem: I can't figure it out how the support
for WSDL in SOAP::Lite works with PayPal. I've been reading a lot in the
manual and visited soaplite.com looking for more information, and I
understood a lot of how it works with WSDL, but I'm still stuck with the
PayPal WSDL case. It doesn't seem to work in the same way that soaplite.com
explains. The website has very simple examples, though. The fact is that,
the more I read about SOAP and WSDL, the more I want to get it working. I
find WSDL really amazing in several areas.

According to soaplite.com, this should work:

-------------------------
use strict;
use warnings;
use SOAP::Lite;
use Data::Dumper;

my $soap = new SOAP::Lite
->service('https://www.paypal.com/wsdl/PayPalSvc.wsdl');

$soap->SetExpressCheckout (
OrderTotal => '50',
ReturnURL => 'https://dev.secure.galeza.com/cart.cgi?action=return',
CancelURL => 'https://dev.secure.galeza.com/cart.cgi?action=cancel',
Username => 'my_paypal_sandbox_username',
Password => 'my_paypal_sandbox_password',
Signature => 'my_paypal_sandbox_signature',
Version => '2.0',
);

print Data::Dumper->Dump([\$soap], [qw(PayPalAPI)]);
------------------------

But, I still don't get a clue that tell's me what I'm doing wrong. The call
to Data::Dumper in the example, I'm using it only to analyze what is
happening in the object. It has a '500 Server Error' in every request. In my
experience, PayPal's SOAP server returns 500 server errors only when the
request is not properly built (including wrong headers).

I just don't know if I'm using workng SOAP::Lite, or I'm building wrong my
method call, or I'm sending the wrong way the parameters, or what. So,
please, if any of you have experience with this, I'll really appreciate your
help and comments. I'll really do. :-)

I already got working all I need with the NVP (name-value pairs) API server
(really simple, just backstage HTTP post requests). But I can't get out of
my mind that I want to really understand and get it working with the SOAP
server. I do *not* want to just say 'I didn't get it, let's move on'. I
guess that's something that many of you will understand very well. Others
will take me by crazy. :-)


Thank you all for your time and help.


Best regards,

Paco Zarabozo





_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs