Thursday, September 26, 2013

Easy way to integration of ccavenue payment gateway using php

CCavenue is most popular Payment gateway for online Shopping. It provide payment through using International credit card as well using your Bank (who have bond with CCavenue) online Account or using it's debit card(ATM card). It is one of the most secure place for given your money to online shop.

For Integrate it with your website you should have ccavenue account and they give you a merchant id and a unique key for your site that is most important for money transaction.


Creat a validCCAvenueparam.php  for server side generate valid checksum param
----------------------------------------------------------------------------------------
<?php


function getchecksum($MerchantId,$Amount,$OrderId ,$URL,$WorkingKey)
  {
  $str ="$MerchantId|$OrderId|$Amount|$URL|$WorkingKey";
  $adler = 1;
  $adler = adler32($adler,$str);
  return $adler;
  }


function verifychecksum($MerchantId,$OrderId,$Amount,$AuthDesc,$CheckSum,$WorkingKey)
  {
  $str = "$MerchantId|$OrderId|$Amount|$AuthDesc|$WorkingKey";
  $adler = 1;
  $adler = adler32($adler,$str);

  if($adler == $CheckSum)
  return "true" ;
  else
  return "false" ;
  }


function adler32($adler , $str)
  {
  $BASE =  65521 ;


$s1 = $adler & 0xffff ;
  $s2 = ($adler >> 16) & 0xffff;
  for($i = 0 ; $i < strlen($str) ; $i++)
  {
  $s1 = ($s1 + Ord($str[$i])) % $BASE ;
  $s2 = ($s2 + $s1) % $BASE ;
  //echo "s1 : $s1 <BR> s2 : $s2 <BR>";


}
  return leftshift($s2 , 16) + $s1;
  }


function leftshift($str , $num)
  {


$str = DecBin($str);


for( $i = 0 ; $i < (64 - strlen($str)) ; $i++)
  $str = "0".$str ;


for($i = 0 ; $i < $num ; $i++) 
  {
  $str = $str."0";
  $str = substr($str , 1 ) ;
  //echo "str : $str <BR>";
  }
  return cdec($str) ;
  }


function cdec($num)
  {


for ($n = 0 ; $n < strlen($num) ; $n++)
  {
  $temp = $num[$n] ;
  $dec =  $dec + $temp*pow(2 , strlen($num) - $n - 1);
  }


return $dec;
  }
  ?>
-------------------------------------------------------------------------------------------------------------------------------

Step -2
create cat page form cart.php


 <?php
    $Merchant_Id = "M_apa18528_18528";//This id(also User Id)  available at "Generate Working Key" of "Settings & Options" 
    $Amount = 900;;//your script should substitute the amount in the quotes provided here
    $Order_Id = 689663;//your script should substitute the order description in the quotes provided here
    $WorkingKey = "";//Note : if you empty the working value then CCavenue "return 
Error Code: 108
Error Description: Checksum+mismatch
because CCavenue security key providing to merchant . 

    $Redirect_Url ="http://www.englishleap.com/users/payment/";
    $Checksum = getCheckSum($Merchant_Id,$Amount,$Order_Id ,$Redirect_Url,$WorkingKey); // Validate All value 
    ?>


<form action="https://www.ccavenue.com/shopzone/cc_details.jsp" method="post">
<!--<br/>Merchant_Id:
--><input type="hidden" value="<?php echo $Merchant_Id; ?>" name="Merchant_Id">
<!--<br/>Amount:
--><input type="hidden" value="<?php echo $Amount; ?>" name="Amount">
<!--<br/>Order_Id:
--><input type="hidden" value="<?php echo $Order_Id; ?>" name="Order_Id">
<!--<br/>Redirect_Url:
--><input type="hidden" value="<?php echo $Redirect_Url; ?>" name="Redirect_Url">
<!--<br/>Checksum:
--><input type="hidden" value="<?php echo $Checksum; ?>" name="Checksum">
<!--<br/>billing_cust_name:
--><input type="hidden" value="bp.nayak20000" name="billing_cust_name"> 
<!--<br/>billing_cust_address:
--><input type="hidden" value="" name="billing_cust_address"> 
<!--<br/>billing_cust_country:
--><input type="hidden" value="" name="billing_cust_country"> 
<!--<br/>billing_cust_state:
--><input type="hidden" value="" name="billing_cust_state"> 
<!--<br/>billing_zip:
--><input type="hidden" value="" name="billing_zip"> 
<!--<br/>billing_cust_tel:
--><input type="hidden" value="" name="billing_cust_tel"> 
<!--<br/>billing_cust_email:
--><input type="hidden" value="bp.nayak20000@gmail.com" name="billing_cust_email"> 
<!--<br/>delivery_cust_name:
--><input type="hidden" value="bp.nayak20000" name="delivery_cust_name"> 
<!--<br/>delivery_cust_address:
--><input type="hidden" value="" name="delivery_cust_address"> 
<!--<br/>delivery_cust_country:
--><input type="hidden" value="" name="delivery_cust_country"> 
<!--<br/>delivery_cust_state:
--><input type="hidden" value="" name="delivery_cust_state"> 
<!--<br/>delivery_cust_tel:
--><input type="hidden" value="" name="delivery_cust_tel"> 
<!--<br/>delivery_cust_notes:
--><input type="hidden" value="" name="delivery_cust_notes"> 
<!--<br/>Merchant_Param:
--><input type="hidden" value="" name="Merchant_Param"> 
<!--<br/>billing_cust_city:
--><input type="hidden" value="" name="billing_cust_city"> 
<!--<br/>billing_zip_code:
--><input type="hidden" value="" name="billing_zip_code"> 
<!--<br/>delivery_cust_city:
--><input type="hidden" value="" name="delivery_cust_city"> 
<!--<br/>delivery_zip_code:
--><input type="hidden" value="" name="delivery_zip_code"> 
<input type="submit" class="button-placeorder" value="Pay by CCavenue ">
</form>

Wednesday, September 25, 2013

how to improve english speaking tips top and better way

Hello guys i was facing lot of problem to speak English. i found better improvement to  study this way and also improved my self. i want to share to other people who have facing problem to speak English. i think you can find the way you can and you can ..all the best...:)
below follow those step thoroughly
1.    Make reading the newspaper a daily ritual. You may be comfortable reading a particular section but make an effort to read different articles on every page. The editorial page is highly recommended not only for vocabulary but also for structuring and presenting thought.
2.    Make it a habit to read a new book every week. It is not surprising that those who read a lot develop a good vocabulary. You can consider becoming a member of the local library. Make a list of words that are new to you and look up their meanings in the dictionary.
3.    Watching English movies and television shows is important for improving English and learning new English words. The best part about watching English videos is that you can learn the correct pronunciation as well.
4.    Use vocabulary cards. Vocabulary cards are used by students who are trying to learn many words in a short period of time. You can make your own cards by writing the word on one side and the meaning on the other side of a square piece of paper. It is a convenient tool to learn new words in your free time
5.    Use the internet. The internet is an unlimited resource for reading material. Pick up a topic of your choice and search for articles about it. You will come across plenty of material to read, which you might find interesting, and importantly, will also introduce you to new words. Be sure to look them up in a dictionary.
6.    Don’t forget the new words. The best way to ensure that you never forget the new words you learn is to start using them in your day to day conversation. Do not try to force them into a conversation but do use them if you think they are appropriate.
7.    Learn pronunciation. Most dictionaries provide us with pronunciations of words using phonetic symbols. It is important to learn the sounds that correspond to these phonetic symbols, in order to become comfortable pronouncing new words.
8.    Learning in groups is always more fun. If you have friends who also want to improve their vocabulary, then you can form a group and share new words with each other. You can meet at regular intervals and measure your progress.
9.    Learn the root words. Root words are words from which words grow with the addition of prefixes and suffixes. For e.g.:. The word vocabulary is derived from the Latin root word ‘voc’, which means 'word' or 'name'. Other words like advocacy, vocal and vociferous are also derived from the same root word. Hence, if you can recognize some root words, you will get a fair idea of many derived words. Check out our list of common root words.
10. Keep revising. While it is important to read and learn new words, it is equally important to revise what you have learnt. Fix a particular day of the week to revise all the words you have learnt in that week and add them to your daily vocabulary.