Page 2 of 2 FirstFirst 12
Results 11 to 19 of 19
  1. #11
    Join Date
    Apr 2008
    Location
    Cumbria, England
    Posts
    24
    Plugin Contributions
    0

    Default Re: $100 reward for a solution (HSBC payment gateway)

    Ok the original module is attached (added .txt to the extension to allow it to pass the upload filters). The only difference between it and the one I am currently using is the addition of 1/2 dozen lines of debug.

    Here's the troublesome fragment right from the top of the file (without the includes showing:

    Code:
      $payment_modules = new payment($payment);
    
      reset($_POST);
      $post_2 = array();
    
      //echo ("<p>DEBUG</p>\n");
      //echo ("<p>CPI POST Return Values</p><ul>\n");
    		
      while( list( $k, $v ) = each( $_POST ) )
      {
    	if ($k != 'OrderHash')
    	{
    		$post_2[$k] = $v;
    		//echo ("<li>$k = $v</li>\n");
    	}
    		
      }
    
      //echo ("</ul>\n");
    
      //die("Script stopped for debugging");
    
      $order_hash=$_POST['OrderHash'];
      $hsbc=$GLOBALS['hsbc'];
      $hash=$hsbc->getHash($post_2);
    
      if ($order_hash!=$hash) die ("Hacking attempt!");
    Attached Files Attached Files

  2. #12
    Join Date
    Oct 2006
    Posts
    5,477
    Plugin Contributions
    11

    Default Re: $100 reward for a solution (HSBC payment gateway)

    Normally, one can only use a global like that when it was set some where, which is not true it this case.
    I would suggest you try:
    $hsbc= new hsbc();

    And see if it works, and post any error if any.
    I no longer provide installation support on forum for all my modules. However, if there are real bugs with the modules please feel free to contact me

  3. #13
    Join Date
    Apr 2008
    Location
    Cumbria, England
    Posts
    24
    Plugin Contributions
    0

    Default Re: $100 reward for a solution (HSBC payment gateway)

    I have taken a different tack and fixed the code accordingly. I will be publishing the fix with one or two other items I had to rework in a supplementary document (which I'll also send to 'foamcow'). Unfortunately I can't do that right now due to other more pressing matters (and I want to be thorough in the document).
    If anyone has a burning need for help before next week please notify me, otherwise I will post early next week.
    For the cynics amongst you (if indeed there are any) you'll see that the fix doesn't relate to any contributions made in this forum so I'll be rewarding myself for my own fix. ;-)

  4. #14
    Join Date
    Jun 2006
    Posts
    2
    Plugin Contributions
    0

    Default Re: $100 reward for a solution (HSBC payment gateway)

    Is there an updated solution to the HSBC module. I too am having problems getting it to work.

  5. #15
    Join Date
    Apr 2008
    Location
    Cumbria, England
    Posts
    24
    Plugin Contributions
    0

    Default Re: $100 reward for a solution (HSBC payment gateway)

    Apologies for the couple of folks who sent me PMs but I didn't get notification of them.
    As for the solution, I have my client's live implementation still working as far as I know - little or no sales and I apologise for not publishing my changes.
    I haven't come across a module update.
    Having just checked my wiki I do not appear to have written up my changes there (my usual place for things I am likely to forget but need again), so will have to backtrack and find them elsewhere.
    I'll try to post them.

  6. #16
    Join Date
    Apr 2008
    Location
    Cumbria, England
    Posts
    24
    Plugin Contributions
    0

    Default Re: $100 reward for a solution (HSBC payment gateway)

    Whilst I try to retrieve my change history, if anyone is having difficulties with the hsbc module please provide details rather tahn just stating that it doesn't work

  7. #17
    Join Date
    Jun 2006
    Posts
    2
    Plugin Contributions
    0

    Default Re: $100 reward for a solution (HSBC payment gateway)

    The issue I am having is the hsbc_return.php. I am getting the error "hacking attempt". Have verified with hsbc all details I am using are correct and have double checked the path TestHash.e is correct.

  8. #18
    Join Date
    Apr 2008
    Location
    Cumbria, England
    Posts
    24
    Plugin Contributions
    0

    Default Re: $100 reward for a solution (HSBC payment gateway)

    Quote Originally Posted by webstudio View Post
    I am getting the error "hacking attempt"
    Ok, that I have seen and IIRC despite having checked and checked again it turned out to be an incorrect field.
    Try adding this to your code just before the test for the two hashes being the same:

    Code:
    echo '<pre>' . print_r ($order_hash) . '</pre><br />';
    echo '<pre>' . print_r ($hash) . '</pre><br />';
    which will dump the two hashes out on screen for you to compare (you could write them out to files and diff them or create a hash_diff function if you don't trust your checking by eyeball).

  9. #19
    Join Date
    Apr 2008
    Location
    Cumbria, England
    Posts
    24
    Plugin Contributions
    0

    Default Re: $100 reward for a solution (HSBC payment gateway)

    Sorry, that code fragment should have read:

    Code:
    echo '<pre>';
    print_r ($order_hash);
    echo '</pre><br />';
    echo '<pre>';
    print_r ($hash);
    echo '</pre><br />';

 

 
Page 2 of 2 FirstFirst 12

Similar Threads

  1. hsbc secure epayments gateway
    By Nick1973 in forum General Questions
    Replies: 10
    Last Post: 6 Jan 2011, 03:18 PM
  2. HSBC as payment gateway and processor??
    By clairy in forum Addon Payment Modules
    Replies: 5
    Last Post: 11 Jun 2010, 02:31 PM
  3. Order details missing -- using HSBC payment gateway
    By jay soma in forum Addon Payment Modules
    Replies: 1
    Last Post: 2 Sep 2009, 05:30 PM
  4. HSBC Payment
    By Blaze Falconburger in forum Built-in Shipping and Payment Modules
    Replies: 7
    Last Post: 15 Feb 2008, 10:05 PM
  5. HSBC - UK Payment
    By simpo in forum Built-in Shipping and Payment Modules
    Replies: 5
    Last Post: 21 Sep 2006, 04:04 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR