Skip to main content

Posts

How To Add Google Captcha in Cakephp

Step 1: First you should do is sign up and register you domain for private and public key. Step 2 : Then download reCAPTCHA PHP library and put recaptchalib.php file on recaptchalib folder on verdors folder like vendors. Step 3 : Put this file in bootstrap.php   pp/config/bootstrap.php //--------------for google captcha start here------------//   Configure::write('recatpch_settings', array(    'public_key'=>'6Lf-nu8SAAAAAIGBhxpcJGxqI03LSP1vcNtjYGrN ', 'private_key'=>'6Lf-nu8SAAAAAC7tXfYaZi0GDKvD5aa7JO7CNXkB '   )); //-----------end here-----------------------------------// Step 4:  Add this to your ctp Now you have to add script where you have want to add captcha in ctp <?php echo $this->Html->script('https://www.google.com/recaptcha/api/js/recaptcha_ajax.js');?> <scri...

How to setup PayPal Standard Payment integration with PHP

PayPal Standard Payment  I think you have already create business account in PayPal. And setup Instant Payment Notification Preferences Here are simple method for " Instant Payment Notification Preferences " setup Click on edit profile 1. Under ‘ Selling Preferences ’ >> ‘ Instant Payment Notification Preferences ’ a: Set the IPN value to ‘On’ b: Set the IPN URL "http://www.techsudhir.com/ipn.php" HTML Payment Parameter SIMPLE HTML FORM //Set useful variables for paypal form $paypalURL = 'https://www.sandbox.paypal.com/cgi-bin/webscr'; //Test PayPal API URL //$paypalURL = 'https://www.paypal.com/cgi-bin/webscr'; //Live PayPal API URL $paypalID = 'sales@techsudhir.com'; //Business Email <form action="<?php echo $paypalURL; ?>" method="post"> <!-- Identify your business so that you can collect the payments. --> <input type="hidden" name=...

PayPal Payments Standard - Recurring

HTML Variables for Recurring Payments HTML FORM <form name="_xclick" action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post" id="payment_form">          <input type="hidden" name="business" value="psudhir20@gmail.com">         <input type="hidden" name="email" value="<?php echo $email;?>">         <input type="hidden" name="currency_code" value="USD">         <input type="hidden" name="no_shipping" value="1">         <input type="hidden" name="item_number" value=" 12 ">         <input type="hidden" name="cmd" value="_xclick-subscriptions"/>         <input type="hidden" name="a3" class...

How to make has many function in expression engine

Step 1: Make an array $rel=array(); $rel['exp_incoming_product']['id']='order_id'; $rel['exp_incoming_product']['level']=1; Notes: 1) Here exp_incoming_product is table name from which you want to make 2) order_id id  foreign key of table. $data=$this->hasMany('exp_incoming_order',$rel,$member_id,'member_id'); Notes: 1)  Here  exp_incoming_order is table  hasMany function function hasMany($t1,$tables,$id,$t1_id_name) { ee()->db->select('*'); ee()->db->from($t1); ee()->db->order_by('id','desc'); ee()->db->where($t1_id_name,$id); $query1 = ee()->db->get(); $data=array(); foreach($query1->result_array() as $key_1=>$result)  { foreach($result as $key=>$value1)  { $data[$key_1][$t1][$key]=$value1; } } foreach($data as $single=>$part) { foreach($tables a...

Facebook Login

Step 1: Go on Apps & create new Apps Step 2: Enter the app name & choose category Step 3: Enter the site domain Script code <div id="fb-root"></div> <script   src="http://connect.facebook.net/en_US/all.js#appId=<?php echo '603609636351597';?>"> </script> <script>    FB.init({              appId:'<?php echo '603609636351597';?>', cookie:true,              status:true, xfbml:true           });   FB.getLoginStatus(function(response) {   }); Login function call on click function faceLogin(){  FB.login(function(response) {    if (response.authResponse) { ...