Jump to content
tmcca

Paypal V5.018 update?

Recommended Posts

Harold hasn't stated it, that I am aware of, but think I think he has switched this to updates only from the admin. That makes updating the module easier for everyone. So if it is installed in your shop, just go to admin->Paypal and you should see a View Update button, if it needs updating. Then an install button will appear. click on it to install it.

Share this post


Link to post
Share on other sites

v5.018 is available as an update! This can be downloaded and applied manually from the osCommerce Apps site.

Edited by tmcca

Share this post


Link to post
Share on other sites

Please post the link to the 5.018 version. Many have asked for it here so providing a link would be helpful.

Share this post


Link to post
Share on other sites

@tmcca

If you look at the source of your https://www.domain.com/admin/paypal.php?action=configure page does it show this section?

  <div id="ppAppUpdateNotice" style="padding: 0 12px 0 12px; display: none;">
    <div class="pp-panel pp-panel-success">
      <p>An update is available for this App!</p>
<p><small><a href="https://www.domain.com/admin/paypal.php?action=update" class="pp-button pp-button-success">View Update</a></small></p>    </div>
  </div>

 


Let's make things easier for new osCommerce users http://forums.oscommerce.com/topic/402638-discussion-about-hard-coded-database-tables/?p=1718900  Getting there with osCommerce 2.4! :thumbsup:

Share this post


Link to post
Share on other sites
8 hours ago, tmcca said:

It's not there that is the problem only 5.010

Yes, I know. But your response before mine stated it was. Perhaps it is a language problem. As mentioned, you have to update from admin. But the update doesn't work on older versions of the app so, if you have an old version installed (v 4.x), you will need to update it manually using the version from the apps site and then the update button should appear in your admin.

Share this post


Link to post
Share on other sites

@frankl yes but not being shown the only thing being shown is:

 

v5.018 is available as an update! This can be downloaded and applied manually from the osCommerce Apps site. Not View Update button at all this is what code is shown:

 

 versionCheckNotify: function() {
        if ( (typeof this.versionCheckResult[0] != 'undefined') && (typeof this.versionCheckResult[1] != 'undefined') ) {
          if ( this.versionCheckResult[1] > this.version ) {
            $('#ppAppUpdateNotice').show();
          }
        }
      }
    }
  }
};

if ( typeof OSCOM.APP.PAYPAL.versionCheckResult != 'undefined' ) {
  OSCOM.APP.PAYPAL.versionCheckResult = OSCOM.APP.PAYPAL.versionCheckResult.split('-', 2);
}
</script>

<div class="pp-container">
  <div class="pp-header">
    <div id="ppAppInfo" style="float: right;">
      PayPal App v5.010 <a href="http://petunderground.com/specials/paypal.php?action=info">Info/Help</a> <a href="http://petunderground.com/specials/paypal.php?action=privacy">Privacy</a>    </div>

    <a href="http://mysite.com/admin/paypal.php?action=update"><img src="http://petunderground.com/images/apps/paypal/paypal.png" /></a>
  </div>

  <div id="ppAppUpdateNotice" style="padding: 0 12px 0 12px; display: none;">
    <div class="pp-panel pp-panel-success">
      <p>An update is available for this App!</p>
<p><small><a href="http://mysite.com/admin/paypal.php?action=update" class="pp-button pp-button-success">View Update</a></small></p>    </div>
  </div>

 

Edited by tmcca
error

Share this post


Link to post
Share on other sites

I am guessing to see the update button you need to be in SSL which I did still no update button.. I am on bootstrap says version 4.039. However, when I install 5.010 in bootstrap it gets messed up.. Anyone? shouldnt the bootstrap version install 5.018 already? I am going on github and maybe a bug

Share this post


Link to post
Share on other sites

I even added this to verify openssl function exists; I also changed

doOnlineVersionCheck: true but didnt do anything; i am lost
<?php
if (function_exists('openssl_verify')) {
    echo "Openssl functions are available.<br />\n";
} else {
    echo "Openssl functions are not available.<br />\n";
}
?>

 

Edited by tmcca

Share this post


Link to post
Share on other sites

Intersting I check sec_dir permission and say includes/apps/paypal/work needs to be writeable and it is.. I am thinking maybe this.. Why is it saying not writeable when folder is 777

Share this post


Link to post
Share on other sites

The view update button code is in the page source below. You should find out why it isn't being shown on the page.

3 hours ago, tmcca said:

@frankl yes but not being shown the only thing being shown is:

 

v5.018 is available as an update! This can be downloaded and applied manually from the osCommerce Apps site. Not View Update button at all this is what code is shown:

 


 versionCheckNotify: function() {
        if ( (typeof this.versionCheckResult[0] != 'undefined') && (typeof this.versionCheckResult[1] != 'undefined') ) {
          if ( this.versionCheckResult[1] > this.version ) {
            $('#ppAppUpdateNotice').show();
          }
        }
      }
    }
  }
};

if ( typeof OSCOM.APP.PAYPAL.versionCheckResult != 'undefined' ) {
  OSCOM.APP.PAYPAL.versionCheckResult = OSCOM.APP.PAYPAL.versionCheckResult.split('-', 2);
}
</script>

<div class="pp-container">
  <div class="pp-header">
    <div id="ppAppInfo" style="float: right;">
      PayPal App v5.010 <a href="http://petunderground.com/specials/paypal.php?action=info">Info/Help</a> <a href="http://petunderground.com/specials/paypal.php?action=privacy">Privacy</a>    </div>

    <a href="http://mysite.com/admin/paypal.php?action=update"><img src="http://petunderground.com/images/apps/paypal/paypal.png" /></a>
  </div>

  <div id="ppAppUpdateNotice" style="padding: 0 12px 0 12px; display: none;">
    <div class="pp-panel pp-panel-success">
      <p>An update is available for this App!</p>
<p><small><a href="http://mysite.com/admin/paypal.php?action=update" class="pp-button pp-button-success">View Update</a></small></p>    </div>
  </div>

 

 


Let's make things easier for new osCommerce users http://forums.oscommerce.com/topic/402638-discussion-about-hard-coded-database-tables/?p=1718900  Getting there with osCommerce 2.4! :thumbsup:

Share this post


Link to post
Share on other sites

What does your section of page source like this look like?

<script>
var OSCOM = {
  dateNow: new Date(),
  htmlSpecialChars: function(string) {
    if ( string == null ) {
      string = '';
    }

    return $('<span />').text(string).html();
  },
  nl2br: function(string) {
    return string.replace(/\n/g, '<br />');
  },
  APP: {
    PAYPAL: {
      version: '4.039',
      versionCheckResult: "5-5.018",
      action: 'credentials',
      doOnlineVersionCheck: false,
      canApplyOnlineUpdates: true,
      accountTypes: {
        live: true,
        sandbox: false      },
      versionCheck: function() {
        $.get('https://www.domain.com/admin/paypal.php?action=checkVersion', function (data) {
          var versions = [];

          if ( OSCOM.APP.PAYPAL.canApplyOnlineUpdates == true ) {
            try {
              data = $.parseJSON(data);
            } catch (ex) {
            }

            if ( (typeof data == 'object') && ('rpcStatus' in data) && (data['rpcStatus'] == 1) && ('releases' in data) && (data['releases'].length > 0) ) {
              for ( var i = 0; i < data['releases'].length; i++ ) {
                versions.push(data['releases'][i]['version']);
              }
            }
          } else {
            if ( (typeof data == 'string') && (data.indexOf('rpcStatus') > -1) ) {
              var result = data.split("\n", 2);

              if ( result.length == 2 ) {
                var rpcStatus = result[0].split('=', 2);

                if ( rpcStatus[1] == 1 ) {
                  var release = result[1].split('=', 2);

                  versions.push(release[1]);
                }
              }
            }
          }

          if ( versions.length > 0 ) {
            OSCOM.APP.PAYPAL.versionCheckResult = [ OSCOM.dateNow.getDate(), Math.max.apply(Math, versions) ];

            OSCOM.APP.PAYPAL.versionCheckNotify();
          }
        });
      },
      versionCheckNotify: function() {
        if ( (typeof this.versionCheckResult[0] != 'undefined') && (typeof this.versionCheckResult[1] != 'undefined') ) {
          if ( this.versionCheckResult[1] > this.version ) {
            $('#ppAppUpdateNotice').show();
          }
        }
      }
    }
  }
};

if ( typeof OSCOM.APP.PAYPAL.versionCheckResult != 'undefined' ) {
  OSCOM.APP.PAYPAL.versionCheckResult = OSCOM.APP.PAYPAL.versionCheckResult.split('-', 2);
}
</script>

 


Let's make things easier for new osCommerce users http://forums.oscommerce.com/topic/402638-discussion-about-hard-coded-database-tables/?p=1718900  Getting there with osCommerce 2.4! :thumbsup:

Share this post


Link to post
Share on other sites

In admin/paypal.php, does this line exist?

canApplyOnlineUpdates: <?php echo class_exists('ZipArchive') && function_exists('json_encode') && function_exists('openssl_verify') ? 'true' : 'false'; ?>,

and if that line is present the source code definitely looks exactly like this?

APP: {
    PAYPAL: {
      version: '4.039',
      versionCheckResult: "5-5.018",
      action: 'credentials',
      doOnlineVersionCheck: false,
      canApplyOnlineUpdates: true,
      accountTypes: {
        live: true,
        sandbox: false      },
      versionCheck: function() {

 


Let's make things easier for new osCommerce users http://forums.oscommerce.com/topic/402638-discussion-about-hard-coded-database-tables/?p=1718900  Getting there with osCommerce 2.4! :thumbsup:

Share this post


Link to post
Share on other sites

Should I go to an older version and try it? interesting I see 4-5.018 yours is 5-5.018

APP: {
    PAYPAL: {
      version: '5.010',
      versionCheckResult: "4-5.018",
      action: 'update',
      doOnlineVersionCheck: false,
      canApplyOnlineUpdates: false,
      accountTypes: {
        live: true,
        sandbox: true      },
      versionCheck: function() {

 

Share this post


Link to post
Share on other sites

Create a new page in your catalog and copy this code into it. Tell me the results when you look at the page

<?php
/*
  $Id$

  osCommerce, Open Source E-Commerce Solutions
  http://www.oscommerce.com

  Copyright (c) 2010 osCommerce

  Released under the GNU General Public License
*/

  require('includes/application_top.php');
  
  require('includes/template_top.php');
?>

<div class="page-header">
  <h1>Paypal Test</h1>
</div>
<div class="contentContainer">
<?php 
	echo 'ZipArchive: ' . class_exists('ZipArchive') . '<br>';
	echo 'json_encode: ' . function_exists('json_encode') . '<br>';
	echo 'openssl_verify: ' . function_exists('openssl_verify') . '<br>';
?>
</div>
<div class="contentContainer">
  <div class="buttonSet">
    <div class="text-right"><?php echo tep_draw_button(IMAGE_BUTTON_CONTINUE, 'fa fa-angle-right', tep_href_link('index.php')); ?></div>
  </div>
</div>

<?php
  require('includes/template_bottom.php');
  require('includes/application_bottom.php');
?>

 


Let's make things easier for new osCommerce users http://forums.oscommerce.com/topic/402638-discussion-about-hard-coded-database-tables/?p=1718900  Getting there with osCommerce 2.4! :thumbsup:

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×