Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Urgent Help Needed with ePDQ Payments


rickhudson

Recommended Posts

My gut feeling still is some server issue.

 

If you added SLL maybe it affected session handling (I know there are osCom setting for SLL session handling but I'm not familiar with them).

 

I'd shut down the site for an hour (at least the check-out stuff) and debug. Echo everything on checkout_confirmation.php you're about to send to Barclays to see what it is and determine where it came from.

Johan a.k.a. T0PS3O elsewhere.

 

Contributed Barclay's ePDQ Payment Module though not originally mine. Made it work though...

Link to comment
Share on other sites

  • Replies 388
  • Created
  • Last Reply

Top Posters In This Topic

i disabled ssl and the same problem still. Can you tell me where the order id that gets sent to epdq is specified? should be able to track it down fom there.

 

 

My gut feeling still is some server issue.

 

If you added SLL maybe it affected session handling (I know there are osCom setting for SLL session handling but I'm not familiar with them).

 

I'd shut down the site for an hour (at least the check-out stuff) and debug. Echo everything on checkout_confirmation.php you're about to send to Barclays to see what it is and determine where it came from.

Link to comment
Share on other sites

Hi,

 

Thanks for the help so far - very much appreciated.

 

Because I am working on a cart with shared ssl, and there is every likely hood that customers won't use continue and it seems almost impossible to recover the session to complete the sale, I have modified the epdq cont:

 

1) When a customer makes an order and selects the payment method (epdq being the only one available at present), epdq.php now adds the order to the dBase, deducts the stock and sets the status as PENDING [EPDQ].

 

2) If the customer adjusts their order or selects a different pay method, the temp_order is no longer deleted, but has it's status set to ABORTED [EPDQ] - this gives the store owner the chance to delete the order and re stock the product (re stock selected by default now).

 

3) If Barclays Decline the transaction, the order status is set to DECLINED (via cpi/complete.php) and again the store owner has the chance to delete the order and restock the product.

 

Because I am working on the basis the customer will not be logged in when (and if) they return to the cart, I am redirecting them to index.php - if they want to check their order, they simply log back in.

 

The help I need is on checkout_confirmation.php: I simply need to know how to get the form to empty the cart before sending the customer on to Barclays?

 

<?php
 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";
?>

 

is there a way to add in $cart->reset(true); when the button is hit?

 

Kind Regards,

 

Garry

Garry

Link to comment
Share on other sites

Not unless you redirect the Barclays submission I guess. Have you tried your suggestion at the very bottom of payment_confirmation?

 

If you do re-direct via an extra step that resets the cart, you'll have to let the CPI know that the request will come from this new URL. But that way you'll get stuck with the encryption etc. as well I think.

 

I don;t use the stocking feature so all this is not applicable to my set-up.

 

Can't you delay the stock adjustment to when the customer hits the last Barclays page and let complete.php examine the order and adjust the stock accordingly?

Johan a.k.a. T0PS3O elsewhere.

 

Contributed Barclay's ePDQ Payment Module though not originally mine. Made it work though...

Link to comment
Share on other sites

Hi,

 

If I was clever enough I'd get complete.php to do it, but I just don't know enough about php - I'm pretty much bungling my way through this as it is!

 

I have had checkout_confirmation.php empty the cart as soon as its loaded, and because the order is stored already there is no problem with this, except, if the customer decided they want to go back and add more items to their cart - they will find it's already been emptied.

 

If I could keep the cart contents intact until at least they press the 'confirm' button the whole buying process would be better, unless they use 'back' from Barclays in which case it's tough luck and they would have to re add their contents.

 

I guess I am asking if it's possible to add an 'onClick' type of event to the 'confirm' button that simply resets the cart before submitting the form?

 

Many thanks,

 

Garry

Garry

Link to comment
Share on other sites

onClick won't be able to interact with PHP on the same page so that won't work. You'll have to add a page after confirmation or let complete do it I think (without looking at the actual code right now).

Johan a.k.a. T0PS3O elsewhere.

 

Contributed Barclay's ePDQ Payment Module though not originally mine. Made it work though...

Link to comment
Share on other sites

OK,

 

Thanks for that, could you tell me how I might get the 'customers_id' into complete.php?

 

I have it in mind to do this:

 

$selstr3 = "delete from " . TABLE_CUSTOMERS_BASKET . " where customers_id = '$???'";

tep_db_query($selstr3);

 

$selstr4 = "delete from " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . " where customers_id = '$???'";

tep_db_query($selstr4);

 

But I am not sure where the Customer_id is located or what it looks like?

 

Kind Regards,

 

Garry

Garry

Link to comment
Share on other sites

OK,

 

Iv'e managed to throw together some bits of code to clear the basket when cpi/complete.php gets the OK from Barclays:

 

if($status == "Success")

 

{

 

$selstr4 = "SELECT * FROM orders WHERE orders_id='$oid'";

$check_query = tep_db_query($selstr4);

 

$status = tep_db_fetch_array($check_query);

$cust = $status['customers_id'];

 

$selstr5 = "DELETE FROM customers_basket WHERE customers_id ='$cust'";

$check_query = tep_db_query($selstr5);

 

$selstr6 = "DELETE FROM customers_basket_attributes WHERE customers_id ='$cust'";

$check_query = tep_db_query($selstr6);

 

}

 

 

My next question is am I going in the right direction for asking complete.php to send the order emails too?

 

Many thanks,

 

Garry

Garry

Link to comment
Share on other sites

Hi,

 

I couldn't work out how to send the actual order emails from complete.php but I did manage to get it to send a custom confirmation email which is adequate.

 

It also sends a pass or fail email to the store owner.

 

Thanks for your guidance.

 

Regards,

 

Garry

Garry

Link to comment
Share on other sites

Only just tagged onto the end of this. I have ePDQ up and working on a shared ssl on a shared server, without problems.

 

But - I don't use complete.php as the return URL, but checkout_process.php.

 

Because ePDQ does not work with SSL you also have to set checkout_payment and checkout_confirmation to nonssl.

 

Vger

Link to comment
Share on other sites

Hi,

 

Thanks for that...

 

What happens to your system if the customer does not press the continue button whilst they are at Barclays EPDQ?

 

Is the order still stored?

 

Regards,

 

Garry

Garry

Link to comment
Share on other sites

According to Barclay's own advice the order should NOT be returned to you - very much like the default PayPal module. But either that advice is out of date or it does not apply to the osCommerce ePDQ module, because you are notified of the order. You also get a notice that the transaction went through okay via the password protected CPI folder and the complete.php file within it.

 

I think I made a slight error in my previous post, as the files I don't use are the epdq_checkout_process.php and epdq_checkout_success.php files - relying instead on the standard osCommerce files of those names.

 

There are several things I find annoying about ePDQ, and for those reasons would not recommend them to customers.

 

1. Their initial set up fee is ?50+vat more than HSBC's e-Secure

2. Their monthly fee is ?5+vat more than e-Secure.

3. The ePDQ module breaks the way that Payment Module names and Order ID Status is automatically handled by osCommerce (and has to be hardcoded with ePDQ).

4. ePDQ cannot handled the transaction being sent from an https address, because it relies on http headers. This is a major flaw, and one which I can hardly believe that a bank the size of Barclays would endorse.

5. The backend of ePDQ and e-Secure use exactly the same 3rd party software to handle transactions (you'll see that the User Terminal is absolutely identical except for colouring and logo), so in the case of ePDQ it's just that they are let down by a poor front-end system.

 

Vger

Link to comment
Share on other sites

That's great stuff Garry, glad to see you're getting there.

 

I wanted complete to send the e-mails as well but I ended up like you, making a customer one though I still believe it's possible to load the 'order' object passing the appropriate ID in it, then you do whatever other files do to the order.

 

Vger, comlpete.php can't be the return URL, it should be the POST URL. Not sure what you mean there. Are you saying that upong clicking the Barclays continue button, your visitors go to complete? What is that supposed to accomplish? If you don't use the files designed to handle the return you might face issues when things aren't exactly going as you'd wish. The epdq_success file does some redirect tricks based on the STATUS.

 

Not sure where you read Barclay's advice about NOT returning either. Why would the CPI ask for a return URL?

 

I'm a bit annoyed with CPI myself. Though pricing is the least of my worries. I e-mailed them about it but they can;t do anything because like you said, they use proprietary software, ClearCommerce, which they can;t adept. It's a take it or leave it kind of deal. We'll be going MPI later this year because of all the little annoyances.

 

But for what it is, it works fine though (apart from stupid error messages and UI).

 

About your point 3 though, it's hard coded because I never had the time (and back then not the knowledge) how to make it a configuration setting, part of the editable payment module's settings. Because I needed it up fast I chose the quick way. With some effort you can make it dynamic again though.

 

I agree about the httpS thing. The ClearCommerce CPI version seems a bit outdated to me at times.

Johan a.k.a. T0PS3O elsewhere.

 

Contributed Barclay's ePDQ Payment Module though not originally mine. Made it work though...

Link to comment
Share on other sites

Vger, comlpete.php can't be the return URL, it should be the POST URL.

 

Agreed, but I did correct myself in the subsequent post. Perhaps I did not make myself clear enough as to what I meant.

 

Not sure where you read Barclay's advice about NOT returning either.

 

Can't give you the link to it now, but it was definitely on the ePDQ site. Confused me a little as obviously it did return with the osCommerce module. Perhaps their reference was a general one, and meant for people not using osCommerce.

 

The Clear Commerce software works fine, as vouched for by HSBC e-Secure (which also uses it). It's the ePDQ landing page which looks rubbish, very basic (when compared to e-Secure), and the ePDQ interpretation of it that's the problem. With HSBC you have to have an https connection, with ePDQ they rely on http headers.

 

However, as Barclays have announced a very thorough rebuild of ePDQ during this month and next we'll have to wait and see what they come up with. The only thing they have announced so far is that if people are using ip addresses to connect to the ePDQ service they should now switch to web url's.

 

Vger

Link to comment
Share on other sites

Yeah I saw the notices on IP's. I don't rely on them anymore though. The way I understand it, the only improvements will be hardware. Less downtime (which was overdue). I very much doubt they will improve on the actual integration features. At least that's the image I got from their senior staff.

 

If you're competent with PHP and aren't scared of XML, MPI is a real possibility. Costs the exact same (though you'll need an offline server to process payments) and you can make it work pretty much EXACTLY as you want it and you don't have to log into the CPI anymore, everything can be built in to the osCommerce back-end.

 

Judging by your contribs, you're more of a design talent, but with the XML version of the MPI you can bypass all the C and Java difficulties and stick to PHP with understandable XML schemas to do the communication with the ClearCommerce engine.

 

Can you show me a shop that uses e-Secure as its payment facilities? I'd like to take a look at the difference with Barclay's product. I know a guy who tried to implement e-Secure and he said documentation was a nightmare and support as well. At least at Barlcay's ePDQ office, there are some knowledgeable people willing to help pretty fast.

Johan a.k.a. T0PS3O elsewhere.

 

Contributed Barclay's ePDQ Payment Module though not originally mine. Made it work though...

Link to comment
Share on other sites

My 'Live Shop' entry uses e-Secure - but please bear in mind that this is a fully functional website not running in any sort of Test mode.

 

The support for e-Secure used to be very poor, but HSBC seem to have woken up and improved greatly on that. I think some people have problems because they phone the general call centre for support and in common with all call centres if it ain't on their screen then they don't have a clue. There is a dedicated phone line for CPI integration (office hours only) and they're usually quite helpful and knowledgeable.

 

Vger

Link to comment
Share on other sites

I don't think I like Barclays system much but my client was already a Barclays customer and felt compelled to use them.

 

The epdq mod I have done works like this:

 

The Customer selects their products goes to payment section, there the order is stored in the tables and status set to pending and stock deducted. If the customer continues shopping and comes back to the payment page the old order is marked as 'aborted' and a new order is stored in the tables.

 

Customer goes to epdq makes their payment: If it succesful, complete.php changes status to 'pending' and sends 2 emails; 1 to client with their details (but not the full order) and 1 to the store owner. If it is declined complete.php sets the status to 'declined' and notifies the store owner.

 

The customer never sees 'pending' or 'aborted' orders in their history, only 'pending', 'processing', 'despatched' or 'declined' orders - this is to keep things tidy from the customers end.

 

'Pending' and 'aborted' orders can be deleted through the admin panel re-stocking the products if neccessary.

 

In all, a pretty good compromise from a crap system (epdq).

 

I think that once complete.php was able to pull in order_id, from there you could generate a full order email but I couldnt be bothered.

 

The cart might not be stocked if you visit but...

 

http://www.incar-emporium.com/index.php

 

Thanks for your guidance guys, it helped although I have been through a fast, steep upward learning curve.

 

Garry

Garry

Link to comment
Share on other sites

Garry, good to hear you have it work well for you.

 

One day, if demand increases, I might rewrite it completely. I now sort of fixed and finished what someone else started years ago.

 

I'm like you, I couldn't be bothered with getting complete to do the full e-mailing either. Though I do find that 1 out of 3 punters never click the Barclay's continue button. So they never get to checkout_success and check_out process so I don't get a proper e-mail for reconsiliation (only complete's "temp" one). One day I might 'fix' this.

 

I've made more modifications I might share as well. For instance the contrib doesn't pass delivery address details to Barclays and uses the customer-> details instead of the billing-> details for the billing. Which in 99 out 100 cases works fine but one day it'll mess up an order.

 

I now also have a 'Pending Fraud Review' status for those that trigger a fraud rule of mine where Barclays returns the (silly) ref 502 status.

 

Well, at least the basics work fine enough it seems for PHP savvy people to code this baby their way.

 

I still might upgrade to the MPI soon though.

Johan a.k.a. T0PS3O elsewhere.

 

Contributed Barclay's ePDQ Payment Module though not originally mine. Made it work though...

Link to comment
Share on other sites

Hi Joe,

 

Nice one !

 

I don't suppose you know how I might replace the hard coded email address with store_owners_email_address in complete.php ?

 

take:

 

$Message2 .= "Congratulations!\n\nA successful order has been added to your shopping cart.\n\nOrder Number = $cid\n\n$custname\n$custaddress\n$custcity\n$custpostcode\n\nOrder Processed: $custdate\n\nThis order will be in your cart admin panel under PENDING\n\nhttp://www.admin_domain.com\n";

mail ("sales@admin_domain.com","SUCCESFUL EPDQ Transaction", $Message2, "From: Shopping Cart \nReply-To: \nX-Script-Author: GB\nX-ip:$REMOTE_ADDR\nX-Mailer: PHP/" . phpversion());

 

and take out the hard coded email address and replace it somehow with this:

 

' . STORE_OWNER_EMAIL_ADDRESS . '

 

Thanks if you can help,

 

Garry

Garry

Link to comment
Share on other sites

That would require complete loading the usual stuff like application_top, functions/general etc. which I wouldn't recommend since you don't want it outputting anything or adding to the chance of stuff going wrong.

 

Considering the ePDQ.php file is so shop specific, I'd stick with a 'manual' complete.php as well. I run multiple shops based on osCommerce and Barclays CPI ad it has served me well like this.

 

Complete's task is too important to mess about with IMO.

Johan a.k.a. T0PS3O elsewhere.

 

Contributed Barclay's ePDQ Payment Module though not originally mine. Made it work though...

Link to comment
Share on other sites

  • 3 weeks later...

damn damn damn... okay just spent the last hour reading this post through and seems that what on the serface sounds simple is a not at all simple.

 

I am in a positions where i am building an oscommerce store for a client - and they insit on the epdq barclays integration - I have several other contributions on the stores and just need this to finish and pass off to the client.

 

Reading though all the notes it seems there is still the issue of passing the information the customer has entered into their account forward - has this beensorted ??? or is anyone working on this at moment??

Link to comment
Share on other sites

It never became the easy to install contrib everyone would hope for but any competent PHPer sho's familiar with the osCommerce file system can get this baby going IMO.

 

All you have to do is customize it exactly the way you want... Or leave it working fine as it does.

Johan a.k.a. T0PS3O elsewhere.

 

Contributed Barclay's ePDQ Payment Module though not originally mine. Made it work though...

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