Friday, February 24, 2012

CCavenue integration in php

<?php
$Merchant_Id = "your_merchantid";//This id(also User Id) available at "Generate Working Key" of "Settings & Options"
$Amount = "amount";//your script should substitute the amount in the quotes provided here
$Order_Id ="orderid";//your script should substitute the order description in the quotes provided here
$WorkingKey = "working_key";//Given to merchant by ccavenue
$Redirect_Url ="http://www.yoursite.com/ccavenue_returndata.php";
$Checksum = getCheckSum($Merchant_Id,$Amount,$Order_Id ,$Redirect_Url,$WorkingKey); // Validate All value
?>
<p align="center" style="font-family:Calibri; font-size:18px;"><img src="http://www.example.com/images/loader.gif" alt="loader"></p>
<p align="center" style="font-family:Calibri; font-size:24px;color:#3670A7;">Processing to CCAvenue..............</p>
<form id="form2" method="post" action="https://www.ccavenue.com/shopzone/cc_details.jsp">
<input type=hidden name="Merchant_Id" value="<?php echo $Merchant_Id; ?>">
<input type="hidden" name="Amount" value="<?php echo $Amount; ?>">
<input type="hidden" name="Order_Id" value="<?php echo $Order_Id; ?>">
<input type="hidden" name="Redirect_Url" value="<?php echo $Redirect_Url; ?>">
<input type="hidden" name="Checksum" value="<?php echo $Checksum; ?>">
<input type="hidden" name="billing_cust_name" value="yourname"> <!--Pass Customer Full Name -->
<input type="hidden" name="billing_cust_address" value="123 Green Acres,West Eden"><!--Pass Customer Full Address-->
<input type="hidden" name="billing_cust_country" value="India"> <!--Pass Customer Country -->
<input type="hidden" name="billing_cust_state" value="AP"><!--Pass Customer State -->
<input type="hidden" name="billing_cust_city" value="Kakinada"> <!--Pass Customer City -->
<input type="hidden" name="billing_zip" value="533002"> <!--Pass Customer Zip Code-->
<input type="hidden" name="billing_cust_tel" value="9999999999"> <!--Pass Customer Phone No-->
<input type="hidden" name="billing_cust_email" value="test_test@yahoo.com"> <!--Pass Customer Email address-->
<input type="hidden" name="delivery_cust_name" value="delivery_name"> <!--Pass Same or other other detail fill by customer-->
<input type="hidden" name="delivery_cust_address" value="123 My Colony, jaipur">
<input type="hidden" name="delivery_cust_country" value="India">
<input type="hidden" name="delivery_cust_state" value="AP">
<input type="hidden" name="delivery_cust_tel" value="9999999999">
<input type="hidden" name="delivery_cust_notes" value="Testing ccav">
<input type="hidden" name="Merchant_Param" value="">
<input type="hidden" name="billing_zip_code" value="302015">
<input type="hidden" name="delivery_cust_city" value="Jaipur">
<input type="hidden" name="delivery_zip_code" value="302015">

<input type="submit" value="Proceed to Buy Now" />
</form>
<?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;
}
?>

May this helps you

Saturday, February 4, 2012

GOD IS THE GREATEST MYSTERY

All the religions talk about God.What is unique is that every religion has it's own God.Gods of all of them are different from each other.God of one religion is greater than the other religion.They fight for their Gods.They undertake jihad and crusade in the name of God.
One wonders whether there is God!People who claimed that they knew God dont speak the same language.Their descriptions of God differ from each other.Why so?
In Hindu phylosophy one of the names of God is Anant, which means infinite.If God is infinite then how can an finite know God?That is why nobody knows Her completely.It's an infinite process to know God.Only infinite can know God and no body can be infinite.That's why i say God is the gretest mystery.

                         A river can merge in the ocean and by merging itself in the ocean it can know what the ocean is.Same way a human being can know God by merging in God.The contradiction is that when one merges in God it doesn't have a separate identity,it becomes God.When an infinite merges in infinite it also becomes infinite.By doing that you will lose your separate identity.That is the only criterion to know God.

Foot- prints of a great king

There is a story about Lord Buddha.Those days Buddha was living by the side of a river near Gaya in Bihar.After taking bath in the river He went to his ashram.These were summer days.While walking to his ashram,his foot-prints were visible in the sands near the river.After Buddha left the river,a great astrologer of those days also reached to the same spot where Buddha took bath.The astrologer saw the foot prints of Buddha,he was amazed.He was able to tell the fortune of a person by seeing the person's foot prints also.He knew by seeing the foot prints those should be of a great king.So he followed the foot prints and reached the ashram of Buddha,he found that there was none except Buddha,so now he was sure that the foot prints were of Buddha.He was now shocked.Buddha asked him-O brahmana,why are you looking shocked?The astrologer replied-"I am considered the greatest astrologer of the time and according to my knowledge the man,whose foot prints are those, should be a great king,but here i am finding you,who is just like a beggar.So i think all my knowledge is worthless."Buddha replied-"no,your knowledge is not worthless but there are some people who go beyond Astrology or any other wordly knowledge." The point is that though astrology is true in some extent but when it comes the matter of spiritual path,astrology fails.This is not the fault of astrology,but it has some limitations.You are what you are,the result of your past karma.When you do sadhana,your karmas burn in the fire of sadhana.You go beyond the rules of astrology.In normal cases predictions based on astrology may be true.Even in normal cases also, the predictions are not true.Before the election results,you will find that many astrologers claiming the victory of different political parties.Certainly all of them cant be true.Although all of those astrologers make predictions on the basis of almost same type of books.

Four steps to God realization

In Tantra there is a shloka-UTTAMO BRAHMA SADBHAV MADHYAMA DHYAN DHARANA,JAPASTUTISYADADHAMA MURTIPUJADHADHAMA.It literally means-feeling oneself as Brahman is best,meditating is mediocre,chanting and prayers are lower and idol worshiping is lowest in nature.
As i understand this shloka,it just describes the four stages to God realisation.On spiritual path one starts with idol worshipping,then he starts chanting some mantra,then meditating and at last he feels that he/she has become God.That is Brahma sadbhav.One can't just leap to that stage.
                              No stage is superior or inferior.They are just stages through which a seeker passes.Without going through the first stage,if one will just try to be in Samadhi, s/he won't get any real success.If you have not gone through idol worshiping you won't be able to realize the formlessness of God.You will just become a hypocrite.Like followers of some religions who say they don't believe in idol worshiping,but what they do is nothing but idol worshiping.One hand they go on denying that they are not idolaters but if you watch seriously their religious activities ,you will find that they are just doing idolatry .
                                 Hindus are idolaters and idol breakers too.They use idols for worshiping and later when they find that God is not only in the idol,but is present in everything,the idol becomes of no use to them .People following Semitic religions can't understand this contradiction.It's their fault not Hindus'.

How to love

One Christian missionary was asked to say the teaching of Jesus christ in a single sentence.He said-"Love your neighbor as yourself."But people don't love themselves,then how will they love their neighbor?They will not love their neighbor at all.Actually we don't know what love is.Love is such a great thing,that you can experience but can't define what it is.Like when a dumb person eats sweet,he can experience the sweetness but would not be able to say what sweetness is.Even we can't define what sweetness is.Can we?So we can't define Love.We don't even experience the real love.If the love is unconditional,then only it is real love.That love is rare.People,who are enlightened,who are calm inside,who have compassion for all the creature,they only know that love.You can also have the glimpses of that love.A single glimpse of that love will change you.You will not be the same again.To have the glimpses of love you will have to be calminside.Be meditative.In meditation you can feel the true love.When you feel that love,then you will be able to love yourself.When you love yourself then the fragrance of love come out of you.Whoever will come in your contact will have a different kind of pleasure.This is the way to love.Your love will be unselfish.

Religion of the new world

The new world needs a religion which can give true freedom to everybody.It should not say what to do and what not to do.The only thing it should do is to make people enlightened,so that people can be able to take right decisions.This religion should give some techniques to the people so that they can become enlightened .Actually people are already enlightened,but they are not awake,so they think that they are ignorant.God creates everybody enlightened.Therefore this religion should awake the people.
            At the same time if some people don’t follow this religion,then they should not only be just tolerated but accepted also.Everybody should have the freedom to follow one’s own form of religion.
             Now which existing religion can fit in these criteria?Which religion can give us complete freedom?Which religion can give us techniques to be awakened?Which religion can accept the liberty of others to follow their own form of religion?
              If you think the answer of above mentioned questions is Hinduism,you are 100% correct.Only Hinduism has the potential to become the world religion.Hinduism is the most liberal religion on this planet.

Threat to Hinduism

Every religion except Hinduism can be defined in a definite set of terms.But the case with Hinduism is not so.In Hinduism everybody is free to define it in one’s own way.Hinduism gives us such a freedom.Everybody may have his/her own idea of Hinduism.As many as Hindus are there so many definitions of Hinduism can be there. One can say that Hinduism is undefinable.This is the beauty of Hinduism.Nobody can say that his form of Hinduism is true while other’s is false.On one point every Hindu will agree that everybody has the right to choose one’s own path.
                That’s why almost all the major religion flourished in India.Hindus respected the existence of other religions.Now if other religions would try to convert Hindus in their own folds,what should Hindus  do?To save the uniqueness of Hinduism Hindus must be aggressive.Don’t hesitate to reply them who tries to eliminate the existence of Hinduism.

Love Jihad ,a great threat

Love jihad has appeared as a major threat to Hinduism.Although it’s a big problem for Christians too.But here we have to think about the Hindus only.Muslims are all out on a mission for jihad.Some are fighting this so called holy war by weapons like bombs and AK 47s,while others are doing everything to convert non Muslims.For these people who are not taking some lethal weapon,love is their weapon.
           By feigning love they want to convert innocent Hindu girls.For this they are funded by some Muslim organizations from home and abroad.They show generosity towards poor Hindu girls to trap them.They show that they are seculars.After the girl falls in their trap they start showing their true character.They force the girl to convert to Islam.Once the girl is converted to Islam ,their mission is accomplished.Then they are rewarded by Muslim organizations.
           Now what Hindus should do to solve this problem?I don’t think that there is any peaceful way to solve this problem.

Food and Dharma

In modern Hinduism many people give too much stress on the food.They say certain things should be eaten while certain things are never to be eaten, then only you are a true Hindu.In my view your food makes hardly an effect on being your Hindu.It’s your personal matter that what you eat and what you don’t eat.Yes,certainly food makes an effect on your mental state, not more.If you take vegetarian food,it helps to keep your mind calm.But only vegetarian food is not going to help you attain enlightenment.If vegetarian food could get you enlightenment,then all the vegetarian animals would have got enlightenment.I am not saying that take non- vegetarian food.Again i will repeat that it’s your personal choice what to eat or what not to eat.
             The important thing on the path of Dharma is Sadhana or spiritual practice.Whatever you eat ,if you do spiritual practice,you will attain enlightenment sooner than later.

HOW TO BE SUCCESSFUL

Everybody wants to be successful in life.People set some goal and then try to achieve that goal.Some of them achieve and some of them don’t.People who achieve their goal feel satisfied,but only for a short period.They get bored with their achievement and then set some other goal.What does that mean?That means his/her previous goal was not worth achieving!So they can’t be said successful.Now the most important question arises-what is success?
Success means differently to different people.For some it is to aquire a lot of wealth,for some it is fame,for some it may be to aquire knowledge.For some it may be to be powerful-physically,mentally,economically or politically.But all these are the games of an egoistic mind.Egoistic mind never satisfies.Without satisfaction you cant be happy.So  real success means to be happy,that too not temporarily but permanently. If  you achieved all the power,all the knowledge,all the fame and all the wealth but you are not satisfied,not happy and not calm and peaceful within, then what is the use of that so called success?That success is futile.
So real success means you should change internally not externally.That is possible only if you accept who you are,how you are and where you are.You will be calm,happy and peaceful.

What is Hinduism:some thoughts

When there was no other religion on earth,Hinduism was still there it was known as Sanatan Dharma which means eternal religion.A religion consists four things-1.a fixed set of rules and rituals 2.a holy text 3.founder of the religion 4.people following that religion.If this criterion is applied,then Hinduism can’t be called a religion and that may not be wrong.Because Hinduism is not like any other religion.Hinduism doesn’t have a fixed set of rules and rituals,there is not only one holy book rather there are many holy books.Hinduism is the only religion on earth which was not founded by somebody,it’s an eternal religion.Hinduism is from the beginning of the civilization on the earth.
Now the question is how will you define Hinduism.A great Hindu thinker of last century sri V.D.Savarkar says-Asindhu sindhu paryanta yasya Bharatbhumika pitribhu-punyabhumischa Hinduritismrtah means-People who live between river Sindhu and The Indian ocean,who think India as their fatherland and holy land are Hindus.Very nice definition of the Hindu.Although i almost adore V.D.Savarkar for his contribution to Aggressive Hinduism,but i don’t agree with his definition of the Hindu.There are Hindus living out of India,whose fatherland is not India and they may not consider India as their holy land,but they are no less Hindus than we are.
One definition of The Hindu is-who believes in God,Vedas,existence of soul and rebirth are Hindus.This definition is also good but not correct.There are some sects in India who don’t believe in God like-Jains and Buddhists.For Sikhs Gurugranthsahib is the holy book not The Vedas.In olden days Charvaks were there who did not believe in soul even.
One definition is -Hinanam dushyati,sah Hindu means who dispels the inferior qualities is a Hindu.This is a wonderful definition.Whoever is on the path can be called a Hindu by this definition.

Nude picture episode

The world is male dominated.In the beginning it was not so.Male and female were interdependent.Both used to give respect to each other.Both were valuable on invaluable for each other.There are three words in English language.valuable,precious and invaluable.Valuable means the thing which has value or some price,precious means which has much price and invaluable means which has too great a value or price to measure.
               Then the second faze came when male power or  masculinity  got importance.Those days were the days of hunting.People would hunt some animal and eat them.As you know hunting needs power,in which naturally male is dominant.That period of civilization made female dependent on male.Females became powerless.They were subordinate to men.And exploitation of women started.In these days the seeds of women being just an object were sown.
Women are trying to let themselves free from this humiliating condition.But they don’t know how to get freedom.So whichever way they can express they express their desire to get that freedom.Some think that by imitating males they can liberate themselves,some think by being moralist they can get power to get freedom,some follow austerity.Some rebellion females express themselves by breaking social etiquette. Pakistani actress Veena Malik is using the this technique only.By giving a nude pose she has rebelled against male dominated society.Islam is the worse kind of male dominated society.In Islam women has almost no power.Males have all the power.They consider woman just an object.Women has almost no right.Veena Malik is revolting against that concept by posing nude for a magazine.In a society where women can’t even go out of home without covering their faces, Veena Malik’s nude picture is a sign of women-revolt against male dominance. 

VICTORY OF THE TRUTH

There is a saying in India-Only the truth triumphs.The decision of the Russia court to reject the plea to ban Bhagvadgita As It Is again proves that saying.
Bhagvadgita As It Is is the translation and commentary of the original text Bhagvadgita by Ac Bhaktivedant Prabhupada.Bhaktivedant Prabhupada was the founder of International Society for Krishna Consciousness popularly known as ISKCON or Hare Krishna Movement.
I have read Bhagvadgita As It Is and i don’t find anything in it which can be called extremist in nature.But the Russian Orthodox Church wanted to get Bhagvadgita As It Is banned in Russia saying it preaches religious tolerance
Fortunately the Siberian Court has rejected the plea to get it banned.The good sense prevailed.
As Sanjaya rightly concludes Bhagvadgita with his opinion that,
Where there is vision and acumen (Yogeshwara Krishna) along with readiness to act with conviction (Dhanurdharaha Partha) there would be wealth, success and justice.

Re- incarnation:just a belief or truth ?

One of the major beliefs of Hinduism is re incarnation.Hindu Gods and Godesses have re incarnated.In Bhagvadgita Lord Krishna says to Arjuna- You and me have taken many births,but i remember those births and you don’t.
If you believe in the Law of Evolution ,then you must agree that everything evolves,whether it is a Being or the consciousness.In everything there is consciousness.Only the percentage differs.In a stone the percentage of consciousness is very less almost negligible,in tiny creatures it is more and in developed beings it is more than tiny beings.In human beings the percentage of consciousness is highest but not hundred percent.Although human beings have the potential to achieve hundred percent consciousness.Lord Krishna and some other highly developed souls achieved hundred percent consciousness.So the possibility to have hundred percent consciousness is there.Every creature will attain that hundred percent consciousness.Some creatures will need millions of years to get that.But their life span is not so long.No living being has that much life span.So after the death to evolve more in consciousness every creature must have to take another birth.Therefore the re- incarnation.

What is Yoga?

 In the west and even in some section of India people think that yoga is just doing some physical postures and breathing exercises.No doubt postures and breathing exercises are useful for keeping mind and body fit but they only can’t be called Yoga.They are just two steps of yoga.Now what is Yoga?
                                        In his Yogsutra Patanjali said yoga is the cessation of mind.When the thoughts  stop and you are in the state where there is no thought,that state is called Yoga.
                                        Yoga is a Sanskrit word which means to unite.Uniting the soul with God is Yoga.When the soul is united with God,all the thinking stops,you are in the present moment .That’s why so much stress  is given to being in the present moment.One either thinks about the past or do some planning about future.But when one is completely in the present moment,s/he doesn’t think anything.In the beginning you can’t stay for a long time in that state.But after practicing meditation for some years you can stay more in that state.