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

I need to start using a secure token with Paypal which requires making an API call. Previously we just printed a form that redirected the user, but now we have to make an API call. I have no idea how to accomplish this. Can someone point me in the right direction? Thanks.

Replies are listed 'Best First'.
Re: Paypal integration API call
by blue_cowdawg (Monsignor) on Nov 03, 2012 at 19:27 UTC

    Dear Monk,
    Have you looked here?

    That's not so much a Perl question as it is a Paypal API question....


    Peter L. Berghold -- Unix Professional
    Peter -at- Berghold -dot- Net; AOL IM redcowdawg Yahoo IM: blue_cowdawg
      Yes I've read that. I guess I don't know how to make the API call in perl. It's server to server and I guess I only know how to print to the browser. Thanks.
Re: Paypal integration API call
by flexvault (Monsignor) on Nov 04, 2012 at 14:02 UTC

    htmanning,

    I did this a couple of years ago. You want to apply for a sandbox account, which takes some time. I didn't find a Perl example at Paypal, but I did find an example ( I think at ebay ), which I modified and it worked great.

    One thing I didn't find anywhere, but caused a lot of problems for me. I used an existing account which was being called by HTML generated by Paypal. Each time that code was called, PayPal disabled the API call since it didn't respond properly. It would have been easier to just get a new account and keep the calls separate.

    Update:I just did a super search, and found references to CPAN modules Business::Paypal and Business::Paypal::API. From there dates on CPAN, they are newer than the code I used, and may be worth looking into.

    Good Luck!

    "Well done is better than well said." - Benjamin Franklin