Plugin Directory

Changeset 1974086


Ignore:
Timestamp:
11/14/2018 09:25:38 AM (7 years ago)
Author:
mariaaspen
Message:

Version Update 1.2

Location:
wp-paytm-pay/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • wp-paytm-pay/trunk/encdec_paytm.php

    r1667467 r1974086  
    22function encrypt_data($input, $ky)
    33{
    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 );
    147    return $data;
    158}
     
    1710function decrypt_data($crypt, $ky)
    1811{
    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;
    3016}
    3117
  • wp-paytm-pay/trunk/readme.txt

    r1781785 r1974086  
    33Tags: donation plugin, paytm, payment for wordpress, paytm integration, Paytm payment, paytm fundraising, paytm plugin for wordpress, wordpress Paytm Donation, Wp Paytm Donation
    44Requires at least: 4.9
    5 Tested up to: 4.9.1
    6 Stable tag: 1.1
     5Tested up to: 4.9.8
     6Stable tag: 1.2
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    2020
    2121# Integration
     22
    2223* In wordpress, Go to Paytm Settings -> Paytm Settings -> Set Paytm Configuarations
    2324* and put shortcode [paytmpay] in page
     
    3637Please email to maria@aspen-it.com and we will try to answer your queries in shortest time possible.
    3738
     39== Changelog ==
    3840 
     41= 1.2 =
     42Bug Fixes.
     43Update Latest Paytm API.
     44
     45 
  • wp-paytm-pay/trunk/wp-paytm-pay.php

    r1781778 r1974086  
    22/*
    33Plugin Name: Wp Paytm Pay.
    4 Version: 1.1
     4Version: 1.2
    55Description: This plugin using visitors to donate via PayTM in either set or custom amounts
    66Author: FTI Technologies
     
    1818add_action('init', 'paytm_donation_response');
    1919
    20 if($_GET['donation_msg']!=''){
     20if(isset($_GET['donation_msg']) && $_GET['donation_msg'] != ""){
    2121    add_action('the_content', 'paytmPayShowMessage');
    2222}
     
    209209function paytm_admin_menu() {
    210210    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');
    212212}
    213213
     
    311311                if( $_POST['donor_amount'] != ''){
    312312                    $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                     }*/
    319313                                        if(strlen($donor_amount) == 1)
    320314                                        {
     
    325319                                            $valid = false;
    326320                                            $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                                              
    329321                                        }
    330322                    else{
     
    400392                                        $checkSum = getChecksumFromArray ($post_params,$paytm_merchant_key);
    401393                                        $call = get_permalink();
    402                                         $action_url="https://pguat.paytm.com/oltp-web/processTransaction";
     394                                        $action_url = "https://securegw-stage.paytm.in/theia/processTransaction";
    403395                                        if($paytm_mode == 'LIVE'){
    404                                                 $action_url="https://secure.paytm.in/oltp-web/processTransaction";
     396                                                $action_url = "https://securegw.paytm.in/theia/processTransaction";
    405397                                        }
    406398
     
    471463                <p><label for="name"> Name:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label> <input type="text" name="donor_name"  maxlength="255" value=""/> </p>
    472464                <p><label for="email"> Email:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label><input type="text" name="donor_email"  maxlength="40" value=""/> </p>
    473                 <p><label for="phone"> Phone:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label> <input type="text" name="donor_phone"  maxlength="255" value=""/> </p>                    <p><label for="amount" > Amount:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label><input type="'.$total_type.'" name="donor_amount" value="'.$paytm_amount.'"/> </p>
     465                <p><label for="phone"> Phone:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label> <input type="text" name="donor_phone"  maxlength="255" value=""/> </p>                    <p><label for="amount" > Amount:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label><input type="text" name="donor_amount" value="'.$paytm_amount.'"/> </p>
    474466                                <p><label for="amount" > Pan No:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label><input type="text" name="donor_pan" value=""/> </p>   
    475467                <p><label for="address"> Address:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</lable><input type="text" name="donor_address" maxlength="255" value=""/> </p>
     
    520512                // Call the PG's getTxnStatus() function for verifying the transaction status.
    521513               
    522                 $check_status_url = 'https://pguat.paytm.com/oltp/HANDLER_INTERNAL/TXNSTATUS';
     514                $check_status_url = 'https://securegw-stage.paytm.in/merchant-status/getTxnStatus';
    523515                if($paytm_mode == 'LIVE')
    524516                {
    525                     $check_status_url = 'https://secure.paytm.in/oltp/HANDLER_INTERNAL/TXNSTATUS';
     517                    $check_status_url = 'https://securegw.paytm.in/merchant-status/getTxnStatus';
    526518                }
    527519                $responseParamList = callAPI($check_status_url, $requestParamList);
     
    547539                $wpdb->query($wpdb->prepare("UPDATE ".$wpdb->prefix . "paytm_donation SET payment_status = 'Payment Error' WHERE  order_id = %d", sanitize_text_field($_POST['ORDERID'])));
    548540        }
    549         $redirect_url =get_site_url() . '/' . get_permalink(get_the_ID());
     541        $redirect_url = get_site_url() . '/' . get_permalink(get_the_ID());
    550542        $redirect_url = add_query_arg( array('donation_msg'=> urlencode($msg)));
    551543        wp_redirect( $redirect_url,301 );exit;
Note: See TracChangeset for help on using the changeset viewer.