Plugin Directory

Changeset 3124938


Ignore:
Timestamp:
07/25/2024 03:30:55 AM (21 months ago)
Author:
telinfymessaging
Message:

API upgrade

Location:
telinfy-messaging/trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • telinfy-messaging/trunk/api/telinfyConnector.php

    r3066934 r3124938  
    2525    public function __construct(){
    2626
    27         $this->client_id = get_option( 'wc_settings_telinfy_messaging_api_key_whatsapp' );
    28         $this->client_secret = get_option( 'wc_settings_telinfy_messaging_api_secret_whatsapp' );
     27        $this->api_base_url = get_option( 'wc_settings_telinfy_messaging_api_base_url_whatsapp' );
     28        $this->api_key = get_option( 'wc_settings_telinfy_messaging_api_key_whatsapp' );
    2929    }
    3030
     
    3737    }
    3838
    39     /**
    40     * Get API credentials from database
    41     *
    42     * @return void
    43     */
    44     protected function telinfy_set_api_info($api_token ="")
     39
     40    /**
     41    * validate the credentials
     42    *
     43    * @return array
     44    */
     45    public function telinfy_get_api_token($apiEndpoint="",$api_key="")
    4546    {
    46         $api_access_token ="";
    47 
    48         if(isset($api_token)){
    49 
    50              $api_access_token = $api_token;
    51 
    52         }
    53 
    54         if(isset($api_access_token)){
    55             $this->access_token = $api_access_token;
    56 
    57         }else{
    58             $this->telinfy_get_api_token();
    59         }
    60     }
    61 
    62    
    63 
    64     /**
    65     * get token for the API
    66     *
    67     * @return array
    68     */
    69     public function telinfy_get_api_token($username="",$password="")
    70     {
    7147
    7248        $cred_check = 0;
    73         if (!isset($this->client_id) || !isset($this->client_secret)) {
    74             return false;
    75         }
    76         if($username && $password){
    77 
    78             $cred_check = 1;
    79             $body = array(
    80             "userName" => $username,
    81             "password" => $password
    82             );
    83         }else{
    84 
    85             $body = array(
    86             "userName" => $this->client_id,
    87             "password" => $this->client_secret
    88             );           
    89         }
    90 
    91        
    92         $path = "https://api.telinfy.net/gaus/login";
     49
     50        $baseURL = rtrim($apiEndpoint, '/') . '/';
     51        $path = $baseURL."whatsapp-business/accounts";
    9352        $header = array('content-type' => 'application/json');
    94         $body = json_encode($body);
    95 
    96         $header['content-length'] = !empty($body) ? strlen($body) : 0;
    97         $response = wp_remote_post(
     53
     54
     55        $header['api-key'] = $api_key;
     56        $response = wp_remote_get(
    9857            $path,
    9958            array(
    100                 'method' => "POST",
     59                'method' => "GET",
    10160                'timeout' => 240,
    102                 'headers' => $header,
    103                 'body' => $body
     61                'headers' => $header
    10462            )
    10563        );
    10664
     65
    10766        $res = !is_wp_error($response) && isset($response['body']) ? $response['body'] : "";
    10867        $response = json_decode($res, true);
    109         if (isset($response['data']['accessToken']) && $response['data']['accessToken'] != "") {
    110 
    111             $this->telinfy_set_api_info($response['data']['accessToken']);
     68        if (isset($response['data'][0]['whatsAppBusinessId']) && $response['data'][0]['whatsAppBusinessId'] != "") {
     69
     70            // $this->telinfy_set_api_info($response['data']['accessToken']);
    11271            return array(
    113                 "status"=>"success",
    114                 "token"=>$response['data']['accessToken']
     72                "status"=>"success"
    11573            );
    11674        }
    11775        else{
    118             $message = isset($response['data']["error"])?"Generate Token Error: ".$response['data']["error"]:"Error in generating token";
    11976            return array(
    12077                "status"=>"error",
    121                 "message"=>$message
     78                "message"=>"Please check the credentials"
    12279            );
    12380        }
     
    13491        $language=get_option("wc_settings_telinfy_messaging_whatsapp_language");
    13592        // $button_redirect_url =  get_permalink(wc_get_page_id('myaccount'));
     93
     94        $default_country_code = get_option("wc_settings_telinfy_messaging_default_country_code");
     95        $to = $this->ensureCountryCode($to,$default_country_code);
    13696
    13797        $page_slug = 'myaccount';
     
    238198
    239199            $api_base_url_whatsapp = get_option('wc_settings_telinfy_messaging_api_base_url_whatsapp');
    240             $trimmed_api_base_url = rtrim($api_base_url_whatsapp, '/');
    241 
    242             $endpoint = $trimmed_api_base_url."/whatsapp/templates?whatsAppBusinessId=$business_id";
     200            $baseURL = rtrim($api_base_url_whatsapp, '/') . '/';
     201
     202            $endpoint = $baseURL."whatsapp/templates?whatsAppBusinessId=$business_id";
    243203            $method = "GET";
    244204            $whatsapp_templates = $this->telinfy_send_api_request($endpoint,$method);
     
    279239    private function telinfy_send_api_request($endpoint,$method,$body =""){
    280240       
    281         if(!isset($endpoint) || (!isset($this->access_token))){
    282             $response = $this->telinfy_get_api_token();// creating new token
    283             if(isset($response["status"]) && $response["status"] == "error"){
    284                 return $response;
    285             }
    286         }
     241        // if(!isset($endpoint) || (!isset($this->access_token))){
     242        //     $response = $this->telinfy_get_api_token();// creating new token
     243        //     if(isset($response["status"]) && $response["status"] == "error"){
     244        //         return $response;
     245        //     }
     246        // }
    287247        $path = $endpoint;
    288248        if($method =="POST"){
    289249            $header = array(
    290                 "Authorization" => " Bearer " . $this->access_token,
     250                "api-key" => $this->api_key,
    291251                "content-type" => "application/json"
    292252            );
     
    308268        }else{
    309269            $header = array(
    310                 "Authorization" => " Bearer " . $this->access_token
     270                "api-key" => $this->api_key
    311271            );
    312272
     
    334294                "data"=>$response
    335295            );
    336         }else if(is_array($response) && wp_remote_retrieve_response_code( $request ) == 401 && ($response["message"] == "Wrong authentication token"|| $response["message"] == "Invalid session")){
    337             // Token expired.
    338 
    339             $this->retry = $this->retry +1;
    340 
    341             if($this->retry == 2){
    342                 return false;
    343             }
    344 
    345             $response = $this->telinfy_get_api_token();// creating new token.
    346             if($response["status"] == "success"){
    347 
    348                return $this->telinfy_send_api_request($endpoint,$method,$body);
    349 
    350             }
    351         }else if(wp_remote_retrieve_response_code( $request ) == 400 && $response["message"] == "Username or Password is incorrect"){
    352 
    353             $response = array(
     296        }else if(is_array($response) && wp_remote_retrieve_response_code( $request ) == 401 && ($response["message"] == "Wrong Api Key"|| $response["message"] == "Invalid session")){
     297
     298             $response = array(
    354299                "status"=>"error",
    355                 "message"=>"Incorrect username or password. Please check the username and password"
     300                "message"=>$response["message"],
     301            );
     302
     303        }else if(wp_remote_retrieve_response_code( $request ) == 404){
     304
     305            $response = array(
     306                "status"=>"error",
     307                "message"=>$response["message"]
    356308            );
    357309
     
    396348    }
    397349
     350
     351    public function ensureCountryCode($phoneNumber, $defaultCountryCode) {
     352        // Remove non-digit characters from the phone number
     353        $cleanedNumber = preg_replace('/\D/', '', $phoneNumber);
     354
     355        // Remove leading zeros
     356        $cleanedNumber = ltrim($cleanedNumber, '0');
     357
     358        // Check if the cleaned number is not empty
     359        if ($cleanedNumber) {
     360            // Check if the cleaned number starts with the plus sign
     361            if (strpos($cleanedNumber, '+') === 0) {
     362                return $cleanedNumber;
     363            }
     364
     365            // Check if the cleaned number starts with the default country code
     366            if (strpos($cleanedNumber, $defaultCountryCode) === 0) {
     367                return '+' . $cleanedNumber;
     368            }
     369
     370            // Append the default country code if none is present
     371            return '+' . $defaultCountryCode . $cleanedNumber;
     372        }
     373
     374        return null; // Or any default value you prefer when the number is empty
     375    }
     376
    398377}
  • telinfy-messaging/trunk/controllers/adminController.php

    r3066934 r3124938  
    6868    public function telinfy_tm_check_cred(){
    6969
     70
    7071        check_ajax_referer( 'telinfy_check_cred', 'security' );
    7172        $post_data = $this->telinfy_tm_sanitize_post_data();
    7273
    73         $username = $post_data['username'];
    74         $password = $post_data['password'];
     74        $api_key = $post_data['username'];
    7575        $apiEndpoint = $post_data['apiEndpoint'];
    7676        $type = $post_data['type'];
    77         if($username && $password && $apiEndpoint){
     77        if($api_key && $apiEndpoint){
    7878
    7979            if($type == "whatsapp-config"){
    8080                $this->connector = telinfy_whatsapp_connector::telinfy_get_instance();
    81                 $result = $this->connector->telinfy_get_api_token($username,$password);
     81                $result = $this->connector->telinfy_get_api_token($apiEndpoint,$api_key);
     82                error_log(json_encode($result));
    8283
    8384                if(isset($result['status']) && $result['status'] == "success"){
    8485
    85                     update_option("wc_settings_telinfy_messaging_api_key_whatsapp",$username,true);
    86                     update_option("wc_settings_telinfy_messaging_api_secret_whatsapp",$password,true);
     86                    update_option("wc_settings_telinfy_messaging_api_key_whatsapp",$api_key,true);
    8787                    update_option("wc_settings_telinfy_messaging_api_base_url_whatsapp",$apiEndpoint,true);
    8888
     
    273273
    274274        $this->connector = telinfy_whatsapp_connector::telinfy_get_instance();
     275        $whatsapp_template_list=[];
    275276        $whatsapp_template_list = $this->connector->telinfy_get_whatsapp_templates();
    276277        if(is_array($whatsapp_template_list)){
     
    279280            $whatsapp_template_list = array("select a template");
    280281        }
     282
     283        $country_code_list = $this->get_country_code_array();
    281284       
    282285        // Configurations for whatsapp integration
     
    296299            ),
    297300            'telinfy_api_key_whatsapp' => array(
    298                 'name'     => __( 'Username', 'woocommerce-settings-telinfy-integration' ),
     301                'name'     => __( 'Api Key', 'woocommerce-settings-telinfy-integration' ),
    299302                'type'     => 'text',
    300303                'desc'     => __( '' ),
    301304                'id'       => 'wc_settings_telinfy_messaging_api_key_whatsapp'
    302305            ),
    303             'telinfy_api_secret_whatsapp' => array(
    304                 'name'     => __( 'Password', 'woocommerce-settings-telinfy-integration' ),
    305                 'type'     => 'password',
    306                 'desc'     => __( ''),
    307                 'id'       => 'wc_settings_telinfy_messaging_api_secret_whatsapp'
     306            'telinfy_default_country_code' => array(
     307                'name'     => __( 'Default Country Code', 'woocommerce-settings-telinfy-integration' ),
     308                'type'     => 'select',
     309                'options'  => $country_code_list,
     310                'desc'     => __( ''),
     311                'class'    => 'whatsapp-config',
     312                'id'       => 'wc_settings_telinfy_messaging_default_country_code'
    308313            ),
    309314            'telinfy_whatsapp_check_cred' => array(
     
    817822    }
    818823
     824    public function get_country_code_array(){
     825
     826        $countryCodes = [
     827            91 => "India", 355 => "Albania", 213 => "Algeria", 1684 => "American Samoa", 376 => "Andorra",
     828            244 => "Angola", 1264 => "Anguilla", 1268 => "Antigua and Barbuda", 54 => "Argentina", 374 => "Armenia",
     829            297 => "Aruba", 61 => "Australia", 43 => "Austria", 994 => "Azerbaijan", 1242 => "Bahamas", 973 => "Bahrain",
     830            880 => "Bangladesh", 1246 => "Barbados", 375 => "Belarus", 32 => "Belgium", 501 => "Belize", 229 => "Benin",
     831            1441 => "Bermuda", 975 => "Bhutan", 591 => "Bolivia", 387 => "Bosnia and Herzegovina", 267 => "Botswana",
     832            55 => "Brazil", 246 => "British Indian Ocean Territory", 1284 => "British Virgin Islands", 673 => "Brunei",
     833            359 => "Bulgaria", 226 => "Burkina Faso", 257 => "Burundi", 855 => "Cambodia", 237 => "Cameroon", 1 => "Canada",
     834            238 => "Cape Verde", 599 => "Caribbean Netherlands", 1345 => "Cayman Islands", 236 => "Central African Republic",
     835            235 => "Chad", 56 => "Chile", 86 => "China", 57 => "Colombia", 269 => "Comoros", 242 => "Congo", 682 => "Cook Islands",
     836            506 => "Costa Rica", 385 => "Croatia", 53 => "Cuba", 357 => "Cyprus", 420 => "Czech Republic", 243 => "DR Congo",
     837            45 => "Denmark", 253 => "Djibouti", 1767 => "Dominica", 1809 => "Dominican Republic", 593 => "Ecuador", 20 => "Egypt",
     838            503 => "El Salvador", 240 => "Equatorial Guinea", 291 => "Eritrea", 372 => "Estonia", 268 => "Eswatini", 251 => "Ethiopia",
     839            500 => "Falkland Islands", 298 => "Faroe Islands", 679 => "Fiji", 358 => "Finland", 33 => "France", 594 => "French Guiana",
     840            689 => "French Polynesia", 241 => "Gabon", 220 => "Gambia", 995 => "Georgia", 49 => "Germany", 233 => "Ghana",
     841            350 => "Gibraltar", 30 => "Greece", 299 => "Greenland", 1473 => "Grenada", 590 => "Guadeloupe", 1671 => "Guam",
     842            502 => "Guatemala", 44 => "Guernsey", 224 => "Guinea", 245 => "Guinea-Bissau", 592 => "Guyana", 509 => "Haiti",
     843            504 => "Honduras", 852 => "Hong Kong", 36 => "Hungary", 354 => "Iceland", 93 => "Afghanistan", 62 => "Indonesia",
     844            98 => "Iran", 964 => "Iraq", 353 => "Ireland", 44 => "Isle of Man", 972 => "Israel", 39 => "Italy", 225 => "Ivory Coast",
     845            1876 => "Jamaica", 81 => "Japan", 44 => "Jersey", 962 => "Jordan", 7 => "Kazakhstan", 254 => "Kenya", 686 => "Kiribati",
     846            383 => "Kosovo", 965 => "Kuwait", 996 => "Kyrgyzstan", 856 => "Laos", 371 => "Latvia", 961 => "Lebanon", 266 => "Lesotho",
     847            231 => "Liberia", 218 => "Libya", 423 => "Liechtenstein", 370 => "Lithuania", 352 => "Luxembourg", 853 => "Macao",
     848            261 => "Madagascar", 265 => "Malawi", 60 => "Malaysia", 960 => "Maldives", 223 => "Mali", 356 => "Malta", 692 => "Marshall Islands",
     849            596 => "Martinique", 222 => "Mauritania", 230 => "Mauritius", 262 => "Mayotte", 52 => "Mexico", 691 => "Micronesia",
     850            373 => "Moldova", 377 => "Monaco", 976 => "Mongolia", 382 => "Montenegro", 1664 => "Montserrat", 212 => "Morocco",
     851            258 => "Mozambique", 95 => "Myanmar", 264 => "Namibia", 674 => "Nauru", 977 => "Nepal", 31 => "Netherlands", 687 => "New Caledonia",
     852            64 => "New Zealand", 505 => "Nicaragua", 227 => "Niger", 234 => "Nigeria", 683 => "Niue", 672 => "Norfolk Island", 850 => "North Korea",
     853            389 => "North Macedonia", 1670 => "Northern Mariana Islands", 47 => "Norway", 968 => "Oman", 92 => "Pakistan", 680 => "Palau",
     854            970 => "Palestine", 507 => "Panama", 675 => "Papua New Guinea", 595 => "Paraguay", 51 => "Peru", 63 => "Philippines",
     855            64 => "Pitcairn Islands", 48 => "Poland", 351 => "Portugal", 1787 => "Puerto Rico", 974 => "Qatar", 40 => "Romania",
     856            7 => "Russia", 250 => "Rwanda", 262 => "Réunion", 590 => "Saint Barthélemy", 290 => "Saint Helena", 1869 => "Saint Kitts and Nevis",
     857            1758 => "Saint Lucia", 590 => "Saint Martin", 508 => "Saint Pierre and Miquelon", 1784 => "Saint Vincent and the Grenadines",
     858            685 => "Samoa", 378 => "San Marino", 966 => "Saudi Arabia", 221 => "Senegal", 381 => "Serbia", 248 => "Seychelles", 232 => "Sierra Leone",
     859            65 => "Singapore", 1721 => "Sint Maarten", 421 => "Slovakia", 386 => "Slovenia", 677 => "Solomon Islands", 252 => "Somalia",
     860            27 => "South Africa", 500 => "South Georgia", 82 => "South Korea", 211 => "South Sudan", 34 => "Spain", 94 => "Sri Lanka", 249 => "Sudan",
     861            597 => "Suriname", 47 => "Svalbard and Jan Mayen", 46 => "Sweden", 41 => "Switzerland", 963 => "Syria", 886 => "Taiwan",
     862            992 => "Tajikistan", 255 => "Tanzania", 66 => "Thailand", 670 => "Timor-Leste", 228 => "Togo", 690 => "Tokelau", 676 => "Tonga",
     863            1868 => "Trinidad and Tobago", 216 => "Tunisia", 90 => "Turkey", 993 => "Turkmenistan", 1649 => "Turks and Caicos Islands",
     864            688 => "Tuvalu", 256 => "Uganda", 380 => "Ukraine", 971 => "United Arab Emirates", 44 => "United Kingdom", 1 => "United States",
     865            598 => "Uruguay", 998 => "Uzbekistan", 678 => "Vanuatu", 379 => "Vatican City", 58 => "Venezuela", 84 => "Vietnam",
     866            681 => "Wallis and Futuna", 212 => "Western Sahara", 967 => "Yemen", 260 => "Zambia", 263 => "Zimbabwe"
     867        ]; 
     868        return $countryCodes;
     869
     870    }
     871
    819872}
  • telinfy-messaging/trunk/controllers/messageController.php

    r3066934 r3124938  
    530530        // Send SMS when refunding the order
    531531
    532         if($order_refund_sms){
     532        if($order_refund_sms =="yes"){
    533533            $sms_order_refund_template_id = get_option("wc_settings_telinfy_messaging_sms_tid_order_refund");
    534534            $button_redirect_url =  get_permalink(wc_get_page_id('myaccount'));
  • telinfy-messaging/trunk/includes/Cron.php

    r3066934 r3124938  
    1818        $sms_abd_enabled = get_option('wc_settings_telinfy_messaging_checkbox_abandoned_cart_sms');
    1919
     20        $whatsapp_orderc_enabled = get_option('wc_settings_telinfy_messaging_checkbox_order_confirmation_whatsapp');
     21        $sms_orderc_enabled = get_option('wc_settings_telinfy_messaging_checkbox_order_confirmation_sms');
     22
    2023        if($whatsapp_abd_enabled == "yes" || $sms_abd_enabled =="yes" ){
    2124
     
    3235            add_action( 'telinfy_tm_remove_abandoned_cart', array( $this, 'telinfy_tm_remove_abandoned_cart' ) );
    3336
     37           
     38        }
     39
     40        if($whatsapp_orderc_enabled == "yes" || $sms_orderc_enabled =="yes"){
    3441            if ( ! wp_next_scheduled( 'telinfy_tm_send_queue' ) ) {
    3542                wp_schedule_event( time(), 'telinfy_tm_send_queue_message', 'telinfy_tm_send_queue' );
     
    8895                );
    8996            }
     97           
     98        }
     99        $whatsapp_orderc_enabled = get_option('wc_settings_telinfy_messaging_checkbox_order_confirmation_whatsapp');
     100        $sms_orderc_enabled = get_option('wc_settings_telinfy_messaging_checkbox_order_confirmation_sms');
     101
     102        if($whatsapp_orderc_enabled == "yes" || $sms_orderc_enabled =="yes"){
    90103            $message_queue_interval = (int)get_option('wc_settings_telinfy_messaging_message_queue_cron_time');
    91104            $message_queue_interval_seconds = $message_queue_interval* MINUTE_IN_SECONDS;
     
    94107                'display'  => __( 'Telinfy Send Queue Message' ),
    95108            );
    96             return $schedules;
    97109        }
     110
     111        return $schedules;
    98112
    99113    }
  • telinfy-messaging/trunk/includes/assets/js/telinfy-check-cred.js

    r3066934 r3124938  
    2323        _initial_page_load(){
    2424            const whatsapp_username = jQuery( '#wc_settings_telinfy_messaging_api_key_whatsapp' ).val();
    25             const whatsapp_password = jQuery( '#wc_settings_telinfy_messaging_api_secret_whatsapp' ).val();
     25            const whatsapp_base_url = jQuery( '#wc_settings_telinfy_messaging_api_base_url_whatsapp' ).val();
    2626
    2727        const sms_username = jQuery("#wc_settings_telinfy_messaging_api_key_sms").val();
     
    2929
    3030
    31         if(whatsapp_username && whatsapp_password){
    32             TELINFY_cred_check._send_ajax_request(whatsapp_username,whatsapp_password,"whatsapp-config");
     31        if(whatsapp_username && whatsapp_base_url){
     32            TELINFY_cred_check._send_ajax_request(whatsapp_username,whatsapp_base_url,"whatsapp-config");
    3333        }else{
    3434            const targetFields = $(".whatsapp-config");
     
    7373                const whatsapp_api = jQuery( '#wc_settings_telinfy_messaging_api_base_url_whatsapp' ).val();
    7474                const whatsapp_username = jQuery( '#wc_settings_telinfy_messaging_api_key_whatsapp' ).val();
    75                 const whatsapp_password = jQuery( '#wc_settings_telinfy_messaging_api_secret_whatsapp' ).val();
    7675
    7776            const sms_username = jQuery("#wc_settings_telinfy_messaging_api_key_sms").val();
     
    8483                const msgBox = $("#whatsapp-config-error");
    8584                const targetFields = $(".whatsapp-config");
    86                 if ( whatsapp_username == "" || whatsapp_password =="" || whatsapp_api =="") {
     85                if ( whatsapp_username == "" || whatsapp_api =="") {
    8786                                    TELINFY_cred_check._disable_fields(targetFields,msgBox);
    8887                                    return;
     
    9190                $(msgBox).css("color","black");
    9291                $(msgBox).text("Validating...");               
    93                 TELINFY_cred_check._send_ajax_request(whatsapp_username,whatsapp_password,whatsapp_api,"whatsapp-config",1);
     92                TELINFY_cred_check._send_ajax_request(whatsapp_username,whatsapp_api,"whatsapp-config",1);
    9493
    9594                break;
     
    101100
    102101        },
    103         _send_ajax_request(username,password,apiEndpoint,type,click = 0){
     102        _send_ajax_request(username,apiEndpoint,type,click = 0){
    104103
    105104        const data = {
    106105                    action: 'telinfy_tm_check_cred',
    107106                    username: username,
    108             password: password,
    109107            apiEndpoint: apiEndpoint,
    110108            type:type,
     
    141139
    142140           
    143             targetFields.prop("disabled", true).attr("title", "Please fill username and password");
     141            targetFields.prop("disabled", true).attr("title", "Please fill credentials");
    144142            $(msgBox).css("color","red");
    145             $(msgBox).text("Please check the credentials");
     143            $(msgBox).text("Please check the credentials...");
    146144        },
    147145        _readonly_fields(targetFields){
    148146           
    149             targetFields.prop("readonly", true).attr("title", "Please fill username and password");
     147            targetFields.prop("readonly", true).attr("title", "Please fill credentials");
    150148        },
    151149        _render_templates(type,msgBox){
  • telinfy-messaging/trunk/readme.txt

    r3067446 r3124938  
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
    10 Stable tag: 1.0.0
     10Stable tag: 1.1.0
    1111Author: GreenAds Global
    1212Author URI: https://www.greenadsglobal.com/
     
    7373To configure WhatsApp messaging go to **WooCommerce -> Settings -> Telinfy Messaging -> WhatsApp integration settings** section.
    7474
    75 In the first part, we have to enter **Username and Password**. We can validate the credentials using the “Validate Credentials” button. Please use the credentials of the account **https://cloud.telinfy.com/login**  here. If the credentials are correct then we can configure the remaining part.
     75In the first part, we have to enter **API Base URL and API key**. We can validate the credentials using the “Validate Credentials” button. Please use the credentials of the account **https://one.telinfy.com/dashboard/**  here. If the credentials are correct then we can configure the remaining part.
    7676
    7777Feilds needs to be filled,
     
    7979    - API Base URL
    8080
    81     - Username
    82 
    83     - Password
    84 
    85 
    86 In the Second part, We have options to select templates for each event. The templates will be fetched from the Telinfy account you have added above. We have to select the correct templates for each event. You can view details here **https://cloud.telinfy.com/**
     81    - API key
     82
     83    - Country Code
     84
     85
     86In the Second part, We have options to select templates for each event. The templates will be fetched from the Telinfy account you have added above. We have to select the correct templates for each event. You can view details here **https://one.telinfy.com/**
    8787The “File Upload” field in this part of the configuration is for selecting a default image if the order has multiple products.
    8888
     
    268268- Password
    269269
    270 - sender name : We will get  **sender name** from the account **http://bulksms.greenadsglobal.com/index.php/homepage**
    271 
    272 In the Second part, We have options to add templates for each event. Please enter the template ids in the textbox correctly. You can view details here **http://bulksms.greenadsglobal.com/index.php/homepage**
     270- sender name : We will get  **sender name** from the account **https://sapteleservices.com/**
     271
     272In the Second part, We have options to add templates for each event. Please enter the template ids in the textbox correctly. You can view details here **https://sapteleservices.com/**
    273273
    274274Feilds needs to be filled,
     
    288288-Template id for abandoned cart
    289289
    290 Following are the template for the sms messages. This templates should be as in the approved templates in **http://bulksms.greenadsglobal.com/index.php/homepage**
     290Following are the template for the sms messages. This templates should be as in the approved templates in **https://sapteleservices.com/**
    291291
    292292-Template for order confirmation : Template structure for the order confirmation sms.
     
    375375    Allowed parameters :
    376376
    377         {$customer_name},{$redirect_url}
     377        {$customer_name}
    378378
    379379    Example :
    380380
    381381        Hi {$customer_name}
    382         We see you were trying to make a purchase but did not complete your payment. You can continue to click the below button.
    383         View cart: {$redirect_url}.
     382        We see you were trying to make a purchase but did not complete your payment. Please visit our store
    384383        GreenAds Global Pvt Ltd
    385384
     
    428427/**1.0.0 **/
    429428- Initial release
     429
     430/**1.1.0 **/
     431- API upgrade
     432
    430433
    431434== Frequently Asked Questions ==
     
    442445== Screenshots ==
    443446
    444 1. Settings. screenshot-1.png
     4471. Settings. screenshot_new-1.png
    4454482. WhatsApp settings. screenshot-2.png
    4464493. SMS settings. screenshot-3.png
     
    452455/**1.0.0 **/
    453456- Initial release
     457
     458/**1.1.0 **/
     459- Upgraded the APIs
Note: See TracChangeset for help on using the changeset viewer.