Zen Cart Logo
Forums / Addon Payment Modules / Secpay error, but there isn't

Secpay error, but there isn't

Locked

Views: 2,150

Results 1 to 7 of 7
This thread is locked. New replies are disabled.
2 Dec 2006, 4:39 PM
#1
kris avatar

kris

New Zenner

Join Date:
Dec 2006
Posts:
2
Plugin Contributions:
0

Secpay error, but there isn't

Hello,
We have recently set up a site with the secpay module, downloaded from the downloads section.
We go through the whole process but when you get transferred back to our site from secpay payment page it says there has been an error. But there hasn't been an error all our payment transactions have gone through fine and into our bank account.
Any help would be much appreciated. We have spent time with secpay's tech support and they advised us to post a message on the zencart forum. So i'm guessing that they can't do much else for us.
Please please help I only have rudimentry knowledge with all of this. We would be totally happy to pay someone to get us up and running if anyone is interested.
Many thanks.
K.

3 Dec 2006, 10:19 PM
#2
clint avatar

clint

New Zenner

Join Date:
Feb 2004
Posts:
76
Plugin Contributions:
1

Re: Secpay error, but there isn't

Had a quick look at this and I 'think' that the problem lies in the before_process part of the code.

Its currently
function before_process() {
global $HTTP_GET_VARS, $_POST;

  if ($HTTP_GET_VARS['code'] == 'A' && !empty($HTTP_GET_VARS['auth_code']) && empty($HTTP_GET_VARS['resp_code']) && !empty($HTTP_GET_VARS['zenid'])) {
    // MUST CONTAIN YOUR DIGEST PASSWORD ESTABLISHED WITH SECPAY
    // $DIGEST_PASSWORD = "secpay" ;        
$DIGEST_PASSWORD = MODULE_PAYMENT_SECPAY_DIGEST ;
    list($REQUEST_URI, $CHECK_SUM) = split("hash=", $_SERVER['REQUEST_URI']) ; 

    if ($HTTP_GET_VARS['hash'] != MD5($REQUEST_URI.$DIGEST_PASSWORD)) {
       zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, zen_session_name() . '=' . $HTTP_GET_VARS[zen_session_name()] . '&payment_error=' . $this->code, 'SSL', false, false));
    }
}

else
{
           zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, zen_session_name() . '=' . $HTTP_GET_VARS[zen_session_name()] . '&payment_error=' . $this->code, 'SSL', false, false));
}


  
}

I think it should be;

function before_process() {
  global $HTTP_GET_VARS, $_POST;

  if ($HTTP_GET_VARS['code'] == 'A' && !empty($HTTP_GET_VARS['auth_code']) && empty($HTTP_GET_VARS['resp_code']) && !empty($HTTP_GET_VARS['zenid'])) {
    // MUST CONTAIN YOUR DIGEST PASSWORD ESTABLISHED WITH SECPAY
    // $DIGEST_PASSWORD = "secpay" ;        
$DIGEST_PASSWORD = MODULE_PAYMENT_SECPAY_DIGEST ;
    list($REQUEST_URI, $CHECK_SUM) = split("hash=", $_SERVER['REQUEST_URI']) ; 

    if ($HTTP_GET_VARS['hash'] != MD5($REQUEST_URI.$DIGEST_PASSWORD)) {
       zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, zen_session_name() . '=' . $HTTP_GET_VARS[zen_session_name()] . '&payment_error=' . $this->code, 'SSL', false, false));
    }
}

  
}

With the else clause removed as the else clause is asking it to show the error page even if the error condition isn't met.

Hope this helps.

12 Feb 2007, 7:34 PM
#3
fozzyo avatar

fozzyo

New Zenner

Join Date:
Mar 2006
Location:
Wolverhampton, UK
Posts:
31
Plugin Contributions:
0

Re: Secpay error, but there isn't

Hmmm, I too seem to be having the same problem.

Integration works fine, payments are authorised according to SECpay (using 'Always Successful' mode). Just when it returns to my Zen store i have the generic error warning ... there is no error code returned ($HTTP_GET_VARS['code'] is null).

If I set the module to Always Fail I get the payment declined message I would expect.

Just trying to workout which bit an what calls the get_error to try and debug it. Its all a bit head against brick wall at the moment.

I tried removing the Else bit but that didn't help out at all.

13 Feb 2007, 11:34 AM
#4
kris avatar

kris

New Zenner

Join Date:
Dec 2006
Posts:
2
Plugin Contributions:
0

Re: Secpay error, but there isn't

We have also been unable to rectify the error. We tried removing that else statement to no effect. Pretty much stuck at the moment and nobody seems to have a clue.
I can only assume it is a problem with whoever wrote the secpay module however can't find out who that is to contact them.

13 Feb 2007, 12:32 PM
#5
superprg avatar

superprg

Totally Zenned

Join Date:
Feb 2006
Location:
Chicago
Posts:
1,349
Plugin Contributions:
0

Re: Secpay error, but there isn't

Hi there
I can see this error for you if I get access to the cart so that I can figure out whats going on
Thanks

15 Feb 2007, 12:24 PM
#6
fozzyo avatar

fozzyo

New Zenner

Join Date:
Mar 2006
Location:
Wolverhampton, UK
Posts:
31
Plugin Contributions:
0

Re: Secpay error, but there isn't

I've got my SecPay module working fine now. Having had several problems and seeing that others are I'll do a post later on to summarise what I've found and link everything together for people to find.

The problem I had was that SecPay would authorise the transaction (using Always Successful mode) but when it passed back to Zen Zen reported a general error - no error code. This was experienced using my merchant account details. The SecPay account is used on an osCommerce site too, and that doesn't use the Digest Password.

Using the full test details:

Merchant ID: secpay
Remote Pwd: secpay
Digest Pwd: secpay

This worked fine, I then set a Digest password on the SecPay account and this resolved my problem.

As I say, I'll make a fuller post later on with suggestions and pitfalls to avoid later.

Mat

13 Jul 2007, 10:23 PM
#7
lehujda avatar

lehujda

New Zenner

Join Date:
Jul 2007
Location:
Essex, UK
Posts:
3
Plugin Contributions:
0

Re: Secpay error, but there isn't

I have got the same problem - did anyone get the details to enable this to be fixed.

Running out of time :-(

ALL help gratrfully received.

Regards

John