Changeset 1974086
- Timestamp:
- 11/14/2018 09:25:38 AM (7 years ago)
- Location:
- wp-paytm-pay/trunk
- Files:
-
- 3 edited
-
encdec_paytm.php (modified) (2 diffs)
-
readme.txt (modified) (3 diffs)
-
wp-paytm-pay.php (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wp-paytm-pay/trunk/encdec_paytm.php
r1667467 r1974086 2 2 function encrypt_data($input, $ky) 3 3 { 4 $key = $ky; 5 $size = mcrypt_get_block_size(MCRYPT_RIJNDAEL_128, 'cbc'); 6 $input = pkcs5_pad_data($input, $size); 7 $td = mcrypt_module_open(MCRYPT_RIJNDAEL_128, '', 'cbc', ''); 8 $iv = "@@@@&&&&####$$$$"; 9 mcrypt_generic_init($td, $key, $iv); 10 $data = mcrypt_generic($td, $input); 11 mcrypt_generic_deinit($td); 12 mcrypt_module_close($td); 13 $data = base64_encode($data); 4 $key = html_entity_decode($ky); 5 $iv = "@@@@&&&&####$$$$"; 6 $data = openssl_encrypt ( $input , "AES-128-CBC" , $key, 0, $iv ); 14 7 return $data; 15 8 } … … 17 10 function decrypt_data($crypt, $ky) 18 11 { 19 $crypt = base64_decode($crypt); 20 $key = $ky; 21 $td = mcrypt_module_open(MCRYPT_RIJNDAEL_128, '', 'cbc', ''); 22 $iv = "@@@@&&&&####$$$$"; 23 mcrypt_generic_init($td, $key, $iv); 24 $decrypted_data = mdecrypt_generic($td, $crypt); 25 mcrypt_generic_deinit($td); 26 mcrypt_module_close($td); 27 $decrypted_data = pkcs5_unpad_e($decrypted_data); 28 $decrypted_data = rtrim($decrypted_data); 29 return $decrypted_data; 12 $key = html_entity_decode($ky); 13 $iv = "@@@@&&&&####$$$$"; 14 $data = openssl_decrypt ( $crypt , "AES-128-CBC" , $key, 0, $iv ); 15 return $data; 30 16 } 31 17 -
wp-paytm-pay/trunk/readme.txt
r1781785 r1974086 3 3 Tags: donation plugin, paytm, payment for wordpress, paytm integration, Paytm payment, paytm fundraising, paytm plugin for wordpress, wordpress Paytm Donation, Wp Paytm Donation 4 4 Requires at least: 4.9 5 Tested up to: 4.9. 16 Stable tag: 1. 15 Tested up to: 4.9.8 6 Stable tag: 1.2 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 20 20 21 21 # Integration 22 22 23 * In wordpress, Go to Paytm Settings -> Paytm Settings -> Set Paytm Configuarations 23 24 * and put shortcode [paytmpay] in page … … 36 37 Please email to maria@aspen-it.com and we will try to answer your queries in shortest time possible. 37 38 39 == Changelog == 38 40 41 = 1.2 = 42 Bug Fixes. 43 Update Latest Paytm API. 44 45 -
wp-paytm-pay/trunk/wp-paytm-pay.php
r1781778 r1974086 2 2 /* 3 3 Plugin Name: Wp Paytm Pay. 4 Version: 1. 14 Version: 1.2 5 5 Description: This plugin using visitors to donate via PayTM in either set or custom amounts 6 6 Author: FTI Technologies … … 18 18 add_action('init', 'paytm_donation_response'); 19 19 20 if( $_GET['donation_msg']!=''){20 if(isset($_GET['donation_msg']) && $_GET['donation_msg'] != ""){ 21 21 add_action('the_content', 'paytmPayShowMessage'); 22 22 } … … 209 209 function paytm_admin_menu() { 210 210 add_menu_page('Paytm Settings', 'Paytm Settings', 'manage_options', 'paytm_options_page', 'paytm_options_page'); 211 add_submenu_page('paytm_options_page','Paytm Paymet Details','Paytm Paymet Details', 0,'wp_paytm_donation','wp_paytm_donation');211 add_submenu_page('paytm_options_page','Paytm Paymet Details','Paytm Paymet Details','manage_options','wp_paytm_donation','wp_paytm_donation'); 212 212 } 213 213 … … 311 311 if( $_POST['donor_amount'] != ''){ 312 312 $donor_amount = intval($_POST['donor_amount']); 313 314 /*if( strlen($donor_amount) > 1 ){}315 else{316 $valid = false;317 $msg.= 'Amount cannot be less then $1</br>';318 }*/319 313 if(strlen($donor_amount) == 1) 320 314 { … … 325 319 $valid = false; 326 320 $msg.= 'If Amount greater then 50000 then pan card no compulsory.'; 327 //echo '<script>alert("If Amount greater then 50000 then pan card no compulsory.");windows.location("'.get_permalink(get_the_ID()).'")</script>';328 329 321 } 330 322 else{ … … 400 392 $checkSum = getChecksumFromArray ($post_params,$paytm_merchant_key); 401 393 $call = get_permalink(); 402 $action_url ="https://pguat.paytm.com/oltp-web/processTransaction";394 $action_url = "https://securegw-stage.paytm.in/theia/processTransaction"; 403 395 if($paytm_mode == 'LIVE'){ 404 $action_url ="https://secure.paytm.in/oltp-web/processTransaction";396 $action_url = "https://securegw.paytm.in/theia/processTransaction"; 405 397 } 406 398 … … 471 463 <p><label for="name"> Name: </label> <input type="text" name="donor_name" maxlength="255" value=""/> </p> 472 464 <p><label for="email"> Email: </label><input type="text" name="donor_email" maxlength="40" value=""/> </p> 473 <p><label for="phone"> Phone: </label> <input type="text" name="donor_phone" maxlength="255" value=""/> </p> <p><label for="amount" > Amount: </label><input type=" '.$total_type.'" name="donor_amount" value="'.$paytm_amount.'"/> </p>465 <p><label for="phone"> Phone: </label> <input type="text" name="donor_phone" maxlength="255" value=""/> </p> <p><label for="amount" > Amount: </label><input type="text" name="donor_amount" value="'.$paytm_amount.'"/> </p> 474 466 <p><label for="amount" > Pan No: </label><input type="text" name="donor_pan" value=""/> </p> 475 467 <p><label for="address"> Address: </lable><input type="text" name="donor_address" maxlength="255" value=""/> </p> … … 520 512 // Call the PG's getTxnStatus() function for verifying the transaction status. 521 513 522 $check_status_url = 'https:// pguat.paytm.com/oltp/HANDLER_INTERNAL/TXNSTATUS';514 $check_status_url = 'https://securegw-stage.paytm.in/merchant-status/getTxnStatus'; 523 515 if($paytm_mode == 'LIVE') 524 516 { 525 $check_status_url = 'https://secure .paytm.in/oltp/HANDLER_INTERNAL/TXNSTATUS';517 $check_status_url = 'https://securegw.paytm.in/merchant-status/getTxnStatus'; 526 518 } 527 519 $responseParamList = callAPI($check_status_url, $requestParamList); … … 547 539 $wpdb->query($wpdb->prepare("UPDATE ".$wpdb->prefix . "paytm_donation SET payment_status = 'Payment Error' WHERE order_id = %d", sanitize_text_field($_POST['ORDERID']))); 548 540 } 549 $redirect_url = get_site_url() . '/' . get_permalink(get_the_ID());541 $redirect_url = get_site_url() . '/' . get_permalink(get_the_ID()); 550 542 $redirect_url = add_query_arg( array('donation_msg'=> urlencode($msg))); 551 543 wp_redirect( $redirect_url,301 );exit;
Note: See TracChangeset
for help on using the changeset viewer.