Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

Re: Business PayPal error

by davido (Cardinal)
on Nov 08, 2018 at 02:45 UTC ( #1225388=note: print w/replies, xml ) Need Help??

in reply to Business PayPal error

Getting to the bottom of it is not hard, it's just tedious. You are trying to do a thing, and you are getting an error message. If the documentation doesn't cover the message, you sometimes have to look at the code. In this case the message at least tells you where it's coming from.

The first step is to turn on whatever debugging is available. Next is to look at the code.

After that the next step is to find a way to step through what's happening, and to see get yourself as close to the error as possible. By using tools such as Devel::CallTrace you can get a pretty good idea of the order in which things are happening, and then can inject your own debugging code (yes, even into the installed CPAN modules) if the existing facilities for debugging are not built into the module you're using.

I would hope that by now you've looked at the source code at line 164 of Business::PayPal::API and discovered that takes you into Soap::Lite. And I would hope that you've grepped for the error message various ways, and (as I have) probably not come up with an exact smoking gun. But you certainly CAN start looking at where $Soap{$self}->call comes from and that will take you to the instantiation of the Soap::Lite object through the proxy method.

So now, if you have done these things, you know how Soap::Lite is being instantiated, and you know exactly where it's getting called, and that the call is failing. Now you can look at $Header{$self} and $method => $request to see if they contain what you feel they ought to contain. If they do, then next you'll want to look inside of Soap::Lite to see what call(...) does, and start following that code back into its lower levels. Sprinkle the module with "I'm still alive" print statements, or dump diagnostic information into a log that you can tail as you run your code, that sort of thing. Finally you'll arrive at the place where it makes the remote call, and you can look at the args going into the call, and the response coming back.

But we probably can guess that the response is timing out. So now you'll have to figure out, is it timing out because I'm not giving enough time? Or is it because of networking access? Or is it because I'm sending incorrect data through the transaction? Am I getting held up by SSL somehow?

These are all things you sign up for when you start developing systems that interact with other complex systems. And the reason you're probably not getting the help you desire is that you're asking too much of us, while providing too little in information, with little evidence of your own work, and without any description of what your own debugging has uncovered.

You can't just stop at the first error message and throw up your arms in despair. Well, you can, of course. But it's not going to solve anything. It's time to roll up your sleeves and start that deep dive.

Before composing this post I downloaded the two modules mentioned here, unpacked them into a place I could fiddle, and began exploring them. Have you done this? Or have you looked at the modules as installed on your systems? If not, it's time to do that. I've spent many half-days doing just that in other code mysteries, for the same exact reasons.

At some point you have to arrive at one of two conclusions: (1) Other people have figured this out, and I now will do what it takes to figure it out too. Or (2) the effort to figure this out is greater than the value I get from doing it myself. And if it's (2), then you can then decide if the value rises to the level of paying someone who can take the (1) road, or whether it does not meet that level, in which case the project stalls or finds a different path.


Replies are listed 'Best First'.
Re^2: Business PayPal error
by bigup401 (Pilgrim) on Nov 08, 2018 at 11:22 UTC

    thanks davido for advice

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (9)
As of 2019-05-21 08:28 GMT
Find Nodes?
    Voting Booth?
    Do you enjoy 3D movies?

    Results (131 votes). Check out past polls.

    • (Sep 10, 2018 at 22:53 UTC) Welcome new users!