title: Trouble with HTTP POS REQUEST HASH KEY
body: <p>i'm trying to connect to payment gateway and i have this form below to be sent as http post:</p>
  
  <pre><code>&lt;form name="submit2gtpay_form" action="" target="_self" method="post"&gt;
     &lt;input type="hidden" name="gtpay_mert_id" value="17" /&gt;
     &lt;input type="hidden" name="gtpay_tranx_id" value="" /&gt;
     &lt;input type="hidden" name="gtpay_tranx_amt" value="5000" /&gt;
     &lt;input type="hidden" name="gtpay_tranx_curr" value="566" /&gt;
     &lt;input type="hidden" name="gtpay_cust_id" value="458742" /&gt;
     &lt;input type="hidden" name="gtpay_cust_name" value="Test Customer" /&gt;
     &lt;input type="hidden" name="gtpay_tranx_memo" value="Mobow" /&gt;
     &lt;input type="hidden" name="gtpay_no_show_gtbank" value="yes" /&gt;
     &lt;input type="hidden" name="gtpay_echo_data" value="TEST" /&gt;
     &lt;input type="hidden" name="gtpay_gway_name" value="" /&gt;
     &lt;input type="hidden" name="gtpay_tranx_hash" value="" /&gt;
     &lt;input type="hidden" name="gtpay_tranx_noti_url" value="" /&gt;
     &lt;input type="submit" value="Pay Via GTPay" name="btnSubmit"/&gt;
     &lt;input type="hidden" name="gtpay_echo_data" value=""&gt;
   &lt;/form&gt;
  </code></pre>
  
  <p>I'm required to perform a sha512 hash of [gtpay_tranx_id + gtpay_tranx_amt +gtpay_tranx_noti_url + hashkey] </p>
  
  <p>The transaction amount should be in kobo and all the strings should be concatenated together with the hashkey before getting the sha512 hash of the entire string.</p>
  
  <p>but the value of gtpay_tranx_hash was to be a variable, how do i do that becuase when i echo it, i get missing value</p>
  
  <p>please any help will be appreciated</p>
  
  <pre><code>&lt;?php 
    //the has key requested
   $key = hash('sha512','664879809+500000+myurl+thekeytheysupply');
    //create array of data to be posted
    $post_data['gtpay_mert_id'] = 3649;
    $post_data['gtpay_tranx_id'] = 664879809;
    $post_data['gtpay_tranx_amt'] = 500000;
    $post_data['gtpay_tranx_curr'] =  566;
    $post_data['gtpay_cust_id'] = 458742;
    $post_data['gtpay_cust_name'] = 'Test Customer';
    $post_data['gtpay_tranx_memo'] = 'Mobow';
    $post_data['gtpay_no_show_gtbank'] = 'yes';
    $post_data['gtpay_echo_data'] ='TEST';
    $post_data['gtpay_tranx_hash'] = $key; 
    $post_data['gtpay_tranx_noti_url'] =  'mynotificationurl';
  
  //traverse array and prepare data for posting (key1=value1)
   foreach ( $post_data as $key =&gt; $value) {
      $post_items[] = $key . '=' . $value;
       }
  
     //create the final string to be posted using implode()
     $post_string = implode ('&amp;', $post_items);
  
    //usrl
     $url = 'thebankurl';
  
      $ch = curl_init(); //initialize curl handle
  
      // enable below 2 linesfor https sites
      curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
  
      curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
  
      curl_setopt($ch, CURLOPT_URL, $url); //set the url
  
      //curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
  
      curl_setopt($ch, CURLOPT_RETURNTRANSFER,1); //return as a variable
  
      //curl_setopt($ch, CURLOPT_HEADER, 0);
  
      curl_setopt($ch, CURLOPT_POST, 1); //set POST method
  
     curl_setopt($ch, CURLOPT_POSTFIELDS, $post_string); //set the POST variables
  
      curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);
  
      $response = curl_exec($ch); //run the whole process and return the response
  
      curl_close($ch); //close the curl handle
  </code></pre>