Skip to content
This repository has been archived by the owner on Mar 12, 2024. It is now read-only.

Commit

Permalink
Display API and SDK versions in admin config
Browse files Browse the repository at this point in the history
  • Loading branch information
drbyte committed Jun 21, 2020
1 parent e540dc1 commit 0eae6f5
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion files_to_upload/includes/modules/payment/square.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ class square extends base
* $moduleVersion is the plugin version number
*/
public $moduleVersion = '1.3';
protected $apiVersion = '3.20200325.1';
/**
* $title is the displayed name for this payment method
*
Expand Down Expand Up @@ -82,7 +83,16 @@ public function __construct()
$this->enabled = (defined('MODULE_PAYMENT_SQUARE_STATUS') && MODULE_PAYMENT_SQUARE_STATUS == 'True');
$this->sort_order = defined('MODULE_PAYMENT_SQUARE_SORT_ORDER') ? MODULE_PAYMENT_SQUARE_SORT_ORDER : null;
$this->title = MODULE_PAYMENT_SQUARE_TEXT_CATALOG_TITLE; // Payment module title in Catalog
$this->description = '<strong>Square Payments Module ' . $this->moduleVersion . '</strong><br><br>' . MODULE_PAYMENT_SQUARE_TEXT_DESCRIPTION;
$this->description = '<strong>Square Payments Module ' . $this->moduleVersion . '</strong>';
$this->description .= '<br>[designed for API: ' . $this->apiVersion . ']';

if (IS_ADMIN_FLAG === true) {
$this->sdkApiVersion = (new \SquareConnect\Configuration())->getUserAgent();
$this->description .= '<br>[using SDK: ' . $this->sdkApiVersion . ']';
}

$this->description .= '<br><br>' . MODULE_PAYMENT_SQUARE_TEXT_DESCRIPTION;

if (IS_ADMIN_FLAG === true) {
$this->title = MODULE_PAYMENT_SQUARE_TEXT_ADMIN_TITLE;
if (defined('MODULE_PAYMENT_SQUARE_STATUS')) {
Expand Down

0 comments on commit 0eae6f5

Please sign in to comment.