Jump to content


Corporate Sponsors


Latest News: (loading..)

DamanC

Member Since 07 Apr 2009
Offline Last Active May 26 2011, 18:07
-----

Topics I've Started

Sage pay Server

26 May 2011, 17:43

Sorry to post this in here but hopefully this may give me something more to play with.

I'm having issues integrating sage pay server into OSC and have hit a brick wall : http://forums.oscommerce.com/topic/375636-sage-pay-server-error-5006/

This issue is sage pay rejects an order because it receives no response from the 'notifcation URL'.

The URL is

notificationurl=https://www.mydomain.co.uk/checkout_process.php?check=SERVER&osCsid=07859e3396eba48a966ab5164f53296a

and is generated from a bit of code in the sage_pay_server.php file;

            if ( MODULE_PAYMENT_SAGE_PAY_SERVER_PROFILE_PAGE == 'Normal' ) {
              $error_url = tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'payment_error=' . $this->code . (tep_not_null($error) ? '&error=' . $error : '') . '&' . tep_session_name() . '=' . tep_session_id(), 'SSL', false);
            } else {
              $error_url = tep_href_link('ext/modules/payment/sage_pay/redirect.php', 'payment_error=' . $this->code . (tep_not_null($error) ? '&error=' . $error : '') . '&' . tep_session_name() . '=' . tep_session_id(), 'SSL', false);
            }

            $result = 'Status=OK' . chr(13) . chr(10) .
                      'RedirectURL=' . $error_url;
          } else {
            $result = 'Status=OK' . chr(13) . chr(10) .
                      'RedirectURL=' . tep_href_link(FILENAME_CHECKOUT_PROCESS, 'check=PROCESS&key=' . md5($sage_pay_server_securitykey) . '&VPSTxId=' . $HTTP_POST_VARS['VPSTxId'] . '&' . tep_session_name() . '=' . tep_session_id(), 'SSL', false);
          }
        } else {
          tep_session_unregister('sage_pay_server_securitykey');
          tep_session_unregister('sage_pay_server_nexturl');

          $error = $this->getErrorMessageNumber($HTTP_POST_VARS['StatusDetail']);

          if ( MODULE_PAYMENT_SAGE_PAY_SERVER_PROFILE_PAGE == 'Normal' ) {
            $error_url = tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'payment_error=' . $this->code . (tep_not_null($error) ? '&error=' . $error : '') . '&' . tep_session_name() . '=' . tep_session_id(), 'SSL', false);
          } else {
            $error_url = tep_href_link('ext/modules/payment/sage_pay/redirect.php', 'payment_error=' . $this->code . (tep_not_null($error) ? '&error=' . $error : '') . '&' . tep_session_name() . '=' . tep_session_id(), 'SSL', false);
          }

          $result = 'Status=INVALID' . chr(13) . chr(10) .
                    'RedirectURL=' . $error_url;
        }

        echo $result;

with particular attention to

'RedirectURL=' . tep_href_link(FILENAME_CHECKOUT_PROCESS, 'check=PROCESS&key=' . md5($sage_pay_server_securitykey) . '&VPSTxId=' . $HTTP_POST_VARS['VPSTxId'] . '&' . tep_session_name() . '=' . tep_session_id(), 'SSL', false);


I'm not entirely convinced my notification URL should contain
amp;
can anyone see or think why it might be?


Also, is there anything I can change to perhaps make the redirect/notification url static such as 'checkout_success.php? I'm no Guru but have fuffed about with it for ages but don't know the correct syntax.

Appreciate your time :)

Sage pay Server Error 5006

25 May 2011, 16:11

Hi Guys,

I have spent the last few days trying to solve a problem I am having with Sage Pay Server 1.1 on my 2.2RC2 Store.

I have been given a test account from sage and in order to get our live account I have to process a dummy transaction through the test server and then refund it. Easy you would think!

Its all setup, works nicely though the iframe however when the proceed button is clicked (or cancel) i get the dreaded 5006 error;


HTTP Status Code: 500
HTTP Status Message: The request was unsuccessful due to an unexpected condition encountered by the server.
Error Code : 5006
Error Description : Unable to redirect to Vendor's web site. The Vendor failed to provide a RedirectionURL.


I have read thread after thread on here and on the sage forum to no avail and just cannot make head or tail of it. Im fairly sure its something to do with a redirection URL IE - The checkout_success page but im at a loss as to where its defined, or why it would need to be edited?

So anyone able to help?