Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Collecting unconfirmed orders made via express payments like paypal


jampjamp

Recommended Posts

Hello, I have a very well known problem, however I didn't find any solution. I have a payment module which redirects a client to external pay site after checkout confirmation. However, if the client won't click to get back into my shop then I have no information about the order. I know there is a way to get around of it for paypal, but I use local polish service called dotpay.

Can I do anything to collect those orders? Maybe showing the checkout_success page and auto redirecting to the dotpay's page? Is there a way to make it like this?

Here is the file of catalog/modules/payments/dotpay.php: http://pastebin.com/Fdr0y4Rf and catalog/dotpay.php file: http://pastebin.com/nKTs9HWH

Link to comment
Share on other sites

This is a long standing problem when leaving your site and going to a Third Party payment site. Some customers just can't understand that they need to follow the instructions and return to the store site when payment is completed. The result is that they've paid, but the store doesn't have the order information. If you can't match up the payment with some sort of order information, you have to refund the payment. Please read the numerous discussions on the forum on this very subject. I think that improvements have been made to osC in recent years to reduce the problem, so if you're using a very old version of osC (2.3.3 or older) you should upgrade to the current version (2.3.4BS Edge).

 

I don't think there's any practical way to force a customer to come back to the store after completing the payment. You can put reminders in the store, just before going offsite, that the customer needs to return to the store to complete the transaction. Something can be done to log the sale information (as "possibly incomplete sale") before going offsite, and manually match it up with orphaned payments (money coming in with no record of what it's for).

Link to comment
Share on other sites

Do you know any addons for getting order_id before checkout_process? I would like to add order_id into the name which is sended to the payment service.

I found this http://addons.oscommerce.com/info/3374 however the readme file seems it's not really what I need.

@@14steve14

 

This is for osC 2.2. You still work with this out-of-date version? If so, don't waste your time and change to a new osC version.

  • The clever one learn from everything and from everybody
  • The normal one learn from his experience
  • The silly one knows everything better

[socrates, 412 before Christ]

Computers help us with the problems we wouldn't have without them!
99.9% of the bugs sit in front of the computer!
My programmed add-ons: WDW EasyTabs 1.0.3, WDW Facebook Like 1.0.0

if(isset($this) || !isset($this)){ // that's the question...

 

Link to comment
Share on other sites

Thanks for you answer.

I can't believe that problem known since probably 2003 is still unsolved. Really noone made any solution to save orders before sending customers to the external webpage?

 

The problem has been solved with many payment processors. Speak to your payment provider and see what coding help they can give you with creating a working payment module. If your payment provider cant or wont help find one that will. 

 

Failing that put a post in the paid for help area if you feel unable to code it yourself, and I am sure that an oscommerce coder may help you get what you want. Just make sure that you pick one that really does know oscommerce. You can then upload the new code to the addons area for the benefit of anyone else that may want to use that payment processor.

REMEMBER BACKUP, BACKUP AND BACKUP

Link to comment
Share on other sites

Oh, @@14steve14 this problem was already solved, thanking to you and your link to the addon :)

However, now I would like to add order_id into the description of the pay for payment module.
By now it looks like this ('opis' means description):

tep_draw_hidden_field('opis', STORE_NAME." - ".$mytitle.' ' . $customer_id . '-' . date('Ymdhis') ) .

I know that order_id is generated later when checkout_process.php is started, so I'm not sure if it's doable, but if we could start that process in background before the payment is ended, maybe there is a way to solve this.

@@mcmannehan yes, I use 2.2 and I can't change it now.

Link to comment
Share on other sites

 yes, I use 2.2 and I can't change it now.

A dangerous attitude. The longer you stay at 2.2, the less support you'll be able to get here. Eventually no one will be able to offer any help on such ancient code, and it will entirely up to you to support your store. In effect, you will have forked your own branch of the product. If you've done a tremendous amount of customization (not just add-ons), it may truly be a difficult task, but then, you did keep good records of what you changed and why, right? At the very least, you should make a test install of osC 2.3.4BS Edge, see what's involved in migrating your database, see what add-ons are available or easily modified, and what amount of custom coding will be necessary. It may be easier than you think. The current version is already responsive, and colors and fonts, etc. are easily configured in CSS. Staying at 2.2 runs the risk of leaving security holes unplugged, and at a minimum is a constant battle to keep ahead of PHP version changes. At least, make an informed decision about staying with 2.2.

Link to comment
Share on other sites

Ok, I've solved it, so I'll let you know how I'd handle this.
I installed an addon: http://addons.oscommerce.com/info/6421

And in:

function process_button() {

I added this:

		require(DIR_WS_FUNCTIONS . 'orders_id.php');
		$new_order_id = tep_get_Order_ID(tep_session_id());

And in the code line from my post before i've exchanged $customer_id into $new_order_id

In function after_process, i added this:

 function after_process() {
			tep_clear_Order_ID(tep_session_id());

That's all.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...