Jump to content
Sign in to follow this  
rickhudson

Urgent Help Needed with ePDQ Payments

Recommended Posts

Dave,

 

You mentioning the shopping cart thing led me to code a great improvement to this system. Thanks!

 

About your questions:

 

If it's declined and they click 'complete order' - epdq_success (your return url) will check the epdq_transaction table and see it's declined. It will then redirect to the basket. I'm not sure I included it in the last contrib I posted here but my shopping_cart.php check the URL for $_GET['err'] and displays an error saying their transaction was declined and they can try again, try another payment method (cheque or bank transfer) or ring us on 08740....

 

I'll make sure I include that in the up and coming 1.5 update.

 

But check epdq_success.php to see what happens. Then check your shopping cart to see whether it checks against the error message.

 

I don't think I get the IE secure warning but I can't remember. If you have your configure file set up to use HTTPS then checkout_success should still be on httpS so only when they then click to the catalogue or home or whatever might it give the warning. Depending on the person;s browser setting, it will always come if they switch from http to httpS. So all we can do is make sure that notice doesn't appear anywhere near the payment.

 

So, it happening after checkout_success is fine IMO.

 

I'll try and get the update contrib out this weekend but I won't test it against a fresh osC installation. I'll try my best to make it transparent and easy to upgrade/install but I won't go as far as making it non-php coder proof.

 

Thanks again for the ideas.


Johan a.k.a. T0PS3O elsewhere.

 

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

Share this post


Link to post
Share on other sites

Hi Joe

 

Thanks for your help.

 

I've tried changing the refrances to checkout_success to point to an https location with out much luck. Why do barclays say that the oscommerce shop can not be on a secure server?

 

It it likely that internet explorer requires all include files to be secure aswell?

 

Dave

Share this post


Link to post
Share on other sites

Can't be. included fles are parsed on the server before it gets dumped as HTML to the browser. One exception is JavaScript. Make sure those includes (if any) are secure.

 

Where do they say it can't be on a secure server? When I enter a punter's order next I'll try and remember to look when mine goes back to http. But IE sucks anyway so just forget about it :)

 

I just checked my checkout_process.php and the line before the very last reads:

 

tep_redirect(tep_href_link(FILENAME_CHECKOUT_SUCCESS, '', 'SSL'));

 

Though my epdq_success.php's redirect to checkout_process.php reads:

 

tep_redirect(tep_href_link(FILENAME_CHECKOUT_PROCESS));

 

When I compile the updated contrib these coming days I'll make sure to check. That second one seems to need the SSL option as well.

 

Keep digging! I'd like to finish this off as best as we can hopefully once and for all (until Barclays adds CVV and AVS to the POST)!


Johan a.k.a. T0PS3O elsewhere.

 

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

Share this post


Link to post
Share on other sites

Hello

 

I still haven't managed to stop the warnings in explorer but for now my problem is that epdq in explorer has been giving the message:

 

It is not possible to order from the store at this time.

Please contact the merchant for further information.

 

Error:

Not a valid allowed URL

 

yet everything works fine in firefox. I think I have put everything back to a couple of days ago when both browsers worked. Does anyone know of an explorer specific issue that could be causing this?

Share this post


Link to post
Share on other sites

You backed it up right? Use Beyond Compare to check differences.

 

The Allow URL is the URL that takes the customer from osCommerce to Barclays. It's checkout_confirmation.php and you need to set it in the CPI admin.

 

It's very strange that FF would behave differently than IE in this regard.

 

Move your way through the checkout and see whether checkout_confirmation.php is on http or httpS. Whichever it is, it needs to match with what you set in the CPI administration tool.

 

Besides the protocol it could also be that somehow you have some paramaters in the URL in IE so it doesn't match anymore with what the CPI administration was told to expect.

Edited by JoeMcManus

Johan a.k.a. T0PS3O elsewhere.

 

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

Share this post


Link to post
Share on other sites

Hello Joe

 

I think the problem was that stuff was being appended to the URL from checkout_confirmation.php, something FF ignores but kills IE. This has forced me to switch on 'Force Cookie Use', something I didn't want to do as I presume this will stop people with cookies switched off from using the site.

 

Interestingly I have since noticed that now if I have retun url set as http IE goes straight back to oscom without warnings but FF pops up warnings, where as if i have retun url set as https (shared certificate) IE pops up warnings but FF goes straight back to oscom. As IE is still the most commen i'm going with http for now but hope to avoid any warnings at some point.

 

Thanks for your help, is the new EPDQ contribution still on course for this weekend?

Share this post


Link to post
Share on other sites

I force cookies and only about 2% of visitors seem to hit the error page. Cost I'm willing to take for the benefits.

 

Yes, I should be able to get something up this weekend. Though separating my modded code from the ePDQ contrib will take my a few hours probably. For the sake of completeness I thought I'd better check whether it works on a fresh osC installation. But due to the allow URLs etc. that would mean downtime for the real site. So that part depends on whether I fancy staying up late Saturday night.

 

One way or the other I'll get a new package over.

 

I added MaxMind minFraud, you guys might want to check that out. I coded a nifty implementation which could help prevent fraud. Only costs $0.004 per query.


Johan a.k.a. T0PS3O elsewhere.

 

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

Share this post


Link to post
Share on other sites

For those holding your breath on the update, I had some painters around on the weekend who completely screwed up my schedule with their incompetence so stop holding your breath and check next weekend.

 

Sorry if you are subscribed to this, got an e-mail and got all excited.


Johan a.k.a. T0PS3O elsewhere.

 

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

Share this post


Link to post
Share on other sites

Hi Joe - hope you are well....... just came across a daft issue which I'm hoping you can help with (have just scrolled through all the posts again - so sorry if I've missed it).

 

When a customer cancels out of epdq the order gets left in OSC - am I right in thinking that the order status has simply been changed too early? i.e. if it was still zero it wouldn't show up in admin - whereas in this case it is.

 

Also - I note that the contribution seems to create two copies of every order with one being left at status 0 - so that your order profile goes, 2,4,6,8 etc - but in the order table there are corresponsing orders of 1,3,5,7 but with status 0. Why is this?

 

Regards

 

Stuart

Share this post


Link to post
Share on other sites

When they indeed abandon ePDQ whilst on the Barclay pages and the transaction was not confirmed, i.e. they didn't make it to the 'Success' / last page then yes you will have the order still in the osCommerce back-end as "Awaiting Card Payment" or whatever you call it / whatever status you gave it when they were at checkout_confirmation.php and the ePDQ.php module stored the orders. This is actually a great way to recover sales since we found that when you ring them you can convert about 60% of those where without this contribution you would have had no knowledge of those orders that cocked up for whatever reason.

 

As soon as they pass checkout_confirmation.php it should show up regardless what the staus is, I don't use a status 0. It depends on how you want things to work really, I can't quite remember how the last version of the contribution does it by default but as warned; you really need to know some PHP to get this the way you want.

 

On the second part of your question, no, it shouldn't duplicate. Maybe you still have checkout_process set to store another copy? The only way you get duplicates is when after they choose Credit Card payment they go back to checkout_payment to maybe choose another payment option but then choose ePDQ again. That feature/bug will be solved with the up and coming release.

 

You should investigate where this status = 0 comes from - it's not how I intended it to work.

 

Maybe yours uses 0 as the 'pending payment' option when ePDQ.php module stores the order on checkout_confirmation.php and then you let cpi/complete.php INSERT a new order instead of UPDATING that one that was 0.

 

If it's not that urgent, wait a couple days for my update and then I'll help you sort it all out. If it is causing you problems now, double-check everything and attach the relevant files in a PM or post here so I can look at them. But in true BT telecoms style, I'm quite busy.


Johan a.k.a. T0PS3O elsewhere.

 

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

Share this post


Link to post
Share on other sites

many thanks for the pointers and will indeed keep an eye out for your updates

 

When they indeed abandon ePDQ whilst on the Barclay pages and the transaction was not confirmed, i.e. they didn't make it to the 'Success' / last page then yes you will have the order still in the osCommerce back-end as "Awaiting Card Payment" or whatever you call it / whatever status you gave it when they were at checkout_confirmation.php and the ePDQ.php module stored the orders. This is actually a great way to recover sales since we found that when you ring them you can convert about 60% of those where without this contribution you would have had no knowledge of those orders that cocked up for whatever reason.

 

As soon as they pass checkout_confirmation.php it should show up regardless what the staus is, I don't use a status 0. It depends on how you want things to work really, I can't quite remember how the last version of the contribution does it by default but as warned; you really need to know some PHP to get this the way you want.

 

On the second part of your question, no, it shouldn't duplicate. Maybe you still have checkout_process set to store another copy? The only way you get duplicates is when after they choose Credit Card payment they go back to checkout_payment to maybe choose another payment option but then choose ePDQ again. That feature/bug will be solved with the up and coming release.

 

You should investigate where this status = 0 comes from - it's not how I intended it to work.

 

Maybe yours uses 0 as the 'pending payment' option when ePDQ.php module stores the order on checkout_confirmation.php and then you let cpi/complete.php INSERT a new order instead of UPDATING that one that was 0.

 

If it's not that urgent, wait a couple days for my update and then I'll help you sort it all out. If it is causing you problems now, double-check everything and attach the relevant files in a PM or post here so I can look at them. But in true BT telecoms style, I'm quite busy.

Share this post


Link to post
Share on other sites

Hi, I have another problem...

Return URL works after making payment but I get this message:

 

1146 - Table 'ispy_shop.epdq_transactions' doesn't exist

 

SELECT * FROM epdq_transactions WHERE oid='19'

 

[TEP STOP]

 

What it means? Do I missed any file or something? How to fix it? Order wasn't save in a shop. JOE, HELP PLEASE!

Share this post


Link to post
Share on other sites

Log in to PHPMyAdmin to check your database to see you have a table called epdq_transactions

 

cpi/complete.php enters info into that table, epdq_success reads it and decides on whether it was Success or DECLINED whether or not to forward them to checkout_process or return them to the basket.

 

It looks like this:

 

-- --------------------------------------------------------

-- 
-- Table structure for table `epdq_transactions`
-- 

CREATE TABLE epdq_transactions (
 oid varchar(30) NOT NULL default '',
 transaction_status varchar(30) default NULL,
 transaction_time datetime default NULL,
 PRIMARY KEY  (oid)
) TYPE=MyISAM;

 

BTW, I removed the need for that table in the upcoming update.


Johan a.k.a. T0PS3O elsewhere.

 

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

Share this post


Link to post
Share on other sites

"BTW, I removed the need for that table in the upcoming update."

 

which file I need to update for that?

Share this post


Link to post
Share on other sites

It's "upcoming" as in the files are not public yet, I'm still finalizing it and trying to make it easy for everyone. Hopefully this weekend you can find a new version here in the contributions section. If you want it fixed before that, make sure you have that table.


Johan a.k.a. T0PS3O elsewhere.

 

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

Share this post


Link to post
Share on other sites

It's "upcoming" - I've misunderstood. It is because of my english, sorry.

 

I created a new table via phpMyAdmin. Finally I can see confirmation page! But.... Order wasn't saved. Why? What else is incorect?

Share this post


Link to post
Share on other sites

I don't really have much time now but check and understand in terms of how the code works, this:

 

Confirm it is stored when you hit checkout_confirmation.php with an initial status.

 

Confirm it is updated when you go on to Barclays pages and hit the final page that says the order number and 'success' or 'declined'. Check here that the POST is received and the order status updated.


Johan a.k.a. T0PS3O elsewhere.

 

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

Share this post


Link to post
Share on other sites

It is strange situation. Order was saved but isn't shown for shop admin in ORDERS section...

 

CLIENT POINT OF VIEW

I (as a client) get an confirmation email with all details of my order. Products, prices... When I log into a shop, I can see a history of my orders, so everything is fine.

 

ADMIN POINT OF VIEW

I get an email contains only number of order with no details. I can't see orders (only those paying with Barclays, rest is fine) in admin panel of shop. So I don't know what was orderd.

 

So as I think it must be saved in a database, but it isn't visible for administrator... It is to complicated form. I will be obliged if you will help me with that... I understand that you are busy for now. I can wait.

 

Thanks Joe.

Share this post


Link to post
Share on other sites

You should really check your database. To just "think it must have saved in a database" is not helping much.

 

Find out what order status they have at each of the points I indicated above.


Johan a.k.a. T0PS3O elsewhere.

 

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

Share this post


Link to post
Share on other sites

FINALLY everything works well! Thank you for your help Joe and for that contribution. I am obliged.

Last problem was in checkout_process file. There must be set a status of order. It wasn't. Database was ok.

 

My shop is on: www.ispysecurityservices.co.uk

Edited by 3D-media

Share this post


Link to post
Share on other sites

Finally, I've finished my version of this code.

 

I can now just extract the files, delete the stuff that are specific to my setup and release the contrib.

 

I got it to work so that complete.php sends the confirmation e-mails making ePDQ now...

 

INDEPENDENT from the customer clikcing that last (hated) button.

 

E-mails are sent, products_purchased updated, cart wiped, status updated and more all when Barclays send in the POST to cpi/complete.php.

 

The e-mailing part was a biatch to get going because it relies on so many files but it looks like it's all good to go.

 

I removed the need for the epdq_transactions table to clean things up.

 

I also included functionality for fraud score calculation with the help of MaxMind's minFraud system. I will leave the code in there but commented out. Short intro: you can send a handful of data like IP address, e-mail address and billing address and then their service checks the data against known card fraudsters, spammers, checks that the IP address isn't in Nigeria whilst the billing is in Suffolk etc. Based on many variables it returns a fraud score so you know whether to ship that item or not. Really useful and only a measily $0.004 per query (yes, a fraction of a penny).

 

I have one slight problem.

 

I CAN NOT TEST THIS EASILY! - I NEED YOUR HELP (if you want this code)

 

You know how you have to set up the allowed URL... Unless I shut down one of my shops I can't test this contribution.

 

If one of you guys are developing a NEW SHOP with ePDQ, please let me know and I will install this LATEST version free of charge on your shop. Then we'll test it together so I can release this contribution out in the wild for the rest to enjoy.

 

I will need FTP access, PHPMyAdmin access and access to your back-end. Ideally also login to your CPI Administration and ePDQ back-end. I'd like you to be there one night this week after hours, say 7 to 10pm so we can sus this out.

 

I can not guarantee I will get this going and reserve the right to abandon installation at any time from where you can just paste your back-up and have it all as it was.

 

You need to know your stuff with PHP etc. and ideally you already had the previous ePDQ contrib going.

 

By sacrificing an evening of your time you can help me round up 13 months worth of slowly developing this contribution and help others enjoy the latest and greatest code which shouldn't need much else done to it to work for years to come and without the little bugs we all have now.

 

If you think you qualify, please contact me by PM or in this thread.

 

If you can't wait for me to package it all up, contact me and I will give you the necessary files so you can do your own magic without a nice readme. Advanced osC/ePDQ/PHP users only please.

Edited by JoeMcManus

Johan a.k.a. T0PS3O elsewhere.

 

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

Share this post


Link to post
Share on other sites

Hey Joe,

 

The new contrib sounds cool. We're just setting up a new site at the mo, not got as far as getting the ePDQ bit running yet - still waiting for Barclays. I suspect you'd have got it all tested before we get our new store account but if not then I'd be happy to help (assuming boss give permission for accessing our CPI and server etc) otherwise would love a copy of the code. Have you still got my email address?

 

Gary

 

Finally, I've finished my version of this code.

Share this post


Link to post
Share on other sites

Yeah I have your e-mail, got some bike image and an interesting thought on life the other day from you I think :)

 

I'm in no real rush since I already have the code obviously. When do you think you might be able to get the ePDQ going? If you already have one account, shouldn't be that hard to get a second, third etc.

 

I'm going snowboarding for 10 days from the 17th so depending on how badly people want this code, I can do it before or after that fact. Because my shops are modded so heavily it could really do with some testing, else this thread could become a very very long one :)

 

If you use admin access levels it shouldn't be much of an issue to get me in on your systems. Just wipe my details after the fact. On a bare shop there also isn't the issue of code you might not want to share etc.


Johan a.k.a. T0PS3O elsewhere.

 

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

Share this post


Link to post
Share on other sites

Hello Joe

 

I could realy do with the contribution working fully without the final button click as I am waiting for this before doing a big advertising push. Unfortunately my site is already up and running with orders coming through so I am not sure if I can be of much help to you for testing.

 

Dave

Share this post


Link to post
Share on other sites

In terms of making sure you get the payment, the old version works fine. But the new version is a lot better.

 

Those who PMed me, I'll get to those messages tonight.


Johan a.k.a. T0PS3O elsewhere.

 

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

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  

×