EBS – Secure Hash Validation Failed

EBS provides the document for the posted data & other formats.

There, we have to pass that required Credentials. like secure hash.


//Pass your Registered Secret Key

$hashData = “Your Secret Key“;

$hash = “ebskey”.”|”.urlencode($_POST[‘account_id’]).”|”.urlencode($_POST[‘amount’]).”|”.urlencode($_POST[‘reference_no’]).”|”.$_POST[‘return_url’].”|”.urlencode($_POST[‘mode’]);

$secure_hash = md5($hash);

// now pass $secure_hash secure hash to ebs .

// now pass $secure_hash secure hash to ebs .


how to make secure hash to send in ebs payment gateway

Click here: Ebs Invalid Hash

Print a div contents in Php

If You want to print the section or Div contents, then please do the following…

By using the following code you can print the contents in a div or section.


Html  Section:

// The Printing button. On click this button the print preview opens

<div class="row">
      <div class="col-md-12"> 
              <button class="xshr_print_section_btn" onclick="javascript:printDivContents('xshr_print_section')">Print Details</button></div>

<!-- html Ends -->

Script Section:

<!-- For Print the Contents Starts -->

<script language="javascript" type="text/javascript">

function printDivContents(divID) {

//Get the HTML of div
var divElements = document.getElementById(divID).innerHTML;

//Get the HTML of whole page
var oldPage = document.body.innerHTML;

//Reset the page's HTML with div's HTML only
document.body.innerHTML = 
"<html><head><title></title></head><body>" + 
divElements + "</body>";

//Print Page

//Restore orignal HTML
document.body.innerHTML = oldPage;


<!-- For Print the Contents / Ends-->



also solution available at: how to print a Div content in javascript

How to Update the Current Browser URL


ChangeUrl = function(page, url) {

    if (typeof (history.pushState) != "undefined") {

        var obj = { Page: page, Url: url };

        history.pushState(obj, obj.Page, obj.Url);

        $('.breadcrumb-get-a-pro').attr('href', url);

    } else {

        alert("Browser does not support HTML5.");




Meta Tags for Search Engine Optimization

Meta Tags for Search Engine Optimization
# Meta Tags used for seo::
<meta name="description" content="Stackofcodes is a blog for Learners, Developers, designers. "/>

<meta name="robots" content="noimageindex,noarchive,nosnippet"/>

<link rel="canonical" href="//www.stackofcodes.in/" />

<meta property="og:locale" content="en_US" />

<meta property="og:type" content="article" />

<meta property="og:title" content="Pricing | Kissmetrics" />

<meta property="og:description" content="Get, keep and grow more customers with Kissmetrics Customer Engagement Automation platform. Built for eCommerce marketers and product teams." />

<meta property="og:url" content="https://www.stackofcodes.in/" />

<meta property="og:site_name" content="Kissmetrics" />

<meta property="og:image" content="" />

<meta property="og:image:secure_url" content="" />

<meta property="og:image" content="" />

<meta property="og:image:secure_url" content="" />

<meta name="twitter:card" content="summary" />

<meta name="twitter:description" content="Stackofcodes is a blog for Learners, Developers, designers." />

<meta name="twitter:title" content="Stackofcodes" />

<meta name="twitter:image" content="" />

How to get the Currency Conversion Rate in php [duplicate]

How to get the Currency Conversion Rate in php?

Here, the function is used to get the currency conversion rate,

Get the  currency conversion rate like this:
$rate = $this->currencyRate(‘USD’, ‘INR’);
// To get the Currency Rate from Third Party API

public function currencyRate($fromCurrency, $toCurrency)
    $conversion_rate = 0;

    if (!empty($fromCurrency) && !empty($toCurrency) )

       $currencyString = strtoupper($fromCurrency.'_'.$toCurrency);  

       $fetchUrl = 'http://free.currencyconverterapi.com/api/v5/convert?q='.$currencyString.'&compact=y';


          $handle_contents =  file_get_contents($fetchUrl);

          $contentsDecoded= @json_decode($handle_contents, TRUE);


             $curData = $contentsDecoded[$currencyString];


                $conversion_rate = floatval($curData['val']);

       catch (Exception $e) 



// function Ends


To view, the Main Post visit the link: