Changeset 2967076
- Timestamp:
- 09/14/2023 12:49:17 PM (3 years ago)
- Location:
- paytm-donation/trunk
- Files:
-
- 9 added
- 2 deleted
- 5 edited
-
assets/222 (deleted)
-
assets/223 (added)
-
assets/223/css (added)
-
assets/223/css/admin (added)
-
assets/223/css/admin/paytm-donation-admin.css (added)
-
assets/223/css/paytm-donation.css (added)
-
assets/223/js (added)
-
assets/223/js/admin (added)
-
assets/223/js/admin/paytm-donation-admin.js (added)
-
assets/223/js/paytm-donation.js (added)
-
includes/PaytmConstantsDonation.php (modified) (2 diffs)
-
includes/PaytmHelper.php (modified) (1 diff)
-
includes/message.php (deleted)
-
paytm-donation-listings.php (modified) (1 diff)
-
paytm-donation.php (modified) (5 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
paytm-donation/trunk/includes/PaytmConstantsDonation.php
r2947646 r2967076 15 15 CONST APPEND_TIMESTAMP = true; 16 16 CONST X_REQUEST_ID = "PLUGIN_WORDPRESS_"; 17 CONST PLUGIN_VERSION_FOLDER = "22 2";17 CONST PLUGIN_VERSION_FOLDER = "223"; 18 18 19 19 CONST MAX_RETRY_COUNT = 3; … … 21 21 CONST TIMEOUT = 10; 22 22 23 CONST LAST_UPDATED = "20230 804";24 CONST PLUGIN_VERSION = "2.2. 2";23 CONST LAST_UPDATED = "20230912"; 24 CONST PLUGIN_VERSION = "2.2.3"; 25 25 CONST PLUGIN_DOC_URL = "https://business.paytm.com/docs/wordpress/"; 26 26 -
paytm-donation/trunk/includes/PaytmHelper.php
r2939944 r2967076 96 96 'headers' => array("Content-Type"=> "application/json"), 97 97 'body' => json_encode($requestParamList, JSON_UNESCAPED_SLASHES), 98 'sslverify'=>false 98 99 )); 99 100 -
paytm-donation/trunk/paytm-donation-listings.php
r2947646 r2967076 237 237 238 238 <th><?php echo $row['date'] ?></th> 239 <td><button class="btnPrimary" onclick="displayFullDetails(<?php echo $row ->id;?>)" id="myBtn">Full Details</button></td>239 <td><button class="btnPrimary" onclick="displayFullDetails(<?php echo $row['id'];?>)" id="myBtn">Full Details</button></td> 240 240 </tr> 241 241 <?php } } else { ?> -
paytm-donation/trunk/paytm-donation.php
r2947646 r2967076 620 620 621 621 global $wpdb; 622 623 $serializedata = (json_encode($serializedata)); 624 $decode = json_decode($serializedata); 625 unset($decode[count($decode)-1]);//removing action = paytm_donation_request which is last element 626 $serializedata_final = json_encode($decode); 622 $serializedata_final = json_encode($serializedata); 623 $data_array = json_decode($serializedata_final, true); 624 $keys_to_remove = ["hide_form_field_for_nonce", "_wp_http_referer","action"]; 625 626 foreach ($data_array as $key => $item) { 627 if (in_array($item['name'], $keys_to_remove)) { 628 unset($data_array[$key]); 629 } 630 } 631 632 $data_array = array_values($data_array); 633 $serializedata_final = json_encode($data_array); 627 634 628 635 $table_name_custom = $wpdb->prefix . "paytm_donation_user_data"; … … 717 724 /* save paytm response in db */ 718 725 if(PaytmConstantsDonation::SAVE_PAYTM_RESPONSE && !empty($_POST['STATUS'])){ 719 $order_data_id = saveTxnResponse1( 720 sanitize_text_field($_POST), 721 PaytmHelperDonation::getOrderId(sanitize_text_field($_POST['ORDERID']))); 726 //$sanitized_post = array_map('sanitize_text_field', $_POST); 727 foreach ($_POST as $key => $value) { 728 $_POST[$key] = sanitize_text_field($value); 729 } 730 $sanitized_post = $_POST; 731 $order_data_id = saveTxnResponse1($sanitized_post, PaytmHelperDonation::getOrderId(sanitize_text_field($_POST['ORDERID']))); 722 732 } 723 733 /* save paytm response in db */ … … 739 749 /* number of retries untill cURL gets success */ 740 750 if(!isset($responseParamList['STATUS'])){ 741 $responseParamList = sanitize_text_field($_POST); 751 foreach ($_POST as $key => $value) { 752 $_POST[$key] = sanitize_text_field($value); 753 } 754 $responseParamList = $_POST; 742 755 } 743 756 … … 888 901 * save response in db 889 902 */ 890 function saveTxnResponse1($data = array(),$order_id , $id = false){903 function saveTxnResponse1($data = array(),$order_id="", $id = false){ 891 904 global $wpdb; 892 905 if(empty($data['STATUS'])) return false; … … 911 924 add_action('wp_ajax_nopriv_initiate_paytmCustomFieldSave','initiate_paytmCustomFieldSave'); 912 925 913 function initiate_paytmCustomFieldSave(){ 914 if (isset($_GET['nonce'])){ 915 if ( !wp_verify_nonce( $_GET['nonce'], 'hide_form_field_for_admin_nonce' ) ){ 916 $error = array( 917 "error" => true, 918 "message" => "Sorry, your request was not verified." 919 ); 920 echo json_encode( $error ); 921 wp_die(); 922 } 923 } 924 925 //echo json_encode($_POST);wp_die(); 926 update_option('paytm_user_field', json_encode($_POST)); 927 echo json_encode(array('success'=> true)); 928 wp_die(); 929 } 926 function initiate_paytmCustomFieldSave() { 927 if (isset($_GET['nonce']) && current_user_can('manage_options')) { 928 $nonce = sanitize_text_field($_GET['nonce']); 929 if (wp_verify_nonce($nonce, 'hide_form_field_for_admin_nonce')) { 930 931 update_option('paytm_user_field', json_encode($_POST)); 932 echo json_encode(array('success' => true)); 933 wp_die(); 934 } else { 935 $error = array( 936 "error" => true, 937 "message" => "Sorry, your request was not verified." 938 ); 939 echo json_encode($error); 940 wp_die(); 941 } 942 } else { 943 $error = array( 944 "error" => true, 945 "message" => "Unauthorized access or nonce value is missing." 946 ); 947 echo json_encode($error); 948 wp_die(); 949 } 950 } 951 952 930 953 931 954 add_action('wp_ajax_refresh_Paytmhistory','refresh_Paytmhistory'); -
paytm-donation/trunk/readme.txt
r2947646 r2967076 5 5 Requires at least: 4.9 6 6 Tested up to: 6.2.2 7 Stable tag: 2.2. 27 Stable tag: 2.2.3 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 28 28 29 29 == Changelog == 30 31 = 2.2.3 = 32 * Security Fixes 30 33 31 34 = 2.2.2 =
Note: See TracChangeset
for help on using the changeset viewer.