Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Urgent Help Needed with ePDQ Payments


rickhudson

Recommended Posts

OK there must be some confusoin somewhere then. That POST setup screen of Barclays HAS to be filled out completely with the username and password you set in the htaccess file of the cpi/ folder. That setup is you telling barclays how and where to send the POST.

 

When you checked the logs, I assumed you actually found successful requests from a Barclays IP to cpi/complete.php but if it's switched off then it can't be that way.

 

Switch it on and see how you go. If problems persist, I'll attend to your PM.

 

BTW Where does Barclays say not to use POST? And rest assured, I took 15K+ orders since using this contrib and all of them successfully used the POST.

 

Joe - it works!

 

where the confusion lay

 

1. I was using the htaccess username and password in the Client ID fields only

 

2. I had read in older posts that the POST was optional

 

I have now turned on the POST and put the htaccess parms against this and voila!

 

Many Thanks

 

Stuart

Link to comment
Share on other sites

  • Replies 388
  • Created
  • Last Reply

Top Posters In This Topic

That's from when you went there manually it seems. It didn't get an OID from the URL/POST so it failed. If a test sale on your own card does go through as expected then all is fine.

Edited by JoeMcManus

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

Good to hear Stuart. There hasn't been a case yet where eventually it didn't work so the code seems to work for everyone. It's always the obscure settings causing problems.

 

Vger I think isn't using the POST, he modded the code himself. But that way orders won't get updated to a 'paid' status if the customer doesn't click that last 'complete order' button. By using the POST you don't rely on customer behaviour (which can be strange at times!).

 

Glad you two joined the club. Look back a few pages and make sure to recommned to Barclays at every opportunity to add CVV and AVS reporting to the POST. As soon as they do that I will add fraud reporting to the contribution so you can see in the osCommerce admin whether it was dodgy or not.

 

Good luck selling!

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

Good to hear Stuart. There hasn't been a case yet where eventually it didn't work so the code seems to work for everyone. It's always the obscure settings causing problems.

 

Vger I think isn't using the POST, he modded the code himself. But that way orders won't get updated to a 'paid' status if the customer doesn't click that last 'complete order' button. By using the POST you don't rely on customer behaviour (which can be strange at times!).

 

Glad you two joined the club. Look back a few pages and make sure to recommned to Barclays at every opportunity to add CVV and AVS reporting to the POST. As soon as they do that I will add fraud reporting to the contribution so you can see in the osCommerce admin whether it was dodgy or not.

 

Good luck selling!

 

Jo - big thanks for your help!

 

one last thing - do you know how to configure the email that gets sent to the customer from Baclays epdq?

 

If I can ever return the favour let me know (I also have HSBC working a treat!) : www.pedalpusherslimited.co.uk, www.studentcribs.com - amongst others

 

Regards and Thanks

 

Stuart

Link to comment
Share on other sites

I switched those emails off. You can't customize anything that is Barclays besides those variables in ePDQ.php so it's almost useless. So I don't use their confirmation emails. If they do click that last button then checkout_process will send a proper e-mail, one you can customize.

 

I have plans to let complete.php send the e-mail instead of checkout_process so the whole checkout functionality is independant of them customers pushing that last button. But in all those orders I've taken no one ever complained about not getting that confirmation.

 

Most importantly, you get the order details, you get the money.

 

So, have a look in checkout_process to see the e-mail that is sent. It also uses some bits from the epDQ payment module I believe. That's where you might want to do some customization.

 

PS I see you sell Supertramp stuff as well :) That's me helping those pesky competitors again... :) Great design on student cribs! Love it!

Edited by JoeMcManus

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

I switched those emails off. You can't customize anything that is Barclays besides those variables in ePDQ.php so it's almost useless. So I don't use their confirmation emails. If they do click that last button then checkout_process will send a proper e-mail, one you can customize.

 

I have plans to let complete.php send the e-mail instead of checkout_process so the whole checkout functionality is independant of them customers pushing that last button. But in all those orders I've taken no one ever complained about not getting that confirmation.

 

Most importantly, you get the order details, you get the money.

 

So, have a look in checkout_process to see the e-mail that is sent. It also uses some bits from the epDQ payment module I believe. That's where you might want to do some customization.

 

PS I see you sell Supertramp stuff as well :) That's me helping those pesky competitors again... :) Great design on student cribs! Love it!

 

thanks Joe - where do you turn the Barclays one off?

 

Which is your store???????

 

Regards

Link to comment
Share on other sites

Hi guys.

As you see I am a new one here. I'll tell you more...I don't speak english well... and that is a problem with understand all your posts. Now I working on an internet shop, for my emloyer, based on osCommerce solution. I NEED to put into Barclays Payment. I have a problem with that. I tried to find some informations in this topic. Some of that are clear form me. Some yours advice helped me so much, but now I am in point, that I don't know what to do...

 

I have installed Joe's script, turned it on, and configured as I think it should be. It works, but... After making payment by website of Barclays Bank and pressing Continue button - there is no website... I get information:

 

https://yourreturnurl.php/?oid=8

 

Where should I type "my return url" address and which php file should it be? Now customer can pay for a goods, but I got no order... nothing... PLEASE, DO HELP ME WITH THAT! :blink:

Link to comment
Share on other sites

Hi Lukasz and welcome.

 

Look in includes/modules/payment/ePDQ.php around line 320 for the return URL.

 

Did you triple check, with Barclays, that you enabled the POST? Yuo would have done so at the URL that looks like cpiadmin.epdq.co.uk/***/CcxBarclaysEpdqAdminTool.e

 

In that tool you HAVE to enter the htaccess password you set for the cpi/ folder that contains the complete.php file which updates the order.

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

I am really ogliged for a fast reply Joe. I didn't set a POST... That's the reason as I think.

 

In htaccess i found that lines:

 

AuthType Basic

AuthName "Restricted Area"

AuthTextCrypt On

AuthUserFile /data/web/_b/_u/_y/your_domain.co.uk/your_folders/crypt/htpass

require valid-user

 

As I understand I should set password in this red line... How all that line must look for my shop based in http://www.ispysecurityservices.co.uk/shop/cpi/...

 

And what exactly need to be in a CPI Administration. Now it looks like that:

 

(...)

Allowed URL: http://ispy.superhost.pl/shop/checkout_confirmation.php

Continue option1 - checked

Continue option2 - checked

Continue option3 - checekd

POST order result: UNchecked

POST URL: ?

POST user name: ?

POST password: ?

POST email: ?

 

How to set it?

I know, that my questions may be funny for a some of you, but I really need a help with that... Sorry :huh:

Link to comment
Share on other sites

No problems man, we were all born without pants on - had to start somewhere!

 

That red line is not where you put the password.

 

On your server you probably have a public folder, often called html_public or whatever. The security sensitive files are normally placed OUTside the public tree so no one can read them from the web. The red line is the absolute path to your secure folder.

 

So maybe your server looks like this:

 

yourserver/logs

yourserver/public/www/index.php

yourserver/public/search/ //subdomain

yourserver/secret

 

in the secret folder I put another folder called crypt, because the passwords are encrytped. In

yourserver/secret/crypt is one essential file for the POST to work. I called it htpass in that red line. That is your htaccess password file and that red line needs to be the full path to that file.

 

That file is a plain text file. What you put in that file depends on what you put in the cpi administration form.

 

If the POST username is something like "Fred" without the " and you want the password to be "Flinstone" without the " then you type in that plain text file:

 

Fred:kSRrDnGY1VI7M

 

The kSRrDnGY1VI7M is the encrypted version of Flinstone. You can use this site to make up your own.

 

So in the ePDQ CPI administration form where you now have ? you type Fred as username and Flinstone as password. But in the htpass file you don't type Flinstone but the encrypted version.

 

If you don't know the exact absolute path, the easiest to create a PHP error like this:

 

$string = "hello";

arraypop($string);

 

Then it will say "unexpected variable on line 1 in /yoursever/public/html/test/php" or similar. Now you know your file structure.

 

The POST URL is the URL to complete.php (http://www.yourdomain.com/cpi/complete.php)

The POST e-mail is your email address or the store owner - you will only receive an email if the POST fails.

 

Let me know how you get on.

Edited by JoeMcManus

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

Joe,

 

I am still working at Barclays Payment... Thanks a lot for all your tips, it was really useful for me! I couldn't manage it without your help...

 

Take a look:

1.I created .htpass file with the encrypted version of a password. It is in /home/ispy/secret/crypt/htpass (just name:code)

2. I pasted a path: /home/ispy/secret/crypt/htpass into "red line" plase in htaccess file.

3. I set, by Barclays website CPI AdminPanel, all POST options as you wrote and checked POST order result field.

4. I don't know what should I set here as return url. You wrote: "Look in includes/modules/payment/ePDQ.php around line 320 for the return URL." - http://www.ispysecurityservices.co.uk/shop/cpi/complete.php ?

 

Is the rest all right? I would like to make a test of it today evening. I hope it will be working for now...

Edited by 3D-media
Link to comment
Share on other sites

No, return URL should be something like http://www.ispysecurityservices.co.uk/shop/epdq_success.php (try and make it httpS so you don't get browser warnings)

 

Other than that, well done!

 

Return URL is where the customer will be sent on the last click on Barclays pages. epdq_success.php checks the epdq_transaction tables for errors. If there's an error it redirects back to the shopping cart. If no errors, it redirects to checkout_process and then to checkout_success and the sale is done.

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, I understand function of Return URL and epdq_success.php Customer must be redirect from the bank back to shop to save an order and then to show client information, that purchase is done. Great.

http://www.ispysecurityservices.co.uk/shop/epdq_success.php - it is exactly path for this file on my server.

 

Is it a correct place for my path? It is 502 line in my file...

" tep_draw_hidden_field('returnurl', 'https://yourreturnurl.php') . "\n" .//tep_href_link(MODULE_PAYMENT_EPDQ_RETURNURL, $epdq_return) ) . "\n" . "

Edited by 3D-media
Link to comment
Share on other sites

Hi Guys and Dolls,

 

I have a slight problem with the contrib in that it all works fine right up until the user completes the payment and is returned to our website.

 

For some weird reason, the items they have ordered get doubled up when admin views the users order.

 

The order total does not double up though.

 

Any help would be greatly appreciated

Link to comment
Share on other sites

You probably didn't update the checkout_process file properly.

 

It used to enter the order details in the tables right there.

 

Now checkout_confirmation (and to a smaller extent cpi/complete.php) does that.

 

You probably left an INSERT statemet to do with products in checkout_process untouched.

 

You'll find that the contribution code puts in if statement around those tep_dq_query calls to make sure it doesn't execute those queries if the payment module was ePDQ (or "Credit or Debit card").

Edited by JoeMcManus

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

You probably didn't update the checkout_process file properly.

 

It used to enter the order details in the tables right there.

 

Now checkout_confirmation (and to a smaller extent cpi/complete.php) does that.

 

You probably left an INSERT statemet to do with products in checkout_process untouched.

 

You'll find that the contribution code puts in if statement around those tep_dq_query calls to make sure it doesn't execute those queries if the payment module was ePDQ (or "Credit or Debit card").

 

Hi guys I have installed your module at http://www.perfumediscounts.co.uk/catalog/ and I got it working, however I can't get the ePDQ module to calculate the shipping, it's just taking the basic price amount and it's not adding VAT or shipping, is their anything I can do to make it calculate this.

 

OK, thanks,

 

 

harshy

Link to comment
Share on other sites

ePDQ doesn't do that.

 

Shipping is calculated on checkout_shipping with the shipping modules. You will have to seek help with the right contribution or section in the forum.

 

Nothing to do with this contribution.

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

ePDQ doesn't do that.

 

Shipping is calculated on checkout_shipping with the shipping modules. You will have to seek help with the right contribution or section in the forum.

 

Nothing to do with this contribution.

 

Thanks for replying Joe, so the actual module dosen't calculate shipping, I will tell the client to add it inclusive for now, it must mean that one of the codes that does that bit has been highlight out, because it used to work with Protx

Link to comment
Share on other sites

The Protx code must have had some custom code then. Payment and Shipping are completely separated in osCommerce so there is no way they should relate.

 

Just check your code during the checkout_ files for the $shipping-> contents. Just echo everything and see where the value changes. Also keep an eye on $orders->total I think it is off the top of my head.

 

ePDQ does store the shipping charge but doesn't manipulate it. Around line 238 you will find where it gets stored:

 

for ($i=0, $n=sizeof($order_totals); $i<$n; $i++) {
		$sql_data_array = array('orders_id' => $insert_id,
								'title' => $order_totals[$i]['title'],
								'text' => $order_totals[$i]['text'],
								'value' => $order_totals[$i]['value'],
								'class' => $order_totals[$i]['code'],
								'sort_order' => $order_totals[$i]['sort_order']);

		tep_db_perform(TABLE_ORDERS_TOTAL, $sql_data_array);
	  }

 

Trace back where those values were set (probably checkout_shipping.php) and it should be an easy debug/fix.

Edited by JoeMcManus

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

The Protx code must have had some custom code then. Payment and Shipping are completely separated in osCommerce so there is no way they should relate.

 

Just check your code during the checkout_ files for the $shipping-> contents. Just echo everything and see where the value changes. Also keep an eye on $orders->total I think it is off the top of my head.

 

ePDQ does store the shipping charge but doesn't manipulate it. Around line 238 you will find where it gets stored:

 

for ($i=0, $n=sizeof($order_totals); $i<$n; $i++) {
		$sql_data_array = array('orders_id' => $insert_id,
								'title' => $order_totals[$i]['title'],
								'text' => $order_totals[$i]['text'],
								'value' => $order_totals[$i]['value'],
								'class' => $order_totals[$i]['code'],
								'sort_order' => $order_totals[$i]['sort_order']);

		tep_db_perform(TABLE_ORDERS_TOTAL, $sql_data_array);
	  }

 

Trace back where those values were set (probably checkout_shipping.php) and it should be an easy debug/fix.

 

Thanks Joe,

 

I'll try it at home where I will be able to concentrate.

 

OK, thanks,

 

 

harshy

Link to comment
Share on other sites

Hello

 

I thought my site was working fine but I have just realised that if people do not click complete order in epdq then they will not be sent a confirmation email and the items will still be in the shopping cart, the order does show up as success in admin but not pending. I know I had this working at one point, any ideas what I have messed up?

 

Dave

Link to comment
Share on other sites

Correct. They won't get an email. That;s because checkout_process sends the email. It's a known missing feature. I'm trying to get complete.php to do that.

 

But what's important is that you DID get the order and the status DID get updated. Money-wise you're fine.

 

I hadn't thought of the shopping cart bit before. i guess I'll get complete.php to empty the cart if transaction is successful.

 

I'm going to post an updated contribution end of this month with loads of improvements.

 

We also urged Barclays to make that 'complete order' button stand out more. Simple red font could work. If you guys do the same then they might actually improve their end whilst I improve the stuff on our end based on your feedback.

 

So all is as expected at your end. But thanks for the shopping cart emptying idea, that's a good one.

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

Thats's realy odd i was sure I'd had it working even if people didn't complete order, I must of imagined it.

 

A couple of other quick questions, firstly if orders are declined, are declined messages supposed to be shown once back in oscommerce?

 

And when people click confirm order they are returned straight to oscommerce in firefox but explorer warns "you are about to be redirected to a connection that is insecure". In payment/epdq.php I have the return url set to an https address which solved the warnings in firefox but not in explorer, any ideas?

 

Dave

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