Plugin Directory

Changeset 2900193


Ignore:
Timestamp:
04/17/2023 01:01:40 PM (3 years ago)
Author:
eligmaltd
Message:

Adding skin support

Location:
ellypos-pay/trunk
Files:
18 edited

Legend:

Unmodified
Added
Removed
  • ellypos-pay/trunk/ellypos-pay.php

    r2893373 r2900193  
    33 * Plugin Name: Elly POS Pay
    44 * Description: Pay fast and secure with cards, crypto and other digital payments.
    5  * Version: 1.0.5
     5 * Version: 1.1.0
    66 * Author: Eligma Ltd.
    77 * Author URI: https://gocrypto.com
     
    6666                // init pay and set config
    6767                $this->gocryptoPay = new GoCryptoPay($this->is_sandbox);
    68                 $config = $this->gocryptoPay->config($this->get_option('host'));
     68                $config = $this->gocryptoPay->config($this->get_option('host'), $this->get_option('skin'));
    6969
    7070                // set title and badge icon
     
    122122
    123123            if (array_key_exists('woocommerce_' . $this->id . '_host', $postData) &&
     124                array_key_exists('woocommerce_' . $this->id . '_skin', $postData) &&
    124125                array_key_exists('woocommerce_' . $this->id . '_otp', $postData) &&
    125126                array_key_exists('woocommerce_' . $this->id . '_terminal_id', $postData)) {
     
    132133                // get form data
    133134                $host = $postData['woocommerce_' . $this->id . '_host'];
     135                $skin = $postData['woocommerce_' . $this->id . '_skin'];
    134136                $terminalID = $postData['woocommerce_' . $this->id . '_terminal_id'];
    135137                $otp = $postData['woocommerce_' . $this->id . '_otp'];
    136138
    137139                // get config
    138                 $config = $this->gocryptoPay->config($host);
     140                $config = $this->gocryptoPay->config($host, $skin);
    139141                if (!is_string($config)) {
    140142                    // pair virtual device
     
    143145                        $postData['woocommerce_' . $this->id . '_enabled'] = 'yes';
    144146                        $postData['woocommerce_' . $this->id . '_host'] = $host;
     147                        $postData['woocommerce_' . $this->id . '_skin'] = $skin;
    145148                        $postData['woocommerce_' . $this->id . '_client_id'] = $pairResponse['client_id'];
    146149                        $postData['woocommerce_' . $this->id . '_client_secret'] = $pairResponse['client_secret'];
  • ellypos-pay/trunk/includes/client-settings.php

    r2766369 r2900193  
    2323        )
    2424    ),
     25    'skin' => array(
     26        'title' => __('Skin', 'ellypos_pay'),
     27        'type' => 'text',
     28        'default' => ''
     29    ),
    2530    'client_id' => array(
    2631        'title' => __('Client ID', 'ellypos_pay'),
  • ellypos-pay/trunk/includes/pair-settings.php

    r2766369 r2900193  
    1919        'default' => ''
    2020    ),
     21    'skin' => array(
     22        'title' => __('Skin', 'ellypos_pay'),
     23        'type' => 'text',
     24        'default' => ''
     25    ),
    2126    'terminal_id' => array(
    2227        'title' => __('Terminal ID', 'ellypos_pay'),
  • ellypos-pay/trunk/readme.txt

    r2893373 r2900193  
    22Plugin Name: Elly POS Pay
    33Description: Pay fast and secure with cards, crypto and other digital payments.
    4 Stable tag: 1.0.5
     4Stable tag: 1.1.0
    55Author: Eligma Ltd.
    66Author URI: https://gocrypto.com
     
    5151== Changelog ==
    5252
     53= 1.1.0 =
     54Adding skin support
     55
    5356= 1.0.5 =
    5457KYC support
  • ellypos-pay/trunk/vendor/composer/installed.json

    r2893373 r2900193  
    33        {
    44            "name": "eligmaltd/gocrypto-pay-php",
    5             "version": "v1.0.0",
    6             "version_normalized": "1.0.0.0",
     5            "version": "v1.0.1",
     6            "version_normalized": "1.0.1.0",
    77            "source": {
    88                "type": "git",
    99                "url": "https://github.com/eligmaltd/gocrypto-pay-php.git",
    10                 "reference": "134655420cbc88be177e3cf9b7fb4a6d4566f697"
    11             },
    12             "dist": {
    13                 "type": "zip",
    14                 "url": "https://api.github.com/repos/eligmaltd/gocrypto-pay-php/zipball/134655420cbc88be177e3cf9b7fb4a6d4566f697",
    15                 "reference": "134655420cbc88be177e3cf9b7fb4a6d4566f697",
     10                "reference": "295f1756132a69f14b9040e33c73462385588d04"
     11            },
     12            "dist": {
     13                "type": "zip",
     14                "url": "https://api.github.com/repos/eligmaltd/gocrypto-pay-php/zipball/295f1756132a69f14b9040e33c73462385588d04",
     15                "reference": "295f1756132a69f14b9040e33c73462385588d04",
    1616                "shasum": ""
    1717            },
     
    2020                "php": ">=7.4"
    2121            },
    22             "time": "2023-04-04T07:08:34+00:00",
     22            "time": "2023-04-17T11:56:25+00:00",
    2323            "type": "payments",
    2424            "installation-source": "dist",
     
    4040            "support": {
    4141                "issues": "https://github.com/eligmaltd/gocrypto-pay-php/issues",
    42                 "source": "https://github.com/eligmaltd/gocrypto-pay-php/tree/v1.0.0"
     42                "source": "https://github.com/eligmaltd/gocrypto-pay-php/tree/v1.0.1"
    4343            },
    4444            "install-path": "../eligmaltd/gocrypto-pay-php"
     
    271271                "type": "git",
    272272                "url": "https://github.com/guzzle/psr7.git",
    273                 "reference": "3cf1b6d4f0c820a2cf8bcaec39fc698f3443b5cf"
    274             },
    275             "dist": {
    276                 "type": "zip",
    277                 "url": "https://api.github.com/repos/guzzle/psr7/zipball/3cf1b6d4f0c820a2cf8bcaec39fc698f3443b5cf",
    278                 "reference": "3cf1b6d4f0c820a2cf8bcaec39fc698f3443b5cf",
     273                "reference": "bfe7c39159e6b6ff7f5cc7e7af1a086f8fec6ef0"
     274            },
     275            "dist": {
     276                "type": "zip",
     277                "url": "https://api.github.com/repos/guzzle/psr7/zipball/bfe7c39159e6b6ff7f5cc7e7af1a086f8fec6ef0",
     278                "reference": "bfe7c39159e6b6ff7f5cc7e7af1a086f8fec6ef0",
    279279                "shasum": ""
    280280            },
     
    297297                "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses"
    298298            },
    299             "time": "2023-03-09T13:19:02+00:00",
     299            "time": "2023-04-08T21:54:23+00:00",
    300300            "default-branch": true,
    301301            "type": "library",
     
    369369            "support": {
    370370                "issues": "https://github.com/guzzle/psr7/issues",
    371                 "source": "https://github.com/guzzle/psr7/tree/2.4.4"
     371                "source": "https://github.com/guzzle/psr7/tree/master"
    372372            },
    373373            "funding": [
     
    394394                "type": "git",
    395395                "url": "https://github.com/php-fig/http-client.git",
    396                 "reference": "22b2ef5687f43679481615605d7a15c557ce85b1"
    397             },
    398             "dist": {
    399                 "type": "zip",
    400                 "url": "https://api.github.com/repos/php-fig/http-client/zipball/22b2ef5687f43679481615605d7a15c557ce85b1",
    401                 "reference": "22b2ef5687f43679481615605d7a15c557ce85b1",
     396                "reference": "0955afe48220520692d2d09f7ab7e0f93ffd6a31"
     397            },
     398            "dist": {
     399                "type": "zip",
     400                "url": "https://api.github.com/repos/php-fig/http-client/zipball/0955afe48220520692d2d09f7ab7e0f93ffd6a31",
     401                "reference": "0955afe48220520692d2d09f7ab7e0f93ffd6a31",
    402402                "shasum": ""
    403403            },
    404404            "require": {
    405405                "php": "^7.0 || ^8.0",
    406                 "psr/http-message": "^1.0"
    407             },
    408             "time": "2020-09-19T09:12:31+00:00",
     406                "psr/http-message": "^1.0 || ^2.0"
     407            },
     408            "time": "2023-04-10T20:12:12+00:00",
    409409            "default-branch": true,
    410410            "type": "library",
     
    439439            ],
    440440            "support": {
    441                 "source": "https://github.com/php-fig/http-client/tree/master"
     441                "source": "https://github.com/php-fig/http-client/tree/1.0.2"
    442442            },
    443443            "install-path": "../psr/http-client"
     
    450450                "type": "git",
    451451                "url": "https://github.com/php-fig/http-factory.git",
    452                 "reference": "5a4f141ac2e5bc35e615134f127e1833158d2944"
    453             },
    454             "dist": {
    455                 "type": "zip",
    456                 "url": "https://api.github.com/repos/php-fig/http-factory/zipball/5a4f141ac2e5bc35e615134f127e1833158d2944",
    457                 "reference": "5a4f141ac2e5bc35e615134f127e1833158d2944",
     452                "reference": "e616d01114759c4c489f93b099585439f795fe35"
     453            },
     454            "dist": {
     455                "type": "zip",
     456                "url": "https://api.github.com/repos/php-fig/http-factory/zipball/e616d01114759c4c489f93b099585439f795fe35",
     457                "reference": "e616d01114759c4c489f93b099585439f795fe35",
    458458                "shasum": ""
    459459            },
    460460            "require": {
    461461                "php": ">=7.0.0",
    462                 "psr/http-message": "^1.0"
    463             },
    464             "time": "2022-07-14T07:21:53+00:00",
     462                "psr/http-message": "^1.0 || ^2.0"
     463            },
     464            "time": "2023-04-10T20:10:41+00:00",
    465465            "default-branch": true,
    466466            "type": "library",
     
    498498            ],
    499499            "support": {
    500                 "source": "https://github.com/php-fig/http-factory/tree/master"
     500                "source": "https://github.com/php-fig/http-factory/tree/1.0.2"
    501501            },
    502502            "install-path": "../psr/http-factory"
     
    504504        {
    505505            "name": "psr/http-message",
    506             "version": "dev-master",
    507             "version_normalized": "dev-master",
     506            "version": "1.1",
     507            "version_normalized": "1.1.0.0",
    508508            "source": {
    509509                "type": "git",
    510510                "url": "https://github.com/php-fig/http-message.git",
    511                 "reference": "efd67d1dc14a7ef4fc4e518e7dee91c271d524e4"
    512             },
    513             "dist": {
    514                 "type": "zip",
    515                 "url": "https://api.github.com/repos/php-fig/http-message/zipball/efd67d1dc14a7ef4fc4e518e7dee91c271d524e4",
    516                 "reference": "efd67d1dc14a7ef4fc4e518e7dee91c271d524e4",
    517                 "shasum": ""
    518             },
    519             "require": {
    520                 "php": ">=5.3.0"
    521             },
    522             "time": "2019-08-29T13:16:46+00:00",
    523             "default-branch": true,
     511                "reference": "cb6ce4845ce34a8ad9e68117c10ee90a29919eba"
     512            },
     513            "dist": {
     514                "type": "zip",
     515                "url": "https://api.github.com/repos/php-fig/http-message/zipball/cb6ce4845ce34a8ad9e68117c10ee90a29919eba",
     516                "reference": "cb6ce4845ce34a8ad9e68117c10ee90a29919eba",
     517                "shasum": ""
     518            },
     519            "require": {
     520                "php": "^7.2 || ^8.0"
     521            },
     522            "time": "2023-04-04T09:50:52+00:00",
    524523            "type": "library",
    525524            "extra": {
    526525                "branch-alias": {
    527                     "dev-master": "1.0.x-dev"
     526                    "dev-master": "1.1.x-dev"
    528527                }
    529528            },
     
    555554            ],
    556555            "support": {
    557                 "source": "https://github.com/php-fig/http-message/tree/master"
     556                "source": "https://github.com/php-fig/http-message/tree/1.1"
    558557            },
    559558            "install-path": "../psr/http-message"
  • ellypos-pay/trunk/vendor/composer/installed.php

    r2893373 r2900193  
    44        'pretty_version' => 'dev-develop',
    55        'version' => 'dev-develop',
    6         'reference' => 'd57ac7aa258f32a428b40760390c0608ead2f52d',
     6        'reference' => '0e2176c60b6157cd320e34ff739ea866bb261c16',
    77        'type' => 'wordpress-plugin',
    88        'install_path' => __DIR__ . '/../../',
     
    1414            'pretty_version' => 'dev-develop',
    1515            'version' => 'dev-develop',
    16             'reference' => 'd57ac7aa258f32a428b40760390c0608ead2f52d',
     16            'reference' => '0e2176c60b6157cd320e34ff739ea866bb261c16',
    1717            'type' => 'wordpress-plugin',
    1818            'install_path' => __DIR__ . '/../../',
     
    2121        ),
    2222        'eligmaltd/gocrypto-pay-php' => array(
    23             'pretty_version' => 'v1.0.0',
    24             'version' => '1.0.0.0',
    25             'reference' => '134655420cbc88be177e3cf9b7fb4a6d4566f697',
     23            'pretty_version' => 'v1.0.1',
     24            'version' => '1.0.1.0',
     25            'reference' => '295f1756132a69f14b9040e33c73462385588d04',
    2626            'type' => 'payments',
    2727            'install_path' => __DIR__ . '/../eligmaltd/gocrypto-pay-php',
     
    5454            'pretty_version' => 'dev-master',
    5555            'version' => 'dev-master',
    56             'reference' => '3cf1b6d4f0c820a2cf8bcaec39fc698f3443b5cf',
     56            'reference' => 'bfe7c39159e6b6ff7f5cc7e7af1a086f8fec6ef0',
    5757            'type' => 'library',
    5858            'install_path' => __DIR__ . '/../guzzlehttp/psr7',
     
    6565            'pretty_version' => 'dev-master',
    6666            'version' => 'dev-master',
    67             'reference' => '22b2ef5687f43679481615605d7a15c557ce85b1',
     67            'reference' => '0955afe48220520692d2d09f7ab7e0f93ffd6a31',
    6868            'type' => 'library',
    6969            'install_path' => __DIR__ . '/../psr/http-client',
     
    8282            'pretty_version' => 'dev-master',
    8383            'version' => 'dev-master',
    84             'reference' => '5a4f141ac2e5bc35e615134f127e1833158d2944',
     84            'reference' => 'e616d01114759c4c489f93b099585439f795fe35',
    8585            'type' => 'library',
    8686            'install_path' => __DIR__ . '/../psr/http-factory',
     
    9797        ),
    9898        'psr/http-message' => array(
    99             'pretty_version' => 'dev-master',
    100             'version' => 'dev-master',
    101             'reference' => 'efd67d1dc14a7ef4fc4e518e7dee91c271d524e4',
     99            'pretty_version' => '1.1',
     100            'version' => '1.1.0.0',
     101            'reference' => 'cb6ce4845ce34a8ad9e68117c10ee90a29919eba',
    102102            'type' => 'library',
    103103            'install_path' => __DIR__ . '/../psr/http-message',
    104             'aliases' => array(
    105                 0 => '1.0.x-dev',
    106             ),
     104            'aliases' => array(),
    107105            'dev_requirement' => false,
    108106        ),
  • ellypos-pay/trunk/vendor/eligmaltd/gocrypto-pay-php/src/GoCryptoPay.php

    r2893373 r2900193  
    5757     *
    5858     * @param string $host
     59     * @param string $skin
    5960     *
    6061     * @return mixed|string
    6162     * @throws \GuzzleHttp\Exception\GuzzleException
    6263     */
    63     public function config($host) {
     64    public function config($host, $skin = '') {
    6465        try {
    6566            $response = $this->client->request('GET', $this->publicEndpoint . '/config/web-shop/', [
    6667                'headers' => [
    6768                    'Content-Type' => 'application/json',
    68                     'X-WEB-SHOP-HOST' => $host
     69                    'X-WEB-SHOP-HOST' => $host,
     70                    'X-WEB-SHOP-SKIN' => $skin
    6971                ]
    7072            ]);
  • ellypos-pay/trunk/vendor/guzzlehttp/psr7/src/ServerRequest.php

    r2766369 r2900193  
    145145            $spec = [
    146146                'tmp_name' => $files['tmp_name'][$key],
    147                 'size'     => $files['size'][$key],
    148                 'error'    => $files['error'][$key],
    149                 'name'     => $files['name'][$key],
    150                 'type'     => $files['type'][$key],
     147                'size'     => $files['size'][$key] ?? null,
     148                'error'    => $files['error'][$key] ?? null,
     149                'name'     => $files['name'][$key] ?? null,
     150                'type'     => $files['type'][$key] ?? null,
    151151            ];
    152152            $normalizedFiles[$key] = self::createUploadedFileFromSpec($spec);
  • ellypos-pay/trunk/vendor/psr/http-client/composer.json

    r2766369 r2900193  
    1313    "require": {
    1414        "php": "^7.0 || ^8.0",
    15         "psr/http-message": "^1.0"
     15        "psr/http-message": "^1.0 || ^2.0"
    1616    },
    1717    "autoload": {
  • ellypos-pay/trunk/vendor/psr/http-factory/composer.json

    r2766369 r2900193  
    2121    "require": {
    2222        "php": ">=7.0.0",
    23         "psr/http-message": "^1.0"
     23        "psr/http-message": "^1.0 || ^2.0"
    2424    },
    2525    "autoload": {
  • ellypos-pay/trunk/vendor/psr/http-message/composer.json

    r2766369 r2900193  
    1212    ],
    1313    "require": {
    14         "php": ">=5.3.0"
     14        "php": "^7.2 || ^8.0"
    1515    },
    1616    "autoload": {
     
    2121    "extra": {
    2222        "branch-alias": {
    23             "dev-master": "1.0.x-dev"
     23            "dev-master": "1.1.x-dev"
    2424        }
    2525    }
  • ellypos-pay/trunk/vendor/psr/http-message/src/MessageInterface.php

    r2766369 r2900193  
    11<?php
     2
     3declare(strict_types=1);
    24
    35namespace Psr\Http\Message;
     
    3941     * @return static
    4042     */
    41     public function withProtocolVersion($version);
     43    public function withProtocolVersion(string $version);
    4244
    4345    /**
     
    7678     *     no matching header name is found in the message.
    7779     */
    78     public function hasHeader($name);
     80    public function hasHeader(string $name);
    7981
    8082    /**
     
    9294     *    return an empty array.
    9395     */
    94     public function getHeader($name);
     96    public function getHeader(string $name);
    9597
    9698    /**
     
    113115     *    the message, this method MUST return an empty string.
    114116     */
    115     public function getHeaderLine($name);
     117    public function getHeaderLine(string $name);
    116118
    117119    /**
     
    130132     * @throws \InvalidArgumentException for invalid header names or values.
    131133     */
    132     public function withHeader($name, $value);
     134    public function withHeader(string $name, $value);
    133135
    134136    /**
     
    148150     * @throws \InvalidArgumentException for invalid header names or values.
    149151     */
    150     public function withAddedHeader($name, $value);
     152    public function withAddedHeader(string $name, $value);
    151153
    152154    /**
     
    162164     * @return static
    163165     */
    164     public function withoutHeader($name);
     166    public function withoutHeader(string $name);
    165167
    166168    /**
  • ellypos-pay/trunk/vendor/psr/http-message/src/RequestInterface.php

    r2766369 r2900193  
    11<?php
     2
     3declare(strict_types=1);
    24
    35namespace Psr\Http\Message;
     
    5658     * @link http://tools.ietf.org/html/rfc7230#section-5.3 (for the various
    5759     *     request-target forms allowed in request messages)
    58      * @param mixed $requestTarget
     60     * @param string $requestTarget
    5961     * @return static
    6062     */
    61     public function withRequestTarget($requestTarget);
     63    public function withRequestTarget(string $requestTarget);
    6264
    6365    /**
     
    8385     * @throws \InvalidArgumentException for invalid HTTP methods.
    8486     */
    85     public function withMethod($method);
     87    public function withMethod(string $method);
    8688
    8789    /**
     
    126128     * @return static
    127129     */
    128     public function withUri(UriInterface $uri, $preserveHost = false);
     130    public function withUri(UriInterface $uri, bool $preserveHost = false);
    129131}
  • ellypos-pay/trunk/vendor/psr/http-message/src/ResponseInterface.php

    r2766369 r2900193  
    11<?php
     2
     3declare(strict_types=1);
    24
    35namespace Psr\Http\Message;
     
    5052     * @throws \InvalidArgumentException For invalid status code arguments.
    5153     */
    52     public function withStatus($code, $reasonPhrase = '');
     54    public function withStatus(int $code, string $reasonPhrase = '');
    5355
    5456    /**
  • ellypos-pay/trunk/vendor/psr/http-message/src/ServerRequestInterface.php

    r2766369 r2900193  
    11<?php
     2
     3declare(strict_types=1);
    24
    35namespace Psr\Http\Message;
     
    225227     * @return mixed
    226228     */
    227     public function getAttribute($name, $default = null);
     229    public function getAttribute(string $name, $default = null);
    228230
    229231    /**
     
    242244     * @return static
    243245     */
    244     public function withAttribute($name, $value);
     246    public function withAttribute(string $name, $value);
    245247
    246248    /**
     
    258260     * @return static
    259261     */
    260     public function withoutAttribute($name);
     262    public function withoutAttribute(string $name);
    261263}
  • ellypos-pay/trunk/vendor/psr/http-message/src/StreamInterface.php

    r2766369 r2900193  
    11<?php
     2
     3declare(strict_types=1);
    24
    35namespace Psr\Http\Message;
     
    8587     * @throws \RuntimeException on failure.
    8688     */
    87     public function seek($offset, $whence = SEEK_SET);
     89    public function seek(int $offset, int $whence = SEEK_SET);
    8890
    8991    /**
     
    113115     * @throws \RuntimeException on failure.
    114116     */
    115     public function write($string);
     117    public function write(string $string);
    116118
    117119    /**
     
    132134     * @throws \RuntimeException if an error occurs.
    133135     */
    134     public function read($length);
     136    public function read(int $length);
    135137
    136138    /**
     
    150152     *
    151153     * @link http://php.net/manual/en/function.stream-get-meta-data.php
    152      * @param string $key Specific metadata to retrieve.
     154     * @param string|null $key Specific metadata to retrieve.
    153155     * @return array|mixed|null Returns an associative array if no key is
    154156     *     provided. Returns a specific key value if a key is provided and the
    155157     *     value is found, or null if the key is not found.
    156158     */
    157     public function getMetadata($key = null);
     159    public function getMetadata(?string $key = null);
    158160}
  • ellypos-pay/trunk/vendor/psr/http-message/src/UploadedFileInterface.php

    r2766369 r2900193  
    11<?php
     2
     3declare(strict_types=1);
    24
    35namespace Psr\Http\Message;
     
    6365     *     the second or subsequent call to the method.
    6466     */
    65     public function moveTo($targetPath);
     67    public function moveTo(string $targetPath);
    6668   
    6769    /**
  • ellypos-pay/trunk/vendor/psr/http-message/src/UriInterface.php

    r2766369 r2900193  
    11<?php
     2
     3declare(strict_types=1);
     4
    25namespace Psr\Http\Message;
    36
     
    189192     * @throws \InvalidArgumentException for invalid or unsupported schemes.
    190193     */
    191     public function withScheme($scheme);
     194    public function withScheme(string $scheme);
    192195
    193196    /**
     
    205208     * @return static A new instance with the specified user information.
    206209     */
    207     public function withUserInfo($user, $password = null);
     210    public function withUserInfo(string $user, ?string $password = null);
    208211
    209212    /**
     
    219222     * @throws \InvalidArgumentException for invalid hostnames.
    220223     */
    221     public function withHost($host);
     224    public function withHost(string $host);
    222225
    223226    /**
     
    238241     * @throws \InvalidArgumentException for invalid ports.
    239242     */
    240     public function withPort($port);
     243    public function withPort(?int $port);
    241244
    242245    /**
     
    262265     * @throws \InvalidArgumentException for invalid paths.
    263266     */
    264     public function withPath($path);
     267    public function withPath(string $path);
    265268
    266269    /**
     
    279282     * @throws \InvalidArgumentException for invalid query strings.
    280283     */
    281     public function withQuery($query);
     284    public function withQuery(string $query);
    282285
    283286    /**
     
    295298     * @return static A new instance with the specified fragment.
    296299     */
    297     public function withFragment($fragment);
     300    public function withFragment(string $fragment);
    298301
    299302    /**
Note: See TracChangeset for help on using the changeset viewer.