Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options

500 timeout on paypal module

by bigup401 (Pilgrim)
on Nov 04, 2018 at 18:51 UTC ( #1225214=perlquestion: print w/replies, xml ) Need Help??

bigup401 has asked for the wisdom of the Perl Monks concerning the following question:

500 read timeout at Business/PayPal/ line 164.: /usr/home/bigup401/public_html/prod/ localhost Sun Nov 04 13:44:13 2018 error pid 17698 mod_cgi.c(175): client AH01215: Sun Nov 4 13:44:13 2018 at line 21.: /usr/home/bigup401/public_html/prod/

use Business::PayPal::API::TransactionSearch; use Data::Dumper; $ENV{'PERL_LWP_SSL_VERIFY_HOSTNAME'} = 0; my $pp = Business::PayPal::API::TransactionSearch->new( Username => 'username', Password => 'password', CertFile => 'paypal_cert_key_pem.txt', KeyFile => 'paypal_cert_key_pem.txt', sandbox => 0, timeout => 5 ); $transid = '98832432992384234'; my $transactions = $pp->TransactionSearch( TransactionID => $transid ); print "Content-type: text/html\n\n"; for my $rec ( @$transactions ) { print "Record:\n"; print "TransactionID: " . $rec->{TransactionID} . "\n"; print "Payer Email: " . $rec->{Payer} . "\n"; print "Amount: " . $rec->{GrossAmount} . "\n\n"; print "Status: " . $rec->{Status} . "\n\n"; }

Replies are listed 'Best First'.
Re: 500 timeout on paypal module
by zentara (Archbishop) on Nov 04, 2018 at 22:52 UTC
    Hi, it would seem the next step would be to turn on debugging in the PayPal module. From the perldoc:
    DEBUGGING You can see the raw SOAP XML sent and received by Business::PayPal::AP +I by setting its $Debug variable: $Business::PayPal::API::Debug = 1; $pp->SetExpressCheckout( %args ); this will print the XML being sent, and dump a Perl data structure of +the SOM received on STDERR (so check your error_log if running inside + a web server). If anyone knows how to turn a SOAP::SOM object into XML without settin +g outputxml(), let me know.

    There is also a section in the perldoc on Error Handling. You might want to setup more error checking in your code to find the cause of the timeout.

    I'm not really a human, but I play one on earth. ..... an animated JAPH
    A reply falls below the community's threshold of quality. You may see it by logging in.
Re: 500 timeout on paypal module
by afoken (Canon) on Nov 04, 2018 at 19:18 UTC

    STOP creating new threads for the same problem!


    Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)

      i think that was other thread asking wat module can i use. and now this thread point to the error i got using the same module


        this is wired and scares. this module has the latest update for 20 days back. after following the developer of this module i found out the latest version made 20 days back. has this module last update i show something like nov 2017. first, the documentation scares coz the module itself has no direct error handling to handle errors. second, the developer was wise in his new update he updated the PayPal links which is ok. and also fixed the https problem. but the documentation to wired cant fix my error in my script

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1225214]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (7)
As of 2020-08-14 20:25 GMT
Find Nodes?
    Voting Booth?
    Which rocket would you take to Mars?

    Results (76 votes). Check out past polls.