VirtueMart Forum

VirtueMart Dev/Coding Central: VM1 (old version) => Development Projects, Modifications, Hacks & Tweaks. VM1.1 => Payment Modules => Topic started by: mrethers on September 24, 2005, 01:08:28 AM

Title: Paypal Website Payment Pro
Post by: mrethers on September 24, 2005, 01:08:28 AM
Hi everyone, I just finished and published a paypal website payment pro payment module for Mambo-PhpShop. It works great for me but is still in beta testing. I'll be glad to get your feedbacks on it.

http://www.openzion.org/news/phpshop/direct-payment-3.html

I find it easy to install but as you may not be a PHP Guru, I wrote a documentation to deploy and configure the solution. If you have any question, go to my website http://www.openzion.org to let me a message or use the forum.

The website has just been online so if any problems, let me a few time to sort it out. I'll be very active in this community from now on, I'm already working on the Fedex Shipping module so keep in touch and although I'll be posting my work here, check my website once in a while to have the most up to date info.
Title: Re: Paypal Website Payment Pro
Post by: Ckovac on September 24, 2005, 04:30:08 AM
that url doesn't resolve in the DNS... ?
Title: Re: Paypal Website Payment Pro
Post by: lemonyellow on October 07, 2005, 23:04:11 PM
Has anyone checked this module out?

Regards

Rhys
Title: Re: Paypal Website Payment Pro
Post by: Ckovac on October 11, 2005, 03:12:52 AM
It resolved now, I've downloaded it but it doesn't seem to be a module or component.  It requires you to acutally copy files around and such and I don't feel like messing with that right now so.. bleh.  Someone look at it. ;)
Title: Re: Paypal Website Payment Pro
Post by: lbatech on October 16, 2005, 18:30:15 PM
openzion.org is currently down and the email addresses for the developer and website contact bounce. i have copied the files to http://www.60hertz.com/paypalapi/ so that folks can take a look. the screenshots show how to grant API access to your paypal account. the original code is in paypalpro.zip. you need to install the PayPal SDK which is zipped up at that link.

have tried the out a bit. it needs the following in the ps_pdp.cfg.php

define ('PDP_CHECK_CARD_CODE', 'YES');

as PayPal pro wantes the CCV security code to make a direct payment.

error handling works a bit better if you check whether the response is actually an array or it will barf on a single error:

         if ($response->getAck() == "Failure") {
             $errors = $response->getErrors();
            $d["error"] = $PHPSHOP_LANG->_PHPSHOP_PAYMENT_ERROR . ":<br />\n";
            $d["error"] .= "<ul>\n";
            if( is_array($errors ) ) {
                foreach ($errors as $error) {
                    $d["error"] .= "<li>" . $error->getLongMessage() . "</li>\n";
                }
            }
            else {
                $d["error"] .= "<li>" . $errors->getLongMessage() . "</li>\n";
            }
            $d["error"] .= "</ul>\n";
               
                return false;
         }

i have put the modified ps_pdp.php at the link above.

at the moment i am stuck at "You do not have permissions to make this API call" the screenshots show that i have granted all the API permissions to the API username to my paypal account. my thoughts are that the code is not saying which paypal user to pay via the api username. (e.g. with a hosted solution on API user for the hoster will pay many different paypal users hosted on their site???). i am currently reading up on this. the paypal SDK includes WebConsole application. you have to set it with a temporary folder on the server and then upload your API cert '.pem' file. after that you can then make test API calls and it will generate test PayPal code for you. hopefully with this i can figure out what i am missing.
Title: Re: Paypal Website Payment Pro
Post by: diske52 on October 17, 2005, 07:30:21 AM
Alright from what I can see, this is basically a credit card processing solution from paypal. People enter #'s on your site, in the background its sent to paypal, they process it, and send back a OK, the order completes. And I assume you need to have a SSL on your site for this as well, so the communication is secure to and from paypal.

Similiar to getting an account at authorize.net and paying them more money, no?

Paypal Pro so you can use this module, is...
$20/month, 2.2% to 2.9% each transaction + $0.30 , but no setup fee.

Authorize.net & Merchant Account is...
Gateway $20-$35/monthly + Merchant $50-$90/monthly +$100-$300 Setup + 2.5% + $0.30 each transaction..

Come to think of it, new customer of mine was just paying Yahoo! almost a hundred a month with hosting, store, merchant, gateway, etc.

And both solutions look the exact same to a customer on your website? But also 1 less middleman, paypal for all transactions.

Please fill me in, started learning all this, well, uh just now ;)

Edit:: Just found awesome picture explaining pricing to me, helps when I should be sleeeping.

https://www.paypal.com/cgi-bin/webscr?cmd=_display-pro-fees-outside

Thanks,
Chuck
Title: Re: Paypal Website Payment Pro
Post by: maybelogic on October 17, 2005, 22:03:36 PM
i think you are right about what it is
my question is how do i get this to work

i emailed the the guy at zion or ecubes and he was nice
i was hoping to get some more specifics on how to implement this feature into
mambo php-shop, ive gone through his stuff and uploaded the files
downloaded the cert and to the best of my knowledge put the right path in

cept when i enter in a cc and try to check out i get to a blank page
referencing  the index in the address and everythign stops and nothing goes through
in the sandbox

i hope to implement paypal pro for a client
and look forward to more dialog on the endeavor
Title: Re: Paypal Website Payment Pro
Post by: diske52 on October 21, 2005, 15:07:30 PM
Arg to upgade my paypal account to biz only took a second, but now I gotta wait 3 days to get my API certificate. I did however set the config to "Test" enter my username, pass, and typed in phone certificate name to test this out... Payment page took my credit card number, but on Confirm order i just got a blank index screen.

I watched each page during checkout, with debug, and got no errors until Confirm Order. So you cannot test this without a paypal API certificate eh? Damn, I'll reply here in 3 days time!

Chuck -
Below is my last debug from the normally white index page after confirm order.

Shop Debug: A Session called phpShop was successfully started!
Tip!
Begin of File: /home/xxxxx/public_html/administrator/components/com_phpshop/global.php
ToolTip-- Checkout Debug--
Subtotal: 2
Taxable: 2
Payment Discount: 0 (untaxed: 0)
Coupon Discount: 0
Shipping: 7
Shipping Tax : 0
Tax : 0.13
------------------------
Order Total: 9.13
Title: Re: Paypal Website Payment Pro
Post by: diske52 on October 21, 2005, 17:15:00 PM
Quote from: lbatech on October 16, 2005, 18:30:15 PM
openzion.org is currently down and the email addresses for the developer and website contact bounce. i have copied the files to http://www.60hertz.com/paypalapi/ so that folks can take a look. the screenshots show how to grant API access to your paypal account. the original code is in paypalpro.zip. you need to install the PayPal SDK which is zipped up at that link.

Why would you allow access to a 3rd party? The top section is to specify a API username other than your own, correct? It loooks as though you are alot farther along, but I still must ask:

The API Certificate, (which basically gives all your access, not needing 3rd party authorization) is uploaded to your folder, but did you type in the relative path correctly within the mambo/phpshop/payments/ "Paypal Website Payment Pro" configuration page? The author didnt really specify how the URL should be typed.

Just my two cents. Also, did paypal make you wait 3 days for an API certificate? Thats where I stand.

Chuck
Title: Re: Paypal Website Payment Pro
Post by: kfilin on October 21, 2005, 22:00:05 PM
Hi Guys!
I'm also trying to get this working for the past 3 days
To make the long story short I can't checkout as of now.
I receive this error message:
API initiation error: Could not find certificate file '/home/******/administrator/components/com_phpshop/classes/payment/paypal_dp/'
The thinh is that i Have certificate file in this(paypal_dp) folder.
While searching the net for the cause of the problem came across this tool, i'm posting link
https://www.paypaltech.com/tools/pem2p12.php
Well i did exactly what it says in the instruction still the same error and i can't checkout.
Any ideas or hintd where to look for solution?
Any input appreciated/
Good luck to everyone.
Kirill

P.s. if you look at the following document
https://paypaltech.com/php_pear/
it says i quote:
"Download the Sample compressed file to the "pear_setup" folder on your Desktop
Extract the Sample compressed file to the "pear_setup" folder on your Desktop
Click on the "samples" folder
Click on the "include" folder
Click on the "api_config.inc.php" file using a text editor
Change the $pear_path so that it matches the root path to your new 'pear' directory on your webserver.  Hint: the new 'pear' directory, not the regular 'pear' directory
Save the api_config.inc.php file
Upload the "samples" folder to a folder on your website. Make sure that you can access the folder from a web browser. "

so do we put certificate we obtain from PayPal at any place "that you can access the folder from a web browser"
or is there any specific place?
If you look at the SAMPLES folder there is another folder "includes" in it which consist of:
api_config.inc.php
cert_key_pem.txt
cert_key_pem-1.txt
dummy_vars.inc.php
According to that does that mean we have to have it setup the same way and create/copy/smth else those 3 files besides the certificate file. Well quite confusing.
I hope that  can help to resolve the problem somebody who understand it better than me.
Best Regards
Kirill


Title: Re: Paypal Website Payment Pro
Post by: diske52 on October 22, 2005, 08:38:22 AM
Excuse me im tired but,

From what I read this morning, PEAR may/may not be already installed with your PHP on your webhost.

If not, you gotta install a few functions from it, and type certain commands within your server, to enable the functions. Essentially they are gears.

The PEAR GEARS (hah) Help run the actual script files that all of us here are trying to get working. The examples you provided more than likely, gave our developer who started this thread, some direction for creating this.

If you wanted, you could take the pear gears and try to re-program what we've already been provided by the files located at both www.openzion.org. and www.60hertz.com/paypalpro/

Either way, thanks for your post, I'll re-read it in the morning and see what I can get done.

Good luck everyone ;)

Chuck
Title: Re: Paypal Website Payment Pro
Post by: Tom Miller on October 26, 2005, 14:26:59 PM
On the path to the cert, mine works like this:

/home/xxxx/public_html/administrator/components/com_phpshop/classes/payment/paypal_dp/cert_key_pem.txt

where I include the entire file name....
Title: Re: Paypal Website Payment Pro
Post by: tomaster on November 10, 2005, 03:14:03 AM
Hi everyone,

I've been struggling to get paypal website payment pro to work for a few days now.. but now I got this error message:

---
Error: Credit Card Type not found.
---

Can anyone help/advise? I am stuck 

Best,

Toma
Title: Re: Paypal Website Payment Pro
Post by: Comenius on November 23, 2005, 05:29:47 AM
Quote from: tomaster on November 10, 2005, 03:14:03 AM
---
Error: Credit Card Type not found.
---

I'm getting the same problem, using a valid MasterCard number (haven't tried Visa or AmEx).  Anyone know the issue, or a fix?
Title: Re: Paypal Website Payment Pro
Post by: Soeren on November 23, 2005, 15:21:43 PM
We have a bugtracker and it has a search function!

Error: Credit Card type not found (http://virtuemart.net/index.php?option=com_flyspray&Itemid=83&do=details&id=306)

ciao, Soeren
Title: Re: Paypal Website Payment Pro
Post by: Comenius on December 06, 2005, 05:34:44 AM
Does anyone have this addon working?  I can get it to the point where you confirm the order, and then it barfs out a huge number of errors about there not being a first name, a last name, a street address, a city, etc.  Yet I absolutely entered all of these things in during the checkout process!  Ack!

Any help would be greatly appreciated...   :)
Title: Re: Paypal Website Payment Pro
Post by: clintanderson on December 06, 2005, 18:01:09 PM
So how do you install the PEAR on the local so you can try to reference it from the api_config.inc.php file. I don't understand this stuff at all, and it is very frustrating. I can do just about anything, but this is getting rediculous!

Clint
Title: Re: Paypal Website Payment Pro
Post by: Comenius on December 06, 2005, 19:16:54 PM
Check my post in the other thread...  In short, I edited my .htaccess file to expand the PHP include_path variable to reference the PayPal 2.0 SDK.

Tell you what, getting this thing to work is making landing on the moon look easy!

:o
Title: Re: Paypal Website Payment Pro
Post by: webgobe on January 05, 2006, 13:51:14 PM
Quote from: tm2000 on October 26, 2005, 14:26:59 PM
On the path to the cert, mine works like this:

/home/xxxx/public_html/administrator/components/com_phpshop/classes/payment/paypal_dp/cert_key_pem.txt

where I include the entire file name....
OK, I see, but it's working for you?
I still get that API initiation error, I tried to give here all sorts of URL's, relative, absolute, UNIX server paths, etc, and got the same error.
Any hint is appreciated!

Later edit:

Never mind,, I got the solution, placed the certificate file  in the siteroot and giving in the config just the plain certificate file name!
But this is not the heaven - yet - some issues still remained!
the data is somewhat lost between my site and PayPal, I got responses about missing parameters, another issue to resolve, so you can hit me with your ideeas ;)

Title: Re: Paypal Website Payment Pro
Post by: Comenius on January 05, 2006, 17:17:44 PM
I was unable to get this (or any other PayPal WPP) module to work with VirtueMart.  As I was able to get a different one working with osCommerce quite easily, I went with that solution.  To the best of my knowledge, there is no working WPP module for VirtueMart.
Title: Re: Paypal Website Payment Pro
Post by: webgobe on January 05, 2006, 17:34:15 PM
Thanks.. It's pretty discouraging, but I still try to get it working. I'm pretty close, I think, I will let you know, guys, if I succeed!
Of course, you will have the solution posted here!
Title: Re: Paypal Website Payment Pro
Post by: clintanderson on January 05, 2006, 18:28:09 PM
I have given up on Virtuemart and WPP I think I am going to have to go with oscommerce, they already have a module for WPP. I really wanted to go with virtuemart, but I want WPP to work. Thanks I will keep checking to see if you guys get something.

Clint
Title: Re: Paypal Website Payment Pro
Post by: kleinbaas on May 19, 2011, 16:02:28 PM
What's the latest on this? Is there now a way to get Website Payment Pro working with Virtuemart?