Plugin Directory

Changeset 2146200


Ignore:
Timestamp:
08/27/2019 09:01:38 AM (7 years ago)
Author:
nickjamescom
Message:

#2.3.9 - Aweber error handling

Location:
apm-child/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • apm-child/trunk/admin/list-aweber.php

    r2138159 r2146200  
    191191        if($form['aweber_auth_code'] != $recordCrediantial['aweber_auth_code'])
    192192        {
    193             $credentials = AWeberAPI::getDataFromAweberID($auth_code);
    194             list($consumerKey, $consumerSecret, $accessKey, $accessSecret) = $credentials;
     193            try {
     194               
     195                $credentials = AWeberAPI::getDataFromAweberID($auth_code);
     196                list($consumerKey, $consumerSecret, $accessKey, $accessSecret) = $credentials;
     197           
     198            }
     199            catch(AWeberAPIException $exc) {
     200                $AWeberAPIException = "<h3>AWeberAPIException:</h3>";
     201                $AWeberAPIException .= " <li> Type: $exc->type              <br>";
     202                $AWeberAPIException .= " <li> Msg : $exc->message           <br>";
     203                $AWeberAPIException .= " <li> Docs: $exc->documentation_url <br>";
     204                $AWeberAPIException .= "<hr>";
     205                $egmail_errors[] = $AWeberAPIException;
     206                $consumerKey = $consumerSecret = $accessKey = $accessSecret = '';
     207            }
    195208        }
    196209        else
     
    395408        if($aweber->consumerKey != '')
    396409        {
    397             $account = $aweber->getAccount($recordCrediantial['aweber_access_token'], $recordCrediantial['aweber_access_token_secret']);
    398             $account_id = $account->id;
    399            
    400             if($account_id != '')
    401             {
    402                 $egSql = $wpdb->prepare("UPDATE `".APM_OPTIONS_TABLE."` SET `aweber_account_number` = %d WHERE ID = %d LIMIT 1", array( $account_id, $option_id));
    403                 $wpdb->query($egSql);
    404             }
    405             $show_aweber_list = true;
     410           
     411            try {
     412           
     413                $account = $aweber->getAccount($recordCrediantial['aweber_access_token'], $recordCrediantial['aweber_access_token_secret']);
     414                $account_id = $account->id;
     415               
     416                if($account_id != '')
     417                {
     418                    $egSql = $wpdb->prepare("UPDATE `".APM_OPTIONS_TABLE."` SET `aweber_account_number` = %d WHERE ID = %d LIMIT 1", array( $account_id, $option_id));
     419                    $wpdb->query($egSql);
     420                }
     421                $show_aweber_list = true;
     422               
     423            } catch(AWeberAPIException $exc) {
     424               
     425                $AWeberAPIException = "<h3>AWeberAPIException:</h3>";
     426                $AWeberAPIException .= " <li> Type: $exc->type              <br>";
     427                $AWeberAPIException .= " <li> Msg : $exc->message           <br>";
     428                $AWeberAPIException .= " <li> Docs: $exc->documentation_url <br>";
     429                $AWeberAPIException .= "<hr>";
     430                $egmail_errors[] = $AWeberAPIException;
     431            }
     432           
     433           
    406434        }
    407435        else
  • apm-child/trunk/mc-main.php

    r2138159 r2146200  
    99Author: Nick James
    1010E-mail: admin@nickjamesadmin.com
    11 Version: 2.3.8
     11Version: 2.3.9
    1212Author URI: http://www.pluginpixie.com
    1313*/
    1414ini_set('display_errors',1);
    1515global $APM_SUBSCRIPTION_VER;
    16 $APM_SUBSCRIPTION_VER = "2.3.8";
     16$APM_SUBSCRIPTION_VER = "2.3.9";
    1717
    1818define('APM_SUBSCRIPTION_PATH', plugins_url().'/'. basename(dirname(__FILE__)).'/');
  • apm-child/trunk/readme.txt

    r2138159 r2146200  
    126126*Implemented Sendeagle Email service provider
    127127*Version Update.
     128
     129= 2.3.9 =
     130*AWeber Error Handling Feature has been implemented.
     131*Version Update.
Note: See TracChangeset for help on using the changeset viewer.