VirtueMart Forum

VirtueMart Dev/Coding Central: VM1 (old version) => Development Projects, Modifications, Hacks & Tweaks. VM1.1 => Payment Modules => Topic started by: Comenius on February 15, 2006, 05:13:38 AM

Title: Fixed? PayPal Website Payments Pro
Post by: Comenius on February 15, 2006, 05:13:38 AM
OK, I don't want to get everyone's hopes up, but I believe I've gotten the fabled WPP to work with VirtueMart.   :)  I've had a few different people run several successful transactions through and everything seems to be working.  I'm in shock!   :D

To help everyone else, there are two attachments to this message that are needed to get the whole thing working.  The contents of the pear attachment need to go into your includes/PEAR directory within Joomla.  I downloaded the file from from PayPal, so you can download it from there as well if you like.  This basically provides the core functionality for VirtueMart to talk to PayPal.

The other attachment is the VirtueMart payment method and was originally developed for Mambo / PHPShop by someone at the OpenZion web site.  He registered here back in September 2005 and made a single post but hasn't been back since.  The code is definitely not mine, all I did was edit it, but it now appears to work.   Anyhow, grab that attachment and follow the directions on his site which are still fine for installing and configuring it:  http://www.openzion.org/documentations/view.html

The only other caveat is that your PHP includes path has to include a reference to your PEAR directory.  I accomplished this by adding the following line to my .htaccess file at the root of my Joomla install:

php_value include_path ".:/usr/local/lib/php:/mnt/webhosting/sites/o/openenglishworld.com/includes/PEAR"

I'm sure I'm leaving things out, but hopefully this gets people off and running.  Good luck everyone!!   :)



[attachment deleted by admin]

[attachment cleanup by admin]
Title: Re: Fixed? PayPal Website Payments Pro
Post by: mrhasbean on February 20, 2006, 13:25:36 PM
Excellent post!!!

My system already had Pear installed and other apps rely on it so I didn't want to upset the Apple cart so to speak.  I downloaded the two files and unzipped them, copied the contents of the paypal.zip file to the [path-to-mambo]\administrator\components\com_phpshop\classes\payment folder, but from the pear.zip file I took only the "Services" directory and copied it to my system's Pear installation location - in my case /usr/share/pear.  From this point follow the excellent setup instructions already provided.

Also, remember to set the access privileges on the files and folders you have just copied into place - otherwise your web server processes may not be allowed to access the files.

;)
MrHasBean
Title: Re: Fixed? PayPal Website Payments Pro
Post by: koltz on February 20, 2006, 16:04:11 PM
Okay, to the above poster, should be changed from com_phpshop to com_virtuemart I believe.  Next, I still get a blank screen?  I guess, once I start checking out, what am I suppose to be seeing after the confirm order?

Corey

Update, I also had a pear folder in the /usr/share directory and moved services over.  Still a blank screen.  Not sure what I am missing? 
Title: Re: Fixed? PayPal Website Payments Pro
Post by: koltz on February 20, 2006, 19:27:39 PM
If I fill in the credit card info, and select either PayPal or Money order, it will submit as processed and put the credit card info in the order, but won't actually process.  When I leave the PayPal Payments Pro selected, it goes to the white screen.  Guessing it isn't getting to the transaction stage with PayPal?
Title: Re: Fixed? PayPal Website Payments Pro
Post by: koltz on February 21, 2006, 17:53:21 PM
I ended up rebuilding my whole Joomla/VirtueMart as I was having other problems.  But I get the following problem now:

Quote
Notice: Constant PEAR_LOG_EMERG already defined in /usr/share/pear/Log.php on line 10

Notice: Constant PEAR_LOG_ALERT already defined in /usr/share/pear/Log.php on line 11

Notice: Constant PEAR_LOG_CRIT already defined in /usr/share/pear/Log.php on line 12

Notice: Constant PEAR_LOG_ERR already defined in /usr/share/pear/Log.php on line 13

Notice: Constant PEAR_LOG_WARNING already defined in /usr/share/pear/Log.php on line 14

Notice: Constant PEAR_LOG_NOTICE already defined in /usr/share/pear/Log.php on line 15

Notice: Constant PEAR_LOG_INFO already defined in /usr/share/pear/Log.php on line 16

Notice: Constant PEAR_LOG_DEBUG already defined in /usr/share/pear/Log.php on line 17

Notice: Constant PEAR_LOG_ALL already defined in /usr/share/pear/Log.php on line 19

Notice: Constant PEAR_LOG_NONE already defined in /usr/share/pear/Log.php on line 20

Notice: Constant PEAR_LOG_TYPE_SYSTEM already defined in /usr/share/pear/Log.php on line 23

Notice: Constant PEAR_LOG_TYPE_MAIL already defined in /usr/share/pear/Log.php on line 24

Notice: Constant PEAR_LOG_TYPE_DEBUG already defined in /usr/share/pear/Log.php on line 25

Notice: Constant PEAR_LOG_TYPE_FILE already defined in /usr/share/pear/Log.php on line 26
Failure in Processing the Payment
Error: Failure in Processing the Payment (ps_pdp)

Failure in Processing the Paymen
Title: Re: Fixed? PayPal Website Payments Pro
Post by: koltz on February 21, 2006, 18:17:15 PM
Got rid of those errors by just deleting them in the Log.php which to me, the message's are duplicated.  Anyway, now I just have:

Quote
Failure in Processing the Payment
Error: Failure in Processing the Payment (ps_pdp)

Failure in Processing the Payment

I am using my own credit cards for it, one isn't listed on eBay, but is the same as they are listed with the site.  Would I get the error because of this or am I still missing something.

Corey
Title: Re: Fixed? PayPal Website Payments Pro
Post by: Pam1234 on February 23, 2006, 08:36:20 AM
Thank you, kind Comenius, for sharing your code with us. I must preface this with loud "hoorays" and much dancing in the streets to celebrate your hard work. Also I really hate it that I now have to report a problem because I know how disappointing that is, and not very grateful of me. I've gotten pretty far but now I'm stuck on this error:


QuoteFatal error: Call to undefined function: getack() in /home/xxxxxxx/public_html/shop/administrator/components/com_virtuemart/classes/payment/ps_pdp.php on line 223

I realize Simba at Open Zion has addressed this  (http://www.openzion.org/forum/452.html#26) but it looks like you have incorporated his suggestions into your code. So... I'm stuck.

Thanks for any and all help!
Pam


Title: Re: Fixed? PayPal Website Payments Pro
Post by: Comenius on February 23, 2006, 16:14:01 PM
Hello,

Unfortunately I'm not really that good at PHP programming, but I know most of my errors were due to the PEAR directories not being in the right place, or not in the PHP path.  It's likely that function that is giving you an error is part of the PayPal PEAR routines, so I would check the configuration of those two items closely.

Hope this helps.   :)

-David
Title: Re: Fixed? PayPal Website Payments Pro
Post by: Pam1234 on February 23, 2006, 17:46:10 PM
Hmmm... Not sure what could be wrong. Does this look correct to you as far as .htaccess?

Quotephp_value include_path ".:/usr/local/lib/php:/home/xxxxxxx/public_html/shop/includes/PEAR"

Is there anything in the PEAR files themselves that needs to be configured?

Pam
Title: Re: Fixed? PayPal Website Payments Pro
Post by: Comenius on February 23, 2006, 18:18:06 PM
Corey,

I've gotten that error before when hitting the final submit button and I was using an incorrect CCV code.  Making sure all the credit card data was correct, though, enabled the transaction to go through successfully.  I just tested everything on my site again last night and it still works, so I'm not sure what might be wrong with your configuration.  I wish I could be more helpful! 

-David
Title: Re: Fixed? PayPal Website Payments Pro
Post by: Comenius on February 23, 2006, 18:26:59 PM
Pam,

The only thing that looks different to me from my configuration is the use of "shop" in your PHP path.  Is that your Joomla root?

Nothing needs to be configured in the PEAR files.  You just unzip them and dump them in the directory, and as long as they are in the PHP path, they should be called just fine.

If you go into your Joomla admin, what does it say your PHP path is?  (System Menu -> System Info Menu Item -> PHP Info Tab -> PHP Core Section -> include_path Variable)

Does your PEAR directory look like this?

<JoomlaRoot>/includes/PEAR/Archive
<JoomlaRoot>/includes/PEAR/Console
<JoomlaRoot>/includes/PEAR/HTTP
<JoomlaRoot>/includes/PEAR/Log

Etc...?

-David
Title: Re: Fixed? PayPal Website Payments Pro
Post by: Pam1234 on February 23, 2006, 18:46:34 PM
Well that must be the problem. Here's what mine is showing:

Quoteinclude_path .:/usr/local/lib/php:/home/xxxxxxxxx/public_html/shop/includes/PEAR

But nothing after that. No directory structure like what you have showing.

/shop/ is where Joomla is installed.

Thank you SO much for looking into this. I'm sooooooo ready to revert back to Mambo. Save me from myself. Please.

Pam
Title: Re: Fixed? PayPal Website Payments Pro
Post by: koltz on February 23, 2006, 19:08:40 PM
Quote from: Comenius on February 23, 2006, 18:18:06 PM
Corey,

I've gotten that error before when hitting the final submit button and I was using an incorrect CCV code.  Making sure all the credit card data was correct, though, enabled the transaction to go through successfully.  I just tested everything on my site again last night and it still works, so I'm not sure what might be wrong with your configuration.  I wish I could be more helpful! 

-David

Thanks for the reply.  I have tried two different credit cards and know everything was typed in correctly.  Maybe I will see if I can borrow somebodies and test in case PayPal is checking the addresses which are the same.

Thanks,

Corey
Title: Re: Fixed? PayPal Website Payments Pro
Post by: koltz on February 23, 2006, 21:29:09 PM
Ok, I think I might know my problem, but I can't verify yet.  My site, http://www.8bitclassics.com is a live site running osCommerce.  My new site which is the same URL, but the only way I can access it is by spoofing the URL in the hosts file on my computer.  I am thinking that when I go to confirm order, it communicates with PayPal, PayPal checks the URL back and is going to the old site that it sees at the 8bitclassics.com URL.  I am wondering if I put this certificate file out on the old site in the same directory, that it might process correctly.  Anyway, if anybody knows for sure, let me know.  I won't be live with this site for couple weeks at least and this is bugging me!

Then I just have to figure out USPS shipping (make it more than couple available for options).

Corey
Title: Re: Fixed? PayPal Website Payments Pro
Post by: Pam1234 on February 24, 2006, 01:00:16 AM
In desperation I have been searching through the files to see if there is some hint as to what is going on. I'm like most of us... purty smart but not when it comes to PHP.

Now here's something interesting but most likely completely meaningless. For kicks, take a look at the PEAR files that are attached to the first post. Look in PEAR -> Services -> PayPal and see if you notice WS_FTP logs in the various directories. (I'm sure they are not there intentionally. These should be removed I would think...)

I suppose it's possible that whoever owns that "jade" website shared his/her files with someone at some point, taking them directly from their site instead of using local files... and maybe, just maybe, something was changed in the process... and maybe that's why the errors?

I dunno, like I said, I'm desperate.
Pam  ;)
Title: Re: Fixed? PayPal Website Payments Pro
Post by: Comenius on February 24, 2006, 01:37:44 AM
Pam,

I noticed those log files too and also thought they were pretty weird.  I downloaded the whole archive from the PayPal Developer website, though, so I figured they were the correct files.  In fact, you can sign up for a PayPal Developer account (it's free) and go through their WPP integration guide.  That's where you'll find the link for them.

Anyhoo, sorry I don't have any solid leads!

-David
Title: Re: Fixed? PayPal Website Payments Pro
Post by: Pam1234 on February 24, 2006, 02:42:10 AM
Hi David,

Ah well. Strange stuff!

Anyway I think I *might* know what the problem is! Or at least it WILL be a problem! When I go to check out, there is no CVV blank. I understand that this is required. Where do I find that in the admin area to enable it? It's not showing under PayPal Website Pro configuration.

Pam
Title: Re: Fixed? PayPal Website Payments Pro
Post by: Pam1234 on February 24, 2006, 02:59:22 AM
OK now I'm just being a pest but the plot thickens. The CVV yes/no option is in the configuration for PayPal Website Payments Pro, it is set to "yes," but it is not showing up for the customer.

Don't know if this is a VM issue or something else. I looked in the database and couldn't find any clues.

Pam
Title: Re: Fixed? PayPal Website Payments Pro
Post by: koltz on February 24, 2006, 04:28:14 AM
The ws_ftp.log file is nothing to be concerned with.  They just used ws_ftp to upload/download the files.  Other files won't see them unless it is specifically listed in the code.  My biggest problem I think when I installed originally was all the Joomla warnings (same in Mambo), I didn't have them all correct like Global Registers.  I made sure everything was 100% on my reinstall.

Corey
Title: Re: Fixed? PayPal Website Payments Pro
Post by: Comenius on February 24, 2006, 06:24:25 AM
Hi Pam,

I must admit I hacked the Yes/No CVV thing a bit to get it to work, so it might be a bit flakey to set it from the Admin backend.  To make sure it's set correctly, open up your ps_pdp.cfg.php file and make sure you have the following:

define ('PDP_CHECK_CARD_CODE', 'YES');

That should make the CVV field show up during checkout.  It definitely has to be there, as PayPal won't accept the card without it.

-David
Title: Re: Fixed? PayPal Website Payments Pro
Post by: koltz on February 24, 2006, 13:12:32 PM
Make sure EVERYTHING(like shown above) is all capitals as I have found out :)  I had YES like Yes, and the software didn't see it and wouldn't show the line and ignored it.
Title: Re: Fixed? PayPal Website Payments Pro
Post by: Pam1234 on February 24, 2006, 16:21:43 PM
Well guys, thanks... you fixed the CVV part. At first I was so excited. Unfortunately it's still making me go... ACK! As in getack()! Same error. I'll keep plugging away at it.  ;)

Pam
Title: Re: Fixed? PayPal Website Payments Pro
Post by: Pam1234 on February 24, 2006, 16:24:31 PM
Just read in other thread that you must have SSL. Well I was getting around to that but don't have it yet. Could THAT cause the error?

Pam
Title: Re: Fixed? PayPal Website Payments Pro
Post by: Comenius on February 24, 2006, 16:30:10 PM
Pam,

I don't think so.  I'm not using SSL and it's working just fine.

-David
Title: Re: Fixed? PayPal Website Payments Pro
Post by: Pam1234 on February 24, 2006, 23:58:20 PM
So bummed about this. Can't find what's wrong.

I've been testing in "sandbox" mode. In ps_pdp.cfg.php it looks like this:

define ('PDP_MODE', 'Sandbox');

That is apparently what happens when you choose "test_mode" from the acp. I have a Sandbox acct set up. I thought maybe I'd try it "live" to see if that works. Unfortunately, if I try to switch to "live_mode," it doesn't "take." ps_pdp.cfg.php is chmod 777 and I'm not getting an error when I try to update.

So now the question is, since I can't update it automatically, and if I want to update it directly, what should that "define" line look like? (e.g., what should be there instead of 'Sandbox')

Next question:

The list of requirements on this page (http://www.openzion.org/documentations/viewcontent-3.html) include:

PEAR::Log
PEAR::Net_Url
PEAR::Net_Socket
PEAR::HTTP_Request

Is this automatically there when Pear is installed, or is it something different? How do I check for it?

I realize you're just struggling along like me, but if you have any advice at this point I'm still very appreciative.

Pam
Title: Re: Fixed? PayPal Website Payments Pro
Post by: Pam1234 on February 25, 2006, 07:14:47 AM
Progress!!

Changed the ps_pdp.cfg.php file manually from:

define ('PDP_MODE', 'Sandbox');

to

define ('PDP_MODE', 'LIVE');

Now when I place an order I get errors! Real errors! No more "getack" attacks!

Unfortunately the errors make no sense. Here's what gets spit out:

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.

I've looked at the name/address info. There isn't a "billing address state" field at all, just a zip code. I'm off to search for a solution. Stay tuned!  :)


Pam

Title: Re: Fixed? PayPal Website Payments Pro
Post by: Pam1234 on February 25, 2006, 08:05:38 AM
Hooray! Hooray! Hooray! Dance with me, people!

QuoteThank you for your order.
Your order has been successfully placed!

A confirmation email has been sent to: my@email.address

And I received both the customer and admin emails! Thanks for putting up with my millions of posts.

Note to any others getting "ack attacks" -- I'm guessing you're in test mode and it's not going through the Sandbox properly. I don't know how to make that work (I tried) but you might benefit from looking at my ps_pdp.cfg.php file. I had to take PayPal Pro live:

<?php
defined
('_VALID_MOS') or die('Direct Access to this location is not allowed.'); 

define ('PDP_USERNAME''username_api1.somesite.com');
define ('PDP_PASSWORD''yourpassword');
define ('PDP_SUBJECT''');
define ('PDP_CERTIFICATE''/home/yoursite/pear/Services/PayPal/cert/cert_key_pem.txt');
define ('PDP_MODE''LIVE'); // Sandbox should be changed here
define ('PDP_CHECK_CARD_CODE''YES');
?>


To test, set up a really cheap product with really cheap shipping since you have to use a real credit card.

Incidentally, as part of my desperate attempt at getting this to work, I wound up installing PEAR outside the site root, as is recommended at the PEAR site. It worked fine. It's supposed to be more secure that way but whether it made a difference as far as functionality I don't know. The important thing is, it worked for me. If anyone wants details, all you have to do is FTP to the directory above public_html or www. Upload pear. Change the path to pear in your .htaccess file. I also stored my store certificate there as you can see above. Done.

I followed Corey's advice and made sure register_globals was off.

So here is the applicable part of my .htaccess file with path to pear and turning register_globals off on a shared host:

php_value include_path ".:/usr/local/lib/php:/home/mysite/pear"
php_flag register_globals off


Finally, if you get errors like I did (previous post) regarding the state billing field, you can change your VM configuration.

Admin -> Configuration -> Global Settings tab. Look for "Frontend Features" and check the box next to "Customers can select a state/region?"

Life is good again!
Pam

Title: Re: Fixed? PayPal Website Payments Pro
Post by: Comenius on February 25, 2006, 17:54:35 PM
Pam,

Great news!  Congratulations!  It sure feels good to get it working, doesn't it?   :)

-David
Title: Re: Fixed? PayPal Website Payments Pro
Post by: koltz on February 26, 2006, 02:37:10 AM
Hopefully it will be included in the next version of VirtueMart.  Oh and great job you guys.

Corey
Title: Re: Fixed? PayPal Website Payments Pro
Post by: fidel on March 08, 2006, 13:02:53 PM
I have attempted to follow instructions as outlined upon this thread and associated links, but am coming up with a blank page.

Although I have manually modified the CVV to show on the front end, I was having an issue with the PDP_MODE and PDP_CHECK_CARD_CODE until I used all caps. Now this seems to be solved.

<?php
defined
('_VALID_MOS') or die('Direct Access to this location is not allowed.'); 

define ('PDP_USERNAME''XXXXXX_api1.XXXXXX.com');
define ('PDP_PASSWORD''XXXXXX');
define ('PDP_SUBJECT''');
define ('PDP_CERTIFICATE''/home/u1/XXXXXX/XXXXXX.com/html/JOOMLA/includes/PEAR/Services/PayPal/cert/cert_key_pem.txt');
define ('PDP_MODE''LIVE');
define ('PDP_CHECK_CARD_CODE''YES');
?>


One place I think I may be going wrong is with the .htaccess file. I am uncertain where I need to referrence the PEAR file or how exactly I must modify it. Would someone be more specific as to what needs to be done here, pleases? Here is what I have:

##
# @version $Id: htaccess.txt 1570 2005-12-29 05:53:33Z eddieajau $
# @package Joomla
# @copyright Copyright (C) 2005 Open Source Matters. All rights reserved.
# @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
# Joomla! is Free Software
##

Options +FollowSymLinks

#
#  mod_rewrite in use
#

RewriteEngine On

##
## NOTE!
## When using multiple Joomla sites or other web applications in sub-folders,
## you must explicitly turn the RewriteEngine off or use the settings
## recommended for the application
##

#  Uncomment following line if your webserver's URL
#  is not directly related to physical file paths.
#  Update YourJoomlaDirectory (just / for root)

RewriteBase /home/u1/XXXXXX/XXXXXX.com/html/JOOMLA

#
#  Rules
#

RewriteCond %{REQUEST_FILENAME} !\.(jpg|jpeg|gif|png|css|js|pl|txt)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*) index.php


Another reason I may have issues with getting this working is because I do not have the proper permissions set to the proper files and/or folders. If someone be more specific as to what needs to be done here, I should be able to get it going. Thanks for your help.
Title: Re: Fixed? PayPal Website Payments Pro
Post by: Comenius on March 08, 2006, 15:46:43 PM
I edited the backend config file to use either YES or NO (all caps), so hopefully that will help fix that one problem.  I've uploaded a new paypal.zip containing the updated file. 

-David
Title: Re: Fixed? PayPal Website Payments Pro
Post by: Comenius on March 08, 2006, 15:57:14 PM
Hi Fidel,

You're right you definitely need to reference your PEAR directory in your .htaccess directory.  The following line needs to be added to the end of the .htaccess file at the root of your Joomla install:


php_value include_path ".:/usr/local/lib/php:/mnt/webhosting/sites/o/openenglishworld.com/includes/PEAR"


It consists of two parts.  Your server PHP path, and your Joomla PEAR path.  They are seperated by colons.  So for me, /usr/local/lib/php is where my server has PHP installed.  /mnt/webhosting/sites/o/openenglishworld.com/includes/PEAR is where I placed the pear directory for my Joomla site.  Note that there is a period at the very beginning. 

So, the correct string is built "[period][colon][server php path][colon][joomla pear path]"

You can find your server PHP path by using the Joomla administrator backend.  System Menu -> System Info.  Click the PHP Info tab.  Under the Configuration/PHP Core section, look for "include_path".  That's the value you need to use for your server PHP path.  Your Joomla PHP path will depend on you. 

Hope this helps.  Good luck!!   :)

-David
Title: Re: Fixed? PayPal Website Payments Pro
Post by: fidel on March 08, 2006, 17:50:56 PM
Thank you for the quick and detailed response. I am guessing I have the .htaccess file configured wrong, since I am getting the following error when trying to access the front page:


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.


My actual .htaccess file looks like this with I get the Internal Server Error:

##
# @version $Id: htaccess.txt 1570 2005-12-29 05:53:33Z eddieajau $
# @package Joomla
# @copyright Copyright (C) 2005 Open Source Matters. All rights reserved.
# @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
# Joomla! is Free Software
##

Options +FollowSymLinks

#
#  mod_rewrite in use
#

RewriteEngine On

##
## NOTE!
## When using multiple Joomla sites or other web applications in sub-folders,
## you must explicitly turn the RewriteEngine off or use the settings
## recommended for the application
##

#  Uncomment following line if your webserver's URL
#  is not directly related to physical file paths.
#  Update YourJoomlaDirectory (just / for root)

RewriteBase /home/u1/XXXXXX/XXXXXX.com/html/race

#
#  Rules
#

RewriteCond %{REQUEST_FILENAME} !\.(jpg|jpeg|gif|png|css|js|pl|txt)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*) index.php
php_value include_path ".:/usr/local/lib/php:/home/u1/XXXXX/XXXXX.com/html/race/includes/PEAR"


Upon the PHP File Info, here are the various referrences I have. I am uncertain exactly which one you are referrring to, since I do not see an exact match for the information you referrenced.

Configuration File (php.ini) Path /home/u1/XXXXXX/php.ini
'
Under "Configuration PHP Core" I have the following referrences:

extension_dir /usr/local/lib/php/20020429 /usr/local/lib/php/20020429

and only this:

include_path .: .:
Title: Re: Fixed? PayPal Website Payments Pro
Post by: fidel on March 08, 2006, 17:57:05 PM
In the event it is needed, here is some additional information from the system info tab:

Relevant PHP Settings:   
Safe Mode: OFF
Open basedir: none
Display Errors: OFF
Short Open Tags: ON
File Uploads: ON
Magic Quotes: OFF
Register Globals: ON
Output Buffering: OFF
Session save path: /tmp
Session auto start: 0
XML enabled: Yes
Zlib enabled: Yes
Disabled Functions: none
WYSIWYG Editor: No WYSIWYG Editor
Title: Re: Fixed? PayPal Website Payments Pro
Post by: Comenius on March 08, 2006, 18:00:39 PM
Interesting.

If your server PHP include_path is only ".:", then I would think your string might be:

php_value include_path ".::/home/u1/XXXXX/XXXXX.com/html/race/includes/PEAR"

or maybe just:

php_value include_path ".:/home/u1/XXXXX/XXXXX.com/html/race/includes/PEAR"

Do either of those work?

-David
Title: Re: Fixed? PayPal Website Payments Pro
Post by: fidel on March 08, 2006, 19:48:22 PM
I am now working on a funky computer whose FTP is a bit strange and can't see the .htaccess file. Nevertheless, I loaded it with the various changes to the file and each renders an internal server error.
Title: Re: Fixed? PayPal Website Payments Pro
Post by: simbo1905 on March 17, 2006, 10:05:43 AM
i ran the openzion code for a number of months against the early mambo version of virtuemart on some live stores. his forums have lost all of the original posts - i guess that he lost them during an upgrade.

on his forum i had pointed out that the PayPal Pro is both PayPal Direct Payment ("credit card on your site") and PayPal Express Checkout ("choose shipping addresses on the paypal site, no billing details on your site, choose source of payment funds at paypal site"). if you read the PayPal Pro PDF documentation it states that "Direct Payment is not a stand alone product. You must impliment Express Checkout if you wish to use Direct Payment".

the openzion module only impliments Direct Payment. on his forums we had talked about Express Checkout. at one point in time he said that he did not think that Express Checkout could be done. i don't know what his current opinion is - and with his forum being empty you cannot see the history of the discussion (as he is a developer it is strange that the forum is empty - perhaps he does not want anyone to see the debate about the legality of his payment module] :-(

i had a go at developing the full PayPal Pro solution by writing an Express Checkout module. i gave up. see this post as to why:

http://virtuemart.net/index.php?option=com_smf&Itemid=71&topic=16348.0

there is some talk that PayPal may "turn a blind eye" if you use Direct Payment ("credit card on your site") but not Express Checkout ("choose shipping addresses on the paypal site, no billing details on your site, choose source of payment funds at paypal site"). i have no idea if that really is the case. i cannot afford to risk it. certainly if a lawyer reads the terms and conditions they will say it is black and white. you cannot use Direct Payment (hense the openzion code) unless you impliment Express Checkout (which is much harder) without breaching the terms and conditions of the PayPal Pro agreement.
Title: Re: Fixed? PayPal Website Payments Pro
Post by: fidel on March 24, 2006, 12:56:44 PM
Quote from: Comenius on March 08, 2006, 18:00:39 PM
If your server PHP include_path is only ".:", then I would think your string might be:
php_value include_path ".::/home/u1/XXXXX/XXXXX.com/html/race/includes/PEAR"
or maybe just:
php_value include_path ".:/home/u1/XXXXX/XXXXX.com/html/race/includes/PEAR"
Do either of those work?
-David

David,

Neither of these options work and render an internal server error. I have some ideas as to what may be the problem.

php_value include_path ".:/usr/local/lib/php:/home/u1/XXXXX/XXXXX.com/html/race/includes/PEAR"

As you have referrenced here to your initial path, it is not the same as mine, since mine seems to be made empty. The first segment seems to be left empty on mine. Looking at this, though, one would think the path referrences a directory. I do not have a directory anywhere with that name. All my php.ini files, if this matters, are located in the usr directory.

I'm still working on it. But need a few hours of sleep.

".:/usr/local/lib/php:/home/u1/XXXXX/XXXXX.com/html/race/includes/PEAR"

".:/usr/local/lib/php:/home/u1/XXXXX/XXXXX.com/html/race/includes/PEAR"

Title: Re: Fixed? PayPal Website Payments Pro
Post by: simbo1905 on March 24, 2006, 13:17:07 PM
Quote from: fidel on March 24, 2006, 12:56:44 PM
php_value include_path ".:/usr/local/lib/php:/home/u1/XXXXX/XXXXX.com/html/race/includes/PEAR"

As you have referrenced here to your initial path, it is not the same as mine, since mine seems to be made empty. The first segment seems to be left empty on mine. Looking at this, though, one would think the path referrences a directory. I do not have a directory anywhere with that name. All my php.ini files, if this matters, are located in the usr directory.

you are correct that it is unlikely that his path and your path are the same. also it might not be easy to figure out where pear is on the server and the servers version of pear may be out of date - getting it up to date can be hard if it is a shared host.

i took the approach of overriding the servers php.ini by setting the include path at the top of the .cfg.php script with

ini_set("include_path", ".:../:./include:../include");

where i used *relative* paths to folders *within my site* that is to say a private copy of my own version of pear in my site.

it took a bit of jiggery stupid card gamey to get all of the correct pear items into my site, and to set the location to the directory to be correct from all the script locations in my site (e.g. ./pear:../pear:../../pear) but the net effect is that if the servers version of pear gets upgraded it does not kill that site.

even if you control the server it is useful that sites can be on different versions of pear so that you can install new pear features on new sites without risking breaking your older sites.

good luck.
Title: Re: Fixed? PayPal Website Payments Pro
Post by: fidel on March 24, 2006, 13:38:43 PM
Thanks for the info, I am beginning to believe that your recommendations are beyond my skills. I have spent too many hours of too many days trying to get this to work.

Now, to top it off, I can no longer save any functions within Joomla or Virtuemart using the control panel. Joomla control panel isn't showing in the control panel, only the Virtuemart control panel. Although I performed an upgrade earlier in the evening to Joomla 1.0.8 and Virtuemart 1.0.3, I tested all functions and it seemed to be working then.

I tried reinstalling the upgrades, thinking I deleted some files. I am left to deleting the site and database and reverting to backup, unless one of you might now what may have happened. Anyhow, I give up on PayPal Website Payments Pro. The site worked perfectly prior to this. I would be better off getting SSL when the site goes live and processing them by hand or enlisting help that is more adept in these operations.
Title: Re: Fixed? PayPal Website Payments Pro
Post by: simbo1905 on March 24, 2006, 13:48:51 PM
Quote from: fidel on March 24, 2006, 13:38:43 PM
Thanks for the info, I am beginning to believe that your recommendations are beyond my skills. I have spent too many hours of too many days trying to get this to work.
[::snip::]
I would be better off getting SSL when the site goes live and processing them by hand or enlisting help that is more adept in these operations.

sorry to hear that. as i said i moved from paypal pro to authorize.net (thru RBSLynx and CharterOne). i have been helping folks out with that on these forums. it does not need pear. there are pros and cons to the different services but at the moment authorize.net is a good solution (it uses curl also but has a much simpler wire protocol).

if you would like we can buddy up at the business level - the more partners the better. i currently host my own site on my own server and taking payments for clients into my own business account in the states. teaming up with other independent guys means more business both ways and more support for both our clients all round.

:)
Title: Re: Fixed? PayPal Website Payments Pro
Post by: luthien on March 25, 2006, 16:30:42 PM
Hello,

I got the following error, any idea of how to solve it?

thanks!

object(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(27) "Inactive Billing Agreement." ["LongMessage"]=> string(149) "The transaction was refused because your billing agreement is inactive. Log into PayPal to check your billing agreement or contact customer service." ["ErrorCode"]=> string(5) "10501" ["SeverityCode"]=> string(5) "Error" ["ErrorParameters"]=> NULL }
Failure in Processing the Payment:

The transaction was refused because your billing agreement is inactive. Log into PayPal to check your billing agreement or contact customer service.
Error: Failure in Processing the Payment (ps_pdp)


Failure in Processing the Payment:

The transaction was refused because your billing agreement is inactive. Log into PayPal to check your billing agreement or contact customer service.
Title: Re: Fixed? PayPal Website Payments Pro
Post by: koltz on March 25, 2006, 21:18:57 PM
I just updated to VirtueMart 1.04 and when checking out I get the following error:

QuoteError: Credit Card Type not found.

For Credit Card Type:, it is now blank, no selection box?

Corey
Title: Re: Fixed? PayPal Website Payments Pro
Post by: luthien on March 25, 2006, 22:24:13 PM
Quote from: luthien on March 25, 2006, 16:30:42 PM
Failure in Processing the Payment:

The transaction was refused because your billing agreement is inactive. Log into PayPal to check your billing agreement or contact customer service.
Error: Failure in Processing the Payment (ps_pdp)

Failure in Processing the Payment:

The transaction was refused because your billing agreement is inactive. Log into PayPal to check your billing agreement or contact customer service.

Oh well, now is working. That was the error: the billing agreement was inactive. It's working fine and the only problem I can see is the order status showing Pending instead of Confirmed.
Title: Re: Fixed? PayPal Website Payments Pro
Post by: AnyTimeCoMM, LLC. on April 07, 2006, 05:17:09 AM
To now avail and to all the hard luck tries with all of this I still receive the following!

Fatal error: Call to undefined function: getack() in /var/www/vhosts/xxxxxxxx.com/httpdocs/administrator/components/com_virtuemart/classes/payment/ps_pdp.php on line 229

I have followed every reply in this thread and I think PAM was the closets but I am not going to put this live until I know it is working.. Any ideas on why I still receive the ACK..

btw we have figured this out so far..

                 // BEGIN
                 // comment out this line and it works
                 // and replace it with to see it work but that means
                 // NO error processing
                 //if ("1" == "Failure") {
                 // END
                 if ($response->getAck() == "Failure") {
                        $errors = $response->getErrors();



Title: Re: Fixed? PayPal Website Payments Pro
Post by: Pam1234 on April 07, 2006, 05:36:08 AM
Hi AnyTime,

I'm as dumb as a brick when it comes to PHP but maybe if you post your ps_pdp.cfg.php and .htaccess files here we can all stare at the code and see if fresh eyes can find anything... who knows?  ;)

I'm also convinced that sometimes these things have to do with FTP programs that don't completely overwrite files. As awful as this sounds, perhaps a fresh install and going through all the steps again would be useful.

Quote from: fidel on March 08, 2006, 19:48:22 PM
I am now working on a funky computer whose FTP is a bit strange and can't see the .htaccess file. Nevertheless, I loaded it with the various changes to the file and each renders an internal server error.

Fidel, I don't know what FTP program you are using. I use FTP Pro and when I look to the right where the buttons are for "ChgDir" and "MkDir" etc. there is a blank. If you type -l (that's a dash followed by a lowercase L) in the blank and refresh, you can see the .htaccess file. I guess that's not very clear but it's a little hard to explain. See if there's a blank where you can type the -l and see if that works for you.

Sorry some folks are still having trouble. This thing is a real hassle!

Pam
Title: Re: Fixed? PayPal Website Payments Pro
Post by: AnyTimeCoMM, LLC. on April 07, 2006, 05:41:39 AM
Pam1234

Here they are.. Thanks for the FRESH EYES!!!


ps_pdp.cfg.php

<?php
defined('_VALID_MOS') or die('Direct Access to this location is not allowed.');

define ('PDP_USERNAME', 'sales_api1.xxxxxxxx.com');
define ('PDP_PASSWORD', 'xxxxxxxxxxxxxxxx');
define ('PDP_SUBJECT', '');
define ('PDP_CERTIFICATE', '/var/www/vhosts/xxxxxx.com/httpdocs/administrator/components/com_virtuemart/classes/payment/paypal_dp/'
define ('PDP_MODE', 'Sandbox');
define ('PDP_CHECK_CARD_CODE', 'YES');
?>

and .htaccess

php_value include_path ".:/usr/include/php:/var/www/vhosts/xxxxxxx.com/httpdocs/includes/PEAR"

Thanks in advance.

Title: Re: Fixed? PayPal Website Payments Pro
Post by: Pam1234 on April 07, 2006, 06:34:18 AM
Hey AnyTime, you might want to be careful about posting username/password here. Edit your post and throw in a few x's, okay? :-)

Here is my 2 cents, which isn't even worth that much.

It looks like your path might be incorrect, both in the ps_pdp.cfg.php file and the .htaccess file. I don't think there should be a .com anywhere in the path. Try logging into your Joomla site admin. Go to System, then System Info and scroll down to your configuration file settings. Look for:

$mosConfig_absolute_path = '/home/username/public_html';  

Your path should look similar to that, maybe with /var/www instead of public_html, but you get the idea. That should be the path to your installation, and you would follow it of course by the applicable directories that hold the files. I don't think you'll find a domain name with a .com extension in there... but maybe there's something special about your hosting...? If there really is a .com in the path then forgive me, I've just never seen that before!  :-[

Next, look at my ps_pdp.cfg.php file again. Notice where it says define PDP_CERTIFICATE, I have the cert_key_pem.txt in there, not a directory with a trailing slash as the last thing. Find out where that file is and name it directly. I don't think the location matters, just that you get the path to it correct in the configuration.

Change PDP_MODE from Sandbox to LIVE (all caps) and see if that helps. That is the final thing that did the trick for me. Or try putting SANDBOX in all caps if you feel confident about using the PayPal sandbox.

Someone suggested turning register globals off. Don't know if that applies to you. I did so in my .htaccess file which you can see in my previous post.

Hope some of this is useful.

Pam
Title: Re: Fixed? PayPal Website Payments Pro
Post by: AnyTimeCoMM, LLC. on April 07, 2006, 06:40:22 AM
Thanks for the XXXX comment.. Its sandbox anyway so no biggie..

I have fixed that.

As for your comments about .com.. that is how the box is.

As for the direct location to pem file. I will change that to match. And register globals if I still get ack!

Thanks will update shortly.
Title: Re: Fixed? PayPal Website Payments Pro
Post by: AnyTimeCoMM, LLC. on April 07, 2006, 06:47:58 AM
 :) :D ;D :) :D ;D :) :D ;D :) :D ;D

Let's DANCE BABY!!!


The placing the full path and file in the config for the pem is what did it!!! WHAT A TREAT!

THanks you so much....
Title: Re: Fixed? PayPal Website Payments Pro
Post by: Pam1234 on April 07, 2006, 07:25:36 AM
Yay!  :D
Title: Re: Fixed? PayPal Website Payments Pro
Post by: Bingo on April 16, 2006, 00:12:33 AM
Is anybody left out there?

I have read this thread and followed all the tips (maybe left out some), that is why I am having this Fatal Error:main(): Failed opening required 'Services/PayPal.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/xxxxxxx/public_html/redcarpetaccessories/administrator/components/com_virtuemart/classes/payment/paypal_dp/api_init.php on line 11

Any ideas? Thanks in advance
Title: Re: Fixed? PayPal Website Payments Pro
Post by: AnyTimeCoMM, LLC. on April 23, 2006, 06:31:48 AM
This Thread should be made STICKY!!!
Title: Re: Fixed? PayPal Website Payments Pro
Post by: mrogers33us on May 10, 2006, 18:30:06 PM
OK..I posted this elsewhere too...but to make sure it might get viewed I'll post it here too...

I'm implementing the integration of PayPal website payments pro...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
Title: Re: Fixed? PayPal Website Payments Pro
Post by: sumwatt on May 11, 2006, 18:13:45 PM
mrogers33 - see my post at:

http://virtuemart.net/index.php?option=com_smf&Itemid=71&topic=17445.0

Scroll down to the end of the thread - I posted a workaround for you using the ini_get() and ini_set() method which should work for you.
Title: Re: Fixed? PayPal Website Payments Pro
Post by: mizanation on October 10, 2006, 20:24:53 PM
is anyone else having problems with processing AMEX transactions?
Title: Re: Fixed? PayPal Website Payments Pro
Post by: koltz on October 10, 2006, 20:34:00 PM
I have, but not sure since it isn't very often that I have a customer with AMEX and I don't know if it was ever resolved since it has been a few months since I had the issue.
Title: Re: Fixed? PayPal Website Payments Pro
Post by: mizanation on October 10, 2006, 20:47:47 PM
this is a problem.  we need to get this fixed.  many people use AMEX.
Title: Re: Fixed? PayPal Website Payments Pro
Post by: land0 on October 06, 2007, 19:51:22 PM
Quote from: Comenius on February 15, 2006, 05:13:38 AM
   Anyhow, grab that attachment and follow the directions on his site which are still fine for installing and configuring it:  http://www.openzion.org/documentations/view.html

It seems that that Openzion is no more. :(

Anyone happen to have the instructions to set this up?
Title: Re: Fixed? PayPal Website Payments Pro
Post by: dandee750 on October 09, 2007, 22:02:44 PM
 :( :( :( :( openzion.org not there any more does anyone have a copy of the documentation that they will email me
Title: Re: Fixed? PayPal Website Payments Pro
Post by: chac416 on December 19, 2008, 17:53:10 PM
is there a WPP for the new VM1.1 ?