Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

PayPal WPP Direct Payments & Express Checkout Support


dynamoeffects

Recommended Posts

In my humble opinion, the correct way to deal with losing PayPal customers' order detail is to fix the problem, not to run two cart systems in parallel. It will be a maintenance nightmare and confusing to the customer.

 

If the customer hits the wrong button, the product would go into the wrong cart. Not to mention that the PayPal cart has very limited options for computing shipping costs, which was what caused me to look for something better in the first place.

 

The way I deal with PayPal customers in my store is to use both PayPal WPP and PayPal IPN. Express Checkout is offered on the login and shipping pages. On the payment page, I disable the EC button in WPP, so only the credit card fields are displayed, and present IPN as "PayPal". I change the name displayed for WPP to "Credit/Debit Card", so there is a distinction to the customer between PayPal and Credit Cards. I have added code to both modules to display icons. For IPN, I display the PayPal acceptance mark. For WPP, I display a graphic that contains the acceptance marks for the four credit card brands. It works pretty well for me.

 

This is a screenshot showing my solution.

 

payment_types.jpg

--Glen

 

I set mine up like that as well... and added a link to view an image of the CCV number. I dig that.

 

What I am still having an issue with is the both ec and wpp bring up blank pages for me. I am fighting with the fact this system is more for apache but using IIS. Its not like I cant use apache I just have this site along with many others on an IIS machine.

 

I believe I have the directories setup... cert installed... and everything correctly pointing at the files properly so it seems. The thing is I am using C:/pathtocert and C:/pathtopear instead of C:\path because C:\path shows up as C:path missing the \ even if i double them up like this C:\\Path.

 

Anyone here savy with IIS php and this mod. I have made everything else work great. Registered globals is off and the cart is setup with that mod.

 

Any tips or points I may be forgetting or overlooking about how to properly set this mod up... Permissions or something? Or any ideas?

 

Thanks for any replies that may help!

Link to comment
Share on other sites

1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'MODULE_PAYMENT_PAYPAL_DP_PEAR_PATH'' at line 1

 

update configuration set configuration_value = 'C:\Inetpub\wwwroot\website.com\catalog\pear\' where configuration_key = 'MODULE_PAYMENT_PAYPAL_DP_PEAR_PATH'

 

Also if I try to update the directory with C:\ I get this error...

 

MySQL server version 4.1.20

Edited by wwalbaum
Link to comment
Share on other sites

I set mine up like that as well... and added a link to view an image of the CCV number. I dig that.

I just got around to adding a popup with the card images pointing out the CVV numbers today. I had been meaning to do it for quite a while. I sto^H^H^Hborrowed a page from somewhere, then added osC styles to it. The next step is to move all the text to a lanugage specific include file, then I'll send it to Brian for inclusion in a future update.

 

What I am still having an issue with is the both ec and wpp bring up blank pages for me. I am fighting with the fact this system is more for apache but using IIS. Its not like I cant use apache I just have this site along with many others on an IIS machine.

I can't help with IIS configuration, but I think I recall someone in this support thread getting it to work on IIS, but it has been a while.

Link to comment
Share on other sites

I can't help with IIS configuration, but I think I recall someone in this support thread getting it to work on IIS, but it has been a while.

 

I snagged the image as well hehe but no worries on that one probably the same one ;) hehe I really wanted the faded image that is smaller just shows a little image of the sig area but found that card so I just made a link to it.

 

Anyhow...

 

I put on the ec_process.php a few echos... one before step 1 one after step 1 and one after step 2...

 

Gets to the before step one echo but never gets through step 1...

 

It has to be something bugged out there... Any ideas? I will be studying meanwhile. Appreciate the help.

Link to comment
Share on other sites

function ec_step1() {

if (is_array($this->modules)) {

if (is_object($GLOBALS[$this->selected_module]) && ($GLOBALS[$this->selected_module]->enabled) ) {

echo ' Returning If Statement from step 1';

return $GLOBALS[$this->selected_module]->ec_step1();

 

that echo statement shows but I am not sure what else to test for to see if it is getting what is needed to start step2. The echo statements before step 2 do not get parsed...

 

Any ideas? thanks

Link to comment
Share on other sites

The imfamous Blank Page problem :'(

 

I've searched for it in this thread and gone thru all the posts.

-I got a new API =nothing

-switched the file name to .pem insted of .txt =nothing

-double checked all the roots paths and user info = nothing

-changed the timeout in that http file = nothing

 

Can anyone help me with this? checkout_process.php and ec_process.php are always comming up blank when I try to check out.

 

I have it set to Sandbox and I'm using a sandbox API cert. Where is the error log?

 

TIA

Link to comment
Share on other sites

The imfamous Blank Page problem :'(

 

I've searched for it in this thread and gone thru all the posts.

-I got a new API =nothing

-switched the file name to .pem insted of .txt =nothing

-double checked all the roots paths and user info = nothing

-changed the timeout in that http file = nothing

 

Can anyone help me with this? checkout_process.php and ec_process.php are always comming up blank when I try to check out.

 

I have it set to Sandbox and I'm using a sandbox API cert. Where is the error log?

 

TIA

 

Wraith622, I am having this same problem!! So very frustrating. I'm even working with someone at PayPal and he can't figure it out yet. please post back if u solve this, as will I.

Link to comment
Share on other sites

Wraith622, I am having this same problem!! So very frustrating. I'm even working with someone at PayPal and he can't figure it out yet. please post back if u solve this, as will I.

 

I've been working with a guy on these forums and so far he's found out that after ec_step1 its not going to paypal like it should. Wish I knew why.

 

-tried installing osCom in a "catalog" dir insted of my root dir, but there was no change.

Link to comment
Share on other sites

I've been working with a guy on these forums and so far he's found out that after ec_step1 its not going to paypal like it should. Wish I knew why.

 

-tried installing osCom in a "catalog" dir insted of my root dir, but there was no change.

 

I also just tried a fresh install of OSC on my server, then installed the WPP module. Still no dice.

Link to comment
Share on other sites

Any luck yet?

 

In Admin, go to Tools -> Server Info. Scroll down the page to the CURL section to see if CURL support is enabled in PHP. It will look something like this:

 

curl
CURL support 	enabled
CURL Information 	libcurl/7.10.3 OpenSSL/0.9.6g ipv6 zlib/1.2.1

Link to comment
Share on other sites

Hi

 

Thanks a great contribution, will you be doing a UK version as i believe the UK release set for Sep 1st is slighlty diffrent.

 

I would be greatfull if you knew as we wantto us it in the UK when released.

 

Charly

Charly

 

My fav site

 

Spend most my cash there dont tell the wife:-)

Link to comment
Share on other sites

In Admin, go to Tools -> Server Info. Scroll down the page to the CURL section to see if CURL support is enabled in PHP. It will look something like this:

 

curl
CURL support 	enabled
CURL Information 	libcurl/7.10.3 OpenSSL/0.9.6g ipv6 zlib/1.2.1

 

i see it in mine as well

 

CURL support  enabled  
CURL Information  libcurl 7.9.8 (OpenSSL 0.9.7a) (ipv6 enabled)

Link to comment
Share on other sites

Hi!

 

I had the blank page problem as well on IIS. It took me awhile to figure it out, since I knew nothing about PHP or Pear, but this is what my problem was.

 

When you download PHP for windows, it doesn't install pear by default. You have to run the "go-pear.bat" file. (I believe that was the name)

 

After doing that, verify that the pear directory is in the PHP include path.

 

Also, I had to hardcode the certificate directory in the PHP script so that it is outside the website root, since IIS doesn't use htaccess files. I may come up with a better solution later, once I know more PHP.

 

Also, use backslashes when you specify the path name.

 

At some point or other, I had to install pear mail, pear mime, and pear smtp. I got all these from pear.php.net

 

Again, doublecheck the include paths for PHP.

 

Every time I've run into a problem getting osCommerce to work on IIS, it was a pathing issue, or some portion of the pear stuff was missing.

 

The credit card module seems to be working great so far, though I've only used it a few times now.

 

Also, thanks very much for making this contribution Dynamo. :thumbsup:

 

 

Hobbe

 

 

I just got around to adding a popup with the card images pointing out the CVV numbers today. I had been meaning to do it for quite a while. I sto^H^H^Hborrowed a page from somewhere, then added osC styles to it. The next step is to move all the text to a lanugage specific include file, then I'll send it to Brian for inclusion in a future update.

I can't help with IIS configuration, but I think I recall someone in this support thread getting it to work on IIS, but it has been a while.

Link to comment
Share on other sites

Hey thanks for the info I'll give that a try today and see how it goes.

 

I'm on a linux server not windows, don't know if that problem would be the same or not.

 

After doing that, verify that the pear directory is in the PHP include path.

how do i check that?

 

Also, I had to hardcode the certificate directory in the PHP script so that it is outside the website root, since IIS doesn't use htaccess files. I may come up with a better solution later, once I know more PHP.

what files did you edit?

Link to comment
Share on other sites

:D

Hi!

 

I had the blank page problem as well on IIS. It took me awhile to figure it out, since I knew nothing about PHP or Pear, but this is what my problem was.

 

When you download PHP for windows, it doesn't install pear by default. You have to run the "go-pear.bat" file. (I believe that was the name)

 

After doing that, verify that the pear directory is in the PHP include path.

 

Also, I had to hardcode the certificate directory in the PHP script so that it is outside the website root, since IIS doesn't use htaccess files. I may come up with a better solution later, once I know more PHP.

 

Also, use backslashes when you specify the path name.

 

At some point or other, I had to install pear mail, pear mime, and pear smtp. I got all these from pear.php.net

 

Again, doublecheck the include paths for PHP.

 

Every time I've run into a problem getting osCommerce to work on IIS, it was a pathing issue, or some portion of the pear stuff was missing.

 

The credit card module seems to be working great so far, though I've only used it a few times now.

 

Also, thanks very much for making this contribution Dynamo. :thumbsup:

Hobbe

 

 

This fixed my problems I was having as well! Thanks for the post. I had pear folders and such but it wasnt installed/configured and that bat file did it for me. I also didnt have libmcrypt.dll so I had to get that to install pear.

 

http://pear.php.net/manual/en/installation.getting.php

 

http://ftp.emini.dk/pub/php/win32/mcrypt/ (windows Bianaries)

 

Those two links should help you through it. After you are done with it all restart IIS to make the changes take effect. I have my C:\php folder in the env variables path for my system so I didnt need to put it in the system folder. Pretty much put the mcrypt dll wherever your php.ini file is to make the go-pear.bat work. Then follow the install instructions and such.

 

Thanks for they help everyone and thanks Dyno for the contribution bud!

Edited by wwalbaum
Link to comment
Share on other sites

ok now im getting the paypal loop... looking for that fix again.

 

OK I changed two sections of paypal_wpp.php file

 

One on around line 516

 

		//$_SESSION['paypal_ec_payer_info'] = $paypal_ec_payer_info;
	tep_session_register('paypal_ec_payer_info');
   $_SESSION['paypal_ec_payer_info'] = $paypal_ec_payer_info;

 

AND around 427 to

 

		
	$paypal_ec_token = $response->getToken();
	tep_session_register('paypal_ec_token');
	$_SESSION['paypal_ec_token'] = $paypal_ec_token;

 

That got me through the paypal parts... and back to the site but now I get to trying to continue through the process of paying and I get this error in checkout_payment.php:

 

The credit card information you entered contains an error. Please check it and try again.

The first four digits of the number entered are: 
If that number is correct, we do not accept that type of credit card.
If it is wrong, please try again.

 

Any ideas?

Link to comment
Share on other sites

Hi Wraith,

 

Here is some PHP script that I got from somewhere, I think it was with phpmyadmin, but not sure.

 

make a file called test.php or somethiwng with this text in it and run it on your web server.

 

It'll give you all the info.

 

//-----------------------start

 

<html>

<head>

<title>PHP Test</title>

</head>

<body>

<!-- testing sessions -->

<?php session_start(); ?>

 

<!-- testing browscap.ini -->

<?php

echo $_SERVER['HTTP_USER_AGENT'] . "<br/><br/>";

$browser = get_browser(null, true);

print_r($browser);

echo "<br/><br/>";

?>

 

<!-- a general PHP test -->

<?php phpinfo(); ?>

</body>

</html>

 

//--------------end------------------------

 

This should show you all your info about your PHP install, including what the file path is, and what directory order it will search for the missing include files in.

 

Oh, and I made a mistake on one of my fixes. I did use the absolute path for the certificate, but I just modified it in the database. The configuration dialog wouldn't let me set it correctly with Windows, so I used the phpmyadmin and directly edited the row to set the absolute path.

 

The configuration dialog doesn't like backslashes, so I just edited the row in the database and all was well.

 

 

Hopefully this will be helpful to someone else on IIS.

 

 

(This is the certificat that is in the /wpp_cert directory)

Hobbe

 

Hey thanks for the info I'll give that a try today and see how it goes.

 

I'm on a linux server not windows, don't know if that problem would be the same or not.

how do i check that?

what files did you edit?

Link to comment
Share on other sites

I'm going thru that pear site right now looking for instructions and everything for a shared hosting linux server. ::crossing fingers:: I install it right... php isnt my strong point

Link to comment
Share on other sites

Hobbe,

 

Can you explain the pear files to me. I have been fighting with an email issue (not related to this topic) when I came accross your comment on page 62 regarding the pear email, smtp, etc. files. I have since downloaded the latest stanble versions, but I am at a loss as to what to do next. Do I unzip them into the pear directory, and wiz bam everything should work? Or is there more to it than that.

 

I am running IIS5 with SMTP installed. When trying to send an email from the admin tools menu I recieve a green notice at the top of the page showing that email sent to [email protected] but the email does not go through. I find the message in the Drop folder which IIS created?

 

If I create a new user the email just disappears.

 

Any assistance is much appreciated.

 

---Coffee Celler

Link to comment
Share on other sites

I am trying to install this module for a customer that is using a custom template. Before I go ahead and do this I was wondering if there was a step by step walkthrough for making the additions manually to the files. I know you have them marked off in the files themselves, my only concern is that if you replaced or removed any coding and I might overlook it.

 

Thanks

Link to comment
Share on other sites

It would be nice if in the Payment Information section of checkout (where the customer enters their credit card info) if the customer entered in the credit card wrong and clicked Continue, the values they entered in the form would stay there. I was thinking, in the paypal_dp.php payment module inside of:

 

function pre_confirmation_check() {

 

if I session registered the 4 values:

paypal_cc_number

paypal_cc_cvv2

paypal_cc_expires_month

paypal_cc_expires_year

 

they could be used as the default values when creating the input fields inside the function:

 

function selection() {

 

What do you think?

Edited by steveosc
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...