News:

Looking for documentation? Take a look on our wiki

Main Menu

Fixed? PayPal Website Payments Pro

Started by Comenius, February 15, 2006, 05:13:38 AM

Previous topic - Next topic

Comenius

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]

mrhasbean

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

koltz

#2
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? 

koltz

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?

koltz

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

koltz

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

Pam1234

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 but it looks like you have incorporated his suggestions into your code. So... I'm stuck.

Thanks for any and all help!
Pam



Comenius

#7
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

Pam1234

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

Comenius

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

Comenius

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

Pam1234

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

koltz

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

koltz

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

Pam1234

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  ;)