Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Urgent Help Needed with ePDQ Payments


rickhudson

Recommended Posts

That sounds like a grand logical plan, have you made any progress on this as yet? Sorry to be a pain.

"...you do one little thing, you build a widget in Saskatoon and the next thing you know it's two miles under the desert, the essential component of a death machine..."

Link to comment
Share on other sites

  • 2 weeks later...
  • Replies 388
  • Created
  • Last Reply

Top Posters In This Topic

Hey,

 

great news with the latest update...

 

- Now independant of customer clicking last button on Barclays' pages. Utilizing the POST functionality, all necessary processes will have been done regardless of that button clicking event.

- No more disappearing orders (customers used ot be able to wipe their own order).

 

This has been long awaited :)

 

Just a quick question for you, I'll be upgrading to this over the next couple of days anyway, but could anyone tell me if it works with 'purcahse without an account' as I'm looking to install that this week also.

 

If anyone has any advice on that it would be appreciated

 

cheers

 

Dave

Link to comment
Share on other sites

Hi there,

 

sorry one further question, complete.php has completely changed since version 1.02 which I have installed and has a lot of info in it regarding emails.

 

There is a chance the customer never presses the last 'Complete Order' button so if you want to e-mail them a confirmation, e-mail yourself a confirmation for reconsilliation purposes, if you want stock to update etc. you need this functionaility since it's independent from them clicking that last button.

 

Does this mean that if they do press the continue button that they will get 2 emails from the site confirming thier order? Or does the checkout_process email get bypassed?

 

The reason i need to know is that i have email invoice installed?

 

Cheers

 

Dave

Link to comment
Share on other sites

Just a little note, about the problem of the cart updating but not passing that correctly to ePDQ. If I read the last two or three pages correctly this may help, if I didn't then - apologies!

 

It sounds very similar to a problem I had with using my new CCGV(trad) with the updated MS2 code in includes/classes/shopping_cart.php. The shopping cart was updating, but not as far as CCGV was concerned.

 

I tracked down the problem to the use of products_id in CCGV(trad) but the new use of products_id_string in the updated MS2 shopping_cart class. This change was to prevent the problem of customers being able to add items which no longer existed in the store to their shopping cart and then being unable to remove them. I resolved the problem as follows, and I believe that the way I did it doesn't break the update (because products_id_string and products_id are interchangeable in the code).

 

lines 103-106 changes:

// Replaced by CCGV
//		  if ($this->in_cart($products_id_string)) {
//			$this->update_quantity($products_id_string, $qty, $attributes);
//		  } else {
//			$this->contents[$products_id_string] = array('qty' => $qty);
		if ($this->in_cart($products_id)) {
		$this->update_quantity($products_id, $qty, $attributes);
		} else {
		$this->contents[$products_id] = array('qty' => $qty);

 

lines 119-121

				// Replaced by CCGV
			//$this->contents[$products_id_string]['attributes'][$option] = $value;
			$this->contents[$products_id]['attributes'][$option] = $value;

 

lines 143-145

		// Replaced by CCGV
	//$this->contents[$products_id_string] = array('qty' => $quantity);
	$this->contents[$products_id] = array('qty' => $quantity);

 

lines 152-154

			// Replaced by CCGV
		// $this->contents[$products_id_string]['attributes'][$option] = $value;
		$this->contents[$products_id]['attributes'][$option] = $value;

 

 

Hope this helps.

 

Vger

Link to comment
Share on other sites

Hi,

 

i've just upgraded my files from v1.02 and when it passes to epdq i get this error

 

Error:

Encrypted data not present.

 

any ideas where to look

 

A few of us have had that problem - have a look around the checkout payment page and make sure the payment method is being set correctly. I can't remember the variable name off hand but I found that it wasn't set and I had no encrypted data.

Link to comment
Share on other sites

Hi Gary,

 

thanks fo rthe reply, I've uninstalled and reinstalled a few times now and have just noticed that on checkout payment I don't have any payment options listed. All it says is

 

This is currently the only payment method available to use on this order.

 

whereas when i put my old version back on it does say ePDQ even though that is the only payment option.

 

I must be missing something somewhere but can't see it (probably right in front of me)

 

I'll keep looking

 

cheers

 

Dave

Link to comment
Share on other sites

Thats the cause of the problem.

 

On my version it's around line 270 but will probably be different on your's as I've a few extra modules.

 

The problem will be near where the HTTP POST variable payment is set.

Link to comment
Share on other sites

Hi, first thanks to everyone involved in making and supporting this module.

 

I've installed it and I'm getting the same error as stubbsy and leecook_999. i.e. barclays says "Encrypted data not present." but if I go back and submit the form again it goes through ok and i can enter my card details.

 

Examining the page source I see that the checkout_confirmation form data fields are not populated until I submit, and then click back. Why is that?

Link to comment
Share on other sites

This is a common problem.

 

It's down to the payment variable not being set correctly on the checkout payments page.

 

I can't tell you the exact cause or solution as on my site ePDQ is the only payment method so I just fundged the issue by manually setting the variable in the code

 

I added this line

 

echo tep_draw_hidden_field('payment', 'ePDQ');

 

here

 

if (sizeof($selection) > 1) {

...

...

} else {

 

echo tep_draw_hidden_field('payment', 'ePDQ');

 

}

 

this forces the payment vaiable to be set.

 

If you have more than one payment method you will need to locate the actual problem.

Link to comment
Share on other sites

This is a common problem.

 

It's down to the payment variable not being set correctly on the checkout payments page.

 

I can't tell you the exact cause or solution as on my site ePDQ is the only payment method so I just fundged the issue by manually setting the variable in the code

 

I added this line

 

echo tep_draw_hidden_field('payment', 'ePDQ');

 

here

 

if (sizeof($selection) > 1) {

...

...

} else {

 

echo tep_draw_hidden_field('payment', 'ePDQ');

 

}

 

this forces the payment vaiable to be set.

 

If you have more than one payment method you will need to locate the actual problem.

Link to comment
Share on other sites

Thanks. That's a bit weird but it works. Actually a slightly neater (I think) solution is to replace the selection() method of the EPDQ object in includes/modules/payment/ePDQ.php with the following. It still only works with one payment method though.

function selection() {
 return array('id' => $this->code, 'module' => $this->title);
}

Link to comment
Share on other sites

Another tip that cost me several hours: the AuthUserFile path must be exactly what Apache thinks the path to the file is. For example on the NetFirms account I'm working on the path is /mnt/web_w/[stuff]/www//nfoscomm/catalog/cpi/ and you must specify that exactly including the double slash otherwise it doesn't accept it! Of course the double slash shouldn't really be there but netfirms suck and it is. Just thought I'd point it out.

Link to comment
Share on other sites

Hi there,

 

thanks for the info, I've just had another go at it now and I'm getting there.

 

The issue I have now is, following a successful transaction in ePDQ when I hit the button to continue I get this error

 

Parse error: syntax error, unexpected $end in /home/stubbsy/public_html/dirtbikebitz-com/checkout_process.php on line 370[code]

 

Any ideas?

 

Cheers

 

Dave

Link to comment
Share on other sites

grrr.. I wish you could edits posts in this place! :)

 

I've solved the above issue but I have another problem now.

 

If the transaction is unsuccessful, the customer still gets sent an email saying thank you for your order?

 

Any ideas what might be causing this?

 

Cheers

 

Dave

Link to comment
Share on other sites

Phew... i think i've finally sussed it :)

 

You weren't joking when you said you may be able to get it up and running in 3 days - its taken me pretty much 2 days solid speard over the course of a couple of weeks!

 

Thanks

 

stubbsy

Link to comment
Share on other sites

Sorry, I spoke too soon.

 

I have it working apart from 1 thing, if the transaction is unsuccessful it still send the customer an email confirming that they have ordered and giving them an order number.

 

In the control panel it shows the order status declined, but it shows the amount of items and a price for the order. The stock level for the item ordered has also been deducted, even though the order was declined.

 

Have a missed something somewhere? Is this a bug?

 

Anyone have any ideas?

 

Cheers

 

Dave

Link to comment
Share on other sites

Hi Dave

 

Having just installed the new version yesterday (and having a rough idea how it works), it sounds like the unsuccesful transaction is going right through checkout_process.php, therefore sending out the order email and deducting the stock.

 

Make sure that your payment methods match exactly those that are in the checkout_process.php code, i.e. "Credit or Debit Card". If these aren't exact, then it's my understanding that checkout_process.php will treat these like a non-epdq transaction, deduct the stock and send the email.

 

Worth checking it out anyway.

 

Good luck!

Link to comment
Share on other sites

Having just installed the new version yesterday (and having a rough idea how it works), it sounds like the unsuccesful transaction is going right through checkout_process.php, therefore sending out the order email and deducting the stock.

No, I have the same problem and it's definitely cpi/complete.php that's sending the emails. I've modified it so that if the order status is less than authorized, it adds "Order status: PAYMENT DECLINED" (or whatever) to the top of the confirmation email sent by complete.php. Haven't really looked into stock level processing yet.

Link to comment
Share on other sites

Hi there,

 

I'll have another look at it, have you tried an order yourself Steve using your own card with an incorrect expiry date to see what happens and if you get the email or the stock is deducted?

 

Tamlyn, i guess thats one sultion, but would it not be best not to send it at all and just tell them it failed?

 

Anyway, thanks for your help both of you

 

Cheers

 

Dave

Link to comment
Share on other sites

Hi Gary,

 

is that the customer gets the confirmation email about their order and you get the order declied email? If so that is exactly what I have.

 

Cheers

 

Dave

 

PS - have you seen this thread - ? Order Hack

 

This hack works on my current ePDQ contribution, does it effect the new one

Edited by stubbsy
Link to comment
Share on other sites

Dave - you were right... my setup was sending out order confirmation emails and deducting stock even if payment was declined.

 

The good news is I spent the last couple of hours working on it and it now *seems* to be fixed.

 

The problem with the cpi/complete.php file in the contribution is that the IF statement (originally at line 190) only checks that $status is not blank. The IF statement directly after it correctly works out whether or not payment was a "Success" or "DECLINED" and updates the order status accordingly. But then the code goes on to deduct stock and send out the order confirmation whether the transaction was successful or not.

 

The solution is to insert another IF statement after the "Let's send the merchant a record of the transaction" block around lines 240 - 247.... i.e.

		if($status == "Success") {

... just before the "This should become a proper epdq_process...etc". Then just add in the end bracket

}

around line 433, just before the

} else {

This means that the stock deduction and email confirmation are only sent out if the transaction is marked as "Success". Tested and working OK on my setup, but would be interested to see if it works for any of you?

 

Cheers,

Steve

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