Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Sign in to follow this  
dynamoeffects

PayPal WPP Direct Payments & Express Checkout Support

Recommended Posts

Hello Mr. Dynamo when I click on paypal fast check out this error occur :

 

Fatal error: Call to undefined function: ec_step1() in /home/ulatbulu/public_html/oscommerce/ec_process.php on line 26

 

 

Please assist.

 

TQ

Share this post


Link to post
Share on other sites
Fatal error: Call to undefined function: geterrors() in /home/content/s/e/x/sexcityxxx/html/shop/modules/gateway/DirectPayment/form.inc.php on line 157

please help, did i do anything wrong??

 

It appears that you posted in the wrong support thread, because this contribution doesn't have a file called form.inc.php, or anything in /modules/gateway/DirectPayment/.

 

I spent some time searching for the correct place for you to direct your question, but was unable to determine what contribution you installed. Can you tell us what contribution you installed that gave you this error?

 

--Glen

Share this post


Link to post
Share on other sites

Hello Dynamo,

 

I have installed the payment module... but have came to an issue with windows install and IIS...

 

I try to update the directory the cert is located but it keeps stripping the C:\inetpub\www\website of the "\"'s

 

I even update it with C:\\inetpub\\www\\ and so on but it still strips it to where it says c:inetpubwwwwebsite/catalog/directory...

 

Any ideas on how I may fix this? I will try playing with my config like I have been to see if I get anywhere...

 

Thanks

Share this post


Link to post
Share on other sites

I have tried changing the variables and absolute path input in the config file, and even putting the value in a variable and passing in the paypal_wpp.php install function and updating it and removing and reinstalling the module... Seems the only way a change will take effect in the location of that and pear files is to uninstall and install it. update does not do anything...

 

No matter what I do it always comes out the same. I am thinking it has to do with the tep_db_query() function itself.

 

its funny how it seems to strip any \'s I put in a query...

 

Any ideas? I will look for alternative ways to do such a query and related IIS issues.... Maybe its something with my database the way its handling saving the data?

Edited by wwalbaum

Share this post


Link to post
Share on other sites

well edit does work its just not reading properly so I need to figure out what part of the module is reading from the database I suppose maybe this will doctor it up...

Share this post


Link to post
Share on other sites

well I changed it all so that it was absolute like follows:

 

c:/Inetpub/wwwroot/...

 

and everything seems to be found as far as modules go when installing them...

 

I tried in in windows explorer and it still went to the folder although it changed to C:\... after it went to that folder.

 

I see the pear files and cert as being recognized but when I go to checkout_process.php its blank.

 

I read in notes that its usually due to misconfigured directories or pear missing... I dont think its the case as of now.

 

I seen you fixed the mod up for registered globals off which is how I have my system setup so I will just copy all made up files right to the installation and see if it fixes this problem and report back.

Share this post


Link to post
Share on other sites

I have just installed the order total module Price Sensitive Discount and it does not apply when checking out with WPP.

 

http://www.oscommerce.com/community/contributions,204

 

Can anyone point me in the right direction to get this fixed. It appears that if I do a checkout using PayPal IPN it gets the correct value. I have done some searching and it seems like most people haven't found a solution who had similar problems. I previously had a problem with the low order fee module and never got it worked out so wound up disabling it. I imagine this suffers from the same issue.

 

Thanks for the help

Share this post


Link to post
Share on other sites
I have just installed the order total module Price Sensitive Discount and it does not apply when checking out with WPP.

 

http://www.oscommerce.com/community/contributions,204

 

Can anyone point me in the right direction to get this fixed. It appears that if I do a checkout using PayPal IPN it gets the correct value. I have done some searching and it seems like most people haven't found a solution who had similar problems. I previously had a problem with the low order fee module and never got it worked out so wound up disabling it. I imagine this suffers from the same issue.

 

Thanks for the help

 

The problem is a logic error in checkout_process.php, documented here: <http://www.oscommerce.com/community/bugs,1629> Order total modules aren't processed until after checkout_process calls before_process() in the payment module. You should be able to fix this by moving the call to before_process after the payment module stuff, as documented in the bug's comments. Note that this will break the osCommerce PayPal IPN module. I put a comment in that describes a fix for the IPN module, but it is incorrect, and I am working on a solution. The PayPal IPN module is somewhat odd in that it hijacks most of the checkout_process logic. It never returns from the call to before_process; it redirects the flow to checkout_success. I think it is a poor design.

 

--Glen

Share this post


Link to post
Share on other sites

Glen is there an easy way to check which payment module is in use? Such as the displayed text or something? We could then conditionally swap out which order to make those calls for modules like IPN - which I happen to use along with WPP!

 

I am willing to write code/instructions/updates if anyone knows how to do this.

 

Thanks!

Share this post


Link to post
Share on other sites

Hi,

 

Anyone know if the cert actually has to "installed"?

 

I can't get Direct Payment to work, just a white page shows up. I've checked rechecked everything to no avail.

 

Also, when I turn the module's debug mode ON, where does the debug info go??

 

Thanks for any help,

Share this post


Link to post
Share on other sites
Glen is there an easy way to check which payment module is in use? Such as the displayed text or something? We could then conditionally swap out which order to make those calls for modules like IPN - which I happen to use along with WPP!

 

I am willing to write code/instructions/updates if anyone knows how to do this.

 

Thanks!

 

I use both WPP and IPN as well, because I prefer PayPal to show up as a separate entry on the payment page (checkout_payment.php). I have edited the display text for WPP to read "Credit/Debit Card" and IPN to read "PayPal".

 

The problem with fixing the processing order is that IPN will try to re-declare the order total object when the customer returns from PayPal. The customer gets an error and his cart isn't emptied, but the order is processed normally. I will have to walk through the flow to see what is supposed to happen when the customer returns from PayPal vs. what happens when you swap the lines. I should have a fix for it in a day or two.

 

Even better would be if we had a "stub" payment module that gets displayed on the payment page, but calls through to the EC API, as though the customer had pushed the Express Checkout button from the payment page. That would give the look and feel that I want, and use the EC API, which seems somewhat more robust than IPN. I have probably reached the point in learning PHP and the osC engine where I can implement this myself.

 

--Glen

Share this post


Link to post
Share on other sites
Hi,

 

Anyone know if the cert actually has to "installed"?

"Installation" of the certificate consists of copying the file (cert_key_pem.txt) that you get from PayPal to your server, usually in "/catalog/includes/modules/payment/wpp_cert/", then setting the "API Certificate" value in the module's settings to be the full path to the file. Note that this is a local file system reference, not a URL. As an example, my certificate is stored in /myserver/myusername/htdocs/catalog/includes/modules/payment/wpp_cert/cert_key_pem.txt

 

Retrieving the certificate is step 1 of the installation instructions for this module. Copying it to the server and telling the module where to find it is step 5. When all else fails, please read the instructions contained in the file README.html that accompanies the module.

 

I can't get Direct Payment to work, just a white page shows up. I've checked rechecked everything to no avail.

I believe that this is a symptom of a missing certificate.

Also, when I turn the module's debug mode ON, where does the debug info go??

It is mailed to the email address saved in Configuration -> My Store -> E-Mail Address. That is normally the store owner's address.

Edited by SteveDallas

Share this post


Link to post
Share on other sites
I use both WPP and IPN as well, because I prefer PayPal to show up as a separate entry on the payment page (checkout_payment.php). I have edited the display text for WPP to read "Credit/Debit Card" and IPN to read "PayPal".

 

The problem with fixing the processing order is that IPN will try to re-declare the order total object when the customer returns from PayPal. The customer gets an error and his cart isn't emptied, but the order is processed normally. I will have to walk through the flow to see what is supposed to happen when the customer returns from PayPal vs. what happens when you swap the lines. I should have a fix for it in a day or two.

 

Even better would be if we had a "stub" payment module that gets displayed on the payment page, but calls through to the EC API, as though the customer had pushed the Express Checkout button from the payment page. That would give the look and feel that I want, and use the EC API, which seems somewhat more robust than IPN. I have probably reached the point in learning PHP and the osC engine where I can implement this myself.

 

--Glen

 

Glen,

 

I am willing to help work on an extended solution but do you think we could work on a "quick fix" for the time being? Do you have a messenger program such as AIM or Google Talk you could PM to me? I would be very interested in working on something like this with you.

 

Thanks

Share this post


Link to post
Share on other sites

The following is working for detecting IPN vs WPP:

 

  if($order->info['payment_method']=='PayPal (Credit Card / Debit)')
 {
  $payment_modules->before_process();

  require(DIR_WS_CLASSES . 'order_total.php');
  $order_total_modules = new order_total;

  $order_totals = $order_total_modules->process();
 }
 else
 {
require(DIR_WS_CLASSES . 'order_total.php');
$order_total_modules = new order_total;

$order_totals = $order_total_modules->process();

// load the before_process function from the payment modules
$payment_modules->before_process();
 }

 

'PayPal (Credit Card / Debit)'

 

is from the

 

define('MODULE_PAYMENT_PAYPAL_IPN_TEXT_TITLE', 'PayPal (Credit Card / Debit)');

 

line of the IPN language file.

 

My problem now is that WPP complains about order totals.

Share this post


Link to post
Share on other sites

That code works fine when I have the discount module disabled. Can someone help me figure out what is causing the error.

 

The error is the 10520 one basically review the amounts of the transaction and resubmit. (10520)

 

I think the problem lies in the recalculation of tax that is not occuring even though it is selected to do so. Anyone interetsed in helping ??

Share this post


Link to post
Share on other sites

I have found a solution - Simply make the discount the first item in the order total list. It will recalculate the subtotal for you and the rest of the modules seem to function OK after that.

Share this post


Link to post
Share on other sites
The following is working for detecting IPN vs WPP:

 

  if($order->info['payment_method']=='PayPal (Credit Card / Debit)')
 {
  $payment_modules->before_process();

  require(DIR_WS_CLASSES . 'order_total.php');
  $order_total_modules = new order_total;

  $order_totals = $order_total_modules->process();
 }
 else
 {
require(DIR_WS_CLASSES . 'order_total.php');
$order_total_modules = new order_total;

$order_totals = $order_total_modules->process();

// load the before_process function from the payment modules
$payment_modules->before_process();
 }

 

'PayPal (Credit Card / Debit)'

 

is from the

 

define('MODULE_PAYMENT_PAYPAL_IPN_TEXT_TITLE', 'PayPal (Credit Card / Debit)');

 

line of the IPN language file.

 

My problem now is that WPP complains about order totals.

 

Well, it's a hack, but, if it works... The only problem is that you are keying off something that is language dependent and settable by the store owner. If I were to do this (rather than fix IPN, which might take a total rewrite), I would key off of $payment, which is a global variable set to the name of the selected payment module. In fact, since the IPN module never returns from before_process, the code can be simplified to this:

 

  if($payment != 'paypal_ipn') { 	
	require(DIR_WS_CLASSES . 'order_total.php');
$order_total_modules = new order_total;

$order_totals = $order_total_modules->process();

  } 

 // load the before_process function from the payment modules
 $payment_modules->before_process();

 

Tested as working.

 

-Glen

Share this post


Link to post
Share on other sites
Guest
HELLO,

 

Once again I figured out my own mistake...thanks,

Rod

 

 

I got the same problem, but don't know how to fix it. Could you please help.

Share this post


Link to post
Share on other sites

Thank you for the reply SteveDallas.

 

I uploaded my cert and have pointed to it correctly. Does the cert file need any special permissions?

 

Also, is it strange that express checkout works, but direct checkout brings up the white page?

 

Thanks again for your help

Share this post


Link to post
Share on other sites

Thank you again for this great contribution! It's finally working on my store! We are running into an interesting issue, though. Many customers are choosing the paypal option at checkout, and then not coming back to complete the checkout on our site, so we are not getting a record of what they order. After looking through the forums, it seems that there is no real solution to this issue. So my boss decided to integrate both a paypal shopping cart and ours - using two side by side buttons - one to say add to paypal cart or something along those lines, and the other add to cart. I am now trying to impliment this, but when I put the paypal form in the page, and click it to add something to my paypal cart, I still end up in the store cart, without getting to paypal at all. Is there any code in this module that should be causing this? Any ideas would be welcome!!! Thank you! :(

Share this post


Link to post
Share on other sites
Thank you again for this great contribution! It's finally working on my store! We are running into an interesting issue, though. Many customers are choosing the paypal option at checkout, and then not coming back to complete the checkout on our site, so we are not getting a record of what they order. After looking through the forums, it seems that there is no real solution to this issue. So my boss decided to integrate both a paypal shopping cart and ours - using two side by side buttons - one to say add to paypal cart or something along those lines, and the other add to cart. I am now trying to impliment this, but when I put the paypal form in the page, and click it to add something to my paypal cart, I still end up in the store cart, without getting to paypal at all. Is there any code in this module that should be causing this? Any ideas would be welcome!!! Thank you! :(

 

 

It sounds as though you have the standard osCommerce PayPal module installed. That module is known to lose orders when the customer doesn't return from PayPal. You have a couple of options:

 

1. Fix the standard osCommerce PayPal module using this contribution: http://www.oscommerce.com/community/contributions,3819

 

or

 

2. Remove the standard PayPal module and rely on this one (PayPal WPP) and the Express Checkout button for customers who wish to use PayPal.

 

or

 

3. Install a different PayPal module that doesn't have this problem. One example is the osCommerce PayPal IPN module, found here: http://www.oscommerce.com/community/contributions,2679

 

 

--Glen

Share this post


Link to post
Share on other sites
It sounds as though you have the standard osCommerce PayPal module installed. That module is known to lose orders when the customer doesn't return from PayPal. You have a couple of options:

 

1. Fix the standard osCommerce PayPal module using this contribution: http://www.oscommerce.com/community/contributions,3819

 

or

 

2. Remove the standard PayPal module and rely on this one (PayPal WPP) and the Express Checkout button for customers who wish to use PayPal.

 

or

 

3. Install a different PayPal module that doesn't have this problem. One example is the osCommerce PayPal IPN module, found here: http://www.oscommerce.com/community/contributions,2679

--Glen

Thank you so much for replying so quickly!

I've tried those options, but my boss wants both this module (which we have and is working very well) AND the paypal shopping cart, using the regular add to cart button that any site can use. Paypal gave us the go ahead, but when I try to insert the code, it does nothing!

Share this post


Link to post
Share on other sites
Guest

Pear Confussion? :huh:

 

First off for some strang erason I noticed that my Ftp program does not show the 'pear' folder that I unzipped into its own folder. Thought that was strange.

 

I've created a folder named 'pear' and uploaded the Part 1 and then started to upload the 2nd part and noticed that there was alot of the same files. Am I supposed to over write one part with the other?

 

TIA :-)

Share this post


Link to post
Share on other sites
Thank you so much for replying so quickly!

I've tried those options, but my boss wants both this module (which we have and is working very well) AND the paypal shopping cart, using the regular add to cart button that any site can use. Paypal gave us the go ahead, but when I try to insert the code, it does nothing!

 

 

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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×