Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Pay Pal


Guest

Recommended Posts

I used to get Pay Pal payments all the time. People like using it if they don't know me or my business. Suddenly last fall, I would get the money in my Pay Pal account, but have no idea what it was for. All of the customer information and their order was not retained on my os commerce website - like it never happened. But it did, because I had the money. What can I do to fix this problem? I really need to be able to accept Pay Pal as a payment option.

Edited by bizzystore
Link to comment
Share on other sites

There have been some new upgrades to the PayPal modules since last fall. What I did prior to doing the upgrade was to ask the customer to log back into their account and click the pay by cash (check or money order) option with a note that they had already paid. That would force the order through. Not really a fix. The new modules are the true fix. Hoping that helps a little.

 

I used to get Pay Pal payments all the time. People like using it if they don't know me or my business. Suddenly last fall, I would get the money in my Pay Pal account, but have no idea what it was for. All of the customer information and their order was not retained on my os commerce website - like it never happened. But it did, because I had the money. What can I do to fix this problem? I really need to be able to accept Pay Pal as a payment option.
Link to comment
Share on other sites

There have been some new upgrades to the PayPal modules since last fall. What I did prior to doing the upgrade was to ask the customer to log back into their account and click the pay by cash (check or money order) option with a note that they had already paid. That would force the order through. Not really a fix. The new modules are the true fix. Hoping that helps a little.

 

 

Thanks. That's good information. Do you know where I can get those modules?

Link to comment
Share on other sites

Thanks Lunar Live!

 

Not that you have to hold my hand, but I went to download that upgrade on my server and it came up as "Fatal error: Call to undefined function tep_session_save_path() " - do you or does anyone else what THAT means?

Link to comment
Share on other sites

Try Paypal standard that comes with RC2.

IPN functionality will make sure orders are not lost.

 

Also recommended is order holding contrib.

 

Satish

Ask/Skype for Free osCommerce value addon/SEO suggestion tips for your site.

 

Check My About US For who am I and what My company does.

Link to comment
Share on other sites

Hi,

 

I am having this same problem. After investigating, I have come to the following conclusion:

 

When paying with paypal, the customer is sent to paypal before the checkout_process.php script is run.

After they make their payment, if they do not return to my shopping cart, the checkout_process.php script is never run.

Therefore their cart contents remain the same and we never get a notification of the order.

Next time they login to their shopping cart account, they still have their last order in their basket.

 

In the case of the "IPN functionality will make sure orders are not lost", well, this only works if the customer finishes making their payment.

 

It seems to me that the best solution would be if the checkout_process.php script was run first, saving the order to the orders table etc. and then sending the customer to paypal for their payment.

That way, if the customer makes their payment and does not return to my shopping cart, I still have their order.

On the other hand, if the customer does not make their payment, we still have their order, and can send them follow up emails to attempt to have their order fulfilled.

 

Has anyone put a solution like this in place?

 

Or has anyone got a better solution?

 

Thanks.

 

Remo

Link to comment
Share on other sites

Hi again,

 

After reading the thread a little better :blush: , I noticed that Satish mentioned an order holding contrib, so I went looking.

 

I found these two:

 

http://www.oscommerce.com/community/contri...h,order+holding

http://www.oscommerce.com/community/contri...h,order+holding

 

I am yet to try either of them, but once I do I will post to let you all know which way I have gone.

 

Thanks.

 

Remo

Link to comment
Share on other sites

Ok,

 

After investigating both options in my last post, I have come to the conclusion that neither of these contributions is 100% suitable for my needs.

 

Both of them simply create an extra set of order tables where every order is saved as a 'preliminary' order before the payment is processed.

This would be ok if you only have a small amount of orders coming in every day, and if you only use third party payment processors.

 

Because only one of my four payment options is a third party option, and I have far too many orders coming in every day, this second set of order tables would be getting filled with orders that don't really need to be there, and one of my staff would have to constantly monitor this second set of 'order holding' tables to delete the orders which have come through ok.

 

So what I am going to do is attempt to solve the problem myself, by calling the checkout_process.php script (or part of it) before sending the customer to the third party payment processor, and then change the page that my customers will return to after processing their payment (more than likely checkout_success.php).

 

Can anyone see any problems with my proposed solution?

 

Or does anyone else have any suggestions to better my proposed solution?

 

Any input is greatly appreciated.

 

Thanks.

 

Remo

Link to comment
Share on other sites

Ok, here is what I have come up with...

 

Firstly, this hack works for me for paypal payments, and the only downside is that the customer's cart is retained, and not cleared like it should be.

The upside is that I only had to modify 3 files to get this to work:

 

FILE #1: catalog/checkout_confirmation.php

 

comment out the following lines like I have below: (In my installation these are lines 185-197)

  //if (isset($$payment->form_action_url)) {
 //  $form_action_url = $$payment->form_action_url;
 //} else {
$form_action_url = tep_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL');
 //}

 echo tep_draw_form('checkout_confirmation', $form_action_url, 'post');

 //if (is_array($payment_modules->modules)) {
 //  echo $payment_modules->process_button();
 //}

 echo tep_image_submit('button_confirm_order.gif', IMAGE_BUTTON_CONFIRM_ORDER) . '</form>' . "\n";

 

FILE #2: catalog/checkout_process.php

 

add the following code:

  if (isset($$payment->form_action_url)) {
$form_action_url = $$payment->form_action_url;

echo '<body onLoad="document.payment.submit();">' . "\n";
echo tep_draw_form('payment', $form_action_url, 'post');

if (is_array($payment_modules->modules)) {
  echo $payment_modules->process_button();
}

echo '</form>' . "\n";
echo '</body>' . "\n";

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

require(DIR_WS_INCLUDES . 'application_bottom.php');
tep_exit();
 }

directly before this:

 

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

 

FILE #3: catalog/includes/modules/payment/paypal.php

change this line:

 

		 tep_draw_hidden_field('return', tep_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL')) .

to be:

 

		 tep_draw_hidden_field('return', tep_href_link(FILENAME_CHECKOUT_SUCCESS, '', 'SSL')) .

 

That's it!

 

Any feedback on this would be great.

I realise that it probably should be put in the contributions section, but we'll see how the feedback goes first.

 

Thanks.

 

Remo

Link to comment
Share on other sites

Installing a new contribution of Paypal is much much easier then applying these hacks.

 

If IPN is not used and order is populated on chekout_sucess.php page then some expert hacker will make You feel that the amount was paid where as it actually was not.

 

 

Order holding contribution is the last remedy till You get a good fix and comfort with Your payment gateway.Else its not recommendd.I know with Paypal module that came with oscommerce 2.2 MS prior to release of RC1 and RC2 the module had a shortcoming.If People didnt return back tosite then the order will not be populated.

Also a hack was possible on that module.

 

Satish

Ask/Skype for Free osCommerce value addon/SEO suggestion tips for your site.

 

Check My About US For who am I and what My company does.

Link to comment
Share on other sites

Thanks for replying Satish,

 

Nevermind about expert hackers making me think that the amount was paid, because if their funds are not received, their order is declined.

 

So the new contribution of PayPal saves the order before sending the customer away for payment processing?

Because that would be exactly what I am looking for!

Please advise.

 

Thanks.

 

Remo

Link to comment
Share on other sites

Hi all,

 

this is a correction to my hack from before.. THIS IS VERY IMPORTANT!!!!

 

 

FILE #1: catalog/checkout_confirmation.php

 

you ONLY have to comment out the four lines as I have below: (In my installation these are lines 185-189)

 

  //if (isset($$payment->form_action_url)) {
 //  $form_action_url = $$payment->form_action_url;
 //} else {
$form_action_url = tep_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL');
 //}

 echo tep_draw_form('checkout_confirmation', $form_action_url, 'post');

 if (is_array($payment_modules->modules)) {
echo $payment_modules->process_button();
 }

 echo tep_image_submit('button_confirm_order.gif', IMAGE_BUTTON_CONFIRM_ORDER) . '</form>' . "\n";

 

if you leave this as I have in my earlier post, no details will come through for credit card payments etc.

Link to comment
Share on other sites

Yes it does.

 

The payment status is updated by the IPN code.

 

Satish

Ask/Skype for Free osCommerce value addon/SEO suggestion tips for your site.

 

Check My About US For who am I and what My company does.

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