Jump to content

TonyBunney

Members
  • Content count

    33
  • Joined

  • Last visited

2 Followers

Profile Information

  • Real Name
    Tony Bunney
  1. TonyBunney

    ULTIMATE Seo Urls 5 - by FWR Media

    That is what I thought. Thanks for the heads up on the Ajax solution. Tony
  2. TonyBunney

    ULTIMATE Seo Urls 5 - by FWR Media

    I have just successfully upgraded my site to SEO URL PRO. The only problem I had with the implementation was me not reading the instructions properly. I do apologies for the PM. Now that it is all working, I would like to know the easiest way to use the new "tep_href_link" function from the admin area. I run various overnight extracts from the admin area where I would like to include correctly formatted URLS. The client would also like to see what the correct URL is for an article he has written and I wanted to use new "tep_href_link" to display the link in the admin area.
  3. TonyBunney

    SagePay Server Integration - RESOLVED

    Good luck.
  4. TonyBunney

    SagePay Server Integration - RESOLVED

    Thanks parma. Let me know how you get on as I have this feeling that I missed something out when I was documenting all the changes.
  5. TonyBunney

    jQuery/Ajax Shopping Cart

    Well, I thought seeing as it is a new year, It is time to start learning AJAX/JQuery and one of my clients requirements looked to be satisfied with this contribution. I have now spent half the day applying the changes, with no luck and the rest of the day rolling back the changes to see if I can find where it is going wrong. Now I am no Ajax specialist to please excuse my ignorance. Having rolled everything out, the first thing I did was add the <script type="text/javascript" src="js/jquery-1.4.2.min.js"></script> to the catalog/shopping_cart.php and immediately I received a warning stating that Webpage error details Message: Object doesn't support this property or method Line: 8 Char: 1 Code: 0 URI: http://www.just-another-thought.info/shop/includes/jquery-oscart.js Please note that I have placed the jquery-oscart.js in the includes directory and not the js directory. I would imagine that this is a big problem but I am willing to be corrected if this is not the case. Thanks
  6. TonyBunney

    SagePay Server Integration - RESOLVED

    At last all is working perfectly. The issue with the characters in front of the response was resolved by adding ob_clean(); before echoing the response back to SagePay. The next issue I hit was that the response from SagePay to indicate that the payment was successful was not sending the correct response and that was because I had SESSION_BLOCK_SPIDERS set to true and HTTP_USER_AGENT from SagePay was set to an entry in DIR_WS_INCLUDES . 'spiders.txt' file, which was causing the software to not start the session properly and this redirecting the SagePay response to the login screen. The next little issue that you should be aware of is that when I added the static IP address to the SagePay settings, the subnet mask had to be set to 255.255.255.000 and not 255.255.255.255. With all of that done. All is working perfectly.
  7. TonyBunney

    SagePay Server Integration - RESOLVED

    Well, here we are over a week later and still no success with the SagePay Integration although, I have now nailed down where the issue lies. After much debugging, I found that the test system had the same problem with the $_GET parameters it was returning, i.e. the test system also requires if (isset($_GET['amp;osCsid']) && $_GET['amp;osCsid'] !=''){$_GET['osCsid'] = $_GET['amp;osCsid'];} But the problem seems to that the session is not being re-established when using the SagePay TEST system, although it is established when using the simulator. The responses I receive from the simulator are the same as the responses I receive from the TEST system, so I am not too sure what is happening. I thought that if an Key=osCsid Value=c09e1bdd9f3b9ae4e674a04fe36b07fd pair in the $_GET parameters, OSC would re-establish the session for me but it does not and so the checkout_process.php tries to redirect the client to the login page. I really do not want to debug all of the session stuff, so I will have a look around the forums to see how a session is re-established.
  8. TonyBunney

    SagePay Server Integration - RESOLVED

    Beginning to think that the word "RESOLVED" was used a bit prematurely. Apologies.
  9. TonyBunney

    SagePay Server Integration - RESOLVED

    Just tried the LOW profile option on the TEST server and received HTTP Status Code: 408 HTTP Status Message: The client failed to send a request in the time allowed by the server. Error Code : 5999 Error Description : The Session is invalid or has expired. What is going on. I will find out what is wrong and get back to you. Who said that integrating SagePay Server with OsCommerce was easy!!
  10. TonyBunney

    SagePay Server Integration - RESOLVED

    Simulator now working perfectly. A note to you all that if you want to use the SagePay simulator, you have to sign up for it but it looks like you can either have a Simulator OR a live account. I had to apply for a simulator account using different credentials but you can link any site to a simulator account, so you can still use the simulator on a live system (which is what I was doing). If you do sign up for a simulator in a different name you will have to make sure that the Vendor field is set to your simulator account name and not the one that is define in MODULE_PAYMENT_SAGE_PAY_SERVER_VENDOR_LOGIN_NAME. So add the following line to the sage_pay_server.php script (before initial message is built) if (MODULE_PAYMENT_SAGE_PAY_SERVER_TRANSACTION_SERVER == 'Simulator') {$SPMerchant = 'simulatorloginname';} else {$SPMerchant = substr(MODULE_PAYMENT_SAGE_PAY_SERVER_VENDOR_LOGIN_NAME, 0, 15);} Remember to replace simulatorloginname to your own simulator login id. And then change the setting of the Vendor value (where the $params array is built) to 'Vendor' => $SPMerchant, Although I have the simulator working perfectly now, I did receive this warning "WARNING: The Simulated Server was able to decode the response from your site (shown in the box above) to obtain the following fields. The Test and Live Servers are NOT as forgiving as the Simulator when the positions of the fields in your response are taken into account. In front of your "Status=" value are extra characters that should not be present. Blank spaces, lines, comments etc. will all cause the real Server system to fail to read the Status correctly. Please modify your Notification Page code to empty the response buffer before writing out the "Status=" value. "Status=" should be the very first characters in the response, followed by a Carraige Return and line feed, followed by "RedirectURL=" and the redirection URL. This simulator will allow you to continue, but you must correct this problem before attempting to use your code against the Test or Live Server systems. " And when I switched over to the test server I got the dreaded 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. But when I looked at the code that details what are sent in reply to the final SagePay message, all I could find is:- $result = 'Status=OK' . chr(13) . chr(10) . 'RedirectURL=' . tep_href_link(FILENAME_CHECKOUT_PROCESS, 'check=PROCESS&key=' . md5($sage_pay_server_securitykey) . '&VPSTxId=' . $_POST['VPSTxId'] . '&' . tep_session_name() . '=' . tep_session_id(), 'NONSSL', false); The $results variable is simpley echoed (echo $result;) later on in the script, which is all that is required to satisfy SagePay's requirement for a response. So I need to look into this further.
  11. TonyBunney

    SagePay Server Integration - RESOLVED

    Sorry, of course I meant to say $HTTP_POST_VARS replaced with $_POST
  12. TonyBunney

    SagePay Server Integration - RESOLVED

    Just noticed something similar with the final response The simulator is responding with the following $_GET variables. [check] => PROCESS [amp;key] => d41d8cd98f00b204e9800998ecf8427e [amp;VPSTxId] => {E19729E3-AB62-477A-A367-2C3E6BFB2AF5} [amp;osCsid] => 12175a21d73728a4e9f94b8a34be9f4e I can always raise a bug against SagePay but I am not too sure how long they will take to fix this so just add the following to checkout_process.php before "include('includes/application_top.php');" if (isset($_GET['amp;key']) && $_GET['amp;key'] !=''){$_GET['key'] = $_GET['amp;key'];} if (isset($_GET['amp;VPSTxId']) && $_GET['amp;VPSTxId'] !=''){$_GET['VPSTxId'] = $_GET['amp;VPSTxId'];} if (isset($_GET['amp;osCsid']) && $_GET['amp;osCsid'] !=''){$_GET['osCsid'] = $_GET['amp;osCsid'];} So you should now have four replacements at the top of checkout_process.php NB I mention $_GET variables here as all references to $HTTP_GET_VARS and $HTTP_PUT_VARS should be replaced with $_GET and $_PUT respectively as the old $HTTP_XXX_VARS are redundant. See http://php.net/manual/en/language.variables.predefined.php for details.
  13. TonyBunney

    Sage Pay Server

    This may help you withthe 5006 problem. http://forums.oscommerce.com/topic/368275-sagepay-server-integration-resolved/
  14. TonyBunney

    SagePay Server Integration - RESOLVED

    I thought that I would just give an insight into my problematic integration of SagePay Server into an OsCommerce site. I will not bore you with all of the details, after all it has taken me 5 days to nail this sucker down. My problem was (Simulator and test servers) that when a user (me in this case) supplied the credit card details and clicked "Proceed" I was receiving the following message:- 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. What I was expecting was that the order was processed by the OsCommerce Software and the user taken to the checkout_success.php screen. What I eventually found was that although the simulator was telling me that my RedirectURL was http://www.mydomain.com/shop/checkout_process.php?check=SERVER&osCsid =12175a21d73728a4e9f94b8a34be9f4e when I actually analysed the $_GET parameters I found that $_GET['check'] was fine but the "osCsid" parameter was actually being passed as "amposCsid". This meant that when the checkout_process.php process tried to identify the visitor using the session id, it could not and subsequent processing in the checkout_process.php function states that " if (!tep_session_is_registered('customer_id'))" then redirect to the logon screen. The following fix to the checkout_process.php (before " include('includes/application_top.php');") seemed to resolve the issue. if (isset($_GET['amposCsid']) && $_GET['amposCsid'] !='') {$_GET['osCsid'] = $_GET['amposCsid'];} I can now continue testing and if I find any other issues, I will post again.
  15. Yep Sorry, just realised tha this was in the wrong place. I will re-post it in the correct forum.
×