Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[CONTRIBUTION] Nochex APC Payment Module


ldavies83

Recommended Posts

Hi Nagsy.

 

Its a NOT query.  therefore if they were to look at order page on that day. they would see all "nochex processing".

 

If the order was on any other day however, they would not be shown.

 

It was your suggestion that the nochex server might be slow, which brought me to this conclusion.

 

If the server was slow and the user looked at his order history on the same day and "ALL" nochex was hidden, that might confuse them more.

 

How to do it now, thats a question.  a simple if statement on the echo routine would do that however:

 

I've just had a quick look at the code for my site and the select query is automatically removing all the nochex processing items.

 

Look around line 65 on the account_history.php file.

 

If you've installed the contrib as per the instructions given, you should see the "history_query_raw" select query has a where statement "and o.orders_status != '50000'"

 

This is the status for "No chex processing"

 

Mark

 

Mark,

 

Please check your pm.

 

Nagsy

Link to comment
Share on other sites

  • Replies 323
  • Created
  • Last Reply

Top Posters In This Topic

Here is a possible issue for everyone.

 

I was just commenting the other day about how I find the some customers get to the no-chex page and then don't enter their details but dont return to the shop to choose a different payment method. Thus leaving me with the famous "Nochex Processing" status.

 

Then I get an e-mail yesterday from a client who tells me that there is an error on my site stating that they received a page not found error.

 

Knowing that my site is complete and thoroughly tested, I asked what had happended and when simulating, the error does occur.

 

Go through your checkout proceedure and go to the nochex page.

 

Don't make the transaction and don't click the cancel button.

 

Click the back button on the browser and there's the page not found error.

 

Click refresh and the page will be shown.

 

This may well be the issue which is making my customers who don't proceed with their order using nochex, from choosing a different payment method. :'(

 

I haven't got round to looking at a solution yet, but thought I'd let everyone know of the problem.

 

I'll post a fix once sorted.

Link to comment
Share on other sites

Mark,

 

I just tried the scenario you mentioned and T get a

'Warning: Page has Expired' message is this what you mean?

 

Nagsy

 

 

Here is a possible issue for everyone.

 

I was just commenting the other day about how I find the some customers get to the no-chex page and then don't enter their details but dont return to the shop to choose a different payment method. Thus leaving me with the famous "Nochex Processing" status.

 

Then I get an e-mail yesterday from a client who tells me that there is an error on my site stating that they received a page not found error.

 

Knowing that my site is complete and thoroughly tested, I asked what had happended and when simulating, the error does occur.

 

Go through your checkout proceedure and go to the nochex page.

 

Don't make the transaction and don't click the cancel button.

 

Click the back button on the browser and there's the page not found error.

 

Click refresh and the page will be shown.

 

This may well be the issue which is making my customers who don't proceed with their order using nochex, from choosing a different payment method.  :'(

 

I haven't got round to looking at a solution yet, but thought I'd let everyone know of the problem.

 

I'll post a fix once sorted.

Link to comment
Share on other sites

Mark,

 

I just tried the scenario you mentioned and T get a 

'Warning: Page has Expired' message is this what you mean?

 

Nagsy

 

Hi Nagsy,

 

No it wasn't a Page has Expired message, it was a page not found.

 

Really strange.

 

Mark

Link to comment
Share on other sites

Hello All,

 

It appears that there is a little issue at present concerning the display of previous orders:

 

'If a customer initiates a transaction but subsequently does not complete the purchase in the Nochex window then they are still able to view the order through the ?Previous Orders' functionality. This can be a potential problem - if a customer is browsing your site and wants to see how it works they may initate a 'dummy' transaction passing through to the Nochex window. If they they then check their Previous Orders they will have a record being displayed with 'Nochex Processing' -this can be confusing for the customer.

 

To avoid showing the 'Nochex Prococessing' rows via 'Previous Orders' you will need to do the following (remember to backup files first!):

 

1) catalog/account.php

On or around line 97 add the filter as follows just before the order by command:

"o.orders_status != '50000'"

2) catalog/includes/functions/general.php

For the function tep_count_customer_orders around line 1357 the query

returns the total number of orders irrespective of the order status. Therefore a similar condition as above needs to be applied.

 

3) Mark (aka Marcoh) has also pointed out that there is a further amendment required if using the statistics on the admin side:

 

stats_customers.php

around line 60, and around line 63 the filter needs to be put in here so that the order is not added to the gross order totals giving false results.

 

You need to amend the o.orders_status and order_status coding accordingly depending on if the query is relational or direct.

 

Please note that the stats_products_purchased.php also gives a false reading of how many products have been sold since it uses the products table. If you delete the order with the "restock product quantity" ticked, the values will be corrected.

 

Hope this fix helps,

 

Regards,

 

Nagsy

 

PS Big thanks to Mark for testing/verifying my changes and for recommending a solution for the statistics problem on the admin side. :thumbsup:

Link to comment
Share on other sites

Hi all,

 

I have just installed the nochex apc contribution on CRE Loaded. Everything is working fine except the transactions page in the admin section. When I click Nochex APC -> Transactions, I get redirected to the page 'forbiden.php' which says 'No Right Permission Access'. Anybody able to help me out?

 

idavies - thanks again mate for a great contribution

OSC Image Magic

On-the-fly thumbnails, watermarks and image processing

Link to comment
Share on other sites

Hi,

Just incase anyone can help.

 

This is a GREAT contrib that works perfectly however ive still got an issue with the shopping cart not emptying on completion of a transaction.

 

I tried the fix as in post 78 that adds $cart->reset(TRUE); as per the posters code but that didnt seem to work and the items can still be seen in the shopping cart on completion of payment.

 

Does anyone have any ideas how to clear this on completion of payment at all?

Everything else works fine and is GREAT!

 

Thanks

James

Link to comment
Share on other sites

Hi all,

 

I have just installed the nochex apc contribution on CRE Loaded. Everything is working fine except the transactions page in the admin section. When I click Nochex APC -> Transactions, I get redirected to the page 'forbiden.php' which says 'No Right Permission Access'.  Anybody able to help me out?

 

idavies - thanks again mate for a great contribution

 

Hi tom

 

Yes, know whats happening, go to admin - administrator - file access. Click on nochex folder and then in the drop down box on the right add nochex files. You will then have permission to use them.

 

kind regards

Kim

Link to comment
Share on other sites

Just for anyones interest that is using this, the fix to my problem 2 post above this one is in post 81 (I was too blind not to see it)

It wont clear the cart on completion of payment otherwise.

Link to comment
Share on other sites

Hi guys, sorry to bump, but it would be nice to sort this out, and I am sure someone out there knows what I have stupidly done :blush:

 

Hi

I have installed the apc mod, thanks it is going to work great. In fact it already works, well it did and for some reason now i dont get updated to authorised either in paypal or Nochex.

 

Test orders do not show up in transactions for either, but when I go to https://www.nochex.com/nochex.dll/apc/testapc , it goes into transactions fine. I get the debugging email which says what it should. I cant work it out..

 

Have I done something stoopid?

Link to comment
Share on other sites

I am having trouble getting the orders to authorise also, what part of the code changes the order status from processing?

 

 

The file "nochex_notify.php" is run by the responder from Nochex. This script changes the order status depending on the parameters returned from nochex.

 

One thing that may be an issue is the address you have put into the responder column on the shops admin side.

 

Go to your shops Admin panel and select the nochex payment module.

 

Where it says "APC Responder Module Address

Enter the location of the NOCHEX noticiation file for use with the APC System

"

make sure you put the full url address in.

 

ie http://www.yourdomain/nochex_notify.php or https://www.yourdomain/nochex_notify.php

 

or variations depending on your hosting.

 

Just putting nochex_notify.php etc. will not work.

 

Hope you get it sorted.

 

Mark

Link to comment
Share on other sites

Hi,

I've read this thread a couple of times and it seems people are having the same problem as me but I can't really see an answer on how to fix it

.

I go to the NoChex APC test page, whack in the link to my notify_nochex.php script and it gives me the result on the page:

 

transaction_id=146519

transaction_date=27/01/2005 17:47:30

order_id=999999

amount=1.99

[email protected]

[email protected]

security_key=40710

 

I don't get an email with this stuff in it but I then get an email with the subject "NOCHEX VALIDITY RESPONSE: NO RESPONSE" over and over again.

 

I've tried a test transaction and although it seems to go through to NoChex and payment is made, it never updates the shop to generate an order email or change the status to NoChex Approved (or whatever it is it changes it to).

 

Can anyone post an answer to this problem that even a complete php/web numpty can understand, it's doing my head in blink.gif

 

Cheers

 

Did anyone manage to answer/sort this yet? Had 1 reply which just quoted my post which although nice, wasn't a huge amount of help ;)

Link to comment
Share on other sites

Hi Scooby,

 

The nochex APC does not send out a confirmation email when a order has taken place. I just routinely check the orders via the admin. Any orders which are 'Nochex Processing' basically means that the customer pressed the submit button on your site and went to the nochex payment gateway window. Upon reaching this point they did not complete the transaction - if they did then the status would change to 'Nochex Authorised'.

 

Regarding the problem with the repetitive email "NOCHEX VALIDITY RESPONSE: NO RESPONSE" - I would make sure you have CURL installed correctly and SSL.

You can also check your config against mine -

In Admin I have two payment modules setup:

1)Nochex

2)Secure (SSL) Payment via Nochex

My config in admin for the above two modules is as follows:

 

Nochex:

Enable NOCHEX Module

Do you want to accept NOCHEX payments?

True.

 

E-Mail Address

The e-mail address to use for the NOCHEX service

[email protected]

 

Payment Zone

If a zone is selected, only enable this payment method for that zone.

None

 

Set Order StatusSet the status of orders made with this payment module to this value

Nochex Authorised

 

Sort order of display.

Sort order of display. Lowest is displayed first.

 

Secure (SSL) Payment via Nochex:

 

Enable NOCHEX Module

Do you want to accept NOCHEX payments?

True

 

Functionality Mode

If test mode is on, payments will NOT be processed (XTRA accounts only).

Live

 

Logo to display

The Logo to use for the NOCHEX service (Leave blank for default logo)

http://www.yoursite.co.uk/catalog/images/yoursite_logo.jpg

 

Enable NOCHEX APC Responder

Do you want to enable NOCHEX Automatic Payment Confirmation (APC)?

True

 

APC Responder Module Address

Enter the location of the NOCHEX noticiation file for use with the APC System

http://www.yoursite.co.uk/catalog/nochex_notify.php

 

E-Mail Address

The e-mail address to use for the NOCHEX service

[email protected]

 

Update Stock Before Payment

Should Products Stock be updated even when the payment is not yet COMPLETED?

False

 

Payment Zone

If a zone is selected, only enable this payment method for that zone.

None

 

Set Order Status

APC Sets the status of orders authorised with this value

Nochex Authorised

 

Sort order of display.

Sort order of display. Lowest is displayed first.

1

 

Debug Email Code

Switch on debugging script to troubleshoot problems? (Emailed script will be sent to store owners email address)

False

 

Hope this helps,

 

Nagsy

Link to comment
Share on other sites

The file "nochex_notify.php" is run by the responder from Nochex.  This script changes the order status depending on the parameters returned from nochex.

 

One thing that may be an issue is the address you have put into the responder column on the shops admin side.

<SNIP>

Just putting nochex_notify.php etc.  will not work.

 

Hope you get it sorted.

 

Mark

Hi Mark

 

Thanks for that, but no joy yet sadly. I have the resonder set to the correct address as you suggested, but no link appears in the order history. All orders sit at Nochex Processing and go no further. If completed manually, they are fine - the links work as expected.

 

Also, no transactions show up in the Nochex APC section of the Admin screen. I'm assuming that they only get there is the thing is set to live and they are properly processed.

 

Any help anybody can offer would be gratefully appreciated.

 

Simon

Link to comment
Share on other sites

I have the resonder set to the correct address as you suggested, but no link appears in the order history. All orders sit at Nochex Processing and go no further. If completed manually, they are fine - the links work as expected.

 

Also, no transactions show up in the Nochex APC section of the Admin screen. I'm assuming that they only get there is the thing is set to live and they are properly processed.

 

Any help anybody can offer would be gratefully appreciated.

 

Simon

 

Can't offer any help as I've exactly the same situation going on in a shop I've recently configured for a friend. This is the second store I've done though, and the first one has been working fine to the best of my knowledge.

 

Jax

Link to comment
Share on other sites

  • 2 weeks later...

Hi All,

I've had to makes some changes to the Nochex APC script to get it to work on a Windows based server, it seems there may be a small bug in the processing part. Anyway my server was exhibiting the same symptoms as some others around here, Receiving an email saying No Response. I've sorted that bug out now, but I also wish to fix some of the other bugs.

The bugs I've logged so far are:

- Auto Rounding up of price in nochex transactions page to 0 decimal places

- New Admin option to either empty the basket or not on completion of checkout

- More email debugging, the No Response status is a little misleading, because nochex does send you data, just not the right data ;)

- Email debug script doesnt seem to work, at least it didnt with me

- Hide the order from order history until authorised from Nochex (but only on current day.

 

If anyone else tracks a bug or feature PM me with the subject BUG/FEATURE: Nochex APC and I will look into it.

Contribs Written: Nochex APC Payment Module, Cheque Payment Module

Contribs Updated: Information Pages Unlimited, Latest News V1

You've gotta be Quick on the Draw in this game!

Link to comment
Share on other sites

  • 2 weeks later...

Does the user need a NOCHEX account to use pay via this module or can they enter their credit/debit card details during the payment process?

 

Thanks in advance,

 

Paul.

Link to comment
Share on other sites

Does the user need a NOCHEX account to use pay via this module or can they enter their credit/debit card details during the payment process?

 

Thanks in advance,

 

Paul.

 

Have a quick look on the Nochex website for further details, however it is my understanding that if they do not have a nochex account there is a transaction limit of ?100.

 

If they have a nochex account, there is no limit to how much they can pay.

 

 

Mark

Link to comment
Share on other sites

Have a quick look on the Nochex website for further details, however it is my understanding that if they do not have a nochex account there is a transaction limit of ?100.

 

If they have a nochex account, there is no limit to how much they can pay.

Mark

 

Hi Mark,

 

Thanks for the reply. I have checked out the terms and conditons of the Nochex website but I'm still unclear as to how the actual Nochex APC module will work.

 

What I have done is setup the module on a test machine and used my own Nochex (Xtra) account. I then attempt to purchase an item (as if I'm a customer to my test site) and say I want to pay via Nochex. I am then taken to the Nochex secure webpages where it asks for my Nochex account details.

 

I have seen examples where at this point it asks for your card details and does not assume the customer already has their own Nochex account.

 

So what I am basically saying is that I don't want the module to assume the customer already has a Nochex account but actually prompt them for their card details.

 

How is this done?

 

Thanks,

 

Paul.

Link to comment
Share on other sites

Thanks, I've checked all those settings and they are the same. I've definately got cURL installed as I had to recompile it all. Is it a requirement to have SSL installed as well? I assumed that NoChex's own SSL would take care of the security aspect.

 

Hi Scooby,

 

The nochex APC does not send out a confirmation email when a order has taken place.  I just routinely check the orders via the admin.  Any orders which are 'Nochex Processing' basically means that the customer pressed the submit button on your site and went to the nochex payment gateway window.  Upon reaching this point they did not complete the transaction - if they did then the  status would change to 'Nochex Authorised'.

 

Regarding the problem with the repetitive email "NOCHEX VALIDITY RESPONSE: NO RESPONSE" - I would make sure you have CURL installed correctly and SSL. 

You can also check your config against mine -

In Admin I have two payment modules setup:

1)Nochex

2)Secure (SSL) Payment via Nochex

My config in admin for the above two modules is as follows:

 

Nochex:

Enable NOCHEX Module

Do you want to accept NOCHEX payments?

True.

 

E-Mail Address

The e-mail address to use for the NOCHEX service

[email protected]

 

Payment Zone

If a zone is selected, only enable this payment method for that zone.

None

 

Set Order StatusSet the status of orders made with this payment module to this value

Nochex Authorised

 

Sort order of display.

 

Sort order of display. Lowest is displayed first.

 

Secure (SSL) Payment via Nochex:

 

Enable NOCHEX Module

Do you want to accept NOCHEX payments?

True

 

Functionality Mode

If test mode is on, payments will NOT be processed (XTRA accounts only).

Live

 

Logo to display

The Logo to use for the NOCHEX service (Leave blank for default logo)

http://www.yoursite.co.uk/catalog/images/yoursite_logo.jpg

 

Enable NOCHEX APC Responder

Do you want to enable NOCHEX Automatic Payment Confirmation (APC)?

True

 

APC Responder Module Address

Enter the location of the NOCHEX noticiation file for use with the APC System

http://www.yoursite.co.uk/catalog/nochex_notify.php

 

E-Mail Address

The e-mail address to use for the NOCHEX service

[email protected]

 

Update Stock Before Payment

Should Products Stock be updated even when the payment is not yet COMPLETED?

False

 

Payment Zone

If a zone is selected, only enable this payment method for that zone.

None

 

Set Order Status

APC Sets the status of orders authorised with this value

Nochex Authorised

 

Sort order of display.

Sort order of display. Lowest is displayed first.

1

 

Debug Email Code

Switch on debugging script to troubleshoot problems? (Emailed script will be sent to store owners email address)

False

 

Hope this helps,

 

Nagsy

Link to comment
Share on other sites

Also, if I enable the debug, I get this in an email every minute or so:

"Opening connection

Raw Response from Nochex:

Checking Response

Result: Now checking order and updating as necessary

Completed APC notify script!"

 

along with multiple "NOCHEX VALIDITY RESPONSE:NO RESPONSE"

 

Help!!!!!!!!!!

 

I don't know whether I'm fundamentally misunderstanding what this contribution was supposed to do, I assume it would take a payment and then update my shop so I knew that someone had ordered and paid??? In fact I'm getting entirely peed off with osCommerce full stop, as with all open source software it's a complete swine to install, configure and use. I've been working on this on and off now for 3 months and still not really any closer to getting it working properly (if you consider unable to pay, unable to work out shipping costs as properly anyway!). Any suggestions for some good quality, easily installed, properly supported ecommerce solutions as I simply don't have the spare time to spend much more of it messing with this.

Link to comment
Share on other sites

Wo-ah, calm down Scooby.

 

First and foremost osCommerce is 'Numero Uno' without a doubt. I looked long and hard for a top-notch ecommerce system which was low on cost and big on functionality - osCommerce came tops everytime. Support for most issues is sufficient - as with everything if you want something done immediately (install/configuration etc etc) you can always pay someome to do it for you.

 

Installing and configuring osCommerce should be a doddle - thats only if you read the instructions properly and read related posts. Using the Knowledge base should be more than sufficient for your needs: http://www.oscommerce.info/

 

Regarding the Nochex APC - Leigh has produced a great APC which does exactly what it says on the box: takes the customer to the Nochex Window, once Nochex has validated the transaction, returns the customer to the webstore (and updates the db in the webstore accordingly). Nifty piece of coding really!

 

I must admit I did have a few problems with installing the APC but like many of us it was because my server was not configured correctly.

 

Scooby, you will need an SSL certifcate installed. Then you may have to re-install CURL with SSL enabled so that it supports https.

 

You can confirm this by running phpinfo() and it will come back with the modular information for you - and it should state that CURL is installed with SSL enabled.

 

Hope this helps.

 

Cheers,

 

Nagsy

 

Also, if I enable the debug, I get this in an email every minute or so:

"Opening connection

Raw Response from Nochex:

Checking Response

Result: Now checking order and updating as necessary

Completed APC notify script!"

 

along with multiple "NOCHEX VALIDITY RESPONSE:NO RESPONSE"

 

Help!!!!!!!!!!

 

I don't know whether I'm fundamentally misunderstanding what this contribution was supposed to do, I assume it would take a payment and then update my shop so I knew that someone had ordered and paid???  In fact I'm getting entirely peed off with osCommerce full stop, as with all open source software it's a complete swine to install, configure and use.  I've been working on this on and off now for 3 months and still not really any closer to getting it working properly (if you consider unable to pay, unable to work out shipping costs as properly anyway!).  Any suggestions for some good quality, easily installed, properly supported ecommerce solutions as I simply don't have the spare time to spend much more of it messing with this.

Link to comment
Share on other sites

Thanks, that's part of my frustration, I spent ages researching various solutions and time and again osCommerce came out top so that makes it all the more annoying :)

Anyway, I'll see if I can get an SSL key sorted and recompile, see what happens then.

Cheers

Link to comment
Share on other sites

OK, it seems an SSL certificate etc is going to set me back somewhere in the region of ?160 :blink:

Is this definately the problem? I'm still unsure as to why we need it, does this contribution *only* support SSL connections? I would have thought that the stuff that needs to be secure (ie card details etc) would be secured by NoChex as it's all entered on their pages, so to secure what they ordered seems a bit of overkill to me.

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