Plugin Directory

Changeset 3181756


Ignore:
Timestamp:
11/04/2024 07:28:49 PM (17 months ago)
Author:
bycoders
Message:

Update to version 1.5.7 from GitHub

Location:
paypal-brasil-para-woocommerce
Files:
288 added
26 edited
1 copied

Legend:

Unmodified
Added
Removed
  • paypal-brasil-para-woocommerce/tags/1.5.7/includes/api/class-paypal-orders-api-v2.php

    r3067781 r3181756  
    2424        'shortcut' => 'WooCommerceBrazil_Ecom_ECS',
    2525        'plus' => 'WooCommerceBR_Ecom_PPPlus',
     26        'bcdc' => 'WooCommerceBrazil_Ecom_BCDC',
    2627        'default' => 'WooCommerceBrazil_Ecom_EC',
    2728    );
  • paypal-brasil-para-woocommerce/tags/1.5.7/includes/class-wc-paypal-logger.php

    r3122166 r3181756  
    11<?php
    22
    3 if ( ! defined( 'ABSPATH' ) ) {
     3if (!defined('ABSPATH')) {
    44    exit;
    55}
     6
     7use GuzzleHttp\Client;
     8
    69/**
    710 * Utilize WC logger class
     
    1013 * @version 1.0.0
    1114 */
    12 class WC_PAYPAL_LOGGER {
     15class WC_PAYPAL_LOGGER
     16{
    1317    /**
    1418     * Add a log entry.
     
    1620     * @param string $message Log message.
    1721     */
    18     public static function log( $message, $gateway_id ) {
    19         if ( ! class_exists( 'WC_Logger' ) ) {
     22    public static function log($message, $gateway_id, string $level = 'info', array $extra = array())
     23    {
     24        if (!class_exists('WC_Logger')) {
    2025            return;
    2126        }
    2227
    23         $options     = get_option( "woocommerce_{$gateway_id}_settings" );
     28        $options = get_option("woocommerce_{$gateway_id}_settings");
    2429
    25         if ( empty( $options ) || ( isset( $options['debug'] ) && 'yes' !== $options['debug'] ) ) {
     30        if (empty($options) || (isset($options['debug']) && 'yes' !== $options['debug'])) {
    2631            return;
    2732        }
    2833
    29         $logger = wc_get_logger();
    30         $context = array( 'source' => $gateway_id );
     34        $wc_logger = wc_get_logger();
     35        $context = array('source' => $gateway_id);
    3136
    32         $log_message  = PHP_EOL . '==== Paypal Brasil para woocommerce Version: ' . PAYPAL_PAYMENTS_VERSION . ' ====' . PHP_EOL;
     37        $log_message = PHP_EOL . '==== Paypal Brasil para woocommerce Version: ' . PAYPAL_PAYMENTS_VERSION . ' ====' . PHP_EOL;
    3338        $log_message .= PHP_EOL;
    3439        $log_message .= '=== Start Log ===' . PHP_EOL;
     
    3742        $log_message .= PHP_EOL;
    3843
    39         $logger->debug( $log_message, $context );
     44        $wc_logger->debug($log_message, $context);
     45        // Enviar para o Datadog somente se for um log de erro ou critico, ou contiver palavras específicas
     46        $datadog_api_key = self::getDatadogApiKey();
     47        if ($datadog_api_key && ($level === 'warning' || $level === 'error' || strpos($message, 'ALERT') !== false)) {
     48
     49            try {
     50                $client = new Client([
     51                    'base_uri' => 'https://http-intake.logs.datadoghq.com/',
     52                ]);
     53
     54                $obj = new self();
     55
     56                // Dados do log em JSON
     57                $logData = [
     58                    "ddsource" => "paypal-woocommerce",
     59                    "ddtags" => "site_name:" . get_bloginfo("name") . "," . "plugin_version:" . PAYPAL_PAYMENTS_VERSION,
     60                    "gateway" => $gateway_id,
     61                    "message" => $message,
     62                    "service" => "paypal-woocommerce",
     63                    "status" => $level,
     64                    "hostname" => home_url(),
     65                    "version" => PAYPAL_PAYMENTS_VERSION,
     66                    "body" => array($obj->filterData($extra))
     67                ];
     68
     69                $wc_logger->debug(json_encode($logData), $context);
     70
     71
     72                $client->post("api/v2/logs", [
     73                    'headers' => [
     74                        'Content-Type' => 'application/json',
     75                        'Accept' => 'application/json',
     76                        'DD-API-KEY' => $datadog_api_key
     77                    ],
     78                    'json' => $logData,
     79                ]);
     80            } catch (\Throwable $th) {
     81                return;
     82            }
     83
     84
     85        }
     86    }
     87
     88
     89    /**
     90     * Filter and hide sensitive data fields.
     91     *
     92     * @param array $data
     93     * @param array $fieldsToMask
     94     * @return array Array with data filter result.
     95     */
     96    function filterData(array $data): array
     97    {
     98        $fieldsToMask = ["address_line_1", "address_line_2", "admin_area_1", "admin_area_2", "country_code", "postal_code", "email_address", "surname", "national_number", "tax_id", "tax_id_type", "email", "full_name", "document", "documentType", "phone"];
     99        foreach ($data as $key => &$value) {
     100            // Se a chave estiver na lista de campos para mascarar e o valor for uma string, aplique a máscara
     101            if (in_array($key, $fieldsToMask) && is_string($value)) {
     102                $value = $this->maskString($value);
     103            }
     104
     105            // Se o valor for um array, aplique a função recursivamente
     106            if (is_array($value)) {
     107                $value = $this->filterData($value);
     108            }
     109        }
     110
     111        return $data;
     112    }
     113
     114
     115    /**
     116     * Replaces the value of the string with asterisks
     117     *
     118     * @param string $string
     119     * @return string
     120     */
     121    function maskString($string): string
     122    {
     123        $length = strlen($string);
     124
     125        if ($length <= 4) {
     126            return str_repeat('*', $length);
     127        }
     128
     129        return substr($string, 0, 2) . str_repeat('*', $length - 4) . substr($string, -2);
     130    }
     131
     132    private static function getDatadogApiKey()
     133    {
     134        return file_get_contents(__DIR__ . '/2892C90D7360927BD664E7506B5DD4607964BBA775550540AE697D26B5B23725.bin');
    40135    }
    41136}
  • paypal-brasil-para-woocommerce/tags/1.5.7/includes/payment-methods/class-paypal-brasil-bcdc-gateway.php

    r3175030 r3181756  
    11<?php
     2
     3use function PHPUnit\Framework\isEmpty;
    24
    35// Ignore if access directly.
    46if (!defined('ABSPATH')) {
    57    exit;
     8}
     9
     10if ( ! class_exists( 'WC_PAYPAL_LOGGER' ) ) {
     11    require_once plugin_dir_path( __FILE__ ) . '../class-wc-paypal-logger.php';
    612}
    713
     
    569575
    570576            // Get the payment from PayPal
    571             $order_paypal_data = $this->api->get_payment($paypal_order_id);
     577            $order_paypal_data = $this->api->get_payment($paypal_order_id,array(),'bcdc');
    572578
    573579            // Check if the payment id
     
    603609            $sale = $this->execute_payment($order, $paypal_order_id);
    604610
    605             $order_paypal_data = $this->api->get_payment($paypal_order_id);
     611            $order_paypal_data = $this->api->get_payment($paypal_order_id,array(),'bcdc');
    606612
    607613            $installments_term = intval($order_paypal_data['credit_financing_offer']['term']);
     
    790796            try {
    791797
    792                 $order_paypal_data = $this->api->get_payment($order_paypal_id);
     798                $order_paypal_data = $this->api->get_payment($order_paypal_id,array(),'bcdc');
    793799
    794800                $capture_id = $order_paypal_data['purchase_units'][0]['payments']['captures'][0]['id'];
     
    10031009            if (!$only_digital_items) {
    10041010
    1005                 if (isset($shipping_method) && $shipping_method == 'local_pickup') {
     1011                if (isset($shipping_method) && strpos($shipping_method, 'local_pickup') === 0) {
     1012
     1013                    $shipping_address = $this->get_payer_address($data);
    10061014
    10071015                    $shipping = array(
     
    10101018                            'name' => array(
    10111019                                'full_name' => $data['first_name'] . " " . $data['last_name'],
    1012                             )
     1020                            ),
    10131021                        )
    10141022                    );
     1023                    WC_PAYPAL_LOGGER::log("Validate addresss" . json_encode($shipping_address) . "\n Validação: " . json_encode($this->validate_address($shipping_address)), $this->id);
     1024                    if ($this->validate_address($shipping_address)) {
     1025                        $shipping['shipping']['address'] = $shipping_address;
     1026                        $payment_data['payment_source']['paypal']['address'] = $shipping_address;
     1027                    }
    10151028
    10161029                    $payment_data['payment_source']['paypal']['experience_context']['shipping_preference'] = 'NO_SHIPPING';
     
    10191032                } else {
    10201033
    1021 
    10221034                    $shipping_address = $this->get_payer_address($data);
    1023 
     1035                    $shipping = array(
     1036                        'shipping' => array(
     1037                            'type' => 'SHIPPING',
     1038                            'name' => array(
     1039                                'full_name' => $data['first_name'] . " " . $data['last_name'],
     1040                            ),
     1041                            //'address' => $shipping_address
     1042                        )
     1043                    );
     1044
     1045                    //If address is invalid, the shipping is not send to create_order by is not permited when shipping reference is SET_PROVIDED_ADDRESS
    10241046                    if ($this->validate_address($shipping_address)) {
    1025                         $shipping = array(
    1026                             'shipping' => array(
    1027                                 'type' => 'SHIPPING',
    1028                                 'name' => array(
    1029                                     'full_name' => $data['first_name'] . " " . $data['last_name'],
    1030                                 ),
    1031                                 'address' => $shipping_address
    1032                             )
    1033                         );
    1034 
     1047
     1048                        $shipping['shipping']['address'] = $shipping_address;
    10351049                        $payment_data['payment_source']['paypal']['address'] = $shipping_address;
    1036 
    1037                         $payment_data['purchase_units'][0] = array_merge($payment_data['purchase_units'][0], $shipping);
     1050                        $payment_data['payment_source']['paypal']['experience_context']['shipping_preference'] = 'SET_PROVIDED_ADDRESS';
     1051
    10381052                    }
    10391053
    1040 
    1041 
    1042                     $payment_data['payment_source']['paypal']['experience_context']['shipping_preference'] = 'SET_PROVIDED_ADDRESS';
     1054                    $payment_data['purchase_units'][0] = array_merge($payment_data['purchase_units'][0], $shipping);
    10431055
    10441056                }
     
    10481060        }
    10491061
    1050         $payment_data['payment_source']['paypal'] = $this->get_payer_info($data);
    1051 
    1052    
     1062        if ($payment_data['payment_source']['paypal']) {
     1063            $payment_data['payment_source']['paypal'] = array_merge($payment_data['payment_source']['paypal'], $this->get_payer_info($data));
     1064        } else {
     1065            $payment_data['payment_source']['paypal'] = array();
     1066            $payment_data['payment_source']['paypal'] = array_merge($payment_data['payment_source']['paypal'], $this->get_payer_info($data));
     1067        }
    10531068
    10541069        //Capture item on the cart;
     
    10771092        try {
    10781093
    1079             if(!$this->currency_is_allowed()){
    1080                 throw new Exception(__('Payment not allowed in this currency. Contact store support.', "paypal-brasil-para-woocommerce"));;
     1094            if (!$this->currency_is_allowed()) {
     1095                throw new Exception(__('Payment not allowed in this currency. Contact store support.', "paypal-brasil-para-woocommerce"));
     1096                ;
    10811097            }
    10821098
    10831099            // Create the payment.
    10841100            $result = $this->api->create_payment($payment_data, array(), 'bcdc');
     1101
     1102            if (!isset($result['payment_source']['paypal']['address']) || !isset($result['payer']['address'])) {
     1103                WC_PAYPAL_LOGGER::log("Order created without address!", $this->id, "warning", $result);
     1104            }
     1105
    10851106            return $result;
    10861107        } catch (PayPal_Brasil_API_Exception $ex) { // Catch any PayPal error.
     
    10931114
    10941115        $error_message = str_replace('"', '', $error_data['message']);
    1095         $debug_id   = str_replace('"', '', $error_data['debug_id']);
     1116        $debug_id = str_replace('"', '', $error_data['debug_id']);
    10961117        $exception = new Exception(__("Ocorreu um erro, no CREATE_ORDER, \n
    10971118                                                Mensagem original: {$error_message} \n
     
    11841205            if (!$only_digital_items) {
    11851206
    1186                 if (isset($shipping_method) && $shipping_method == 'local_pickup') {
     1207                if (isset($shipping_method) && strpos($shipping_method, 'local_pickup') === 0) {
    11871208
    11881209                    $shipping = array(
     
    12981319        // Add the address
    12991320        if ($data['address']) {
    1300             //$address_line_1[] = $data['address'];
     1321            $address_line_1[] = $data['address'];
    13011322        }
    13021323        // Add the number
     
    13311352
    13321353    public function validate_address(array $data): bool{
    1333         $adressFields = ['address', 'number','neighborhood', 'address_2','state', 'city', 'postcode', 'country','address_line_1','address_line_2'];
     1354        $adressFields = ['address_line_1','address_line_2','admin_area_1', 'admin_area_2','postal_code', 'country_code'];
    13341355        $isValid = true;
    13351356        foreach ($adressFields as $value) {
    1336             if (!isset($data[$value])) {
     1357            if (!isset($data[$value]) || empty($data[$value])) {
    13371358                $isValid = false;
    13381359            }
  • paypal-brasil-para-woocommerce/tags/1.5.7/paypal-brasil-para-woocommerce.php

    r3175030 r3181756  
    44 * Plugin Name: PayPal Brasil para WooCommerce
    55 * Description: Adicione facilmente opções de pagamento do PayPal à sua loja do WooCommerce.
    6  * Version: 1.5.6
     6 * Version: 1.5.7
    77 * Author: PayPal
    88 * Author URI: https://paypal.com.br
     
    3030    // Define files.
    3131    define( 'PAYPAL_PAYMENTS_MAIN_FILE', __FILE__ );
    32     define( 'PAYPAL_PAYMENTS_VERSION', '1.5.6' );
     32    define( 'PAYPAL_PAYMENTS_VERSION', '1.5.7' );
    3333    define('WC_PAYPAL_PLUGIN_SLUG','paypal-brasil-para-woocommerce');
    3434
  • paypal-brasil-para-woocommerce/tags/1.5.7/readme.txt

    r3175030 r3181756  
    55Requires at least: 4.4
    66Tested up to: 6.6.1
    7 Stable tag: 1.5.6
     7Stable tag: 1.5.7
    88Requires PHP: 7.0
    99License: GPLv2 or later
     
    9090
    9191== Changelog ==
     92
     93= 1.5.7 =
     94* Improvement logs.
     95* Fixed error on create order.
    9296
    9397= 1.5.6 =
     
    230234== Upgrade Notice ==
    231235
    232 = 1.5.6 =
    233 * Enhanced error messages for better clarity.
     236= 1.5.7 =
     237* Improvement logs.
     238* Fixed error on create order.
    234239
    235240== Screenshots ==
  • paypal-brasil-para-woocommerce/tags/1.5.7/vendor/autoload.php

    r3129049 r3181756  
    2323require_once __DIR__ . '/composer/autoload_real.php';
    2424
    25 return ComposerAutoloaderInit597ddb1bf69cb8237d7e45d28c09300c::getLoader();
     25return ComposerAutoloaderInitf793034287c6bf49f2f80fcc63828be4::getLoader();
  • paypal-brasil-para-woocommerce/tags/1.5.7/vendor/composer/autoload_files.php

    r3129049 r3181756  
    88return array(
    99    '7b11c4dc42b3b3023073cb14e519683c' => $vendorDir . '/ralouphie/getallheaders/src/getallheaders.php',
     10    '6e3fae29631ef280660b3cdad06f25a8' => $vendorDir . '/symfony/deprecation-contracts/function.php',
     11    '37a3dc5111fe8f707ab4c132ef1dbc62' => $vendorDir . '/guzzlehttp/guzzle/src/functions_include.php',
    1012);
  • paypal-brasil-para-woocommerce/tags/1.5.7/vendor/composer/autoload_psr4.php

    r3129049 r3181756  
    77
    88return array(
     9    'Psr\\Http\\Message\\' => array($vendorDir . '/psr/http-factory/src', $vendorDir . '/psr/http-message/src'),
     10    'Psr\\Http\\Client\\' => array($vendorDir . '/psr/http-client/src'),
     11    'GuzzleHttp\\Psr7\\' => array($vendorDir . '/guzzlehttp/psr7/src'),
     12    'GuzzleHttp\\Promise\\' => array($vendorDir . '/guzzlehttp/promises/src'),
     13    'GuzzleHttp\\' => array($vendorDir . '/guzzlehttp/guzzle/src'),
    914);
  • paypal-brasil-para-woocommerce/tags/1.5.7/vendor/composer/autoload_real.php

    r3129049 r3181756  
    33// autoload_real.php @generated by Composer
    44
    5 class ComposerAutoloaderInit597ddb1bf69cb8237d7e45d28c09300c
     5class ComposerAutoloaderInitf793034287c6bf49f2f80fcc63828be4
    66{
    77    private static $loader;
     
    2525        require __DIR__ . '/platform_check.php';
    2626
    27         spl_autoload_register(array('ComposerAutoloaderInit597ddb1bf69cb8237d7e45d28c09300c', 'loadClassLoader'), true, true);
     27        spl_autoload_register(array('ComposerAutoloaderInitf793034287c6bf49f2f80fcc63828be4', 'loadClassLoader'), true, true);
    2828        self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
    29         spl_autoload_unregister(array('ComposerAutoloaderInit597ddb1bf69cb8237d7e45d28c09300c', 'loadClassLoader'));
     29        spl_autoload_unregister(array('ComposerAutoloaderInitf793034287c6bf49f2f80fcc63828be4', 'loadClassLoader'));
    3030
    3131        require __DIR__ . '/autoload_static.php';
    32         call_user_func(\Composer\Autoload\ComposerStaticInit597ddb1bf69cb8237d7e45d28c09300c::getInitializer($loader));
     32        call_user_func(\Composer\Autoload\ComposerStaticInitf793034287c6bf49f2f80fcc63828be4::getInitializer($loader));
    3333
    3434        $loader->register(true);
    3535
    36         $filesToLoad = \Composer\Autoload\ComposerStaticInit597ddb1bf69cb8237d7e45d28c09300c::$files;
     36        $filesToLoad = \Composer\Autoload\ComposerStaticInitf793034287c6bf49f2f80fcc63828be4::$files;
    3737        $requireFile = static function ($fileIdentifier, $file) {
    3838            if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
  • paypal-brasil-para-woocommerce/tags/1.5.7/vendor/composer/autoload_static.php

    r3129049 r3181756  
    55namespace Composer\Autoload;
    66
    7 class ComposerStaticInit597ddb1bf69cb8237d7e45d28c09300c
     7class ComposerStaticInitf793034287c6bf49f2f80fcc63828be4
    88{
    99    public static $files = array (
    1010        '7b11c4dc42b3b3023073cb14e519683c' => __DIR__ . '/..' . '/ralouphie/getallheaders/src/getallheaders.php',
     11        '6e3fae29631ef280660b3cdad06f25a8' => __DIR__ . '/..' . '/symfony/deprecation-contracts/function.php',
     12        '37a3dc5111fe8f707ab4c132ef1dbc62' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/functions_include.php',
     13    );
     14
     15    public static $prefixLengthsPsr4 = array (
     16        'P' =>
     17        array (
     18            'Psr\\Http\\Message\\' => 17,
     19            'Psr\\Http\\Client\\' => 16,
     20        ),
     21        'G' =>
     22        array (
     23            'GuzzleHttp\\Psr7\\' => 16,
     24            'GuzzleHttp\\Promise\\' => 19,
     25            'GuzzleHttp\\' => 11,
     26        ),
     27    );
     28
     29    public static $prefixDirsPsr4 = array (
     30        'Psr\\Http\\Message\\' =>
     31        array (
     32            0 => __DIR__ . '/..' . '/psr/http-factory/src',
     33            1 => __DIR__ . '/..' . '/psr/http-message/src',
     34        ),
     35        'Psr\\Http\\Client\\' =>
     36        array (
     37            0 => __DIR__ . '/..' . '/psr/http-client/src',
     38        ),
     39        'GuzzleHttp\\Psr7\\' =>
     40        array (
     41            0 => __DIR__ . '/..' . '/guzzlehttp/psr7/src',
     42        ),
     43        'GuzzleHttp\\Promise\\' =>
     44        array (
     45            0 => __DIR__ . '/..' . '/guzzlehttp/promises/src',
     46        ),
     47        'GuzzleHttp\\' =>
     48        array (
     49            0 => __DIR__ . '/..' . '/guzzlehttp/guzzle/src',
     50        ),
    1151    );
    1252
     
    1858    {
    1959        return \Closure::bind(function () use ($loader) {
    20             $loader->classMap = ComposerStaticInit597ddb1bf69cb8237d7e45d28c09300c::$classMap;
     60            $loader->prefixLengthsPsr4 = ComposerStaticInitf793034287c6bf49f2f80fcc63828be4::$prefixLengthsPsr4;
     61            $loader->prefixDirsPsr4 = ComposerStaticInitf793034287c6bf49f2f80fcc63828be4::$prefixDirsPsr4;
     62            $loader->classMap = ComposerStaticInitf793034287c6bf49f2f80fcc63828be4::$classMap;
    2163
    2264        }, null, ClassLoader::class);
  • paypal-brasil-para-woocommerce/tags/1.5.7/vendor/composer/installed.json

    r3129049 r3181756  
    11{
    22    "packages": [
     3        {
     4            "name": "guzzlehttp/guzzle",
     5            "version": "7.9.2",
     6            "version_normalized": "7.9.2.0",
     7            "source": {
     8                "type": "git",
     9                "url": "https://github.com/guzzle/guzzle.git",
     10                "reference": "d281ed313b989f213357e3be1a179f02196ac99b"
     11            },
     12            "dist": {
     13                "type": "zip",
     14                "url": "https://api.github.com/repos/guzzle/guzzle/zipball/d281ed313b989f213357e3be1a179f02196ac99b",
     15                "reference": "d281ed313b989f213357e3be1a179f02196ac99b",
     16                "shasum": ""
     17            },
     18            "require": {
     19                "ext-json": "*",
     20                "guzzlehttp/promises": "^1.5.3 || ^2.0.3",
     21                "guzzlehttp/psr7": "^2.7.0",
     22                "php": "^7.2.5 || ^8.0",
     23                "psr/http-client": "^1.0",
     24                "symfony/deprecation-contracts": "^2.2 || ^3.0"
     25            },
     26            "provide": {
     27                "psr/http-client-implementation": "1.0"
     28            },
     29            "require-dev": {
     30                "bamarni/composer-bin-plugin": "^1.8.2",
     31                "ext-curl": "*",
     32                "guzzle/client-integration-tests": "3.0.2",
     33                "php-http/message-factory": "^1.1",
     34                "phpunit/phpunit": "^8.5.39 || ^9.6.20",
     35                "psr/log": "^1.1 || ^2.0 || ^3.0"
     36            },
     37            "suggest": {
     38                "ext-curl": "Required for CURL handler support",
     39                "ext-intl": "Required for Internationalized Domain Name (IDN) support",
     40                "psr/log": "Required for using the Log middleware"
     41            },
     42            "time": "2024-07-24T11:22:20+00:00",
     43            "type": "library",
     44            "extra": {
     45                "bamarni-bin": {
     46                    "bin-links": true,
     47                    "forward-command": false
     48                }
     49            },
     50            "installation-source": "dist",
     51            "autoload": {
     52                "files": [
     53                    "src/functions_include.php"
     54                ],
     55                "psr-4": {
     56                    "GuzzleHttp\\": "src/"
     57                }
     58            },
     59            "notification-url": "https://packagist.org/downloads/",
     60            "license": [
     61                "MIT"
     62            ],
     63            "authors": [
     64                {
     65                    "name": "Graham Campbell",
     66                    "email": "hello@gjcampbell.co.uk",
     67                    "homepage": "https://github.com/GrahamCampbell"
     68                },
     69                {
     70                    "name": "Michael Dowling",
     71                    "email": "mtdowling@gmail.com",
     72                    "homepage": "https://github.com/mtdowling"
     73                },
     74                {
     75                    "name": "Jeremy Lindblom",
     76                    "email": "jeremeamia@gmail.com",
     77                    "homepage": "https://github.com/jeremeamia"
     78                },
     79                {
     80                    "name": "George Mponos",
     81                    "email": "gmponos@gmail.com",
     82                    "homepage": "https://github.com/gmponos"
     83                },
     84                {
     85                    "name": "Tobias Nyholm",
     86                    "email": "tobias.nyholm@gmail.com",
     87                    "homepage": "https://github.com/Nyholm"
     88                },
     89                {
     90                    "name": "Márk Sági-Kazár",
     91                    "email": "mark.sagikazar@gmail.com",
     92                    "homepage": "https://github.com/sagikazarmark"
     93                },
     94                {
     95                    "name": "Tobias Schultze",
     96                    "email": "webmaster@tubo-world.de",
     97                    "homepage": "https://github.com/Tobion"
     98                }
     99            ],
     100            "description": "Guzzle is a PHP HTTP client library",
     101            "keywords": [
     102                "client",
     103                "curl",
     104                "framework",
     105                "http",
     106                "http client",
     107                "psr-18",
     108                "psr-7",
     109                "rest",
     110                "web service"
     111            ],
     112            "support": {
     113                "issues": "https://github.com/guzzle/guzzle/issues",
     114                "source": "https://github.com/guzzle/guzzle/tree/7.9.2"
     115            },
     116            "funding": [
     117                {
     118                    "url": "https://github.com/GrahamCampbell",
     119                    "type": "github"
     120                },
     121                {
     122                    "url": "https://github.com/Nyholm",
     123                    "type": "github"
     124                },
     125                {
     126                    "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/guzzle",
     127                    "type": "tidelift"
     128                }
     129            ],
     130            "install-path": "../guzzlehttp/guzzle"
     131        },
     132        {
     133            "name": "guzzlehttp/promises",
     134            "version": "2.0.4",
     135            "version_normalized": "2.0.4.0",
     136            "source": {
     137                "type": "git",
     138                "url": "https://github.com/guzzle/promises.git",
     139                "reference": "f9c436286ab2892c7db7be8c8da4ef61ccf7b455"
     140            },
     141            "dist": {
     142                "type": "zip",
     143                "url": "https://api.github.com/repos/guzzle/promises/zipball/f9c436286ab2892c7db7be8c8da4ef61ccf7b455",
     144                "reference": "f9c436286ab2892c7db7be8c8da4ef61ccf7b455",
     145                "shasum": ""
     146            },
     147            "require": {
     148                "php": "^7.2.5 || ^8.0"
     149            },
     150            "require-dev": {
     151                "bamarni/composer-bin-plugin": "^1.8.2",
     152                "phpunit/phpunit": "^8.5.39 || ^9.6.20"
     153            },
     154            "time": "2024-10-17T10:06:22+00:00",
     155            "type": "library",
     156            "extra": {
     157                "bamarni-bin": {
     158                    "bin-links": true,
     159                    "forward-command": false
     160                }
     161            },
     162            "installation-source": "dist",
     163            "autoload": {
     164                "psr-4": {
     165                    "GuzzleHttp\\Promise\\": "src/"
     166                }
     167            },
     168            "notification-url": "https://packagist.org/downloads/",
     169            "license": [
     170                "MIT"
     171            ],
     172            "authors": [
     173                {
     174                    "name": "Graham Campbell",
     175                    "email": "hello@gjcampbell.co.uk",
     176                    "homepage": "https://github.com/GrahamCampbell"
     177                },
     178                {
     179                    "name": "Michael Dowling",
     180                    "email": "mtdowling@gmail.com",
     181                    "homepage": "https://github.com/mtdowling"
     182                },
     183                {
     184                    "name": "Tobias Nyholm",
     185                    "email": "tobias.nyholm@gmail.com",
     186                    "homepage": "https://github.com/Nyholm"
     187                },
     188                {
     189                    "name": "Tobias Schultze",
     190                    "email": "webmaster@tubo-world.de",
     191                    "homepage": "https://github.com/Tobion"
     192                }
     193            ],
     194            "description": "Guzzle promises library",
     195            "keywords": [
     196                "promise"
     197            ],
     198            "support": {
     199                "issues": "https://github.com/guzzle/promises/issues",
     200                "source": "https://github.com/guzzle/promises/tree/2.0.4"
     201            },
     202            "funding": [
     203                {
     204                    "url": "https://github.com/GrahamCampbell",
     205                    "type": "github"
     206                },
     207                {
     208                    "url": "https://github.com/Nyholm",
     209                    "type": "github"
     210                },
     211                {
     212                    "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/promises",
     213                    "type": "tidelift"
     214                }
     215            ],
     216            "install-path": "../guzzlehttp/promises"
     217        },
     218        {
     219            "name": "guzzlehttp/psr7",
     220            "version": "2.7.0",
     221            "version_normalized": "2.7.0.0",
     222            "source": {
     223                "type": "git",
     224                "url": "https://github.com/guzzle/psr7.git",
     225                "reference": "a70f5c95fb43bc83f07c9c948baa0dc1829bf201"
     226            },
     227            "dist": {
     228                "type": "zip",
     229                "url": "https://api.github.com/repos/guzzle/psr7/zipball/a70f5c95fb43bc83f07c9c948baa0dc1829bf201",
     230                "reference": "a70f5c95fb43bc83f07c9c948baa0dc1829bf201",
     231                "shasum": ""
     232            },
     233            "require": {
     234                "php": "^7.2.5 || ^8.0",
     235                "psr/http-factory": "^1.0",
     236                "psr/http-message": "^1.1 || ^2.0",
     237                "ralouphie/getallheaders": "^3.0"
     238            },
     239            "provide": {
     240                "psr/http-factory-implementation": "1.0",
     241                "psr/http-message-implementation": "1.0"
     242            },
     243            "require-dev": {
     244                "bamarni/composer-bin-plugin": "^1.8.2",
     245                "http-interop/http-factory-tests": "0.9.0",
     246                "phpunit/phpunit": "^8.5.39 || ^9.6.20"
     247            },
     248            "suggest": {
     249                "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses"
     250            },
     251            "time": "2024-07-18T11:15:46+00:00",
     252            "type": "library",
     253            "extra": {
     254                "bamarni-bin": {
     255                    "bin-links": true,
     256                    "forward-command": false
     257                }
     258            },
     259            "installation-source": "dist",
     260            "autoload": {
     261                "psr-4": {
     262                    "GuzzleHttp\\Psr7\\": "src/"
     263                }
     264            },
     265            "notification-url": "https://packagist.org/downloads/",
     266            "license": [
     267                "MIT"
     268            ],
     269            "authors": [
     270                {
     271                    "name": "Graham Campbell",
     272                    "email": "hello@gjcampbell.co.uk",
     273                    "homepage": "https://github.com/GrahamCampbell"
     274                },
     275                {
     276                    "name": "Michael Dowling",
     277                    "email": "mtdowling@gmail.com",
     278                    "homepage": "https://github.com/mtdowling"
     279                },
     280                {
     281                    "name": "George Mponos",
     282                    "email": "gmponos@gmail.com",
     283                    "homepage": "https://github.com/gmponos"
     284                },
     285                {
     286                    "name": "Tobias Nyholm",
     287                    "email": "tobias.nyholm@gmail.com",
     288                    "homepage": "https://github.com/Nyholm"
     289                },
     290                {
     291                    "name": "Márk Sági-Kazár",
     292                    "email": "mark.sagikazar@gmail.com",
     293                    "homepage": "https://github.com/sagikazarmark"
     294                },
     295                {
     296                    "name": "Tobias Schultze",
     297                    "email": "webmaster@tubo-world.de",
     298                    "homepage": "https://github.com/Tobion"
     299                },
     300                {
     301                    "name": "Márk Sági-Kazár",
     302                    "email": "mark.sagikazar@gmail.com",
     303                    "homepage": "https://sagikazarmark.hu"
     304                }
     305            ],
     306            "description": "PSR-7 message implementation that also provides common utility methods",
     307            "keywords": [
     308                "http",
     309                "message",
     310                "psr-7",
     311                "request",
     312                "response",
     313                "stream",
     314                "uri",
     315                "url"
     316            ],
     317            "support": {
     318                "issues": "https://github.com/guzzle/psr7/issues",
     319                "source": "https://github.com/guzzle/psr7/tree/2.7.0"
     320            },
     321            "funding": [
     322                {
     323                    "url": "https://github.com/GrahamCampbell",
     324                    "type": "github"
     325                },
     326                {
     327                    "url": "https://github.com/Nyholm",
     328                    "type": "github"
     329                },
     330                {
     331                    "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/psr7",
     332                    "type": "tidelift"
     333                }
     334            ],
     335            "install-path": "../guzzlehttp/psr7"
     336        },
     337        {
     338            "name": "psr/http-client",
     339            "version": "1.0.3",
     340            "version_normalized": "1.0.3.0",
     341            "source": {
     342                "type": "git",
     343                "url": "https://github.com/php-fig/http-client.git",
     344                "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90"
     345            },
     346            "dist": {
     347                "type": "zip",
     348                "url": "https://api.github.com/repos/php-fig/http-client/zipball/bb5906edc1c324c9a05aa0873d40117941e5fa90",
     349                "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90",
     350                "shasum": ""
     351            },
     352            "require": {
     353                "php": "^7.0 || ^8.0",
     354                "psr/http-message": "^1.0 || ^2.0"
     355            },
     356            "time": "2023-09-23T14:17:50+00:00",
     357            "type": "library",
     358            "extra": {
     359                "branch-alias": {
     360                    "dev-master": "1.0.x-dev"
     361                }
     362            },
     363            "installation-source": "dist",
     364            "autoload": {
     365                "psr-4": {
     366                    "Psr\\Http\\Client\\": "src/"
     367                }
     368            },
     369            "notification-url": "https://packagist.org/downloads/",
     370            "license": [
     371                "MIT"
     372            ],
     373            "authors": [
     374                {
     375                    "name": "PHP-FIG",
     376                    "homepage": "https://www.php-fig.org/"
     377                }
     378            ],
     379            "description": "Common interface for HTTP clients",
     380            "homepage": "https://github.com/php-fig/http-client",
     381            "keywords": [
     382                "http",
     383                "http-client",
     384                "psr",
     385                "psr-18"
     386            ],
     387            "support": {
     388                "source": "https://github.com/php-fig/http-client"
     389            },
     390            "install-path": "../psr/http-client"
     391        },
     392        {
     393            "name": "psr/http-factory",
     394            "version": "1.1.0",
     395            "version_normalized": "1.1.0.0",
     396            "source": {
     397                "type": "git",
     398                "url": "https://github.com/php-fig/http-factory.git",
     399                "reference": "2b4765fddfe3b508ac62f829e852b1501d3f6e8a"
     400            },
     401            "dist": {
     402                "type": "zip",
     403                "url": "https://api.github.com/repos/php-fig/http-factory/zipball/2b4765fddfe3b508ac62f829e852b1501d3f6e8a",
     404                "reference": "2b4765fddfe3b508ac62f829e852b1501d3f6e8a",
     405                "shasum": ""
     406            },
     407            "require": {
     408                "php": ">=7.1",
     409                "psr/http-message": "^1.0 || ^2.0"
     410            },
     411            "time": "2024-04-15T12:06:14+00:00",
     412            "type": "library",
     413            "extra": {
     414                "branch-alias": {
     415                    "dev-master": "1.0.x-dev"
     416                }
     417            },
     418            "installation-source": "dist",
     419            "autoload": {
     420                "psr-4": {
     421                    "Psr\\Http\\Message\\": "src/"
     422                }
     423            },
     424            "notification-url": "https://packagist.org/downloads/",
     425            "license": [
     426                "MIT"
     427            ],
     428            "authors": [
     429                {
     430                    "name": "PHP-FIG",
     431                    "homepage": "https://www.php-fig.org/"
     432                }
     433            ],
     434            "description": "PSR-17: Common interfaces for PSR-7 HTTP message factories",
     435            "keywords": [
     436                "factory",
     437                "http",
     438                "message",
     439                "psr",
     440                "psr-17",
     441                "psr-7",
     442                "request",
     443                "response"
     444            ],
     445            "support": {
     446                "source": "https://github.com/php-fig/http-factory"
     447            },
     448            "install-path": "../psr/http-factory"
     449        },
     450        {
     451            "name": "psr/http-message",
     452            "version": "2.0",
     453            "version_normalized": "2.0.0.0",
     454            "source": {
     455                "type": "git",
     456                "url": "https://github.com/php-fig/http-message.git",
     457                "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71"
     458            },
     459            "dist": {
     460                "type": "zip",
     461                "url": "https://api.github.com/repos/php-fig/http-message/zipball/402d35bcb92c70c026d1a6a9883f06b2ead23d71",
     462                "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71",
     463                "shasum": ""
     464            },
     465            "require": {
     466                "php": "^7.2 || ^8.0"
     467            },
     468            "time": "2023-04-04T09:54:51+00:00",
     469            "type": "library",
     470            "extra": {
     471                "branch-alias": {
     472                    "dev-master": "2.0.x-dev"
     473                }
     474            },
     475            "installation-source": "dist",
     476            "autoload": {
     477                "psr-4": {
     478                    "Psr\\Http\\Message\\": "src/"
     479                }
     480            },
     481            "notification-url": "https://packagist.org/downloads/",
     482            "license": [
     483                "MIT"
     484            ],
     485            "authors": [
     486                {
     487                    "name": "PHP-FIG",
     488                    "homepage": "https://www.php-fig.org/"
     489                }
     490            ],
     491            "description": "Common interface for HTTP messages",
     492            "homepage": "https://github.com/php-fig/http-message",
     493            "keywords": [
     494                "http",
     495                "http-message",
     496                "psr",
     497                "psr-7",
     498                "request",
     499                "response"
     500            ],
     501            "support": {
     502                "source": "https://github.com/php-fig/http-message/tree/2.0"
     503            },
     504            "install-path": "../psr/http-message"
     505        },
    3506        {
    4507            "name": "ralouphie/getallheaders",
     
    47550            },
    48551            "install-path": "../ralouphie/getallheaders"
     552        },
     553        {
     554            "name": "symfony/deprecation-contracts",
     555            "version": "v3.5.0",
     556            "version_normalized": "3.5.0.0",
     557            "source": {
     558                "type": "git",
     559                "url": "https://github.com/symfony/deprecation-contracts.git",
     560                "reference": "0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1"
     561            },
     562            "dist": {
     563                "type": "zip",
     564                "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1",
     565                "reference": "0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1",
     566                "shasum": ""
     567            },
     568            "require": {
     569                "php": ">=8.1"
     570            },
     571            "time": "2024-04-18T09:32:20+00:00",
     572            "type": "library",
     573            "extra": {
     574                "branch-alias": {
     575                    "dev-main": "3.5-dev"
     576                },
     577                "thanks": {
     578                    "name": "symfony/contracts",
     579                    "url": "https://github.com/symfony/contracts"
     580                }
     581            },
     582            "installation-source": "dist",
     583            "autoload": {
     584                "files": [
     585                    "function.php"
     586                ]
     587            },
     588            "notification-url": "https://packagist.org/downloads/",
     589            "license": [
     590                "MIT"
     591            ],
     592            "authors": [
     593                {
     594                    "name": "Nicolas Grekas",
     595                    "email": "p@tchwork.com"
     596                },
     597                {
     598                    "name": "Symfony Community",
     599                    "homepage": "https://symfony.com/contributors"
     600                }
     601            ],
     602            "description": "A generic function and convention to trigger deprecation notices",
     603            "homepage": "https://symfony.com",
     604            "support": {
     605                "source": "https://github.com/symfony/deprecation-contracts/tree/v3.5.0"
     606            },
     607            "funding": [
     608                {
     609                    "url": "https://symfony.com/sponsor",
     610                    "type": "custom"
     611                },
     612                {
     613                    "url": "https://github.com/fabpot",
     614                    "type": "github"
     615                },
     616                {
     617                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
     618                    "type": "tidelift"
     619                }
     620            ],
     621            "install-path": "../symfony/deprecation-contracts"
    49622        }
    50623    ],
  • paypal-brasil-para-woocommerce/tags/1.5.7/vendor/composer/installed.php

    r3170993 r3181756  
    44        'pretty_version' => 'dev-master',
    55        'version' => 'dev-master',
    6         'reference' => '6307aa68d452a619473e624a07e51aa3d6b81e5a',
     6        'reference' => 'fb7b6791eeaca1828003ba4efefe5cf9fd665ab0',
    77        'type' => 'library',
    88        'install_path' => __DIR__ . '/../../',
     
    1414            'pretty_version' => 'dev-master',
    1515            'version' => 'dev-master',
    16             'reference' => '6307aa68d452a619473e624a07e51aa3d6b81e5a',
     16            'reference' => 'fb7b6791eeaca1828003ba4efefe5cf9fd665ab0',
    1717            'type' => 'library',
    1818            'install_path' => __DIR__ . '/../../',
    1919            'aliases' => array(),
    2020            'dev_requirement' => false,
     21        ),
     22        'guzzlehttp/guzzle' => array(
     23            'pretty_version' => '7.9.2',
     24            'version' => '7.9.2.0',
     25            'reference' => 'd281ed313b989f213357e3be1a179f02196ac99b',
     26            'type' => 'library',
     27            'install_path' => __DIR__ . '/../guzzlehttp/guzzle',
     28            'aliases' => array(),
     29            'dev_requirement' => false,
     30        ),
     31        'guzzlehttp/promises' => array(
     32            'pretty_version' => '2.0.4',
     33            'version' => '2.0.4.0',
     34            'reference' => 'f9c436286ab2892c7db7be8c8da4ef61ccf7b455',
     35            'type' => 'library',
     36            'install_path' => __DIR__ . '/../guzzlehttp/promises',
     37            'aliases' => array(),
     38            'dev_requirement' => false,
     39        ),
     40        'guzzlehttp/psr7' => array(
     41            'pretty_version' => '2.7.0',
     42            'version' => '2.7.0.0',
     43            'reference' => 'a70f5c95fb43bc83f07c9c948baa0dc1829bf201',
     44            'type' => 'library',
     45            'install_path' => __DIR__ . '/../guzzlehttp/psr7',
     46            'aliases' => array(),
     47            'dev_requirement' => false,
     48        ),
     49        'psr/http-client' => array(
     50            'pretty_version' => '1.0.3',
     51            'version' => '1.0.3.0',
     52            'reference' => 'bb5906edc1c324c9a05aa0873d40117941e5fa90',
     53            'type' => 'library',
     54            'install_path' => __DIR__ . '/../psr/http-client',
     55            'aliases' => array(),
     56            'dev_requirement' => false,
     57        ),
     58        'psr/http-client-implementation' => array(
     59            'dev_requirement' => false,
     60            'provided' => array(
     61                0 => '1.0',
     62            ),
     63        ),
     64        'psr/http-factory' => array(
     65            'pretty_version' => '1.1.0',
     66            'version' => '1.1.0.0',
     67            'reference' => '2b4765fddfe3b508ac62f829e852b1501d3f6e8a',
     68            'type' => 'library',
     69            'install_path' => __DIR__ . '/../psr/http-factory',
     70            'aliases' => array(),
     71            'dev_requirement' => false,
     72        ),
     73        'psr/http-factory-implementation' => array(
     74            'dev_requirement' => false,
     75            'provided' => array(
     76                0 => '1.0',
     77            ),
     78        ),
     79        'psr/http-message' => array(
     80            'pretty_version' => '2.0',
     81            'version' => '2.0.0.0',
     82            'reference' => '402d35bcb92c70c026d1a6a9883f06b2ead23d71',
     83            'type' => 'library',
     84            'install_path' => __DIR__ . '/../psr/http-message',
     85            'aliases' => array(),
     86            'dev_requirement' => false,
     87        ),
     88        'psr/http-message-implementation' => array(
     89            'dev_requirement' => false,
     90            'provided' => array(
     91                0 => '1.0',
     92            ),
    2193        ),
    2294        'ralouphie/getallheaders' => array(
     
    29101            'dev_requirement' => false,
    30102        ),
     103        'symfony/deprecation-contracts' => array(
     104            'pretty_version' => 'v3.5.0',
     105            'version' => '3.5.0.0',
     106            'reference' => '0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1',
     107            'type' => 'library',
     108            'install_path' => __DIR__ . '/../symfony/deprecation-contracts',
     109            'aliases' => array(),
     110            'dev_requirement' => false,
     111        ),
    31112    ),
    32113);
  • paypal-brasil-para-woocommerce/tags/1.5.7/vendor/composer/platform_check.php

    r3129049 r3181756  
    55$issues = array();
    66
    7 if (!(PHP_VERSION_ID >= 50600)) {
    8     $issues[] = 'Your Composer dependencies require a PHP version ">= 5.6.0". You are running ' . PHP_VERSION . '.';
     7if (!(PHP_VERSION_ID >= 80100)) {
     8    $issues[] = 'Your Composer dependencies require a PHP version ">= 8.1.0". You are running ' . PHP_VERSION . '.';
    99}
    1010
  • paypal-brasil-para-woocommerce/trunk/includes/api/class-paypal-orders-api-v2.php

    r3067781 r3181756  
    2424        'shortcut' => 'WooCommerceBrazil_Ecom_ECS',
    2525        'plus' => 'WooCommerceBR_Ecom_PPPlus',
     26        'bcdc' => 'WooCommerceBrazil_Ecom_BCDC',
    2627        'default' => 'WooCommerceBrazil_Ecom_EC',
    2728    );
  • paypal-brasil-para-woocommerce/trunk/includes/class-wc-paypal-logger.php

    r3122166 r3181756  
    11<?php
    22
    3 if ( ! defined( 'ABSPATH' ) ) {
     3if (!defined('ABSPATH')) {
    44    exit;
    55}
     6
     7use GuzzleHttp\Client;
     8
    69/**
    710 * Utilize WC logger class
     
    1013 * @version 1.0.0
    1114 */
    12 class WC_PAYPAL_LOGGER {
     15class WC_PAYPAL_LOGGER
     16{
    1317    /**
    1418     * Add a log entry.
     
    1620     * @param string $message Log message.
    1721     */
    18     public static function log( $message, $gateway_id ) {
    19         if ( ! class_exists( 'WC_Logger' ) ) {
     22    public static function log($message, $gateway_id, string $level = 'info', array $extra = array())
     23    {
     24        if (!class_exists('WC_Logger')) {
    2025            return;
    2126        }
    2227
    23         $options     = get_option( "woocommerce_{$gateway_id}_settings" );
     28        $options = get_option("woocommerce_{$gateway_id}_settings");
    2429
    25         if ( empty( $options ) || ( isset( $options['debug'] ) && 'yes' !== $options['debug'] ) ) {
     30        if (empty($options) || (isset($options['debug']) && 'yes' !== $options['debug'])) {
    2631            return;
    2732        }
    2833
    29         $logger = wc_get_logger();
    30         $context = array( 'source' => $gateway_id );
     34        $wc_logger = wc_get_logger();
     35        $context = array('source' => $gateway_id);
    3136
    32         $log_message  = PHP_EOL . '==== Paypal Brasil para woocommerce Version: ' . PAYPAL_PAYMENTS_VERSION . ' ====' . PHP_EOL;
     37        $log_message = PHP_EOL . '==== Paypal Brasil para woocommerce Version: ' . PAYPAL_PAYMENTS_VERSION . ' ====' . PHP_EOL;
    3338        $log_message .= PHP_EOL;
    3439        $log_message .= '=== Start Log ===' . PHP_EOL;
     
    3742        $log_message .= PHP_EOL;
    3843
    39         $logger->debug( $log_message, $context );
     44        $wc_logger->debug($log_message, $context);
     45        // Enviar para o Datadog somente se for um log de erro ou critico, ou contiver palavras específicas
     46        $datadog_api_key = self::getDatadogApiKey();
     47        if ($datadog_api_key && ($level === 'warning' || $level === 'error' || strpos($message, 'ALERT') !== false)) {
     48
     49            try {
     50                $client = new Client([
     51                    'base_uri' => 'https://http-intake.logs.datadoghq.com/',
     52                ]);
     53
     54                $obj = new self();
     55
     56                // Dados do log em JSON
     57                $logData = [
     58                    "ddsource" => "paypal-woocommerce",
     59                    "ddtags" => "site_name:" . get_bloginfo("name") . "," . "plugin_version:" . PAYPAL_PAYMENTS_VERSION,
     60                    "gateway" => $gateway_id,
     61                    "message" => $message,
     62                    "service" => "paypal-woocommerce",
     63                    "status" => $level,
     64                    "hostname" => home_url(),
     65                    "version" => PAYPAL_PAYMENTS_VERSION,
     66                    "body" => array($obj->filterData($extra))
     67                ];
     68
     69                $wc_logger->debug(json_encode($logData), $context);
     70
     71
     72                $client->post("api/v2/logs", [
     73                    'headers' => [
     74                        'Content-Type' => 'application/json',
     75                        'Accept' => 'application/json',
     76                        'DD-API-KEY' => $datadog_api_key
     77                    ],
     78                    'json' => $logData,
     79                ]);
     80            } catch (\Throwable $th) {
     81                return;
     82            }
     83
     84
     85        }
     86    }
     87
     88
     89    /**
     90     * Filter and hide sensitive data fields.
     91     *
     92     * @param array $data
     93     * @param array $fieldsToMask
     94     * @return array Array with data filter result.
     95     */
     96    function filterData(array $data): array
     97    {
     98        $fieldsToMask = ["address_line_1", "address_line_2", "admin_area_1", "admin_area_2", "country_code", "postal_code", "email_address", "surname", "national_number", "tax_id", "tax_id_type", "email", "full_name", "document", "documentType", "phone"];
     99        foreach ($data as $key => &$value) {
     100            // Se a chave estiver na lista de campos para mascarar e o valor for uma string, aplique a máscara
     101            if (in_array($key, $fieldsToMask) && is_string($value)) {
     102                $value = $this->maskString($value);
     103            }
     104
     105            // Se o valor for um array, aplique a função recursivamente
     106            if (is_array($value)) {
     107                $value = $this->filterData($value);
     108            }
     109        }
     110
     111        return $data;
     112    }
     113
     114
     115    /**
     116     * Replaces the value of the string with asterisks
     117     *
     118     * @param string $string
     119     * @return string
     120     */
     121    function maskString($string): string
     122    {
     123        $length = strlen($string);
     124
     125        if ($length <= 4) {
     126            return str_repeat('*', $length);
     127        }
     128
     129        return substr($string, 0, 2) . str_repeat('*', $length - 4) . substr($string, -2);
     130    }
     131
     132    private static function getDatadogApiKey()
     133    {
     134        return file_get_contents(__DIR__ . '/2892C90D7360927BD664E7506B5DD4607964BBA775550540AE697D26B5B23725.bin');
    40135    }
    41136}
  • paypal-brasil-para-woocommerce/trunk/includes/payment-methods/class-paypal-brasil-bcdc-gateway.php

    r3175030 r3181756  
    11<?php
     2
     3use function PHPUnit\Framework\isEmpty;
    24
    35// Ignore if access directly.
    46if (!defined('ABSPATH')) {
    57    exit;
     8}
     9
     10if ( ! class_exists( 'WC_PAYPAL_LOGGER' ) ) {
     11    require_once plugin_dir_path( __FILE__ ) . '../class-wc-paypal-logger.php';
    612}
    713
     
    569575
    570576            // Get the payment from PayPal
    571             $order_paypal_data = $this->api->get_payment($paypal_order_id);
     577            $order_paypal_data = $this->api->get_payment($paypal_order_id,array(),'bcdc');
    572578
    573579            // Check if the payment id
     
    603609            $sale = $this->execute_payment($order, $paypal_order_id);
    604610
    605             $order_paypal_data = $this->api->get_payment($paypal_order_id);
     611            $order_paypal_data = $this->api->get_payment($paypal_order_id,array(),'bcdc');
    606612
    607613            $installments_term = intval($order_paypal_data['credit_financing_offer']['term']);
     
    790796            try {
    791797
    792                 $order_paypal_data = $this->api->get_payment($order_paypal_id);
     798                $order_paypal_data = $this->api->get_payment($order_paypal_id,array(),'bcdc');
    793799
    794800                $capture_id = $order_paypal_data['purchase_units'][0]['payments']['captures'][0]['id'];
     
    10031009            if (!$only_digital_items) {
    10041010
    1005                 if (isset($shipping_method) && $shipping_method == 'local_pickup') {
     1011                if (isset($shipping_method) && strpos($shipping_method, 'local_pickup') === 0) {
     1012
     1013                    $shipping_address = $this->get_payer_address($data);
    10061014
    10071015                    $shipping = array(
     
    10101018                            'name' => array(
    10111019                                'full_name' => $data['first_name'] . " " . $data['last_name'],
    1012                             )
     1020                            ),
    10131021                        )
    10141022                    );
     1023                    WC_PAYPAL_LOGGER::log("Validate addresss" . json_encode($shipping_address) . "\n Validação: " . json_encode($this->validate_address($shipping_address)), $this->id);
     1024                    if ($this->validate_address($shipping_address)) {
     1025                        $shipping['shipping']['address'] = $shipping_address;
     1026                        $payment_data['payment_source']['paypal']['address'] = $shipping_address;
     1027                    }
    10151028
    10161029                    $payment_data['payment_source']['paypal']['experience_context']['shipping_preference'] = 'NO_SHIPPING';
     
    10191032                } else {
    10201033
    1021 
    10221034                    $shipping_address = $this->get_payer_address($data);
    1023 
     1035                    $shipping = array(
     1036                        'shipping' => array(
     1037                            'type' => 'SHIPPING',
     1038                            'name' => array(
     1039                                'full_name' => $data['first_name'] . " " . $data['last_name'],
     1040                            ),
     1041                            //'address' => $shipping_address
     1042                        )
     1043                    );
     1044
     1045                    //If address is invalid, the shipping is not send to create_order by is not permited when shipping reference is SET_PROVIDED_ADDRESS
    10241046                    if ($this->validate_address($shipping_address)) {
    1025                         $shipping = array(
    1026                             'shipping' => array(
    1027                                 'type' => 'SHIPPING',
    1028                                 'name' => array(
    1029                                     'full_name' => $data['first_name'] . " " . $data['last_name'],
    1030                                 ),
    1031                                 'address' => $shipping_address
    1032                             )
    1033                         );
    1034 
     1047
     1048                        $shipping['shipping']['address'] = $shipping_address;
    10351049                        $payment_data['payment_source']['paypal']['address'] = $shipping_address;
    1036 
    1037                         $payment_data['purchase_units'][0] = array_merge($payment_data['purchase_units'][0], $shipping);
     1050                        $payment_data['payment_source']['paypal']['experience_context']['shipping_preference'] = 'SET_PROVIDED_ADDRESS';
     1051
    10381052                    }
    10391053
    1040 
    1041 
    1042                     $payment_data['payment_source']['paypal']['experience_context']['shipping_preference'] = 'SET_PROVIDED_ADDRESS';
     1054                    $payment_data['purchase_units'][0] = array_merge($payment_data['purchase_units'][0], $shipping);
    10431055
    10441056                }
     
    10481060        }
    10491061
    1050         $payment_data['payment_source']['paypal'] = $this->get_payer_info($data);
    1051 
    1052    
     1062        if ($payment_data['payment_source']['paypal']) {
     1063            $payment_data['payment_source']['paypal'] = array_merge($payment_data['payment_source']['paypal'], $this->get_payer_info($data));
     1064        } else {
     1065            $payment_data['payment_source']['paypal'] = array();
     1066            $payment_data['payment_source']['paypal'] = array_merge($payment_data['payment_source']['paypal'], $this->get_payer_info($data));
     1067        }
    10531068
    10541069        //Capture item on the cart;
     
    10771092        try {
    10781093
    1079             if(!$this->currency_is_allowed()){
    1080                 throw new Exception(__('Payment not allowed in this currency. Contact store support.', "paypal-brasil-para-woocommerce"));;
     1094            if (!$this->currency_is_allowed()) {
     1095                throw new Exception(__('Payment not allowed in this currency. Contact store support.', "paypal-brasil-para-woocommerce"));
     1096                ;
    10811097            }
    10821098
    10831099            // Create the payment.
    10841100            $result = $this->api->create_payment($payment_data, array(), 'bcdc');
     1101
     1102            if (!isset($result['payment_source']['paypal']['address']) || !isset($result['payer']['address'])) {
     1103                WC_PAYPAL_LOGGER::log("Order created without address!", $this->id, "warning", $result);
     1104            }
     1105
    10851106            return $result;
    10861107        } catch (PayPal_Brasil_API_Exception $ex) { // Catch any PayPal error.
     
    10931114
    10941115        $error_message = str_replace('"', '', $error_data['message']);
    1095         $debug_id   = str_replace('"', '', $error_data['debug_id']);
     1116        $debug_id = str_replace('"', '', $error_data['debug_id']);
    10961117        $exception = new Exception(__("Ocorreu um erro, no CREATE_ORDER, \n
    10971118                                                Mensagem original: {$error_message} \n
     
    11841205            if (!$only_digital_items) {
    11851206
    1186                 if (isset($shipping_method) && $shipping_method == 'local_pickup') {
     1207                if (isset($shipping_method) && strpos($shipping_method, 'local_pickup') === 0) {
    11871208
    11881209                    $shipping = array(
     
    12981319        // Add the address
    12991320        if ($data['address']) {
    1300             //$address_line_1[] = $data['address'];
     1321            $address_line_1[] = $data['address'];
    13011322        }
    13021323        // Add the number
     
    13311352
    13321353    public function validate_address(array $data): bool{
    1333         $adressFields = ['address', 'number','neighborhood', 'address_2','state', 'city', 'postcode', 'country','address_line_1','address_line_2'];
     1354        $adressFields = ['address_line_1','address_line_2','admin_area_1', 'admin_area_2','postal_code', 'country_code'];
    13341355        $isValid = true;
    13351356        foreach ($adressFields as $value) {
    1336             if (!isset($data[$value])) {
     1357            if (!isset($data[$value]) || empty($data[$value])) {
    13371358                $isValid = false;
    13381359            }
  • paypal-brasil-para-woocommerce/trunk/paypal-brasil-para-woocommerce.php

    r3175030 r3181756  
    44 * Plugin Name: PayPal Brasil para WooCommerce
    55 * Description: Adicione facilmente opções de pagamento do PayPal à sua loja do WooCommerce.
    6  * Version: 1.5.6
     6 * Version: 1.5.7
    77 * Author: PayPal
    88 * Author URI: https://paypal.com.br
     
    3030    // Define files.
    3131    define( 'PAYPAL_PAYMENTS_MAIN_FILE', __FILE__ );
    32     define( 'PAYPAL_PAYMENTS_VERSION', '1.5.6' );
     32    define( 'PAYPAL_PAYMENTS_VERSION', '1.5.7' );
    3333    define('WC_PAYPAL_PLUGIN_SLUG','paypal-brasil-para-woocommerce');
    3434
  • paypal-brasil-para-woocommerce/trunk/readme.txt

    r3175030 r3181756  
    55Requires at least: 4.4
    66Tested up to: 6.6.1
    7 Stable tag: 1.5.6
     7Stable tag: 1.5.7
    88Requires PHP: 7.0
    99License: GPLv2 or later
     
    9090
    9191== Changelog ==
     92
     93= 1.5.7 =
     94* Improvement logs.
     95* Fixed error on create order.
    9296
    9397= 1.5.6 =
     
    230234== Upgrade Notice ==
    231235
    232 = 1.5.6 =
    233 * Enhanced error messages for better clarity.
     236= 1.5.7 =
     237* Improvement logs.
     238* Fixed error on create order.
    234239
    235240== Screenshots ==
  • paypal-brasil-para-woocommerce/trunk/vendor/autoload.php

    r3129049 r3181756  
    2323require_once __DIR__ . '/composer/autoload_real.php';
    2424
    25 return ComposerAutoloaderInit597ddb1bf69cb8237d7e45d28c09300c::getLoader();
     25return ComposerAutoloaderInitf793034287c6bf49f2f80fcc63828be4::getLoader();
  • paypal-brasil-para-woocommerce/trunk/vendor/composer/autoload_files.php

    r3129049 r3181756  
    88return array(
    99    '7b11c4dc42b3b3023073cb14e519683c' => $vendorDir . '/ralouphie/getallheaders/src/getallheaders.php',
     10    '6e3fae29631ef280660b3cdad06f25a8' => $vendorDir . '/symfony/deprecation-contracts/function.php',
     11    '37a3dc5111fe8f707ab4c132ef1dbc62' => $vendorDir . '/guzzlehttp/guzzle/src/functions_include.php',
    1012);
  • paypal-brasil-para-woocommerce/trunk/vendor/composer/autoload_psr4.php

    r3129049 r3181756  
    77
    88return array(
     9    'Psr\\Http\\Message\\' => array($vendorDir . '/psr/http-factory/src', $vendorDir . '/psr/http-message/src'),
     10    'Psr\\Http\\Client\\' => array($vendorDir . '/psr/http-client/src'),
     11    'GuzzleHttp\\Psr7\\' => array($vendorDir . '/guzzlehttp/psr7/src'),
     12    'GuzzleHttp\\Promise\\' => array($vendorDir . '/guzzlehttp/promises/src'),
     13    'GuzzleHttp\\' => array($vendorDir . '/guzzlehttp/guzzle/src'),
    914);
  • paypal-brasil-para-woocommerce/trunk/vendor/composer/autoload_real.php

    r3129049 r3181756  
    33// autoload_real.php @generated by Composer
    44
    5 class ComposerAutoloaderInit597ddb1bf69cb8237d7e45d28c09300c
     5class ComposerAutoloaderInitf793034287c6bf49f2f80fcc63828be4
    66{
    77    private static $loader;
     
    2525        require __DIR__ . '/platform_check.php';
    2626
    27         spl_autoload_register(array('ComposerAutoloaderInit597ddb1bf69cb8237d7e45d28c09300c', 'loadClassLoader'), true, true);
     27        spl_autoload_register(array('ComposerAutoloaderInitf793034287c6bf49f2f80fcc63828be4', 'loadClassLoader'), true, true);
    2828        self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
    29         spl_autoload_unregister(array('ComposerAutoloaderInit597ddb1bf69cb8237d7e45d28c09300c', 'loadClassLoader'));
     29        spl_autoload_unregister(array('ComposerAutoloaderInitf793034287c6bf49f2f80fcc63828be4', 'loadClassLoader'));
    3030
    3131        require __DIR__ . '/autoload_static.php';
    32         call_user_func(\Composer\Autoload\ComposerStaticInit597ddb1bf69cb8237d7e45d28c09300c::getInitializer($loader));
     32        call_user_func(\Composer\Autoload\ComposerStaticInitf793034287c6bf49f2f80fcc63828be4::getInitializer($loader));
    3333
    3434        $loader->register(true);
    3535
    36         $filesToLoad = \Composer\Autoload\ComposerStaticInit597ddb1bf69cb8237d7e45d28c09300c::$files;
     36        $filesToLoad = \Composer\Autoload\ComposerStaticInitf793034287c6bf49f2f80fcc63828be4::$files;
    3737        $requireFile = static function ($fileIdentifier, $file) {
    3838            if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
  • paypal-brasil-para-woocommerce/trunk/vendor/composer/autoload_static.php

    r3129049 r3181756  
    55namespace Composer\Autoload;
    66
    7 class ComposerStaticInit597ddb1bf69cb8237d7e45d28c09300c
     7class ComposerStaticInitf793034287c6bf49f2f80fcc63828be4
    88{
    99    public static $files = array (
    1010        '7b11c4dc42b3b3023073cb14e519683c' => __DIR__ . '/..' . '/ralouphie/getallheaders/src/getallheaders.php',
     11        '6e3fae29631ef280660b3cdad06f25a8' => __DIR__ . '/..' . '/symfony/deprecation-contracts/function.php',
     12        '37a3dc5111fe8f707ab4c132ef1dbc62' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/functions_include.php',
     13    );
     14
     15    public static $prefixLengthsPsr4 = array (
     16        'P' =>
     17        array (
     18            'Psr\\Http\\Message\\' => 17,
     19            'Psr\\Http\\Client\\' => 16,
     20        ),
     21        'G' =>
     22        array (
     23            'GuzzleHttp\\Psr7\\' => 16,
     24            'GuzzleHttp\\Promise\\' => 19,
     25            'GuzzleHttp\\' => 11,
     26        ),
     27    );
     28
     29    public static $prefixDirsPsr4 = array (
     30        'Psr\\Http\\Message\\' =>
     31        array (
     32            0 => __DIR__ . '/..' . '/psr/http-factory/src',
     33            1 => __DIR__ . '/..' . '/psr/http-message/src',
     34        ),
     35        'Psr\\Http\\Client\\' =>
     36        array (
     37            0 => __DIR__ . '/..' . '/psr/http-client/src',
     38        ),
     39        'GuzzleHttp\\Psr7\\' =>
     40        array (
     41            0 => __DIR__ . '/..' . '/guzzlehttp/psr7/src',
     42        ),
     43        'GuzzleHttp\\Promise\\' =>
     44        array (
     45            0 => __DIR__ . '/..' . '/guzzlehttp/promises/src',
     46        ),
     47        'GuzzleHttp\\' =>
     48        array (
     49            0 => __DIR__ . '/..' . '/guzzlehttp/guzzle/src',
     50        ),
    1151    );
    1252
     
    1858    {
    1959        return \Closure::bind(function () use ($loader) {
    20             $loader->classMap = ComposerStaticInit597ddb1bf69cb8237d7e45d28c09300c::$classMap;
     60            $loader->prefixLengthsPsr4 = ComposerStaticInitf793034287c6bf49f2f80fcc63828be4::$prefixLengthsPsr4;
     61            $loader->prefixDirsPsr4 = ComposerStaticInitf793034287c6bf49f2f80fcc63828be4::$prefixDirsPsr4;
     62            $loader->classMap = ComposerStaticInitf793034287c6bf49f2f80fcc63828be4::$classMap;
    2163
    2264        }, null, ClassLoader::class);
  • paypal-brasil-para-woocommerce/trunk/vendor/composer/installed.json

    r3129049 r3181756  
    11{
    22    "packages": [
     3        {
     4            "name": "guzzlehttp/guzzle",
     5            "version": "7.9.2",
     6            "version_normalized": "7.9.2.0",
     7            "source": {
     8                "type": "git",
     9                "url": "https://github.com/guzzle/guzzle.git",
     10                "reference": "d281ed313b989f213357e3be1a179f02196ac99b"
     11            },
     12            "dist": {
     13                "type": "zip",
     14                "url": "https://api.github.com/repos/guzzle/guzzle/zipball/d281ed313b989f213357e3be1a179f02196ac99b",
     15                "reference": "d281ed313b989f213357e3be1a179f02196ac99b",
     16                "shasum": ""
     17            },
     18            "require": {
     19                "ext-json": "*",
     20                "guzzlehttp/promises": "^1.5.3 || ^2.0.3",
     21                "guzzlehttp/psr7": "^2.7.0",
     22                "php": "^7.2.5 || ^8.0",
     23                "psr/http-client": "^1.0",
     24                "symfony/deprecation-contracts": "^2.2 || ^3.0"
     25            },
     26            "provide": {
     27                "psr/http-client-implementation": "1.0"
     28            },
     29            "require-dev": {
     30                "bamarni/composer-bin-plugin": "^1.8.2",
     31                "ext-curl": "*",
     32                "guzzle/client-integration-tests": "3.0.2",
     33                "php-http/message-factory": "^1.1",
     34                "phpunit/phpunit": "^8.5.39 || ^9.6.20",
     35                "psr/log": "^1.1 || ^2.0 || ^3.0"
     36            },
     37            "suggest": {
     38                "ext-curl": "Required for CURL handler support",
     39                "ext-intl": "Required for Internationalized Domain Name (IDN) support",
     40                "psr/log": "Required for using the Log middleware"
     41            },
     42            "time": "2024-07-24T11:22:20+00:00",
     43            "type": "library",
     44            "extra": {
     45                "bamarni-bin": {
     46                    "bin-links": true,
     47                    "forward-command": false
     48                }
     49            },
     50            "installation-source": "dist",
     51            "autoload": {
     52                "files": [
     53                    "src/functions_include.php"
     54                ],
     55                "psr-4": {
     56                    "GuzzleHttp\\": "src/"
     57                }
     58            },
     59            "notification-url": "https://packagist.org/downloads/",
     60            "license": [
     61                "MIT"
     62            ],
     63            "authors": [
     64                {
     65                    "name": "Graham Campbell",
     66                    "email": "hello@gjcampbell.co.uk",
     67                    "homepage": "https://github.com/GrahamCampbell"
     68                },
     69                {
     70                    "name": "Michael Dowling",
     71                    "email": "mtdowling@gmail.com",
     72                    "homepage": "https://github.com/mtdowling"
     73                },
     74                {
     75                    "name": "Jeremy Lindblom",
     76                    "email": "jeremeamia@gmail.com",
     77                    "homepage": "https://github.com/jeremeamia"
     78                },
     79                {
     80                    "name": "George Mponos",
     81                    "email": "gmponos@gmail.com",
     82                    "homepage": "https://github.com/gmponos"
     83                },
     84                {
     85                    "name": "Tobias Nyholm",
     86                    "email": "tobias.nyholm@gmail.com",
     87                    "homepage": "https://github.com/Nyholm"
     88                },
     89                {
     90                    "name": "Márk Sági-Kazár",
     91                    "email": "mark.sagikazar@gmail.com",
     92                    "homepage": "https://github.com/sagikazarmark"
     93                },
     94                {
     95                    "name": "Tobias Schultze",
     96                    "email": "webmaster@tubo-world.de",
     97                    "homepage": "https://github.com/Tobion"
     98                }
     99            ],
     100            "description": "Guzzle is a PHP HTTP client library",
     101            "keywords": [
     102                "client",
     103                "curl",
     104                "framework",
     105                "http",
     106                "http client",
     107                "psr-18",
     108                "psr-7",
     109                "rest",
     110                "web service"
     111            ],
     112            "support": {
     113                "issues": "https://github.com/guzzle/guzzle/issues",
     114                "source": "https://github.com/guzzle/guzzle/tree/7.9.2"
     115            },
     116            "funding": [
     117                {
     118                    "url": "https://github.com/GrahamCampbell",
     119                    "type": "github"
     120                },
     121                {
     122                    "url": "https://github.com/Nyholm",
     123                    "type": "github"
     124                },
     125                {
     126                    "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/guzzle",
     127                    "type": "tidelift"
     128                }
     129            ],
     130            "install-path": "../guzzlehttp/guzzle"
     131        },
     132        {
     133            "name": "guzzlehttp/promises",
     134            "version": "2.0.4",
     135            "version_normalized": "2.0.4.0",
     136            "source": {
     137                "type": "git",
     138                "url": "https://github.com/guzzle/promises.git",
     139                "reference": "f9c436286ab2892c7db7be8c8da4ef61ccf7b455"
     140            },
     141            "dist": {
     142                "type": "zip",
     143                "url": "https://api.github.com/repos/guzzle/promises/zipball/f9c436286ab2892c7db7be8c8da4ef61ccf7b455",
     144                "reference": "f9c436286ab2892c7db7be8c8da4ef61ccf7b455",
     145                "shasum": ""
     146            },
     147            "require": {
     148                "php": "^7.2.5 || ^8.0"
     149            },
     150            "require-dev": {
     151                "bamarni/composer-bin-plugin": "^1.8.2",
     152                "phpunit/phpunit": "^8.5.39 || ^9.6.20"
     153            },
     154            "time": "2024-10-17T10:06:22+00:00",
     155            "type": "library",
     156            "extra": {
     157                "bamarni-bin": {
     158                    "bin-links": true,
     159                    "forward-command": false
     160                }
     161            },
     162            "installation-source": "dist",
     163            "autoload": {
     164                "psr-4": {
     165                    "GuzzleHttp\\Promise\\": "src/"
     166                }
     167            },
     168            "notification-url": "https://packagist.org/downloads/",
     169            "license": [
     170                "MIT"
     171            ],
     172            "authors": [
     173                {
     174                    "name": "Graham Campbell",
     175                    "email": "hello@gjcampbell.co.uk",
     176                    "homepage": "https://github.com/GrahamCampbell"
     177                },
     178                {
     179                    "name": "Michael Dowling",
     180                    "email": "mtdowling@gmail.com",
     181                    "homepage": "https://github.com/mtdowling"
     182                },
     183                {
     184                    "name": "Tobias Nyholm",
     185                    "email": "tobias.nyholm@gmail.com",
     186                    "homepage": "https://github.com/Nyholm"
     187                },
     188                {
     189                    "name": "Tobias Schultze",
     190                    "email": "webmaster@tubo-world.de",
     191                    "homepage": "https://github.com/Tobion"
     192                }
     193            ],
     194            "description": "Guzzle promises library",
     195            "keywords": [
     196                "promise"
     197            ],
     198            "support": {
     199                "issues": "https://github.com/guzzle/promises/issues",
     200                "source": "https://github.com/guzzle/promises/tree/2.0.4"
     201            },
     202            "funding": [
     203                {
     204                    "url": "https://github.com/GrahamCampbell",
     205                    "type": "github"
     206                },
     207                {
     208                    "url": "https://github.com/Nyholm",
     209                    "type": "github"
     210                },
     211                {
     212                    "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/promises",
     213                    "type": "tidelift"
     214                }
     215            ],
     216            "install-path": "../guzzlehttp/promises"
     217        },
     218        {
     219            "name": "guzzlehttp/psr7",
     220            "version": "2.7.0",
     221            "version_normalized": "2.7.0.0",
     222            "source": {
     223                "type": "git",
     224                "url": "https://github.com/guzzle/psr7.git",
     225                "reference": "a70f5c95fb43bc83f07c9c948baa0dc1829bf201"
     226            },
     227            "dist": {
     228                "type": "zip",
     229                "url": "https://api.github.com/repos/guzzle/psr7/zipball/a70f5c95fb43bc83f07c9c948baa0dc1829bf201",
     230                "reference": "a70f5c95fb43bc83f07c9c948baa0dc1829bf201",
     231                "shasum": ""
     232            },
     233            "require": {
     234                "php": "^7.2.5 || ^8.0",
     235                "psr/http-factory": "^1.0",
     236                "psr/http-message": "^1.1 || ^2.0",
     237                "ralouphie/getallheaders": "^3.0"
     238            },
     239            "provide": {
     240                "psr/http-factory-implementation": "1.0",
     241                "psr/http-message-implementation": "1.0"
     242            },
     243            "require-dev": {
     244                "bamarni/composer-bin-plugin": "^1.8.2",
     245                "http-interop/http-factory-tests": "0.9.0",
     246                "phpunit/phpunit": "^8.5.39 || ^9.6.20"
     247            },
     248            "suggest": {
     249                "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses"
     250            },
     251            "time": "2024-07-18T11:15:46+00:00",
     252            "type": "library",
     253            "extra": {
     254                "bamarni-bin": {
     255                    "bin-links": true,
     256                    "forward-command": false
     257                }
     258            },
     259            "installation-source": "dist",
     260            "autoload": {
     261                "psr-4": {
     262                    "GuzzleHttp\\Psr7\\": "src/"
     263                }
     264            },
     265            "notification-url": "https://packagist.org/downloads/",
     266            "license": [
     267                "MIT"
     268            ],
     269            "authors": [
     270                {
     271                    "name": "Graham Campbell",
     272                    "email": "hello@gjcampbell.co.uk",
     273                    "homepage": "https://github.com/GrahamCampbell"
     274                },
     275                {
     276                    "name": "Michael Dowling",
     277                    "email": "mtdowling@gmail.com",
     278                    "homepage": "https://github.com/mtdowling"
     279                },
     280                {
     281                    "name": "George Mponos",
     282                    "email": "gmponos@gmail.com",
     283                    "homepage": "https://github.com/gmponos"
     284                },
     285                {
     286                    "name": "Tobias Nyholm",
     287                    "email": "tobias.nyholm@gmail.com",
     288                    "homepage": "https://github.com/Nyholm"
     289                },
     290                {
     291                    "name": "Márk Sági-Kazár",
     292                    "email": "mark.sagikazar@gmail.com",
     293                    "homepage": "https://github.com/sagikazarmark"
     294                },
     295                {
     296                    "name": "Tobias Schultze",
     297                    "email": "webmaster@tubo-world.de",
     298                    "homepage": "https://github.com/Tobion"
     299                },
     300                {
     301                    "name": "Márk Sági-Kazár",
     302                    "email": "mark.sagikazar@gmail.com",
     303                    "homepage": "https://sagikazarmark.hu"
     304                }
     305            ],
     306            "description": "PSR-7 message implementation that also provides common utility methods",
     307            "keywords": [
     308                "http",
     309                "message",
     310                "psr-7",
     311                "request",
     312                "response",
     313                "stream",
     314                "uri",
     315                "url"
     316            ],
     317            "support": {
     318                "issues": "https://github.com/guzzle/psr7/issues",
     319                "source": "https://github.com/guzzle/psr7/tree/2.7.0"
     320            },
     321            "funding": [
     322                {
     323                    "url": "https://github.com/GrahamCampbell",
     324                    "type": "github"
     325                },
     326                {
     327                    "url": "https://github.com/Nyholm",
     328                    "type": "github"
     329                },
     330                {
     331                    "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/psr7",
     332                    "type": "tidelift"
     333                }
     334            ],
     335            "install-path": "../guzzlehttp/psr7"
     336        },
     337        {
     338            "name": "psr/http-client",
     339            "version": "1.0.3",
     340            "version_normalized": "1.0.3.0",
     341            "source": {
     342                "type": "git",
     343                "url": "https://github.com/php-fig/http-client.git",
     344                "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90"
     345            },
     346            "dist": {
     347                "type": "zip",
     348                "url": "https://api.github.com/repos/php-fig/http-client/zipball/bb5906edc1c324c9a05aa0873d40117941e5fa90",
     349                "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90",
     350                "shasum": ""
     351            },
     352            "require": {
     353                "php": "^7.0 || ^8.0",
     354                "psr/http-message": "^1.0 || ^2.0"
     355            },
     356            "time": "2023-09-23T14:17:50+00:00",
     357            "type": "library",
     358            "extra": {
     359                "branch-alias": {
     360                    "dev-master": "1.0.x-dev"
     361                }
     362            },
     363            "installation-source": "dist",
     364            "autoload": {
     365                "psr-4": {
     366                    "Psr\\Http\\Client\\": "src/"
     367                }
     368            },
     369            "notification-url": "https://packagist.org/downloads/",
     370            "license": [
     371                "MIT"
     372            ],
     373            "authors": [
     374                {
     375                    "name": "PHP-FIG",
     376                    "homepage": "https://www.php-fig.org/"
     377                }
     378            ],
     379            "description": "Common interface for HTTP clients",
     380            "homepage": "https://github.com/php-fig/http-client",
     381            "keywords": [
     382                "http",
     383                "http-client",
     384                "psr",
     385                "psr-18"
     386            ],
     387            "support": {
     388                "source": "https://github.com/php-fig/http-client"
     389            },
     390            "install-path": "../psr/http-client"
     391        },
     392        {
     393            "name": "psr/http-factory",
     394            "version": "1.1.0",
     395            "version_normalized": "1.1.0.0",
     396            "source": {
     397                "type": "git",
     398                "url": "https://github.com/php-fig/http-factory.git",
     399                "reference": "2b4765fddfe3b508ac62f829e852b1501d3f6e8a"
     400            },
     401            "dist": {
     402                "type": "zip",
     403                "url": "https://api.github.com/repos/php-fig/http-factory/zipball/2b4765fddfe3b508ac62f829e852b1501d3f6e8a",
     404                "reference": "2b4765fddfe3b508ac62f829e852b1501d3f6e8a",
     405                "shasum": ""
     406            },
     407            "require": {
     408                "php": ">=7.1",
     409                "psr/http-message": "^1.0 || ^2.0"
     410            },
     411            "time": "2024-04-15T12:06:14+00:00",
     412            "type": "library",
     413            "extra": {
     414                "branch-alias": {
     415                    "dev-master": "1.0.x-dev"
     416                }
     417            },
     418            "installation-source": "dist",
     419            "autoload": {
     420                "psr-4": {
     421                    "Psr\\Http\\Message\\": "src/"
     422                }
     423            },
     424            "notification-url": "https://packagist.org/downloads/",
     425            "license": [
     426                "MIT"
     427            ],
     428            "authors": [
     429                {
     430                    "name": "PHP-FIG",
     431                    "homepage": "https://www.php-fig.org/"
     432                }
     433            ],
     434            "description": "PSR-17: Common interfaces for PSR-7 HTTP message factories",
     435            "keywords": [
     436                "factory",
     437                "http",
     438                "message",
     439                "psr",
     440                "psr-17",
     441                "psr-7",
     442                "request",
     443                "response"
     444            ],
     445            "support": {
     446                "source": "https://github.com/php-fig/http-factory"
     447            },
     448            "install-path": "../psr/http-factory"
     449        },
     450        {
     451            "name": "psr/http-message",
     452            "version": "2.0",
     453            "version_normalized": "2.0.0.0",
     454            "source": {
     455                "type": "git",
     456                "url": "https://github.com/php-fig/http-message.git",
     457                "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71"
     458            },
     459            "dist": {
     460                "type": "zip",
     461                "url": "https://api.github.com/repos/php-fig/http-message/zipball/402d35bcb92c70c026d1a6a9883f06b2ead23d71",
     462                "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71",
     463                "shasum": ""
     464            },
     465            "require": {
     466                "php": "^7.2 || ^8.0"
     467            },
     468            "time": "2023-04-04T09:54:51+00:00",
     469            "type": "library",
     470            "extra": {
     471                "branch-alias": {
     472                    "dev-master": "2.0.x-dev"
     473                }
     474            },
     475            "installation-source": "dist",
     476            "autoload": {
     477                "psr-4": {
     478                    "Psr\\Http\\Message\\": "src/"
     479                }
     480            },
     481            "notification-url": "https://packagist.org/downloads/",
     482            "license": [
     483                "MIT"
     484            ],
     485            "authors": [
     486                {
     487                    "name": "PHP-FIG",
     488                    "homepage": "https://www.php-fig.org/"
     489                }
     490            ],
     491            "description": "Common interface for HTTP messages",
     492            "homepage": "https://github.com/php-fig/http-message",
     493            "keywords": [
     494                "http",
     495                "http-message",
     496                "psr",
     497                "psr-7",
     498                "request",
     499                "response"
     500            ],
     501            "support": {
     502                "source": "https://github.com/php-fig/http-message/tree/2.0"
     503            },
     504            "install-path": "../psr/http-message"
     505        },
    3506        {
    4507            "name": "ralouphie/getallheaders",
     
    47550            },
    48551            "install-path": "../ralouphie/getallheaders"
     552        },
     553        {
     554            "name": "symfony/deprecation-contracts",
     555            "version": "v3.5.0",
     556            "version_normalized": "3.5.0.0",
     557            "source": {
     558                "type": "git",
     559                "url": "https://github.com/symfony/deprecation-contracts.git",
     560                "reference": "0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1"
     561            },
     562            "dist": {
     563                "type": "zip",
     564                "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1",
     565                "reference": "0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1",
     566                "shasum": ""
     567            },
     568            "require": {
     569                "php": ">=8.1"
     570            },
     571            "time": "2024-04-18T09:32:20+00:00",
     572            "type": "library",
     573            "extra": {
     574                "branch-alias": {
     575                    "dev-main": "3.5-dev"
     576                },
     577                "thanks": {
     578                    "name": "symfony/contracts",
     579                    "url": "https://github.com/symfony/contracts"
     580                }
     581            },
     582            "installation-source": "dist",
     583            "autoload": {
     584                "files": [
     585                    "function.php"
     586                ]
     587            },
     588            "notification-url": "https://packagist.org/downloads/",
     589            "license": [
     590                "MIT"
     591            ],
     592            "authors": [
     593                {
     594                    "name": "Nicolas Grekas",
     595                    "email": "p@tchwork.com"
     596                },
     597                {
     598                    "name": "Symfony Community",
     599                    "homepage": "https://symfony.com/contributors"
     600                }
     601            ],
     602            "description": "A generic function and convention to trigger deprecation notices",
     603            "homepage": "https://symfony.com",
     604            "support": {
     605                "source": "https://github.com/symfony/deprecation-contracts/tree/v3.5.0"
     606            },
     607            "funding": [
     608                {
     609                    "url": "https://symfony.com/sponsor",
     610                    "type": "custom"
     611                },
     612                {
     613                    "url": "https://github.com/fabpot",
     614                    "type": "github"
     615                },
     616                {
     617                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
     618                    "type": "tidelift"
     619                }
     620            ],
     621            "install-path": "../symfony/deprecation-contracts"
    49622        }
    50623    ],
  • paypal-brasil-para-woocommerce/trunk/vendor/composer/installed.php

    r3170993 r3181756  
    44        'pretty_version' => 'dev-master',
    55        'version' => 'dev-master',
    6         'reference' => '6307aa68d452a619473e624a07e51aa3d6b81e5a',
     6        'reference' => 'fb7b6791eeaca1828003ba4efefe5cf9fd665ab0',
    77        'type' => 'library',
    88        'install_path' => __DIR__ . '/../../',
     
    1414            'pretty_version' => 'dev-master',
    1515            'version' => 'dev-master',
    16             'reference' => '6307aa68d452a619473e624a07e51aa3d6b81e5a',
     16            'reference' => 'fb7b6791eeaca1828003ba4efefe5cf9fd665ab0',
    1717            'type' => 'library',
    1818            'install_path' => __DIR__ . '/../../',
    1919            'aliases' => array(),
    2020            'dev_requirement' => false,
     21        ),
     22        'guzzlehttp/guzzle' => array(
     23            'pretty_version' => '7.9.2',
     24            'version' => '7.9.2.0',
     25            'reference' => 'd281ed313b989f213357e3be1a179f02196ac99b',
     26            'type' => 'library',
     27            'install_path' => __DIR__ . '/../guzzlehttp/guzzle',
     28            'aliases' => array(),
     29            'dev_requirement' => false,
     30        ),
     31        'guzzlehttp/promises' => array(
     32            'pretty_version' => '2.0.4',
     33            'version' => '2.0.4.0',
     34            'reference' => 'f9c436286ab2892c7db7be8c8da4ef61ccf7b455',
     35            'type' => 'library',
     36            'install_path' => __DIR__ . '/../guzzlehttp/promises',
     37            'aliases' => array(),
     38            'dev_requirement' => false,
     39        ),
     40        'guzzlehttp/psr7' => array(
     41            'pretty_version' => '2.7.0',
     42            'version' => '2.7.0.0',
     43            'reference' => 'a70f5c95fb43bc83f07c9c948baa0dc1829bf201',
     44            'type' => 'library',
     45            'install_path' => __DIR__ . '/../guzzlehttp/psr7',
     46            'aliases' => array(),
     47            'dev_requirement' => false,
     48        ),
     49        'psr/http-client' => array(
     50            'pretty_version' => '1.0.3',
     51            'version' => '1.0.3.0',
     52            'reference' => 'bb5906edc1c324c9a05aa0873d40117941e5fa90',
     53            'type' => 'library',
     54            'install_path' => __DIR__ . '/../psr/http-client',
     55            'aliases' => array(),
     56            'dev_requirement' => false,
     57        ),
     58        'psr/http-client-implementation' => array(
     59            'dev_requirement' => false,
     60            'provided' => array(
     61                0 => '1.0',
     62            ),
     63        ),
     64        'psr/http-factory' => array(
     65            'pretty_version' => '1.1.0',
     66            'version' => '1.1.0.0',
     67            'reference' => '2b4765fddfe3b508ac62f829e852b1501d3f6e8a',
     68            'type' => 'library',
     69            'install_path' => __DIR__ . '/../psr/http-factory',
     70            'aliases' => array(),
     71            'dev_requirement' => false,
     72        ),
     73        'psr/http-factory-implementation' => array(
     74            'dev_requirement' => false,
     75            'provided' => array(
     76                0 => '1.0',
     77            ),
     78        ),
     79        'psr/http-message' => array(
     80            'pretty_version' => '2.0',
     81            'version' => '2.0.0.0',
     82            'reference' => '402d35bcb92c70c026d1a6a9883f06b2ead23d71',
     83            'type' => 'library',
     84            'install_path' => __DIR__ . '/../psr/http-message',
     85            'aliases' => array(),
     86            'dev_requirement' => false,
     87        ),
     88        'psr/http-message-implementation' => array(
     89            'dev_requirement' => false,
     90            'provided' => array(
     91                0 => '1.0',
     92            ),
    2193        ),
    2294        'ralouphie/getallheaders' => array(
     
    29101            'dev_requirement' => false,
    30102        ),
     103        'symfony/deprecation-contracts' => array(
     104            'pretty_version' => 'v3.5.0',
     105            'version' => '3.5.0.0',
     106            'reference' => '0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1',
     107            'type' => 'library',
     108            'install_path' => __DIR__ . '/../symfony/deprecation-contracts',
     109            'aliases' => array(),
     110            'dev_requirement' => false,
     111        ),
    31112    ),
    32113);
  • paypal-brasil-para-woocommerce/trunk/vendor/composer/platform_check.php

    r3129049 r3181756  
    55$issues = array();
    66
    7 if (!(PHP_VERSION_ID >= 50600)) {
    8     $issues[] = 'Your Composer dependencies require a PHP version ">= 5.6.0". You are running ' . PHP_VERSION . '.';
     7if (!(PHP_VERSION_ID >= 80100)) {
     8    $issues[] = 'Your Composer dependencies require a PHP version ">= 8.1.0". You are running ' . PHP_VERSION . '.';
    99}
    1010
Note: See TracChangeset for help on using the changeset viewer.