corner black line corner
black line
the Hazel Logo Hazel Enterprise: The Internet Merchandising System The Netsville Logo
start red bar Home News Info Features Examples Purchase Support Contact Us end red bar

2008-07-23 -- Payflow Pro Upgrade Instructions
Last Updated on 2009-08-07

Paypal has recently informed us that the old Verisign Payflow Pro method of accepting credit cards will CEASE TO FUNCTION in September 2009.

Any customer using the old Verisign Payflow Pro method to accept credit cards will need to have their Hazel plugin updated. Paypal, which took over the Payflow Pro method from Verisign several years ago, has made updates and improvements to the process. Our newer plugin takes advantage of these enhancements. We want our Hazel customers to be ready for this change well in advance.

If you are using the affected Payflow Pro method, you will have a program (file) named:

pfpro (no extension)

in your Hazel's cgi-bin directory.

The upgrade involves updating one Perl script, some template files, and several fields in your hazel.config file. In a worst-case scenario, you will need your hosting provider to install some new Perl modules. These modules should already be installed by default on a modern server. But we can quickly determine this BEFORE the upgrade if you prefer Netsville handle the upgrade for you.

The Perl modules that are required are:

LWP::UserAgent
HTTP::Request
Crypt::SSLeay

Contact Netsville for the URL link to the Payflow Pro payment module. The archive contains everything you need to upgrade your Hazel install with the new PayFlow Pro payment method.

Once the files are extracted you'll see two directories, cgi-bin and hazel-cat. The files in the cgi-bin directory correspond to files in your webserver's cgi-bin directory and the files in the hazel-cat directory correspond to files in your webserver's hazel-cat directory.

cgi-bin changes

Look into the cgi-bin directory and you'll see several files,

Hazel.pm
PayflowPro.pm
payflowpro.pl
payflowpro.config
testpayflowpro.pl

The Hazel.pm, PayflowPro.pm and payflowpro.pl files all need to be copied into your webserver's cgi-bin directory. Make sure the payflowpro.pl program points to the correct location of Perl at the top (e.g. #!/usr/bin/perl) and is set EXECUTABLE. The payflowpro.config file contains changes for your webserver's hazel.config file needed for Payflow Pro. The testpayflowpro.pl file is used to test the connection to Payflow Pro. Once the connection is verified to be working it can safely be removed.

The required fields that must exist in your hazel.config as described in payflowpro.config are:

PFP_ID
PFP_PW
PFP_PARTNER
PFP_VENDOR

The PFP_ID and PFP_PW config file variables should be set to the same values as they were set to in the previous version of PayFlow Pro. The PFP_PARTNER always existed but is a newly required field. The partner is going to be whomever you originally signed up with. Some likely posibilites for the PFP_PARTNER config file variable are the word 'PayPal' or the word 'Verisign' but may be something else depending on whom you originally signed up with. If you signed up recently than it is likely that your PFP_PARTNER is 'PayPal'.

You can verify your Partner, ID, and Password by logging to the PayPal Manager here: https://manager.paypal.com.

The Vendor is the same as your PFP_ID at least for now.

There are several configuration options available. As you are upgrading, you should already have these fields in place. Otherwise, append the paypflowpro.config to your hazel.config file and edit the relavent fields.

hazel-cat changes

Now look at the hazel-cat directory. You'll see there are two directories inside this directory, there is a loops directory and a templates directory. These two directories correspond to matching directory names in your webserver's hazel-cat directory.

payment_methods_payflowpro.txt

If you already have the payflowpro payment method installed you can skip this step

In the hazel-cat/loops directory there will be a new file called payment_methods_payflowpro.txt. You must append the contents of this file to the end of payment_methods.txt. payment_methods.txt is located in your Hazel's hazel-cat/loops directory. If you already have the Payflow Pro module installed, this has already been done.

In the hazel-cat/templates directory you'll see two directories -- elements/ and payments/ and a file called store_invoice_payflowpro.txt

store_invoice_payflowpro.txt

This file contains payment information related to a sale made through Payflow Pro. As the Shopkeeper, you will want to see this information in your emails. Append the contents to your hazel-cat/templates/store_invoice.txt file.

credit_input.html

Note that the field names for the credit fields have all changed from Hazel 3

The elements directory contains a file named credit_input.html. This is an upgraded version of the credit input template that includes a CVV input field needed by Payflow Pro. If you have not modified your webserver's existing hazel-cat/templates/elements/credit_input.html file then you can safely replace your webserver's existing credit_input.html file with this file. If you have modified your credit_input.html template just make sure that you add a CREDIT_CVV Field to your webserver's credit_input.html template file.

payflowpro.html

The last file to update is payflowpro.html in the payments/ directory. To ensure the new Perl script is called correctly, you should replace your existing payflowpro.html payment template with this file. This is located in the hazel-cat/templates/payment directory. This will replace the file the user sees when they choose the Payflow Pro method upon Checkout.

We realize that not everyone will want to attempt this upgrade on their own. If you require assistance, please contact us at: support@netsville.com or by phone at 585-232-5670 and ask to speak to either Micah Brandon or John Scipione.

Note that Payflowlink is NOT affected by this upgrade.

Testing PayflowPro

The easiest way to verify that the connection to PayPal is working is to use the testpayflowpro.pl script included in the cgi-bin directory of the payflowpro.tar.gz file. To test the connection to PayPal edit the script with your favorite text editor. You'll see four variables near the top called $user, $pwd, $vendor, and $partner. Input your Payflow Pro user information in these fields like so:

$user = 'username';
$pwd = 'password';
$vendor = 'vendor';
$partner = 'partner';

The quotion marks are required. Once the information is entered into the script save the file and put it into your Web Server's CGI bin directory. Load up your favorite web browser and point it to the script like so:

https://website.com/cgi-bin/testpayflowpro.pl

The exact syntax of the url above may be a bit different depending on how your webserver is configured. You want to point the webserver to the same location as your hazel.cgi (or hazel.exe on Windows) file would be but instead point it to the testpayflowpro.pl file. If all goes well you should get a response that looks like this:

Response from PayFlow Pro

success

RESULT 0
PNREF V7********BA
RESPMSG Approved
AUTHCODE 9****I
AVSADDR Y
AVSZIP Y
CVV2MATCH Y
HOSTCODE A
PROCAVS Y
PROCCVV2 M
IAVS N
PREFPSMSG No Rules Triggered
POSTFPSMSG No Rules Triggered

If there is some problem with your user information you will get a response like this:

Response from PayFlow Pro

success

RESULT 1
RESPMSG User authentication failed

If you get this response, login to the PayPal manager at https://manager.paypal.com and verify that your account is active and accepts test transactions. You may also have to add the IP address of your web server to the list of allowed IP addresses. If you do not have any IP addresses registered with PayPal than you should be able to connect from any IP address. Note that it can take up to an hour for IP address changes to take effect.

If you are still getting the error, try changing your password from the manager, avoid passwords that have spaces, or amperstands (&). Note that there can be multiple PayPal users, the admin user that you login to the PayPal Manager with and the account user. The account user is the one that you use here.

If there is some problem establishing an SSL connection than you will get the following error:

Response from PayFlow Pro

failure

LWP will support https URLs if either Crypt::SSLeay or IO::Socket::SSL is installed. More information at .

If you get this error make sure that Perl is installed and that the required Perl Modules listed above are installed. Also make sure that your web user has read access to the files in your perl bin directory. This is typically located in /usr/local/perl/bin on FreeBSD systems, /usr/perl/bin on Linux systems and C:\Perl\bin on Windows systems. Also make sure that your webserver has TCP port 443 open for incomming and outgoing connections. You may have to modify your firewall to allow for port forwarding to your webserver.

Configuring Hazel to accept Payflow Pro Transactions

Once that you have verified that you have a working connection with PayPal, the next step is to configure Hazel to accept transactions from Payflow Pro. We'll start by putting Hazel in testmode to verify that transactions are going through correctly.

Put the Payflow Pro method in testmode by setting PFP_TESTMODE:1 in your Hazel's hazel.config file. This will allow you to test Payflow Pro by entering a test credit card number. A list of test credit card numbers can be found along with the other Payflow Pro settings in your hazel.config file. An example is 4111111111111111 for a Visa credit card. The CVV code for the card is the last 3 digits of the card number (or 4 for American Express).

Now add a product to your cart and proceed to checkout. Fill out your billing information as normal. Make sure to enter a valid email address so you can see the invoice that is generated. It is probably a good idea to use same email address as the STORE_EMAIL hazel.config file variable so that you can see both the store and shopper invoices come in to the same email account. Make sure to select the Payflow Pro payment method if you have more than one payment method available. If you do not see the Payflow Pro payment method check your hazel-cat/loops/payment_methods.txt file to make sure the Payflow Pro payment method is present. You should see a line like this:

payflowpro;Credit Card

If PayflowPro is your only payment method listed in the loops/payment_methods.txt file than you will not get a payment method choice on the checkout screen, the Payflow Pro payment will be selected automatically. Proceed to the payment step by pushing the Continue button. The payflowpro.html template file should now load. If the payflowpro.html template file is missing you'll get an error similar to this:

Failed to open file "hazel-cat/templates/payment/payflowpro.html" 
for HZML rendering.

If you get this error make sure that the hazel-cat/templates/payment/payflowpro.html file is where it should be and is readable by your webserver.

At this point the payflowpro.html payment template should come up. The payflowpro template should look a lot like the standard credit card input template. Select a card type, enter one of the test credit card numbers from your hazel.config file, set the CVV code to the last 3 or 4 digits of the card number, set the expiration date to any future month and year. Now push the Confirm button to complete the transaction. If all went well you should get a success message that shows the details of your order. Check the email address that you entered above to see the confirmation email. Also check your store email address to see the store invoice email. If the invoices do not look correct, check your hazel-cat/templates/shopper_invoice.txt and hazel-cat/templates/store_invoice.txt files to make sure that they are correct.

The customer will see the shopper_invoice.txt and you as the shopkeeper will see the store_invoice.txt.

If you get an error message similar to the following:

The requested URL /cgi-bin/payflowpro.pl was not found on this server.

It means that the payflowpro.pl file is missing or not in your cgi-bin directory. Please review the cgi-bin changes above. If you get an error message that looks like this

Internal Server Error

The server encountered an internal error or misconfiguration 
and was unable to complete your request.

Please contact the server administrator and inform 
them of the time the error occurred, and anything you might 
have done that may have caused the error.

More information about this error may be available in the 
server error log.

This means that the payflowpro.pl file is in your cgi-bin directory but one of the following is true:

  • It is not readable and executable by your webserver
  • It is not owned by the correct user
  • The location of Perl at the top of the payflowpro.pl file is incorrect

Now would also be a good time to review your webserver's error log. This will give more details about the problem.

If you get any other error make sure that the required Perl modules are installed and double check your hazel.config file to make sure the required Payflow Pro fields are filled out.

Once the Payflow Pro payment method is working correctly make sure to set PFP_TESTMODE:0 in your webserver's hazel.config file to go into live mode. Once you are in live mode only real credit cards will be accepted. You can, however, do one final check by repeating the test with the test credit card. You will get a DECLINED message. You are now ready to take live orders.

  Call Us Toll Free 1-888-NETSVILLE
 
black line
corner black line corner