From c14c3811d3282f69fe224d9dcef3becf0b5e05bc Mon Sep 17 00:00:00 2001 From: XYG6 <15997432+XYG6@users.noreply.github.com> Date: Wed, 4 May 2022 12:49:25 +0200 Subject: [PATCH] Partial refund added and update to SDK 1.3.2. --- composer.lock | 16 +- config_fr.xml | 2 +- controllers/front/notification.php | 8 +- easytransac.php | 33 +- translations/fr.php | 20 +- vendor/autoload.php | 5 + vendor/composer/ClassLoader.php | 2 +- vendor/composer/InstalledVersions.php | 2 + vendor/composer/autoload_classmap.php | 2 +- vendor/composer/autoload_namespaces.php | 2 +- vendor/composer/autoload_psr4.php | 2 +- vendor/composer/autoload_real.php | 25 +- vendor/composer/installed.json | 16 +- vendor/composer/installed.php | 10 +- .../easytransac-sdk-php/.coveralls.yml | 3 - .../.github/workflows/coverage-badge.yml | 28 + .../easytransac-sdk-php/.travis.yml | 16 - .../easytransac/easytransac-sdk-php/README.md | 2 +- .../easytransac-sdk-php/clover.xml | 2023 +++++++++++++++++ .../easytransac-sdk-php/composer.json | 10 +- .../easytransac-sdk-php/composer.lock | 2 +- .../easytransac-sdk-php/coverage_badge.svg | 16 + .../easytransac-sdk-php/phpunit.xml | 16 + .../sdk/EasyTransac/Core/Services.php | 1 + .../sdk/EasyTransac/Entities/Notification.php | 304 +++ 25 files changed, 2470 insertions(+), 96 deletions(-) delete mode 100644 vendor/easytransac/easytransac-sdk-php/.coveralls.yml create mode 100644 vendor/easytransac/easytransac-sdk-php/.github/workflows/coverage-badge.yml delete mode 100644 vendor/easytransac/easytransac-sdk-php/.travis.yml create mode 100644 vendor/easytransac/easytransac-sdk-php/clover.xml create mode 100644 vendor/easytransac/easytransac-sdk-php/coverage_badge.svg create mode 100644 vendor/easytransac/easytransac-sdk-php/phpunit.xml diff --git a/composer.lock b/composer.lock index 2b603b1..0e89c49 100644 --- a/composer.lock +++ b/composer.lock @@ -8,16 +8,16 @@ "packages": [ { "name": "easytransac/easytransac-sdk-php", - "version": "1.3.0", + "version": "1.3.2", "source": { "type": "git", "url": "https://github.com/easytransac/easytransac-sdk-php.git", - "reference": "f464c796c4205a0e672fa5829ad13cfd26439583" + "reference": "e75c11c70bc7a9b742340047ceb73c4948812363" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/easytransac/easytransac-sdk-php/zipball/f464c796c4205a0e672fa5829ad13cfd26439583", - "reference": "f464c796c4205a0e672fa5829ad13cfd26439583", + "url": "https://api.github.com/repos/easytransac/easytransac-sdk-php/zipball/e75c11c70bc7a9b742340047ceb73c4948812363", + "reference": "e75c11c70bc7a9b742340047ceb73c4948812363", "shasum": "" }, "require": { @@ -42,7 +42,7 @@ "name": "Easytransac" } ], - "description": "A SDK to make payment with the EasyTransac API", + "description": "Easytransac payment gateway PHP SDK", "keywords": [ "easytransac", "php", @@ -50,9 +50,9 @@ ], "support": { "issues": "https://github.com/easytransac/easytransac-sdk-php/issues", - "source": "https://github.com/easytransac/easytransac-sdk-php/tree/1.3.0" + "source": "https://github.com/easytransac/easytransac-sdk-php/tree/1.3.2" }, - "time": "2021-11-22T11:07:05+00:00" + "time": "2022-04-25T09:57:58+00:00" } ], "packages-dev": [], @@ -63,5 +63,5 @@ "prefer-lowest": false, "platform": [], "platform-dev": [], - "plugin-api-version": "2.1.0" + "plugin-api-version": "2.3.0" } diff --git a/config_fr.xml b/config_fr.xml index 68b821d..b3a355e 100644 --- a/config_fr.xml +++ b/config_fr.xml @@ -2,7 +2,7 @@ easytransac - + diff --git a/controllers/front/notification.php b/controllers/front/notification.php index 0bd4b6c..5912923 100644 --- a/controllers/front/notification.php +++ b/controllers/front/notification.php @@ -250,12 +250,18 @@ public function postProcess() $this->module->addOrderMessage($existing_order->id, $payment_message); + $amount = $response->getContent()->getAmount() * 100; + + if($payment_status == 7){ + $amount = $response->getContent()->AmountRefund() * 100; + } + # for Prestashop >= 1.7.7 $this->module->addTransactionMessage( $existing_order_id, $response->getTid(), $payment_message, - $response->getAmount() *100, + $amount, $response->getStatus()); $this->module->debugLog('Notification : order state changed to', $payment_status); diff --git a/easytransac.php b/easytransac.php index b2f54d2..e9e8392 100644 --- a/easytransac.php +++ b/easytransac.php @@ -26,7 +26,7 @@ public function __construct() { $this->name = 'easytransac'; $this->tab = 'payments_gateways'; - $this->version = '3.3.0'; + $this->version = '3.3.1'; $this->author = 'EasyTransac'; $this->is_eu_compatible = 1; $this->need_instance = 0; @@ -259,7 +259,8 @@ public function displayForm() array( 'type' => 'text', 'label' => $this->l('Api Key'), - 'desc' => $this->l('Your Easytransac application API Key is available in your back office in E-commerce > Applications.'), + 'desc' => $this->l('Your Easytransac application API Key is available in your back office, by editing ') + .''.$this->l('your application').'.', 'name' => 'EASYTRANSAC_API_KEY', 'size' => 20, 'required' => true @@ -267,7 +268,8 @@ public function displayForm() array( 'type' => 'free', 'label' => $this->l('Notification URL'), - 'desc' => $this->l('Notification URL to copy paste in your EasyTransac appplication settings'), + 'desc' => $this->l('Enter this notification URL when editing ') + .''.$this->l('your application').'.', 'name' => 'EASYTRANSAC_NOTIFICATION_URL', 'size' => 20, ), @@ -695,15 +697,26 @@ public function hookActionOrderSlipAdd($params){ ->write('product map '. json_encode($item)); } - $items = $params['order']->getOrderSlipsCollection()->getResults(); - $total_refund_amount = 0; + // $items = $params['order']->getOrderSlipsCollection()->getResults(); + // $total_refund_amount = 0; - foreach ($items as $key => $item) { - EasyTransac\Core\Logger::getInstance() - ->write('refund amount for item '. $item->amount); + // foreach ($items as $key => $item) { + // EasyTransac\Core\Logger::getInstance() + // ->write('refund amount for item '. $item->amount); - $total_refund_amount += $item->amount; - } + // $total_refund_amount += $item->amount; + // } + + $orderSlip = $params['order']->getOrderSlipsCollection() + ->orderBy('date_upd', 'desc') + ->getFirst(); + + $total_refund_amount = $orderSlip->amount + $orderSlip->shipping_cost_amount; + + EasyTransac\Core\Logger::getInstance() + ->write('refund amount for order slip: '. $orderSlip->amount + .' - shipping cost amount: '.$orderSlip->shipping_cost_amount + .' - total: '.$total_refund_amount); if($total_refund_amount > 0){ $logMsg = json_encode(print_r($params['order'], true)); diff --git a/translations/fr.php b/translations/fr.php index 1605322..6f7cb58 100644 --- a/translations/fr.php +++ b/translations/fr.php @@ -16,9 +16,11 @@ $_MODULE['<{easytransac}prestashop>easytransac_f4f70727dc34561dfde1a3c529b6205c'] = 'Paramètres'; $_MODULE['<{easytransac}prestashop>easytransac_5a2ebfb8baa378cfcfcba58bbb1380c2'] = 'Éléments requis'; $_MODULE['<{easytransac}prestashop>easytransac_2e5e61c17add3609c6786a4c9ce1a279'] = 'Clé d\'API '; -$_MODULE['<{easytransac}prestashop>easytransac_bd81a5e203876503df7e2ac6b04f6c1b'] = 'Votre clé d\'API Easytransac, disponible sur votre espace client dans E-commerce > Applications.'; +$_MODULE['<{easytransac}prestashop>easytransac_8d308a3184a7afba4d8ab126f6e0f9c9'] = 'Votre clé d\'API Easytransac est disponible sur votre espace client, en éditant'; +$_MODULE['<{easytransac}prestashop>easytransac_9cfefed8fb9497baa5cd519d7d2bb5d7'] = 'fr'; +$_MODULE['<{easytransac}prestashop>easytransac_6ba802436d75ea03dbc684ca197ff684'] = 'votre application'; $_MODULE['<{easytransac}prestashop>easytransac_a2b787ad97ab6f553dded04fc19dab01'] = 'URL de notification'; -$_MODULE['<{easytransac}prestashop>easytransac_cb664514b802ab38b8cae3092c6cf15f'] = 'Saisissez cette URL sur votre espace client, dans la partie E-commerce > Applications puis en cliquant sur \"Editer\".'; +$_MODULE['<{easytransac}prestashop>easytransac_95b0570d99a749ae466225b77eb31558'] = 'Saisissez cette URL de notification en éditant'; $_MODULE['<{easytransac}prestashop>easytransac_302e197c5035435162398179ab21cbf5'] = 'Paiements en 1 clic'; $_MODULE['<{easytransac}prestashop>easytransac_f611890ac19b437ed2d695b7637f09ae'] = 'La carte bancaire du client est sauvegardée pour de futurs paiements.'; $_MODULE['<{easytransac}prestashop>easytransac_00d23a76e43b46dae9ec7aa9dcbebb32'] = 'Activé'; @@ -43,7 +45,6 @@ $_MODULE['<{easytransac}prestashop>notification_ea397fa1032ee2c3a2eb37aeea8081df'] = 'Montant payé différent du montant de la commande'; $_MODULE['<{easytransac}prestashop>notification_6b804acc24887be2487ee67d55c48eed'] = 'Paiement en plusieurs fois'; $_MODULE['<{easytransac}prestashop>notification_ec234a2ac7acc640c6b795c71e4ad8c6'] = 'Paiement en plusieurs fois complété'; -$_MODULE['<{easytransac}prestashop>checkout_payment_67e796341942b590723681410200029f'] = 'Payez avec votre carte bancaire'; $_MODULE['<{easytransac}prestashop>confirmation_f403ac95a07ddae169d88c4833ace3ce'] = 'Merci pour votre commande'; $_MODULE['<{easytransac}prestashop>confirmation_e6dc7945b557a1cd949bea92dd58963e'] = 'Votre commande sera livrée bientôt.'; $_MODULE['<{easytransac}prestashop>confirmation_0db71da7150c27142eef9d22b843b4a9'] = 'Pour toute demande d\'information, merci de contacter notre'; @@ -52,23 +53,20 @@ $_MODULE['<{easytransac}prestashop>confirmation_2e2117b7c81aa9ea6931641ea2c6499f'] = 'Votre commande du '; $_MODULE['<{easytransac}prestashop>confirmation_ecaa952cb16a3aa256995cee0ccdee54'] = 'est en cours de traitement'; $_MODULE['<{easytransac}prestashop>confirmation_50918aa8e5ee2c48f236547845cc4394'] = 'Veuillez attendre la confirmation du paiement par EasyTransac'; -$_MODULE['<{easytransac}prestashop>multiple_payments_6b804acc24887be2487ee67d55c48eed'] = 'Paiement en plusieurs fois'; -$_MODULE['<{easytransac}prestashop>multiple_payments_794a84d799ba259008e1ab4da089b0ae'] = 'Payer en 2 fois'; -$_MODULE['<{easytransac}prestashop>multiple_payments_bb9be692a920f347a0273ab51442a61e'] = 'Payer en 3 fois'; -$_MODULE['<{easytransac}prestashop>multiple_payments_b9f4ca4ebe2f9bf614036cd5f8587171'] = 'Payer en 4 fois'; $_MODULE['<{easytransac}prestashop>adminordertab_44749712dbec183e983dcd78a7736c41'] = 'Date'; $_MODULE['<{easytransac}prestashop>adminordertab_4c2a8fe7eaf24721cc7a9f0175115bd4'] = 'Message'; $_MODULE['<{easytransac}prestashop>adminordertab_ec53a8c4f07baed5d8825072c89799be'] = 'Statut'; $_MODULE['<{easytransac}prestashop>adminordertab_88427ec035734b45aae9f7d8859a5008'] = 'ID transaction'; $_MODULE['<{easytransac}prestashop>adminordertab_b2f40690858b404ed10e62bdf422c704'] = 'Montant'; +$_MODULE['<{easytransac}prestashop>multiple_payments_6b804acc24887be2487ee67d55c48eed'] = 'Paiement en plusieurs fois'; +$_MODULE['<{easytransac}prestashop>multiple_payments_794a84d799ba259008e1ab4da089b0ae'] = 'Payer en 2 fois'; +$_MODULE['<{easytransac}prestashop>multiple_payments_bb9be692a920f347a0273ab51442a61e'] = 'Payer en 3 fois'; +$_MODULE['<{easytransac}prestashop>multiple_payments_b9f4ca4ebe2f9bf614036cd5f8587171'] = 'Payer en 4 fois'; $_MODULE['<{easytransac}prestashop>oneclick_payment_95552c6d802066c1fc546b3f7fe7b1f7'] = 'Paiement en 1 clic'; $_MODULE['<{easytransac}prestashop>oneclick_payment_b22528f7f0c20d75a9a3f951a58dd72b'] = 'Sélectionnez une carte bancaire'; $_MODULE['<{easytransac}prestashop>oneclick_payment_8bd4837a76cf443ab523a51895e23c36'] = 'Payer maintenant'; $_MODULE['<{easytransac}prestashop>oneclick_payment_8fd89eaea3816dc99d21701581e0800a'] = 'Merci de patienter quelques instants ...'; -$_MODULE['<{easytransac}prestashop>admin_order_tab_44749712dbec183e983dcd78a7736c41'] = 'Date'; -$_MODULE['<{easytransac}prestashop>admin_order_tab_4c2a8fe7eaf24721cc7a9f0175115bd4'] = 'Message'; -$_MODULE['<{easytransac}prestashop>admin_order_tab_88427ec035734b45aae9f7d8859a5008'] = 'ID transaction'; -$_MODULE['<{easytransac}prestashop>admin_order_tab_b2f40690858b404ed10e62bdf422c704'] = 'Montant'; +$_MODULE['<{easytransac}prestashop>checkout_payment_67e796341942b590723681410200029f'] = 'Payez avec votre carte bancaire'; $_MODULE['<{easytransac}prestashop>error_a40cab5994f36d4c48103a22ca082e8f'] = 'Votre panier'; $_MODULE['<{easytransac}prestashop>error_1d7d452aefd53cb905743fdf611a9306'] = 'EasyTransac'; $_MODULE['<{easytransac}prestashop>error_f47106270a2928f350f357e255a2c2ac'] = 'Merci de contacter le marchand:'; diff --git a/vendor/autoload.php b/vendor/autoload.php index 7d47993..1c1f6e7 100644 --- a/vendor/autoload.php +++ b/vendor/autoload.php @@ -2,6 +2,11 @@ // autoload.php @generated by Composer +if (PHP_VERSION_ID < 50600) { + echo 'Composer 2.3.0 dropped support for autoloading on PHP <5.6 and you are running '.PHP_VERSION.', please upgrade PHP or use Composer 2.2 LTS via "composer self-update --2.2". Aborting.'.PHP_EOL; + exit(1); +} + require_once __DIR__ . '/composer/autoload_real.php'; return ComposerAutoloaderInit885adfb13f80d7aad1adc0abce42e2fa::getLoader(); diff --git a/vendor/composer/ClassLoader.php b/vendor/composer/ClassLoader.php index 0cd6055..afef3fa 100644 --- a/vendor/composer/ClassLoader.php +++ b/vendor/composer/ClassLoader.php @@ -149,7 +149,7 @@ public function getFallbackDirsPsr4() /** * @return string[] Array of classname => path - * @psalm-var array + * @psalm-return array */ public function getClassMap() { diff --git a/vendor/composer/InstalledVersions.php b/vendor/composer/InstalledVersions.php index d50e0c9..41bc143 100644 --- a/vendor/composer/InstalledVersions.php +++ b/vendor/composer/InstalledVersions.php @@ -21,6 +21,8 @@ * See also https://getcomposer.org/doc/07-runtime.md#installed-versions * * To require its presence, you can require `composer-runtime-api ^2.0` + * + * @final */ class InstalledVersions { diff --git a/vendor/composer/autoload_classmap.php b/vendor/composer/autoload_classmap.php index b26f1b1..0fb0a2c 100644 --- a/vendor/composer/autoload_classmap.php +++ b/vendor/composer/autoload_classmap.php @@ -2,7 +2,7 @@ // autoload_classmap.php @generated by Composer -$vendorDir = dirname(dirname(__FILE__)); +$vendorDir = dirname(__DIR__); $baseDir = dirname($vendorDir); return array( diff --git a/vendor/composer/autoload_namespaces.php b/vendor/composer/autoload_namespaces.php index b7fc012..15a2ff3 100644 --- a/vendor/composer/autoload_namespaces.php +++ b/vendor/composer/autoload_namespaces.php @@ -2,7 +2,7 @@ // autoload_namespaces.php @generated by Composer -$vendorDir = dirname(dirname(__FILE__)); +$vendorDir = dirname(__DIR__); $baseDir = dirname($vendorDir); return array( diff --git a/vendor/composer/autoload_psr4.php b/vendor/composer/autoload_psr4.php index 4c37026..6df4ce2 100644 --- a/vendor/composer/autoload_psr4.php +++ b/vendor/composer/autoload_psr4.php @@ -2,7 +2,7 @@ // autoload_psr4.php @generated by Composer -$vendorDir = dirname(dirname(__FILE__)); +$vendorDir = dirname(__DIR__); $baseDir = dirname($vendorDir); return array( diff --git a/vendor/composer/autoload_real.php b/vendor/composer/autoload_real.php index f5c96a1..5a5de9a 100644 --- a/vendor/composer/autoload_real.php +++ b/vendor/composer/autoload_real.php @@ -25,30 +25,11 @@ public static function getLoader() require __DIR__ . '/platform_check.php'; spl_autoload_register(array('ComposerAutoloaderInit885adfb13f80d7aad1adc0abce42e2fa', 'loadClassLoader'), true, true); - self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__))); + self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); spl_autoload_unregister(array('ComposerAutoloaderInit885adfb13f80d7aad1adc0abce42e2fa', 'loadClassLoader')); - $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); - if ($useStaticLoader) { - require __DIR__ . '/autoload_static.php'; - - call_user_func(\Composer\Autoload\ComposerStaticInit885adfb13f80d7aad1adc0abce42e2fa::getInitializer($loader)); - } else { - $map = require __DIR__ . '/autoload_namespaces.php'; - foreach ($map as $namespace => $path) { - $loader->set($namespace, $path); - } - - $map = require __DIR__ . '/autoload_psr4.php'; - foreach ($map as $namespace => $path) { - $loader->setPsr4($namespace, $path); - } - - $classMap = require __DIR__ . '/autoload_classmap.php'; - if ($classMap) { - $loader->addClassMap($classMap); - } - } + require __DIR__ . '/autoload_static.php'; + call_user_func(\Composer\Autoload\ComposerStaticInit885adfb13f80d7aad1adc0abce42e2fa::getInitializer($loader)); $loader->register(true); diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index da73710..539f9ab 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -2,17 +2,17 @@ "packages": [ { "name": "easytransac/easytransac-sdk-php", - "version": "1.3.0", - "version_normalized": "1.3.0.0", + "version": "1.3.2", + "version_normalized": "1.3.2.0", "source": { "type": "git", "url": "https://github.com/easytransac/easytransac-sdk-php.git", - "reference": "f464c796c4205a0e672fa5829ad13cfd26439583" + "reference": "e75c11c70bc7a9b742340047ceb73c4948812363" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/easytransac/easytransac-sdk-php/zipball/f464c796c4205a0e672fa5829ad13cfd26439583", - "reference": "f464c796c4205a0e672fa5829ad13cfd26439583", + "url": "https://api.github.com/repos/easytransac/easytransac-sdk-php/zipball/e75c11c70bc7a9b742340047ceb73c4948812363", + "reference": "e75c11c70bc7a9b742340047ceb73c4948812363", "shasum": "" }, "require": { @@ -22,7 +22,7 @@ "phpunit/phpunit": "^5", "squizlabs/php_codesniffer": "^3.6" }, - "time": "2021-11-22T11:07:05+00:00", + "time": "2022-04-25T09:57:58+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -39,7 +39,7 @@ "name": "Easytransac" } ], - "description": "A SDK to make payment with the EasyTransac API", + "description": "Easytransac payment gateway PHP SDK", "keywords": [ "easytransac", "php", @@ -47,7 +47,7 @@ ], "support": { "issues": "https://github.com/easytransac/easytransac-sdk-php/issues", - "source": "https://github.com/easytransac/easytransac-sdk-php/tree/1.3.0" + "source": "https://github.com/easytransac/easytransac-sdk-php/tree/1.3.2" }, "install-path": "../easytransac/easytransac-sdk-php" } diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php index 4c6af28..af04ec7 100644 --- a/vendor/composer/installed.php +++ b/vendor/composer/installed.php @@ -5,7 +5,7 @@ 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), - 'reference' => 'f734dec3cb16eaef5107d58f7d0ad88ee9ee7b78', + 'reference' => '665af4b720dfe1c4eed1d8a9a02c6550115c9d65', 'name' => '__root__', 'dev' => true, ), @@ -16,16 +16,16 @@ 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), - 'reference' => 'f734dec3cb16eaef5107d58f7d0ad88ee9ee7b78', + 'reference' => '665af4b720dfe1c4eed1d8a9a02c6550115c9d65', 'dev_requirement' => false, ), 'easytransac/easytransac-sdk-php' => array( - 'pretty_version' => '1.3.0', - 'version' => '1.3.0.0', + 'pretty_version' => '1.3.2', + 'version' => '1.3.2.0', 'type' => 'library', 'install_path' => __DIR__ . '/../easytransac/easytransac-sdk-php', 'aliases' => array(), - 'reference' => 'f464c796c4205a0e672fa5829ad13cfd26439583', + 'reference' => 'e75c11c70bc7a9b742340047ceb73c4948812363', 'dev_requirement' => false, ), ), diff --git a/vendor/easytransac/easytransac-sdk-php/.coveralls.yml b/vendor/easytransac/easytransac-sdk-php/.coveralls.yml deleted file mode 100644 index 011d5c2..0000000 --- a/vendor/easytransac/easytransac-sdk-php/.coveralls.yml +++ /dev/null @@ -1,3 +0,0 @@ -coverage_clover: tests/logs/clover.xml -json_path: tests/logs/coveralls-upload.json -service_name: travis-ci \ No newline at end of file diff --git a/vendor/easytransac/easytransac-sdk-php/.github/workflows/coverage-badge.yml b/vendor/easytransac/easytransac-sdk-php/.github/workflows/coverage-badge.yml new file mode 100644 index 0000000..351bf00 --- /dev/null +++ b/vendor/easytransac/easytransac-sdk-php/.github/workflows/coverage-badge.yml @@ -0,0 +1,28 @@ +name: PHP Unit coverage badge + +on: + # Run on all pushes and on all pull requests. + # Prevent the build from running when there are only irrelevant changes. + push: + paths-ignore: + - '**.md' + pull_request: + paths-ignore: + - '**.md' + # Allow manually triggering the workflow. + workflow_dispatch: + +jobs: + test: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: phpunit-coverage-badge + uses: timkrase/phpunit-coverage-badge@v1.2.0 + with: + push_badge: true + repo_token: ${{ secrets.GITHUB_TOKEN }} + diff --git a/vendor/easytransac/easytransac-sdk-php/.travis.yml b/vendor/easytransac/easytransac-sdk-php/.travis.yml deleted file mode 100644 index 1baefdb..0000000 --- a/vendor/easytransac/easytransac-sdk-php/.travis.yml +++ /dev/null @@ -1,16 +0,0 @@ -language: php - -php: - - 5.5 - - 5.6 - - 7.0 - -before_install: -- composer require phpunit/phpunit:4.8.* satooshi/php-coveralls:dev-master -- composer install --dev - -script: -- ./vendor/bin/phpunit --coverage-clover ./tests/logs/clover.xml tests/ - -after_script: -- php vendor/bin/coveralls -v diff --git a/vendor/easytransac/easytransac-sdk-php/README.md b/vendor/easytransac/easytransac-sdk-php/README.md index fbd1180..8ee5f77 100644 --- a/vendor/easytransac/easytransac-sdk-php/README.md +++ b/vendor/easytransac/easytransac-sdk-php/README.md @@ -4,7 +4,7 @@ EasyTransac SDK (PHP) [![Build](https://github.com/easytransac/easytransac-sdk-php/actions/workflows/build.yml/badge.svg)](https://github.com/easytransac/easytransac-sdk-php/actions/workflows/build.yml) [![PSR12](https://github.com/easytransac/easytransac-sdk-php/actions/workflows/psr12.yml/badge.svg)](https://github.com/easytransac/easytransac-sdk-php/actions/workflows/psr12.yml) [![Test](https://github.com/easytransac/easytransac-sdk-php/actions/workflows/test.yml/badge.svg)](https://github.com/easytransac/easytransac-sdk-php/actions/workflows/test.yml) -[![Coverage Status](https://coveralls.io/repos/github/easytransac/easytransac-sdk-php/badge.svg?branch=master)](https://coveralls.io/github/easytransac/easytransac-sdk-php?branch=master) +[![Coverage Status](https://github.com/easytransac/easytransac-sdk-php/blob/code_quality/coverage_badge.svg?branch=code_quality)](https://github.com/easytransac/easytransac-sdk-php/actions/workflows/coverage-badge.yml) [![Latest Stable Version](https://poser.pugx.org/easytransac/easytransac-sdk-php/version)](https://packagist.org/packages/easytransac/easytransac-sdk-php) Make your EasyTransac API implementation easier with our SDK. diff --git a/vendor/easytransac/easytransac-sdk-php/clover.xml b/vendor/easytransac/easytransac-sdk-php/clover.xml new file mode 100644 index 0000000..2912b90 --- /dev/null +++ b/vendor/easytransac/easytransac-sdk-php/clover.xml @@ -0,0 +1,2023 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/vendor/easytransac/easytransac-sdk-php/composer.json b/vendor/easytransac/easytransac-sdk-php/composer.json index b5e268b..6712cd9 100644 --- a/vendor/easytransac/easytransac-sdk-php/composer.json +++ b/vendor/easytransac/easytransac-sdk-php/composer.json @@ -1,6 +1,6 @@ { "name": "easytransac/easytransac-sdk-php", - "description": "A SDK to make payment with the EasyTransac API", + "description": "Easytransac payment gateway PHP SDK", "keywords": [ "easytransac", "php", @@ -17,12 +17,12 @@ } ], "autoload": { - "psr-4": { - "EasyTransac\\": "sdk/EasyTransac/" - } + "psr-4": { + "EasyTransac\\": "sdk/EasyTransac/" + } }, "require-dev": { "squizlabs/php_codesniffer": "^3.6", "phpunit/phpunit": "^5" } -} +} \ No newline at end of file diff --git a/vendor/easytransac/easytransac-sdk-php/composer.lock b/vendor/easytransac/easytransac-sdk-php/composer.lock index 8c2354c..c40bbe6 100644 --- a/vendor/easytransac/easytransac-sdk-php/composer.lock +++ b/vendor/easytransac/easytransac-sdk-php/composer.lock @@ -1591,4 +1591,4 @@ }, "platform-dev": [], "plugin-api-version": "2.1.0" -} +} \ No newline at end of file diff --git a/vendor/easytransac/easytransac-sdk-php/coverage_badge.svg b/vendor/easytransac/easytransac-sdk-php/coverage_badge.svg new file mode 100644 index 0000000..394e227 --- /dev/null +++ b/vendor/easytransac/easytransac-sdk-php/coverage_badge.svg @@ -0,0 +1,16 @@ + + + + + + + + + coverage + coverage + + + 3 % + 3 % + + \ No newline at end of file diff --git a/vendor/easytransac/easytransac-sdk-php/phpunit.xml b/vendor/easytransac/easytransac-sdk-php/phpunit.xml new file mode 100644 index 0000000..f348ac5 --- /dev/null +++ b/vendor/easytransac/easytransac-sdk-php/phpunit.xml @@ -0,0 +1,16 @@ + + + + + ./tests + + + + + ./sdk + + + + + + \ No newline at end of file diff --git a/vendor/easytransac/easytransac-sdk-php/sdk/EasyTransac/Core/Services.php b/vendor/easytransac/easytransac-sdk-php/sdk/EasyTransac/Core/Services.php index d8d0db5..75c7a13 100644 --- a/vendor/easytransac/easytransac-sdk-php/sdk/EasyTransac/Core/Services.php +++ b/vendor/easytransac/easytransac-sdk-php/sdk/EasyTransac/Core/Services.php @@ -173,6 +173,7 @@ public function call($funcName, array &$params) $target = $this->url . $funcName; } + $params['Version'] = 'easytransac-sdk-php.v1.3.1'; $params['Signature'] = Security::getSignature($params, $this->key); Logger::getInstance()->write('Called url: ' . $target); diff --git a/vendor/easytransac/easytransac-sdk-php/sdk/EasyTransac/Entities/Notification.php b/vendor/easytransac/easytransac-sdk-php/sdk/EasyTransac/Entities/Notification.php index 447c44d..03a7457 100644 --- a/vendor/easytransac/easytransac-sdk-php/sdk/EasyTransac/Entities/Notification.php +++ b/vendor/easytransac/easytransac-sdk-php/sdk/EasyTransac/Entities/Notification.php @@ -68,6 +68,120 @@ class Notification extends Entity /** @map:Error **/ protected $error = null; + /** @map:AmountRefund **/ + protected $amountRefund = null; + + /** @map:RequestAttempt **/ + protected $requestAttempt = null; + + /** @map:PaymentMethod **/ + protected $paymentMethod = null; + + /** @map:UserId **/ + protected $userId = null; + + /** @map:Description **/ + protected $description = null; + + /** @map:DateRefund **/ + protected $dateRefund = null; + + /** @map:CurrencyText **/ + protected $currencyText = null; + + /** @map:CurrencySymbol **/ + protected $currencySymbol = null; + + /** @map:FeesPercent **/ + protected $feesPercent = null; + + /** @map:FeesFixedPart **/ + protected $feesFixedPart = null; + + /** @map:CardCountry **/ + protected $cardCountry = null; + + /** @map:CardMonth **/ + protected $cardMonth = null; + + /** @map:CardYear **/ + protected $cardYear = null; + + /** @map:ApplicationType **/ + protected $applicationType = null; + + /** @map:OriginalRequestId **/ + protected $originalRequestId = null; + + /** @map:OriginalPaymentTid **/ + protected $originalPaymentTid = null; + + /** @map:DateChargeback **/ + protected $dateChargeback = null; + + /** @map:DateRepresentment **/ + protected $dateRepresentment = null; + + /** @map:AmountPreAuth **/ + protected $amountPreAuth = null; + + /** @map:ClientIP **/ + protected $clientIP = null; + + /** @map:ClientIPCountry **/ + protected $clientIPCountry = null; + + /** @map:PreAuth **/ + protected $preAuth = null; + + /** @map:B2B **/ + protected $b2b = null; + + /** @map:CardType **/ + protected $cardType = null; + + /** @map:MultiplePayments **/ + protected $multiplePayments = null; + + /** @map:MultiplePaymentsStatus **/ + protected $multiplePaymentsStatus = null; + + /** @map:MultiplePaymentsRecurrence **/ + protected $multiplePaymentsRecurrence = null; + + /** @map:MultiplePaymentsRepeat **/ + protected $multiplePaymentsRepeat = null; + + /** @map:MultiplePaymentsCount **/ + protected $multiplePaymentsCount = null; + + /** @map:RebillStatus **/ + protected $rebillStatus = null; + + /** @map:RebillRecurrence **/ + protected $rebillRecurrence = null; + + /** @map:RebillCount **/ + protected $rebillCount = null; + + /** @map:AdditionalError **/ + protected $additionalError = null; + + /** @map:3DSecureUrl **/ + protected $secureUrl = null; + + /** @map:MandateUrl **/ + protected $mandateUrl = null; + + /** @map:RedirectUrl **/ + protected $redirectUrl = null; + + /** @map:QRCodeImage **/ + protected $qrCodeImage = null; + + /** @map:QRCodeUrl **/ + protected $qrCodeUrl = null; + public function getNotificationType() { return $this->notificationType; @@ -167,4 +281,194 @@ public function getError() { return $this->error; } + + public function getAmountRefund() + { + return $this->amountRefund; + } + + public function getRequestAttempt() + { + return $this->requestAttempt; + } + + public function getPaymentMethod() + { + return $this->paymentMethod; + } + + public function getUserId() + { + return $this->userId; + } + + public function getDescription() + { + return $this->description; + } + + public function getDateRefund() + { + return $this->dateRefund; + } + + public function getCurrencyText() + { + return $this->currencyText; + } + + public function getCurrencySymbol() + { + return $this->currencySymbol; + } + + public function getFeesPercent() + { + return $this->feesPercent; + } + + public function getFeesFixedPart() + { + return $this->feesFixedPart; + } + + public function getCardCountry() + { + return $this->cardCountry; + } + + public function getCardMonth() + { + return $this->cardMonth; + } + + public function getCardYear() + { + return $this->cardYear; + } + + public function getApplicationType() + { + return $this->applicationType; + } + + public function getOriginalRequestId() + { + return $this->originalRequestId; + } + + public function getOriginalPaymentTid() + { + return $this->originalPaymentTid; + } + + public function getDateChargeback() + { + return $this->dateChargeback; + } + + public function getDateRepresentment() + { + return $this->dateRepresentment; + } + + public function getAmountPreAuth() + { + return $this->amountPreAuth; + } + + public function getClientIP() + { + return $this->clientIP; + } + + public function getClientIPCountry() + { + return $this->clientIPCountry; + } + + public function getPreAuth() + { + return $this->preAuth; + } + + public function getB2b() + { + return $this->b2b; + } + + public function getCardType() + { + return $this->cardType; + } + + public function getMultiplePayments() + { + return $this->multiplePayments; + } + + public function getMultiplePaymentsStatus() + { + return $this->multiplePaymentsStatus; + } + + public function getMultiplePaymentsRecurrence() + { + return $this->multiplePaymentsRecurrence; + } + + public function getMultiplePaymentsRepeat() + { + return $this->multiplePaymentsRepeat; + } + + public function getMultiplePaymentsCount() + { + return $this->multiplePaymentsCount; + } + + public function getRebillStatus() + { + return $this->rebillStatus; + } + + public function getRebillRecurrence() + { + return $this->rebillRecurrence; + } + + public function getRebillCount() + { + return $this->rebillCount; + } + + public function getAdditionalError() + { + return $this->additionalError; + } + + public function getSecureUrl() + { + return $this->secureUrl; + } + + public function getMandateUrl() + { + return $this->mandateUrl; + } + + public function getRedirectUrl() + { + return $this->redirectUrl; + } + + public function getQrCodeImage() + { + return $this->qrCodeImage; + } + + public function getQrCodeUrl() + { + return $this->qrCodeUrl; + } }