Zen Cart Logo
Forums / Addon Payment Modules / NAB Transact orders not appearing in admin since move to new server

NAB Transact orders not appearing in admin since move to new server

Views: 3,661

Results 1 to 20 of 21
11 Aug 2012, 2:24 AM
#1
jenpen avatar

jenpen

Zen Follower

Join Date:
Sep 2007
Location:
Far South Coast, NSW, Australia
Posts:
427
Plugin Contributions:
0

NAB Transact orders not appearing in admin since move to new server

I moved the store a few days ago, and all seemed fine. I have done this many times before with other clients' stores. Now this client tells me that although she is receiving emails confirming payments from the bank (all payments go through NAB Transact Gateway), she is not receiving order confirmations from zencart and orders are not being logged in the admin.
I've never seen this before after other moves. What could be going wrong?

11 Aug 2012, 4:16 AM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: NAB Transact orders not appearing in admin since move to new server

Could be many things:

  • NAB doesn't have the right address of the new server
  • NAB has outdated cached DNS entries for the domain's address and TTL hasn't expired yet for it to update
  • NAB might have an IP address hard-coded into the account's settings
  • the new server's firewall might not be configured to receive traffic back
  • you might have introduced bugs when doing the move
  • etc
  • etc
13 Aug 2012, 1:18 AM
#3
jenpen avatar

jenpen

Zen Follower

Join Date:
Sep 2007
Location:
Far South Coast, NSW, Australia
Posts:
427
Plugin Contributions:
0

Re: NAB Transact orders not appearing in admin since move to new server

Thanks, looks like NAB needs to update something in their system.

15 Aug 2012, 1:04 AM
#4
jenpen avatar

jenpen

Zen Follower

Join Date:
Sep 2007
Location:
Far South Coast, NSW, Australia
Posts:
427
Plugin Contributions:
0

Re: NAB Transact orders not appearing in admin since move to new server

Finally got onto NAB and they said, no, as long as the URL and folder names haven't changed, they don't need to change any of their settings. But I forgot to ask if "NAB has outdated cached DNS entries for the domain's address and TTL hasn't expired yet for it to update". Will call again.
I also wonder if maybe I missed changing permissions on a folder so it can't be written to. Is there a list of folder permissions somewhere I can check against?
And, looking through the back-end, I found a line in <nab_transact_hpp.php>:
$gateway_vars['return_link_url'] = zen_href_link(FILENAME_CHECKOUT_SUCCESS, '', 'NONSSL', true);
Is this right when we have SSL?
Thanks...

15 Aug 2012, 2:39 AM
#5
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: NAB Transact orders not appearing in admin since move to new server

Those are all good questions for the NAB people, or the people who wrote the custom code that interacts with Zen Cart, since they will know the requirements of their code such as permissions and SSL etc.

15 Aug 2012, 3:26 AM
#6
jenpen avatar

jenpen

Zen Follower

Join Date:
Sep 2007
Location:
Far South Coast, NSW, Australia
Posts:
427
Plugin Contributions:
0

Re: NAB Transact orders not appearing in admin since move to new server

Thanks DrByte, I am in tough with the NAB, so far it's "not their fault". Is there a list somewhere of folder permissions that I can check? I've only ever seen it during the installation

15 Aug 2012, 4:03 AM
#7
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: NAB Transact orders not appearing in admin since move to new server

The permissions in Zen Cart are simple. And if your store is letting customers browse around and add things to their cart and your admin can add products etc, then permissions are highly unlikely to be a related problem ... unless the NAB module has some sort of special requirement they haven't specifically mentioned. And any such requirement would be pretty rare.

Anyway, I just dug up this article by searching the FAQs area for "folder permissions": http://www.zen-cart.com/content.php?51-how-do-i-set-permissions-on-files-folders.

15 Aug 2012, 4:08 AM
#8
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: NAB Transact orders not appearing in admin since move to new server

Have you actually done a test transaction, following it all the way through to the checkout_success page which shows back on the store after the customer comes back from the NAB site?
And are you getting any errors in the myDebug-xxxxxx.log files? http://www.zen-cart.com/content.php?124-blank-page

16 Aug 2012, 1:17 PM
#9
i2ts avatar

i2ts

New Zenner

Join Date:
Jan 2009
Posts:
26
Plugin Contributions:
0

Re: NAB Transact orders not appearing in admin since move to new server

I debugged how the addon handles the call back from NAB Transact. I noticed the code in init_session.php (kind of) ignores the callback if the call back URL is not SSL.

The following fix might solve the issue:

Find the following 2 lines in /includes/modules/payment/nab_transact_hpp.php

$gateway_vars['return_link_url'] = zen_href_link(FILENAME_CHECKOUT_SUCCESS, '', 'NONSSL', true);
$gateway_vars['reply_link_url'] = zen_href_link(FILENAME_CHECKOUT_PROCESS, $query_string);

Replace them with

$gateway_vars['return_link_url'] = zen_href_link(FILENAME_CHECKOUT_SUCCESS, '', (ENABLE_SSL ? 'SSL' : 'NONSSL'), true);
$gateway_vars['reply_link_url'] = zen_href_link(FILENAME_CHECKOUT_PROCESS, $query_string, (ENABLE_SSL ? 'SSL' : 'NONSSL'));

This will ensure NAB Transact will call back a SSL URL. This should solve the problem.

The catch is, your cart must have SSL Certificate installed.

I am at a loss to explain how this problem cropped up all of a sudden. Did you change the version of the cart when you moved the store?

Please post back if this solves your problem

16 Aug 2012, 1:18 PM
#10
i2ts avatar

i2ts

New Zenner

Join Date:
Jan 2009
Posts:
26
Plugin Contributions:
0

Re: NAB Transact orders not appearing in admin since move to new server

If anyone needs assistance with applying this fix send me a private message.

16 Aug 2012, 4:21 PM
#11
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: NAB Transact orders not appearing in admin since move to new server

While I can't speak for your overall code changes, I can tell you that the following is unnecessarily complex:```
(ENABLE_SSL ? 'SSL' : 'NONSSL')

The very purpose of that particular parameter is to take an "SSL" or "NONSSL" parameter and then check against the ENABLE_SSL status and use SSL if it's enabled.  So in your case, simply passing 'SSL' in that parameter position would accomplish the same thing you seem to have been targeting.
16 Aug 2012, 11:42 PM
#12
jenpen avatar

jenpen

Zen Follower

Join Date:
Sep 2007
Location:
Far South Coast, NSW, Australia
Posts:
427
Plugin Contributions:
0

Re: NAB Transact orders not appearing in admin since move to new server

Yep, that worked, thanks.
No, I didn't update or anything, just moved all the files from one server to another.
BUT, and here's a clue I think, the SSL on the new server wasn't activated until a day after the move. I knew this and changed the SSL to "false" in the two configure files (and had the cart "down for maintenance") until the SSL kicked in, but maybe the NAB module picked up that there was no SSL? You'll see in my post above that I suspected it had something to do with that line of code.

17 Aug 2012, 3:19 AM
#13
i2ts avatar

i2ts

New Zenner

Join Date:
Jan 2009
Posts:
26
Plugin Contributions:
0

Re: NAB Transact orders not appearing in admin since move to new server

DrByte:

While I can't speak for your overall code changes, I can tell you that the following is unnecessarily complex:```
(ENABLE_SSL ? 'SSL' : 'NONSSL')

> The very purpose of that particular parameter is to take an "SSL" or "NONSSL" parameter and then check against the ENABLE_SSL status and use SSL if it's enabled.  So in your case, simply passing 'SSL' in that parameter position would accomplish the same thing you seem to have been targeting.

Are you suggesting the lines should be as below?
```php
$gateway_vars['return_link_url'] = zen_href_link(FILENAME_CHECKOUT_SUCCESS, '', 'SSL', true);
$gateway_vars['reply_link_url'] = zen_href_link(FILENAME_CHECKOUT_PROCESS, $query_string,  'SSL' );

I am checking in SSL is enabled on purpose. Hence

(ENABLE_SSL ? 'SSL' : 'NONSSL')

As NAB Transact provides the SSL payment page where the customers enter the card details I have seen carts who haven't got their own SSL. While I don't recommend anyone collecting personal information (even if they are not credit card details) via a non-SSL page it is possible for business owners to do this. This is the reason I am checking if SSL is enabled. If it is the code will pass the SSL enabled URL, if it's not the code will pass the non-SSL URL.

In fact, I should have had this code from day one.

The fact Zen Cart ignore if a non-SSL URL is called back has nothing to do with the module or NAB Transact. As I pointed out the code in init_session.php is doing this. Not sure if it's by design. If it is, it is strange ZC allows the cart to operate without SSL, but forces SSL at a certain point. Why not enforce the fact cart must have SSL everywhere? I digress.

I didn't want to code the module specific to this anomaly. The code I gave will work if init_session.php is fixed and ZC starts supporting non-SSL callback (fixed is probably not the correct term as I don't know if it's by design or a mistake)

Want to hear your thoughts on this.

17 Aug 2012, 3:48 AM
#14
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: NAB Transact orders not appearing in admin since move to new server

i2ts:

Not sure if it's by design. If it is, it is strange ZC allows the cart to operate without SSL, but forces SSL at a certain point. Why not enforce the fact cart must have SSL everywhere? I digress.
Well .. not "everything" needs to be SSL. Do all the "product" and product-listing pages need to be SSL? Why?

As far as checkout, Zen Cart does already pass the 'SSL' parameter for all checkout and my-account, etc pages. Same with built-in payment modules.
3rd-party module writers need to also embrace that programming convention, especially those who cannot allow for payment on-site and must rely on passing things back and forth with callbacks etc.

17 Aug 2012, 6:45 AM
#15
i2ts avatar

i2ts

New Zenner

Join Date:
Jan 2009
Posts:
26
Plugin Contributions:
0

Re: NAB Transact orders not appearing in admin since move to new server

DrByte:

Well .. not "everything" needs to be SSL. Do all the "product" and product-listing pages need to be SSL? Why?

I should have been more specific I was refering to the checkout process . I agree, the catalogue doesn't need SSL.

DrByte:

As far as checkout, Zen Cart does already pass the 'SSL' parameter for all checkout and my-account, etc pages.
As far as I know ZC doesn't force the shopping cart owners to have SSL for checkout process. I have test installation of ZC running on local my servers without SSL. Am I missing something?

17 Aug 2012, 8:24 AM
#16
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: NAB Transact orders not appearing in admin since move to new server

Of course Zen Cart can't "force" anybody to do anything. It can't force you to eat your green vegetables each day either.

But, if the storeowner enables SSL on their hosting account and then tells Zen Cart to enable SSL and gives the SSL URL, then Zen Cart will use that SSL info when it builds every page/form that ought to be protected by SSL, such as checkout, login, myAccount, admin, etc. As far as core code is concerned anyway.
Third-party addons which don't specify that a particular URL needs to be SSL, as I described in my earlier posts, won't benefit from that automatic use of SSL.

21 Aug 2012, 6:38 AM
#17
i2ts avatar

i2ts

New Zenner

Join Date:
Jan 2009
Posts:
26
Plugin Contributions:
0

Re: NAB Transact orders not appearing in admin since move to new server

After checking the implementation of the zen_href_link() function I get your orignal point. If I simply pass the value 'SSL' for the $connection parameter the function will check if SSL is enabled and construct the URL. Hence (ENABLE_SSL ? 'SSL' : 'NONSSL') is redundant in my code.

$gateway_vars['return_link_url'] = zen_href_link(FILENAME_CHECKOUT_SUCCESS, '', 'SSL', true);
$gateway_vars['reply_link_url'] = zen_href_link(FILENAME_CHECKOUT_PROCESS, $query_string,  'SSL' );

is more efficient

23 Oct 2012, 2:35 AM
#18
marmi01 avatar

marmi01

New Zenner

Join Date:
Apr 2009
Posts:
30
Plugin Contributions:
0

Re: NAB Transact orders not appearing in admin since move to new server

I too am having this issue but it's intermittent.

Most of the time it works ok but on a couple of occasions it fails and no order is generated.

Mick

23 Oct 2012, 3:17 AM
#19
i2ts avatar

i2ts

New Zenner

Join Date:
Jan 2009
Posts:
26
Plugin Contributions:
0

Re: NAB Transact orders not appearing in admin since move to new server

Have you tried the above mentioned code changes?

23 Oct 2012, 3:20 AM
#20
marmi01 avatar

marmi01

New Zenner

Join Date:
Apr 2009
Posts:
30
Plugin Contributions:
0

Re: NAB Transact orders not appearing in admin since move to new server

I'll try it when I get a chance.

Mick