Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

PayPal Payflow Pro with Perl

Posted on 2011-03-15
10
Medium Priority
?
491 Views
Last Modified: 2013-11-29
I'm trying to setup an existing shopping cart for use PayPal Payflow Pro.  My question is, based on the information at http://search.cpan.org/~vkhera/PayflowPro/PayflowPro.pm what do I need to do in order to get the module referred to installed?
0
Comment
Question by:SteveCantin
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
10 Comments
 
LVL 46

Expert Comment

by:tbsgadi
ID: 35145088
0
 
LVL 5

Expert Comment

by:szlamp
ID: 35146709
Have you tried using CPAN?

1) Login as root.
2) When you have a root CLI, Type 'cpan' and press enter.
3) When the cpan CLI appears type 'install PayflowPro' and press enter.

If your system is set-up correctly then that should install the module on your system for you.

0
 

Author Comment

by:SteveCantin
ID: 35148531
Thanks for the notes.  I was able to install  Business::OnlinePayment::PayflowPro with out error, but when I create a pl file based on the documentation for CPAN, I get an internal server error.  I removed the bottom portion code from the example, just to test that the object could be instantiated, but still get the internal server error.  Any thoughts?

use Business::OnlinePayment;
  
my $tx = new Business::OnlinePayment(
    'PayflowPro',
    'vendor'  => 'your_vendor',
    'partner' => 'your_partner',
    'client_certification_id' => 'GuidUpTo32Chars',
);

# See the module documentation for details of content()
$tx->content(
    type           => 'VISA',
    action         => 'Normal Authorization',
    description    => 'Business::OnlinePayment::PayflowPro test',
    amount         => '49.95',
    invoice_number => '100100',
    customer_id    => 'jsk',
    name           => 'Jason Kohles',
    address        => '123 Anystreet',
    city           => 'Anywhere',
    state          => 'GA',
    zip            => '30004',
    email          => 'ivan-payflowpro@420.am',
    card_number    => '4111111111111111',
    expiration     => '12/09',
    cvv2           => '123',
    order_number   => 'string',
    request_id     => 'unique_identifier_for_transaction',
);

Open in new window

0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 5

Expert Comment

by:szlamp
ID: 35148603
Hi Ivan, everything in your code seems fine. When you say your getting an internal server error, What do you mean exactly?

Are you trying to run that script as a CGI script?

If so then you will be getting 500 errors are thescript doesn't output HTTP content headers, etc.

Try adding

print "Content-Type: text/html\n\n";
print "Script appears to have successfully executed."

to lines 30 + 31, then if you are running it as a CGI you should at least get a nice message telling you if it runs correctly.
0
 

Author Comment

by:SteveCantin
ID: 35148984
Thanks, That was part of the problem.  I am trying to run as a CGI, when I change the script to the following I get that nice message, so at least the reference is working:

#!/usr/bin/perl -w

use Business::OnlinePayment;
  
print "Content-Type: text/html\n\n";
print "Script appears to have successfully executed." 

Open in new window


but when I try to change the code to the following, I get an internal server error. Any thought?

#!/usr/bin/perl -w

use Business::OnlinePayment;
  
my $tx = new Business::OnlinePayment(
    'PayflowPro',
    'vendor'  => 'your_vendor',
    'partner' => 'your_partner',
    'client_certification_id' => 'GuidUpTo32Chars',
);

print "Content-Type: text/html\n\n";
print "Script appears to have successfully executed." 

Open in new window


0
 
LVL 5

Expert Comment

by:szlamp
ID: 35149039
Your server log file should have pretty detailed error reports. hat platform are you hosting on?

Linux running Plesk is the most common nowadays...

If so, then your log files will be located in a folder similar too:
/var/www/vhosts/<domain>/statistics/logs/error_log

If your on a different platform and can't find you httpd server log then you could try running the script from the command line.

# perl /path/to/script.pl

That should give you a more verbose output than just an 'error', so perhaps we can get a clue as to what's going wrong.
0
 

Author Comment

by:SteveCantin
ID: 35149131
Thanks.  I will try that.  I'm hosted with HostGator and it's running Linux with Cpanel.  I've checked and called support and I can not access the error_log directly.  I have to setup SSH in order to connect and use the command line.

Thanks for the info,  I have to run out for a bit, but when I return I'll try the ssh and see what the output is....
0
 
LVL 5

Accepted Solution

by:
szlamp earned 2000 total points
ID: 35154724
Yes if you shell into the CLI (Command Line Interface) via SSH you'll be able to get a lot more information about what's causing the bug.

Good luck Steve, let me know if you need further help.
0
 
LVL 9

Expert Comment

by:Suhas .
ID: 37319324
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0

Featured Post

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are many situations when we need to display the data in sorted order. For example: Student details by name or by rank or by total marks etc. If you are working on data driven based projects then you will use sorting techniques very frequently.…
Every business owner understands the significance of online customer reviews and the impact it can have on sales and revenues. With technology advancing at such a rapid pace, getting online reviews has never been easier, especially when many regions…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

661 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question