Jump to content
ldavies83

[CONTRIBUTION] Nochex APC Payment Module

Recommended Posts

Hi,

 

I have been running this for about a year but I have one small problem.

When an order is placed, the customer is taken to the Nochex website, they pay and then they are returned to my site with the checkout success screen.

 

I receive an email from Nochex about funds received, but not about the order from oscommerce. I thought it was people been impatient and not waiting to be returned back to oscommerce, but after doing some tests myself, the order status isn?t updated.

 

If I switch on debugging I get loads of emails which have all the details except the status is declined, looking at nochex_txn.php I only see declined transactions.

 

I went to https://www.nochex.com/nochex.dll/apc/testapc and received a correct response and also in nochex_txn.php I see that transaction as authorised.

 

Looking at the nochexapc_transactions database table, I see that for every order I get 10 identical declined entries except the first one has the status field set as live, all the others have an empty status field.

 

nochexapc_trans_id transaction_id to_email from_email transaction_date record_updated order_id amount security_key nochex_response status

312 627246 nochex_account@mysite.com customer@hotmail.com 24/05/2006 18:12:29 0 332 6.42 L39493945633596095421293485 DECLINED

 

 

Any ideas,

 

Thanks,

 

Simon

Share this post


Link to post
Share on other sites

I have the same problem - does anyone have it auto filling the surname?

 

Hi guys,

 

thanks for such great work with this contribution, just need to fix a little problem;

 

When the customer goes through the checkout process and reach the nochex checkout page on the nochex website, all the customers details appear there auto filled, apart from the surname!

 

Trivial little problem, but could easily be over looked by my customer, as all the other details are entered correctly!

 

.... PS keep up the good work Mark and everyone else who have supported this contribution.. Reading through this thread has been so useful with setting up APC and i can see a lot of time has been dedicated to supporting the community........ well done!

Darren

 

:thumbsup:

Share this post


Link to post
Share on other sites

Ok, I have a bigger problem. I tried a transaction, and everything was fine.. apart from the fact that it re-directed me back to my shopping_cart page instead of checkout success???

Do I have to set something up in Nochex as well?

Please help me! :blink:

Share this post


Link to post
Share on other sites
Hi,

 

Searching the forum

 

http://forums.oscommerce.com/index.php?showtopic=106059

 

you need this line

 

tep_draw_hidden_field('lastname', $order->billing['lastname']) .

 

Thanks! It works.. formatting a bit odd

 

Firstname ,Lastname

 

not sure where the comma is coming from but good enough for me! Thank you! :)

 

now just to solve the redirection to checkout success page - any ideas on that one?

Share this post


Link to post
Share on other sites
Thanks! It works.. formatting a bit odd

 

Firstname ,Lastname

 

not sure where the comma is coming from but good enough for me! Thank you! :)

 

now just to solve the redirection to checkout success page - any ideas on that one?

 

Hi Natalie,

 

By any chance do you have the (Search engine friendly urls) set to true and / or forcing cookie usage rather than seeing the session id in the url?

 

If you do, turn them both off and then try a further transaction from scratch (load the site as if you were a new customer)

 

I have had similar problems with the session not being returned (from a different payment processor) when the friendly urls is turned on and using the cookies.

 

Basically, the cookie was being cleared when moving to the payment site (clear on exit) obviously, the website didn't know we would be coming back after the transaction.

 

no cookie, means no session id. No session means no order to process, no checkout pages etc....

 

Default would be an empty basket (until you logged back on again) and then the original basket has returned.

 

 

Note, this may have nothing to do with your problem, but at the same time, it may also be a guide as to where a problem may lie.

 

Mark.

 

If not, then I would suggest you look at a solution around the session id.


If at first you don't succeed. Find the answer on a Forum.

Share this post


Link to post
Share on other sites

Thanks for your reply. My search engine friendly URLs are set to false but I am using SEO URLs contrib.. haven't had any trouble with it so far but will try turning it off and see if the same happens. Force cookie usage is false.

 

The page did return to an empty cart (the shopping_cart page with nothing in it) the transaction went through.. the order got returned etc.

 

There must be somewhere in nochex where you set the page it returns to? As you can do with paypal. What is the 'APC Responder Module Address'?

 

 

Hi Natalie,

 

By any chance do you have the (Search engine friendly urls) set to true and / or forcing cookie usage rather than seeing the session id in the url?

 

If you do, turn them both off and then try a further transaction from scratch (load the site as if you were a new customer)

 

I have had similar problems with the session not being returned (from a different payment processor) when the friendly urls is turned on and using the cookies.

 

Basically, the cookie was being cleared when moving to the payment site (clear on exit) obviously, the website didn't know we would be coming back after the transaction.

 

no cookie, means no session id. No session means no order to process, no checkout pages etc....

 

Default would be an empty basket (until you logged back on again) and then the original basket has returned.

Note, this may have nothing to do with your problem, but at the same time, it may also be a guide as to where a problem may lie.

 

Mark.

 

If not, then I would suggest you look at a solution around the session id.

Edited by nat8100

Share this post


Link to post
Share on other sites
Thanks for your reply. My search engine friendly URLs are set to false but I am using SEO URLs contrib.. haven't had any trouble with it so far but will try turning it off and see if the same happens. Force cookie usage is false.

 

The page did return to an empty cart (the shopping_cart page with nothing in it) the transaction went through.. the order got returned etc.

 

There must be somewhere in nochex where you set the page it returns to? As you can do with paypal. What is the 'APC Responder Module Address'?

 

nochex_notify.php in the root directory is the return page.


If at first you don't succeed. Find the answer on a Forum.

Share this post


Link to post
Share on other sites
nochex_notify.php in the root directory is the return page.

 

Well I tried another transaction as a 'new user' and this time it went through to the checkout_success... however the the shopping cart didn't empty. The session ID is still visible in the URL, I'm still logged in and can navigate to my account and see the order I've just placed. Could it be something to do with my SSL settings?

Share this post


Link to post
Share on other sites

got the cart emptying now - solution on post 80. Seems to be working ok now.. I think the first transaction went wrong because I used a gift voucher as part payment so will look into that. Thanks for your help. :)

Share this post


Link to post
Share on other sites

Hi, I'm a little confused with the install instructions so thought best to ask before making a mess of stuff. The file checkout_success.php requires some changes, most done. There is a block of code to add

paste this block of code BEFORE the $breadcrumb
My question is which $breadcrumb? The one just edited? ie:
$breadcrumb->add($NAVBAR_TITLE_2);

or the one above it? ie:

$breadcrumb->add(NAVBAR_TITLE_1);

 

Any guidance much appreciated, Thanks.

Share this post


Link to post
Share on other sites

Installed this great module and it's working great, the only small problem I have is that when I install it in admin, my paypal payment option disappears from the checkout screen, then if I uninstall nochex, paypal re-appears. Anyone any suggestions as to what might be happening.

 

Thanks

Share this post


Link to post
Share on other sites

Hi all

 

I have installed this on a CREloaded version but am getting the following error at checkout:

 

1054 - Unknown column 'popt.products_options_name' in 'field list'

select popt.products_options_name, poval.products_options_values_name, pa.options_values_price, pa.price_prefix, pad.products_attributes_maxdays, pad.products_attributes_maxcount , pad.products_attributes_filename from products_options popt, products_options_values poval, products_attributes pa left join products_attributes_download pad on pa.products_attributes_id=pad.products_attributes_id where pa.products_id = '296{1}3{2}2' and pa.options_id = '2' and pa.options_id = popt.products_options_id and pa.options_values_id = '2' and pa.options_values_id = poval.products_options_values_id and popt.language_id = '1' and poval.language_id = '1'

[TEP STOP]

 

Any help would be appreciated.

 

Cheers

Share this post


Link to post
Share on other sites

Hi, i'm new to both Nochex and this contribution. It's installed and seems to be working fine but i just have one query: On the Nochex site i can configure a "Payments Page" and make it look just like my site but this contribution seems to take me to a different page, is there a way to make it go to the payment page i set up via Nochex?

 

Thanks.

Share this post


Link to post
Share on other sites

Hello All,

I am wondering exactly the same. I standard nochex customer and i used the nochex module that comes with creloaded ( Is this the same module ? ). It directed to the Nochex branded payment page.

 

However now i have a merchant account. I have set my payment page up but the module still shows the same nochex branded payment page. Any ideas or help ?

 

Thanks Alex

Share this post


Link to post
Share on other sites

Someone very kindly helped me on the nochex forums, i haven't tested it 100% but this at least directs to my custom payment page:

 

for the standard nochex payment module on oscommerce edit the nochex.php in folder includes/modules/payment

 

on line 32 change to $this->form_action_url = 'https://secure.nochex.com/';

 

for the apc version edit nochex_checkout.php in the catalog folder

 

on line 239 change to

$formlink = '<form name="checkout" action="https://secure.nochex.com/" method=post>';

Share this post


Link to post
Share on other sites

Hi, just wondering if anyone has a more elegant or better working cure for the cart not emptying when returning from the Nochex site back to OsCommerce?

 

I have tried the $cart->reset(TRUE); method as per this thread, but this only resets the cart if the user refreshes the browser. It does NOT empty automatically.

 

Any ideas greatly appreciated.

Share this post


Link to post
Share on other sites

Dear All,

 

a third party company has developed a new Nochex Module for OSC, that makes use of the new Nochex Payments Pages, in addition to the Nochex APC. The Module works for both Seller & Merchant Accounts, however Merchant Account holders have greater functionality, such as Customisable Payments Pages, Partial Refunds and the ability to pass more parameters in from OSC.

 

Any comments, good or bad, please list them here and we'll get them addressed.

 

Thanks

 

S

 

http://www.oscommerce.com/community/contributions,2280

Share this post


Link to post
Share on other sites
Any comments, good or bad, please list them here and we'll get them addressed.

 

 

Hi,

 

I have just installed this on my test site, seemed pretty straight forward, However when I clicked install in the admin section to install the module I got the following error

 

Warning: Cannot modify header information - headers already sent by (output started at /home/getwi/public_html/dev/admin/includes/languages/english.php:327) in /home/getwi/public_html/dev/admin/includes/functions/general.php on line 22

 

if I then click back the module appears to be installed.

 

Its also the same if I click the remove button.

 

I also get the same error when updating the details for the module

Edited by Get-Wireless 2

Share this post


Link to post
Share on other sites

I seem to have solved the above problem in that I had sum extra carrage returns after the closing ?>

 

I now have the following problem

 

Have left the module set to test and when I click to pay I get transfered to nochex. I am then hit with the following error

 

To perform a test transaction your account must be Xtra enabled

 

According to nochex website a seller account is xtra enabed

Share this post


Link to post
Share on other sites

Nochex now seem to have xtra enabled my account and i can easily go through making a test transaction all the way past nochex and returned to my site.

 

Problem I get now when I click on the Nochex APC in my admin section then click transactions I get the following errors

 

Warning: session_start() [function.session-start]: The session id contains invalid characters, valid characters are only a-z, A-Z and 0-9 in /home/getwi/public_html/dev/admin/includes/functions/sessions.php on line 67

 

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/getwi/public_html/dev/admin/includes/functions/sessions.php:67) in /home/getwi/public_html/dev/admin/includes/functions/sessions.php on line 67

 

Does anybody have a clue as to were I should be looking to fix this ?

Share this post


Link to post
Share on other sites

Installed the contrib, run a test payment, and at the point of confirming payment, I got the following-

 

1146 - Table 'mysite_osc1.TABLE_NOCHEX_APC_TXN' doesn't exist

 

select o.orders_status,p.* from orders o LEFT JOIN TABLE_NOCHEX_APC_TXN p on p.nc_order_id = o.orders_id AND o.customers_id = '6' order by o.date_purchased desc limit 1

 

[TEP STOP]

 

 

There is no table called TABLE_NOCHEX_APC_TXN mentioned in the install so what does this mean?

 

Thanks

 

Colin G.

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

×