It took me about 2 days to integrate Paypal Pro and I am not very technical person, if I can don't it so can you. Don't be discourage, just follow these steps below. Disclosure: these are not my files
Step 1: Download and unzip the two files "Pear and Paypal" into your hard drive
Step 2: Upload these files on to your website using FTP.
For "Paypal" files go into /public_html/yourwebsite/administrator/components/com_virtuemart/classes/payment/(current folder)
→ paypal_dp
---ps_pdp.cfg.php
---ps_pdp.php
For "Pear" files go into
/public_html/yourwebsite/Pear/(current folder)
→ .registry folder
→ Archive
→ Console
→ HTTP
→ Log
→ Net
→ PEAR
→ Services
-- Log.php
-- PEAR.php
-- pearcmd.php
-- System.php
Step 3: One line configuration in your "php.ini" file; look for "php.ini" file in /public_html/yourwebsite/php.ini
About halfway down look for
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Paths and Directories;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
include_path = ".:/usr/lib/php:/usr/local/lib/php"
make your include_path line look like this
include_path = ".:/usr/lib/php:/usr/local/lib/php:/home/public_html/yourwebsite/PEAR"
Step 4: Upload paypal keys live and sandbox cert_key_perm.txt (assume you already have an account with Paypal) to
/public_html/yourwebsite/pear/Services/Paypal/cert/(current folder)
---live.cert_key_perm.txt
---sandbox.cert_key_perm.txt
Step 5: Configurate Payment Methods
1. Log into Virtuemart
2. Go to List Payment Methods and click New top right
On General Tab
3. Active? Check the box to make it active
4. Payment Method Name: Type "Paypal Direct Payment" or anything you wish.
5. Code: Type "PDP"
6. Payment class name: Type "ps_pdp"
7. Payment method type: Click "Credit Card"
8. Accepted Credit Card Types: Click Visa, MC, A. Express, Discover Card
On Configuration Tab
9. Username: You get this from Paypal
10. Password: You get this from Paypal
11. Subject: You can leave this blank
12. Certificate: Insert url of your key here
13. Mode: Pick Sandbox for testing
14. CVV: Pick Yes
At this point your ps_pdp.cfg.php file should look like this
<?php
defined('_VALID_MOS') or die('Direct Access to this location is not allowed.');
define ('PDP_USERNAME', 'xxxxxxxxxx_api1.xxxxxxxxxxx.com');
define ('PDP_PASSWORD', 'xxxxxxxxxxxxxxx');
define ('PDP_SUBJECT', '');
define ('PDP_CERTIFICATE', '/home/public_html/yourwebsite/pear/Services/PayPal/cert/sandbox.cert_key_pem.txt');
define ('PDP_MODE', 'sandbox');
define ('PDP_CHECK_CARD_CODE', 'YES'); you need to add this line in for CVV
?>
Step 6: Testing Paypal Payment Pro
Make sure that you set your frontend features to allow customer to select their State/Region when fill out Billing and Shipping Address. Otherwise you would get this error
Quoteobject(errortype)(9) { ["_elements"]=> array(5) { ["ShortMessage"]=> array(3) { ["required"]=> bool(true) ["type"]=> string(6) "string" ["namespace"]=> string(31) "urn:ebay:apis:eBLBaseComponents" } ["LongMessage"]=> array(3) { ["required"]=> bool(false) ["type"]=> string(6) "string" ["namespace"]=> string(31) "urn:ebay:apis:eBLBaseComponents" } ["ErrorCode"]=> array(3) { ["required"]=> bool(true) ["type"]=> string(5) "token" ["namespace"]=> string(31) "urn:ebay:apis:eBLBaseComponents" } ["SeverityCode"]=> array(3) { ["required"]=> bool(true) ["type"]=> string(16) "SeverityCodeType" ["namespace"]=> string(31) "urn:ebay:apis:eBLBaseComponents" } ["ErrorParameters"]=> array(3) { ["required"]=> bool(false) ["type"]=> string(18) "ErrorParameterType" ["namespace"]=> string(31) "urn:ebay:apis:eBLBaseComponents" } } ["_attributes"]=> array(0) { } ["_attributeValues"]=> array(0) { } ["_namespace"]=> string(31) "urn:ebay:apis:eBLBaseComponents" ["ShortMessage"]=> string(37) "The Billing Address State is invalid." ["LongMessage"]=> string(128) "The field Billing Address State is in an invalid format. For US/CA states and territories, enter a valid two letter state code." ["ErrorCode"]=> string(5) "10751" ["SeverityCode"]=> string(5) "Error" ["ErrorParameters"]=> NULL }
Failure in Processing the Payment:
The field Billing Address State is in an invalid format. For US/CA states and territories, enter a valid two letter state code.
Error: Failure in Processing the Payment (ps_pdp)
Failure in Processing the Payment:
The field Billing Address State is in an invalid format. For US/CA states and territories, enter a valid two letter state code.
Step 7: Take it LIVE
Edit your ps_pdp.cfg.php file (if you edit from List Payment Method the last line, define ('PDP_CHECK_CARD_CODE', 'YES'); ,will drop off. I don't know why)
<?php
defined('_VALID_MOS') or die('Direct Access to this location is not allowed.');
define ('PDP_USERNAME', 'xxxxxxxxxx_api1.xxxxxxxxxxx.com'); real username
define ('PDP_PASSWORD', 'xxxxxxxxxxxxxxx'); real password
define ('PDP_SUBJECT', '');
define ('PDP_CERTIFICATE', '/home/public_html/yourwebsite/pear/Services/PayPal/cert/live.cert_key_pem.txt');
define ('PDP_MODE', 'LIVE');
define ('PDP_CHECK_CARD_CODE', 'YES'); you need to add this line in for CVV
?>
I don't think I left anything out, but if you get this far you should be able to figure the rest out.
[attachment deleted by admin]
[attachment cleanup by admin]
Great thanks! I'll see what I can do!
I tried everything and it seems to be almost there... the only thing is that when I submit an order, I get an error - API initiation error: Could not find certificate file 'http://mysite.com/pear/Services/PayPal/cert/live.cert_key_perm.txt'
What is this?
Quotehttp://mysite.com/pear/Services/PayPal/cert/live.cert_key_perm.txt
That is the location where you save your real key (live key) to connect with Paypal. Did you generated API key at Paypal site yet?
I sure did... and I believe it's in the appropriate folder. hmmm.....
Go to your ps_pdp.cfg.php file in /public_html/yourwebsite/administrator/components/com_virtuemart/classes/payment/(current folder) and check to see if the codes look like the one below.
<?php
defined('_VALID_MOS') or die('Direct Access to this location is not allowed.');
define ('PDP_USERNAME', xxxxxxxxxx_api1.xxxxxxxxxxx.com');
define ('PDP_PASSWORD', 'xxxxxxxxxxxxxxxxx');
define ('PDP_SUBJECT', '');
define ('PDP_CERTIFICATE', '/home/public_html/yourwebsite/pear/Services/PayPal/cert/live.cert_key_pem.txt');
define ('PDP_MODE', 'LIVE');
define ('PDP_CHECK_CARD_CODE', 'YES');
?>
Have you read the rules about using PayPal Payment Pro? You also have to implement PayPal Express checkout - see all the Paper Work issued by PayPal about Payment Pro
If you implement Express Checkout as required your total Work Flow is screwed up as you must place Express Checkout upfront
We abandoned PayPal Payment Pro due to the need to change the Work Flow under PayPal rules and the potential future problems in upgrading VirtueMart in the future. We changed our Payment Card processing to Authorize.net and just implemented the standard PayPal link with a bit of Javascript added to guide users through the process
We note that only around 10% of our Store customers use PayPal to pay for products compared to 90% using Payment Cards
Yes, I read their little note about Direct Payment API is not a stand-alone product. And that we are required to use Direct Payment API and Express Checkout together as part of the Website Payments Pro solution. I don't think they will turn away or terminate my account for not integrating Express Checkout. It would be very stupid business module for them, if they do. Just be on the safe side, I will also get Authorize.net. Thanks for the head-up.
I reported in another thread that PayPal is retreating from this policy. I heard the news firsthand from a PayPal technician by phone. They are not announcing it but they will look the other way, is my understanding.
Pam
That is great news. Thanks Pam
Okay so far I've followed all the steps and thanx by the way, this is a major help by far, but I can not find the php.ini file to change the path and directories that is needed, I'm running joomla 1.0.8. Am I overlooking something, please assist
Your php.ini file is normally in /public_html/(currenct folder). Just make a copy and put it in /public_html/yourwebsite/current folder if you have more than one website going. In case, you actually don't have php.ine file you can also direct the path from .htaccess file. Refer to post, http://virtuemart.net/index.php?option=com_smf&Itemid=71&topic=15428.0,for editing from .htaccess file.
Hello...thanks for the info...I've been able to do all except change the path in the php.ini. I don't have one. Then I looked at trying to do it in the .htaccess file...but each time I try then after that my site doesn't work at all... and I really can't see where in that file I would change it...
so...how do I change that line? I really don't know how...
thanks
You can still get around this. Open up api_init.php and add the following lines to the top of the script before the include calls on the Services/PayPal.php file:
$include_path = ini_get('include_path');
$pear_path = "/home/my/pathto/pear/";
if(!stristr($pear_path,$include_path)) ini_set('include_path',$include_path . PATH_SEPARATOR . $pear_path);
Be sure to change the $pear_path to point to the directory where you installed the Pear files.
To add onto this post -
If you get the path set correctly, you may run into an error that says something to the effect of getAck() is undefined. If this is the case, the problem is that your username, password or certificate is set incorrectly. This error happens because when you create the caller services profile (in the api_init.php file), if this is wrong it kills the chain of includes so that the API call fails prior to the request being sent and with no response, the getAck() function hasn't been defined yet.
One method to get around this (because it is based on PHP4 coding) is to change $response->getAck() to $response->Ack which is a public variable that can be accessed. getAck() returns the API Ack value to var $Ack
so far this looks great. I'm looking to install this in the next couple of days. Before I take the time to do this, has anyone had problems yet with the integration? has there been issues with Pay Pal?
Thanks so much for this post!!!
Can I get a bit of help?
I have followed all the directions and I still get a blank page when I click the confirm button for PP pro.
ps_pdp.php file
define ('PDP_USERNAME', 'me@me.com');
define ('PDP_PASSWORD', 'XXXXXXXXXX');
define ('PDP_SUBJECT', '');
define ('PDP_CERTIFICATE', '/home/XXXXXXXX/public_html/includes/PEAR/Services/PayPal/cert/live.cert_key_pem.txt');
define ('PDP_MODE', 'LIVE');
define ('PDP_CHECK_CARD_CODE', 'YES');
php.ini
include_path = ".:/usr/lib/php:/usr/local/lib/php:/home/XXXXXXX/public_html/includes/PEAR
Here is some system info:
Safe Mode: OFF
Open basedir: none
Display Errors: OFF
Short Open Tags: ON
File Uploads: ON
Magic Quotes: OFF
Register Globals: OFF
Output Buffering: OFF
Session save path: /var/lib/php/session
Session auto start: 0
XML enabled: Yes
Zlib enabled: Yes
Disabled Functions: none
Any ideas?
And can someone please explain where to put the files form the "pear" folder, do they go into the website/includes/PEAR folder?
If so do they go like website/includes/PEAR/pear/ files, or website/includes/PEAR and overwrite the PEAR.php file that is there?
This is with Joomla! 1.0.9 and VM 1.0.5
O.K., if no one can help/suggest things to try to fix this, how about a way I can turn on some error reporting?
Thank you, help is appreciated.
Well I knw I must be processing to some point, if I change my PDP_CERTIFICATE path I get an error that it cannot be found.
So, if it is getting that far, where can I look to see why all I get it a blank page?
I have the paypal accout setup for IPN, but also I am trying to test this on a different server, using an IP address, can that cause this issue I am having?
Please, any help is appreciated, I can't be the only one who has run into getting a blank page on confirmation (or maybe so)..
Thanks.
Hi Bingo,
I've got your system up and running now. Thanks for posting this tutorial. I have 2 questions, though:
1) If I pay with a credit card under a different name, it updates my name as well... so this could be a slight problem for customers. Is there a way to keep the Credit Card info from changing user registration info?
2) It doesn't send the item name to paypal when an order is processed, only the order number. It's not a big problem because you can cross reference the order in paypal with the order in VirtueMart, but it would be very convenient if the PayPal order had the order number and the item name in it.
Is it possible to apply these two ideas?
hi everyone,
thanks bingo, this thread should be stickied.
i am having a problem though. i've been running the paypal module live for a few weeks and everything has been going great EXCEPT:
1) the error messages are huge and ugly. i saw a thread on fixing this so i will follow the instructions there.
2) american express transactions are not going through. this is a big problem. does anyone have a fix for this?
if i can't get these problems fixed, then i will have to switch to another credit card processor. i don't want to do this because i don't want to go through the whole verification process again.
let's keep this thread going, guys! i still have faith in paypal.
Any of you guys got PayPal Pro to work with AMEX? Getting it to work with Visa/MasterCard/Discover is no sweat we have done that several times, including the Beta version way back. We have never got either v 2.0 or v 4.0 to work with AMEX
We know we are passing the correct data down the pipe [4 digit code for AMEX others have 3 digit code] but just get a message 'Failure in Processing the Payment could not contact Credit Card Payment Agency'
Hi LBA,
i did a AMEX transaction through paypal's Virtual Terminal.
it went through fine.
whatever is screwing up AMEX transactions with our Virtuemart Paypal WPP module must be IN the module.
i'm guessing that it must be some kind of small mistake.
could it be that we are sending the card type with the wrong capitalization? i have heard that Amex needs to spelled either "AMEX" or "Amex" or it will break. i forgot which one it is though.
This is what I got from one of the support guys on the paypal developer's network. LBA, can you post what he is talking about so I can send it to him? I think we can probably fix this:
Hi Miz,
Is there a way you can get the PayPal response for an attempt that used American Express, it should have a 5 digit error code along with a short and long message that can help track down why it is not going through.
One common issue that I've seen is related to the card type:
Visa
MasterCard
Discover
Amex
As you can see the card type for American Express is the abbreviated Amex - if the shopping cart is not passing this abbreviated version then it will not work and I don't think PayPal will respond with an error code but it will result in a soap fault. If none of the American Express transactions are going through then you might want to have Virtuemart check on this just to make sure.
Message Edited by PayPal_Ahmad on 10-11-2006 05:01 AM
Ahmad
Merchant Tech Support, PayPal
SOAP stands for 'Simple Object Access Protocol' and is an XML-based protocol that lets applications exchange information over http. PayPal Pro uses an XML based information exchange process whereas Authorize.net uses older EDI information exchange technology. PayPal Pro does use more current technology but we have never had any problems with getting Authorize to work
My partner passed me a bunch of soap output when we had PayPal Pro in test. I cannot remember where the data was generated. I will check with him and get back to you ASAP - there were three or four pages for each transaction
jeesh, that much? hmm. maybe it's better that you pm me. :)
Quote from: sumwatt on May 11, 2006, 17:55:37 PM
To add onto this post -
If you get the path set correctly, you may run into an error that says something to the effect of getAck() is undefined. If this is the case, the problem is that your username, password or certificate is set incorrectly. This error happens because when you create the caller services profile (in the api_init.php file), if this is wrong it kills the chain of includes so that the API call fails prior to the request being sent and with no response, the getAck() function hasn't been defined yet.
One method to get around this (because it is based on PHP4 coding) is to change $response->getAck() to $response->Ack which is a public variable that can be accessed. getAck() returns the API Ack value to var $Ack
sumwatt, i don't get what you're saying. i'm pretty sure that the username, password and certificate is set correctly on my site. but i'm still getting the getAck() problem. i changed it to $response->Ack, BUT, now it looks like it's accepting some transactions which are not valid...
*EDIT*
hey sumwatt, here is a post by the tech guy at paypal dev.
http://paypal.lithium.com/pdn/board/message?board.id=api&message.id=247
go to the bottom where he talks about the getAck() problem.
We have Visa/MasterCard/Discover all working correctly. AMEX always gives the following error message
'Failure in Processing the Payment could not contact Credit Card Payment Agency'
Has anyone out there got AMEX to work OK???
The initial post in this thread references two downloads. It looks like the PEAR download has been removed by the admin. Where did it come from in the first place?
I found the pear download here http://paypaltech.com/php_pear/ (http://paypaltech.com/php_pear/)
Hi All,
THanks to all of your input I was able to get my first sandbox WPP transaction to go through!
A couple of lessons learned:
1. The pear download can be found at the url of my previous post
2. I downloaded the pear.zip file. I uploaded to "<joomla root folder>/includes/PEAR" all except the PEAR.php file that already exists there. (wasn't sure about versions so I left the one that comes with Joomla)
3. To add the PEAR path I added: php_value include_path ".:/home/mysite/public_html/joomla/includes/PEAR" to the .htaccess file at the root of the joomla install (before all the SEF stuff). This is an alternative to other methods already mentioned in this thread.
4. If its not obvious, the step where you configure virtuemart new payment method, you have to "SAVE" after entering info into the "General" tab. Then go back in to see the fields in the "Configuration" tab.
guys, i've switched to authorize.net. it's cheaper and setup was 100 times simpler. also, no problems with amex.
Still waiting to hear from anyone who has managed to get AMEX to work OK. We have never had a problem getting Visa/MasterCard/Discover to work but never managed to get AMEX to work
We would love to hear from anyone who got AMEX to work successfully using PayPal Pro
Has anybody else run into the blank page when you hit "confirm order?" I saw someone above me ask, and get no reply....
What could I be missing?
I'll give somebody a dollar to figure this out (dollar not guaranteed, void where prohibited).
Hello and thank you for sharing your brains.
what you guys think does work .... is it really worth the work, ( instead of paying a bit more to authorize.net)
what about when and virtual mart make an update.
I previously had WPP transactions working in the sandbox but after moving my site I have started getting a blank page like others have been complaining about. I don't get paid for my implementation job until this is working... so you can bet I'm motivated to find out the problem.
If anybody has any ideas... please share them. Otherwise I'll try and track down the problem and post the solution here... and Abulic if I find the solution I'll be looking for that dollar in the mail. :)
Quote from: Abulic on November 18, 2006, 12:26:14 PM
Has anybody else run into the blank page when you hit "confirm order?" I saw someone above me ask, and get no reply....
What could I be missing?
I'll give somebody a dollar to figure this out (dollar not guaranteed, void where prohibited).
James,
If you figure it out before I do, I'll make it 2 dollars. But you have to share the solution with me. Haha.
Quote from: James Friesen on October 24, 2006, 22:28:33 PM
I found the pear download here http://paypaltech.com/php_pear/ (http://paypaltech.com/php_pear/)
Hello, I've been trying to find a fresh url (one that works) to download pear for this and haven't had any luck. Does anyone have a working link for it?
Thanks a lot.
Kevin.
where can i find Pear files?
where can I find PEAR files?