diff --git a/.codeclimate.yml b/.codeclimate.yml new file mode 100644 index 0000000..775e747 --- /dev/null +++ b/.codeclimate.yml @@ -0,0 +1,86 @@ +--- +version: "2" +checks: + argument-count: + enabled: true + config: + threshold: 4 + languages: + - javascript + - php + complex-logic: + enabled: true + config: + threshold: 4 + languages: + - javascript + - php + file-lines: + enabled: true + config: + threshold: 250 + languages: + - javascript + - php + method-complexity: + enabled: true + config: + threshold: 5 + languages: + - javascript + - php + method-count: + enabled: true + config: + threshold: 10 + languages: + - javascript + - php + method-lines: + enabled: true + config: + threshold: 40 + languages: + - javascript + - php + nested-control-flow: + enabled: true + config: + threshold: 4 + languages: + - javascript + - php + return-statements: + enabled: true + config: + threshold: 2 + languages: + - javascript + - php + similar-code: + enabled: true + config: + threshold: 999 + languages: + - javascript + - php + identical-code: + enabled: true + config: + threshold: 40 + languages: + - javascript + - php +plugins: + eslint: + enabled: true + fixme: + enabled: true + phan: + enabled: true + config: + file_extensions: php + ignore-undeclared: true +exclude_patterns: + - "vendor/*" + - "view/base/web/js/view/payment/lib/*" \ No newline at end of file diff --git a/.eslintrc b/.eslintrc new file mode 100644 index 0000000..b02729c --- /dev/null +++ b/.eslintrc @@ -0,0 +1,99 @@ +{ + "env": { + "amd": true, + "browser": true, + "es6": true, + "jasmine": true, + "jquery": true, + "prototypejs": true, + "node": true + }, + "rules": { + "comma-dangle": [2, "never"], + "comma-style": [2, "last"], + "curly": [2, "all"], + "eol-last": 2, + "eqeqeq": [2, "smart"], + "guard-for-in": 2, + "keyword-spacing": [2, {}], + "lines-around-comment": [ + 2, + { + "beforeBlockComment": true, + "allowBlockStart": true, + "allowObjectStart": true + } + ], + "max-depth": [2, 2], + "max-len": [2, 120, 4], + "max-nested-callbacks": [2, 3], + "newline-after-var": 2, + "no-alert": 2, + "no-array-constructor": 2, + "no-caller": 2, + "no-catch-shadow": 2, + "no-cond-assign": 2, + "no-constant-condition": 2, + "no-debugger": 2, + "no-else-return": 2, + "no-empty": [2, {"allowEmptyCatch": true}], + "no-eval": 2, + "no-ex-assign": 2, + "no-extend-native": 2, + "no-extra-bind": 2, + "no-extra-boolean-cast": 2, + "no-extra-parens": 2, + "no-extra-semi": 2, + "no-fallthrough": 2, + "no-floating-decimal": 2, + "no-func-assign": 2, + "no-implied-eval": 2, + "no-inner-declarations": 2, + "no-invalid-regexp": 2, + "no-lone-blocks": 2, + "no-lonely-if": 2, + "no-loop-func": 2, + "no-mixed-spaces-and-tabs": 2, + "no-multi-str": 2, + "no-multiple-empty-lines": 2, + "no-native-reassign": 2, + "no-negated-in-lhs": 2, + "no-new-object": 2, + "no-proto": 2, + "no-redeclare": 2, + "no-regex-spaces": 2, + "no-return-assign": 2, + "no-self-compare": 2, + "no-shadow": 2, + "no-trailing-spaces": 2, + "no-undef": 2, + "no-undef-init": 2, + "no-unreachable": 2, + "no-unused-vars": [ + 2, + { + "args": "after-used", + "vars": "all", + "varsIgnorePattern": "config" + } + ], + "no-use-before-define": 2, + "no-with": 2, + "one-var": [2, "always"], + "operator-assignment": [2, "always"], + "quotes": [2, "single"], + "radix": 2, + "semi": [2, "always"], + "semi-spacing": 2, + "space-before-blocks": [2, "always"], + "space-before-function-paren": [2, {"anonymous": "always", "named": "never", "asyncArrow": "always"}], + "space-in-parens": [2, "never"], + "space-infix-ops": 2, + "space-unary-ops": [2, {"words": false, "nonwords": false}], + "strict": ["error", "function"], + "use-isnan": 2, + "valid-typeof": 2, + "vars-on-top": 2, + "yoda": [2, "never"] + } +} \ No newline at end of file diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..c335f94 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,11 @@ +# git files +/.github export-ignore +/.gitattributes export-ignore + +# git path +/.github export-ignore + +# build chain +/.codeclimate.yml export-ignore +/.scrutinizer.yml export-ignore +/.travis.yml export-ignore \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/bug-report.yml b/.github/ISSUE_TEMPLATE/bug-report.yml new file mode 100644 index 0000000..af5c1b0 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug-report.yml @@ -0,0 +1,75 @@ +name: 🐞 Report a bug +description: Technical issue with the module or integration +title: "[Bug]: " +labels: ["Bug","Needs Triage"] +body: + - type: markdown + attributes: + value: | + Thanks for taking the time to fill out this bug report! + - type: input + id: contact + attributes: + label: Contact details + description: How can we contact you if we need more information? + placeholder: ex. email@example.com + validations: + required: false + - type: textarea + id: what-happened + attributes: + label: What happened? + description: Also tell us what you expected to happen and what the result was! + placeholder: Tell us what the result was! + value: "A bug has happened!" + validations: + required: true + - type: dropdown + id: version + attributes: + label: Magento version + description: And what is your magento version? + options: + - 2.3.x (Magento >= 2.3.0 e < 2.4.0) + - 2.4.x (Magento >= 2.4.0) + validations: + required: true + - type: dropdown + id: browsers + attributes: + label: Could the problem be related to a specific browser? + multiple: true + options: + - It has nothing to do with the browser used + - Firefox + - Chrome + - Safari + - Microsoft Edge + - type: textarea + id: logs + attributes: + label: Are there relevant logs about the problem? + description: Copy and paste any relevant log output. This will be automatically formatted in code, so no need for backticks. + placeholder: If it is active, our log is in var/log/payment.log, also consider sending the var/log/exception.log + render: shell + - type: checkboxes + id: privacy + attributes: + label: My log does not contain confidential information + description: By reporting this issue, I understand that there is no privacy violation in the data submitted in the log provided above. + options: + - label: I am not sending data that violates the privacy of the customer or the store. + required: true + - type: dropdown + id: Severity + attributes: + label: What is the severity of the problem? + multiple: true + options: + - The store was offline + - No customer can make a payment + - One of the payment methods is not working + - I could not configure the module + - I couldn't install the module + validations: + required: true diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..227d20a --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,19 @@ +--- +name: 🚀 New Feature Request +about: Describe features you want to see in the module +labels: 'feature request' + +--- + + + +### Description (*) + + +### Expected behavior (*) + + +### Additional Information + \ No newline at end of file diff --git a/.github/config.yml b/.github/config.yml new file mode 100644 index 0000000..a49eab2 --- /dev/null +++ b/.github/config.yml @@ -0,0 +1 @@ +blank_issues_enabled: true \ No newline at end of file diff --git a/.github/require-dev-install.sh b/.github/require-dev-install.sh new file mode 100644 index 0000000..7fcffcb --- /dev/null +++ b/.github/require-dev-install.sh @@ -0,0 +1 @@ +composer require fooman/magento2-phpunit-bridge --no-update \ No newline at end of file diff --git a/.github/workflows/ESLint.yml b/.github/workflows/ESLint.yml new file mode 100644 index 0000000..ce38145 --- /dev/null +++ b/.github/workflows/ESLint.yml @@ -0,0 +1,14 @@ +name: Run ESLint +on: [pull_request] + +jobs: + build: + name: Run ESLint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 16 + - run: npm install -g eslint + - run: eslint \ No newline at end of file diff --git a/.github/workflows/magento-coding-quality.yml b/.github/workflows/magento-coding-quality.yml new file mode 100644 index 0000000..7510c59 --- /dev/null +++ b/.github/workflows/magento-coding-quality.yml @@ -0,0 +1,10 @@ +name: Magento Coding Quality +on: [pull_request] + +jobs: + phpcs: + name: PHP Coding Quality + runs-on: ubuntu-latest + steps: + - name: PHP Coding Standard Magento2 + run: docker run --rm -v $PWD:/code:ro domw/phpcs phpcs --colors --standard=Magento2 --error-severity=1 -n ./ diff --git a/.github/workflows/phpcs.yml b/.github/workflows/phpcs.yml new file mode 100644 index 0000000..6aa86c7 --- /dev/null +++ b/.github/workflows/phpcs.yml @@ -0,0 +1,85 @@ +name: PHP Code Standards + +on: [pull_request] + +jobs: + validate-code-standards: + runs-on: ubuntu-latest + + services: + mysql: + image: mysql:latest + env: + MYSQL_DATABASE: magento_test + MYSQL_HOST: 127.0.0.1 + MYSQL_USER: magento + MYSQL_PASSWORD: p@ssw0rd1 + MYSQL_ROOT_PASSWORD: p@ssw0rd1 + ports: + - 3306:3306 + options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Install extensions gd and zip + run: sudo apt-get update && sudo apt-get install -y php8.1-gd && sudo apt-get install -y php8.1-zip + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: "8.1" + extensions: curl, dom, intl, json, openssl + coverage: xdebug + tools: phpmd + + - name: Verify PHP Installation + run: php -v + + - name: Get Composer cache directory + id: composer-cache + run: echo "::set-output name=dir::$(composer config cache-files-dir)" + + - name: Setup cache + uses: pat-s/always-upload-cache@v1.1.4 + env: + COMPOSER_AUTH: ${{secrets.COMPOSER_AUTH}} + with: + path: ${{ steps.composer-cache.outputs.dir }} + key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} + restore-keys: ${{ runner.os }}-composer- + + - name: Install & Build Magento + id: build-magento + run: bash bin/install-mg2.sh + + - name: Install MP Plugin + id: install-plugin + run: mkdir magento2/app/code/MercadoPago/ && mkdir magento2/app/code/MercadoPago/AdbPayment/ && mv $(ls --ignore='bin' --ignore='.github' --ignore='magento2') magento2/app/code/MercadoPago/AdbPayment && ls + + - name: Download PHPStan composer dependencies + id: phpstan-composer-dependencies + env: + COMPOSER_AUTH: ${{secrets.COMPOSER_AUTH}} + run: cd magento2 && composer require --dev phpstan/phpstan + + - name: Config Warnings Exit + id: phpcs-warning-configs + run: magento2/vendor/bin/phpcs --config-set ignore_warnings_on_exit 1 + + - name: Detect Coding Standard Violations + id: phpcs + run: magento2/vendor/bin/phpcs -qn --standard=Magento2 magento2/app/code/MercadoPago/ + + - name: Detect PHP Compatibility + id: phpcs_compatibility + run: magento2/vendor/bin/phpcs -qn --standard=PHPCompatibility --runtime-set testVersion 7.4-8.1 magento2/app/code/MercadoPago/ + + - name: PHPStan version + id: phpstan-version + run: magento2/vendor/bin/phpstan -V + + - name: PHPStan + id: phpstan + run: magento2/vendor/bin/phpstan analyse --error-format=table --level 1 magento2/app/code/MercadoPago/ diff --git a/.github/workflows/phpunit.yml b/.github/workflows/phpunit.yml new file mode 100644 index 0000000..954ed3f --- /dev/null +++ b/.github/workflows/phpunit.yml @@ -0,0 +1,72 @@ +name: PHPUnit + +on: [pull_request] + +jobs: + validate-tests: + runs-on: ubuntu-22.04 + + services: + mysql: + image: mysql:latest + env: + MYSQL_DATABASE: magento_test + MYSQL_HOST: 127.0.0.1 + MYSQL_USER: magento + MYSQL_PASSWORD: p@ssw0rd1 + MYSQL_ROOT_PASSWORD: p@ssw0rd1 + ports: + - 3306:3306 + options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Install extensions gd and zip + run: sudo apt-get update && sudo apt-get install -y php8.1-gd && sudo apt-get install -y php8.1-zip + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: "8.1" + extensions: curl, dom, intl, json, openssl + coverage: xdebug + + - name: Verify PHP Installation + run: php -v + + - name: Get Composer cache directory + id: composer-cache + run: echo "::set-output name=dir::$(composer config cache-files-dir)" + + - name: Setup cache + uses: pat-s/always-upload-cache@v1.1.4 + env: + COMPOSER_AUTH: ${{secrets.COMPOSER_AUTH}} + with: + path: ${{ steps.composer-cache.outputs.dir }} + key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} + restore-keys: ${{ runner.os }}-composer- + + - name: Install & Build Magento + id: build-magento + run: bash bin/install-mg2.sh + + - name: Install MP Plugin + id: install-plugin + run: mkdir magento2/app/code/MercadoPago/ && mkdir magento2/app/code/MercadoPago/AdbPayment/ && mv $(ls --ignore='bin' --ignore='.github' --ignore='magento2') magento2/app/code/MercadoPago/AdbPayment && ls + + - name: Run Unit Test + id: unit-test + run: magento2/vendor/phpunit/phpunit/phpunit --configuration magento2/app/code/MercadoPago/AdbPayment/phpunit.xml --coverage-clover clover.xml --coverage-text magento2/app/code/MercadoPago/AdbPayment/Tests + + - name: Repository Minimum Test Coverage + id: repository-coverage + run: php magento2/app/code/MercadoPago/AdbPayment/Tests/coverage-checker.php clover.xml 80 + + - name: Pull Request Coverage + id: pull-request-coverage + run: bash bin/pull-request-coverage.sh + env: + PR_NUMBER: ${{ github.event.number }} diff --git a/.github/workflows/versioning.yml b/.github/workflows/versioning.yml new file mode 100644 index 0000000..6eee7f2 --- /dev/null +++ b/.github/workflows/versioning.yml @@ -0,0 +1,26 @@ +name: Validate Versions + +on: [pull_request] + +jobs: + validate-versions: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: "8.1" + tools: composer + + - name: Verify PHP Installation + run: php -v + + - name: Validate Composer + run: composer validate + + - name: Validate Version + run: bash bin/validate-version.sh diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..52b6397 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +vendor +.phpunit.result.cache +testdoc.txt +.idea diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..391c3a5 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,8 @@ +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v3.2.0 + hooks: + - id: trailing-whitespace + - id: end-of-file-fixer + - id: check-yaml + - id: check-added-large-files diff --git a/.scrutinizer.yml b/.scrutinizer.yml new file mode 100644 index 0000000..8b7e696 --- /dev/null +++ b/.scrutinizer.yml @@ -0,0 +1,23 @@ +checks: + php: + code_rating: true + duplication: true + excluded_dependencies: + - magento/* + +filter: + excluded_paths: + - vendor + +build: + environment: + php: + version: 8.1 + dependencies: + before: + - 'echo "{\"http-basic\":{\"repo.magento.com\":{\"username\":\"${MAGENTO_USERNAME}\",\"password\":\"${MAGENTO_PASSWORD}\"}}}" > auth.json' + nodes: + analysis: + tests: + override: + - php-scrutinizer-run \ No newline at end of file diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..a0ed49b --- /dev/null +++ b/.travis.yml @@ -0,0 +1,16 @@ +language: php + +php: + - '8.1' + +install: [ + "echo \"{\\\"http-basic\\\":{\\\"repo.magento.com\\\":{\\\"username\\\":\\\"${MAGENTO_USERNAME}\\\",\\\"password\\\":\\\"${MAGENTO_PASSWORD}\\\"}}}\" > auth.json", + "composer install" +] + +cache: + directories: + - $HOME/.composer/cache + +script: + - vendor/bin/phpcs --standard=vendor/magento/magento-coding-standard/Magento2 --ignore=vendor ./ \ No newline at end of file diff --git a/Api/CreateVaultManagementInterface.php b/Api/CreateVaultManagementInterface.php new file mode 100644 index 0000000..e489ac8 --- /dev/null +++ b/Api/CreateVaultManagementInterface.php @@ -0,0 +1,30 @@ +getParentBlock()->getSource(); + } + + /** + * Get Invoice data. + * + * @return invoice + */ + public function getCreditmemo() + { + return $this->getParentBlock()->getCreditmemo(); + } + + /** + * Initialize payment finance cost totals. + * + * @return $this + */ + public function initTotals() + { + return $this; + } +} diff --git a/Block/Adminhtml/Sales/Order/Invoice/Totals/FinanceCost.php b/Block/Adminhtml/Sales/Order/Invoice/Totals/FinanceCost.php new file mode 100644 index 0000000..41bcee3 --- /dev/null +++ b/Block/Adminhtml/Sales/Order/Invoice/Totals/FinanceCost.php @@ -0,0 +1,48 @@ +getParentBlock()->getSource(); + } + + /** + * Get Invoice data. + * + * @return invoice + */ + public function getInvoice() + { + return $this->getParentBlock()->getInvoice(); + } + + /** + * Initialize payment finance cost totals. + * + * @return $this + */ + public function initTotals() + { + return $this; + } +} diff --git a/Block/Adminhtml/Sales/Order/Totals/FinanceCost.php b/Block/Adminhtml/Sales/Order/Totals/FinanceCost.php new file mode 100644 index 0000000..a44b55f --- /dev/null +++ b/Block/Adminhtml/Sales/Order/Totals/FinanceCost.php @@ -0,0 +1,95 @@ +source; + } + + /** + * Get Store. + * + * @return string + */ + public function getStore() + { + return $this->order->getStore(); + } + + /** + * Get Order. + * + * @return order + */ + public function getOrder() + { + return $this->order; + } + + /** + * Initialize payment finance cost totals. + * + * @return $this + */ + public function initTotals() + { + return $this; + } + + /** + * Get Subtotal label. + * + * @param string|null $financeCost + * + * @return Phrase + */ + public function getLabel($financeCost) + { + if ($financeCost >= 0) { + return __('Finance Cost'); + } + + return __('Discount for payment at sight'); + } +} diff --git a/Block/Adminhtml/System/Config/Form/Button.php b/Block/Adminhtml/System/Config/Form/Button.php new file mode 100644 index 0000000..3e68034 --- /dev/null +++ b/Block/Adminhtml/System/Config/Form/Button.php @@ -0,0 +1,138 @@ +request = $request; + $this->config = $config; + parent::__construct($context, $data); + } + + /** + * Set template. + * + * @return void + */ + protected function _construct() + { + parent::_construct(); + $this->setTemplate('MercadoPago_AdbPayment::system/config/form/field/button.phtml'); + } + + /** + * Get Web Site Id. + * + * @return int|null + */ + public function getWebsiteId() + { + return $this->request->getParam('website') ?: null; + } + + /** + * Get Web Site Id. + * + * @return int|null + */ + public function getStoreId() + { + return $this->request->getParam('store') ?: null; + } + + /** + * Generate button html. + * + * @return string + */ + public function getButtonHtml() + { + $storeId = $this->getStoreId(); + + if (!$storeId) { + $storeId = $this->getWebsiteId(); + } + + $siteId = $this->config->getMpSiteId($storeId); + $mpWebSite = $this->config->getMpWebSiteBySiteId($siteId); + $url = $mpWebSite.'costs-section#from-section=menu'; + + $button = $this->getLayout()->createBlock( + \Magento\Backend\Block\Widget\Button::class + )->setData( + [ + 'id' => 'installments_button', + 'label' => __('Set up installments and interest'), + 'onclick' => 'javascript:window.open(\''.$url.'\')', + ] + ); + + return $button->toHtml(); + } + + /** + * Render button. + * + * @param \Magento\Framework\Data\Form\Element\AbstractElement $element + * + * @return string + */ + public function render(\Magento\Framework\Data\Form\Element\AbstractElement $element) + { + // Remove scope label + $element->unsScope()->unsCanUseWebsiteValue()->unsCanUseDefaultValue(); + + return parent::render($element); + } + + /** + * Return element html. + * + * @param \Magento\Framework\Data\Form\Element\AbstractElement $element + * + * @return string + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + */ + protected function _getElementHtml(\Magento\Framework\Data\Form\Element\AbstractElement $element) + { + return $this->_toHtml(); + } +} diff --git a/Block/Adminhtml/System/Config/Form/ColorPicker.php b/Block/Adminhtml/System/Config/Form/ColorPicker.php new file mode 100644 index 0000000..cc43b39 --- /dev/null +++ b/Block/Adminhtml/System/Config/Form/ColorPicker.php @@ -0,0 +1,51 @@ +getElementHtml(); + $value = $this->escapeHtml($element->getData('value')); + + $html .= ''; + + return $html; + } +} diff --git a/Block/Customer/CardRenderer.php b/Block/Customer/CardRenderer.php new file mode 100644 index 0000000..83ba4b8 --- /dev/null +++ b/Block/Customer/CardRenderer.php @@ -0,0 +1,81 @@ +getPaymentMethodCode() === ConfigProviderCc::CODE; + } + + /** + * Get Last Numbers. + * + * @return string + */ + public function getNumberLast4Digits(): string + { + return $this->getTokenDetails()['card_last4']; + } + + /** + * Get Expiration Date. + * + * @return string + */ + public function getExpDate(): string + { + return $this->getTokenDetails()['card_exp_month'].'/'.$this->getTokenDetails()['card_exp_year']; + } + + /** + * Get Icon Url. + * + * @return string + */ + public function getIconUrl(): string + { + return $this->getIconForType($this->getTokenDetails()['card_type'])['url']; + } + + /** + * Get Icon Height. + * + * @return int + */ + public function getIconHeight(): int + { + return $this->getIconForType($this->getTokenDetails()['card_type'])['height']; + } + + /** + * Get Icon Width. + * + * @return int + */ + public function getIconWidth(): int + { + return $this->getIconForType($this->getTokenDetails()['card_type'])['width']; + } +} diff --git a/Block/Order/Success/Additional.php b/Block/Order/Success/Additional.php new file mode 100644 index 0000000..a1a776c --- /dev/null +++ b/Block/Order/Success/Additional.php @@ -0,0 +1,196 @@ +checkoutSession = $checkoutSession; + $this->orderConfig = $orderConfig; + $this->paymentConfig = $paymentConfig; + $this->httpContext = $httpContext; + $this->priceCurrency = $priceCurrency; + + $methodCode = $this->getMethodCode(); + + if ($methodCode === 'mercadopago_adbpayment_payment_methods_off') { + $this->setTemplate('MercadoPago_AdbPayment::order/success/payment-method-off.phtml'); + } elseif ($methodCode === 'mercadopago_adbpayment_pix') { + $this->setTemplate('MercadoPago_AdbPayment::order/success/pix.phtml'); + } elseif ($methodCode === 'mercadopago_adbpayment_twocc') { + $this->setTemplate('MercadoPago_AdbPayment::order/success/twocc.phtml'); + } elseif (strpos($methodCode, 'mercadopago_adbpayment') !== false) { + $this->setTemplate('MercadoPago_AdbPayment::order/success/default.phtml'); + } + } + + /** + * Get OrderId. + * + * @return string + */ + public function getOrderId() + { + $order = $this->checkoutSession->getLastRealOrder(); + + return $order->getIncrementId(); + } + + /** + * Get Payment. + * + * @return \Magento\Payment\Model\MethodInterface + */ + public function getPayment() + { + $order = $this->checkoutSession->getLastRealOrder(); + + return $order->getPayment()->getMethodInstance(); + } + + /** + * Method Code. + * + * @return string + */ + public function getMethodCode() + { + return $this->getPayment()->getCode(); + } + + /** + * Info payment. + * + * @param string $info + * + * @return string + */ + public function getInfo(string $info) + { + return $this->getPayment()->getInfoInstance()->getAdditionalInformation($info); + } + + /** + * Statement Descriptor. + * + * @return string + */ + public function getStatementDescriptor() + { + $storeId = (int) $this->checkoutSession->getLastRealOrder()->getStoreId(); + + return $this->paymentConfig->getStatementDescriptor($storeId); + } + + /** + * Title. + * + * @return string + */ + public function getTitleByPaymentStatus() + { + $status = $this->getInfo(self::MP_STATUS); + + if ($this->getMethodCode() === 'mercadopago_adbpayment_twocc' + && strcasecmp($status, self::STATUS_APPROVED) <> 0 + ) { + return self::TITLE_PROCESSING_ORDER; + } + + return self::TITLE_DEFAULT; + } + + /** + * Function getFormatedPrice + * + * @param float $price + * + * @return string + */ + public function getFormatedPrice($amount) + { + return $this->priceCurrency->convertAndFormat($amount); + } +} diff --git a/Block/Sales/Form/Card.php b/Block/Sales/Form/Card.php new file mode 100644 index 0000000..7076d62 --- /dev/null +++ b/Block/Sales/Form/Card.php @@ -0,0 +1,26 @@ +configCheckoutPro = $configCheckoutPro; + $this->sessionQuote = $sessionQuote; + } + + /** + * Get Backend Session Quote. + */ + public function getBackendSessionQuote() + { + return $this->sessionQuote->getQuote(); + } + + /** + * Title. + * + * @return string + */ + public function getTitle() + { + $storeId = $this->getBackendSessionQuote()->getStoreId(); + + return $this->configCheckoutPro->getTitle($storeId); + } + + /** + * Expiration. + * + * @return string + */ + public function getExpiration() + { + $storeId = $this->getBackendSessionQuote()->getStoreId(); + + return $this->configCheckoutPro->getExpirationFormat($storeId); + } + + /** + * Instruction. + * + * @return Phrase + */ + public function getInstruction() + { + $storeId = $this->getBackendSessionQuote()->getStoreId(); + + $text = $this->configCheckoutPro->getInstructionCheckout($storeId); + + return __($text); + } +} diff --git a/Block/Sales/Form/PaymentMethodsOff.php b/Block/Sales/Form/PaymentMethodsOff.php new file mode 100644 index 0000000..dfb2da7 --- /dev/null +++ b/Block/Sales/Form/PaymentMethodsOff.php @@ -0,0 +1,102 @@ +config = $config; + $this->configMethodsOff = $configMethodsOff; + $this->sessionQuote = $sessionQuote; + } + + /** + * Get Backend Session Quote. + */ + public function getBackendSessionQuote() + { + return $this->sessionQuote->getQuote(); + } + + /** + * Title. + * + * @return string + */ + public function getTitle() + { + $storeId = $this->getBackendSessionQuote()->getStoreId(); + + return $this->configMethodsOff->getTitle($storeId); + } + + /** + * Expiration. + * + * @return string + */ + public function getExpiration() + { + $storeId = $this->getBackendSessionQuote()->getStoreId(); + + return $this->configMethodsOff->getExpirationFormat($storeId); + } + + /** + * Mp Public Key. + * + * @return string + */ + public function getMpPublicKey() + { + $storeId = $this->getBackendSessionQuote()->getStoreId(); + + return $this->config->getMerchantGatewayClientId($storeId); + } + +} diff --git a/Block/Sales/Form/Pix.php b/Block/Sales/Form/Pix.php new file mode 100644 index 0000000..1dacf98 --- /dev/null +++ b/Block/Sales/Form/Pix.php @@ -0,0 +1,110 @@ +config = $config; + $this->configPix = $configPix; + $this->sessionQuote = $sessionQuote; + } + + /** + * Get Backend Session Quote. + */ + public function getBackendSessionQuote() + { + return $this->sessionQuote->getQuote(); + } + + /** + * Title. + * + * @return string + */ + public function getTitle() + { + $storeId = $this->getBackendSessionQuote()->getStoreId(); + + return $this->configPix->getTitle($storeId); + } + + /** + * Instruction. + * + * @return Phrase + */ + public function getInstruction() + { + $storeId = $this->getBackendSessionQuote()->getStoreId(); + + $time = $this->configPix->getExpirationTextFormatted($storeId); + $text = $this->configPix->getInstructionCheckout($storeId); + + return __($text, $time); + } + + /** + * Mp Public Key. + * + * @return string + */ + public function getMpPublicKey() + { + $storeId = $this->getBackendSessionQuote()->getStoreId(); + + return $this->config->getMerchantGatewayClientId($storeId); + } +} diff --git a/Block/Sales/Form/Pse.php b/Block/Sales/Form/Pse.php new file mode 100644 index 0000000..4dc8f2b --- /dev/null +++ b/Block/Sales/Form/Pse.php @@ -0,0 +1,151 @@ +config = $config; + $this->configPse = $configPse; + $this->sessionQuote = $sessionQuote; + } + + /** + * Get Backend Session Quote. + */ + public function getBackendSessionQuote() + { + return $this->sessionQuote->getQuote(); + } + + /** + * Title. + * + * @return string + */ + public function getTitle() + { + $storeId = $this->getBackendSessionQuote()->getStoreId(); + + return $this->configPse->getTitle($storeId); + } + + /** + * Expiration. + * + * @return string + */ + public function getExpiration() + { + $storeId = $this->getBackendSessionQuote()->getStoreId(); + + return $this->configPse->getExpirationFormat($storeId); + } + + /** + * Instruction. + * + * @return Phrase + */ + public function getInstruction() + { + $storeId = $this->getBackendSessionQuote()->getStoreId(); + + $text = $this->configPse->getInstructionCheckoutPse($storeId); + + return __($text); + } + + /** + * Mp Public Key. + * + * @return string + */ + public function getMpPublicKey() + { + $storeId = $this->getBackendSessionQuote()->getStoreId(); + + return $this->config->getMerchantGatewayClientId($storeId); + } + + /** + * Get Payment Method Id. + * + * @return string + */ + public function getPaymentMethodId() + { + return ConfigPse::PAYMENT_METHOD_ID; + } + + /** + * Get Options Finance. + */ + public function getOptionsFinancialInstitution() + { + $storeId = $this->getBackendSessionQuote()->getStoreId(); + + return $this->configPse->getListFinancialInstitution($storeId); + } + + /** + * Get Options Payer Entity Type. + */ + public function getOptionsPayerEntityType() + { + $storeId = $this->getBackendSessionQuote()->getStoreId(); + + return $this->configPse->getListPayerEntityTypes($storeId); + } +} diff --git a/Block/Sales/Form/Webpay.php b/Block/Sales/Form/Webpay.php new file mode 100644 index 0000000..9e4d6ca --- /dev/null +++ b/Block/Sales/Form/Webpay.php @@ -0,0 +1,141 @@ +config = $config; + $this->configWebpay = $configWebpay; + $this->sessionQuote = $sessionQuote; + } + + /** + * Get Backend Session Quote. + */ + public function getBackendSessionQuote() + { + return $this->sessionQuote->getQuote(); + } + + /** + * Title. + * + * @return string + */ + public function getTitle() + { + $storeId = $this->getBackendSessionQuote()->getStoreId(); + + return $this->configWebpay->getTitle($storeId); + } + + /** + * Expiration. + * + * @return string + */ + public function getExpiration() + { + $storeId = $this->getBackendSessionQuote()->getStoreId(); + + return $this->configWebpay->getExpirationFormat($storeId); + } + + /** + * Instruction. + * + * @return Phrase + */ + public function getInstruction() + { + $storeId = $this->getBackendSessionQuote()->getStoreId(); + + $text = $this->configWebpay->getInstructionCheckoutWebpay($storeId); + + return __($text); + } + + /** + * Mp Public Key. + * + * @return string + */ + public function getMpPublicKey() + { + $storeId = $this->getBackendSessionQuote()->getStoreId(); + + return $this->config->getMerchantGatewayClientId($storeId); + } + + /** + * Get Payment Method Id. + * + * @return string + */ + public function getPaymentMethodId() + { + return ConfigWebpay::PAYMENT_METHOD_ID; + } + + /** + * Get Options Finance. + */ + public function getOptionsFinancialInstitution() + { + $storeId = $this->getBackendSessionQuote()->getStoreId(); + + return $this->configWebpay->getListFinancialInstitution($storeId); + } +} diff --git a/Block/Sales/Info/Card.php b/Block/Sales/Info/Card.php new file mode 100644 index 0000000..d6f545c --- /dev/null +++ b/Block/Sales/Info/Card.php @@ -0,0 +1,55 @@ +priceCurrency = $priceCurrency; + } + + /** + * Function getFormatedPrice + * + * @param float $price + * + * @return string + */ + public function getFormatedPrice($amount) + { + return $this->priceCurrency->convertAndFormat($amount); + } +} diff --git a/Block/Sales/Info/CheckoutPro.php b/Block/Sales/Info/CheckoutPro.php new file mode 100644 index 0000000..fd86fc2 --- /dev/null +++ b/Block/Sales/Info/CheckoutPro.php @@ -0,0 +1,26 @@ +priceCurrency = $priceCurrency; + } + + /** + * Function getFormatedPrice + * + * @param float $price + * + * @return string + */ + public function getFormatedPrice($amount) + { + return $this->priceCurrency->convertAndFormat($amount); + } +} diff --git a/Block/Sales/Info/Webpay.php b/Block/Sales/Info/Webpay.php new file mode 100644 index 0000000..730e225 --- /dev/null +++ b/Block/Sales/Info/Webpay.php @@ -0,0 +1,26 @@ +source; + } + + /** + * Get Store. + * + * @return string + */ + public function getStore() + { + return $this->order->getStore(); + } + + /** + * Get Order. + * + * @return order + */ + public function getOrder() + { + return $this->order; + } + + /** + * Initialize payment finance cost totals. + * + * @return void + */ + public function initTotals() + { + $parent = $this->getParentBlock(); + $this->order = $parent->getOrder(); + $this->source = $parent->getSource(); + + if (!$this->source->getFinanceCostAmount() || (int) $this->source->getFinanceCostAmount() === 0) { + return $this; + } + + $financeCost = $this->source->getFinanceCostAmount(); + + $baseFinanceCost = $this->source->getBaseFinanceCostAmount(); + + $label = $this->getLabel($financeCost); + + $financeCostAmount = new DataObject( + [ + 'code' => 'finance_cost_amount', + 'strong' => false, + 'value' => $financeCost, + 'base_value' => $baseFinanceCost, + 'label' => $label, + ] + ); + + $parent->addTotal($financeCostAmount, 'finance_cost_amount'); + } + + /** + * Get Subtotal label. + * + * @param string|null $financeCost + * + * @return Phrase + */ + public function getLabel($financeCost) + { + if ($financeCost >= 0) { + return __('Finance Cost'); + } + + return __('Discount for payment at sight'); + } +} diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..5425dc7 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,27 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [1.3.0] - 2023-06-13 +### Fixed +- Fixed manual capture flow +- Fixed refund flow +- Fixed the refund process and update information in notifications +- Fixed validation of color save in Checkout Pro options in admin +- Fix installments flickr + +## [1.2.1] - 2023-05-26 +### Update version management + +## [1.2.0] - 2023-05-25 +### Stable version + +## [1.1.0] - 2023-05-22 +### Added +- Improve refund flow + +## [1.0.0] - 2023-05-08 +### First Release diff --git a/Console/Command/Adminstrative/FetchMerchantInfo.php b/Console/Command/Adminstrative/FetchMerchantInfo.php new file mode 100644 index 0000000..897a283 --- /dev/null +++ b/Console/Command/Adminstrative/FetchMerchantInfo.php @@ -0,0 +1,83 @@ +state = $state; + $this->fetchMerchant = $fetchMerchant; + parent::__construct(); + } + + /** + * Execute. + * + * @param InputInterface $input + * @param OutputInterface $output + */ + protected function execute( + InputInterface $input, + OutputInterface $output + ) { + $this->state->setAreaCode(\Magento\Framework\App\Area::AREA_ADMINHTML); + $this->fetchMerchant->setOutput($output); + + $storeId = $input->getArgument(self::STORE_ID); + + return $this->fetchMerchant->fetch($storeId); + } + + /** + * Configure. + * + * @return void + */ + protected function configure() + { + $this->setName('mercadopago:admin:fetch_merchant_info'); + $this->setDescription('Fetch Merchant Account Information'); + $this->setDefinition( + [new InputArgument(self::STORE_ID, InputArgument::OPTIONAL, 'Store Id')] + ); + parent::configure(); + } +} diff --git a/Console/Command/Adminstrative/PaymentExpirations.php b/Console/Command/Adminstrative/PaymentExpirations.php new file mode 100644 index 0000000..59b1b28 --- /dev/null +++ b/Console/Command/Adminstrative/PaymentExpirations.php @@ -0,0 +1,92 @@ +state = $state; + $this->paymentExpiration = $paymentExpiration; + parent::__construct(); + } + + /** + * Execute. + * + * @param InputInterface $input + * @param OutputInterface $output + */ + protected function execute( + InputInterface $input, + OutputInterface $output + ) { + $this->state->setAreaCode(\Magento\Framework\App\Area::AREA_ADMINHTML); + $this->paymentExpiration->setOutput($output); + + $preferenceId = $input->getArgument(self::PREFERENCE_ID); + $storeId = $input->getArgument(self::STORE_ID); + + return $this->paymentExpiration->expire($preferenceId, $storeId); + } + + /** + * Configure. + * + * @return void + */ + protected function configure() + { + $this->setName('mercadopago:admin:expire_payment'); + $this->setDescription('Set Expired Payment'); + $this->setDefinition( + [ + new InputArgument(self::PREFERENCE_ID, InputArgument::REQUIRED, 'Preference Id'), + new InputArgument(self::STORE_ID, InputArgument::REQUIRED, 'Store Id'), + ] + ); + parent::configure(); + } +} diff --git a/Console/Command/Notification/CheckoutProAddChild.php b/Console/Command/Notification/CheckoutProAddChild.php new file mode 100644 index 0000000..cfd92df --- /dev/null +++ b/Console/Command/Notification/CheckoutProAddChild.php @@ -0,0 +1,92 @@ +state = $state; + $this->checkoutProAddChild = $checkoutProAddChild; + parent::__construct(); + } + + /** + * Execute. + * + * @param InputInterface $input + * @param OutputInterface $output + */ + protected function execute( + InputInterface $input, + OutputInterface $output + ) { + $this->state->setAreaCode(\Magento\Framework\App\Area::AREA_ADMINHTML); + $this->checkoutProAddChild->setOutput($output); + + $orderId = $input->getArgument(self::ORDER_ID); + $transactionId = $input->getArgument(self::CHILD); + + return $this->checkoutProAddChild->add($orderId, $transactionId); + } + + /** + * Configure. + * + * @return void + */ + protected function configure() + { + $this->setName('mercadopago:order:checkout_pro_add_child'); + $this->setDescription('Fetch Order Checkout Pro'); + $this->setDefinition( + [ + new InputArgument(self::ORDER_ID, InputArgument::REQUIRED, 'Order Id'), + new InputArgument(self::CHILD, InputArgument::REQUIRED, 'Child Transaction Id'), + ] + ); + parent::configure(); + } +} diff --git a/Console/Command/Notification/FetchOrderStatus.php b/Console/Command/Notification/FetchOrderStatus.php new file mode 100644 index 0000000..79c347c --- /dev/null +++ b/Console/Command/Notification/FetchOrderStatus.php @@ -0,0 +1,83 @@ +state = $state; + $this->fetchStatus = $fetchStatus; + parent::__construct(); + } + + /** + * Execute. + * + * @param InputInterface $input + * @param OutputInterface $output + */ + protected function execute( + InputInterface $input, + OutputInterface $output + ) { + $this->state->setAreaCode(\Magento\Framework\App\Area::AREA_ADMINHTML); + $this->fetchStatus->setOutput($output); + + $orderId = $input->getArgument(self::ORDER_ID); + + return $this->fetchStatus->fetch($orderId); + } + + /** + * Configure. + * + * @return void + */ + protected function configure() + { + $this->setName('mercadopago:order:fetch_status'); + $this->setDescription('Fetch Order Status'); + $this->setDefinition( + [new InputArgument(self::ORDER_ID, InputArgument::REQUIRED, 'Order Id')] + ); + parent::configure(); + } +} diff --git a/Controller/MpIndex.php b/Controller/MpIndex.php new file mode 100644 index 0000000..b734236 --- /dev/null +++ b/Controller/MpIndex.php @@ -0,0 +1,421 @@ +config = $config; + $this->json = $json; + $this->searchCriteria = $searchCriteria; + $this->transaction = $transaction; + $this->orderRepository = $orderRepository; + $this->pageFactory = $pageFactory; + $this->resultJsonFactory = $resultJsonFactory; + $this->logger = $logger; + $this->fetchStatus = $fetchStatus; + $this->notifierPool = $notifierPool; + $this->creditMemoFactory = $creditMemoFactory; + $this->creditMemoService = $creditMemoService; + $this->invoice = $invoice; + $this->addChildPayment = $addChildPayment; + $this->mpApiNotification = $mpApiNotification; + } + + /** + * Get Order Data. + * + * @param string $orderId + * + * @return OrderRepository|ResultInterface + */ + public function getOrderData($orderId) + { + try { + /** @var OrderRepository $order */ + $order = $this->orderRepository->get($orderId); + } catch (Exception $exc) { + return $this->createResult( + 500, + [ + 'error' => 500, + 'message' => $exc->getMessage(), + ] + ); + } + + return $order; + } + + /** + * Create Result. + * + * @param int $statusCode + * @param array $data + * + * @return ResultInterface + */ + public function createResult($statusCode, $data) + { + /** @var JsonFactory $resultPage */ + $resultPage = $this->resultJsonFactory->create(); + $resultPage->setHttpResponseCode($statusCode); + $resultPage->setData($data); + + return $resultPage; + } + + /** + * Filter Invalid Notification. + * + * @param string $mpStatus + * @param OrderRepository $order + * @param string|null $mpAmountRefound + * + * @return array + */ + public function filterInvalidNotification( + $mpStatus, + $order, + $refundId, + $mpAmountRefound = null, + $origin = null + ) { + $result = []; + + if (!$order->getEntityId()) { + $result = [ + 'isInvalid' => true, + 'code' => 406, + 'msg' => __('Order not found.'), + ]; + + return $result; + } + + if ($mpStatus === 'refunded') { + if (isset($origin) && $origin === 'magento') { + $result = [ + 'isInvalid' => true, + 'code' => 200, + 'msg' => 'Notification response for online refund created in magento', + ]; + return $result; + } + if ($order->getState() !== \Magento\Sales\Model\Order::STATE_CLOSED) { + $storeId = $order->getStoreId(); + $applyRefund = $this->config->isApplyRefund($storeId); + + if ($applyRefund) { + $result = $this->refund($order, $refundId, $mpAmountRefound); + + $header = __('Mercado Pago, refund notification'); + + $description = $result['description']; + + $this->notifierPool->addCritical($header, $description); + + return $result; + } + + $result = [ + 'isInvalid' => true, + 'code' => 200, + 'msg' => __('Unable to apply refund.'), + ]; + + return $result; + } + + if ($order->getState() === \Magento\Sales\Model\Order::STATE_CLOSED) {{ + $header = __('Mercado Pago, refund notification'); + + $description = __( + 'Invalid notification. The order %1 has already been closed.', + $order->getIncrementId() + ); + + $this->notifierPool->addCritical($header, $description); + + $result = [ + 'isInvalid' => true, + 'code' => 200, + 'msg' => 'Refund notification for order already closed.', + ]; + + return $result; + }} + + $result = [ + 'isInvalid' => true, + 'code' => 412, + 'msg' => __('Unavailable.'), + ]; + + return $result; + } + + if ($order->getState() === \Magento\Sales\Model\Order::STATE_CLOSED) { + $result = [ + 'isInvalid' => true, + 'code' => 412, + 'msg' => [ + 'error' => 412, + 'message' => __('Unavailable.'), + 'state' => $order->getState(), + ], + ]; + + return $result; + } + + $result = [ + 'isInvalid' => false, + ]; + + return $result; + } + + /** + * Checkout Pro Add Child Information. + * + * @param int $orderId + * @param string $childId + * + * @return void + */ + public function checkoutProAddChildInformation( + $orderId, + $childId + ) { + $this->addChildPayment->add($orderId, $childId); + } + + /** + * Refund Transction. + * + * @param OrderInterface $order + * @param string|null $mpAmountRefound + * + * @throws \Magento\Framework\Exception\LocalizedException + * + * @return array|null + */ + public function refund( + OrderInterface $order, + $refundId, + $mpAmountRefound = null + ) { + $invoices = $order->getInvoiceCollection(); + + if (count($invoices) == 0) { + return; + } + + foreach ($invoices as $invoice) { + $invoice = $this->invoice->loadByIncrementId($invoice->getIncrementId()); + $creditMemo = $this->creditMemoFactory->createByOrder($order); + + $payment = $order->getPayment(); + $payment->setTransactionId($refundId); + $payment->setIsTransactionClosed(true); + + if ($mpAmountRefound < $creditMemo->getBaseGrandTotal()) { + $creditMemo->setItems([]); + } + + $payment->addTransaction(Transaction::TYPE_REFUND); + $order->save(); + + $creditMemo->setState(1); + $creditMemo->setBaseGrandTotal($mpAmountRefound); + $creditMemo->setGrandTotal($mpAmountRefound); + $creditMemo->addComment(__('Order refunded in Mercado Pago, refunded offline in the store.')); + + try { + $this->creditMemoService->refund($creditMemo, false); + $result = [ + 'isInvalid' => true, + 'code' => 200, + 'msg' => 'Refund notification for order refunded directly in Mercado Pago.', + 'description' => __('The order %1, was refunded directly on Mercado Pago, you need to check stock of sold items.', + $order->getIncrementId()), + ]; + } catch (Exception $exc) { + $result = [ + 'isInvalid' => true, + 'code' => 200, + 'msg' => 'Failed to process refund notification.', + 'description' => __('The order %1, was refunded directly on Mercado Pago, but an error occured when refunding offline, you need to check order refunds and stock of sold items.', + $order->getIncrementId()), + ]; + } + $order->addCommentToStatusHistory(__('Order refunded.')); + + return $result; + } + } + + protected function loadNotificationData(): array + { + $response = $this->getRequest()->getContent(); + $mercadopagoData = $this->json->unserialize($response); + + $this->logger->debug([ + 'action' => 'checkout_custom', + 'payload' => $response + ]); + + $storeId = isset($mercadopagoData["payments_metadata"]["store_id"]) ? $mercadopagoData["payments_metadata"]["store_id"] : 1; + $notificationId = $mercadopagoData['notification_id']; + + return $this->mpApiNotification->get($notificationId, $storeId); + } +} diff --git a/Controller/Notification/CheckoutCustom.php b/Controller/Notification/CheckoutCustom.php new file mode 100644 index 0000000..7673c2d --- /dev/null +++ b/Controller/Notification/CheckoutCustom.php @@ -0,0 +1,243 @@ +getRequest()->isPost()) { + return $this->createResult( + 404, + [ + 'error' => 404, + 'message' => __('You should not be here...'), + ] + ); + } + + try { + $mercadopagoData = $this->loadNotificationData(); + } catch(\Exception $e) { + return $this->createResult( + 500, + [ + 'error' => 500, + 'message' => $e->getMessage(), + ] + ); + } + + $mpTransactionId = $mercadopagoData['transaction_id']; + $mpStatus = $mercadopagoData['status']; + $notificationId = $mercadopagoData['notification_id']; + $paymentsDetails = $mercadopagoData['payments_details']; + + if ($mpStatus === 'refunded' && !empty($mercadopagoData["multiple_payment_transaction_id"])) { + $mpTransactionId = $mercadopagoData["multiple_payment_transaction_id"]; + } + + return $this->initProcess($mpTransactionId, $mpStatus, $notificationId, $paymentsDetails, $mercadopagoData); + } + + /** + * Init Process. + * + * @param string $mpTransactionId + * @param string $mpStatus + * @param string $notificationId + * @param $respData + * + * @return ResultInterface + */ + public function initProcess( + $mpTransactionId, + $mpStatus, + $notificationId, + $paymentsDetails, + $respData = null + ) { + $searchCriteria = $this->searchCriteria->addFilter('txn_id', $mpTransactionId) + ->create(); + + try { + /** @var TransactionRepositoryInterface $transactions */ + $transactions = $this->transaction->getList($searchCriteria)->getItems(); + } catch (Exception $exc) { + /** @var ResultInterface $result */ + return $this->createResult( + 500, + [ + 'error' => 500, + 'message' => $exc->getMessage(), + ] + ); + } + + $origin = ''; + $results = []; + $mpAmountRefund = null; + $process = []; + $resultData = []; + $refundId = null; + + foreach ($transactions as $transaction) { + if ($mpStatus == 'approved' && $transaction->getTxnType() == 'capture') { + continue; + } + + $order = $this->getOrderData($transaction->getOrderId()); + + if ($mpStatus === 'refunded') { + foreach ($paymentsDetails as $paymentsDetail) { + $refunds = $paymentsDetail['refunds']; + + foreach ($respData['refunds_notifying'] as $refundNotifying) { + if ( + isset($refunds[$refundNotifying['id']]) + && $refundNotifying['notifying'] + ) { + if (isset($refunds[$refundNotifying['id']]['metadata']['origem'])) { + $origin = $refunds[$refundNotifying['id']]['metadata']['origem']; + } + $mpAmountRefund = $refundNotifying['amount']; + $refundId = $refundNotifying['id']; + + $process = $this->processNotification($mpStatus, $order, $notificationId, $refundId, $mpAmountRefund, $origin); + + array_push($resultData, $process['msg']); + + if ($process['code'] !== 200) { + /** @var ResultInterface $result */ + return $this->createResult( + $process['code'], + $resultData + ); + } + } + } + } + } else { + $process = $this->processNotification($mpStatus, $order, $notificationId, $refundId, $mpAmountRefund, $origin); + + array_push($resultData, $process['msg']); + + if ($process['code'] !== 200) { + /** @var ResultInterface $result */ + return $this->createResult( + $process['code'], + $resultData + ); + } + } + + if (sizeof($resultData) === 0) { + /** @var ResultInterface $result */ + $result = $this->createResult( + 422, + 'Nothing to proccess' + ); + return $result; + } + } + + /** @var ResultInterface $result */ + $result = $this->createResult(200, ['empty' => null]); + + return $result; + } + + /** + * Process Notification. + * + * @param string $mpStatus + * @param OrderRepository $order + * @param string|null $mpAmountRefund + * @param string $notificationId + * + * @return array + */ + public function processNotification( + $mpStatus, + $order, + $notificationId, + $refundId, + $mpAmountRefund = null, + $origin = null + ) { + $result = []; + + $isNotApplicable = $this->filterInvalidNotification($mpStatus, $order, $refundId, $mpAmountRefund, $origin); + + if ($isNotApplicable['isInvalid']) { + if ( + strcmp($isNotApplicable['msg'], 'Refund notification for order refunded directly in Mercado Pago.') !== 0 + && strcmp($isNotApplicable['msg'], 'Refund notification for order already closed.') !== 0 + && strcmp($isNotApplicable['msg'], 'Notification response for online refund created in magento') !== 0 + ) { + return $isNotApplicable; + } + } + $order = $this->fetchStatus->fetch($order->getEntityId(), $notificationId); + + $result = [ + 'code' => 200, + 'msg' => [ + 'order' => $order->getIncrementId(), + 'state' => $order->getState(), + 'status' => $order->getStatus(), + ], + ]; + + return $result; + } +} diff --git a/Controller/Notification/CheckoutPro.php b/Controller/Notification/CheckoutPro.php new file mode 100644 index 0000000..5cc97c2 --- /dev/null +++ b/Controller/Notification/CheckoutPro.php @@ -0,0 +1,349 @@ +getRequest()->isPost()) { + return $this->createResult( + 404, + [ + 'error' => 404, + 'message' => __('You should not be here...'), + ] + ); + } + + $mpAmountRefund = null; + + try { + $mercadopagoData = $this->loadNotificationData(); + } catch(\Exception $e) { + return $this->createResult( + 500, + [ + 'error' => 500, + 'message' => $e->getMessage(), + ] + ); + } + + $mpTransactionId = $mercadopagoData['preference_id']; + $mpStatus = $mercadopagoData['status']; + $childTransactionId = $mercadopagoData['payments_details'][0]['id']; + $paymentsDetails = $mercadopagoData['payments_details']; + + if ($mpStatus !== 'approved' + && $mpStatus !== 'refunded' + && $mpStatus !== 'pending' + && $mpStatus !== 'cancelled' + && $mpStatus !== 'complete' + ) { + /** @var ResultInterface $result */ + $result = $this->createResult(200, ['empty' => null]); + return $result; + } + + if ($mpStatus === 'refunded' && !empty($mercadopagoData["multiple_payment_transaction_id"])) { + $mpTransactionId = $mercadopagoData["multiple_payment_transaction_id"]; + } + + $searchCriteria = $this->searchCriteria + ->addFilter('txn_id', $mpTransactionId) + ->addFilter('txn_type', 'order') + ->create(); + + try { + /** @var TransactionRepositoryInterface $transactions */ + $transactions = $this->transaction->getList($searchCriteria)->getItems(); + } catch (Exception $exc) { + return $this->createResult( + 500, + [ + 'error' => 500, + 'message' => $exc->getMessage(), + ] + ); + } + + $origin = ''; + $resultData = []; + $refundId = null; + + foreach ($transactions as $transaction) { + $order = $this->getOrderData($transaction->getOrderId()); + $payment = $order->getPayment(); + $transactionId = $payment->getLastTransId(); + + if ($mpStatus === 'refunded') { + foreach ($paymentsDetails as $paymentsDetail) { + $refunds = $paymentsDetail['refunds']; + + foreach ($mercadopagoData['refunds_notifying'] as $refundNotifying) { + if ( + isset($refunds[$refundNotifying['id']]) + && $refundNotifying['notifying'] + ) { + if (isset($refunds[$refundNotifying['id']]['metadata']['origem'])) { + $origin = $refunds[$refundNotifying['id']]['metadata']['origem']; + } + $mpAmountRefund = $refundNotifying['amount']; + $refundId = $refundNotifying['id']; + + $process = $this->processNotification( + $mpTransactionId, + $mpStatus, + $childTransactionId, + $order, + $refundId, + $mpAmountRefund, + $mercadopagoData, + $origin + ); + + array_push($resultData, $process['msg']); + + if ($process['code'] !== 200) { + /** @var ResultInterface $result */ + return $this->createResult( + $process['code'], + $resultData + ); + } + } + } + } + } else { + $process = $this->processNotification( + $mpTransactionId, + $mpStatus, + $childTransactionId, + $order, + $refundId, + $mpAmountRefund, + $mercadopagoData, + $origin + ); + + array_push($resultData, $process['msg']); + + if ($process['code'] !== 200) { + /** @var ResultInterface $result */ + return $this->createResult( + $process['code'], + $resultData + ); + } + } + + if ($mpStatus === 'pending') { + $this->updateDetails($mercadopagoData, $order); + } + + if (sizeof($resultData) === 0) { + /** @var ResultInterface $result */ + $result = $this->createResult( + 422, + 'Nothing to proccess' + ); + return $result; + } + } + + /** @var ResultInterface $result */ + $result = $this->createResult(200, ['empty' => null]); + + return $result; + } + + /** + * Update Details. + * + * @param array $mercadopagoData + * @param OrderRepository $order + */ + public function updateDetails( + $mercadopagoData, + $order + ) { + $orderId = $order->getId(); + $childTransctions = $mercadopagoData['payments_details']; + + foreach ($childTransctions as $child) { + $this->checkoutProAddChildInformation($orderId, $child['id']); + } + } + + /** + * Create Child. + * + * @param string $mpTransactionId + * @param string $childTransactionId + * @param OrderRepository $order + * + * @return void + */ + public function createChild( + $mpTransactionId, + $childTransactionId, + $order + ) { + $payment = $order->getPayment(); + $payment->setShouldCloseParentTransaction(true); + $payment->setParentTransactionId($mpTransactionId); + $payment->setTransactionId($childTransactionId); + $payment->setIsTransactionPending(1); + $payment->setIsTransactionClosed(false); + $payment->setAuthorizationTransaction($childTransactionId); + $payment->addTransaction(Transaction::TYPE_AUTH); + $order->save(); + } + + /** + * Process Notification. + * + * @param string $mpTransactionId + * @param string $mpStatus + * @param string $childTransactionId + * @param OrderRepository $order + * @param string|null $mpAmountRefund + * + * @return array + */ + public function processNotification( + $mpTransactionId, + $mpStatus, + $childTransactionId, + $order, + $refundId, + $mpAmountRefund = null, + $mercadopagoData = null, + $origin = null + ) { + $result = []; + + $isNotApplicable = $this->filterInvalidNotification($mpStatus, $order, $refundId, $mpAmountRefund, $origin); + + if ($isNotApplicable['isInvalid']) { + if (strcmp($isNotApplicable['msg'], 'Refund notification for order refunded directly in Mercado Pago.')) { + $this->updateDetails($mercadopagoData, $order); + + $result = [ + 'isInvalid' => true, + 'code' => 200, + 'msg' => [ + 'error' => 200, + 'message' => __('Order not yet closed in Magento.'), + 'state' => $order->getState(), + 'tatus' => $order->getStatus(), + ], + ]; + + return $result; + } else if (strcmp($isNotApplicable['msg'], 'Refund notification for order already closed.')) { + $this->updateDetails($mercadopagoData, $order); + + $result = [ + 'isInvalid' => true, + 'code' => 200, + 'msg' => [ + 'error' => 200, + 'message' => __('Order already closed in Magento.'), + 'state' => $order->getState(), + 'tatus' => $order->getStatus(), + ], + ]; + + return $result; + } else if (strcmp($isNotApplicable['msg'], 'Notification response for online refund created in magento')) { + $this->updateDetails($mercadopagoData, $order); + + $result = [ + 'isInvalid' => true, + 'code' => 200, + 'msg' => [ + 'error' => 200, + 'message' => __('Notification response for online refund.'), + 'state' => $order->getState(), + 'tatus' => $order->getStatus(), + ], + ]; + + return $result; + } else { + return $isNotApplicable; + } + } + + $this->createChild($mpTransactionId, $childTransactionId, $order); + + $notificationId = $mercadopagoData['notification_id']; + + $order = $this->fetchStatus->fetch($order->getEntityId(), $notificationId); + + $result = [ + 'code' => 200, + 'msg' => [ + 'order' => $order->getIncrementId(), + 'state' => $order->getState(), + 'status' => $order->getStatus(), + ], + ]; + + return $result; + } +} diff --git a/Cron/CancelCheckoutPro.php b/Cron/CancelCheckoutPro.php new file mode 100644 index 0000000..366bc6d --- /dev/null +++ b/Cron/CancelCheckoutPro.php @@ -0,0 +1,107 @@ +logger = $logger; + $this->fetchStatus = $fetchStatus; + $this->configCheckoutPro = $configCheckoutPro; + $this->collectionFactory = $collectionFactory; + } + + /** + * Execute the cron. + * + * @return void + */ + public function execute() + { + $expiration = $this->configCheckoutPro->getExpiredPaymentDate(); + + $orders = $this->collectionFactory->create() + ->addFieldToFilter('state', Order::STATE_NEW) + ->addAttributeToFilter('created_at', [ + 'lteq' => $expiration, + ]); + + $orders->getSelect() + ->join( + ['sop' => 'sales_order_payment'], + 'main_table.entity_id = sop.parent_id', + ['method'] + ) + ->where('sop.method = ?', ConfigCheckoutPro::METHOD); + + foreach ($orders as $order) { + $orderId = $order->getEntityId(); + $amount = $order->getTotalDue(); + $baseAmount = $order->getBaseTotalDue(); + $payment = $order->getPayment(); + $payment->setPreparedMessage(__('Order Canceled.')); + $payment->registerVoidNotification($amount); + $payment->setIsTransactionApproved(false); + $payment->setIsTransactionDenied(true); + $payment->setIsTransactionPending(false); + $payment->setIsInProcess(true); + $payment->setIsTransactionClosed(true); + $payment->setShouldCloseParentTransaction(true); + $payment->setAmountCanceled($amount); + $payment->setBaseAmountCanceled($baseAmount); + $order->cancel(); + $order->save(); + $this->logger->debug([ + 'fetch' => 'Cancel Order Id '.$orderId, + ]); + } + } +} diff --git a/Cron/FetchMerchantInfo.php b/Cron/FetchMerchantInfo.php new file mode 100644 index 0000000..1e39534 --- /dev/null +++ b/Cron/FetchMerchantInfo.php @@ -0,0 +1,52 @@ +logger = $logger; + $this->fetchMerchant = $fetchMerchant; + } + + /** + * Execute the cron. + * + * @return void + */ + public function execute() + { + $this->fetchMerchant->fetch(); + } +} diff --git a/Cron/FetchPaymentMethodsOffOrderStatus.php b/Cron/FetchPaymentMethodsOffOrderStatus.php new file mode 100644 index 0000000..473716c --- /dev/null +++ b/Cron/FetchPaymentMethodsOffOrderStatus.php @@ -0,0 +1,76 @@ +logger = $logger; + $this->fetchStatus = $fetchStatus; + $this->collectionFactory = $collectionFactory; + } + + /** + * Execute the cron. + * + * @return void + */ + public function execute() + { + $orders = $this->collectionFactory->create() + ->addFieldToFilter('state', Order::STATE_NEW); + + $orders->getSelect() + ->join( + ['sop' => 'sales_order_payment'], + 'main_table.entity_id = sop.parent_id', + ['method'] + ) + ->where('sop.method = ?', ConfigPaymentMethodsOff::METHOD); + + foreach ($orders as $order) { + $orderId = $order->getEntityId(); + + $this->logger->debug([ + 'fetch' => 'Fetch Status Payment Methods Off for Order Id '.$orderId, + ]); + + $this->fetchStatus->fetch($orderId); + } + } +} diff --git a/Cron/FetchPixOrderStatus.php b/Cron/FetchPixOrderStatus.php new file mode 100644 index 0000000..f86e250 --- /dev/null +++ b/Cron/FetchPixOrderStatus.php @@ -0,0 +1,82 @@ +logger = $logger; + $this->fetchStatus = $fetchStatus; + $this->collectionFactory = $collectionFactory; + } + + /** + * Execute the cron. + * + * @return void + */ + public function execute() + { + $orders = $this->collectionFactory->create() + ->addFieldToFilter('state', Order::STATE_NEW); + + $orders->getSelect() + ->join( + ['sop' => 'sales_order_payment'], + 'main_table.entity_id = sop.parent_id', + ['method'] + ) + ->where('sop.method = ?', ConfigPix::METHOD); + + foreach ($orders as $order) { + $orderId = $order->getEntityId(); + + $this->logger->debug([ + 'fetch' => 'Fetch Status Pix for Order Id '.$orderId, + ]); + + $this->fetchStatus->fetch($orderId); + } + } +} diff --git a/Cron/FetchPseOrderStatus.php b/Cron/FetchPseOrderStatus.php new file mode 100644 index 0000000..64d9ee9 --- /dev/null +++ b/Cron/FetchPseOrderStatus.php @@ -0,0 +1,82 @@ +logger = $logger; + $this->fetchStatus = $fetchStatus; + $this->collectionFactory = $collectionFactory; + } + + /** + * Execute the cron. + * + * @return void + */ + public function execute() + { + $orders = $this->collectionFactory->create() + ->addFieldToFilter('state', Order::STATE_NEW); + + $orders->getSelect() + ->join( + ['sop' => 'sales_order_payment'], + 'main_table.entity_id = sop.parent_id', + ['method'] + ) + ->where('sop.method = ?', ConfigPse::METHOD); + + foreach ($orders as $order) { + $orderId = $order->getEntityId(); + + $this->logger->debug([ + 'fetch' => 'Fetch Status Pse for Order Id '.$orderId, + ]); + + $this->fetchStatus->fetch($orderId); + } + } +} diff --git a/Cron/FetchWebpayOrderStatus.php b/Cron/FetchWebpayOrderStatus.php new file mode 100644 index 0000000..354f360 --- /dev/null +++ b/Cron/FetchWebpayOrderStatus.php @@ -0,0 +1,82 @@ +logger = $logger; + $this->fetchStatus = $fetchStatus; + $this->collectionFactory = $collectionFactory; + } + + /** + * Execute the cron. + * + * @return void + */ + public function execute() + { + $orders = $this->collectionFactory->create() + ->addFieldToFilter('state', Order::STATE_NEW); + + $orders->getSelect() + ->join( + ['sop' => 'sales_order_payment'], + 'main_table.entity_id = sop.parent_id', + ['method'] + ) + ->where('sop.method = ?', ConfigWebpay::METHOD); + + foreach ($orders as $order) { + $orderId = $order->getEntityId(); + + $this->logger->debug([ + 'fetch' => 'Fetch Status Webpay for Order Id '.$orderId, + ]); + + $this->fetchStatus->fetch($orderId); + } + } +} diff --git a/Gateway/Command/PaymentCommand.php b/Gateway/Command/PaymentCommand.php new file mode 100644 index 0000000..eee5574 --- /dev/null +++ b/Gateway/Command/PaymentCommand.php @@ -0,0 +1,156 @@ +commandPool = $commandPool; + $this->requestBuilder = $requestBuilder; + $this->transferFactory = $transferFactory; + $this->client = $client; + $this->handler = $handler; + $this->validator = $validator; + $this->logger = $logger; + $this->errorMessageMapper = $errorMessageMapper; + } + + /** + * Execute. + * + * @param array $commandSubject + * + * @return void + */ + public function execute(array $commandSubject) + { + $transferO = $this->transferFactory->create( + $this->requestBuilder->build($commandSubject) + ); + + $response = $this->client->placeRequest($transferO); + if ($this->validator !== null) { + $result = $this->validator->validate( + array_merge($commandSubject, ['response' => $response]) + ); + if (!$result->isValid()) { + $this->processErrors($result); + } + } + + if ($this->handler) { + $this->handler->handle( + $commandSubject, + $response + ); + } + } + + /** + * Process Errors. + * + * @param ResultInterface $result + */ + protected function processErrors(ResultInterface $result) + { + $messages = []; + $errorsSource = array_merge($result->getErrorCodes(), $result->getFailsDescription()); + foreach ($errorsSource as $errorCodeOrMessage) { + $errorCodeOrMessage = (string) $errorCodeOrMessage; + if ($this->errorMessageMapper !== null) { + $mapped = (string) $this->errorMessageMapper->getMessage($errorCodeOrMessage); + if (!empty($mapped)) { + $messages[] = $mapped; + $errorCodeOrMessage = $mapped; + } + } + $this->logger->critical('Payment Error: '.$errorCodeOrMessage); + } + + throw new CommandException( + !empty($messages) + ? __(implode(PHP_EOL, $messages)) + : __('Transaction has been declined. Please try again later.') + ); + } +} diff --git a/Gateway/Config/Config.php b/Gateway/Config/Config.php new file mode 100644 index 0000000..5ed7dad --- /dev/null +++ b/Gateway/Config/Config.php @@ -0,0 +1,515 @@ +productMetadata = $productMetadata; + $this->resourceModule = $resourceModule; + $this->scopeConfig = $scopeConfig; + $this->json = $json; + $this->httpClientFactory = $httpClientFactory; + } + + /** + * Formant Price. + * + * @param string|int|float $amount + * @param int|null $storeId + * + * @return float + */ + public function formatPrice($amount, $storeId = null): float + { + if ($this->getMpSiteId($storeId) === 'MCO') { + return round((float) $amount, 0); + } + + if ($this->getMpSiteId($storeId) === 'MLC') { + return round((float) $amount, 0); + } + + return round((float) $amount, 2); + } + + /** + * Gets the API endpoint URL. + * + * @return string + */ + public function getApiUrl(): string + { + return self::ENDPOINT_API; + } + + /** + * Gets the Environment Mode. + * + * @param int|null $storeId + * + * @return string + */ + public function getEnvironmentMode($storeId = null): ?string + { + $environment = $this->getAddtionalValue('environment', $storeId); + + if ($environment === 'sandbox') { + return self::ENVIRONMENT_SANDBOX; + } + + return self::ENVIRONMENT_PRODUCTION; + } + + /** + * Gets the Merchant Gateway Client Id. + * + * @param int|null $storeId + * + * @return string + */ + public function getMerchantGatewayClientId($storeId = null): ?string + { + $clientId = $this->getAddtionalValue('client_id_production', $storeId); + + $environment = $this->getEnvironmentMode($storeId); + + if ($environment === 'sandbox') { + $clientId = $this->getAddtionalValue('client_id_sandbox', $storeId); + } + + return $clientId; + } + + /** + * Gets the Merchant Gateway Client Secret. + * + * @param int|null $storeId + * + * @return string|null + */ + public function getMerchantGatewayClientSecret($storeId = null): ?string + { + $clientSecret = $this->getAddtionalValue('client_secret_production', $storeId); + + $environment = $this->getEnvironmentMode($storeId); + + if ($environment === 'sandbox') { + $clientSecret = $this->getAddtionalValue('client_secret_sandbox', $storeId); + } + + return $clientSecret; + } + + /** + * Gets the Merchant Gateway OAuth. + * + * @param int|null $storeId + * + * @return string|null + */ + public function getMerchantGatewayOauth($storeId = null): ?string + { + $oauth = $this->getAddtionalValue('access_token_production', $storeId); + + $environment = $this->getEnvironmentMode($storeId); + + if ($environment === 'sandbox') { + $oauth = $this->getAddtionalValue('access_token_sandbox', $storeId); + } + + return $oauth; + } + + /** + * Gets the Merchant Gateway Integrator Id. + * + * @param int|null $storeId + * + * @return string|null + */ + public function getMerchantGatewayIntegratorId($storeId = null): ?string + { + return $this->getAddtionalValue('integrator_id', $storeId); + } + + /** + * Get Client Headers. + * + * @param int|null $storeId + * + * @return array + */ + public function getClientHeaders($storeId = null): array + { + $oauth = $this->getMerchantGatewayClientSecret($storeId); + $integratorId = $this->getMerchantGatewayIntegratorId($storeId); + + return [ + 'Authorization' => 'Bearer '.$oauth, + 'x-product-id' => self::PRODUCT_ID, + 'x-platform-id' => self::PLATAFORM_ID, + 'x-integrator-id' => $integratorId, + ]; + } + + /** + * Get Client Configs. + * + * @return array + */ + public function getClientConfigs(): array + { + return [ + 'maxredirects' => 0, + 'timeout' => 45, + 'useragent' => 'Magento 2', + ]; + } + + /** + * Get Statement Descriptor. + * + * @param int|null $storeId + * + * @return string|null + */ + public function getStatementDescriptor($storeId = null): ?string + { + return $this->getAddtionalValue('statement_descriptor', $storeId); + } + + /** + * Get Restrict Payment on MP Site Id. + * + * @param int|null $storeId + * + * @return array|null + */ + public function getRestrictPaymentOnMpSiteId($storeId = null): ?array + { + $restrict = $this->getAddtionalValue('restrict_payment_on_mp_site_id', $storeId); + + return $this->json->unserialize($restrict); + } + + /** + * Get Magento Version. + * + * @return string + */ + public function getMagentoVersion(): string + { + return $this->productMetadata->getVersion(); + } + + /** + * Get Module Version. + * + * @return string|null + */ + public function getModuleVersion(): ?string + { + return $this->resourceModule->getDbVersion('MercadoPago_AdbPayment'); + } + + /** + * Is Test Mode. + * + * @param int|null $storeId + * + * @return bool + */ + public function isTestMode($storeId = null): bool + { + $environment = $this->getEnvironmentMode($storeId); + + if ($environment === 'sandbox') { + return true; + } + + return false; + } + + /** + * Get Mp Site Id. + * + * @param int|null $storeId + * + * @return string|null + */ + public function getMpSiteId($storeId = null): ?string + { + return $this->getAddtionalValue('site_id', $storeId); + } + + /** + * Get Mercado Pago Sponsor Id. + * + * @param string $siteId + * + * @return int|null + */ + public function getMpSponsorId(string $siteId): ?int + { + $sponsorIds = [ + 'MCO' => '222570694', + 'MLA' => '222568987', + 'MLB' => '222567845', + 'MLC' => '222570571', + 'MLM' => '222568246', + 'MLU' => '247030424', + 'MPE' => '222568315', + 'MLV' => '222569730', + ]; + + if (!isset($sponsorIds[$siteId])) { + return null; + } + + return (int) $sponsorIds[$siteId]; + } + + /** + * Get Mercado Pago Web Site by Site Id. + * + * @param string|null $siteId + * + * @return string + */ + public function getMpWebSiteBySiteId(string $siteId = null): string + { + $webSite = [ + 'MCO' => 'https://www.mercadopago.com.co/', + 'MLA' => 'https://www.mercadopago.com.ar/', + 'MLB' => 'https://www.mercadopago.com.br/', + 'MLC' => 'https://www.mercadopago.cl/', + 'MLM' => 'https://www.mercadopago.com.mx/', + 'MLU' => 'https://www.mercadopago.com.uy/', + 'MPE' => 'https://www.mercadopago.com.pe/', + ]; + + if (!isset($siteId)) { + return 'https://www.mercadopago.com/'; + } + + return $webSite[$siteId]; + } + + /** + * Get Mp Category. + * + * @param int|null $storeId + * + * @return string|null + */ + public function getMpCategory($storeId = null): ?string + { + return $this->getAddtionalValue('category', $storeId); + } + + /** + * Get Rewrite notification url. + * + * @param int|null $storeId + * + * @return string|null + */ + public function getRewriteNotificationUrl($storeId = null): ?string + { + $environment = $this->getEnvironmentMode($storeId); + + if ($environment === 'sandbox') { + return $this->getAddtionalValue('sandbox_rewrite_notification_url', $storeId); + } + + return null; + } + + /** + * Is Apply Refund. + * + * @param int|null $storeId + * + * @return bool + */ + public function isApplyRefund($storeId = null): ?bool + { + return $this->getAddtionalValue('receive_refund', $storeId); + } + + /** + * Value For Field Address. + * + * @param OrderAdapterFactory $adress + * @param string $field + * + * @return string|null + */ + public function getValueForAddress($adress, $field): ?string + { + $value = (int) $this->getAddtionalValue($field); + + if ($value === 0) { + return $adress->getStreetLine1(); + } elseif ($value === 1) { + return $adress->getStreetLine2(); + } elseif ($value === 2) { + if ($adress->getStreetLine3()) { + return $adress->getStreetLine3(); + } + } elseif ($value === 3) { + if ($adress->getStreetLine4()) { + return $adress->getStreetLine4(); + } + } + + return ''; + } + + /** + * Gets the AddtionalValues. + * + * @param string $field + * @param int|null $storeId + * + * @return string|null + */ + public function getAddtionalValue($field, $storeId = null): ?string + { + $pathPattern = 'payment/%s/%s'; + + return $this->scopeConfig->getValue( + sprintf($pathPattern, self::METHOD, $field), + ScopeInterface::SCOPE_STORE, + $storeId + ); + } + + /** + * Get Mp Payment Methods. + * + * @param int|null $storeId + * + * @return array + */ + public function getMpPaymentMethods(int $storeId = null): array + { + $uri = $this->getApiUrl(); + $clientConfigs = $this->getClientConfigs(); + $clientHeaders = $this->getClientHeaders($storeId); + + $client = $this->httpClientFactory->create(); + $client->setUri($uri.'/v1/bifrost/payment-methods'); + $client->setConfig($clientConfigs); + $client->setHeaders($clientHeaders); + $client->setMethod(ZendClient::GET); + + try { + $result = $client->request()->getBody(); + $response = $this->json->unserialize($result); + + return [ + 'success' => isset($response['message']) ? false : true, + 'response' => $response, + ]; + } catch (\Exception $e) { + return ['success' => false, 'error' => $e->getMessage()]; + } + } +} diff --git a/Gateway/Config/ConfigCc.php b/Gateway/Config/ConfigCc.php new file mode 100644 index 0000000..5da070a --- /dev/null +++ b/Gateway/Config/ConfigCc.php @@ -0,0 +1,332 @@ +scopeConfig = $scopeConfig; + $this->json = $json; + $this->config = $config; + $this->fingerprint = $fingerprint; + } + + /** + * Should the cvv field be shown. + * + * @param int|null $storeId + * + * @return bool + */ + public function isCvvEnabled($storeId = null): bool + { + $pathPattern = 'payment/%s/%s'; + + return (bool) $this->scopeConfig->getValue( + sprintf($pathPattern, self::METHOD, self::CVV_ENABLED), + ScopeInterface::SCOPE_STORE, + $storeId + ); + } + + /** + * Get Payment configuration status. + * + * @param int|null $storeId + * + * @return bool + */ + public function isActive($storeId = null): bool + { + $pathPattern = 'payment/%s/%s'; + + return (bool) $this->scopeConfig->getValue( + sprintf($pathPattern, self::METHOD, self::ACTIVE), + ScopeInterface::SCOPE_STORE, + $storeId + ); + } + + /** + * Get title of payment. + * + * @param int|null $storeId + * + * @return string + */ + public function getTitle($storeId = null): string + { + $pathPattern = 'payment/%s/%s'; + + return __($this->scopeConfig->getValue( + sprintf($pathPattern, self::METHOD, self::TITLE), + ScopeInterface::SCOPE_STORE, + $storeId) + ); + } + + /** + * Get if you use document capture on the form. + * + * @param int|null $storeId + * + * @return bool + */ + public function hasUseDocumentIdentificationCapture($storeId = null): bool + { + $pathPattern = 'payment/%s/%s'; + + return (bool) $this->scopeConfig->getValue( + sprintf($pathPattern, self::METHOD, self::USE_GET_DOCUMENT_IDENTIFICATION), + ScopeInterface::SCOPE_STORE, + $storeId + ); + } + + /** + * Is Binary Mode. + * + * @param int|null $storeId + * + * @return bool + */ + public function isBinaryMode($storeId = null): bool + { + $pathPattern = 'payment/%s/%s'; + + $canInitialize = $this->scopeConfig->getValue( + sprintf($pathPattern, self::METHOD, self::CAN_INITIALIZE), + ScopeInterface::SCOPE_STORE, + $storeId + ); + + if ($canInitialize) { + return false; + } + + return true; + } + + /** + * Should the cc types. + * + * @param int|null $storeId + * + * @return string + */ + public function getCcAvailableTypes($storeId = null): string + { + $pathPattern = 'payment/%s/%s_%s'; + + $mpSiteId = $this->config->getMpSiteId($storeId); + + $result = $this->scopeConfig->getValue( + sprintf( + $pathPattern, + self::METHOD, + self::CC_TYPES, + strtolower((string) $mpSiteId) + ), + ScopeInterface::SCOPE_STORE, + $storeId + ); + + return $result ?: ''; + } + + /** + * Cc Mapper. + * + * @param int|null $storeId + * + * @return array + */ + public function getCcTypesMapper($storeId = null): array + { + $pathPattern = 'payment/%s/%s_%s'; + + $mpSiteId = $this->config->getMpSiteId($storeId); + + $ccTypesMapper = $this->scopeConfig->getValue( + sprintf( + $pathPattern, + self::METHOD, + self::CC_MAPPER, + strtolower((string) $mpSiteId) + ), + ScopeInterface::SCOPE_STORE, + $storeId + ); + + $result = $ccTypesMapper ? $this->json->unserialize($ccTypesMapper) : null; + + return is_array($result) ? $result : []; + } + + /** + * Get Unsupported Pre Auth. + * + * @param int|null $storeId + * + * @return array + */ + public function getUnsupportedPreAuth($storeId = null): array + { + $pathPattern = 'payment/%s/%s'; + + $ccTypesMapper = $this->scopeConfig->getValue( + sprintf( + $pathPattern, + self::METHOD, + self::UNSUPPORTED_PRE_AUTH + ), + ScopeInterface::SCOPE_STORE, + $storeId + ); + + $result = $this->json->unserialize($ccTypesMapper); + + return is_array($result) ? $result : []; + } + + /** + * Has Capture. + * + * @param int|null $storeId + * + * @return bool + */ + public function hasCapture($storeId = null): bool + { + $pathPattern = 'payment/%s/%s'; + + $typeAction = $this->scopeConfig->getValue( + sprintf( + $pathPattern, + self::METHOD, + 'payment_action' + ), + ScopeInterface::SCOPE_STORE, + $storeId + ); + + if ($typeAction === 'authorize') { + return false; + } + + return true; + } + + /** + * Get terms and conditions link + * + * @param int|null $storeId + * + * @return string + */ + public function getFingerPrintLink($storeId = null): string + { + $mpSiteId = $this->config->getMpSiteId($storeId); + + return $this->fingerprint->getFingerPrintLink($mpSiteId); + } +} diff --git a/Gateway/Config/ConfigCcVault.php b/Gateway/Config/ConfigCcVault.php new file mode 100644 index 0000000..91a5b5c --- /dev/null +++ b/Gateway/Config/ConfigCcVault.php @@ -0,0 +1,64 @@ +scopeConfig = $scopeConfig; + } + + /** + * Get If Use Cvv. + * + * @param int|null $storeId + * + * @return bool + */ + public function useCvv($storeId = null): bool + { + $pathPattern = 'payment/%s/%s'; + + return (bool) $this->scopeConfig->getValue( + sprintf($pathPattern, self::METHOD, self::CVV_ENABLED), + ScopeInterface::SCOPE_STORE, + $storeId + ); + } +} diff --git a/Gateway/Config/ConfigCheckoutPro.php b/Gateway/Config/ConfigCheckoutPro.php new file mode 100644 index 0000000..7614358 --- /dev/null +++ b/Gateway/Config/ConfigCheckoutPro.php @@ -0,0 +1,492 @@ +setMethodCode(self::METHOD); + $this->scopeConfig = $scopeConfig; + $this->date = $date; + $this->config = $config; + $this->fingerprint = $fingerprint; + } + + /** + * Get Payment configuration status. + * + * @param int|null $storeId + * + * @return bool + */ + public function isActive($storeId = null): bool + { + $pathPattern = 'payment/%s/%s'; + + return (bool) $this->scopeConfig->getValue( + sprintf($pathPattern, self::METHOD, self::ACTIVE), + ScopeInterface::SCOPE_STORE, + $storeId + ); + } + + /** + * Get title of payment. + * + * @param int|null $storeId + * + * @return string + */ + public function getTitle($storeId = null): string + { + $pathPattern = 'payment/%s/%s'; + + return $this->scopeConfig->getValue( + sprintf($pathPattern, self::METHOD, self::TITLE), + ScopeInterface::SCOPE_STORE, + $storeId + ); + } + + /** + * Get Instruction - Checkout. + * + * @param int|null $storeId + * + * @return string + */ + public function getInstructionCheckout($storeId = null): string + { + $pathPattern = 'payment/%s/%s'; + + return $this->scopeConfig->getValue( + sprintf($pathPattern, self::METHOD, self::INSTRUCTION_CHECKOUT), + ScopeInterface::SCOPE_STORE, + $storeId + ); + } + + /** + * Get Excluded. + * + * @param int|null $storeId + * + * @return array|null + */ + public function getExcluded($storeId = null): ?array + { + $pathPattern = 'payment/%s/%s'; + + $excluded = $this->scopeConfig->getValue( + sprintf($pathPattern, self::METHOD, self::EXCLUDED), + ScopeInterface::SCOPE_STORE, + $storeId + ); + + if (isset($excluded)) { + return explode(',', $excluded); + } + + return null; + } + + /** + * Get Expiration Formatted. + * + * @param int|null $storeId + * + * @return string + */ + public function getExpirationFormatted($storeId = null): string + { + $pathPattern = 'payment/%s/%s'; + $due = $this->scopeConfig->getValue( + sprintf($pathPattern, self::METHOD, self::EXPIRATION), + ScopeInterface::SCOPE_STORE, + $storeId + ); + + return $this->date->gmtDate('Y-m-d\T23:59:59.0000', strtotime("+{$due} days")); + } + + /** + * Get Expired Payment Date. + * + * @param int|null $storeId + * + * @return string + */ + public function getExpiredPaymentDate($storeId = null): string + { + $pathPattern = 'payment/%s/%s'; + + $due = $this->scopeConfig->getValue( + sprintf($pathPattern, self::METHOD, self::EXPIRATION), + ScopeInterface::SCOPE_STORE, + $storeId + ) + 2; + + return $this->date->gmtDate('Y-m-d 23:59:59', strtotime("-{$due} days")); + } + + /** + * Get Expiration. + * + * @param int|null $storeId + * + * @return string + */ + public function getExpiration($storeId = null): string + { + $pathPattern = 'payment/%s/%s'; + $due = $this->scopeConfig->getValue( + sprintf($pathPattern, self::METHOD, self::EXPIRATION), + ScopeInterface::SCOPE_STORE, + $storeId + ); + + return $this->date->gmtDate('d/m/Y', strtotime("+{$due} days")); + } + + /** + * Get Expiration Formart. + * + * @param int|null $storeId + * + * @return string + */ + public function getExpirationFormat($storeId = null): string + { + $pathPattern = 'payment/%s/%s'; + $due = $this->scopeConfig->getValue( + sprintf($pathPattern, self::METHOD, self::EXPIRATION), + ScopeInterface::SCOPE_STORE, + $storeId + ); + + return $this->date->gmtDate('d/m/Y', strtotime("+{$due} days")); + } + + /** + * Is Binary Mode. + * + * @param int|null $storeId + * + * @return bool + */ + public function isBinaryMode($storeId = null): bool + { + $pathPattern = 'payment/%s/%s'; + + return $this->scopeConfig->getValue( + sprintf($pathPattern, self::METHOD, self::BINARY_MODE), + ScopeInterface::SCOPE_STORE, + $storeId + ); + } + + /** + * Get Type Redirect. + * + * @param int|null $storeId + * + * @return string + */ + public function getTypeRedirect($storeId = null): string + { + $pathPattern = 'payment/%s/%s'; + + return $this->scopeConfig->getValue( + sprintf($pathPattern, self::METHOD, self::TYPE_REDIRECT), + ScopeInterface::SCOPE_STORE, + $storeId + ); + } + + /** + * Get Max Installments. + * + * @param int|null $storeId + * + * @return int|null + */ + public function getMaxInstallments($storeId = null): ?int + { + $pathPattern = 'payment/%s/%s'; + + return $this->scopeConfig->getValue( + sprintf($pathPattern, self::METHOD, self::MAX_INSTALLMENTS), + ScopeInterface::SCOPE_STORE, + $storeId + ); + } + + /** + * Is Include Facebook. + * + * @param int|null $storeId + * + * @return bool + */ + public function isIncludeFacebook($storeId = null): bool + { + $pathPattern = 'payment/%s/%s'; + + return (bool) $this->scopeConfig->getValue( + sprintf($pathPattern, self::METHOD, self::INCLUDE_FACEBOOK), + ScopeInterface::SCOPE_STORE, + $storeId + ); + } + + /** + * Get Facebook Ad. + * + * @param int|null $storeId + * + * @return string|null + */ + public function getFacebookAd($storeId = null): ?string + { + $pathPattern = 'payment/%s/%s'; + + return $this->scopeConfig->getValue( + sprintf($pathPattern, self::METHOD, self::FACEBOOK_AD), + ScopeInterface::SCOPE_STORE, + $storeId + ); + } + + /** + * Is Include Google. + * + * @param int|null $storeId + * + * @return bool + */ + public function isIncludeGoogle($storeId = null): bool + { + $pathPattern = 'payment/%s/%s'; + + return (bool) $this->scopeConfig->getValue( + sprintf($pathPattern, self::METHOD, self::INCLUDE_GOOGLE), + ScopeInterface::SCOPE_STORE, + $storeId + ); + } + + /** + * Get Google Ads Id. + * + * @param int|null $storeId + * + * @return string|null + */ + public function getGoogleAdsId($storeId = null): ?string + { + $pathPattern = 'payment/%s/%s'; + + return $this->scopeConfig->getValue( + sprintf($pathPattern, self::METHOD, self::CONVERSION_ID), + ScopeInterface::SCOPE_STORE, + $storeId + ); + } + + /** + * Get Google Ads Label. + * + * @param int|null $storeId + * + * @return string|null + */ + public function getGoogleAdsLabel($storeId = null): ?string + { + $pathPattern = 'payment/%s/%s'; + + return $this->scopeConfig->getValue( + sprintf($pathPattern, self::METHOD, self::CONVERSION_LABEL), + ScopeInterface::SCOPE_STORE, + $storeId + ); + } + + /** + * Get Styles Header Color. + * + * @param int|null $storeId + * + * @return string + */ + public function getStylesHeaderColor($storeId = null): string + { + $pathPattern = 'payment/%s/%s'; + + return $this->scopeConfig->getValue( + sprintf($pathPattern, self::METHOD, self::THEME_HEADER), + ScopeInterface::SCOPE_STORE, + $storeId + ); + } + + /** + * Get Styles Elments Color. + * + * @param int|null $storeId + * + * @return string + */ + public function getStylesElementsColor($storeId = null): string + { + $pathPattern = 'payment/%s/%s'; + + return $this->scopeConfig->getValue( + sprintf($pathPattern, self::METHOD, self::THEME_ELEMENTS), + ScopeInterface::SCOPE_STORE, + $storeId + ); + } + + /** + * Get terms and conditions link + * + * @param int|null $storeId + * + * @return string + */ + public function getFingerPrintLink($storeId = null): string + { + $mpSiteId = $this->config->getMpSiteId($storeId); + + return $this->fingerprint->getFingerPrintLink($mpSiteId); + } +} diff --git a/Gateway/Config/ConfigPaymentMethodsOff.php b/Gateway/Config/ConfigPaymentMethodsOff.php new file mode 100644 index 0000000..c50b9bf --- /dev/null +++ b/Gateway/Config/ConfigPaymentMethodsOff.php @@ -0,0 +1,315 @@ +scopeConfig = $scopeConfig; + $this->date = $date; + $this->config = $config; + $this->fingerprint = $fingerprint; + } + + /** + * Get Payment configuration status. + * + * @param int|null $storeId + * + * @return bool + */ + public function isActive($storeId = null): bool + { + $pathPattern = 'payment/%s/%s'; + + return (bool) $this->scopeConfig->getValue( + sprintf($pathPattern, self::METHOD, self::ACTIVE), + ScopeInterface::SCOPE_STORE, + $storeId + ); + } + + /** + * Get title of payment. + * + * @param int|null $storeId + * + * @return string + */ + public function getTitle($storeId = null): string + { + $pathPattern = 'payment/%s/%s'; + + return __($this->scopeConfig->getValue( + sprintf($pathPattern, self::METHOD, self::TITLE), + ScopeInterface::SCOPE_STORE, + $storeId + )); + } + + /** + * Get Expiration Formatted. + * + * @param int|null $storeId + * + * @return string + */ + public function getExpirationFormatted($storeId = null): string + { + $pathPattern = 'payment/%s/%s'; + $due = $this->scopeConfig->getValue( + sprintf($pathPattern, self::METHOD, self::EXPIRATION), + ScopeInterface::SCOPE_STORE, + $storeId + ); + + return $this->date->gmtDate('Y-m-d\T23:59:59.000O', strtotime("+{$due} days")); + } + + /** + * Get Expiration. + * + * @param int|null $storeId + * + * @return string + */ + public function getExpiration($storeId = null): string + { + $pathPattern = 'payment/%s/%s'; + $due = $this->scopeConfig->getValue( + sprintf($pathPattern, self::METHOD, self::EXPIRATION), + ScopeInterface::SCOPE_STORE, + $storeId + ); + + return $this->date->gmtDate('d/m/Y', strtotime("+{$due} days")); + } + + /** + * Get Expiration Formart. + * + * @param int|null $storeId + * + * @return string + */ + public function getExpirationFormat($storeId = null): string + { + $pathPattern = 'payment/%s/%s'; + $due = $this->scopeConfig->getValue( + sprintf($pathPattern, self::METHOD, self::EXPIRATION), + ScopeInterface::SCOPE_STORE, + $storeId + ); + + return $this->date->gmtDate('d/m/Y', strtotime("+{$due} days")); + } + + /** + * Get if you use document capture on the form. + * + * @param int|null $storeId + * + * @return bool + */ + public function hasUseDocumentIdentificationCapture($storeId = null): bool + { + $pathPattern = 'payment/%s/%s'; + + return (bool) $this->scopeConfig->getValue( + sprintf($pathPattern, self::METHOD, self::USE_GET_DOCUMENT_IDENTIFICATION), + ScopeInterface::SCOPE_STORE, + $storeId + ); + } + + /** + * Get if you use name capture on the form. + * + * @param int|null $storeId + * + * @return bool + */ + public function hasUseNameCapture($storeId = null): bool + { + $pathPattern = 'payment/%s/%s'; + + return (bool) $this->scopeConfig->getValue( + sprintf($pathPattern, self::METHOD, self::USE_GET_NAME), + ScopeInterface::SCOPE_STORE, + $storeId + ); + } + + public function getPaymentMethodsOffActive($storeId = null): ?string + { + $pathPattern = 'payment/%s/%s'; + + return $this->scopeConfig->getValue( + sprintf($pathPattern, self::METHOD, self::PAYMENT_METHODS), + ScopeInterface::SCOPE_STORE, + $storeId + ); + } + + /** + * Calc Digit for Line Code. + * + * @param string $number + * + * @return int + */ + public function calcDigit($number) + { + $number = preg_replace('/[^0-9]/', '', $number); + $numbertotal10 = 0; + $parcial10 = []; + $fator = 2; + + for ($i = strlen($number); $i > 0; $i--) { + $number[$i] = substr($number, $i - 1, 1); + + $temp = $number[$i] * $fator; + $temp0 = 0; + + foreach (preg_split('//', $temp, -1, PREG_SPLIT_NO_EMPTY) as $vetor) { + $temp0 += $vetor; + } + + $parcial10[$i] = $temp0; + + $numbertotal10 += $parcial10[$i]; + + if ($fator === 2) { + $fator = 1; + } elseif ($fator !== 2) { + $fator = 2; + } + } + + $resto = $numbertotal10 % 10; + $digito = 10 - $resto; + + if ($resto === 0) { + $digito = 0; + } + + return $digito; + } + + /** + * Get Line Code. + * + * @param string $barcode + * + * @return string + */ + public function getLineCode($barcode) + { + $field1 = substr($barcode, 0, 4).substr($barcode, 19, 1).'.'.substr($barcode, 20, 4); + $digit1 = $this->calcDigit($field1); + + $field2 = substr($barcode, 24, 5).'.'.substr($barcode, 29, 5); + $digit2 = $this->calcDigit($field2); + + $field3 = substr($barcode, 34, 5).'.'.substr($barcode, 39, 5); + $digit3 = $this->calcDigit($field3); + + $field4 = substr($barcode, 4, 1); + + $field5 = substr($barcode, 5, 14); + + return $field1.$digit1.' '.$field2.$digit2.' '.$field3.$digit3.' '.$field4.' '.$field5; + } + + /** + * Get terms and conditions link + * + * @param int|null $storeId + * + * @return string + */ + public function getFingerPrintLink($storeId = null): string + { + $mpSiteId = $this->config->getMpSiteId($storeId); + + return $this->fingerprint->getFingerPrintLink($mpSiteId); + } +} diff --git a/Gateway/Config/ConfigPix.php b/Gateway/Config/ConfigPix.php new file mode 100644 index 0000000..edeb615 --- /dev/null +++ b/Gateway/Config/ConfigPix.php @@ -0,0 +1,233 @@ +scopeConfig = $scopeConfig; + $this->config = $config; + $this->date = $date; + $this->fingerprint = $fingerprint; + } + + /** + * Get Payment configuration status. + * + * @param int|null $storeId + * + * @return bool + */ + public function isActive($storeId = null): bool + { + $pathPattern = 'payment/%s/%s'; + + return (bool) $this->scopeConfig->getValue( + sprintf($pathPattern, self::METHOD, self::ACTIVE), + ScopeInterface::SCOPE_STORE, + $storeId + ); + } + + /** + * Get title of payment. + * + * @param int|null $storeId + * + * @return string + */ + public function getTitle($storeId = null): string + { + $pathPattern = 'payment/%s/%s'; + + return $this->scopeConfig->getValue( + sprintf($pathPattern, self::METHOD, self::TITLE), + ScopeInterface::SCOPE_STORE, + $storeId + ); + } + + /** + * Get Expiration Formatted. + * + * @param int|null $storeId + * + * @return string + */ + public function getExpirationFormatted($storeId = null): string + { + $pathPattern = 'payment/%s/%s'; + $due = $this->scopeConfig->getValue( + sprintf($pathPattern, self::METHOD, self::EXPIRATION), + ScopeInterface::SCOPE_STORE, + $storeId + ); + + return $this->date->gmtDate('Y-m-d\TH:i:s.000O', strtotime("+{$due} minutes")); + } + + /** + * Get Expiration Text Formatted. + * + * @param int|null $storeId + * + * @return Phrase + */ + public function getExpirationTextFormatted($storeId = null): Phrase + { + $pathPattern = 'payment/%s/%s'; + $due = $this->scopeConfig->getValue( + sprintf($pathPattern, self::METHOD, self::EXPIRATION), + ScopeInterface::SCOPE_STORE, + $storeId + ); + + if ($due === '15' || $due === '30') { + return __('%1 minutes', $due); + } + + if ($due === '60') { + return __('1 hour'); + } + + if ($due === '720') { + return __('12 hours'); + } + + if ($due === '1440') { + return __('1 day'); + } + + return __('%1 minutes', $due); + } + + /** + * Get Instruction - Checkout. + * + * @param int|null $storeId + * + * @return string + */ + public function getInstructionCheckout($storeId = null): string + { + $pathPattern = 'payment/%s/%s'; + + return $this->scopeConfig->getValue( + sprintf($pathPattern, self::METHOD, self::INSTRUCTION_CHECKOUT), + ScopeInterface::SCOPE_STORE, + $storeId + ); + } + + /** + * Get if you use document capture on the form. + * + * @param int|null $storeId + * + * @return bool + */ + public function hasUseDocumentIdentificationCapture($storeId = null): bool + { + $pathPattern = 'payment/%s/%s'; + + return (bool) $this->scopeConfig->getValue( + sprintf($pathPattern, self::METHOD, self::USE_GET_DOCUMENT_IDENTIFICATION), + ScopeInterface::SCOPE_STORE, + $storeId + ); + } + + /** + * Get terms and conditions link + * + * @param int|null $storeId + * + * @return string + */ + public function getFingerPrintLink($storeId = null): string + { + $mpSiteId = $this->config->getMpSiteId($storeId); + + return $this->fingerprint->getFingerPrintLink($mpSiteId); + } +} diff --git a/Gateway/Config/ConfigPse.php b/Gateway/Config/ConfigPse.php new file mode 100644 index 0000000..8397096 --- /dev/null +++ b/Gateway/Config/ConfigPse.php @@ -0,0 +1,302 @@ +scopeConfig = $scopeConfig; + $this->date = $date; + $this->configBase = $configBase; + $this->json = $json; + $this->fingerprint = $fingerprint; + } + + /** + * Get Payment configuration status. + * + * @param int|null $storeId + * + * @return bool + */ + public function isActive($storeId = null): bool + { + $pathPattern = 'payment/%s/%s'; + + return (bool) $this->scopeConfig->getValue( + sprintf($pathPattern, self::METHOD, self::ACTIVE), + ScopeInterface::SCOPE_STORE, + $storeId + ); + } + + /** + * Get title of payment. + * + * @param int|null $storeId + * + * @return string + */ + public function getTitle($storeId = null): string + { + $pathPattern = 'payment/%s/%s'; + + return $this->scopeConfig->getValue( + sprintf($pathPattern, self::METHOD, self::TITLE), + ScopeInterface::SCOPE_STORE, + $storeId + ); + } + + /** + * Get Expiration Formatted. + * + * @param int|null $storeId + * + * @return string + */ + public function getExpirationFormatted($storeId = null): ?string + { + $pathPattern = 'payment/%s/%s'; + $due = $this->scopeConfig->getValue( + sprintf($pathPattern, self::METHOD, self::EXPIRATION), + ScopeInterface::SCOPE_STORE, + $storeId + ); + + return $this->date->gmtDate('Y-m-d\T23:59:59.000O', strtotime("+{$due} days")); + } + + /** + * Get Instruction Checkoout for Pse. + * + * @param int|null $storeId + * + * @return string + */ + public function getInstructionCheckoutPse($storeId = null): string + { + $pathPattern = 'payment/%s/%s'; + + return $this->scopeConfig->getValue( + sprintf($pathPattern, self::METHOD, self::INSTRUCTION_CHECKOUT_PSE), + ScopeInterface::SCOPE_STORE, + $storeId + ); + } + + /** + * Get Expiration. + * + * @param int|null $storeId + * + * @return string + */ + public function getExpiration($storeId = null): string + { + $pathPattern = 'payment/%s/%s'; + $due = $this->scopeConfig->getValue( + sprintf($pathPattern, self::METHOD, self::EXPIRATION), + ScopeInterface::SCOPE_STORE, + $storeId + ); + + return $this->date->gmtDate('d/m/Y', strtotime("+{$due} days")); + } + + /** + * Get Expiration Formart. + * + * @param int|null $storeId + * + * @return string + */ + public function getExpirationFormat($storeId = null): string + { + $pathPattern = 'payment/%s/%s'; + $due = $this->scopeConfig->getValue( + sprintf($pathPattern, self::METHOD, self::EXPIRATION), + ScopeInterface::SCOPE_STORE, + $storeId + ); + + return $this->date->gmtDate('d/m/Y', strtotime("+{$due} days")); + } + + /** + * Get if you use document capture on the form. + * + * @param int|null $storeId + * + * @return bool + */ + public function hasUseDocumentIdentificationCapture($storeId = null): bool + { + $pathPattern = 'payment/%s/%s'; + + return (bool) $this->scopeConfig->getValue( + sprintf($pathPattern, self::METHOD, self::USE_GET_DOCUMENT_IDENTIFICATION), + ScopeInterface::SCOPE_STORE, + $storeId + ); + } + + /** + * Get List Financial Institution. + * + * @param int|null $storeId + * + * @return array + */ + public function getListFinancialInstitution($storeId = null): array + { + $finInstitutions = []; + $mpSiteId = $this->configBase->getMpSiteId($storeId); + + if ($mpSiteId === 'MCO') { + $payments = $this->configBase->getMpPaymentMethods($storeId); + + foreach ($payments['response'] as $payment) { + if ($payment['id'] === self::PAYMENT_METHOD_ID) { + $finInstitutions = $payment['financial_institutions']; + } + } + } + + return $finInstitutions; + } + + /** + * Get List Payer Entity Types. + * + * @param int|null $storeId + * + * @return array + */ + public function getListPayerEntityTypes($storeId = null): array + { + $pathPattern = 'payment/%s/%s'; + + $types = $this->scopeConfig->getValue( + sprintf($pathPattern, self::METHOD, self::PAYER_ENTITY_TYPES), + ScopeInterface::SCOPE_STORE, + $storeId + ); + + $result = $this->json->unserialize($types); + + return is_array($result) ? $result : []; + } + + /** + * Get terms and conditions link + * + * @param int|null $storeId + * + * @return string + */ + public function getFingerPrintLink($storeId = null): string + { + $mpSiteId = $this->configBase->getMpSiteId($storeId); + + return $this->fingerprint->getFingerPrintLink($mpSiteId); + } +} diff --git a/Gateway/Config/ConfigTwoCc.php b/Gateway/Config/ConfigTwoCc.php new file mode 100644 index 0000000..06482fa --- /dev/null +++ b/Gateway/Config/ConfigTwoCc.php @@ -0,0 +1,333 @@ +scopeConfig = $scopeConfig; + $this->json = $json; + $this->config = $config; + $this->fingerprint = $fingerprint; + } + + /** + * Should the cvv field be shown. + * + * @param int|null $storeId + * + * @return bool + */ + public function isCvvEnabled($storeId = null): bool + { + $pathPattern = 'payment/%s/%s'; + + return (bool) $this->scopeConfig->getValue( + sprintf($pathPattern, self::METHOD, self::CVV_ENABLED), + ScopeInterface::SCOPE_STORE, + $storeId + ); + } + + /** + * Get Payment configuration status. + * + * @param int|null $storeId + * + * @return bool + */ + public function isActive($storeId = null): bool + { + $pathPattern = 'payment/%s/%s'; + + return (bool) $this->scopeConfig->getValue( + sprintf($pathPattern, self::METHOD, self::ACTIVE), + ScopeInterface::SCOPE_STORE, + $storeId + ); + } + + /** + * Get title of payment. + * + * @param int|null $storeId + * + * @return string + */ + public function getTitle($storeId = null): string + { + $pathPattern = 'payment/%s/%s'; + + return __($this->scopeConfig->getValue( + sprintf($pathPattern, self::METHOD, self::TITLE), + ScopeInterface::SCOPE_STORE, + $storeId) + ); + + return $this->fingerprint->getFingerPrintLink(); + } + + /** + * Get if you use document capture on the form. + * + * @param int|null $storeId + * + * @return bool + */ + public function hasUseDocumentIdentificationCapture($storeId = null): bool + { + $pathPattern = 'payment/%s/%s'; + + return (bool) $this->scopeConfig->getValue( + sprintf($pathPattern, self::METHOD, self::USE_GET_DOCUMENT_IDENTIFICATION), + ScopeInterface::SCOPE_STORE, + $storeId + ); + } + + /** + * Is Binary Mode. + * + * @param int|null $storeId + * + * @return bool + */ + public function isBinaryMode($storeId = null): bool + { + $pathPattern = 'payment/%s/%s'; + + $canInitialize = $this->scopeConfig->getValue( + sprintf($pathPattern, self::METHOD, self::CAN_INITIALIZE), + ScopeInterface::SCOPE_STORE, + $storeId + ); + + if ($canInitialize) { + return false; + } + + return true; + } + + /** + * Should the cc types. + * + * @param int|null $storeId + * + * @return string + */ + public function getCcAvailableTypes($storeId = null): string + { + $pathPattern = 'payment/%s/%s_%s'; + + $mpSiteId = $this->config->getMpSiteId($storeId); + + $result = $this->scopeConfig->getValue( + sprintf( + $pathPattern, + self::METHOD, + self::CC_TYPES, + strtolower((string) $mpSiteId) + ), + ScopeInterface::SCOPE_STORE, + $storeId + ); + + return $result ?: ''; + } + + /** + * Cc Mapper. + * + * @param int|null $storeId + * + * @return array + */ + public function getCcTypesMapper($storeId = null): array + { + $pathPattern = 'payment/%s/%s_%s'; + + $mpSiteId = $this->config->getMpSiteId($storeId); + + $ccTypesMapper = $this->scopeConfig->getValue( + sprintf( + $pathPattern, + self::METHOD, + self::CC_MAPPER, + strtolower((string) $mpSiteId) + ), + ScopeInterface::SCOPE_STORE, + $storeId + ); + + $result = $ccTypesMapper ? $this->json->unserialize($ccTypesMapper) : null; + + return is_array($result) ? $result : []; + } + + /** + * Get Unsupported Pre Auth. + * + * @param int|null $storeId + * + * @return array + */ + public function getUnsupportedPreAuth($storeId = null): array + { + $pathPattern = 'payment/%s/%s'; + + $ccTypesMapper = $this->scopeConfig->getValue( + sprintf( + $pathPattern, + self::METHOD, + self::UNSUPPORTED_PRE_AUTH + ), + ScopeInterface::SCOPE_STORE, + $storeId + ); + + $result = $this->json->unserialize($ccTypesMapper); + + return is_array($result) ? $result : []; + } + + /** + * Has Capture. + * + * @param int|null $storeId + * + * @return bool + */ + public function hasCapture($storeId = null): bool + { + $pathPattern = 'payment/%s/%s'; + + $typeAction = $this->scopeConfig->getValue( + sprintf( + $pathPattern, + self::METHOD, + 'payment_action' + ), + ScopeInterface::SCOPE_STORE, + $storeId + ); + + if ($typeAction === 'authorize') { + return false; + } + + return true; + } + + /** + * Get terms and conditions link + * + * @param int|null $storeId + * + * @return string + */ + public function getFingerPrintLink($storeId = null): string + { + $mpSiteId = $this->config->getMpSiteId($storeId); + + return $this->fingerprint->getFingerPrintLink($mpSiteId); + } + +} diff --git a/Gateway/Config/ConfigWebpay.php b/Gateway/Config/ConfigWebpay.php new file mode 100644 index 0000000..bc5d204 --- /dev/null +++ b/Gateway/Config/ConfigWebpay.php @@ -0,0 +1,275 @@ +scopeConfig = $scopeConfig; + $this->date = $date; + $this->configBase = $configBase; + $this->fingerprint = $fingerprint; + $this->json = $json; + } + + /** + * Get Payment configuration status. + * + * @param int|null $storeId + * + * @return bool + */ + public function isActive($storeId = null): bool + { + $pathPattern = 'payment/%s/%s'; + + return (bool) $this->scopeConfig->getValue( + sprintf($pathPattern, self::METHOD, self::ACTIVE), + ScopeInterface::SCOPE_STORE, + $storeId + ); + } + + /** + * Get title of payment. + * + * @param int|null $storeId + * + * @return string + */ + public function getTitle($storeId = null): string + { + $pathPattern = 'payment/%s/%s'; + + return $this->scopeConfig->getValue( + sprintf($pathPattern, self::METHOD, self::TITLE), + ScopeInterface::SCOPE_STORE, + $storeId + ); + } + + /** + * Get Expiration Formatted. + * + * @param int|null $storeId + * + * @return string + */ + public function getExpirationFormatted($storeId = null): string + { + $pathPattern = 'payment/%s/%s'; + $due = $this->scopeConfig->getValue( + sprintf($pathPattern, self::METHOD, self::EXPIRATION), + ScopeInterface::SCOPE_STORE, + $storeId + ); + + return $this->date->gmtDate('Y-m-d\T23:59:59.000O', strtotime("+{$due} days")); + } + + /** + * Get Instruction Checkoout for Webpay. + * + * @param int|null $storeId + * + * @return string + */ + public function getInstructionCheckoutWebpay($storeId = null): string + { + $pathPattern = 'payment/%s/%s'; + + return $this->scopeConfig->getValue( + sprintf($pathPattern, self::METHOD, self::INSTRUCTION_CHECKOUT_WEBPAY), + ScopeInterface::SCOPE_STORE, + $storeId + ); + } + + /** + * Get Expiration. + * + * @param int|null $storeId + * + * @return string + */ + public function getExpiration($storeId = null): string + { + $pathPattern = 'payment/%s/%s'; + $due = $this->scopeConfig->getValue( + sprintf($pathPattern, self::METHOD, self::EXPIRATION), + ScopeInterface::SCOPE_STORE, + $storeId + ); + + return $this->date->gmtDate('d/m/Y', strtotime("+{$due} days")); + } + + /** + * Get Expiration Formart. + * + * @param int|null $storeId + * + * @return string + */ + public function getExpirationFormat($storeId = null): string + { + $pathPattern = 'payment/%s/%s'; + $due = $this->scopeConfig->getValue( + sprintf($pathPattern, self::METHOD, self::EXPIRATION), + ScopeInterface::SCOPE_STORE, + $storeId + ); + + return $this->date->gmtDate('d/m/Y', strtotime("+{$due} days")); + } + + /** + * Get if you use document capture on the form. + * + * @param int|null $storeId + * + * @return bool + */ + public function hasUseDocumentIdentificationCapture($storeId = null): bool + { + $pathPattern = 'payment/%s/%s'; + + return (bool) $this->scopeConfig->getValue( + sprintf($pathPattern, self::METHOD, self::USE_GET_DOCUMENT_IDENTIFICATION), + ScopeInterface::SCOPE_STORE, + $storeId + ); + } + + /** + * Get List Financial Institution. + * + * @param int|null $storeId + * + * @return array + */ + public function getListFinancialInstitution($storeId = null): array + { + $finInstitutions = []; + $mpSiteId = $this->configBase->getMpSiteId($storeId); + + if ($mpSiteId === 'MLC') { + $payments = $this->configBase->getMpPaymentMethods($storeId); + + foreach ($payments['response'] as $payment) { + if ($payment['id'] === self::PAYMENT_METHOD_ID) { + $finInstitutions = $payment['financial_institutions']; + } + } + } + + return $finInstitutions; + } + + /** + * Get terms and conditions link + * + * @param int|null $storeId + * + * @return string + */ + public function getFingerPrintLink($storeId = null): string + { + $mpSiteId = $this->configBase->getMpSiteId($storeId); + + return $this->fingerprint->getFingerPrintLink($mpSiteId); + } +} diff --git a/Gateway/Data/Checkout/Fingerprint.php b/Gateway/Data/Checkout/Fingerprint.php new file mode 100644 index 0000000..bd687a7 --- /dev/null +++ b/Gateway/Data/Checkout/Fingerprint.php @@ -0,0 +1,37 @@ + 'https://www.mercadopago.com.ar/ayuda/terminos-y-politicas_194', + 'MLB' => 'https://www.mercadopago.com.br/ajuda/termos-e-politicas_194', + 'MLC' => 'https://www.mercadopago.cl/ayuda/terminos-y-politicas_194', + 'MLM' => 'https://www.mercadopago.com.mx/ayuda/terminos-y-politicas_194', + 'MLU' => 'https://www.mercadopago.com.uy/ayuda/terminos-y-politicas_194', + 'MPE' => 'https://www.mercadopago.com.pe/ayuda/terminos-y-politicas_194', + 'MCO' => 'https://www.mercadopago.com.co/ayuda/terminos-y-politicas_194', + ]; + + if (array_key_exists($localization, $siteId)) { + return $siteId[$localization]; + } + + return $siteId['MLA']; + } + +} diff --git a/Gateway/Data/Order/AddressAdapter.php b/Gateway/Data/Order/AddressAdapter.php new file mode 100644 index 0000000..429d471 --- /dev/null +++ b/Gateway/Data/Order/AddressAdapter.php @@ -0,0 +1,219 @@ +address = $address; + } + + /** + * Get region name. + * + * @return string + */ + public function getRegionCode() + { + return $this->address->getRegionCode(); + } + + /** + * Get country id. + * + * @return string + */ + public function getCountryId() + { + return $this->address->getCountryId(); + } + + /** + * Get street line 1. + * + * @return string + */ + public function getStreetLine1() + { + $street = $this->address->getStreet(); + + return isset($street[0]) ? $street[0] : ''; + } + + /** + * Get street line 2. + * + * @return string + */ + public function getStreetLine2() + { + $street = $this->address->getStreet(); + + return isset($street[1]) ? $street[1] : ''; + } + + /** + * Get street line 3. + * + * @return string + */ + public function getStreetLine3() + { + $street = $this->address->getStreet(); + + return isset($street[2]) ? $street[2] : ''; + } + + /** + * Get street line 4. + * + * @return string + */ + public function getStreetLine4() + { + $street = $this->address->getStreet(); + + return isset($street[3]) ? $street[3] : ''; + } + + /** + * Get telephone number. + * + * @return string + */ + public function getTelephone() + { + return $this->address->getTelephone(); + } + + /** + * Get postcode. + * + * @return string + */ + public function getPostcode() + { + return $this->address->getPostcode(); + } + + /** + * Get city name. + * + * @return string + */ + public function getCity() + { + return $this->address->getCity(); + } + + /** + * Get first name. + * + * @return string + */ + public function getFirstname() + { + return $this->address->getFirstname(); + } + + /** + * Get last name. + * + * @return string + */ + public function getLastname() + { + return $this->address->getLastname(); + } + + /** + * Get middle name. + * + * @return string|null + */ + public function getMiddlename() + { + return $this->address->getMiddlename(); + } + + /** + * Get customer id. + * + * @return int|null + */ + public function getCustomerId() + { + return $this->address->getCustomerId(); + } + + /** + * Get billing/shipping email. + * + * @return string + */ + public function getEmail() + { + return $this->address->getEmail(); + } + + /** + * Returns name prefix. + * + * @return string + */ + public function getPrefix() + { + return $this->address->getPrefix(); + } + + /** + * Returns name suffix. + * + * @return string + */ + public function getSuffix() + { + return $this->address->getSuffix(); + } + + /** + * Get company. + * + * @return string + */ + public function getCompany() + { + return $this->address->getCompany(); + } + + /** + * Get Vat Id. + * + * @return string + */ + public function getVatId() + { + return $this->address->getVatId(); + } +} diff --git a/Gateway/Data/Order/AddressAdapterFactory.php b/Gateway/Data/Order/AddressAdapterFactory.php new file mode 100644 index 0000000..39e7f37 --- /dev/null +++ b/Gateway/Data/Order/AddressAdapterFactory.php @@ -0,0 +1,55 @@ +objectManager = $objectManager; + $this->instanceName = $instanceName; + } + + /** + * Create class instance with specified parameters. + * + * @param array $data + * + * @return \MercadoPago\AdbPayment\Gateway\Data\Order\AddressAdapter + */ + public function create(array $data = []) + { + return $this->objectManager->create($this->instanceName, $data); + } +} diff --git a/Gateway/Data/Order/OrderAdapter.php b/Gateway/Data/Order/OrderAdapter.php new file mode 100644 index 0000000..fe29cfa --- /dev/null +++ b/Gateway/Data/Order/OrderAdapter.php @@ -0,0 +1,263 @@ +order = $order; + $this->addAdapterFactory = $addAdapterFactory; + } + + /** + * Returns currency code. + * + * @return string + */ + public function getCurrencyCode() + { + return $this->order->getBaseCurrencyCode(); + } + + /** + * Returns order increment id. + * + * @return string + */ + public function getOrderIncrementId() + { + return $this->order->getIncrementId(); + } + + /** + * Returns customer ID. + * + * @return int|null + */ + public function getCustomerId() + { + return $this->order->getCustomerId(); + } + + /** + * Returns billing address. + * + * @return AddressAdapterInterface|null + */ + public function getBillingAddress() + { + if ($this->order->getBillingAddress()) { + return $this->addAdapterFactory->create( + ['address' => $this->order->getBillingAddress()] + ); + } + + return null; + } + + /** + * Returns shipping address. + * + * @return AddressAdapterInterface|null + */ + public function getShippingAddress() + { + if ($this->order->getShippingAddress()) { + return $this->addAdapterFactory->create( + ['address' => $this->order->getShippingAddress()] + ); + } + + return null; + } + + /** + * Returns order store id. + * + * @return int + */ + public function getStoreId() + { + return $this->order->getStoreId(); + } + + /** + * Returns order id. + * + * @return int + */ + public function getId() + { + return $this->order->getEntityId(); + } + + /** + * Returns order grand total amount. + * + * @return float|null + */ + public function getGrandTotalAmount() + { + return $this->order->getGrandTotal(); + } + + /** + * Returns list of line items in the cart. + * + * @return \Magento\Sales\Api\Data\OrderItemInterface[] + */ + public function getItems() + { + return $this->order->getItems(); + } + + /** + * Gets the remote IP address for the order. + * + * @return string|null Remote IP address. + */ + public function getRemoteIp() + { + return $this->order->getRemoteIp(); + } + + /** + * Gets the Dob for the customer. + * + * @return string|null Customer Dob. + */ + public function getCustomerDob() + { + return $this->order->getCustomerDob(); + } + + /** + * Gets the Tax/Vat for the customer. + * + * @return string|null Tax/Vat. + */ + public function getCustomerTaxvat() + { + return $this->order->getCustomerTaxvat(); + } + + /** + * Returns order sub total amount. + * + * @return float|null + */ + public function getSubTotal() + { + return $this->order->getSubTotal(); + } + + /** + * Returns order shipping total amount. + * + * @return float|null + */ + public function getShippingAmount() + { + return $this->order->getShippingAmount(); + } + + /** + * Returns order shipping method. + * + * @return string|null + */ + public function getShippingMethod() + { + return $this->order->getShippingMethod(); + } + + /** + * Returns order shipping description. + * + * @return string|null + */ + public function getShippingDescription() + { + return $this->order->getShippingDescription(); + } + + /** + * Returns order discount total amount. + * + * @return float|null + */ + public function getDiscountAmount() + { + return $this->order->getDiscountAmount(); + } + + /** + * Returns order discount total description. + * + * @return string|null + */ + public function getDiscountDescription() + { + return $this->order->getDiscountDescription(); + } + + /** + * Returns order tax total amount. + * + * @return float|null + */ + public function getTaxAmount() + { + return $this->order->getTaxAmount(); + } + + /** + * Returns order finance cost total amount. + * + * @return float|null + */ + public function getFinanceCostAmount() + { + return $this->order->getFinanceCostAmount(); + } + + /** + * Returns order quote id. + * + * @return float|null + */ + public function getQuoteId() + { + return $this->order->getQuoteId(); + } +} diff --git a/Gateway/Data/Order/OrderAdapterFactory.php b/Gateway/Data/Order/OrderAdapterFactory.php new file mode 100644 index 0000000..aa31ab0 --- /dev/null +++ b/Gateway/Data/Order/OrderAdapterFactory.php @@ -0,0 +1,55 @@ +objectManager = $objectManager; + $this->instanceName = $instanceName; + } + + /** + * Create class instance with specified parameters. + * + * @param array $data + * + * @return \MercadoPago\AdbPayment\Gateway\Data\Order\OrderAdapter + */ + public function create(array $data = []) + { + return $this->objectManager->create($this->instanceName, $data); + } +} diff --git a/Gateway/Http/Client/AcceptPaymentClient.php b/Gateway/Http/Client/AcceptPaymentClient.php new file mode 100644 index 0000000..01e096f --- /dev/null +++ b/Gateway/Http/Client/AcceptPaymentClient.php @@ -0,0 +1,164 @@ +config = $config; + $this->httpClientFactory = $httpClientFactory; + $this->logger = $logger; + $this->json = $json; + } + + /** + * Places request to gateway. + * + * @param TransferInterface $transferObject + * + * @return array + */ + public function placeRequest(TransferInterface $transferObject) + { + $sendData = []; + /** @var ZendClient $client */ + $client = $this->httpClientFactory->create(); + $request = $transferObject->getBody(); + $storeId = $request[self::STORE_ID]; + $url = $this->config->getApiUrl(); + $clientConfigs = $this->config->getClientConfigs(); + $clientHeaders = $this->config->getClientHeaders($storeId); + $paymentId = $request[ExtPaymentIdDataRequest::MP_REFERENCE_ID]; + unset($request[ExtPaymentIdDataRequest::MP_REFERENCE_ID]); + unset($request[self::STORE_ID]); + + $sendData['capture'] = true; + + if (!empty($request[CaptureAmountRequest::AMOUNT_TO_CAPTURE]) && $request[CaptureAmountRequest::AMOUNT_TO_CAPTURE] > 0) { + $sendData['transaction_amount'] = $request[CaptureAmountRequest::AMOUNT_TO_CAPTURE]; + } + + try { + $client->setUri($url.'/v1/payments/'.$paymentId); + $client->setConfig($clientConfigs); + $client->setHeaders($clientHeaders); + $client->setRawData($this->json->serialize($sendData), 'application/json'); + $client->setMethod(ZendClient::PUT); + + $responseBody = $client->request()->getBody(); + $data = $this->json->unserialize($responseBody); + $response = array_merge( + [ + self::RESULT_CODE => 0, + ], + $data + ); + if (isset($data[self::RESPONSE_STATUS]) && + $data[self::RESPONSE_STATUS] === self::RESPONSE_STATUS_APPROVED + ) { + $response = array_merge( + [ + self::RESULT_CODE => 1, + ], + $data + ); + } + $this->logger->debug( + [ + 'url' => $url.'/v1/payments/'.$paymentId, + 'request' => $this->json->serialize($sendData), + 'response' => $this->json->serialize($response), + ] + ); + } catch (InvalidArgumentException $exc) { + $this->logger->debug( + [ + 'url' => $url.'/v1/payments/'.$paymentId, + 'request' => $this->json->serialize($sendData), + 'error' => $exc->getMessage(), + ] + ); + // phpcs:ignore Magento2.Exceptions.DirectThrow + throw new Exception('Invalid JSON was returned by the gateway'); + } + + return $response; + } +} diff --git a/Gateway/Http/Client/CancelPaymentClient.php b/Gateway/Http/Client/CancelPaymentClient.php new file mode 100644 index 0000000..ec3884c --- /dev/null +++ b/Gateway/Http/Client/CancelPaymentClient.php @@ -0,0 +1,154 @@ +config = $config; + $this->httpClientFactory = $httpClientFactory; + $this->logger = $logger; + $this->json = $json; + } + + /** + * Places request to gateway. + * + * @param TransferInterface $transferObject + * + * @return array + */ + public function placeRequest(TransferInterface $transferObject) + { + /** @var ZendClient $client */ + $client = $this->httpClientFactory->create(); + $request = $transferObject->getBody(); + $storeId = $request[self::STORE_ID]; + $url = $this->config->getApiUrl(); + $clientConfigs = $this->config->getClientConfigs(); + $clientHeaders = $this->config->getClientHeaders($storeId); + $paymentId = $request[self::MP_PAYMENT_ID]; + unset($request[self::STORE_ID]); + unset($request[self::MP_PAYMENT_ID]); + $request['status'] = 'cancelled'; + + try { + $client->setUri($url.'/v1/payments/'.$paymentId); + $client->setConfig($clientConfigs); + $client->setHeaders($clientHeaders); + $client->setRawData($this->json->serialize($request), 'application/json'); + $client->setMethod(ZendClient::PUT); + $responseBody = $client->request()->getBody(); + $data = $this->json->unserialize($responseBody); + $response = array_merge( + [ + self::RESULT_CODE => 0, + ], + $data + ); + if (isset($data[self::RESPONSE_PAYMENT_ID])) { + $response = array_merge( + [ + self::RESULT_CODE => 1, + self::RESPONSE_PAYMENT_ID => $data[self::RESPONSE_PAYMENT_ID], + ], + $data + ); + } + $this->logger->debug( + [ + 'url' => $url.'/v1/payments/'.$paymentId, + 'request' => $this->json->serialize($request), + 'response' => $this->json->serialize($response), + ] + ); + } catch (InvalidArgumentException $exc) { + $this->logger->debug( + [ + 'url' => $url.'/v1/payments/'.$paymentId, + 'request' => $this->json->serialize($request), + 'error' => $exc->getMessage(), + ] + ); + // phpcs:ignore Magento2.Exceptions.DirectThrow + throw new Exception('Invalid JSON was returned by the gateway'); + } + + return $response; + } +} diff --git a/Gateway/Http/Client/CapturePaymentClient.php b/Gateway/Http/Client/CapturePaymentClient.php new file mode 100644 index 0000000..1f8a0f2 --- /dev/null +++ b/Gateway/Http/Client/CapturePaymentClient.php @@ -0,0 +1,149 @@ +config = $config; + $this->httpClientFactory = $httpClientFactory; + $this->logger = $logger; + $this->json = $json; + $this->paymentGet = $paymentGet; + $this->acceptPaymentClient = $acceptPaymentClient; + $this->createOrderPaymentCustomClient = $createOrderPaymentCustomClient; + } + + private function shouldCaptureOnline(TransferInterface $transferObject) + { + $request = $transferObject->getBody(); + + $mpPaymentId = $request[CcPaymentDataRequest::MP_PAYMENT_ID]; + $storeId = $request['store_id']; + + if ($mpPaymentId === null || $mpPaymentId === '') { + return false; + } + + $mpPaymentData = $this->paymentGet->get($mpPaymentId, $storeId); + + return $mpPaymentData['status'] === 'authorized' && $mpPaymentData['captured'] === false && $mpPaymentData['status_detail'] === 'pending_capture'; + } + + private function capturePayment(TransferInterface $transferObject) + { + $result = $this->acceptPaymentClient->placeRequest($transferObject); + $result[self::IGNORE_TRANSACTION_CREATION] = true; + return $result; + } + + /** + * Places request to gateway. + * + * @param TransferInterface $transferObject + * + * @return array + */ + public function placeRequest(TransferInterface $transferObject) + { + $data = $transferObject->getBody(); + + if (!empty($data[CaptureAmountRequest::AMOUNT_PAID]) && $data[CaptureAmountRequest::AMOUNT_PAID] > 0) { + return ['RESULT_CODE' => 0, 'failsDescription' => 'JHE']; + } + + if ($this->shouldCaptureOnline($transferObject)) { + return $this->capturePayment($transferObject); + } + + return $this->createOrderPaymentCustomClient->placeRequest($transferObject); + } +} diff --git a/Gateway/Http/Client/CreateOrderPaymentCheckoutProClient.php b/Gateway/Http/Client/CreateOrderPaymentCheckoutProClient.php new file mode 100644 index 0000000..5a1fcd7 --- /dev/null +++ b/Gateway/Http/Client/CreateOrderPaymentCheckoutProClient.php @@ -0,0 +1,132 @@ +config = $config; + $this->httpClientFactory = $httpClientFactory; + $this->logger = $logger; + $this->json = $json; + } + + /** + * Places request to gateway. + * + * @param TransferInterface $transferObject + * + * @return array + */ + public function placeRequest(TransferInterface $transferObject) + { + /** @var ZendClient $client */ + $client = $this->httpClientFactory->create(); + $request = $transferObject->getBody(); + $storeId = $request[self::STORE_ID]; + unset($request[self::STORE_ID]); + + $serializeResquest = $this->json->serialize($request); + $url = $this->config->getApiUrl(); + $clientConfigs = $this->config->getClientConfigs(); + $clientHeaders = $this->config->getClientHeaders($storeId); + + try { + $client->setUri($url.'/v1/asgard/preferences'); + $client->setConfig($clientConfigs); + $client->setHeaders($clientHeaders); + $client->setRawData($serializeResquest, 'application/json'); + $client->setMethod(ZendClient::POST); + + $responseBody = $client->request()->getBody(); + $data = $this->json->unserialize($responseBody); + $response = array_merge( + [ + self::RESULT_CODE => isset($data['id']) ? 1 : 0, + self::EXT_ORD_ID => isset($data['id']) ? $data['id'] : null, + ], + $data + ); + } catch (InvalidArgumentException $exc) { + // phpcs:ignore Magento2.Exceptions.DirectThrow + throw new Exception('Invalid JSON was returned by the gateway'); + } + + unset($clientHeaders['Authorization']); + $this->logger->debug( + [ + 'url' => $url.'/v1/asgard/preferences', + 'header' => $this->json->serialize($clientHeaders), + 'request' => $serializeResquest, + 'response' => $this->json->serialize($responseBody), + ] + ); + + return $response; + } +} diff --git a/Gateway/Http/Client/CreateOrderPaymentCustomClient.php b/Gateway/Http/Client/CreateOrderPaymentCustomClient.php new file mode 100644 index 0000000..c8045cc --- /dev/null +++ b/Gateway/Http/Client/CreateOrderPaymentCustomClient.php @@ -0,0 +1,157 @@ +config = $config; + $this->httpClientFactory = $httpClientFactory; + $this->logger = $logger; + $this->json = $json; + } + + /** + * Places request to gateway. + * + * @param TransferInterface $transferObject + * + * @return array + */ + public function placeRequest(TransferInterface $transferObject) + { + /** @var ZendClient $client */ + $client = $this->httpClientFactory->create(); + $request = $transferObject->getBody(); + $storeId = $request[self::STORE_ID]; + + unset($request[self::STORE_ID]); + unset($request[CcPaymentDataRequest::MP_PAYMENT_ID]); + unset($request[CaptureAmountRequest::AMOUNT_PAID]); + unset($request[CaptureAmountRequest::AMOUNT_TO_CAPTURE]); + + $serializeResquest = $this->json->serialize($request); + $url = $this->config->getApiUrl(); + $clientConfigs = $this->config->getClientConfigs(); + $clientHeaders = $this->config->getClientHeaders($storeId); + + $responseBody = []; + + try { + $client->setUri($url.'/v2/asgard/payments'); + $client->setConfig($clientConfigs); + $client->setHeaders($clientHeaders); + $client->setRawData($serializeResquest, 'application/json'); + $client->setMethod(ZendClient::POST); + + $responseBody = $client->request()->getBody(); + $data = $this->json->unserialize($responseBody); + + if ($data[self::STATUS] === self::STATUS_REJECTED) { + $data['id'] = null; + } + + $response = array_merge( + [ + self::RESULT_CODE => isset($data['id']) ? 1 : 0, + self::EXT_ORD_ID => isset($data['id']) ? $data['id'] : null, + ], + $data + ); + } catch (InvalidArgumentException $exc) { + // phpcs:ignore Magento2.Exceptions.DirectThrow + throw new Exception('Invalid JSON was returned by the gateway'); + } finally { + $this->logger->debug( + [ + 'url' => $url.'/v2/asgard/payments', + 'header' => $this->json->serialize($clientHeaders), + 'request' => $serializeResquest, + 'response' => $responseBody, + ] + ); + } + + unset($clientHeaders['Authorization']); + + + return $response; + } +} diff --git a/Gateway/Http/Client/DenyPaymentClient.php b/Gateway/Http/Client/DenyPaymentClient.php new file mode 100644 index 0000000..56c4a3c --- /dev/null +++ b/Gateway/Http/Client/DenyPaymentClient.php @@ -0,0 +1,154 @@ +config = $config; + $this->httpClientFactory = $httpClientFactory; + $this->logger = $logger; + $this->json = $json; + } + + /** + * Places request to gateway. + * + * @param TransferInterface $transferObject + * + * @return array + */ + public function placeRequest(TransferInterface $transferObject) + { + $sendData = []; + + /** @var ZendClient $client */ + $client = $this->httpClientFactory->create(); + $request = $transferObject->getBody(); + $storeId = $request[self::STORE_ID]; + $url = $this->config->getApiUrl(); + $clientConfigs = $this->config->getClientConfigs(); + $clientHeaders = $this->config->getClientHeaders($storeId); + $paymentId = $request[ExtPaymentIdDataRequest::MP_REFERENCE_ID]; + $sendData['status'] = 'cancelled'; + + try { + $client->setUri($url.'/v1/payments/'.$paymentId); + $client->setConfig($clientConfigs); + $client->setHeaders($clientHeaders); + $client->setRawData($this->json->serialize($sendData), 'application/json'); + $client->setMethod(ZendClient::PUT); + + $responseBody = $client->request()->getBody(); + $data = $this->json->unserialize($responseBody); + $response = array_merge( + [ + self::RESULT_CODE => 0, + ], + $data + ); + if (isset($data[self::RESPONSE_STATUS]) && + $data[self::RESPONSE_STATUS] === self::RESPONSE_STATUS_CANCELLED + ) { + $response = array_merge( + [ + self::RESULT_CODE => 1, + ], + $data + ); + } + $this->logger->debug( + [ + 'url' => $url.'/v1/payments/'.$paymentId, + 'request' => $this->json->serialize($sendData), + 'response' => $this->json->serialize($response), + ] + ); + } catch (InvalidArgumentException $exc) { + $this->logger->debug( + [ + 'url' => $url.'/v1/payments/'.$paymentId, + 'request' => $this->json->serialize($sendData), + 'error' => $exc->getMessage(), + ] + ); + // phpcs:ignore Magento2.Exceptions.DirectThrow + throw new Exception('Invalid JSON was returned by the gateway'); + } + + return $response; + } +} diff --git a/Gateway/Http/Client/FetchPaymentClient.php b/Gateway/Http/Client/FetchPaymentClient.php new file mode 100644 index 0000000..ff98c04 --- /dev/null +++ b/Gateway/Http/Client/FetchPaymentClient.php @@ -0,0 +1,132 @@ +logger = $logger; + $this->json = $json; + $this->mpApiNotification = $mpApiNotification; + } + + /** + * Places request to gateway. + * + * @param TransferInterface $transferObject + * + * @return array + */ + public function placeRequest(TransferInterface $transferObject) + { + $request = $transferObject->getBody(); + $storeId = $request[self::STORE_ID]; + + $paymentId = $request[self::MP_PAYMENT_ID]; + + $notificationId = $request[self::NOTIFICATION_ID]; + + try { + $data = $this->mpApiNotification->get($notificationId, $storeId); + + $response = array_merge( + [ + self::RESULT_CODE => 0, + ], + $data + ); + if (isset($data[self::RESPONSE_TRANSACTION_ID])) { + $response = array_merge( + [ + self::RESULT_CODE => 1, + self::RESPONSE_PAYMENT_ID => $data[self::RESPONSE_TRANSACTION_ID], + ], + $data + ); + } + + } catch (InvalidArgumentException $exc) { + // phpcs:ignore Magento2.Exceptions.DirectThrow + throw new Exception($exc->getMessage()); + } + + return $response; + } +} diff --git a/Gateway/Http/Client/RefundClient.php b/Gateway/Http/Client/RefundClient.php new file mode 100644 index 0000000..8b1f6e7 --- /dev/null +++ b/Gateway/Http/Client/RefundClient.php @@ -0,0 +1,303 @@ +config = $config; + $this->httpClientFactory = $httpClientFactory; + $this->logger = $logger; + $this->json = $json; + } + + /** + * Places request to gateway. + * + * @param TransferInterface $transferObject + * + * @return array + */ + public function placeRequest(TransferInterface $transferObject) + { + /** @var ZendClient $client */ + $client = $this->httpClientFactory->create(); + $request = $transferObject->getBody(); + $storeId = $request[self::STORE_ID]; + $url = $this->config->getApiUrl(); + $clientConfigs = $this->config->getClientConfigs(); + $clientHeaders = $this->config->getClientHeaders($storeId); + $clientConfigs = array_merge_recursive($clientConfigs, [ + self::X_IDEMPOTENCY_KEY => $request[self::X_IDEMPOTENCY_KEY], + ]); + + $paymentId = $request['payment_id']; + $order = $request['order']; + unset($request['payment_id']); + unset($request['order']); + unset($request[self::STORE_ID]); + unset($request[self::X_IDEMPOTENCY_KEY]); + $metadata = ['origem' => self::NOTIFICATION_ORIGIN]; + + $paymentIndexList = $order['payment']['additional_information']['payment_index_list'] ?? null; + if (isset($paymentIndexList) && sizeof($paymentIndexList) > 1) { + return $this->placeMultipleRefunds($order, $client, $url, $request, $clientConfigs, $clientHeaders); + } + + try { + $client->setUri($url.'/v1/payments/'.$paymentId.'/refunds'); + $client->setConfig($clientConfigs); + $client->setHeaders($clientHeaders); + + $request = (object) array_merge( (array)$request, array( 'metadata' => $metadata ) ); + $client->setRawData($this->json->serialize($request), 'application/json'); + + $client->setMethod(ZendClient::POST); + + $responseBody = $client->request()->getBody(); + $data = $this->json->unserialize($responseBody); + + $response = array_merge( + [ + self::RESULT_CODE => 0, + ], + $data + ); + + if (isset($data[self::RESPONSE_REFUND_ID])) { + $status = $data[self::RESPONSE_STATUS]; + $response = array_merge( + [ + self::RESULT_CODE => ($status !== self::RESPONSE_STATUS_DENIED) ? 1 : 0, + self::RESPONSE_REFUND_ID => $data[self::RESPONSE_REFUND_ID], + ], + $data + ); + } + + $this->logger->debug( + [ + 'url' => $url.'/v1/payments/'.$paymentId.'/refunds', + 'request' => $this->json->serialize($request), + 'response' => $this->json->serialize($response), + ] + ); + } catch (InvalidArgumentException $exc) { + $this->logger->debug( + [ + 'url' => $url.'/v1/payments/'.$paymentId.'/refunds', + 'request' => $this->json->serialize($request), + 'error' => $exc->getMessage(), + ] + ); + // phpcs:ignore Magento2.Exceptions.DirectThrow + throw new Exception('Invalid JSON was returned by the gateway'); + } + + return $response; + } + + /** + * Refund for multiple payments. + * + * @return array + */ + public function placeMultipleRefunds ( + object $order, + ZendClient $client, + string $url, + array $request, + array $clientConfigs, + array $clientHeaders + ) { + $paymentIndexList = $order['payment']['additional_information']['payment_index_list']; + $payment = $order->getPayment(); + $remainingAmount = $payment->getAmountPaid() - $payment->getAmountRefunded(); + $amountToRefund = isset($request['amount']) ? $request['amount'] : $remainingAmount; + $metadata = ['origem' => self::NOTIFICATION_ORIGIN]; + $response = []; + + foreach($paymentIndexList as $paymentIndex) { + $cardRefundedAmount = str_replace('%', $paymentIndex, self::PAYMENT_REFUNDED_AMOUNT); + $paymentAddInfo = $payment['additional_information']; + $paymentId = $paymentAddInfo[str_replace('%', $paymentIndex, self::PAYMENT_ID)]; + + $paymentAmount = $paymentAddInfo[str_replace('%', $paymentIndex, self::PAYMENT_TOTAL_AMOUNT)]; + $paymentRefundedAmount = $paymentAddInfo[$cardRefundedAmount]; + if ($amountToRefund > $paymentAmount - $paymentRefundedAmount) { + $request['amount'] = $paymentAmount - $paymentRefundedAmount; + } else { + $request['amount'] = $amountToRefund; + } + $amountToRefund -= $request['amount']; + + if($request['amount'] > 0) { + try { + $client->setUri($url.'/v1/payments/'.$paymentId.'/refunds'); + $client->setConfig($clientConfigs); + $client->setHeaders($clientHeaders); + + $requestData = (object) array_merge( (array)$request, array( 'metadata' => $metadata ) ); + $client->setRawData($this->json->serialize($requestData), 'application/json'); + + $client->setMethod(ZendClient::POST); + + $responseBody = $client->request()->getBody(); + $data = $this->json->unserialize($responseBody); + + $refundResponse = array_merge( + [ + self::RESULT_CODE => 0, + ], + $data + ); + + if (isset($data[self::RESPONSE_REFUND_ID])) { + $status = $data[self::RESPONSE_STATUS]; + $refundResponse = array_merge( + [ + self::RESULT_CODE => ($status !== self::RESPONSE_STATUS_DENIED) ? 1 : 0, + self::RESPONSE_REFUND_ID => $data[self::RESPONSE_REFUND_ID], + ], + $data + ); + $payment->setAdditionalInformation($cardRefundedAmount, $paymentRefundedAmount + $request['amount']); + $payment->save(); + } + + $this->logger->debug( + [ + 'url' => $url.'/v1/payments/'.$paymentId.'/refunds', + 'request' => $this->json->serialize($request), + 'response' => $this->json->serialize($refundResponse), + ] + ); + + $response = array_merge($response, $refundResponse); + } catch (InvalidArgumentException $exc) { + $this->logger->debug( + [ + 'url' => $url.'/v1/payments/'.$paymentId.'/refunds', + 'request' => $this->json->serialize($request), + 'error' => $exc->getMessage(), + ] + ); + // phpcs:ignore Magento2.Exceptions.DirectThrow + throw new Exception('Invalid JSON was returned by the gateway'); + } + } + } + $order->save(); + return $response; + } +} diff --git a/Gateway/Http/Client/RefundClientTwoCc.php b/Gateway/Http/Client/RefundClientTwoCc.php new file mode 100644 index 0000000..3478d05 --- /dev/null +++ b/Gateway/Http/Client/RefundClientTwoCc.php @@ -0,0 +1,187 @@ +config = $config; + $this->httpClientFactory = $httpClientFactory; + $this->logger = $logger; + $this->json = $json; + } + + /** + * Places request to gateway. + * + * @param TransferInterface $transferObject + * + * @return array + */ + public function placeRequest(TransferInterface $transferObject) + { + /** @var ZendClient $client */ + $client = $this->httpClientFactory->create(); + $request = $transferObject->getBody(); + $storeId = $request[self::STORE_ID]; + $url = $this->config->getApiUrl(); + $clientConfigs = $this->config->getClientConfigs(); + $clientHeaders = $this->config->getClientHeaders($storeId); + + $status = ''; + + $clientConfigs = array_merge_recursive($clientConfigs, [ + self::X_IDEMPOTENCY_KEY => $request[self::X_IDEMPOTENCY_KEY], + ]); + + $paymentId = $request['payment_id']; + + unset($request['payment_id']); + unset($request[self::STORE_ID]); + unset($request[self::X_IDEMPOTENCY_KEY]); + $metadata = ['origem' => self::NOTIFICATION_ORIGIN]; + + $urlRefund = $url . '/v1/asgard/multipayments/' . $paymentId . '/refund'; + + try { + $client->setUri($urlRefund); + $client->setConfig($clientConfigs); + $client->setHeaders($clientHeaders); + $request = (object) array_merge( (array)$request, array( 'metadata' => $metadata ) ); + $client->setRawData($this->json->serialize($request), 'application/json'); + + $client->setMethod(ZendClient::POST); + + $responseBody = $client->request()->getBody(); + $data = $this->json->unserialize($responseBody); + + $refundIds = []; + + $status = null; + + foreach ($data as $arrayData) { + + if (isset($arrayData[self::RESPONSE_REFUND_ID])) { + $refundIds[] = $arrayData[self::RESPONSE_REFUND_ID]; + } + + if (isset($arrayData[self::RESPONSE_STATUS])) { + $status = $arrayData[self::RESPONSE_STATUS]; + } + } + + $response = array_merge( + [ + self::RESULT_CODE => ($status !== self::RESPONSE_STATUS_DENIED) ? 1 : 0, + self::RESPONSE_REFUND_ID => implode('_', $refundIds), + self::RESPONSE_STATUS => $status, + ], + $data + ); + + $this->logger->debug( + [ + 'url' => $urlRefund, + 'request' => $this->json->serialize($request), + 'response' => $this->json->serialize($response), + ] + ); + } catch (InvalidArgumentException $exc) { + $this->logger->debug( + [ + 'url' => $urlRefund, + 'request' => $this->json->serialize($request), + 'error' => $exc->getMessage(), + ] + ); + // phpcs:ignore Magento2.Exceptions.DirectThrow + throw new Exception('Invalid JSON was returned by the gateway'); + } + + return $response; + } +} diff --git a/Gateway/Http/TransferFactory.php b/Gateway/Http/TransferFactory.php new file mode 100644 index 0000000..f39b96e --- /dev/null +++ b/Gateway/Http/TransferFactory.php @@ -0,0 +1,48 @@ +transferBuilder = $transferBuilder; + } + + /** + * Builds gateway transfer object. + * + * @param array $request + * + * @return TransferInterface + */ + public function create(array $request) + { + return $this->transferBuilder + ->setBody($request) + ->setMethod('POST') + ->build(); + } +} diff --git a/Gateway/Request/AdditionalInfoDataRequest.php b/Gateway/Request/AdditionalInfoDataRequest.php new file mode 100644 index 0000000..7a7691b --- /dev/null +++ b/Gateway/Request/AdditionalInfoDataRequest.php @@ -0,0 +1,43 @@ +subjectReader = $subjectReader; + $this->config = $config; + $this->orderAdapterFactory = $orderAdapterFactory; + } + + /** + * Build. + * + * @param array $buildSubject + */ + public function build(array $buildSubject): array + { + if (!isset($buildSubject['payment']) + || !$buildSubject['payment'] instanceof PaymentDataObjectInterface + ) { + throw new InvalidArgumentException('Payment data object should be provided'); + } + + $paymentDO = $this->subjectReader->readPayment($buildSubject); + + $payment = $paymentDO->getPayment(); + + $result = []; + + /** @var OrderAdapterFactory $orderAdapter */ + $orderAdapter = $this->orderAdapterFactory->create( + ['order' => $payment->getOrder()] + ); + + $ipAddress = $orderAdapter->getRemoteIp() ?: '127.0.0.1'; + + $result[AdditionalInfoDataRequest::ADDITIONAL_INFO][self::IP_ADDRESS] = $ipAddress; + + return $result; + } +} diff --git a/Gateway/Request/AdditionalInfoItemsDataRequest.php b/Gateway/Request/AdditionalInfoItemsDataRequest.php new file mode 100644 index 0000000..e0828f2 --- /dev/null +++ b/Gateway/Request/AdditionalInfoItemsDataRequest.php @@ -0,0 +1,139 @@ +image = $image; + $this->subjectReader = $subjectReader; + $this->config = $config; + } + + /** + * Build. + * + * @param array $buildSubject + */ + public function build(array $buildSubject) + { + if (!isset($buildSubject['payment']) + || !$buildSubject['payment'] instanceof PaymentDataObjectInterface + ) { + throw new InvalidArgumentException('Payment data object should be provided'); + } + + $paymentDO = $this->subjectReader->readPayment($buildSubject); + + $result = []; + + $order = $paymentDO->getOrder(); + $storeId = $order->getStoreId(); + $items = $order->getItems(); + $itemcount = count($items); + + if ($itemcount) { + foreach ($items as $item) { + if ($item->getParentItem()) { + continue; + } + + $product = $item->getProduct(); + $image = $this->image->init($product, 'small_image') + ->setImageFile($product->getSmallImage()); + + $result[AdditionalInfoDataRequest::ADDITIONAL_INFO][self::ITEMS][] = [ + self::ITEM_ID => $item->getSku(), + self::ITEM_TITLE => $item->getName(), + self::ITEM_DESCRIPTION => $item->getName().'-'.$item->getSku(), + self::ITEM_QUANTITY => $item->getQtyOrdered(), + self::ITEM_PICTURE_URL => $image->getUrl(), + self::ITEM_UNIT_PRICE => $this->config->formatPrice($item->getPrice(), $storeId), + self::ITEM_CATEGORY_ID => $this->config->getMpCategory($storeId), + ]; + } + } + + return $result; + } +} diff --git a/Gateway/Request/AdditionalInfoPayerDataRequest.php b/Gateway/Request/AdditionalInfoPayerDataRequest.php new file mode 100644 index 0000000..5e55ed5 --- /dev/null +++ b/Gateway/Request/AdditionalInfoPayerDataRequest.php @@ -0,0 +1,185 @@ +subjectReader = $subjectReader; + $this->config = $config; + $this->orderAdapterFactory = $orderAdapterFactory; + } + + /** + * Build. + * + * @param array $buildSubject + */ + public function build(array $buildSubject): array + { + if (!isset($buildSubject['payment']) + || !$buildSubject['payment'] instanceof PaymentDataObjectInterface + ) { + throw new InvalidArgumentException('Payment data object should be provided'); + } + + $paymentDO = $this->subjectReader->readPayment($buildSubject); + + $payment = $paymentDO->getPayment(); + + $result = []; + + /** @var OrderAdapterFactory $orderAdapter */ + $orderAdapter = $this->orderAdapterFactory->create( + ['order' => $payment->getOrder()] + ); + + $billingAddress = $orderAdapter->getBillingAddress(); + + if ($billingAddress) { + $phone = preg_replace('/[^0-9]/', '', $billingAddress->getTelephone()); + $phoneAreaCode = substr($phone, 0, 2); + $phoneNumber = substr($phone, 2); + + // Rewrite Payer from payment form + $payerFirstName = + $payment->getAdditionalInformation('payer_first_name') ?: $billingAddress->getFirstname(); + $payerLastName = + $payment->getAdditionalInformation('payer_last_name') ?: $billingAddress->getLastname(); + + $result[AdditionalInfoDataRequest::ADDITIONAL_INFO][self::PAYER] = [ + self::FIRST_NAME => $payerFirstName, + self::LAST_NAME => $payerLastName, + ]; + + $result[AdditionalInfoDataRequest::ADDITIONAL_INFO][self::PAYER][self::ADDRESS] = [ + self::ZIP_CODE => $billingAddress->getPostcode(), + self::STREET_NAME => $this->config->getValueForAddress( + $billingAddress, + self::STREET_NAME + ), + self::STREET_NUMBER => $this->config->getValueForAddress( + $billingAddress, + self::STREET_NUMBER + ), + ]; + + $result[AdditionalInfoDataRequest::ADDITIONAL_INFO][self::PAYER][self::PHONE] = [ + self::PHONE_AREA_CODE => $phoneAreaCode, + self::PHONE_NUMBER => $phoneNumber, + ]; + } + + return $result; + } +} diff --git a/Gateway/Request/AdditionalInfoShippingsDataRequest.php b/Gateway/Request/AdditionalInfoShippingsDataRequest.php new file mode 100644 index 0000000..fefc3a4 --- /dev/null +++ b/Gateway/Request/AdditionalInfoShippingsDataRequest.php @@ -0,0 +1,138 @@ +subjectReader = $subjectReader; + $this->config = $config; + $this->orderAdapterFactory = $orderAdapterFactory; + } + + /** + * Build. + * + * @param array $buildSubject + */ + public function build(array $buildSubject): array + { + if (!isset($buildSubject['payment']) + || !$buildSubject['payment'] instanceof PaymentDataObjectInterface + ) { + throw new InvalidArgumentException('Payment data object should be provided'); + } + + $paymentDO = $this->subjectReader->readPayment($buildSubject); + $payment = $paymentDO->getPayment(); + + $result = []; + + /** @var OrderAdapterFactory $orderAdapter */ + $orderAdapter = $this->orderAdapterFactory->create( + ['order' => $payment->getOrder()] + ); + + $shippingAddress = $orderAdapter->getShippingAddress(); + if ($shippingAddress) { + $result[AdditionalInfoDataRequest::ADDITIONAL_INFO][self::SHIPMENTS][self::RECEIVER_ADDRESS] = [ + self::ZIP_CODE => $shippingAddress->getPostcode(), + self::STREET_NAME => $this->config->getValueForAddress( + $shippingAddress, + self::STREET_NAME + ), + self::STREET_NUMBER => $this->config->getValueForAddress( + $shippingAddress, + self::STREET_NUMBER + ), + ]; + } + + return $result; + } +} diff --git a/Gateway/Request/AmountDenyDataRequest.php b/Gateway/Request/AmountDenyDataRequest.php new file mode 100644 index 0000000..b6d2986 --- /dev/null +++ b/Gateway/Request/AmountDenyDataRequest.php @@ -0,0 +1,85 @@ +subjectReader = $subjectReader; + $this->config = $config; + $this->configCc = $configCc; + } + + /** + * Build. + * + * @param array $buildSubject + */ + public function build(array $buildSubject) + { + if (!isset($buildSubject['payment']) + || !$buildSubject['payment'] instanceof PaymentDataObjectInterface + ) { + throw new InvalidArgumentException('Payment data object should be provided'); + } + + $paymentDO = $this->subjectReader->readPayment($buildSubject); + + $result = []; + + $order = $paymentDO->getOrder(); + + $storeId = $order->getStoreId(); + + $grandTotal = $order->getGrandTotalAmount(); + + $result[self::CANCEL_AMOUNT] = $this->config->formatPrice($grandTotal, $storeId); + + return $result; + } +} diff --git a/Gateway/Request/AuthorizationRequest.php b/Gateway/Request/AuthorizationRequest.php new file mode 100644 index 0000000..6cf1f5a --- /dev/null +++ b/Gateway/Request/AuthorizationRequest.php @@ -0,0 +1,63 @@ +config = $config; + } + + /** + * Build. + * + * @param array $buildSubject + */ + public function build(array $buildSubject) + { + if (!isset($buildSubject['payment']) + || !$buildSubject['payment'] instanceof PaymentDataObjectInterface + ) { + throw new InvalidArgumentException('Payment data object should be provided'); + } + + $paymentDO = $buildSubject['payment']; + + $payment = $paymentDO->getPayment(); + + $order = $payment->getOrder(); + + return [ + self::MERCADOPAGO_ORDER_ID => $order->getExtOrderId(), + ]; + } +} diff --git a/Gateway/Request/BackUrlsDataRequest.php b/Gateway/Request/BackUrlsDataRequest.php new file mode 100644 index 0000000..6b3771c --- /dev/null +++ b/Gateway/Request/BackUrlsDataRequest.php @@ -0,0 +1,111 @@ +frontendUrlBuilder = $frontendUrlBuilder; + $this->subjectReader = $subjectReader; + } + + /** + * Build. + * + * @param array $buildSubject + */ + public function build(array $buildSubject) + { + if (!isset($buildSubject['payment']) + || !$buildSubject['payment'] instanceof PaymentDataObjectInterface + ) { + throw new InvalidArgumentException('Payment data object should be provided'); + } + + $paymentDO = $this->subjectReader->readPayment($buildSubject); + + $result = []; + + $order = $paymentDO->getOrder(); + $storeId = $order->getStoreId(); + + $urlSuccess = $this->frontendUrlBuilder->setScope($storeId)->getUrl( + self::PATH_TO_SUCCESS, + ['_nosid' => false] + ); + $urlFailure = $this->frontendUrlBuilder->setScope($storeId)->getUrl( + self::PATH_TO_FAILURE, + ['_nosid' => false] + ); + + $result[self::BACK_URLS] = [ + self::SUCCESS => $urlSuccess, + self::PENDING => $urlSuccess, + self::FAILURE => $urlFailure, + ]; + + return $result; + } +} diff --git a/Gateway/Request/BankTransDetailsDataRequest.php b/Gateway/Request/BankTransDetailsDataRequest.php new file mode 100644 index 0000000..2e950a3 --- /dev/null +++ b/Gateway/Request/BankTransDetailsDataRequest.php @@ -0,0 +1,70 @@ +subjectReader = $subjectReader; + } + + /** + * Build. + * + * @param array $buildSubject + */ + public function build(array $buildSubject) + { + if (!isset($buildSubject['payment']) + || !$buildSubject['payment'] instanceof PaymentDataObjectInterface + ) { + throw new InvalidArgumentException('Payment data object should be provided'); + } + + $paymentDO = $this->subjectReader->readPayment($buildSubject); + $payment = $paymentDO->getPayment(); + $result = []; + + $financialInstitution = $payment->getAdditionalInformation('financial_institution'); + + $result[self::TRANSACTION_DETAILS] = [ + self::FINANCIAL_INSTITUTION => $financialInstitution, + ]; + + return $result; + } +} diff --git a/Gateway/Request/BankTransferPaymentDataRequest.php b/Gateway/Request/BankTransferPaymentDataRequest.php new file mode 100644 index 0000000..1d9698d --- /dev/null +++ b/Gateway/Request/BankTransferPaymentDataRequest.php @@ -0,0 +1,103 @@ +subjectReader = $subjectReader; + $this->configPse = $configPse; + $this->configWebpay = $configWebpay; + } + + /** + * Build. + * + * @param array $buildSubject + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + */ + public function build(array $buildSubject) + { + if (!isset($buildSubject['payment']) + || !$buildSubject['payment'] instanceof PaymentDataObjectInterface + ) { + throw new InvalidArgumentException('Payment data object should be provided'); + } + + $result = []; + + $paymentDO = $this->subjectReader->readPayment($buildSubject); + + $payment = $paymentDO->getPayment(); + + $paymentIdMethod = $payment->getAdditionalInformation('payment_method_id'); + + $options = [ + ConfigPse::PAYMENT_METHOD_ID => $this->configPse->getExpirationFormatted(), + ConfigWebpay::PAYMENT_METHOD_ID => $this->configWebpay->getExpirationFormatted(), + ]; + + $result = [ + self::PAYMENT_METHOD_ID => $paymentIdMethod, + self::DATE_OF_EXPIRATION => $options[$paymentIdMethod], + ]; + + return $result; + } +} diff --git a/Gateway/Request/BillingAddressDataRequest.php b/Gateway/Request/BillingAddressDataRequest.php new file mode 100644 index 0000000..044aefa --- /dev/null +++ b/Gateway/Request/BillingAddressDataRequest.php @@ -0,0 +1,144 @@ +subjectReader = $subjectReader; + $this->config = $config; + $this->orderAdapterFactory = $orderAdapterFactory; + } + + /** + * Build. + * + * @param array $buildSubject + */ + public function build(array $buildSubject): array + { + if (!isset($buildSubject['payment']) + || !$buildSubject['payment'] instanceof PaymentDataObjectInterface + ) { + throw new InvalidArgumentException('Payment data object should be provided'); + } + + $paymentDO = $this->subjectReader->readPayment($buildSubject); + $payment = $paymentDO->getPayment(); + + $result = []; + + /** @var OrderAdapterFactory $orderAdapter */ + $orderAdapter = $this->orderAdapterFactory->create( + ['order' => $payment->getOrder()] + ); + + $billingAddress = $orderAdapter->getBillingAddress(); + if ($billingAddress) { + $result[PayerDataRequest::PAYER][self::ADDRESS] = [ + self::STREET_NAME => $this->config->getValueForAddress( + $billingAddress, + self::STREET_NAME + ), + self::STREET_NUMBER => (int) $this->config->getValueForAddress( + $billingAddress, + self::STREET_NUMBER + ), + self::STREET_NEIGHBORHOOD => $this->config->getValueForAddress( + $billingAddress, + self::STREET_NEIGHBORHOOD + ), + self::CITY => $billingAddress->getCity(), + self::FEDERAL_UNIT => $billingAddress->getRegionCode(), + self::ZIP_CODE => preg_replace('/[^0-9]/', '', $billingAddress->getPostcode()), + ]; + } + + return $result; + } +} diff --git a/Gateway/Request/BinaryModeDataRequest.php b/Gateway/Request/BinaryModeDataRequest.php new file mode 100644 index 0000000..9197d62 --- /dev/null +++ b/Gateway/Request/BinaryModeDataRequest.php @@ -0,0 +1,64 @@ +config = $config; + } + + /** + * Build. + * + * @param array $buildSubject + */ + public function build(array $buildSubject) + { + if (!isset($buildSubject['payment']) + || !$buildSubject['payment'] instanceof PaymentDataObjectInterface + ) { + throw new InvalidArgumentException('Payment data object should be provided'); + } + + $result = []; + + $result[self::BINARY_MODE] = $this->config->isBinaryMode(); + + return $result; + } +} diff --git a/Gateway/Request/CaptureAmountRequest.php b/Gateway/Request/CaptureAmountRequest.php new file mode 100644 index 0000000..cac05a4 --- /dev/null +++ b/Gateway/Request/CaptureAmountRequest.php @@ -0,0 +1,71 @@ +subjectReader = $subjectReader; + $this->config = $config; + } + + /** + * Build. + * + * @param array $buildSubject + */ + public function build(array $buildSubject): array + { + if (!isset($buildSubject['payment']) + || !$buildSubject['payment'] instanceof PaymentDataObjectInterface + ) { + throw new InvalidArgumentException('Payment data object should be provided'); + } + + $paymentDO = $buildSubject['payment']; + + $result = []; + + if (isset($buildSubject['amount'])) { + $result[self::AMOUNT_TO_CAPTURE] = $buildSubject['amount']; + } + + $result[self::AMOUNT_PAID] = $paymentDO->getPayment()->getAmountPaid(); + + return $result; + } +} diff --git a/Gateway/Request/CcPaymentDataRequest.php b/Gateway/Request/CcPaymentDataRequest.php new file mode 100644 index 0000000..a2837f7 --- /dev/null +++ b/Gateway/Request/CcPaymentDataRequest.php @@ -0,0 +1,149 @@ +subjectReader = $subjectReader; + $this->config = $config; + $this->configCc = $configCc; + } + + /** + * Build. + * + * @param array $buildSubject + */ + public function build(array $buildSubject) + { + if (!isset($buildSubject['payment']) + || !$buildSubject['payment'] instanceof PaymentDataObjectInterface + ) { + throw new InvalidArgumentException('Payment data object should be provided'); + } + + $paymentDO = $buildSubject['payment']; + $payment = $paymentDO->getPayment(); + $order = $paymentDO->getOrder(); + $storeId = $order->getStoreId(); + $result = []; + + $result = $this->getDataPaymetCc($payment, $storeId); + + return $result; + } + + /** + * Data for CC. + * + * @param InfoInterface $payment + * @param int $storeId + * + * @return array + */ + public function getDataPaymetCc($payment, $storeId) + { + $instruction = []; + + $mpSiteId = $this->config->getMpSiteId($storeId); + $installment = $payment->getAdditionalInformation('card_installments') ?: 1; + $ccTypeName = strtolower((string) $payment->getAdditionalInformation('card_type')); + $capture = $this->configCc->hasCapture($storeId); + $binary = $this->configCc->isBinaryMode($storeId); + $unsupported = $this->configCc->getUnsupportedPreAuth($storeId); + + if (in_array($ccTypeName, $unsupported[$mpSiteId])) { + $capture = true; + $binary = true; + } + + $instruction = [ + self::INSTALLMENTS => (int) $installment, + self::PAYMENT_METHOD_ID => $ccTypeName, + self::SOFT_DESCRIPTOR => $this->config->getStatementDescriptor($storeId), + self::BINARY_MODE => $binary, + self::TOKEN => $payment->getAdditionalInformation('card_number_token'), + self::CAPTURE => $capture, + self::MP_PAYMENT_ID => $payment->getAdditionalInformation('mp_payment_id'), + ]; + + return $instruction; + } +} diff --git a/Gateway/Request/CcVaultPaymentDataRequest.php b/Gateway/Request/CcVaultPaymentDataRequest.php new file mode 100644 index 0000000..6972280 --- /dev/null +++ b/Gateway/Request/CcVaultPaymentDataRequest.php @@ -0,0 +1,134 @@ +subjectReader = $subjectReader; + $this->config = $config; + $this->configCc = $configCc; + } + + /** + * Build. + * + * @param array $buildSubject + */ + public function build(array $buildSubject) + { + if (!isset($buildSubject['payment']) + || !$buildSubject['payment'] instanceof PaymentDataObjectInterface + ) { + throw new InvalidArgumentException('Payment data object should be provided'); + } + + $paymentDO = $buildSubject['payment']; + $payment = $paymentDO->getPayment(); + $order = $paymentDO->getOrder(); + $storeId = $order->getStoreId(); + $result = []; + + $result = $this->getDataPaymetCc($payment, $storeId); + + return $result; + } + + /** + * Data for CC. + * + * @param InfoInterface $payment + * @param int $storeId + * + * @return array + */ + public function getDataPaymetCc($payment, $storeId) + { + $instruction = []; + + $installment = $payment->getAdditionalInformation('card_installments') ?: 1; + $ccTypeName = strtolower((string) $payment->getAdditionalInformation('card_type')); + + $instruction = [ + self::INSTALLMENTS => (int) $installment, + self::PAYMENT_METHOD_ID => $ccTypeName, + self::SOFT_DESCRIPTOR => $this->config->getStatementDescriptor($storeId), + self::BINARY_MODE => true, + self::TOKEN => $payment->getAdditionalInformation('card_number_token'), + self::CAPTURE => $this->configCc->hasCapture($storeId), + ]; + + return $instruction; + } +} diff --git a/Gateway/Request/CheckoutProNotificationUrlDataRequest.php b/Gateway/Request/CheckoutProNotificationUrlDataRequest.php new file mode 100644 index 0000000..7c8643e --- /dev/null +++ b/Gateway/Request/CheckoutProNotificationUrlDataRequest.php @@ -0,0 +1,81 @@ +frontendUrlBuilder = $frontendUrlBuilder; + $this->config = $config; + } + + /** + * Build. + * + * @param array $buildSubject + */ + public function build(array $buildSubject) + { + if (!isset($buildSubject['payment']) + || !$buildSubject['payment'] instanceof PaymentDataObjectInterface + ) { + throw new InvalidArgumentException('Payment data object should be provided'); + } + + $result = []; + + $notificationUrl = $this->frontendUrlBuilder->getUrl(self::PATH_TO_NOTIFICATION); + + $result[self::NOTIFICATION_URL] = $notificationUrl; + + $rewrite = $this->config->getRewriteNotificationUrl(); + + if ($rewrite) { + $result[self::NOTIFICATION_URL] = $rewrite; + } + + return $result; + } +} diff --git a/Gateway/Request/CheckoutProPaymentDataRequest.php b/Gateway/Request/CheckoutProPaymentDataRequest.php new file mode 100644 index 0000000..e39e38d --- /dev/null +++ b/Gateway/Request/CheckoutProPaymentDataRequest.php @@ -0,0 +1,72 @@ +configCheckoutPro = $configCheckoutPro; + } + + /** + * Build. + * + * @param array $buildSubject + */ + public function build(array $buildSubject) + { + if (!isset($buildSubject['payment']) + || !$buildSubject['payment'] instanceof PaymentDataObjectInterface + ) { + throw new InvalidArgumentException('Payment data object should be provided'); + } + + $result = []; + + $result = [ + self::DATE_OF_EXPIRATION => $this->configCheckoutPro->getExpirationFormatted(), + self::AUTO_RETURN => 'all', + ]; + + return $result; + } +} diff --git a/Gateway/Request/DescriptionDataRequest.php b/Gateway/Request/DescriptionDataRequest.php new file mode 100644 index 0000000..92e993c --- /dev/null +++ b/Gateway/Request/DescriptionDataRequest.php @@ -0,0 +1,96 @@ +subjectReader = $subjectReader; + $this->orderAdapterFactory = $orderAdapterFactory; + $this->config = $config; + $this->storeManager = $storeManager; + } + + /** + * Build. + * + * @param array $buildSubject + */ + public function build(array $buildSubject) + { + if (!isset($buildSubject['payment']) + || !$buildSubject['payment'] instanceof PaymentDataObjectInterface + ) { + throw new InvalidArgumentException('Payment data object should be provided'); + } + + $paymentDO = $this->subjectReader->readPayment($buildSubject); + + $result = []; + + $order = $paymentDO->getOrder(); + + $result = [ + self::DESCRIPTION => __( + 'Payment for order %1 in store %2', + $order->getOrderIncrementId(), + $this->storeManager->getStore()->getBaseUrl() + ), + ]; + + return $result; + } +} diff --git a/Gateway/Request/DocumentIdentificationDataRequest.php b/Gateway/Request/DocumentIdentificationDataRequest.php new file mode 100644 index 0000000..a193cce --- /dev/null +++ b/Gateway/Request/DocumentIdentificationDataRequest.php @@ -0,0 +1,150 @@ +subjectReader = $subjectReader; + $this->orderAdapterFactory = $orderAdapterFactory; + $this->config = $config; + } + + /** + * Get Value For Document Identification. + * + * @param OrderAdapterFactory $orderAdapter + * + * @return string + */ + public function getValueForDocumentIdentification($orderAdapter) + { + $obtainTaxDocFrom = $this->config->getAddtionalValue('get_document_identification_from'); + + $docIdentification = $orderAdapter->getCustomerTaxvat(); + + if ($obtainTaxDocFrom === 'address') { + $docIdentification = $orderAdapter->getBillingAddress()->getVatId(); + } + + return $docIdentification; + } + + /** + * Build. + * + * @param array $buildSubject + */ + public function build(array $buildSubject) + { + if (!isset($buildSubject['payment']) + || !$buildSubject['payment'] instanceof PaymentDataObjectInterface + ) { + throw new InvalidArgumentException('Payment data object should be provided'); + } + + $paymentDO = $this->subjectReader->readPayment($buildSubject); + $payment = $paymentDO->getPayment(); + $typeDocument = $payment->getAdditionalInformation('payer_document_type'); + $result = []; + + /** @var OrderAdapterFactory $orderAdapter */ + $orderAdapter = $this->orderAdapterFactory->create( + ['order' => $payment->getOrder()] + ); + + $docIdentification = $this->getFiscalNumber($payment, $orderAdapter); + + if ($docIdentification) { + $docIdentification = preg_replace('/[^0-9]/', '', $docIdentification); + } + + if ($typeDocument) { + $result[PayerDataRequest::PAYER][self::IDENTIFICATION] = [ + self::IDENTIFICATION_TYPE => $typeDocument, + self::IDENTIFICATION_NUMBER => $docIdentification, + ]; + } + + return $result; + } + + /** + * Get Fiscal Number. + * + * @param InfoInterface $payment + * @param OrderAdapterFactory $orderAdapter + * + * @return string + */ + public function getFiscalNumber($payment, $orderAdapter): ?string + { + $docIdentification = null; + + if ($payment->getAdditionalInformation('payer_document_identification')) { + $docIdentification = $payment->getAdditionalInformation('payer_document_identification'); + } + + if (!$docIdentification) { + $docIdentification = $this->getValueForDocumentIdentification($orderAdapter); + } + + return $docIdentification; + } +} diff --git a/Gateway/Request/ExcludedCheckoutProDataRequest.php b/Gateway/Request/ExcludedCheckoutProDataRequest.php new file mode 100644 index 0000000..6ab2b8c --- /dev/null +++ b/Gateway/Request/ExcludedCheckoutProDataRequest.php @@ -0,0 +1,75 @@ +config = $config; + } + + /** + * Build. + * + * @param array $buildSubject + */ + public function build(array $buildSubject) + { + if (!isset($buildSubject['payment']) + || !$buildSubject['payment'] instanceof PaymentDataObjectInterface + ) { + throw new InvalidArgumentException('Payment data object should be provided'); + } + + $paymentDO = $buildSubject['payment']; + $order = $paymentDO->getOrder(); + $storeId = $order->getStoreId(); + $result = []; + + $excludeds = $this->config->getExcluded($storeId); + + if (is_array($excludeds)) { + foreach ($excludeds as $exclude) { + $result[self::PAYMENT_METHODS][self::EXCLUDED_PAYMENT_METHODS][] = [ + 'id' => $exclude, + ]; + } + } + + return $result; + } +} diff --git a/Gateway/Request/ExtPaymentIdDataRequest.php b/Gateway/Request/ExtPaymentIdDataRequest.php new file mode 100644 index 0000000..8359bf5 --- /dev/null +++ b/Gateway/Request/ExtPaymentIdDataRequest.php @@ -0,0 +1,50 @@ +getPayment(); + + $addInfo = $payment->getAdditionalInformation(); + + $mpPaymentId = $addInfo['mp_payment_id'] ?? $payment->getLastTransId(); + + return [ + self::MP_REFERENCE_ID => preg_replace('/[^0-9]/', '', $mpPaymentId), + ]; + } +} diff --git a/Gateway/Request/ExternalReferenceDataRequest.php b/Gateway/Request/ExternalReferenceDataRequest.php new file mode 100644 index 0000000..e010b9c --- /dev/null +++ b/Gateway/Request/ExternalReferenceDataRequest.php @@ -0,0 +1,92 @@ +subjectReader = $subjectReader; + $this->orderAdapterFactory = $orderAdapterFactory; + $this->config = $config; + $this->storeManager = $storeManager; + } + + /** + * Build. + * + * @param array $buildSubject + */ + public function build(array $buildSubject) + { + if (!isset($buildSubject['payment']) + || !$buildSubject['payment'] instanceof PaymentDataObjectInterface + ) { + throw new InvalidArgumentException('Payment data object should be provided'); + } + + $paymentDO = $this->subjectReader->readPayment($buildSubject); + + $result = []; + + $order = $paymentDO->getOrder(); + + $result = [ + self::EXTERNAL_REFERENCE => $order->getOrderIncrementId(), + ]; + + return $result; + } +} diff --git a/Gateway/Request/InstallmentsCheckoutProDataRequest.php b/Gateway/Request/InstallmentsCheckoutProDataRequest.php new file mode 100644 index 0000000..312758d --- /dev/null +++ b/Gateway/Request/InstallmentsCheckoutProDataRequest.php @@ -0,0 +1,71 @@ +config = $config; + } + + /** + * Build. + * + * @param array $buildSubject + */ + public function build(array $buildSubject) + { + if (!isset($buildSubject['payment']) + || !$buildSubject['payment'] instanceof PaymentDataObjectInterface + ) { + throw new InvalidArgumentException('Payment data object should be provided'); + } + + $paymentDO = $buildSubject['payment']; + $order = $paymentDO->getOrder(); + $storeId = $order->getStoreId(); + $result = []; + + $maxInstallment = $this->config->getMaxInstallments($storeId); + + if (isset($maxInstallment)) { + $result[self::PAYMENT_METHODS][self::INSTALLMENTS] = $maxInstallment; + } + + return $result; + } +} diff --git a/Gateway/Request/ItemsAndDatailsCostDataRequest.php b/Gateway/Request/ItemsAndDatailsCostDataRequest.php new file mode 100644 index 0000000..77e34f7 --- /dev/null +++ b/Gateway/Request/ItemsAndDatailsCostDataRequest.php @@ -0,0 +1,266 @@ +image = $image; + $this->subjectReader = $subjectReader; + $this->config = $config; + $this->orderAdapterFactory = $orderAdapterFactory; + } + + /** + * Build. + * + * @param array $buildSubject + */ + public function build(array $buildSubject) + { + if (!isset($buildSubject['payment']) + || !$buildSubject['payment'] instanceof PaymentDataObjectInterface + ) { + throw new InvalidArgumentException('Payment data object should be provided'); + } + + $paymentDO = $this->subjectReader->readPayment($buildSubject); + + $payment = $paymentDO->getPayment(); + + $result = []; + + /** @var OrderAdapterFactory $orderAdapter */ + $orderAdapter = $this->orderAdapterFactory->create( + ['order' => $payment->getOrder()] + ); + + $order = $paymentDO->getOrder(); + $storeId = $order->getStoreId(); + + $shippingAmount = $orderAdapter->getShippingAmount(); + $itemsShipping = $this->addItemsShipping($orderAdapter, $shippingAmount, $storeId); + + $discountAmount = $orderAdapter->getDiscountAmount(); + $itemsDiscount = $this->addItemsDiscount($orderAdapter, $discountAmount, $storeId); + + $taxAmount = $orderAdapter->getTaxAmount(); + $itemsTax = $this->addItemsTax($taxAmount, $storeId); + + $productItems = $order->getItems(); + $itemsProducts = $this->addItemsProducts($productItems, $storeId); + + $result[self::ITEMS] = array_merge_recursive($itemsProducts, $itemsShipping, $itemsDiscount, $itemsTax); + + return $result; + } + + /** + * Add Items Products. + * + * @param array $productItems + * @param int $storeId + * + * @return array + */ + public function addItemsProducts(array $productItems, int $storeId): array + { + $items = []; + + foreach ($productItems as $item) { + if ($item->getParentItem()) { + continue; + } + + $product = $item->getProduct(); + $image = $this->image->init($product, 'small_image') + ->setImageFile($product->getSmallImage()); + + $items[] = [ + self::ITEM_ID => $item->getSku(), + self::ITEM_TITLE => $item->getName(), + self::ITEM_DESCRIPTION => $item->getName().'-'.$item->getSku(), + self::ITEM_QUANTITY => $item->getQtyOrdered(), + self::ITEM_PICTURE_URL => $image->getUrl(), + self::ITEM_UNIT_PRICE => $this->config->formatPrice($item->getPrice(), $storeId), + self::ITEM_CATEGORY_ID => $this->config->getMpCategory($storeId), + ]; + } + + return $items; + } + + /** + * Add Items Tax. + * + * @param float $taxAmount + * @param int $storeId + * + * @return array + */ + public function addItemsTax(float $taxAmount, int $storeId): array + { + $items = []; + + if ($taxAmount) { + $items[] = [ + self::ITEM_ID => __('Tax'), + self::ITEM_TITLE => __('Tax'), + self::ITEM_DESCRIPTION => __('Tax'), + self::ITEM_QUANTITY => 1, + self::ITEM_UNIT_PRICE => $this->config->formatPrice($taxAmount), + self::ITEM_CATEGORY_ID => $this->config->getMpCategory($storeId), + ]; + } + + return $items; + } + + /** + * Add Items Discount. + * + * @param OrderAdapterFactory $orderAdapter + * @param float $discountAmount + * @param int $storeId + * + * @return array + */ + public function addItemsDiscount( + $orderAdapter, + float $discountAmount, + int $storeId + ): array { + $items = []; + + if ($discountAmount) { + $items[] = [ + self::ITEM_ID => $orderAdapter->getDiscountDescription(), + self::ITEM_TITLE => $orderAdapter->getDiscountDescription(), + self::ITEM_DESCRIPTION => $orderAdapter->getDiscountDescription(), + self::ITEM_QUANTITY => 1, + self::ITEM_UNIT_PRICE => $this->config->formatPrice($discountAmount), + self::ITEM_CATEGORY_ID => $this->config->getMpCategory($storeId), + ]; + } + + return $items; + } + + /** + * Add Items Shipping. + * + * @param OrderAdapterFactory $orderAdapter + * @param float $shippingAmount + * @param int $storeId + * + * @return array + */ + public function addItemsShipping( + $orderAdapter, + float $shippingAmount, + int $storeId + ): array { + $items = []; + + if ($shippingAmount) { + $items[] = [ + self::ITEM_ID => $orderAdapter->getShippingMethod(), + self::ITEM_TITLE => $orderAdapter->getShippingDescription(), + self::ITEM_DESCRIPTION => $orderAdapter->getShippingDescription(), + self::ITEM_QUANTITY => 1, + self::ITEM_UNIT_PRICE => $this->config->formatPrice($shippingAmount), + self::ITEM_CATEGORY_ID => $this->config->getMpCategory($storeId), + ]; + } + + return $items; + } +} diff --git a/Gateway/Request/ItemsDataRequest.php b/Gateway/Request/ItemsDataRequest.php new file mode 100644 index 0000000..4604313 --- /dev/null +++ b/Gateway/Request/ItemsDataRequest.php @@ -0,0 +1,136 @@ +image = $image; + $this->subjectReader = $subjectReader; + $this->config = $config; + } + + /** + * Build. + * + * @param array $buildSubject + */ + public function build(array $buildSubject) + { + if (!isset($buildSubject['payment']) + || !$buildSubject['payment'] instanceof PaymentDataObjectInterface + ) { + throw new InvalidArgumentException('Payment data object should be provided'); + } + + $paymentDO = $this->subjectReader->readPayment($buildSubject); + + $result = []; + + $order = $paymentDO->getOrder(); + $storeId = $order->getStoreId(); + $items = $order->getItems(); + + foreach ($items as $item) { + if ($item->getParentItem()) { + continue; + } + + $product = $item->getProduct(); + $image = $this->image->init($product, 'small_image') + ->setImageFile($product->getSmallImage()); + + $result[self::ITEMS][] = [ + self::ITEM_ID => $item->getSku(), + self::ITEM_TITLE => $item->getName(), + self::ITEM_DESCRIPTION => $item->getName().'-'.$item->getSku(), + self::ITEM_QUANTITY => $item->getQtyOrdered(), + self::ITEM_PICTURE_URL => $image->getUrl(), + self::ITEM_UNIT_PRICE => $this->config->formatPrice($item->getPrice(), $storeId), + self::ITEM_CATEGORY_ID => $this->config->getMpCategory($storeId), + ]; + } + + return $result; + } +} diff --git a/Gateway/Request/MetadataPaymentBankTransfDataRequest.php b/Gateway/Request/MetadataPaymentBankTransfDataRequest.php new file mode 100644 index 0000000..4554f0b --- /dev/null +++ b/Gateway/Request/MetadataPaymentBankTransfDataRequest.php @@ -0,0 +1,51 @@ + 'custom', + self::CHECKOUT_TYPE => 'bank_transfer', + ]; + + return $result; + } +} diff --git a/Gateway/Request/MetadataPaymentCcDataRequest.php b/Gateway/Request/MetadataPaymentCcDataRequest.php new file mode 100644 index 0000000..87ab268 --- /dev/null +++ b/Gateway/Request/MetadataPaymentCcDataRequest.php @@ -0,0 +1,51 @@ + 'custom', + self::CHECKOUT_TYPE => 'credit_card', + ]; + + return $result; + } +} diff --git a/Gateway/Request/MetadataPaymentCheckoutProDataRequest.php b/Gateway/Request/MetadataPaymentCheckoutProDataRequest.php new file mode 100644 index 0000000..ec4b4aa --- /dev/null +++ b/Gateway/Request/MetadataPaymentCheckoutProDataRequest.php @@ -0,0 +1,65 @@ +config = $config; + } + + /** + * Build. + * + * @param array $buildSubject + */ + public function build(array $buildSubject) + { + if (!isset($buildSubject['payment']) + || !$buildSubject['payment'] instanceof PaymentDataObjectInterface + ) { + throw new InvalidArgumentException('Payment data object should be provided'); + } + $result = []; + + $result[MetadataPaymentDataRequest::METADATA] = [ + self::CHECKOUT => 'pro', + self::CHECKOUT_TYPE => $this->config->getTypeRedirect(), + ]; + + return $result; + } +} diff --git a/Gateway/Request/MetadataPaymentDataRequest.php b/Gateway/Request/MetadataPaymentDataRequest.php new file mode 100644 index 0000000..a703743 --- /dev/null +++ b/Gateway/Request/MetadataPaymentDataRequest.php @@ -0,0 +1,129 @@ +subjectReader = $subjectReader; + $this->config = $config; + } + + /** + * Build. + * + * @param array $buildSubject + */ + public function build(array $buildSubject) + { + if (!isset($buildSubject['payment']) + || !$buildSubject['payment'] instanceof PaymentDataObjectInterface + ) { + throw new InvalidArgumentException('Payment data object should be provided'); + } + + $paymentDO = $buildSubject['payment']; + $order = $paymentDO->getOrder(); + $storeId = $order->getStoreId(); + $result = $this->getMetadata($storeId); + + return $result; + } + + /** + * Get Metadata. + * + * @param int $storeId + * + * @return array + */ + public function getMetadata($storeId) + { + $request = []; + $mpSiteId = $this->config->getMpSiteId($storeId); + + $request[self::METADATA] = [ + self::PLATAFORM => Config::PLATAFORM_ID, + self::PLATAFORM_VERSION => $this->config->getMagentoVersion(), + self::MODULE_VERSION => $this->config->getModuleVersion(), + self::TEST_MODE => $this->config->isTestMode(), + self::SPONSOR_ID => $this->config->getMpSponsorId($mpSiteId), + self::SITE_ID => $mpSiteId, + self::STORE_ID => $storeId, + ]; + + return $request; + } +} diff --git a/Gateway/Request/MetadataPaymentMethodsOffDataRequest.php b/Gateway/Request/MetadataPaymentMethodsOffDataRequest.php new file mode 100644 index 0000000..49c9eea --- /dev/null +++ b/Gateway/Request/MetadataPaymentMethodsOffDataRequest.php @@ -0,0 +1,77 @@ +subjectReader = $subjectReader; + } + + /** + * Build. + * + * @param array $buildSubject + */ + public function build(array $buildSubject) + { + if (!isset($buildSubject['payment']) + || !$buildSubject['payment'] instanceof PaymentDataObjectInterface + ) { + throw new InvalidArgumentException('Payment data object should be provided'); + } + + $paymentDO = $this->subjectReader->readPayment($buildSubject); + + $payment = $paymentDO->getPayment(); + + $paymentTypeId = $payment->getAdditionalInformation('payment_type_id'); + + $paymentOptionId = $payment->getAdditionalInformation('payment_option_id'); + + $result = []; + + $result[MetadataPaymentDataRequest::METADATA] = [ + self::CHECKOUT => 'custom', + self::CHECKOUT_TYPE => $paymentTypeId, + self::CHECKOUT_TYPE_OPTION => $paymentOptionId + ]; + + return $result; + } +} diff --git a/Gateway/Request/MetadataPaymentPixDataRequest.php b/Gateway/Request/MetadataPaymentPixDataRequest.php new file mode 100644 index 0000000..e959518 --- /dev/null +++ b/Gateway/Request/MetadataPaymentPixDataRequest.php @@ -0,0 +1,51 @@ + 'custom', + self::CHECKOUT_TYPE => 'pix', + ]; + + return $result; + } +} diff --git a/Gateway/Request/NotificationIdDataRequest.php b/Gateway/Request/NotificationIdDataRequest.php new file mode 100644 index 0000000..6a3d5f5 --- /dev/null +++ b/Gateway/Request/NotificationIdDataRequest.php @@ -0,0 +1,63 @@ +subjectReader = $subjectReader; + $this->config = $config; + } + + /** + * Build. + * + * @param array $buildSubject + */ + public function build(array $buildSubject): array + { + if (!isset($buildSubject['payment']) + || !$buildSubject['payment'] instanceof PaymentDataObjectInterface + ) { + throw new InvalidArgumentException('Payment data object should be provided'); + } + + $paymentDO = $buildSubject['payment']; + $payment = $paymentDO->getPayment(); + + return [ + self::NOTIFICATION_ID => json_decode($payment->getAdditionalData(), false)->notificationId ?: null, + ]; + } +} diff --git a/Gateway/Request/NotificationUrlDataRequest.php b/Gateway/Request/NotificationUrlDataRequest.php new file mode 100644 index 0000000..aa781b7 --- /dev/null +++ b/Gateway/Request/NotificationUrlDataRequest.php @@ -0,0 +1,81 @@ +frontendUrlBuilder = $frontendUrlBuilder; + $this->config = $config; + } + + /** + * Build. + * + * @param array $buildSubject + */ + public function build(array $buildSubject) + { + if (!isset($buildSubject['payment']) + || !$buildSubject['payment'] instanceof PaymentDataObjectInterface + ) { + throw new InvalidArgumentException('Payment data object should be provided'); + } + + $result = []; + + $notificationUrl = $this->frontendUrlBuilder->getUrl(self::PATH_TO_NOTIFICATION); + + $result[self::NOTIFICATION_URL] = $notificationUrl; + + $rewrite = $this->config->getRewriteNotificationUrl(); + + if ($rewrite) { + $result[self::NOTIFICATION_URL] = $rewrite; + } + + return $result; + } +} diff --git a/Gateway/Request/PayerCheckoutProDataRequest.php b/Gateway/Request/PayerCheckoutProDataRequest.php new file mode 100644 index 0000000..b4e8e85 --- /dev/null +++ b/Gateway/Request/PayerCheckoutProDataRequest.php @@ -0,0 +1,124 @@ +subjectReader = $subjectReader; + $this->orderAdapterFactory = $orderAdapterFactory; + } + + /** + * Build. + * + * @param array $buildSubject + */ + public function build(array $buildSubject) + { + if (!isset($buildSubject['payment']) + || !$buildSubject['payment'] instanceof PaymentDataObjectInterface + ) { + throw new InvalidArgumentException('Payment data object should be provided'); + } + + $paymentDO = $this->subjectReader->readPayment($buildSubject); + $payment = $paymentDO->getPayment(); + $result = []; + + /** @var OrderAdapterFactory $orderAdapter */ + $orderAdapter = $this->orderAdapterFactory->create( + ['order' => $payment->getOrder()] + ); + + $billingAddress = $orderAdapter->getBillingAddress(); + + $phone = preg_replace('/[^0-9]/', '', $billingAddress->getTelephone()); + $phoneAreaCode = substr($phone, 0, 2); + $phoneNumber = substr($phone, 2); + + $payerFirstName = + $payment->getAdditionalInformation('payer_first_name') ?: $billingAddress->getFirstname(); + $payerLastName = + $payment->getAdditionalInformation('payer_last_name') ?: $billingAddress->getLastname(); + + $result[self::PAYER] = [ + self::EMAIL => $billingAddress->getEmail(), + self::NAME => $payerFirstName, + self::SURNAME => $payerLastName, + self::PHONE => [ + self::PHONE_AREA_CODE => $phoneAreaCode, + self::PHONE_NUMBER => $phoneNumber, + ], + ]; + + return $result; + } +} diff --git a/Gateway/Request/PayerDataRequest.php b/Gateway/Request/PayerDataRequest.php new file mode 100644 index 0000000..420f1ed --- /dev/null +++ b/Gateway/Request/PayerDataRequest.php @@ -0,0 +1,123 @@ +subjectReader = $subjectReader; + $this->orderAdapterFactory = $orderAdapterFactory; + } + + /** + * Build. + * + * @param array $buildSubject + */ + public function build(array $buildSubject) + { + if (!isset($buildSubject['payment']) + || !$buildSubject['payment'] instanceof PaymentDataObjectInterface + ) { + throw new InvalidArgumentException('Payment data object should be provided'); + } + + $paymentDO = $this->subjectReader->readPayment($buildSubject); + $payment = $paymentDO->getPayment(); + $result = []; + $mpUserId = null; + + /** @var OrderAdapterFactory $orderAdapter */ + $orderAdapter = $this->orderAdapterFactory->create( + ['order' => $payment->getOrder()] + ); + + $mpUserId = $payment->getAdditionalInformation('mp_user_id'); + $type = isset($mpUserId) ? 'customer' : null; + + $payerEntityType = $payment->getAdditionalInformation('payer_entity_type'); + + $billingAddress = $orderAdapter->getBillingAddress(); + + $result[self::PAYER] = [ + self::TYPE => $type, + self::ID => $mpUserId, + self::EMAIL => $billingAddress->getEmail(), + self::FIRST_NAME => $billingAddress->getFirstname(), + self::LAST_NAME => $billingAddress->getLastname(), + ]; + + if ($payerEntityType) { + $result[self::PAYER][self::ENTITY_TYPE] = $payerEntityType; + } + + return $result; + } +} diff --git a/Gateway/Request/PaymentMethodsOffDataRequest.php b/Gateway/Request/PaymentMethodsOffDataRequest.php new file mode 100644 index 0000000..d9e0c4f --- /dev/null +++ b/Gateway/Request/PaymentMethodsOffDataRequest.php @@ -0,0 +1,85 @@ +subjectReader = $subjectReader; + $this->configMethodsOff = $configMethodsOff; + } + + /** + * Build. + * + * @param array $buildSubject + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + */ + public function build(array $buildSubject) + { + if (!isset($buildSubject['payment']) + || !$buildSubject['payment'] instanceof PaymentDataObjectInterface + ) { + throw new InvalidArgumentException('Payment data object should be provided'); + } + + $result = []; + + $paymentDO = $this->subjectReader->readPayment($buildSubject); + + $payment = $paymentDO->getPayment(); + + $paymentIdMethod = $payment->getAdditionalInformation('payment_method_id'); + + $expirationDate = $this->configMethodsOff->getExpirationFormatted(); + + $result = [ + self::PAYMENT_METHOD_ID => $paymentIdMethod, + self::DATE_OF_EXPIRATION => $expirationDate + ]; + + return $result; + } +} diff --git a/Gateway/Request/PixPaymentDataRequest.php b/Gateway/Request/PixPaymentDataRequest.php new file mode 100644 index 0000000..f08986e --- /dev/null +++ b/Gateway/Request/PixPaymentDataRequest.php @@ -0,0 +1,65 @@ +configPix = $configPix; + } + + /** + * Build. + * + * @param array $buildSubject + */ + public function build(array $buildSubject) + { + if (!isset($buildSubject['payment']) + || !$buildSubject['payment'] instanceof PaymentDataObjectInterface + ) { + throw new InvalidArgumentException('Payment data object should be provided'); + } + + $result = [ + self::PAYMENT_METHOD_ID => 'pix', + self::DATE_OF_EXPIRATION => $this->configPix->getExpirationFormatted(), + ]; + + return $result; + } +} diff --git a/Gateway/Request/PointOfInteractionPaymentDataRequest.php b/Gateway/Request/PointOfInteractionPaymentDataRequest.php new file mode 100644 index 0000000..af1635f --- /dev/null +++ b/Gateway/Request/PointOfInteractionPaymentDataRequest.php @@ -0,0 +1,56 @@ + [ + self::TYPE => self::TYPE_CHECKOUT, + ], + ]; + + return $result; + } +} diff --git a/Gateway/Request/RefundRequest.php b/Gateway/Request/RefundRequest.php new file mode 100644 index 0000000..a69059e --- /dev/null +++ b/Gateway/Request/RefundRequest.php @@ -0,0 +1,119 @@ +config = $config; + $this->configPayment = $configPayment; + $this->configCc = $configCc; + } + + /** + * Build. + * + * @param array $buildSubject + */ + public function build(array $buildSubject) + { + if (!isset($buildSubject['payment']) + || !$buildSubject['payment'] instanceof PaymentDataObjectInterface + ) { + throw new InvalidArgumentException('Payment data object should be provided'); + } + + $paymentDO = $buildSubject['payment']; + + $payment = $paymentDO->getPayment(); + + $order = $payment->getOrder(); + + $storeId = $order->getStoreId(); + + $grandTotal = $this->configPayment->formatPrice($order->getGrandTotal(), $storeId); + + $creditmemo = $payment->getCreditMemo(); + + $totalCreditmemo = $this->configPayment->formatPrice($creditmemo->getGrandTotal(), $storeId); + + $result = [ + self::MERCADOPAGO_PAYMENT_ID => preg_replace('/[^0-9]/', '', $payment->getTransactionId()), + self::X_IDEMPOTENCY_KEY => $payment->getTransactionId() . '-' . uniqid(), + self::ORDER => $order + ]; + + if ($grandTotal !== $totalCreditmemo) { + $result = array_merge($result, [ + self::AMOUNT => $totalCreditmemo, + ]); + } + + return $result; + } +} diff --git a/Gateway/Request/RefundRequestTwoCc.php b/Gateway/Request/RefundRequestTwoCc.php new file mode 100644 index 0000000..b4fb5e1 --- /dev/null +++ b/Gateway/Request/RefundRequestTwoCc.php @@ -0,0 +1,104 @@ +config = $config; + $this->configPayment = $configPayment; + $this->configTwoCc = $configTwoCc; + } + + /** + * Build. + * + * @param array $buildSubject + */ + public function build(array $buildSubject) + { + if ( + !isset($buildSubject['payment']) + || !$buildSubject['payment'] instanceof PaymentDataObjectInterface + ) { + throw new InvalidArgumentException('Payment data object should be provided'); + } + + $paymentDO = $buildSubject['payment']; + + $payment = $paymentDO->getPayment(); + + $order = $payment->getOrder(); + + $storeId = $order->getStoreId(); + + $grandTotal = $this->configPayment->formatPrice($order->getGrandTotal(), $storeId); + + $creditmemo = $payment->getCreditMemo(); + + $totalCreditmemo = $this->configPayment->formatPrice($creditmemo->getGrandTotal(), $storeId); + + $result = [ + self::MERCADOPAGO_PAYMENT_ID => preg_replace('/[^0-9]/', '', $payment->getTransactionId()), + self::X_IDEMPOTENCY_KEY => $payment->getTransactionId() . '-' . uniqid(), + self::AMOUNT => $totalCreditmemo, + ]; + + return $result; + } +} diff --git a/Gateway/Request/ShippingsDataRequest.php b/Gateway/Request/ShippingsDataRequest.php new file mode 100644 index 0000000..3272f67 --- /dev/null +++ b/Gateway/Request/ShippingsDataRequest.php @@ -0,0 +1,148 @@ +subjectReader = $subjectReader; + $this->config = $config; + $this->orderAdapterFactory = $orderAdapterFactory; + } + + /** + * Build. + * + * @param array $buildSubject + */ + public function build(array $buildSubject): array + { + if (!isset($buildSubject['payment']) + || !$buildSubject['payment'] instanceof PaymentDataObjectInterface + ) { + throw new InvalidArgumentException('Payment data object should be provided'); + } + + $paymentDO = $this->subjectReader->readPayment($buildSubject); + $payment = $paymentDO->getPayment(); + + $result = []; + + /** @var OrderAdapterFactory $orderAdapter */ + $orderAdapter = $this->orderAdapterFactory->create( + ['order' => $payment->getOrder()] + ); + + $shippingAddress = $orderAdapter->getShippingAddress(); + if ($shippingAddress) { + $result[self::SHIPMENTS][self::RECEIVER_ADDRESS] = [ + self::ZIP_CODE => $shippingAddress->getPostcode(), + self::STREET_NAME => $this->config->getValueForAddress( + $shippingAddress, + self::STREET_NAME + ).', '. + $this->config->getValueForAddress( + $shippingAddress, + self::STREET_COMPLEMENT + ).', '. + $this->config->getValueForAddress( + $shippingAddress, + self::STREET_NEIGHBORHOOD + ), + self::STREET_NUMBER => $this->config->getValueForAddress( + $shippingAddress, + self::STREET_NUMBER + ), + self::CITY => $shippingAddress->getCity(), + self::FEDERAL_UNIT => $shippingAddress->getRegionCode(), + ]; + } + + return $result; + } +} diff --git a/Gateway/Request/StoreIdDataRequest.php b/Gateway/Request/StoreIdDataRequest.php new file mode 100644 index 0000000..e4afa6f --- /dev/null +++ b/Gateway/Request/StoreIdDataRequest.php @@ -0,0 +1,69 @@ +subjectReader = $subjectReader; + $this->config = $config; + } + + /** + * Build. + * + * @param array $buildSubject + */ + public function build(array $buildSubject): array + { + if (!isset($buildSubject['payment']) + || !$buildSubject['payment'] instanceof PaymentDataObjectInterface + ) { + throw new InvalidArgumentException('Payment data object should be provided'); + } + $paymentDO = $buildSubject['payment']; + $order = $paymentDO->getOrder(); + $storeId = $order->getStoreId(); + + return [ + self::STORE_ID => $storeId ?: 0, + ]; + } +} diff --git a/Gateway/Request/TracksCheckoutProDataRequest.php b/Gateway/Request/TracksCheckoutProDataRequest.php new file mode 100644 index 0000000..897ee76 --- /dev/null +++ b/Gateway/Request/TracksCheckoutProDataRequest.php @@ -0,0 +1,113 @@ +config = $config; + } + + /** + * Build. + * + * @param array $buildSubject + */ + public function build(array $buildSubject) + { + if (!isset($buildSubject['payment']) + || !$buildSubject['payment'] instanceof PaymentDataObjectInterface + ) { + throw new InvalidArgumentException('Payment data object should be provided'); + } + + $paymentDO = $buildSubject['payment']; + $order = $paymentDO->getOrder(); + $storeId = $order->getStoreId(); + $result = []; + + $includeFacebook = $this->config->isIncludeFacebook($storeId); + + if ($includeFacebook) { + $facebookAd = $this->config->getFacebookAd($storeId); + + $result[self::TRACKS][] = [ + self::TYPE => 'facebook_ad', + self::VALUES => [ + self::PIXEL_ID => $facebookAd, + ], + ]; + } + + $includeGoogle = $this->config->isIncludeGoogle($storeId); + + if ($includeGoogle) { + $googleAdsId = $this->config->getGoogleAdsId($storeId); + $googleAdsLabel = $this->config->getGoogleAdsLabel($storeId); + + $result[self::TRACKS][] = [ + self::TYPE => 'google_ad', + self::VALUES => [ + self::CONVERSION_ID => $googleAdsId, + self::CONVERSION_LABEL => $googleAdsLabel, + ], + ]; + } + + return $result; + } +} diff --git a/Gateway/Request/TransactionAmountDataRequest.php b/Gateway/Request/TransactionAmountDataRequest.php new file mode 100644 index 0000000..dcef7ab --- /dev/null +++ b/Gateway/Request/TransactionAmountDataRequest.php @@ -0,0 +1,92 @@ +subjectReader = $subjectReader; + $this->config = $config; + $this->orderAdapterFactory = $orderAdapterFactory; + } + + /** + * Build. + * + * @param array $buildSubject + */ + public function build(array $buildSubject) + { + if (!isset($buildSubject['payment']) + || !$buildSubject['payment'] instanceof PaymentDataObjectInterface + ) { + throw new InvalidArgumentException('Payment data object should be provided'); + } + + $result = []; + + $paymentDO = $this->subjectReader->readPayment($buildSubject); + + $payment = $paymentDO->getPayment(); + + /** @var OrderAdapterFactory $orderAdapter */ + $orderAdapter = $this->orderAdapterFactory->create( + ['order' => $payment->getOrder()] + ); + + $grandTotal = $orderAdapter->getGrandTotalAmount(); + + $order = $paymentDO->getOrder(); + + $storeId = $order->getStoreId(); + + $result[self::TRANSACTION_AMOUNT] = $this->config->formatPrice($grandTotal, $storeId); + + return $result; + } +} diff --git a/Gateway/Request/TransactionInfoDataRequest.php b/Gateway/Request/TransactionInfoDataRequest.php new file mode 100644 index 0000000..724b56a --- /dev/null +++ b/Gateway/Request/TransactionInfoDataRequest.php @@ -0,0 +1,135 @@ +subjectReader = $subjectReader; + $this->config = $config; + $this->configTwoCc = $configTwoCc; + } + + /** + * Build. + * + * @param array $buildSubject + */ + public function build(array $buildSubject) + { + if (!isset($buildSubject['payment']) + || !$buildSubject['payment'] instanceof PaymentDataObjectInterface + ) { + throw new InvalidArgumentException('Payment data object should be provided'); + } + + $paymentDO = $buildSubject['payment']; + $payment = $paymentDO->getPayment(); + $order = $paymentDO->getOrder(); + $result = []; + + $result = $this->getDataPaymetTwoCc($payment, $order); + + return $result; + + } + + /** + * Data for CC. + * + * @param InfoInterface $payment + * + * @return array + */ + public function getDataPaymetTwoCc($payment, $order) + { + $instruction = []; + + $instruction[self::TRANSACTION_INFO] = []; + + for ($i = 0; $i < self::NUM_CARDS; $i++): + $cardInfo = [ + self::TRANSACTION_AMOUNT => $this->config->formatPrice((double) $payment->getAdditionalInformation('card_'.$i.'_amount'), $order->getStoreId()), + self::INSTALLMENTS => (int) $payment->getAdditionalInformation('card_'.$i.'_installments') ?: 1, + self::TOKEN => $payment->getAdditionalInformation('card_'.$i.'_number_token'), + self::PAYMENT_METHOD_ID => strtolower((string) $payment->getAdditionalInformation('card_'.$i.'_type')), + ]; + + array_push($instruction[self::TRANSACTION_INFO], $cardInfo); + endfor; + + return $instruction; + } + +} diff --git a/Gateway/Request/TwoCcPaymentDataRequest.php b/Gateway/Request/TwoCcPaymentDataRequest.php new file mode 100644 index 0000000..5dd16b4 --- /dev/null +++ b/Gateway/Request/TwoCcPaymentDataRequest.php @@ -0,0 +1,139 @@ +subjectReader = $subjectReader; + $this->config = $config; + $this->configTwoCc = $configTwoCc; + } + + /** + * Build. + * + * @param array $buildSubject + */ + public function build(array $buildSubject) + { + if (!isset($buildSubject['payment']) + || !$buildSubject['payment'] instanceof PaymentDataObjectInterface + ) { + throw new InvalidArgumentException('Payment data object should be provided'); + } + + $paymentDO = $buildSubject['payment']; + $payment = $paymentDO->getPayment(); + $order = $paymentDO->getOrder(); + $storeId = $order->getStoreId(); + $result = []; + + $result = $this->getDataPaymet($payment, $storeId); + + return $result; + } + + /** + * Data for CC. + * + * @param InfoInterface $payment + * @param int $storeId + * + * @return array + */ + public function getDataPaymet($payment, $storeId) + { + $instruction = []; + + $mpSiteId = $this->config->getMpSiteId($storeId); + $capture = $this->configTwoCc->hasCapture($storeId); + $binary = $this->configTwoCc->isBinaryMode($storeId); + $unsupported = $this->configTwoCc->getUnsupportedPreAuth($storeId); + + if (in_array(self::METHOD_ID, $unsupported[$mpSiteId])) { + $capture = true; + $binary = true; + } + + $instruction = [ + self::PAYMENT_METHOD_ID => self::METHOD_ID, + self::SOFT_DESCRIPTOR => $this->config->getStatementDescriptor($storeId), + self::BINARY_MODE => $binary, + self::CAPTURE => $capture, + ]; + + return $instruction; + } +} diff --git a/Gateway/Request/TwoCcVaultPaymentDataRequest.php b/Gateway/Request/TwoCcVaultPaymentDataRequest.php new file mode 100644 index 0000000..759dd7b --- /dev/null +++ b/Gateway/Request/TwoCcVaultPaymentDataRequest.php @@ -0,0 +1,134 @@ +subjectReader = $subjectReader; + $this->config = $config; + $this->configTwoCc = $configTwoCc; + } + + /** + * Build. + * + * @param array $buildSubject + */ + public function build(array $buildSubject) + { + if (!isset($buildSubject['payment']) + || !$buildSubject['payment'] instanceof PaymentDataObjectInterface + ) { + throw new InvalidArgumentException('Payment data object should be provided'); + } + + $paymentDO = $buildSubject['payment']; + $payment = $paymentDO->getPayment(); + $order = $paymentDO->getOrder(); + $storeId = $order->getStoreId(); + $result = []; + + $result = $this->getDataPaymetCc($payment, $storeId); + + return $result; + } + + /** + * Data for CC. + * + * @param InfoInterface $payment + * @param int $storeId + * + * @return array + */ + public function getDataPaymetCc($payment, $storeId) + { + $instruction = []; + + $installment = $payment->getAdditionalInformation('card_installments') ?: 1; + $ccTypeName = strtolower((string) $payment->getAdditionalInformation('card_type')); + + $instruction = [ + self::INSTALLMENTS => (int) $installment, + self::PAYMENT_METHOD_ID => $ccTypeName, + self::SOFT_DESCRIPTOR => $this->config->getStatementDescriptor($storeId), + self::BINARY_MODE => true, + self::TOKEN => $payment->getAdditionalInformation('card_number_token'), + self::CAPTURE => $this->configTwoCc->hasCapture($storeId), + ]; + + return $instruction; + } +} diff --git a/Gateway/Response/AcceptPaymentHandler.php b/Gateway/Response/AcceptPaymentHandler.php new file mode 100644 index 0000000..a7dbee4 --- /dev/null +++ b/Gateway/Response/AcceptPaymentHandler.php @@ -0,0 +1,84 @@ +getPayment(); + + $order = $payment->getOrder(); + $amount = $order->getBaseGrandTotal(); + + $payment->registerAuthorizationNotification($amount); + $payment->registerCaptureNotification($amount); + $payment->setIsTransactionApproved(true); + $payment->setIsTransactionDenied(false); + $payment->setIsInProcess(true); + $payment->setIsTransactionClosed(true); + $payment->setShouldCloseParentTransaction(true); + $payment->setAmountAuthorized($amount); + + $payment->setAdditionalInformation( + self::MP_STATUS, + $response[self::STATUS] + ); + + $payment->setAdditionalInformation( + self::MP_STATUS_DETAIL, + $response[self::STATUS_DETAIL] + ); + } + } +} diff --git a/Gateway/Response/CapturePaymentHandler.php b/Gateway/Response/CapturePaymentHandler.php new file mode 100644 index 0000000..f804b0f --- /dev/null +++ b/Gateway/Response/CapturePaymentHandler.php @@ -0,0 +1,46 @@ +getPayment(); + $order = $payment->getOrder(); + $amount = $order->getGrandTotal(); + + $payment->registerCaptureNotification($amount); + } + } +} diff --git a/Gateway/Response/CcTransactionAuthorizationHandler.php b/Gateway/Response/CcTransactionAuthorizationHandler.php new file mode 100644 index 0000000..89c4f72 --- /dev/null +++ b/Gateway/Response/CcTransactionAuthorizationHandler.php @@ -0,0 +1,103 @@ +json = $json; + } + + /** + * Handles. + * + * @param array $handlingSubject + * @param array $response + * + * @return void + */ + public function handle(array $handlingSubject, array $response) + { + if (!isset($handlingSubject['payment']) + || !$handlingSubject['payment'] instanceof PaymentDataObjectInterface + ) { + throw new InvalidArgumentException('Payment data object should be provided'); + } + + $paymentDO = $handlingSubject['payment']; + + $payment = $paymentDO->getPayment(); + + $order = $payment->getOrder(); + + $amount = $order->getBaseGrandTotal(); + + $status = $response[self::STATUS]; + + $transactionId = $response[self::RESPONSE_PAYMENT_ID]; + + if ($status === self::AUTHORIZED || $status === self::APPROVED) { + $isApproved = $status === self::APPROVED; + $isDenied = false; + + $payment->registerAuthorizationNotification($amount); + $payment->setAmountAuthorized($amount); + $payment->setIsTransactionApproved($isApproved); + $payment->setIsTransactionDenied($isDenied); + $payment->setIsTransactionPending(true); + $payment->setIsTransactionClosed(false); + $payment->setTransactionId($transactionId); + $payment->setTransactionDetails($this->json->serialize($response)); + $payment->setAdditionalData($this->json->serialize($response)); + } + } +} diff --git a/Gateway/Response/CcTransactionCaptureHandler.php b/Gateway/Response/CcTransactionCaptureHandler.php new file mode 100644 index 0000000..c60b469 --- /dev/null +++ b/Gateway/Response/CcTransactionCaptureHandler.php @@ -0,0 +1,107 @@ +json = $json; + } + + /** + * Handles. + * + * @param array $handlingSubject + * @param array $response + * + * @return void + */ + public function handle(array $handlingSubject, array $response) + { + if (!isset($handlingSubject['payment']) + || !$handlingSubject['payment'] instanceof PaymentDataObjectInterface + ) { + throw new InvalidArgumentException('Payment data object should be provided'); + } + + if (isset($response[CapturePaymentClient::IGNORE_TRANSACTION_CREATION]) && $response[CapturePaymentClient::IGNORE_TRANSACTION_CREATION]) { + return; + } + + $isApproved = false; + + $isDenied = true; + + $paymentDO = $handlingSubject['payment']; + + $payment = $paymentDO->getPayment(); + + $order = $payment->getOrder(); + + $amount = $order->getBaseGrandTotal(); + + $status = $response[self::STATUS]; + + $transactionId = $response[self::RESPONSE_PAYMENT_ID]; + + if ($status === self::APPROVED) { + $isApproved = true; + $isDenied = false; + + $payment->setAuthorizationTransaction($transactionId); + $payment->registerAuthorizationNotification($amount); + $payment->setAmountAuthorized($amount); + $payment->setIsTransactionApproved($isApproved); + $payment->setIsTransactionDenied($isDenied); + $payment->registerCaptureNotification($amount); + $payment->setTransactionId($transactionId); + $payment->setTransactionDetails($this->json->serialize($response)); + $payment->setAdditionalData($this->json->serialize($response)); + } + } +} diff --git a/Gateway/Response/CcTransactionInitializeHandler.php b/Gateway/Response/CcTransactionInitializeHandler.php new file mode 100644 index 0000000..841fcd8 --- /dev/null +++ b/Gateway/Response/CcTransactionInitializeHandler.php @@ -0,0 +1,71 @@ +getPayment(); + + $order = $payment->getOrder(); + + $transactionId = $response[self::PAYMENT_ID]; + $payment->setTransactionId($transactionId); + $payment->setIsTransactionPending(1); + $payment->setIsTransactionClosed(false); + $payment->setAuthorizationTransaction($transactionId); + $payment->addTransaction(Transaction::TYPE_AUTH); + + $order = $payment->getOrder(); + $order->setState(\Magento\Sales\Model\Order::STATE_NEW); + $order->setStatus('pending'); + $comment = __('Awaiting payment of the Card.'); + $order->addStatusHistoryComment($comment, $payment->getOrder()->getStatus()); + } +} diff --git a/Gateway/Response/DenyPaymentHandler.php b/Gateway/Response/DenyPaymentHandler.php new file mode 100644 index 0000000..843ecb8 --- /dev/null +++ b/Gateway/Response/DenyPaymentHandler.php @@ -0,0 +1,111 @@ +getPayment(); + + $order = $payment->getOrder(); + $amount = $order->getTotalDue(); + $baseAmount = $order->getBaseTotalDue(); + + $payment->setPreparedMessage(__('Order Canceled.')); + $payment->registerVoidNotification($amount); + $payment->setIsTransactionApproved(false); + $payment->setIsTransactionDenied(true); + $payment->setIsTransactionPending(false); + $payment->setIsInProcess(true); + $payment->setIsTransactionClosed(true); + $payment->setAmountCanceled($amount); + $payment->setBaseAmountCanceled($baseAmount); + $payment->setShouldCloseParentTransaction(true); + + $payment->setAdditionalInformation( + self::MP_STATUS, + $response[self::STATUS] + ); + + $payment->setAdditionalInformation( + self::MP_STATUS_DETAIL, + $response[self::STATUS_DETAIL] + ); + } + } +} diff --git a/Gateway/Response/ExtOrdIdHandler.php b/Gateway/Response/ExtOrdIdHandler.php new file mode 100644 index 0000000..dd55ed2 --- /dev/null +++ b/Gateway/Response/ExtOrdIdHandler.php @@ -0,0 +1,49 @@ +getPayment(); + + $order = $payment->getOrder(); + + $order->setExtOrderId($response[self::ID]); + } +} diff --git a/Gateway/Response/FetchPaymentHandler.php b/Gateway/Response/FetchPaymentHandler.php new file mode 100644 index 0000000..880b63b --- /dev/null +++ b/Gateway/Response/FetchPaymentHandler.php @@ -0,0 +1,389 @@ +getPayment(); + + $order = $payment->getOrder(); + + $amount = $order->getGrandTotal(); + $baseAmount = $order->getBaseGrandTotal(); + + $allowedApproveStatus = ['payment_review', 'pending']; + + if (in_array($order->getStatus(), $allowedApproveStatus) && $response[self::RESPONSE_STATUS] === self::RESPONSE_STATUS_APPROVED) { + $paidAmount = !empty($response['total_paid']) ? $response['total_paid'] : $baseAmount; + + if ($paidAmount !== $baseAmount) { + $this->createInvoice($order, $payment, $paidAmount); + } + + $payment->registerCaptureNotification($paidAmount, true); + $payment->setIsTransactionApproved(true); + $payment->setIsTransactionDenied(false); + $payment->setIsInProcess(true); + $payment->setIsTransactionClosed(true); + $payment->setShouldCloseParentTransaction(true); + $payment->setAmountAuthorized($paidAmount); + } + + if ($response[self::RESPONSE_STATUS] === self::RESPONSE_STATUS_CANCELLED || + $response[self::RESPONSE_STATUS] === self::RESPONSE_STATUS_REJECTED) { + $payment->setPreparedMessage(__('Order Canceled.')); + $payment->registerVoidNotification($amount); + $payment->setIsTransactionApproved(false); + $payment->setIsTransactionDenied(true); + $payment->setIsTransactionPending(false); + $payment->setIsInProcess(true); + $payment->setIsTransactionClosed(true); + $payment->setShouldCloseParentTransaction(true); + $payment->setAmountCanceled($amount); + $payment->setBaseAmountCanceled($baseAmount); + } + + if ($response[self::RESPONSE_STATUS] === self::RESPONSE_STATUS_REFUNDED) { + foreach ($response[self::PAYMENT_DETAILS] as $mpPayment) { + $index = $this->getIndexPayment($payment, $mpPayment[self::ID]); + if (isset($index)){ + $this->updatePaymentByIndex($payment, $index, $mpPayment); + } + } + } else { + $i = 0; + $paymentIndexList = []; + foreach ($response[self::PAYMENT_DETAILS] as $mpPayment) { + $this->updatePaymentByIndex($payment, $i, $mpPayment); + array_push($paymentIndexList, $i); + $i++; + } + $payment->setAdditionalInformation( + 'payment_index_list', + $paymentIndexList + ); + } + + $payment->setAdditionalInformation( + self::MP_STATUS, + $response[self::STATUS] + ); + + $payment->setAdditionalInformation( + self::MP_STATUS_DETAIL, + $response[self::PAYMENT_DETAILS][0][self::STATUS_DETAIL] + ); + + } + } + + private function createInvoice($order, $payment, $paidAmount) + { + $invoice = $order->prepareInvoice()->register(); + $invoice->setOrder($order); + + $invoice->setBaseGrandTotal($paidAmount); + $invoice->setGrandTotal($paidAmount); + $invoice->setSubtotal($paidAmount); + $invoice->setBaseSubtotal($paidAmount); + + $invoice->addComment(_('Captured by collector from Mercado Pago API')); + + $order->addRelatedObject($invoice); + $payment->setCreatedInvoice($invoice); + $payment->setShouldCloseParentTransaction(true); + } + + /** + * Get index of payment by payment id. + * @param $payment + * @param $paymentId + * + * @return int|null + */ + public function getIndexPayment( + $payment, + $paymentId + ) { + $i = 0; + while ($i < 2) { + if($payment->getAdditionalInformation(str_replace('%', $i, self::PAYMENT_ID)) == $paymentId){ + return $i; + } + $i++; + } + return null; + } + + /** + * Update payment by index. + * @param $payment + * @param $index + * @param $mpPayment + * + * Return void. + */ + public function updatePaymentByIndex( + $payment, + $index, + $mpPayment + ) { + $cardPaymentId = str_replace('%', $index, self::PAYMENT_ID); + $cardType = str_replace('%', $index, self::PAYMENT_TYPE); + $cardNumber = str_replace('%', $index, self::PAYMENT_CARD_NUMBER); + $cardInstallments = str_replace('%', $index, self::PAYMENT_INSTALLMENTS); + $cardTotalAmount = str_replace('%', $index, self::PAYMENT_TOTAL_AMOUNT); + $cardPaidAmount = str_replace('%', $index, self::PAYMENT_PAID_AMOUNT); + $cardRefundedAmount = str_replace('%', $index, self::PAYMENT_REFUNDED_AMOUNT); + $mpStatus = str_replace('%', $index, self::PAYMENT_STATUS); + $mpStatusDetail = str_replace('%', $index, self::PAYMENT_STATUS_DETAIL); + $paymentExpiration = str_replace('%', $index, self::PAYMENT_EXPIRATION); + + $payment->setAdditionalInformation( + $cardPaymentId, + $mpPayment[self::ID] + ); + + $payment->setAdditionalInformation( + $cardType, + $mpPayment[self::PAYMENT_METHOD_ID] + ); + + $payment->setAdditionalInformation( + $cardTotalAmount, + $mpPayment[self::TOTAL_AMOUNT] + ); + + $payment->setAdditionalInformation( + $cardPaidAmount, + $mpPayment[self::PAID_AMOUNT] + ); + + $value = $payment->getAdditionalInformation($cardRefundedAmount) ?? 0; + + $payment->setAdditionalInformation( + $cardRefundedAmount, + $value + ); + + $payment->setAdditionalInformation( + $cardNumber, + $mpPayment[self::PAYMENT_METHOD_INFO][self::LAST_FOUR_DIGITS] + ); + + $payment->setAdditionalInformation( + $cardInstallments, + $mpPayment[self::PAYMENT_METHOD_INFO][self::INSTALLMENTS] + ); + + $payment->setAdditionalInformation( + $mpStatus, + $mpPayment[self::STATUS] + ); + + $payment->setAdditionalInformation( + $mpStatusDetail, + $mpPayment[self::STATUS_DETAIL], + ); + + if (isset($mpPayment[self::PAYMENT_METHOD_INFO][self::DATE_OF_EXPIRATION])){ + $payment->setAdditionalInformation( + $paymentExpiration, + $mpPayment[self::PAYMENT_METHOD_INFO][self::DATE_OF_EXPIRATION] + ); + } + } +} diff --git a/Gateway/Response/RefundHandler.php b/Gateway/Response/RefundHandler.php new file mode 100644 index 0000000..0a1f7a9 --- /dev/null +++ b/Gateway/Response/RefundHandler.php @@ -0,0 +1,85 @@ +getPayment(); + + $payment->setTransactionId($response[self::RESPONSE_REFUND_ID]); + + if ($response[self::RESPONSE_STATUS] === self::RESPONSE_STATUS_ACCEPTED || $response[self::RESPONSE_STATUS] === self::RESPONSE_STATUS_APPROVED) { + $creditmemo = $payment->getCreditmemo(); + $creditmemo->setState(Creditmemo::STATE_REFUNDED); + } + if ($response[self::RESPONSE_STATUS] === self::RESPONSE_STATUS_DENIED) { + $creditmemo = $payment->getCreditmemo(); + $creditmemo->setState(Creditmemo::STATE_CANCELED); + } + + if ($response[self::RESULT_CODE]) { + $paymentDO->getPayment(); + } + } +} diff --git a/Gateway/Response/TwoCcTransactionAuthorizationHandler.php b/Gateway/Response/TwoCcTransactionAuthorizationHandler.php new file mode 100644 index 0000000..378267c --- /dev/null +++ b/Gateway/Response/TwoCcTransactionAuthorizationHandler.php @@ -0,0 +1,121 @@ +json = $json; + } + + /** + * Handles. + * + * @param array $handlingSubject + * @param array $response + * + * @return void + */ + public function handle(array $handlingSubject, array $response) + { + if (!isset($handlingSubject['payment']) + || !$handlingSubject['payment'] instanceof PaymentDataObjectInterface + ) { + throw new InvalidArgumentException('Payment data object should be provided'); + } + $isApproved = false; + + $isDenied = true; + + $paymentDO = $handlingSubject['payment']; + + $payment = $paymentDO->getPayment(); + + $order = $payment->getOrder(); + + $amount = $order->getBaseGrandTotal(); + + $status = $response[self::STATUS]; + + $transactionId = $response[self::RESPONSE_PAYMENT_ID]; + + if ($status === self::AUTHORIZED) { + $isApproved = true; + $isDenied = false; + + $payment->registerAuthorizationNotification($amount); + $payment->setAmountAuthorized($amount); + $payment->setIsTransactionApproved($isApproved); + $payment->setIsTransactionDenied($isDenied); + $payment->setIsTransactionPending(true); + $payment->setIsTransactionClosed(false); + $payment->setTransactionId($transactionId); + $payment->setTransactionDetails($this->json->serialize($response)); + $payment->setAdditionalData($this->json->serialize($response)); + } + + if ($status === self::APPROVED) { + $isApproved = true; + $isDenied = false; + + $payment->setAuthorizationTransaction($transactionId); + $payment->registerAuthorizationNotification($amount); + $payment->setAmountAuthorized($amount); + $payment->setIsTransactionApproved($isApproved); + $payment->setIsTransactionDenied($isDenied); + $payment->registerCaptureNotification($amount); + $payment->setTransactionId($transactionId); + $payment->setTransactionDetails($this->json->serialize($response)); + $payment->setAdditionalData($this->json->serialize($response)); + } + } +} diff --git a/Gateway/Response/TxnIdBankTransferHandler.php b/Gateway/Response/TxnIdBankTransferHandler.php new file mode 100644 index 0000000..9782c02 --- /dev/null +++ b/Gateway/Response/TxnIdBankTransferHandler.php @@ -0,0 +1,180 @@ +getPayment(); + + $this->setAddtionalInformation($payment, $response); + + $transactionId = $response[self::PAYMENT_ID]; + $payment->setTransactionId($transactionId); + $payment->setIsTransactionPending(1); + $payment->setIsTransactionClosed(false); + $payment->setAuthorizationTransaction($transactionId); + $payment->addTransaction(Transaction::TYPE_AUTH); + + $order = $payment->getOrder(); + $order->setState(\Magento\Sales\Model\Order::STATE_NEW); + $order->setStatus('pending'); + $comment = __('Awaiting payment.'); + $order->addStatusHistoryComment($comment, $payment->getOrder()->getStatus()); + } + + /** + * Set Additional Information. + * + * @param InfoInterface $payment + * @param array $response + * + * @return void + */ + public function setAddtionalInformation($payment, $response) + { + $payment->setAdditionalInformation( + self::MP_PAYMENT_ID, + $response[self::PAYMENT_ID] + ); + + $payment->setAdditionalInformation( + self::MP_STATUS, + $response[self::STATUS] + ); + + $payment->setAdditionalInformation( + self::MP_STATUS_DETAIL, + $response[self::STATUS_DETAIL] + ); + + if (isset($response[self::BARCODE])) { + if (isset($response[self::BARCODE][self::CONTENT])) { + $barcode = $response[self::BARCODE][self::CONTENT]; + + $payment->setAdditionalInformation( + self::BARCODE, + $barcode + ); + } + } + + $payment->setAdditionalInformation( + self::DATE_OF_EXPIRATION, + $response[self::DATE_OF_EXPIRATION] + ); + + $transactionDetails = $response[self::TRANSACTION_DETAILS]; + + $payment->setAdditionalInformation( + self::FINANCIAL_INSTITUTION, + $transactionDetails[self::FINANCIAL_INSTITUTION] + ); + + $payment->setAdditionalInformation( + self::EXTERNAL_RESOURCE_URL, + $transactionDetails[self::EXTERNAL_RESOURCE_URL] + ); + } +} diff --git a/Gateway/Response/TxnIdCcHandler.php b/Gateway/Response/TxnIdCcHandler.php new file mode 100644 index 0000000..af1e4a3 --- /dev/null +++ b/Gateway/Response/TxnIdCcHandler.php @@ -0,0 +1,165 @@ +getPayment(); + + $payment->setAdditionalInformation( + self::MP_PAYMENT_ID, + $response[self::PAYMENT_ID] + ); + + $payment->setAdditionalInformation( + self::MP_STATUS, + $response[self::STATUS] + ); + + $payment->setAdditionalInformation( + self::MP_STATUS_DETAIL, + $response[self::STATUS_DETAIL] + ); + + $cardType = $payment->getAdditionalInformation(self::CARD_TYPE); + $payment->setCcType($cardType); + + $cardLast4 = $payment->getAdditionalInformation(self::CARD_NUMBER); + $cardLast4 = substr($cardLast4, -4); + $payment->setCcLast4($cardLast4); + + $cardOwner = $payment->getAdditionalInformation(self::CARD_HOLDER_NAME); + $payment->setCcOwner($cardOwner); + + $cardExpMonth = $payment->getAdditionalInformation(self::CARD_EXP_MONTH); + $payment->setCcExpMonth($cardExpMonth); + + $cardExpYear = $payment->getAdditionalInformation(self::CARD_EXP_YEAR); + $payment->setCcExpYear($cardExpYear); + + $cardNumberEnc = $payment->getAdditionalInformation(self::NUMBER_TOKEN); + $payment->setCcNumberEnc($cardNumberEnc); + + $documentType = $payment->getAdditionalInformation(self::PAYER_DOCUMENT_TYPE); + $payment->setPayerDocumentType($documentType); + + $documentIdentification = $payment->getAdditionalInformation(self::PAYER_DOCUMENT_IDENTIFICATION); + $payment->setPayerDocumentIdentification($documentIdentification); + } +} diff --git a/Gateway/Response/TxnIdCheckoutProHandler.php b/Gateway/Response/TxnIdCheckoutProHandler.php new file mode 100644 index 0000000..12c1fd3 --- /dev/null +++ b/Gateway/Response/TxnIdCheckoutProHandler.php @@ -0,0 +1,99 @@ +getPayment(); + + $this->setAddtionalInformation($payment, $response); + + $transactionId = $response[self::PAYMENT_ID]; + + $payment->setTransactionId($transactionId); + $payment->setIsTransactionPending(1); + $payment->setIsTransactionClosed(false); + $payment->addTransaction(Transaction::TYPE_ORDER); + + $order = $payment->getOrder(); + $order->setState(\Magento\Sales\Model\Order::STATE_NEW); + $order->setStatus('pending'); + $comment = __('Awaiting payment through Checkout Pro.'); + $order->addStatusHistoryComment($comment, $payment->getOrder()->getStatus()); + } + + /** + * Set Additional Information. + * + * @param InfoInterface $payment + * @param array $response + * + * @return void + */ + public function setAddtionalInformation($payment, $response) + { + if (isset($response[self::DATE_OF_EXPIRATION])) { + $payment->setAdditionalInformation( + self::DATE_OF_EXPIRATION, + $response[self::DATE_OF_EXPIRATION] + ); + } + + $payment->setAdditionalInformation( + self::INIT_POINT, + $response[self::INIT_POINT] + ); + + $payment->setAdditionalInformation( + self::PAYMENT_ID, + $response[self::PAYMENT_ID] + ); + } +} diff --git a/Gateway/Response/TxnIdPaymentMethodsOffHandler.php b/Gateway/Response/TxnIdPaymentMethodsOffHandler.php new file mode 100644 index 0000000..7903b8f --- /dev/null +++ b/Gateway/Response/TxnIdPaymentMethodsOffHandler.php @@ -0,0 +1,292 @@ +configMethodsOff = $configMethodsOff; + } + + /** + * Handles. + * + * @param array $handlingSubject + * @param array $response + * + * @return void + */ + public function handle(array $handlingSubject, array $response) + { + if (!isset($handlingSubject['payment']) + || !$handlingSubject['payment'] instanceof PaymentDataObjectInterface + ) { + throw new InvalidArgumentException('Payment data object should be provided'); + } + + $paymentDO = $handlingSubject['payment']; + + $payment = $paymentDO->getPayment(); + + $this->setAddtionalInformation($payment, $response); + + $transactionId = $response[self::PAYMENT_ID]; + $payment->setTransactionId($transactionId); + $payment->setIsTransactionPending(1); + $payment->setIsTransactionClosed(false); + $payment->setAuthorizationTransaction($transactionId); + $payment->addTransaction(Transaction::TYPE_AUTH); + + $order = $payment->getOrder(); + $order->setState(\Magento\Sales\Model\Order::STATE_NEW); + $order->setStatus('pending'); + $comment = __('Awaiting payment.'); + $order->addStatusHistoryComment($comment, $payment->getOrder()->getStatus()); + } + + /** + * Set Additional Information. + * + * @param InfoInterface $payment + * @param array $response + * + * @return void + */ + public function setAddtionalInformation($payment, $response) + { + $payment->setAdditionalInformation( + self::MP_PAYMENT_ID, + $response[self::PAYMENT_ID] + ); + + $payment->setAdditionalInformation( + self::MP_STATUS, + $response[self::STATUS] + ); + + $payment->setAdditionalInformation( + self::MP_STATUS_DETAIL, + $response[self::STATUS_DETAIL] + ); + + if (isset($response[self::BARCODE])) { + if (isset($response[self::BARCODE][self::CONTENT])) { + $barcode = $response[self::BARCODE][self::CONTENT]; + + $payment->setAdditionalInformation( + self::BARCODE, + $barcode + ); + } + } + + $payment->setAdditionalInformation( + self::DATE_OF_EXPIRATION, + $response[self::DATE_OF_EXPIRATION] + ); + + $transactionDetails = $response[self::TRANSACTION_DETAILS]; + + $payment->setAdditionalInformation( + self::FINANCIAL_INSTITUTION, + $transactionDetails[self::FINANCIAL_INSTITUTION] + ); + + $payment->setAdditionalInformation( + self::EXTERNAL_RESOURCE_URL, + $transactionDetails[self::EXTERNAL_RESOURCE_URL] + ); + + $payment->setAdditionalInformation( + self::VERIFICATION_CODE, + $transactionDetails[self::VERIFICATION_CODE] + ); + + $payment->setAdditionalInformation( + self::MESSAGE_INFO, + 'Generate the ticket and pay it wherever you want.' + ); + + if ($response[self::METADATA][self::SITE_ID] === self::MLB) { + $this->setAddtionalInformationMLB($payment, $response); + } + } + + public function setAddtionalInformationMLB($payment, $response) { + if ($response[self::PAYMENT_METHOD_ID] === self::BOLETO) { + $barcode = $response[self::BARCODE][self::CONTENT]; + $lineCode = $this->configMethodsOff->getLineCode($barcode); + + $payment->setAdditionalInformation( + self::LINE_CODE, + $lineCode + ); + + $payment->setAdditionalInformation( + self::MESSAGE_LINE_CODE, + 'The Line Code is' + ); + + $payment->setAdditionalInformation( + self::MESSAGE_WILL_APPROVED, + 'Will be approved within 2 business days.' + ); + } else if ($response[self::PAYMENT_METHOD_ID] === self::PEC) { + $transactionDetails = $response[self::TRANSACTION_DETAILS]; + + $payment->setAdditionalInformation( + self::LINE_CODE, + $transactionDetails[self::FINANCIAL_INSTITUTION] + ); + + $payment->setAdditionalInformation( + self::MESSAGE_LINE_CODE, + 'Mercado Pago partnership code' + ); + + $payment->setAdditionalInformation( + self::MESSAGE_DOCUMENT, + 'Enter the ID Document you used in the purchase' + ); + } + } +} diff --git a/Gateway/Response/TxnIdPixHandler.php b/Gateway/Response/TxnIdPixHandler.php new file mode 100644 index 0000000..8093a1f --- /dev/null +++ b/Gateway/Response/TxnIdPixHandler.php @@ -0,0 +1,164 @@ +getPayment(); + + $this->setAddtionalInformation($payment, $response); + + $transactionId = $response[self::PAYMENT_ID]; + $payment->setTransactionId($transactionId); + $payment->setIsTransactionPending(1); + $payment->setIsTransactionClosed(false); + $payment->setAuthorizationTransaction($transactionId); + $payment->addTransaction(Transaction::TYPE_AUTH); + + $order = $payment->getOrder(); + $order->setState(\Magento\Sales\Model\Order::STATE_NEW); + $order->setStatus('pending'); + $comment = __('Awaiting payment through Pix.'); + $order->addStatusHistoryComment($comment, $payment->getOrder()->getStatus()); + } + + /** + * Set Additional Information. + * + * @param InfoInterface $payment + * @param array $response + * + * @return void + */ + public function setAddtionalInformation($payment, $response) + { + $payment->setAdditionalInformation( + self::MP_PAYMENT_ID, + $response[self::PAYMENT_ID] + ); + + $payment->setAdditionalInformation( + self::MP_STATUS, + $response[self::STATUS] + ); + + $payment->setAdditionalInformation( + self::MP_STATUS_DETAIL, + $response[self::STATUS_DETAIL] + ); + + $payment->setAdditionalInformation( + self::DATE_OF_EXPIRATION, + $response[self::DATE_OF_EXPIRATION] + ); + + $transactionData = $response[self::POINT_OF_INTERACTION][self::TRANSACTION_DATA]; + + $payment->setAdditionalInformation( + self::QR_CODE, + $transactionData[self::QR_CODE] + ); + + $payment->setAdditionalInformation( + self::QR_CODE_ENCODE, + $transactionData[self::QR_CODE_ENCODE] + ); + + $payment->setAdditionalInformation( + self::EXTERNAL_TICKET_URL, + $transactionData[self::EXTERNAL_TICKET_URL] + ); + } +} diff --git a/Gateway/Response/TxnIdTwoCcHandler.php b/Gateway/Response/TxnIdTwoCcHandler.php new file mode 100644 index 0000000..791f122 --- /dev/null +++ b/Gateway/Response/TxnIdTwoCcHandler.php @@ -0,0 +1,161 @@ +getPayment(); + + $payment->setAdditionalInformation( + self::MP_PAYMENT_ID, + $response[self::PAYMENT_ID] + ); + + $payment->setAdditionalInformation( + self::MP_STATUS, + $response[self::STATUS] + ); + + $transactionInfo = []; + + for ($i = 0; $i < 2; $i++): + + $cardType = str_replace('%', $i, self::CARD_TYPE); + $cardNumber = str_replace('%', $i, self::CARD_NUMBER); + $cardHolderName = str_replace('%', $i, self::CARD_HOLDER_NAME); + $cardExpMonth = str_replace('%', $i, self::CARD_EXP_MONTH); + $cardExpYear = str_replace('%', $i, self::CARD_EXP_YEAR); + $cardNumberToken = str_replace('%', $i, self::NUMBER_TOKEN); + + $cardInfo = [ + $cardType => $payment->getAdditionalInformation($cardType), + $cardNumber => $payment->getAdditionalInformation($cardNumber), + $cardHolderName => $payment->getAdditionalInformation($cardHolderName), + $cardExpMonth => $payment->getAdditionalInformation($cardExpMonth), + $cardExpYear => $payment->getAdditionalInformation($cardExpYear), + $cardNumberToken => $payment->getAdditionalInformation($cardNumberToken), + ]; + + array_push($transactionInfo, $cardInfo); + + $payment->setAdditionalInformation( + str_replace('%', $i,self::CARD_PAYMENT_ID), + $response[self::TRANSACTION_INFO][$i][self::PAYMENT_ID] + ); + + $payment->setAdditionalInformation( + str_replace('%', $i,'mp_%_status'), + $response[self::TRANSACTION_INFO][$i][self::STATUS] + ); + + $payment->setAdditionalInformation( + str_replace('%', $i,'mp_%_status_detail'), + $response[self::TRANSACTION_INFO][$i][self::STATUS_DETAIL], + ); + + endfor; + + $payment->setTransactionInfo($transactionInfo); + } +} diff --git a/Gateway/Response/VaultDetailsHandler.php b/Gateway/Response/VaultDetailsHandler.php new file mode 100644 index 0000000..55e1aef --- /dev/null +++ b/Gateway/Response/VaultDetailsHandler.php @@ -0,0 +1,165 @@ +get(PaymentTokenFactoryInterface::class); + } + + $this->objectManager = $objectManager; + $this->payExtensionFactory = $payExtensionFactory; + $this->paymentTokenFactory = $paymentTokenFactory; + $this->json = $json; + } + + /** + * Handle. + * + * @param array $handlingSubject + * @param array $response + * + * @return void + */ + public function handle(array $handlingSubject, array $response) + { + if (!isset($handlingSubject['payment']) + || !$handlingSubject['payment'] instanceof PaymentDataObjectInterface + ) { + throw new InvalidArgumentException('Payment data object should be provided'); + } + + $paymentDO = $handlingSubject['payment']; + + $payment = $paymentDO->getPayment(); + $paymentToken = $this->getVaultPaymentToken($payment, $response); + if (null !== $paymentToken) { + $extensionAttributes = $this->getExtensionAttributes($payment); + $extensionAttributes->setVaultPaymentToken($paymentToken); + } + } + + /** + * Get vault payment token entity. + * + * @param InfoInterface $payment + * @param array $response + * + * @return PaymentTokenInterface|null + */ + protected function getVaultPaymentToken($payment, $response) + { + $response['RESULT_CODE']; + $mpUserId = $payment->getAdditionalInformation('mp_user_id'); + $cardHolderName = $payment->getAdditionalInformation('card_holder_name'); + $cardNumberToken = $payment->getAdditionalInformation('card_public_id'); + $cardNumber = $payment->getAdditionalInformation('card_number'); + $cardType = $payment->getAdditionalInformation('card_type'); + $cardExpMonth = $payment->getAdditionalInformation('card_exp_month'); + $cardExpYear = $payment->getAdditionalInformation('card_exp_year'); + $payerDocumentType = $payment->getAdditionalInformation('payer_document_type'); + $payerDocumentNumber = $payment->getAdditionalInformation('payer_document_identification'); + + if (empty($cardNumberToken)) { + return null; + } + + $cardNumbers = preg_replace('/[^0-9]/', '', $cardNumber); + $firstSix = substr($cardNumbers, 0, 6); + $lastFour = substr($cardNumber, 12); + + $paymentToken = $this->paymentTokenFactory->create(); + $paymentToken->setGatewayToken($cardNumberToken); + $paymentToken->setExpiresAt(strtotime('+1 year')); + $paymentToken->setType(PaymentTokenFactoryInterface::TOKEN_TYPE_CREDIT_CARD); + + $details = [ + 'mp_public_id' => $cardNumberToken, + 'mp_user_id' => $mpUserId, + 'card_holder_name' => $cardHolderName, + 'card_first6' => $firstSix, + 'card_last4' => $lastFour, + 'card_exp_year' => $cardExpYear, + 'card_exp_month' => $cardExpMonth, + 'card_type' => $cardType, + 'payer_document_type' => $payerDocumentType, + 'payer_document_number' => $payerDocumentNumber, + ]; + + $paymentToken->setTokenDetails($this->json->serialize($details)); + + return $paymentToken; + } + + /** + * Get payment extension attributes. + * + * @param InfoInterface $payment + * + * @return OrderPaymentExtensionInterface + */ + protected function getExtensionAttributes(InfoInterface $payment): OrderPaymentExtensionInterface + { + $extensionAttributes = $payment->getExtensionAttributes(); + if (null === $extensionAttributes) { + $extensionAttributes = $this->payExtensionFactory->create(); + $payment->setExtensionAttributes($extensionAttributes); + } + + return $extensionAttributes; + } +} diff --git a/Gateway/Response/VoidPaymentHandler.php b/Gateway/Response/VoidPaymentHandler.php new file mode 100644 index 0000000..399d53b --- /dev/null +++ b/Gateway/Response/VoidPaymentHandler.php @@ -0,0 +1,130 @@ +getPayment(); + + $order = $payment->getOrder(); + $amount = $order->getBaseGrandTotal(); + + $this->setAddtionalInformation($payment, $response); + + $payment->setPreparedMessage(__('Order Canceled.')); + $payment->setIsTransactionPending(false); + $payment->setIsTransactionDenied(true); + $payment->setAmountCanceled($amount); + $payment->setBaseAmountCanceled($amount); + $payment->setShouldCloseParentTransaction(true); + } + } + + /** + * Set Additional Information. + * + * @param InfoInterface $payment + * @param array $response + * + * @return void + */ + public function setAddtionalInformation($payment, $response) + { + $payment->setAdditionalInformation( + self::MP_PAYMENT_ID, + $response[self::PAYMENT_ID] + ); + + $payment->setAdditionalInformation( + self::MP_STATUS, + $response[self::RESPONSE_STATUS] + ); + + $payment->setAdditionalInformation( + self::MP_STATUS_DETAIL, + $response[self::STATUS_DETAIL] + ); + } +} diff --git a/Gateway/SubjectReader.php b/Gateway/SubjectReader.php new file mode 100644 index 0000000..33d3473 --- /dev/null +++ b/Gateway/SubjectReader.php @@ -0,0 +1,119 @@ +checkoutSession = $checkoutSession; + } + + /** + * Reads payment from subject. + * + * @param array $subject + * + * @return PaymentDataObjectInterface + * @SuppressWarnings(PHPMD.StaticAccess) + */ + public function readPayment(array $subject): PaymentDataObjectInterface + { + return Helper\SubjectReader::readPayment($subject); + } + + /** + * Reads store's ID, otherwise returns null. + * + * @param array $subject + * + * @return int|null + */ + public function readStoreId(array $subject): ?int + { + $storeId = $subject['store_id'] ?? null; + + if (empty($storeId)) { + try { + $storeId = (int) $this->readPayment($subject) + ->getOrder() + ->getStoreId(); + // phpcs:ignore Magento2.CodeAnalysis.EmptyBlock + } catch (\InvalidArgumentException $e) { + // No store id is current set + } + } + + return $storeId ? (int) $storeId : null; + } + + /** + * Reads amount from subject. + * + * @param array $subject + * + * @return string + * @SuppressWarnings(PHPMD.StaticAccess) + */ + public function readAmount(array $subject): string + { + return (string) Helper\SubjectReader::readAmount($subject); + } + + /** + * Reads response from subject. + * + * @param array $subject + * + * @return array + * @SuppressWarnings(PHPMD.StaticAccess) + */ + public function readResponse(array $subject): array + { + return Helper\SubjectReader::readResponse($subject); + } + + /** + * Get Quote. + * + * @return \Magento\Quote\Model\Quote + */ + public function getQuote() + { + return $this->checkoutSession->getQuote(); + } + + /** + * Get Order. + * + * @return \Magento\Sales\Model\Order + */ + public function getOrder() + { + return $this->checkoutSession->getLastRealOrder(); + } +} diff --git a/Gateway/Validator/ErrorCodeProvider.php b/Gateway/Validator/ErrorCodeProvider.php new file mode 100644 index 0000000..0b8eb94 --- /dev/null +++ b/Gateway/Validator/ErrorCodeProvider.php @@ -0,0 +1,57 @@ +errors; + + /** @var Validation $error */ + foreach ($collection->deepAll() as $error) { + $result[] = $error->code; + } + + if (isset($response->transaction) && $response->transaction) { + + /* @phpstan-ignore-next-line */ + if ($response->transaction->status === Transaction::GATEWAY_REJECTED) { + $result[] = $response->transaction->gatewayRejectionReason; + } + + /* @phpstan-ignore-next-line */ + if ($response->transaction->status === Transaction::PROCESSOR_DECLINED) { + $result[] = $response->transaction->processorResponseCode; + } + } + + return $result; + } +} diff --git a/Gateway/Validator/GeneralResponseValidator.php b/Gateway/Validator/GeneralResponseValidator.php new file mode 100644 index 0000000..9725b9a --- /dev/null +++ b/Gateway/Validator/GeneralResponseValidator.php @@ -0,0 +1,74 @@ +subjectReader = $subjectReader; + } + + /** + * Validate. + * + * @param array $validationSubject + * + * @return ResultInterface + */ + public function validate(array $validationSubject): ResultInterface + { + $response = $this->subjectReader->readResponse($validationSubject); + $isValid = $response['RESULT_CODE']; + $errorCodes = []; + $errorMessages = []; + if (!$isValid) { + + // error in payments + + if (isset($response['status_detail'])) { + $errorCodes[] = $response['status_detail']; + $errorMessages[] = 'rejected'; + } + if (isset($response['cause'])) { + foreach ($response['cause'] as $cause) { + $errorCodes[] = $cause['code']; + $errorMessages[] = $cause['description']; + } + } + } + + return $this->createResult($isValid, $errorMessages, $errorCodes); + } +} diff --git a/Gateway/Validator/ResponseCodeValidator.php b/Gateway/Validator/ResponseCodeValidator.php new file mode 100644 index 0000000..be6027d --- /dev/null +++ b/Gateway/Validator/ResponseCodeValidator.php @@ -0,0 +1,64 @@ +isSuccessfulTransaction($response)) { + return $this->createResult( + true, + [] + ); + } + + return $this->createResult( + false, + [__('The gateway declined the transaction.')] + ); + } + + /** + * Is Successful Transaction. + * + * @param array $response + * + * @return bool + */ + private function isSuccessfulTransaction(array $response) + { + return $response[self::RESULT_CODE]; + } +} diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..b4c9f52 --- /dev/null +++ b/LICENSE @@ -0,0 +1,47 @@ +Open Software License v. 3.0 (OSL-3.0) + +This Open Software License (the "License") applies to any original work of authorship (the "Original Work") whose owner (the "Licensor") has placed the following licensing notice adjacent to the copyright notice for the Original Work: + +Licensed under the Open Software License version 3.0 + +1) Grant of Copyright License. Licensor grants You a worldwide, royalty-free, non-exclusive, sublicensable license, for the duration of the copyright, to do the following: + +a) to reproduce the Original Work in copies, either alone or as part of a collective work; + +b) to translate, adapt, alter, transform, modify, or arrange the Original Work, thereby creating derivative works ("Derivative Works") based upon the Original Work; + +c) to distribute or communicate copies of the Original Work and Derivative Works to the public, with the proviso that copies of Original Work or Derivative Works that You distribute or communicate shall be licensed under this Open Software License; + +d) to perform the Original Work publicly; and + +e) to display the Original Work publicly. + +2) Grant of Patent License. Licensor grants You a worldwide, royalty-free, non-exclusive, sublicensable license, under patent claims owned or controlled by the Licensor that are embodied in the Original Work as furnished by the Licensor, for the duration of the patents, to make, use, sell, offer for sale, have made, and import the Original Work and Derivative Works. + +3) Grant of Source Code License. The term "Source Code" means the preferred form of the Original Work for making modifications to it and all available documentation describing how to modify the Original Work. Licensor agrees to provide a machine-readable copy of the Source Code of the Original Work along with each copy of the Original Work that Licensor distributes. Licensor reserves the right to satisfy this obligation by placing a machine-readable copy of the Source Code in an information repository reasonably calculated to permit inexpensive and convenient access by You for as long as Licensor continues to distribute the Original Work. + +4) Exclusions From License Grant. Neither the names of Licensor, nor the names of any contributors to the Original Work, nor any of their trademarks or service marks, may be used to endorse or promote products derived from this Original Work without express prior permission of the Licensor. Except as expressly stated herein, nothing in this License grants any license to Licensor's trademarks, copyrights, patents, trade secrets or any other intellectual property. No patent license is granted to make, use, sell, offer for sale, have made, or import embodiments of any patent claims other than the licensed claims defined in Section 2. No license is granted to the trademarks of Licensor even if such marks are included in the Original Work. Nothing in this License shall be interpreted to prohibit Licensor from licensing under terms different from this License any Original Work that Licensor otherwise would have a right to license. + +5) External Deployment. The term "External Deployment" means the use, distribution, or communication of the Original Work or Derivative Works in any way such that the Original Work or Derivative Works may be used by anyone other than You, whether those works are distributed or communicated to those persons or made available as an application intended for use over a network. As an express condition for the grants of license hereunder, You must treat any External Deployment by You of the Original Work or a Derivative Work as a distribution under section 1(c). + +6) Attribution Rights. You must retain, in the Source Code of any Derivative Works that You create, all copyright, patent, or trademark notices from the Source Code of the Original Work, as well as any notices of licensing and any descriptive text identified therein as an "Attribution Notice." You must cause the Source Code for any Derivative Works that You create to carry a prominent Attribution Notice reasonably calculated to inform recipients that You have modified the Original Work. + +7) Warranty of Provenance and Disclaimer of Warranty. Licensor warrants that the copyright in and to the Original Work and the patent rights granted herein by Licensor are owned by the Licensor or are sublicensed to You under the terms of this License with the permission of the contributor(s) of those copyrights and patent rights. Except as expressly stated in the immediately preceding sentence, the Original Work is provided under this License on an "AS IS" BASIS and WITHOUT WARRANTY, either express or implied, including, without limitation, the warranties of non-infringement, merchantability or fitness for a particular purpose. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL WORK IS WITH YOU. This DISCLAIMER OF WARRANTY constitutes an essential part of this License. No license to the Original Work is granted by this License except under this disclaimer. + +8) Limitation of Liability. Under no circumstances and under no legal theory, whether in tort (including negligence), contract, or otherwise, shall the Licensor be liable to anyone for any indirect, special, incidental, or consequential damages of any character arising as a result of this License or the use of the Original Work including, without limitation, damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses. This limitation of liability shall not apply to the extent applicable law prohibits such limitation. + +9) Acceptance and Termination. If, at any time, You expressly assented to this License, that assent indicates your clear and irrevocable acceptance of this License and all of its terms and conditions. If You distribute or communicate copies of the Original Work or a Derivative Work, You must make a reasonable effort under the circumstances to obtain the express assent of recipients to the terms of this License. This License conditions your rights to undertake the activities listed in Section 1, including your right to create Derivative Works based upon the Original Work, and doing so without honoring these terms and conditions is prohibited by copyright law and international treaty. Nothing in this License is intended to affect copyright exceptions and limitations (including "fair use" or "fair dealing"). This License shall terminate immediately and You may no longer exercise any of the rights granted to You by this License upon your failure to honor the conditions in Section 1(c). + +10) Termination for Patent Action. This License shall terminate automatically and You may no longer exercise any of the rights granted to You by this License as of the date You commence an action, including a cross-claim or counterclaim, against Licensor or any licensee alleging that the Original Work infringes a patent. This termination provision shall not apply for an action alleging patent infringement by combinations of the Original Work with other software or hardware. + +11) Jurisdiction, Venue and Governing Law. Any action or suit relating to this License may be brought only in the courts of a jurisdiction wherein the Licensor resides or in which Licensor conducts its primary business, and under the laws of that jurisdiction excluding its conflict-of-law provisions. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any use of the Original Work outside the scope of this License or after its termination shall be subject to the requirements and penalties of copyright or patent law in the appropriate jurisdiction. This section shall survive the termination of this License. + +12) Attorneys' Fees. In any action to enforce the terms of this License or seeking damages relating thereto, the prevailing party shall be entitled to recover its costs and expenses, including, without limitation, reasonable attorneys' fees and costs incurred in connection with such action, including any appeal of such action. This section shall survive the termination of this License. + +13) Miscellaneous. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. + +14) Definition of "You" in This License. "You" throughout this License, whether in upper or lower case, means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License. For legal entities, "You" includes any entity that controls, is controlled by, or is under common control with you. For purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. + +15) Right to Use. You may use the Original Work in all ways not otherwise restricted or conditioned by this License or by law, and Licensor promises not to interfere with or be responsible for such uses by You. + +16) Modification of This License. This License is Copyright © 2005 Lawrence Rosen. Permission is granted to copy, distribute, or communicate this License without modification. Nothing in this License permits You to modify this License as applied to the Original Work or to Derivative Works. However, You may modify the text of this License and copy, distribute or communicate your modified version (the "Modified License") and apply it to other original works of authorship subject to the following conditions: (i) You may not indicate in any way that your Modified License is the "Open Software License" or "OSL" and you may not use those names in the name of your Modified License; (ii) You must replace the notice specified in the first paragraph above with the notice "Licensed under " or with a notice of your own that is not confusingly similar to the notice in this License; and (iii) You may not claim that your original works are open source software unless your Modified License has been approved by Open Source Initiative (OSI) and You comply with its license review and certification process. \ No newline at end of file diff --git a/LICENSE_AFL b/LICENSE_AFL new file mode 100644 index 0000000..05448d3 --- /dev/null +++ b/LICENSE_AFL @@ -0,0 +1,44 @@ + +Academic Free License (“AFL”) v. 3.0 + +This Academic Free License (the "License") applies to any original work of authorship (the "Original Work") whose owner (the "Licensor") has placed the following licensing notice adjacent to the copyright notice for the Original Work: + + Licensed under the Academic Free License version 3.0 + +1) Grant of Copyright License. Licensor grants You a worldwide, royalty-free, non-exclusive, sublicensable license, for the duration of the copyright, to do the following: + + a) to reproduce the Original Work in copies, either alone or as part of a collective work; + b) to translate, adapt, alter, transform, modify, or arrange the Original Work, thereby creating derivative works ("Derivative Works") based upon the Original Work; + c) to distribute or communicate copies of the Original Work and Derivative Works to the public, under any license of your choice that does not contradict the terms and conditions, including Licensor’s reserved rights and remedies, in this Academic Free License; + d) to perform the Original Work publicly; and + e) to display the Original Work publicly. + +2) Grant of Patent License. Licensor grants You a worldwide, royalty-free, non-exclusive, sublicensable license, under patent claims owned or controlled by the Licensor that are embodied in the Original Work as furnished by the Licensor, for the duration of the patents, to make, use, sell, offer for sale, have made, and import the Original Work and Derivative Works. + +3) Grant of Source Code License. The term "Source Code" means the preferred form of the Original Work for making modifications to it and all available documentation describing how to modify the Original Work. Licensor agrees to provide a machine-readable copy of the Source Code of the Original Work along with each copy of the Original Work that Licensor distributes. Licensor reserves the right to satisfy this obligation by placing a machine-readable copy of the Source Code in an information repository reasonably calculated to permit inexpensive and convenient access by You for as long as Licensor continues to distribute the Original Work. + + 4) Exclusions From License Grant. Neither the names of Licensor, nor the names of any contributors to the Original Work, nor any of their trademarks or service marks, may be used to endorse or promote products derived from this Original Work without express prior permission of the Licensor. Except as expressly stated herein, nothing in this License grants any license to Licensor’s trademarks, copyrights, patents, trade secrets or any other intellectual property. No patent license is granted to make, use, sell, offer for sale, have made, or import embodiments of any patent claims other than the licensed claims defined in Section 2. No license is granted to the trademarks of Licensor even if such marks are included in the Original Work. Nothing in this License shall be interpreted to prohibit Licensor from licensing under terms different from this License any Original Work that Licensor otherwise would have a right to license. + +5) External Deployment. The term "External Deployment" means the use, distribution, or communication of the Original Work or Derivative Works in any way such that the Original Work or Derivative Works may be used by anyone other than You, whether those works are distributed or communicated to those persons or made available as an application intended for use over a network. As an express condition for the grants of license hereunder, You must treat any External Deployment by You of the Original Work or a Derivative Work as a distribution under section 1(c). + +6) Attribution Rights. You must retain, in the Source Code of any Derivative Works that You create, all copyright, patent, or trademark notices from the Source Code of the Original Work, as well as any notices of licensing and any descriptive text identified therein as an "Attribution Notice." You must cause the Source Code for any Derivative Works that You create to carry a prominent Attribution Notice reasonably calculated to inform recipients that You have modified the Original Work. + +7) Warranty of Provenance and Disclaimer of Warranty. Licensor warrants that the copyright in and to the Original Work and the patent rights granted herein by Licensor are owned by the Licensor or are sublicensed to You under the terms of this License with the permission of the contributor(s) of those copyrights and patent rights. Except as expressly stated in the immediately preceding sentence, the Original Work is provided under this License on an "AS IS" BASIS and WITHOUT WARRANTY, either express or implied, including, without limitation, the warranties of non-infringement, merchantability or fitness for a particular purpose. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL WORK IS WITH YOU. This DISCLAIMER OF WARRANTY constitutes an essential part of this License. No license to the Original Work is granted by this License except under this disclaimer. + +8) Limitation of Liability. Under no circumstances and under no legal theory, whether in tort (including negligence), contract, or otherwise, shall the Licensor be liable to anyone for any indirect, special, incidental, or consequential damages of any character arising as a result of this License or the use of the Original Work including, without limitation, damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses. This limitation of liability shall not apply to the extent applicable law prohibits such limitation. + +9) Acceptance and Termination. If, at any time, You expressly assented to this License, that assent indicates your clear and irrevocable acceptance of this License and all of its terms and conditions. If You distribute or communicate copies of the Original Work or a Derivative Work, You must make a reasonable effort under the circumstances to obtain the express assent of recipients to the terms of this License. This License conditions your rights to undertake the activities listed in Section 1, including your right to create Derivative Works based upon the Original Work, and doing so without honoring these terms and conditions is prohibited by copyright law and international treaty. Nothing in this License is intended to affect copyright exceptions and limitations (including “fair use” or “fair dealing”). This License shall terminate immediately and You may no longer exercise any of the rights granted to You by this License upon your failure to honor the conditions in Section 1(c). + +10) Termination for Patent Action. This License shall terminate automatically and You may no longer exercise any of the rights granted to You by this License as of the date You commence an action, including a cross-claim or counterclaim, against Licensor or any licensee alleging that the Original Work infringes a patent. This termination provision shall not apply for an action alleging patent infringement by combinations of the Original Work with other software or hardware. + +11) Jurisdiction, Venue and Governing Law. Any action or suit relating to this License may be brought only in the courts of a jurisdiction wherein the Licensor resides or in which Licensor conducts its primary business, and under the laws of that jurisdiction excluding its conflict-of-law provisions. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any use of the Original Work outside the scope of this License or after its termination shall be subject to the requirements and penalties of copyright or patent law in the appropriate jurisdiction. This section shall survive the termination of this License. + +12) Attorneys’ Fees. In any action to enforce the terms of this License or seeking damages relating thereto, the prevailing party shall be entitled to recover its costs and expenses, including, without limitation, reasonable attorneys' fees and costs incurred in connection with such action, including any appeal of such action. This section shall survive the termination of this License. + +13) Miscellaneous. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. + +14) Definition of "You" in This License. "You" throughout this License, whether in upper or lower case, means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License. For legal entities, "You" includes any entity that controls, is controlled by, or is under common control with you. For purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. + +15) Right to Use. You may use the Original Work in all ways not otherwise restricted or conditioned by this License or by law, and Licensor promises not to interfere with or be responsible for such uses by You. + +16) Modification of This License. This License is Copyright © 2005 Lawrence Rosen. Permission is granted to copy, distribute, or communicate this License without modification. Nothing in this License permits You to modify this License as applied to the Original Work or to Derivative Works. However, You may modify the text of this License and copy, distribute or communicate your modified version (the "Modified License") and apply it to other original works of authorship subject to the following conditions: (i) You may not indicate in any way that your Modified License is the "Academic Free License" or "AFL" and you may not use those names in the name of your Modified License; (ii) You must replace the notice specified in the first paragraph above with the notice "Licensed under " or with a notice of your own that is not confusingly similar to the notice in this License; and (iii) You may not claim that your original works are open source software unless your Modified License has been approved by Open Source Initiative (OSI) and You comply with its license review and certification process. \ No newline at end of file diff --git a/Model/Adminhtml/Source/Category.php b/Model/Adminhtml/Source/Category.php new file mode 100644 index 0000000..2d4d39e --- /dev/null +++ b/Model/Adminhtml/Source/Category.php @@ -0,0 +1,117 @@ +logger = $logger; + $this->mercadopagoConfig = $mercadopagoConfig; + $this->json = $json; + $this->httpClientFactory = $httpClientFactory; + } + + /** + * Returns Options. + * + * @return array + */ + public function toOptionArray(): array + { + $options = []; + $categories = $this->getAllCategories(); + $options[] = [ + 'value' => '', + 'label' => __('Please select a category'), + ]; + foreach ($categories as $categorie) { + $options[] = [ + 'value' => $categorie['id'], + 'label' => __($categorie['description']), + ]; + } + + return $options; + } + + /** + * Get New Token. + * + * @param int $storeId + * + * @return array + */ + protected function getAllCategories(int $storeId = 0): array + { + $uri = $this->mercadopagoConfig->getApiUrl(); + $clientConfigs = $this->mercadopagoConfig->getClientConfigs(); + $clientHeaders = $this->mercadopagoConfig->getClientHeaders($storeId); + + $client = $this->httpClientFactory->create(); + $client->setUri($uri.'/item_categories'); + $client->setConfig($clientConfigs); + $client->setHeaders($clientHeaders); + $client->setMethod(ZendClient::GET); + + try { + $result = $client->request()->getBody(); + $response = $this->json->unserialize($result); + $this->logger->debug([$client]); + $this->logger->debug($response); + + return $response; + } catch (Exception $e) { + $this->logger->debug(['error' => $e->getMessage()]); + + return []; + } + } +} diff --git a/Model/Adminhtml/Source/CcType.php b/Model/Adminhtml/Source/CcType.php new file mode 100644 index 0000000..895be52 --- /dev/null +++ b/Model/Adminhtml/Source/CcType.php @@ -0,0 +1,70 @@ +getAllowedTypes(); + $options = []; + + foreach ($this->_paymentConfig->getCcTypes() as $code => $name) { + if (in_array($code, $allowed)) { + $options[] = ['value' => $code, 'label' => $name]; + } + } + + return $options; + } +} diff --git a/Model/Adminhtml/Source/Environment.php b/Model/Adminhtml/Source/Environment.php new file mode 100644 index 0000000..2d0edcb --- /dev/null +++ b/Model/Adminhtml/Source/Environment.php @@ -0,0 +1,30 @@ + __('Production'), + 'sandbox' => __('Sandbox - Testing environment'), + ]; + } +} diff --git a/Model/Adminhtml/Source/IsBinaryMode.php b/Model/Adminhtml/Source/IsBinaryMode.php new file mode 100644 index 0000000..20d3fc9 --- /dev/null +++ b/Model/Adminhtml/Source/IsBinaryMode.php @@ -0,0 +1,34 @@ + 0, + 'label' => __('Yes, Processed Order Synchronous'), + ], + [ + 'value' => 1, + 'label' => __('No, Processed Order Asynchronous'), + ], + ]; + } +} diff --git a/Model/Adminhtml/Source/MaxInstallments.php b/Model/Adminhtml/Source/MaxInstallments.php new file mode 100644 index 0000000..20bb2c6 --- /dev/null +++ b/Model/Adminhtml/Source/MaxInstallments.php @@ -0,0 +1,64 @@ + __('1 installment'), + '2' => __('2 installments'), + '3' => __('3 installments'), + '4' => __('4 installments'), + '5' => __('5 installments'), + '6' => __('6 installments'), + '7' => __('7 installments'), + '8' => __('8 installments'), + '9' => __('9 installments'), + '10' => __('10 installments'), + '11' => __('11 installments'), + '12' => __('12 installments'), + '13' => __('13 installments'), + '14' => __('14 installments'), + '15' => __('15 installments'), + '16' => __('16 installments'), + '17' => __('17 installments'), + '18' => __('18 installments'), + '19' => __('19 installments'), + '20' => __('20 installments'), + '21' => __('21 installments'), + '22' => __('22 installments'), + '23' => __('23 installments'), + '24' => __('24 installments'), + '25' => __('25 installments'), + '26' => __('26 installments'), + '27' => __('27 installments'), + '28' => __('28 installments'), + '29' => __('29 installments'), + '30' => __('30 installments'), + '31' => __('31 installments'), + '32' => __('32 installments'), + '33' => __('33 installments'), + '34' => __('34 installments'), + '35' => __('35 installments'), + '36' => __('36 installments'), + ]; + } +} diff --git a/Model/Adminhtml/Source/MerchantPaymentMethods.php b/Model/Adminhtml/Source/MerchantPaymentMethods.php new file mode 100644 index 0000000..7a2e335 --- /dev/null +++ b/Model/Adminhtml/Source/MerchantPaymentMethods.php @@ -0,0 +1,138 @@ +logger = $logger; + $this->mercadopagoConfig = $mercadopagoConfig; + $this->json = $json; + $this->httpClientFactory = $httpClientFactory; + $this->request = $request; + } + + /** + * Returns Options. + * + * @return array + */ + public function toOptionArray(): array + { + $options = []; + + $options[] = [ + 'value' => null, + 'label' => __('Do Not Delete'), + ]; + + $payments = $this->getAllPaymentMethods(); + + if ($payments['success'] === true) { + foreach ($payments['methods'] as $payment) { + $options[] = [ + 'value' => $payment['id'], + 'label' => __($payment['name']), + ]; + } + } + + return $options; + } + + /** + * Get All Payment Methods. + * + * @param int $storeId + * + * @return array + */ + public function getAllPaymentMethods(int $storeId = 0): ?array + { + $response = ['success' => false]; + $storeId = $this->request->getParam('store', 0); + + $uri = $this->mercadopagoConfig->getApiUrl(); + $clientConfigs = $this->mercadopagoConfig->getClientConfigs($storeId); + $clientHeaders = $this->mercadopagoConfig->getClientHeaders($storeId); + + $client = $this->httpClientFactory->create(); + $client->setUri($uri.'/v1/payment_methods'); + $client->setConfig($clientConfigs); + $client->setHeaders($clientHeaders); + $client->setMethod(ZendClient::GET); + + try { + $result = $client->request()->getBody(); + $data = $this->json->unserialize($result); + $this->logger->debug($data); + + if (!isset($data['error'])) { + $response = array_merge( + ['success' => true], + ['methods' => $data] + ); + } + } catch (Exception $e) { + $this->logger->debug(['error' => $e->getMessage()]); + } + + return $response; + } +} diff --git a/Model/Adminhtml/Source/PaymentAction.php b/Model/Adminhtml/Source/PaymentAction.php new file mode 100644 index 0000000..cc790cd --- /dev/null +++ b/Model/Adminhtml/Source/PaymentAction.php @@ -0,0 +1,37 @@ + AbstractMethod::ACTION_AUTHORIZE, + 'label' => __('Authorization for future capture'), + ], + [ + 'value' => AbstractMethod::ACTION_AUTHORIZE_CAPTURE, + 'label' => __('Authorization for immediate capture'), + ], + + ]; + } +} diff --git a/Model/Adminhtml/Source/PaymentGroup.php b/Model/Adminhtml/Source/PaymentGroup.php new file mode 100644 index 0000000..db8e845 --- /dev/null +++ b/Model/Adminhtml/Source/PaymentGroup.php @@ -0,0 +1,190 @@ +backendConfig = $backendConfig; + parent::__construct($context, $authSession, $jsHelper, $data, $secureRenderer); + $this->secureRenderer = $secureRenderer; + } + + /** + * Add custom css class. + * + * @param \Magento\Framework\Data\Form\Element\AbstractElement $element + * + * @return string + */ + protected function _getFrontendClass($element) + { + $enabledString = $this->_isPaymentEnabled($element) ? ' enabled' : ''; + + return parent::_getFrontendClass($element).' with-button'.$enabledString; + } + + /** + * Check whether current payment method is enabled. + * + * @param \Magento\Framework\Data\Form\Element\AbstractElement $element + * + * @return bool + */ + protected function _isPaymentEnabled($element) + { + $groupConfig = $element->getGroup(); + $activityPaths = isset($groupConfig['activity_path']) ? $groupConfig['activity_path'] : []; + + if (!is_array($activityPaths)) { + $activityPaths = [$activityPaths]; + } + + $isPaymentEnabled = false; + foreach ($activityPaths as $activityPath) { + $isPaymentEnabled = $isPaymentEnabled + || (bool) (string) $this->backendConfig->getConfigDataValue($activityPath); + } + + return $isPaymentEnabled; + } + + /** + * Return header title part of html for payment solution. + * + * @param \Magento\Framework\Data\Form\Element\AbstractElement $element + * + * @return string + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + * @SuppressWarnings(PHPMD.NPathComplexity) + */ + protected function _getHeaderTitleHtml($element) + { + $html = '
'; + $htmlId = $element->getHtmlId(); + $html .= '
'; + + $html .= /* @noEscape */ $this->secureRenderer->renderEventListenerAsTag( + 'onclick', + "mercadopagoToggleSolution.call(this, '".$htmlId."', '".$this->getUrl('adminhtml/*/state'). + "');event.preventDefault();", + 'button#'.$htmlId.'-head' + ); + $html .= '
'; + $html .= '
'.$element->getLegend().''; + + if ($element->getComment()) { + $html .= ''.$element->getComment().''; + } + $html .= '
'; + $html .= '
'; + + return $html; + } + + /** + * Return header comment part of html for payment solution. + * + * @param \Magento\Framework\Data\Form\Element\AbstractElement $element + * + * @return string + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + */ + protected function _getHeaderCommentHtml($element) + { + return ''; + } + + /** + * Get collapsed state on-load. + * + * @param \Magento\Framework\Data\Form\Element\AbstractElement $element + * + * @return false + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + */ + protected function _isCollapseState($element) + { + return false; + } + + /** + * Return extra Js. + * + * @param \Magento\Framework\Data\Form\Element\AbstractElement $element + * + * @return string + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + */ + protected function _getExtraJs($element) + { + $script = "require(['jquery', 'prototype'], function(jQuery){ + window.mercadopagoToggleSolution = function (id, url) { + var doScroll = false; + Fieldset.toggleCollapse(id, url); + if ($(this).hasClassName(\"open\")) { + \$$(\".with-button button.button\").each(function(anotherButton) { + if (anotherButton != this && $(anotherButton).hasClassName(\"open\")) { + $(anotherButton).click(); + doScroll = true; + } + }.bind(this)); + } + if (doScroll) { + var pos = Element.cumulativeOffset($(this)); + window.scrollTo(pos[0], pos[1] - 45); + } + } + });"; + + return $this->_jsHelper->getScript($script); + } +} diff --git a/Model/Adminhtml/Source/PaymentMethodsOff.php b/Model/Adminhtml/Source/PaymentMethodsOff.php new file mode 100644 index 0000000..8b019b0 --- /dev/null +++ b/Model/Adminhtml/Source/PaymentMethodsOff.php @@ -0,0 +1,102 @@ +request = $request; + $this->mercadopagoConfig = $mercadopagoConfig; + } + + public function toOptionArray(): array + { + $options = []; + + $storeId = $this->request->getParam('store', 0); + + $options[] = [ + 'value' => null, + 'label' => __('Accept all payment methods'), + ]; + + $payments = $this->mercadopagoConfig->getMpPaymentMethods($storeId); + + if ($payments['success'] === true) { + $options = array_merge($options, $this->mountPaymentMethodsOff($payments['response'])); + } + + return $options; + } + + public function mountPaymentMethodsOff(array $paymentMethods): ?array { + + $options = []; + foreach ($paymentMethods as $payment) { + if (in_array($payment['payment_type_id'], self::PAYMENT_TYPE_ID_ALLOWED) && + $payment['status'] === self::PAYMENT_STATUS_ACTIVE) { + + if (empty($payment['payment_places'])) { + $options[] = [ + 'value' => $payment['id'], + 'label' => $payment['name'], + ]; + } else { + foreach ($payment['payment_places'] as $paymentPlace) { + if ($paymentPlace['status'] === self::PAYMENT_STATUS_ACTIVE) { + $options[] = [ + 'value' => $paymentPlace['payment_option_id'], + 'label' => $paymentPlace['name'], + ]; + } + } + } + } + } + + $labels = array(); + foreach ($options as $key => $row) { + $labels[$key] = $row['label']; + + } + array_multisort($labels, SORT_ASC, $options); + return $options; + } + +} diff --git a/Model/Adminhtml/Source/PixExpiration.php b/Model/Adminhtml/Source/PixExpiration.php new file mode 100644 index 0000000..4b0aa8e --- /dev/null +++ b/Model/Adminhtml/Source/PixExpiration.php @@ -0,0 +1,33 @@ + __('15 minutes'), + '30' => __('30 minutes - recommended'), + '60' => __('1 hour'), + '720' => __('12 hours'), + '1440' => __('24 hours'), + ]; + } +} diff --git a/Model/Adminhtml/Source/TypeRedirect.php b/Model/Adminhtml/Source/TypeRedirect.php new file mode 100644 index 0000000..9334c79 --- /dev/null +++ b/Model/Adminhtml/Source/TypeRedirect.php @@ -0,0 +1,30 @@ + __('Modal window in store environment'), + 'redirect' => __('Redirection to Mercado Pago environment'), + ]; + } +} diff --git a/Model/Api/CreateVaultManagement.php b/Model/Api/CreateVaultManagement.php new file mode 100644 index 0000000..bc01ab1 --- /dev/null +++ b/Model/Api/CreateVaultManagement.php @@ -0,0 +1,374 @@ +logger = $logger; + $this->quoteRepository = $quoteRepository; + $this->config = $config; + $this->configBase = $configBase; + $this->httpClientFactory = $httpClientFactory; + $this->json = $json; + } + + /** + * Create Vault Card Id. + * + * @param int $cartId + * @param array $vaultData + * + * @throws CouldNotSaveException + * @throws NoSuchEntityException + * + * @return array + */ + public function createVault( + $cartId, + $vaultData + ) { + $token = []; + $mpCustomerId = null; + + $quote = $this->quoteRepository->getActive($cartId); + if (!$quote->getItemsCount()) { + throw new NoSuchEntityException(__('Cart %1 doesn\'t contain products', $cartId)); + } + + $storeId = $quote->getData(QuoteCartInterface::KEY_STORE_ID); + + $createUser = $this->createUser($storeId, $quote, $vaultData); + $token['tokenize'] = [ + 'error' => __('There was an error when creating the payment. Please try again later.'), + ]; + + if ($createUser[self::RESULT_CODE] === 0) { + unset($token); + $mpUserId = $this->findUser($storeId, $quote); + $mpCustomerId = $mpUserId[self::USER_ID]; + } + + if ($createUser[self::RESULT_CODE] === 1) { + unset($token); + unset($vaultData['identificationNumber']); + $mpCustomerId = $createUser[self::USER_ID]; + } + + $saveCcNumber = $this->saveCcNumber($storeId, $mpCustomerId, $vaultData); + $token['tokenize'] = [ + self::USER_ID => $mpCustomerId, + self::CARD_ID => $saveCcNumber[self::CARD_ID], + ]; + + return $token; + } + + /** + * Create User. + * + * @param int $storeId + * @param CartRepositoryInterface $quote + * @param array $vaultData + * + * @return array + */ + public function createUser($storeId, $quote, $vaultData): array + { + $response[self::RESULT_CODE] = false; + $data = [ + 'email' => $quote->getCustomerEmail(), + 'first_name' => $quote->getCustomerFirstName(), + 'last_name' => $quote->getCustomerLastName(), + 'identification' => [ + 'type' => $vaultData['identificationType'], + 'number' => $vaultData['identificationNumber'], + ], + ]; + + /** @var ZendClient $client */ + $client = $this->httpClientFactory->create(); + + $serializeResquest = $this->json->serialize($data); + + $url = $this->configBase->getApiUrl(); + $clientConfigs = $this->configBase->getClientConfigs(); + $clientHeaders = $this->configBase->getClientHeaders($storeId); + + try { + $client->setUri($url.'/v1/customers'); + $client->setConfig($clientConfigs); + $client->setHeaders($clientHeaders); + $client->setRawData($serializeResquest, 'application/json'); + $client->setMethod(ZendClient::POST); + $responseBody = $client->request()->getBody(); + $data = $this->json->unserialize($responseBody); + $response = array_merge( + [ + self::RESULT_CODE => 0, + ], + $data + ); + if (isset($data['id'])) { + $response = array_merge( + [ + self::RESULT_CODE => 1, + self::USER_ID => $data['id'], + ], + $data + ); + } + $this->logger->debug( + [ + 'storeId' => $storeId, + 'url' => $url.'/v1/customers', + 'request' => $serializeResquest, + 'response' => $responseBody, + ] + ); + } catch (InvalidArgumentException $exc) { + $this->logger->debug( + [ + 'storeId' => $storeId, + 'url' => $url.'/v1/customers/1225574550-7EBfhWjd9vyLqH/cards', + 'request' => $vaultData, + 'error' => $exc->getMessage(), + ] + ); + // phpcs:ignore Magento2.Exceptions.DirectThrow + throw new Exception('Invalid JSON was returned by the gateway'); + } + + return $response; + } + + /** + * Find User. + * + * @param int $storeId + * @param CartRepositoryInterface $quote + * + * @return array + */ + public function findUser($storeId, $quote): array + { + $response[self::RESULT_CODE] = false; + + /** @var ZendClient $client */ + $client = $this->httpClientFactory->create(); + $search = ['email' => $quote->getCustomerEmail()]; + $url = $this->configBase->getApiUrl(); + $clientConfigs = $this->configBase->getClientConfigs(); + $clientHeaders = $this->configBase->getClientHeaders($storeId); + + try { + $client->setUri($url.'/v1/customers/search?email='.$quote->getCustomerEmail()); + $client->setConfig($clientConfigs); + $client->setHeaders($clientHeaders); + $client->setMethod(ZendClient::GET); + $responseBody = $client->request()->getBody(); + $this->logger->debug( + [ + 'storeId' => $storeId, + 'url' => $url.'/v1/customers/search', + 'request' => $search, + 'response' => $responseBody, + ] + ); + $data = $this->json->unserialize($responseBody); + + $response = array_merge( + [ + self::RESULT_CODE => 0, + ], + $data + ); + + if (isset($data['paging']['total'])) { + if (isset($data['results'][0])) { + $response = array_merge( + [ + self::RESULT_CODE => 1, + self::USER_ID => $data['results'][0]['id'], + ], + $data + ); + } + } + $this->logger->debug( + [ + 'storeId' => $storeId, + 'url' => $url.'/v1/customers/search', + 'request' => $search, + 'response' => $responseBody, + ] + ); + } catch (InvalidArgumentException $exc) { + $this->logger->debug( + [ + 'storeId' => $storeId, + 'url' => $url.'/v1/customers/search', + 'request' => $search, + 'error' => $exc->getMessage(), + ] + ); + // phpcs:ignore Magento2.Exceptions.DirectThrow + throw new Exception('Invalid JSON was returned by the gateway'); + } + + return $response; + } + + /** + * Save Cc Number. + * + * @param int $storeId + * @param string $mpCustomerId + * @param array $vaultData + * + * @return array + */ + public function saveCcNumber($storeId, $mpCustomerId, $vaultData): array + { + /** @var ZendClient $client */ + $client = $this->httpClientFactory->create(); + + $serializeResquest = $this->json->serialize($vaultData); + + $url = $this->configBase->getApiUrl(); + $clientConfigs = $this->configBase->getClientConfigs(); + $clientHeaders = $this->configBase->getClientHeaders($storeId); + + try { + $client->setUri($url.'/v1/customers/'.$mpCustomerId.'/cards'); + $client->setConfig($clientConfigs); + $client->setHeaders($clientHeaders); + $client->setRawData($serializeResquest, 'application/json'); + $client->setMethod(ZendClient::POST); + + $responseBody = $client->request()->getBody(); + $data = $this->json->unserialize($responseBody); + $response = array_merge( + [ + self::RESULT_CODE => 0, + ], + $data + ); + if (isset($data['id'])) { + $response = array_merge( + [ + self::RESULT_CODE => 1, + self::CARD_ID => $data['id'], + ], + $data + ); + } + $this->logger->debug( + [ + 'storeId' => $storeId, + 'url' => $url.'/v1/customers/'.$mpCustomerId.'/cards', + 'request' => $serializeResquest, + 'response' => $responseBody, + ] + ); + } catch (InvalidArgumentException $exc) { + $this->logger->debug( + [ + 'storeId' => $storeId, + 'url' => $url.'/v1/customers/'.$mpCustomerId.'/cards', + 'request' => $vaultData, + 'error' => $exc->getMessage(), + ] + ); + // phpcs:ignore Magento2.Exceptions.DirectThrow + throw new Exception('Invalid JSON was returned by the gateway'); + } + + return $response; + } +} diff --git a/Model/Api/Data/FinanceCost.php b/Model/Api/Data/FinanceCost.php new file mode 100644 index 0000000..8682989 --- /dev/null +++ b/Model/Api/Data/FinanceCost.php @@ -0,0 +1,34 @@ +_get(FinanceCostInterface::FINANCE_COST_AMOUNT); + } + + /** + * @inheritdoc + */ + public function setSelectedInstallment($financeCost) + { + return $this->setData(FinanceCostInterface::FINANCE_COST_AMOUNT, $financeCost); + } +} diff --git a/Model/Api/Data/RulesForFinanceCost.php b/Model/Api/Data/RulesForFinanceCost.php new file mode 100644 index 0000000..a8a46b2 --- /dev/null +++ b/Model/Api/Data/RulesForFinanceCost.php @@ -0,0 +1,147 @@ +_get(RulesForFinanceCostInterface::INSTALLMENTS); + } + + /** + * @inheritdoc + */ + public function setInstallments($instalments) + { + return $this->setData(RulesForFinanceCostInterface::INSTALLMENTS, $instalments); + } + + /** + * @inheritdoc + */ + public function getInstallmentRate() + { + return $this->_get(RulesForFinanceCostInterface::INSTALLMENT_RATE); + } + + /** + * @inheritdoc + */ + public function setInstallmentRate($instalmentRate) + { + return $this->setData(RulesForFinanceCostInterface::INSTALLMENT_RATE, $instalmentRate); + } + + /** + * @inheritdoc + */ + public function getDiscountRate() + { + return $this->_get(RulesForFinanceCostInterface::DISCOUNT_RATE); + } + + /** + * @inheritdoc + */ + public function setDiscountRate($discountRate) + { + return $this->setData(RulesForFinanceCostInterface::DISCOUNT_RATE, $discountRate); + } + + /** + * @inheritdoc + */ + public function getReimbursementRate() + { + return $this->_get(RulesForFinanceCostInterface::REIMBURSEMENT_RATE); + } + + /** + * @inheritdoc + */ + public function setReimbursementRate($discountRate) + { + return $this->setData(RulesForFinanceCostInterface::REIMBURSEMENT_RATE, $discountRate); + } + + /** + * @inheritdoc + */ + public function getTotalAmount() + { + return $this->_get(RulesForFinanceCostInterface::TOTAL_AMOUNT); + } + + /** + * @inheritdoc + */ + public function setTotalAmount($discountRate) + { + return $this->setData(RulesForFinanceCostInterface::TOTAL_AMOUNT, $discountRate); + } + + /** + * @inheritdoc + */ + public function getCardAmount() + { + return $this->_get(RulesForFinanceCostInterface::CARD_AMOUNT); + } + + /** + * @inheritdoc + */ + public function setCardAmount($cardAmount) + { + return $this->setData(RulesForFinanceCostInterface::CARD_AMOUNT, $cardAmount); + } + + /** + * @inheritdoc + */ + public function getCardIndex() + { + return $this->_get(RulesForFinanceCostInterface::CARD_INDEX); + } + + /** + * @inheritdoc + */ + public function setCardIndex($cardIndex) + { + return $this->setData(RulesForFinanceCostInterface::CARD_INDEX, $cardIndex); + } + + /** + * @inheritdoc + */ + public function getPaymentMethod() + { + return $this->_get(RulesForFinanceCostInterface::PAYMENT_METHOD); + } + + /** + * @inheritdoc + */ + public function setPaymentMethod($paymentMethod) + { + return $this->setData(RulesForFinanceCostInterface::PAYMENT_METHOD, $paymentMethod); + } +} diff --git a/Model/Api/FinanceCostManagement.php b/Model/Api/FinanceCostManagement.php new file mode 100644 index 0000000..dd88746 --- /dev/null +++ b/Model/Api/FinanceCostManagement.php @@ -0,0 +1,172 @@ +quoteCartRepository = $quoteCartRepository; + $this->quoteTotalRepository = $quoteTotalRepository; + $this->mpConfig = $mpConfig; + } + + /** + * Create Vault Card Id. + * + * @param int $cartId + * @param FinanceCostInterface $userSelect + * @param RulesForFinanceCostInterface $rules + * + * @throws CouldNotSaveException + * @throws NoSuchEntityException + * + * @return array + */ + public function saveFinanceCost( + $cartId, + FinanceCostInterface $userSelect, + RulesForFinanceCostInterface $rules + ) { + + if ($rules->getPaymentMethod() === 'mercadopago_adbpayment_twocc'){ + return $this->saveFinanceCostTwoCc($cartId, $userSelect, $rules); + } + + $calculate = []; + $quoteCart = $this->quoteCartRepository->getActive($cartId); + + if (!$quoteCart->getItemsCount()) { + throw new NoSuchEntityException(__('Cart %1 doesn\'t contain products', $cartId)); + } + + $quoteTotal = $this->quoteTotalRepository->get($cartId); + $storeId = $quoteCart->getData(CartInterface::KEY_STORE_ID); + + $grandTotal = $this->mpConfig->formatPrice($quoteTotal->getBaseGrandTotal(), $storeId); + $grandTotal -= $quoteCart->getData(FinanceCostInterface::FINANCE_COST_AMOUNT); + $installment = $userSelect->getSelectedInstallment(); + $totalAmount = $this->mpConfig->formatPrice($rules->getTotalAmount(), $storeId); + $financeCost = $totalAmount - $grandTotal; + + if ($installment <= 1) { + $financeCost = null; + } + + try { + $quoteCart->setData(FinanceCostInterface::FINANCE_COST_AMOUNT, $financeCost); + $quoteCart->setData(FinanceCostInterface::BASE_FINANCE_COST_AMOUNT, $financeCost); + $this->quoteCartRepository->save($quoteCart); + } catch (Exception $e) { + throw new CouldNotSaveException(__('It was not possible to save on the installment cost amount')); + } + + $calculate = [ + 'finance_cost' => [ + 'installment' => $installment, + 'finance_cost' => $financeCost, + 'grand_total' => $grandTotal, + ], + ]; + + return $calculate; + } + + public function saveFinanceCostTwoCc( + $cartId, + FinanceCostInterface $userSelect, + RulesForFinanceCostInterface $rules + ) { + + if(!$userSelect->getSelectedInstallment()){ + return; + } + + $calculate = []; + $quoteCart = $this->quoteCartRepository->getActive($cartId); + + if (!$quoteCart->getItemsCount()) { + throw new NoSuchEntityException(__('Cart %1 doesn\'t contain products', $cartId)); + } + + $quoteTotal = $this->quoteTotalRepository->get($cartId); + $storeId = $quoteCart->getData(CartInterface::KEY_STORE_ID); + + $grandTotal = $this->mpConfig->formatPrice($quoteTotal->getBaseGrandTotal(), $storeId); + $cardAmount = $this->mpConfig->formatPrice($rules->getCardAmount(), $storeId); + $installment = $userSelect->getSelectedInstallment(); + $totalAmount = $this->mpConfig->formatPrice($rules->getTotalAmount(), $storeId); + $financeCost = $totalAmount - $cardAmount; + + if($rules->getCardIndex() !== 0){ + $financeCost = $totalAmount - $cardAmount + $quoteCart->getData(FinanceCostInterface::FIRST_CARD_AMOUNT); + } + + try { + $quoteCart->setData( + $rules->getCardIndex() === 0 ? FinanceCostInterface::FIRST_CARD_AMOUNT : FinanceCostInterface::SECOND_CARD_AMOUNT, $financeCost + ); + $quoteCart->setData(FinanceCostInterface::FINANCE_COST_AMOUNT, $financeCost); + $quoteCart->setData(FinanceCostInterface::BASE_FINANCE_COST_AMOUNT, $financeCost); + $this->quoteCartRepository->save($quoteCart); + } catch (Exception $e) { + throw new CouldNotSaveException(__('It was not possible to save on the installment cost amount')); + } + + $calculate = [ + 'finance_cost' => [ + 'installment' => $installment, + 'finance_cost' => $financeCost, + 'grand_total' => $grandTotal, + ], + ]; + + return $calculate; + } +} diff --git a/Model/Api/GuestFinanceCostManagement.php b/Model/Api/GuestFinanceCostManagement.php new file mode 100644 index 0000000..bbe1419 --- /dev/null +++ b/Model/Api/GuestFinanceCostManagement.php @@ -0,0 +1,63 @@ +quoteIdMaskFactory = $quoteIdMaskFactory; + $this->financeCostInterface = $financeCostInterface; + } + + /** + * @inheritDoc + */ + public function saveFinanceCost( + $cartId, + FinanceCostInterface $userSelect, + RulesForFinanceCostInterface $rules + ) { + /** @var $quoteIdMask \Magento\Quote\Model\QuoteIdMask */ + $quoteIdMask = $this->quoteIdMaskFactory->create()->load($cartId, 'masked_id'); + + return $this->financeCostInterface->saveFinanceCost( + $quoteIdMask->getQuoteId(), + $userSelect, + $rules + ); + } +} diff --git a/Model/Api/PayInfoManagement.php b/Model/Api/PayInfoManagement.php new file mode 100644 index 0000000..d8bc67c --- /dev/null +++ b/Model/Api/PayInfoManagement.php @@ -0,0 +1,58 @@ +orderRepository = $orderRepository; + } + + /** + * Payment Information. + * + * @param int $orderId + * + * @return array + */ + public function paymentInformation( + $orderId + ) { + $info = []; + $order = $this->orderRepository->get($orderId); + $payment = $order->getPayment(); + + if ($payment->getMethod() === 'mercadopago_adbpayment_checkout_pro') { + $info['data'] = [ + 'id' => $order->getPayment()->getAdditionalInformation('id'), + 'init_point' => $order->getPayment()->getAdditionalInformation('init_point'), + ]; + } + + return $info; + } +} diff --git a/Model/Checks/SpecificationPlugin.php b/Model/Checks/SpecificationPlugin.php new file mode 100644 index 0000000..50455d3 --- /dev/null +++ b/Model/Checks/SpecificationPlugin.php @@ -0,0 +1,71 @@ +config = $config; + } + + /** + * Override check for Mp Site Id Available. + * + * @param SpecificationInterface $specification + * @param bool $result + * @param MethodInterface $paymentMethod + * @param Quote $quote + * + * @return bool + * + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + */ + public function afterIsApplicable( + SpecificationInterface $specification, + $result, + MethodInterface $paymentMethod, + Quote $quote + ) { + if (!$result) { + return false; + } + + $storeId = $quote->getStoreId(); + $mpSiteId = $this->config->getMpSiteId($storeId); + $restrict = $this->config->getRestrictPaymentOnMpSiteId($storeId); + + foreach ($restrict as $methodName => $siteId) { + if ($methodName === $paymentMethod->getCode()) { + if (!in_array($mpSiteId, $siteId)) { + return false; + } + } + } + + return true; + } +} diff --git a/Model/Config/Backend/Color.php b/Model/Config/Backend/Color.php new file mode 100644 index 0000000..7bd2396 --- /dev/null +++ b/Model/Config/Backend/Color.php @@ -0,0 +1,18 @@ +getValue(); + + if ($value === null || !preg_match("/^#[0-9A-Fa-f]{6}$/", $value)) { + throw new LocalizedException(__('Please fill a valid color in the Checkout Pro configuration')); + } + + return $this; + } +} diff --git a/Model/Console/Command/AbstractModel.php b/Model/Console/Command/AbstractModel.php new file mode 100644 index 0000000..abeab3a --- /dev/null +++ b/Model/Console/Command/AbstractModel.php @@ -0,0 +1,77 @@ +logger = $logger; + } + + /** + * Output. + * + * @param OutputInterface $output + * + * @return void + */ + public function setOutput(OutputInterface $output) + { + $this->output = $output; + } + + /** + * Console Write. + * + * @param string $text + * + * @return void + */ + protected function write(string $text) + { + if ($this->output instanceof OutputInterface) { + $this->output->write($text); + } + } + + /** + * Console WriteLn. + * + * @param string $text + * + * @return void + */ + protected function writeln($text) + { + if ($this->output instanceof OutputInterface) { + $this->output->writeln($text); + } + } +} diff --git a/Model/Console/Command/Adminstrative/FetchMerchant.php b/Model/Console/Command/Adminstrative/FetchMerchant.php new file mode 100644 index 0000000..fa21ba4 --- /dev/null +++ b/Model/Console/Command/Adminstrative/FetchMerchant.php @@ -0,0 +1,510 @@ +cacheTypeList = $cacheTypeList; + $this->cacheFrontendPool = $cacheFrontendPool; + $this->state = $state; + $this->mercadopagoConfig = $mercadopagoConfig; + $this->config = $config; + $this->storeManager = $storeManager; + $this->json = $json; + $this->httpClientFactory = $httpClientFactory; + $this->messageManager = $messageManager; + } + + /** + * Command Fetch. + * + * @param int|null $storeId + * + * @return void + */ + public function fetch($storeId = null) + { + $storeIds = $storeId ?: null; + $this->writeln('Init Fetch Merchant'); + + if (!$storeIds) { + $allStores = $this->storeManager->getStores(); + $defaultId = (int) $this->storeManager->getDefaultStoreView()->getId(); + + foreach ($allStores as $stores) { + $storeId = (int) $stores->getId(); + $this->storeManager->setCurrentStore($stores); + $webSiteId = (int) $stores->getWebsiteId(); + $storeIdIsDefault = ($defaultId === $storeId) ? true : false; + + $this->writeln( + __( + 'Default Store Id %1 - Set Data for store id %2 Web Site Id %3', + $storeIdIsDefault, + $storeId, + $webSiteId + ) + ); + $this->fetchInfo($storeIdIsDefault, $storeId, $webSiteId); + } + } + $this->writeln(__('Finished')); + } + + /** + * Create Data Merchant. + * + * @param bool $storeIdIsDefault + * @param int $storeId + * @param int $webSiteId + * + * @return bool|void + */ + public function fetchInfo( + bool $storeIdIsDefault, + int $storeId = 0, + int $webSiteId = 0 + ) { + $validateToken = $this->hasValidationStatusToken($storeId, $storeIdIsDefault, $webSiteId); + if ($validateToken) { + $this->clearData($storeIdIsDefault, $storeId, $webSiteId); + $this->cacheTypeList->cleanType('config'); + return false; + } + + $this->hasUserData($storeId, $storeIdIsDefault, $webSiteId); + } + + /** + * Has Validation Status Token. + * + * @param int $storeId + * @param bool $storeIdIsDefault + * @param int $webSiteId + * + * @return bool + */ + public function hasValidationStatusToken( + $storeId, + $storeIdIsDefault, + $webSiteId + ) { + $hasError = false; + + $token = $this->getAccessToken($storeId); + $publicKey = $this->getPublicKey($storeId); + $environment = $this->mercadopagoConfig->getEnvironmentMode($storeId); + + $messageError = $this->verifyCredentials($token, $publicKey); + + if(!isset($messageError)){ + if ($environment === self::ENVIRONMENT_PRODUCTION) { + $messageError = $this->verifyProductionMode($token, $publicKey); + } + + if ($environment === self::ENVIRONMENT_SANDBOX) { + $messageError = $this->verifySandBoxMode($token, $publicKey); + } + } + + if(isset($messageError)){ + $this->messageManager->addWarning(__($messageError)); + $hasError = true; + } + + return $hasError; + } + + public function verifyCredentials($token, $publicKey) + { + if (isset($token['error']) || isset($publicKey['error'])) { + return self::INVALID_CREDENTIAL; + } + + if (!isset($token['success']) || !isset($publicKey['success'])) { + return self::INVALID_CREDENTIAL; + } + + if (!$token['response']['homologated']) { + return self::INVALID_CREDENTIAL; + } + + if ($token['response']['client_id'] !== $publicKey['response']['client_id']) { + return self::INVALID_CREDENTIAL; + } + } + + public function verifyProductionMode($token, $publicKey) + { + if($token['response']['is_test']) { + return self::INVALID_PRODUCTION_MODE; + } + + if($publicKey['response']['is_test']) { + return self::INVALID_PRODUCTION_MODE; + } + } + + public function verifySandBoxMode($token, $publicKey) + { + if(!$token['response']['is_test']) { + return self::INVALID_SANDBOX_MODE; + } + + if(!$publicKey['response']['is_test']) { + return self::INVALID_SANDBOX_MODE; + } + } + + /** + * Get Validate Public Key. + * + * @param int $storeId + * + * @return array + */ + public function getPublicKey($storeId): array + { + $publicKey = $this->mercadopagoConfig->getMerchantGatewayClientId($storeId); + $uri = $this->mercadopagoConfig->getApiUrl(); + $clientConfigs = $this->mercadopagoConfig->getClientConfigs(); + + $client = $this->httpClientFactory->create(); + $client->setMethod(ZendClient::GET); + $client->setConfig($clientConfigs); + $client->setUri($uri.'/plugins-credentials-wrapper/credentials?public_key='.$publicKey); + + try { + $result = $client->request()->getBody(); + $response = $this->json->unserialize($result); + + $this->logger->debug([ + 'plugins-credentials-wrapper/credential?public_key=' => $result, + ]); + + return [ + 'success' => true, + 'response' => $response, + ]; + } catch (Exception $exc) { + $this->logger->debug(['error' => $exc->getMessage()]); + + return ['success' => false, 'error' => $exc->getMessage()]; + } + } + + public function getAccessToken($storeId): array + { + $uri = $this->mercadopagoConfig->getApiUrl(); + $clientConfigs = $this->mercadopagoConfig->getClientConfigs(); + $clientHeaders = $this->mercadopagoConfig->getClientHeaders($storeId); + + $client = $this->httpClientFactory->create(); + $client->setMethod(ZendClient::GET); + $client->setConfig($clientConfigs); + $client->setHeaders($clientHeaders); + $client->setUri($uri.'/plugins-credentials-wrapper/credentials'); + + try { + $result = $client->request()->getBody(); + $response = $this->json->unserialize($result); + + $this->logger->debug(['plugins-credentials-wrapper/credential' => $result]); + + return [ + 'success' => true, + 'response' => $response, + ]; + } catch (Exception $exc) { + $this->logger->debug(['error' => $exc->getMessage()]); + + return ['success' => false, 'error' => $exc->getMessage()]; + } + } + + /** + * Has User Data. + * + * @param int $storeId + * @param bool $storeIdIsDefault + * @param int $webSiteId + * + * @return void + */ + public function hasUserData( + $storeId, + $storeIdIsDefault, + $webSiteId + ) { + $usersMe = $this->getUsersMe($storeId); + + if ($usersMe['success']) { + $response = $usersMe['response']; + $registreData = [ + 'id' => $response['id'], + 'site_id' => $response['site_id'], + 'email' => $response['email'], + 'name' => $response['first_name'].' '.$response['last_name'], + ]; + + $this->saveData($registreData, $storeIdIsDefault, $storeId, $webSiteId); + + $this->cacheTypeList->cleanType('config'); + } + } + + /** + * Get Users Me. + * + * @param int $storeId + * + * @return array + */ + public function getUsersMe($storeId): array + { + $uri = $this->mercadopagoConfig->getApiUrl(); + $clientConfigs = $this->mercadopagoConfig->getClientConfigs(); + $clientHeaders = $this->mercadopagoConfig->getClientHeaders($storeId); + + $client = $this->httpClientFactory->create(); + $client->setUri($uri.'/users/me'); + $client->setConfig($clientConfigs); + $client->setHeaders($clientHeaders); + $client->setMethod(ZendClient::GET); + + try { + $result = $client->request()->getBody(); + $response = $this->json->unserialize($result); + + $this->logger->debug(['fetch_result' => $result]); + + return [ + 'success' => isset($response['message']) ? false : true, + 'response' => $response, + ]; + } catch (Exception $exc) { + $this->logger->debug(['error' => $exc->getMessage()]); + + return ['success' => false, 'error' => $exc->getMessage()]; + } + } + + /** + * Save Data. + * + * @param array $data + * @param bool $storeIdIsDefault + * @param int $storeId + * @param int $webSiteId + * + * @return array + */ + public function saveData( + array $data, + bool $storeIdIsDefault, + int $storeId = 0, + int $webSiteId = 0 + ): array { + $environment = $this->mercadopagoConfig->getEnvironmentMode($storeId); + $scope = ScopeInterface::SCOPE_WEBSITES; + + foreach ($data as $field => $value) { + $pathPattern = 'payment/mercadopago_adbpayment/%s_%s'; + $pathConfigId = sprintf($pathPattern, $field, $environment); + + if ($field === 'site_id') { + $pathPattern = 'payment/mercadopago_adbpayment/%s'; + $pathConfigId = sprintf($pathPattern, $field); + } + + if ($storeIdIsDefault) { + $this->config->saveConfig( + $pathConfigId, + $value, + 'default', + 0 + ); + } + + $this->config->saveConfig( + $pathConfigId, + $value, + $scope, + $webSiteId + ); + } + + return ['success' => true]; + } + + /** + * Clear Data. + * + * @param bool $storeIdIsDefault + * @param int $storeId + * @param int $webSiteId + * + * @return array + * @SuppressWarnings(PHPMD.UnusedLocalVariable) + */ + public function clearData( + bool $storeIdIsDefault, + int $storeId = 0, + int $webSiteId = 0 + ): array { + $environment = $this->mercadopagoConfig->getEnvironmentMode($storeId); + $scope = ScopeInterface::SCOPE_WEBSITES; + + $data = ['client_id' => null, 'client_secret' => null]; + + foreach ($data as $field => $value) { + $pathPattern = 'payment/mercadopago_adbpayment/%s_%s'; + $pathConfigId = sprintf($pathPattern, $field, $environment); + + try { + if ($storeIdIsDefault) { + $this->config->deleteConfig( + $pathConfigId, + 'default', + 0 + ); + } + + $this->config->deleteConfig( + $pathConfigId, + $scope, + $webSiteId + ); + } catch (Exception $exc) { + return ['success' => false, 'error' => $exc->getMessage()]; + } + } + + return ['success' => true]; + } +} diff --git a/Model/Console/Command/Adminstrative/PaymentExpiration.php b/Model/Console/Command/Adminstrative/PaymentExpiration.php new file mode 100644 index 0000000..c04bc09 --- /dev/null +++ b/Model/Console/Command/Adminstrative/PaymentExpiration.php @@ -0,0 +1,160 @@ +state = $state; + $this->mercadopagoConfig = $mercadopagoConfig; + $this->json = $json; + $this->httpClientFactory = $httpClientFactory; + $this->date = $date; + } + + /** + * Command Fetch. + * + * @param string $paymentId + * @param int|null $storeId + * + * @return void + */ + public function expire($paymentId, $storeId = 0) + { + $this->writeln('Init Expire Payment'); + $expire = $this->setExpiration($paymentId, $storeId); + + if ($expire === true) { + $this->writeln('The payment has expired'); + } + + if ($expire === false) { + $this->writeln('The payment has not expired'); + } + + $this->writeln(__('Finished')); + } + + /** + * Get Validate Credentials. + * + * @param string $paymentId + * @param int|null $storeId + * + * @return bool + */ + public function setExpiration($paymentId, $storeId): bool + { + $uri = $this->mercadopagoConfig->getApiUrl(); + $clientConfigs = $this->mercadopagoConfig->getClientConfigs(); + $clientHeaders = $this->mercadopagoConfig->getClientHeaders($storeId); + $uri = $uri.'/checkout/preferences/'.$paymentId; + + $sendData = [ + 'expires' => true, + 'expiration_date_to' => $this->date->gmtDate('Y-m-d'), + ]; + + $client = $this->httpClientFactory->create(); + $client->setUri($uri); + $client->setConfig($clientConfigs); + $client->setHeaders($clientHeaders); + $client->setRawData($this->json->serialize($sendData), 'application/json'); + $client->setMethod(ZendClient::PUT); + + try { + $result = $client->request()->getBody(); + $response = $this->json->unserialize($result); + + $this->logger->debug( + [ + 'url' => $uri, + 'result' => $this->json->serialize($response), + ] + ); + + return true; + } catch (Exception $exc) { + $this->logger->debug(['error' => $exc->getMessage()]); + } + + return false; + } +} diff --git a/Model/Console/Command/Notification/CheckoutProAddChildPayment.php b/Model/Console/Command/Notification/CheckoutProAddChildPayment.php new file mode 100644 index 0000000..19b405f --- /dev/null +++ b/Model/Console/Command/Notification/CheckoutProAddChildPayment.php @@ -0,0 +1,107 @@ +order = $order; + } + + /** + * Command Add. + * + * @param int $orderId + * @param string $childTransaction + * + * @return void + */ + public function add($orderId, $childTransaction) + { + $this->writeln('Init Fetch Checkout Pro Payments'); + + /** @var Order $order */ + $order = $this->order->load($orderId); + + $payment = $order->getPayment(); + + $preferenceId = $order->getExtOrderId(); + + try { + $payment->setTransactionId($childTransaction); + $payment->setParentTransactionId($preferenceId); + $payment->setIsTransactionClosed(false); + $payment->setShouldCloseParentTransaction(true); + $payment->addTransaction(\Magento\Sales\Model\Order\Payment\Transaction::TYPE_AUTH); + $order->save(); + $payment->update(true); + } catch (Exception $exc) { + $this->writeln(''.$exc->getMessage().''); + } + + if ($order->getState() === Order::STATE_PAYMENT_REVIEW) { + if( + $order->getStatus() === Order::STATE_CLOSED + || $order->getStatus() === Order::STATE_PROCESSING + || $order->getStatus() === Order::STATE_COMPLETE + ) { + $order = $payment->getOrder(); + $order->setState($order->getStatus()); + } else { + $order = $payment->getOrder(); + $order->setState(Order::STATE_NEW); + $order->setStatus('pending'); + } + } + + $this->writeln( + ''. + __( + 'Order %1 - Increment Id %2 - state %3', + $orderId, + $order->getIncrementId(), + $order->getState(), + ) + .'' + ); + + $order->save(); + + $this->writeln(__('Finished')); + } +} diff --git a/Model/Console/Command/Notification/FetchStatus.php b/Model/Console/Command/Notification/FetchStatus.php new file mode 100644 index 0000000..cb6659c --- /dev/null +++ b/Model/Console/Command/Notification/FetchStatus.php @@ -0,0 +1,103 @@ +order = $order; + } + + /** + * Command Fetch. + * + * @param int $orderId + * @param string $notificationId + * + * @return Order $order + */ + public function fetch($orderId, $notificationId) + { + $this->writeln('Init Fetch Status'); + /** @var Order $order */ + $order = $this->order->load($orderId); + + $payment = $order->getPayment(); + + $additionalData = (array('notificationId' => $notificationId)); + $additionalData = (object)$additionalData; + + $payment->setAdditionalData(json_encode($additionalData)); + + try { + $payment->update(true); + } catch (Exception $exc) { + $this->writeln(''.$exc->getMessage().''); + } + if ($order->getState() === Order::STATE_PAYMENT_REVIEW) { + if( + $order->getStatus() === Order::STATE_CLOSED + || $order->getStatus() === Order::STATE_PROCESSING + || $order->getStatus() === Order::STATE_COMPLETE + ) { + $order = $payment->getOrder(); + $order->setState($order->getStatus()); + } else { + $order = $payment->getOrder(); + $order->setState(Order::STATE_NEW); + $order->setStatus('pending'); + } + } + + $this->writeln( + ''. + __( + 'Order %1 - Increment Id %2 - state %3', + $orderId, + $order->getIncrementId(), + $order->getState(), + ) + .'' + ); + + $order->save(); + + $this->writeln(__('Finished')); + + return $order; + } +} diff --git a/Model/MPApi/Notification.php b/Model/MPApi/Notification.php new file mode 100644 index 0000000..260945f --- /dev/null +++ b/Model/MPApi/Notification.php @@ -0,0 +1,64 @@ +config = $config; + $this->httpClientFactory = $httpClientFactory; + $this->json = $json; + $this->logger = $logger; + } + + public function get(string $notificationId, string $storeId) + { + $client = $this->httpClientFactory->create(); + + $url = $this->config->getApiUrl(); + + $client->setUri($url.'/v1/asgard/notification/'.$notificationId); + $client->setConfig($this->config->getClientConfigs()); + $client->setHeaders($this->config->getClientHeaders($storeId)); + $client->setMethod(ZendClient::GET); + + $responseBody = $client->request()->getBody(); + $data = $this->json->unserialize($responseBody); + + $this->logger->debug( + [ + 'url' => $url.'/v1/asgard/notification/'.$notificationId, + 'method' => ZendClient::GET, + 'response' => $data, + ] + ); + + if ($client->request()->getStatus() > 299) { + throw new \Exception("Invalid request to asgard notification: " . $responseBody); + } + + return $data; + } +} diff --git a/Model/MPApi/PaymentGet.php b/Model/MPApi/PaymentGet.php new file mode 100644 index 0000000..e8e4ed8 --- /dev/null +++ b/Model/MPApi/PaymentGet.php @@ -0,0 +1,63 @@ +config = $config; + $this->httpClientFactory = $httpClientFactory; + $this->json = $json; + $this->logger = $logger; + } + + public function get(string $paymentId, string $storeId) + { + $client = $this->httpClientFactory->create(); + + $url = $this->config->getApiUrl(); + + $client->setUri($url.'/v1/payments/'.$paymentId); + $client->setConfig($this->config->getClientConfigs()); + $client->setHeaders($this->config->getClientHeaders($storeId)); + $client->setMethod(ZendClient::GET); + + $responseBody = $client->request()->getBody(); + + $this->logger->debug([ + 'url' => $url.'/v1/payments/'.$paymentId, + 'method' => ZendClient::GET, + 'response' => $responseBody + ]); + + if ($client->request()->getStatus() > 299) { + throw new \Exception("Invalid request to mp payments: " . $responseBody); + } + + $data = $this->json->unserialize($responseBody); + + return $data; + } +} diff --git a/Model/Order/Total/Creditmemo/FinanceCost.php b/Model/Order/Total/Creditmemo/FinanceCost.php new file mode 100644 index 0000000..10210ac --- /dev/null +++ b/Model/Order/Total/Creditmemo/FinanceCost.php @@ -0,0 +1,36 @@ +getOrder(); + + $financeCost = $order->getFinanceCostAmount(); + $baseFinanceCost = $order->getBaseFinanceCostAmount(); + + $creditmemo->setFinanceCostAmount($financeCost); + $creditmemo->setBaseFinanceCostAmount($baseFinanceCost); + } +} diff --git a/Model/Order/Total/Invoice/FinanceCost.php b/Model/Order/Total/Invoice/FinanceCost.php new file mode 100644 index 0000000..84bb8ac --- /dev/null +++ b/Model/Order/Total/Invoice/FinanceCost.php @@ -0,0 +1,36 @@ +getOrder(); + + $financeCost = $order->getFinanceCostAmount(); + $baseFinanceCost = $order->getBaseFinanceCostAmount(); + + $invoice->setFinanceCostAmount($financeCost); + $invoice->setBaseFinanceCostAmount($baseFinanceCost); + } +} diff --git a/Model/Quote/Address/Total/FinanceCost.php b/Model/Quote/Address/Total/FinanceCost.php new file mode 100644 index 0000000..52caa12 --- /dev/null +++ b/Model/Quote/Address/Total/FinanceCost.php @@ -0,0 +1,164 @@ +quoteValidator = $quoteValidator; + $this->checkoutSession = $checkoutSession; + $this->payment = $payment; + } + + /** + * Collect totals process. + * + * @param Quote $quote + * @param ShippingAssignmentInterface $shippingAssignment + * @param Total $total + * + * @return $this + */ + public function collect( + Quote $quote, + ShippingAssignmentInterface $shippingAssignment, + Total $total + ) { + parent::collect($quote, $shippingAssignment, $total); + + if (!count($shippingAssignment->getItems())) { + return $this; + } + + $financeCost = $quote->getFinanceCostAmount(); + $baseFinanceCost = $quote->getBaseFinanceCostAmount(); + + $total->setFinanceCostAmount($financeCost); + $total->setBaseFinanceCostAmount($baseFinanceCost); + + $total->setTotalAmount('finance_cost_amount', $financeCost); + $total->setBaseTotalAmount('base_finance_cost_amount', $baseFinanceCost); + + $total->setGrandTotal((float) $total->getGrandTotal()); + $total->setBaseGrandTotal((float) $total->getBaseGrandTotal()); + + return $this; + } + + /** + * Clear Values. + * + * @param Total $total + */ + protected function clearValues(Total $total) + { + $total->setTotalAmount('subtotal', 0); + $total->setBaseTotalAmount('subtotal', 0); + $total->setTotalAmount('tax', 0); + $total->setBaseTotalAmount('tax', 0); + $total->setTotalAmount('discount_tax_compensation', 0); + $total->setBaseTotalAmount('discount_tax_compensation', 0); + $total->setTotalAmount('shipping_discount_tax_compensation', 0); + $total->setBaseTotalAmount('shipping_discount_tax_compensation', 0); + $total->setSubtotalInclTax(0); + $total->setBaseSubtotalInclTax(0); + } + + /** + * Assign subtotal amount and label to address object. + * + * @param Quote $quote + * @param Total $total + * + * @return array + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + */ + public function fetch( + Quote $quote, + Total $total + ) { + $result = null; + $financeCost = $quote->getFinanceCostAmount(); + $labelByFinanceCost = $this->getLabelByFinanceCost($financeCost); + + if ($financeCost) { + $result = [ + 'code' => $this->getCode(), + 'title' => $labelByFinanceCost, + 'value' => $financeCost, + ]; + } + + return $result; + } + + /** + * Get Subtotal label. + * + * @return Phrase + */ + public function getLabel() + { + return __('Finance Cost'); + } + + /** + * Get Subtotal label by Finance Cost. + * + * @param float $financeCost + * + * @return Phrase + */ + public function getLabelByFinanceCost($financeCost) + { + if ($financeCost >= 0) { + return __('Finance Cost'); + } + + return __('Discount for payment at sight'); + } +} diff --git a/Model/Ui/ConfigProviderBase.php b/Model/Ui/ConfigProviderBase.php new file mode 100644 index 0000000..d226c70 --- /dev/null +++ b/Model/Ui/ConfigProviderBase.php @@ -0,0 +1,88 @@ +resolver = $resolver; + $this->config = $config; + $this->cart = $cart; + } + + /** + * Retrieve assoc array of checkout configuration. + * + * @return array + */ + public function getConfig() + { + $storeId = $this->cart->getStoreId(); + + return [ + 'payment' => [ + Config::METHOD => [ + 'isActive' => false, + 'public_key' => $this->config->getMerchantGatewayClientId($storeId), + 'locale' => $this->getLocale(), + 'mp_site_id' => $this->config->getMpSiteId($storeId), + ], + ], + ]; + } + + /** + * Formated Locale. + * + * @return string + */ + public function getLocale() + { + $currentStore = $this->resolver->getLocale(); + + return str_replace('_', '-', $currentStore); + } +} diff --git a/Model/Ui/ConfigProviderCc.php b/Model/Ui/ConfigProviderCc.php new file mode 100644 index 0000000..7499730 --- /dev/null +++ b/Model/Ui/ConfigProviderCc.php @@ -0,0 +1,163 @@ +configCc = $configCc; + $this->cart = $cart; + $this->ccConfig = $ccConfig; + $this->assetSource = $assetSource; + } + + /** + * Retrieve assoc array of checkout configuration. + * + * @return array + */ + public function getConfig() + { + $storeId = $this->cart->getStoreId(); + $isActive = $this->configCc->isActive($storeId); + + if (!$isActive) { + return []; + } + + return [ + 'payment' => [ + ConfigCc::METHOD => [ + 'isActive' => $isActive, + 'title' => $this->configCc->getTitle($storeId), + 'useCvv' => $this->configCc->isCvvEnabled($storeId), + 'ccTypesMapper' => $this->configCc->getCcTypesMapper($storeId), + 'logo' => $this->getLogo(), + 'icons' => $this->getIcons(), + 'document_identification_capture' => $this->configCc->hasUseDocumentIdentificationCapture($storeId), + 'unsupported_pre_auth' => $this->configCc->getUnsupportedPreAuth($storeId), + 'ccVaultCode' => self::VAULT_CODE, + 'fingerprint' => $this->configCc->getFingerPrintLink($storeId) + ], + ], + ]; + } + + /** + * Get icons for available payment methods. + * + * @return array + */ + public function getIcons() + { + if (!empty($this->icons)) { + return $this->icons; + } + $storeId = $this->cart->getStoreId(); + $ccTypes = $this->configCc->getCcAvailableTypes($storeId); + $types = explode(',', $ccTypes); + foreach ($types as $code => $label) { + if (!array_key_exists($code, $this->icons)) { + $asset = $this->ccConfig->createAsset( + 'MercadoPago_AdbPayment::images/cc/'.$label.'.svg' + ); + $placeholder = $this->assetSource->findSource($asset); + if ($placeholder) { + $this->icons[$label] = [ + 'url' => $asset->getUrl(), + 'code' => $label, + 'width' => '38px', + 'height' => '38px', + 'title' => $label, + ]; + } + } + } + + return $this->icons; + } + + /** + * Get icons for available payment methods. + * + * @return array + */ + public function getLogo() + { + $logo = []; + $asset = $this->ccConfig->createAsset('MercadoPago_AdbPayment::images/cc/logo.svg'); + $placeholder = $this->assetSource->findSource($asset); + if ($placeholder) { + list($width, $height) = getimagesizefromstring($asset->getSourceFile()); + $logo = [ + 'url' => $asset->getUrl(), + 'width' => $width, + 'height' => $height, + 'title' => __('Card - MercadoPago'), + ]; + } + + return $logo; + } +} diff --git a/Model/Ui/ConfigProviderCheckoutPro.php b/Model/Ui/ConfigProviderCheckoutPro.php new file mode 100644 index 0000000..31ea734 --- /dev/null +++ b/Model/Ui/ConfigProviderCheckoutPro.php @@ -0,0 +1,143 @@ +config = $config; + $this->cart = $cart; + $this->escaper = $escaper; + $this->ccConfig = $ccConfig; + $this->assetSource = $assetSource; + } + + /** + * Retrieve assoc array of checkout configuration. + * + * @return array + */ + public function getConfig() + { + $storeId = $this->cart->getStoreId(); + $isActive = $this->config->isActive($storeId); + + if (!$isActive) { + return []; + } + + return [ + 'payment' => [ + ConfigCheckoutPro::METHOD => [ + 'isActive' => $isActive, + 'title' => $this->config->getTitle($storeId), + 'expiration' => $this->config->getExpirationFormat($storeId), + 'type_redirect' => $this->config->getTypeRedirect($storeId), + 'logo' => $this->getLogo(), + 'instruction_checkout' => nl2br($this->getDescriptions($storeId)), + 'theme' => [ + 'headerColor' => $this->config->getStylesHeaderColor($storeId), + 'elementsColor' => $this->config->getStylesElementsColor($storeId), + ], + 'fingerprint' => $this->config->getFingerPrintLink($storeId), + ], + ], + ]; + } + + /** + * Get icons for available payment methods. + * + * @return array + */ + public function getLogo() + { + $logo = []; + $asset = $this->ccConfig->createAsset('MercadoPago_AdbPayment::images/checkout-pro/logo.svg'); + $placeholder = $this->assetSource->findSource($asset); + if ($placeholder) { + list($width, $height) = getimagesizefromstring($asset->getSourceFile()); + $logo = [ + 'url' => $asset->getUrl(), + 'width' => $width, + 'height' => $height, + 'title' => __('Checkout Pro - MercadoPago'), + ]; + } + + return $logo; + } + + /** + * Get Descriptions. + * + * @param int|null $storeId + * + * @return Phrase + */ + public function getDescriptions($storeId) + { + $text = $this->config->getInstructionCheckout($storeId); + + return __($text); + } +} diff --git a/Model/Ui/ConfigProviderPaymentMethodsOff.php b/Model/Ui/ConfigProviderPaymentMethodsOff.php new file mode 100644 index 0000000..36f9881 --- /dev/null +++ b/Model/Ui/ConfigProviderPaymentMethodsOff.php @@ -0,0 +1,220 @@ +config = $config; + $this->cart = $cart; + $this->escaper = $escaper; + $this->mercadopagoConfig = $mercadopagoConfig; + $this->assetRepo = $assetRepo; + } + + /** + * Retrieve assoc array of checkout configuration. + * + * @return array + */ + public function getConfig() + { + $storeId = $this->cart->getStoreId(); + $isActive = $this->config->isActive($storeId); + + if (!$isActive) { + return []; + } + + return [ + 'payment' => [ + ConfigPaymentMethodsOff::METHOD => [ + 'isActive' => $isActive, + 'title' => $this->config->getTitle($storeId), + 'name_capture' => $this->config->hasUseNameCapture($storeId), + 'document_identification_capture' => $this->config->hasUseDocumentIdentificationCapture($storeId), + 'expiration' => $this->config->getExpirationFormat($storeId), + 'logo' => $this->getLogo(), + 'payment_methods_off_active' => $this->getPaymentMethodsOffActive($storeId), + 'fingerprint' => $this->config->getFingerPrintLink($storeId) + ], + ], + ]; + } + + /** + * Get icons for available payment methods. + * + * @return array + */ + public function getLogo() + { + $logo = []; + $url = $this->assetRepo->getUrl(Self::PATH_LOGO); + if ($url) { + $logo = [ + 'url' => $url, + 'title' => __('Ticket - MercadoPago"'), + ]; + } + + return $logo; + } + + /** + * Get Payment methods. + * + * @return array + */ + public function getPaymentMethodsOffActive($storeId) + { + $methodsOffActive = $this->config->getPaymentMethodsOffActive($storeId); + + $options = []; + $payments = $this->mercadopagoConfig->getMpPaymentMethods($storeId); + + if ($payments['success'] === true) { + $options = $this->mountPaymentMethodsOff($payments['response']); + } + + return $this->filterPaymentMethodsOffConfigActive($options, $methodsOffActive); + } + + + /** + * Filters the list of configured in admin payment methods off. + * + * @return array + */ + public function filterPaymentMethodsOffConfigActive(array $paymentMethods, ?string $methodsOffActive): ?array + { + if (empty($methodsOffActive)) { + return $paymentMethods; + } + + $options = []; + $actives = explode(",", $methodsOffActive); + + foreach ($paymentMethods as $payment) { + if(isset($payment['value']) && !in_array($payment['value'], $actives)){ + $options[] = $payment; + } + } + + return $options; + } + + /** + * Make a list with the necessary information from the payment Methods Off. + * + * @return array + */ + public function mountPaymentMethodsOff(array $paymentMethods = []): array + { + $options = []; + foreach ($paymentMethods as $payment) { + if (in_array($payment['payment_type_id'], self::PAYMENT_TYPE_ID_ALLOWED) && + $payment['status'] === self::PAYMENT_STATUS_ACTIVE) { + + if (empty($payment['payment_places'])) { + $options[] = [ + 'value' => $payment['id'], + 'label' => $payment['name'], + 'logo' => $payment['secure_thumbnail'], + 'payment_method_id' => $payment['id'], + 'payment_type_id' => $payment['payment_type_id'], + + ]; + } else { + foreach ($payment['payment_places'] as $paymentPlace) { + if ($paymentPlace['status'] === self::PAYMENT_STATUS_ACTIVE) { + $options[] = [ + 'value' => $paymentPlace['payment_option_id'], + 'label' => $paymentPlace['name'], + 'logo' => $paymentPlace['thumbnail'], + 'payment_method_id' => $payment['id'], + 'payment_type_id' => $payment['payment_type_id'], + 'payment_option_id' => $paymentPlace['payment_option_id'], + ]; + } + } + } + } + } + + $labels = array(); + foreach ($options as $key => $row) { + $labels[$key] = $row['label']; + } + array_multisort($labels, SORT_ASC, $options); + return $options; + } + +} diff --git a/Model/Ui/ConfigProviderPix.php b/Model/Ui/ConfigProviderPix.php new file mode 100644 index 0000000..92d8932 --- /dev/null +++ b/Model/Ui/ConfigProviderPix.php @@ -0,0 +1,140 @@ +config = $config; + $this->cart = $cart; + $this->escaper = $escaper; + $this->ccConfig = $ccConfig; + $this->assetSource = $assetSource; + } + + /** + * Retrieve assoc array of checkout configuration. + * + * @return array + */ + public function getConfig() + { + $storeId = $this->cart->getStoreId(); + $isActive = $this->config->isActive($storeId); + + if (!$isActive) { + return []; + } + + return [ + 'payment' => [ + self::CODE => [ + 'isActive' => $isActive, + 'title' => $this->config->getTitle($storeId), + 'document_identification_capture' => $this->config->hasUseDocumentIdentificationCapture($storeId), + 'instruction_checkout' => nl2br($this->getDescriptions($storeId)), + 'logo' => $this->getLogo(), + 'fingerprint' => $this->config->getFingerPrintLink($storeId) + ], + ], + ]; + } + + /** + * Get icons for available payment methods. + * + * @return array + */ + public function getLogo() + { + $logo = []; + $asset = $this->ccConfig->createAsset('MercadoPago_AdbPayment::images/pix/logo.svg'); + $placeholder = $this->assetSource->findSource($asset); + if ($placeholder) { + list($width, $height) = getimagesizefromstring($asset->getSourceFile()); + $logo = [ + 'url' => $asset->getUrl(), + 'width' => $width, + 'height' => $height, + 'title' => __('Pix - MercadoPago'), + ]; + } + + return $logo; + } + + /** + * Get Descriptions. + * + * @param int|null $storeId + * + * @return Phrase + */ + public function getDescriptions($storeId) + { + $time = $this->config->getExpirationTextFormatted($storeId); + $text = $this->config->getInstructionCheckout($storeId); + + return __($text, $time); + } +} diff --git a/Model/Ui/ConfigProviderPse.php b/Model/Ui/ConfigProviderPse.php new file mode 100644 index 0000000..5a62814 --- /dev/null +++ b/Model/Ui/ConfigProviderPse.php @@ -0,0 +1,143 @@ +config = $config; + $this->cart = $cart; + $this->escaper = $escaper; + $this->ccConfig = $ccConfig; + $this->assetSource = $assetSource; + } + + /** + * Retrieve assoc array of checkout configuration. + * + * @return array + */ + public function getConfig() + { + $storeId = $this->cart->getStoreId(); + $isActive = $this->config->isActive($storeId); + + if (!$isActive) { + return []; + } + + return [ + 'payment' => [ + ConfigPse::METHOD => [ + 'isActive' => $isActive, + 'title' => $this->config->getTitle($storeId), + 'document_identification_capture' => $this->config->hasUseDocumentIdentificationCapture($storeId), + 'expiration' => $this->config->getExpirationFormat($storeId), + 'instruction_checkout_pse' => nl2br($this->getDescriptions($storeId)), + 'logo' => $this->getLogo(), + 'payment_method_id' => ConfigPse::PAYMENT_METHOD_ID, + 'finance_inst_options' => $this->config->getListFinancialInstitution($storeId), + 'payer_entity_types' => $this->config->getListPayerEntityTypes($storeId), + 'fingerprint' => $this->config->getFingerPrintLink($storeId) + ], + ], + ]; + } + + /** + * Get icons for available payment methods. + * + * @return array + */ + public function getLogo() + { + $logo = []; + $asset = $this->ccConfig->createAsset('MercadoPago_AdbPayment::images/pse/logo.svg'); + $placeholder = $this->assetSource->findSource($asset); + if ($placeholder) { + list($width, $height) = getimagesizefromstring($asset->getSourceFile()); + $logo = [ + 'url' => $asset->getUrl(), + 'width' => $width, + 'height' => $height, + 'title' => __('Pse - MercadoPago'), + ]; + } + + return $logo; + } + + /** + * Get Descriptions. + * + * @param int|null $storeId + * + * @return Phrase + */ + public function getDescriptions($storeId) + { + $text = $this->config->getInstructionCheckoutPse($storeId); + + return __($text); + } +} diff --git a/Model/Ui/ConfigProviderTwoCc.php b/Model/Ui/ConfigProviderTwoCc.php new file mode 100644 index 0000000..8207e3a --- /dev/null +++ b/Model/Ui/ConfigProviderTwoCc.php @@ -0,0 +1,204 @@ +configTwoCc = $configTwoCc; + $this->cart = $cart; + $this->ccConfig = $ccConfig; + $this->assetSource = $assetSource; + } + + /** + * Retrieve assoc array of checkout configuration. + * + * @return array + */ + public function getConfig() + { + $storeId = $this->cart->getStoreId(); + $isActive = $this->configTwoCc->isActive($storeId); + + if (!$isActive) { + return []; + } + + return [ + 'payment' => [ + ConfigTwoCc::METHOD => [ + 'isActive' => $isActive, + 'title' => $this->configTwoCc->getTitle($storeId), + 'useCvv' => $this->configTwoCc->isCvvEnabled($storeId), + 'ccTypesMapper' => $this->configTwoCc->getCcTypesMapper($storeId), + 'logo' => $this->getLogo(), + 'icons' => $this->getIcons(), + 'document_identification_capture' => $this->configTwoCc->hasUseDocumentIdentificationCapture($storeId), + 'unsupported_pre_auth' => $this->configTwoCc->getUnsupportedPreAuth($storeId), + 'ccVaultCode' => self::VAULT_CODE, + 'fingerprint' => $this->configTwoCc->getFingerPrintLink($storeId), + 'images' => $this->getImages() + ], + ], + ]; + } + + /** + * Get icons for available payment methods. + * + * @return array + */ + public function getIcons() + { + if (!empty($this->icons)) { + return $this->icons; + } + $storeId = $this->cart->getStoreId(); + $ccTypes = $this->configTwoCc->getCcAvailableTypes($storeId); + $types = explode(',', $ccTypes); + foreach ($types as $code => $label) { + if (!array_key_exists($code, $this->icons)) { + $asset = $this->ccConfig->createAsset( + 'MercadoPago_AdbPayment::images/cc/'.$label.'.svg' + ); + $placeholder = $this->assetSource->findSource($asset); + if ($placeholder) { + $this->icons[$label] = [ + 'url' => $asset->getUrl(), + 'code' => $label, + 'width' => '38px', + 'height' => '38px', + 'title' => $label, + ]; + } + } + } + + return $this->icons; + } + + /** + * Get icons for available payment methods. + * + * @return array + */ + public function getLogo() + { + $logo = []; + $asset = $this->ccConfig->createAsset('MercadoPago_AdbPayment::images/twocc/logo.svg'); + $placeholder = $this->assetSource->findSource($asset); + if ($placeholder) { + list($width, $height) = getimagesizefromstring($asset->getSourceFile()); + $logo = [ + 'url' => $asset->getUrl(), + 'width' => $width, + 'height' => $height, + 'title' => __('Card - MercadoPago'), + ]; + } + + return $logo; + } + + /** + * Get icons for available payment methods. + * + * @return array + */ + public function getImages() + { + $images = [ + 'card' => $this->getImageByName('card'), + 'edit' => $this->getImageByName('edit'), + 'footer-logo' => $this->getImageByName('footer-logo') + ]; + + return $images; + } + + /** + * Get icons for available payment methods. + * + * @return array + */ + private function getImageByName($name) + { + $image = []; + $asset = $this->ccConfig->createAsset('MercadoPago_AdbPayment::images/twocc/'.$name.'.svg'); + $placeholder = $this->assetSource->findSource($asset); + if ($placeholder) { + list($width, $height) = getimagesizefromstring($asset->getSourceFile()); + $image = [ + 'url' => $asset->getUrl(), + 'width' => $width, + 'height' => $height, + 'title' => __('Card - MercadoPago'), + ]; + } + + return $image; + } +} diff --git a/Model/Ui/ConfigProviderWebpay.php b/Model/Ui/ConfigProviderWebpay.php new file mode 100644 index 0000000..c18c4d6 --- /dev/null +++ b/Model/Ui/ConfigProviderWebpay.php @@ -0,0 +1,142 @@ +config = $config; + $this->cart = $cart; + $this->escaper = $escaper; + $this->ccConfig = $ccConfig; + $this->assetSource = $assetSource; + } + + /** + * Retrieve assoc array of checkout configuration. + * + * @return array + */ + public function getConfig() + { + $storeId = $this->cart->getStoreId(); + $isActive = $this->config->isActive($storeId); + + if (!$isActive) { + return []; + } + + return [ + 'payment' => [ + ConfigWebpay::METHOD => [ + 'isActive' => $isActive, + 'title' => $this->config->getTitle($storeId), + 'document_identification_capture' => $this->config->hasUseDocumentIdentificationCapture($storeId), + 'expiration' => $this->config->getExpirationFormat($storeId), + 'instruction_checkout_webpay' => nl2br($this->getDescriptions($storeId)), + 'logo' => $this->getLogo(), + 'payment_method_id' => ConfigWebpay::PAYMENT_METHOD_ID, + 'finance_inst_options' => $this->config->getListFinancialInstitution($storeId), + 'fingerprint' => $this->config->getFingerPrintLink($storeId) + ], + ], + ]; + } + + /** + * Get icons for available payment methods. + * + * @return array + */ + public function getLogo() + { + $logo = []; + $asset = $this->ccConfig->createAsset('MercadoPago_AdbPayment::images/webpay/logo.svg'); + $placeholder = $this->assetSource->findSource($asset); + if ($placeholder) { + list($width, $height) = getimagesizefromstring($asset->getSourceFile()); + $logo = [ + 'url' => $asset->getUrl(), + 'width' => $width, + 'height' => $height, + 'title' => __('Webpay - MercadoPago'), + ]; + } + + return $logo; + } + + /** + * Get Descriptions. + * + * @param int|null $storeId + * + * @return Phrase + */ + public function getDescriptions($storeId) + { + $text = $this->config->getInstructionCheckoutWebpay($storeId); + + return __($text); + } +} diff --git a/Model/Ui/TokenUiComponentProvider.php b/Model/Ui/TokenUiComponentProvider.php new file mode 100644 index 0000000..3742436 --- /dev/null +++ b/Model/Ui/TokenUiComponentProvider.php @@ -0,0 +1,69 @@ +componentFactory = $componentFactory; + $this->json = $json; + } + + /** + * Get UI component for token. + * + * @param PaymentTokenInterface $paymentToken + * + * @return TokenUiComponentInterface + */ + public function getComponentForToken(PaymentTokenInterface $paymentToken) + { + $jsonDetails = $this->json->unserialize($paymentToken->getTokenDetails()); + $component = $this->componentFactory->create( + [ + 'config' => [ + 'code' => ConfigProviderCc::VAULT_CODE, + TokenUiComponentProviderInterface::COMPONENT_DETAILS => $jsonDetails, + TokenUiComponentProviderInterface::COMPONENT_PUBLIC_HASH => $paymentToken->getPublicHash(), + ], + 'name' => 'MercadoPago_AdbPayment/js/view/payment/method-renderer/vault', + ] + ); + + return $component; + } +} diff --git a/Model/Ui/Vault/ConfigProvider.php b/Model/Ui/Vault/ConfigProvider.php new file mode 100644 index 0000000..534394b --- /dev/null +++ b/Model/Ui/Vault/ConfigProvider.php @@ -0,0 +1,135 @@ +cart = $cart; + $this->configCc = $configCc; + $this->assetSource = $assetSource; + $this->ccConfig = $ccConfig; + $this->configCcVault = $configCcVault; + } + + /** + * Retrieve assoc array of checkout configuration. + * + * @throws InputException + * @throws NoSuchEntityException + * + * @return array + */ + public function getConfig() + { + $storeId = $this->cart->getStoreId(); + + return [ + 'payment' => [ + self::CODE => [ + 'useCvv' => $this->configCcVault->useCvv($storeId), + 'icons' => $this->getIcons(), + ], + ], + ]; + } + + /** + * Get icons for available payment methods. + * + * @return array + */ + public function getIcons() + { + if (!empty($this->icons)) { + return $this->icons; + } + $storeId = $this->cart->getStoreId(); + $ccTypes = $this->configCc->getCcAvailableTypes($storeId); + $types = explode(',', $ccTypes); + foreach ($types as $code => $label) { + if (!array_key_exists($code, $this->icons)) { + $asset = $this->ccConfig->createAsset( + 'MercadoPago_AdbPayment::images/cc/'.strtolower($label).'.svg' + ); + $placeholder = $this->assetSource->findSource($asset); + if ($placeholder) { + list($width, $height) = getimagesizefromstring($asset->getSourceFile()); + $this->icons[$label] = [ + 'url' => $asset->getUrl(), + 'width' => $width, + 'height' => $height, + 'title' => __($label), + ]; + } + } + } + + return $this->icons; + } +} diff --git a/Observer/ChangeConfigModule.php b/Observer/ChangeConfigModule.php new file mode 100644 index 0000000..3ad0b9f --- /dev/null +++ b/Observer/ChangeConfigModule.php @@ -0,0 +1,49 @@ +fetchMerhant = $fetchMerhant; + } + + /** + * Excecute fetch merchant after save config. + * + * @param Observer $observer + * + * @return void + */ + public function execute(Observer $observer) + { + $storeId = $observer->getStore(); + + $this->fetchMerhant->fetch($storeId); + } +} diff --git a/Observer/CovertFinanceCostToOrderObserver.php b/Observer/CovertFinanceCostToOrderObserver.php new file mode 100644 index 0000000..6415325 --- /dev/null +++ b/Observer/CovertFinanceCostToOrderObserver.php @@ -0,0 +1,42 @@ +getEvent()->getData('order'); + /* @var \Magento\Quote\Model\Quote $quote */ + $quote = $observer->getEvent()->getData('quote'); + + $financeCost = $quote->getData(FinanceCostInterface::FINANCE_COST_AMOUNT); + $baseFinanceCost = $quote->getData(FinanceCostInterface::BASE_FINANCE_COST_AMOUNT); + $order->setData(FinanceCostInterface::FINANCE_COST_AMOUNT, $financeCost); + $order->setData(FinanceCostInterface::BASE_FINANCE_COST_AMOUNT, $baseFinanceCost); + + $order->setBaseGrandTotal($order->getBaseGrandTotal() - $baseFinanceCost); + $order->setGrandTotal($order->getGrandTotal() - $financeCost); + } +} diff --git a/Observer/DataAssignCheckoutCustomObserver.php b/Observer/DataAssignCheckoutCustomObserver.php new file mode 100644 index 0000000..ffb4276 --- /dev/null +++ b/Observer/DataAssignCheckoutCustomObserver.php @@ -0,0 +1,110 @@ +readDataArgument($observer); + + $additionalData = $data->getData(PaymentInterface::KEY_ADDITIONAL_DATA); + + if (!is_array($additionalData)) { + return; + } + + $paymentInfo = $this->readPaymentModelArgument($observer); + + foreach ($this->addInformationList as $addInformationKey) { + if (isset($additionalData[$addInformationKey])) { + if ($additionalData[$addInformationKey]) { + $paymentInfo->setAdditionalInformation( + $addInformationKey, + $additionalData[$addInformationKey] + ); + } + } + } + } +} diff --git a/Observer/DataAssignObserverCc.php b/Observer/DataAssignObserverCc.php new file mode 100644 index 0000000..76ac7e6 --- /dev/null +++ b/Observer/DataAssignObserverCc.php @@ -0,0 +1,134 @@ +readDataArgument($observer); + + $additionalData = $data->getData(PaymentInterface::KEY_ADDITIONAL_DATA); + + if (!is_array($additionalData)) { + return; + } + + $paymentInfo = $this->readPaymentModelArgument($observer); + + foreach ($this->addInformationList as $addInformationKey) { + if (isset($additionalData[$addInformationKey])) { + if ($additionalData[$addInformationKey]) { + $paymentInfo->setAdditionalInformation( + $addInformationKey, + $additionalData[$addInformationKey] + ); + } + } + } + } +} diff --git a/Observer/DataAssignObserverCcVault.php b/Observer/DataAssignObserverCcVault.php new file mode 100644 index 0000000..0542606 --- /dev/null +++ b/Observer/DataAssignObserverCcVault.php @@ -0,0 +1,110 @@ +readDataArgument($observer); + + $additionalData = $data->getData(PaymentInterface::KEY_ADDITIONAL_DATA); + + if (!is_array($additionalData)) { + return; + } + + $paymentInfo = $this->readPaymentModelArgument($observer); + + foreach ($this->addInformationList as $addInformationKey) { + if (isset($additionalData[$addInformationKey])) { + if ($additionalData[$addInformationKey]) { + $paymentInfo->setAdditionalInformation( + $addInformationKey, + $additionalData[$addInformationKey] + ); + } + } + } + } +} diff --git a/Observer/DataAssignObserverTwoCc.php b/Observer/DataAssignObserverTwoCc.php new file mode 100644 index 0000000..d5d6a98 --- /dev/null +++ b/Observer/DataAssignObserverTwoCc.php @@ -0,0 +1,101 @@ +readDataArgument($observer); + + $additionalData = $data->getData(PaymentInterface::KEY_ADDITIONAL_DATA); + + if (!is_array($additionalData)) { + return; + } + + $paymentInfo = $this->readPaymentModelArgument($observer); + + foreach ($this->addInformationList as $addInformationKey) { + for ($i = 0; $i < self::MAX_CARDS; $i ++) { + $key = str_replace('{COUNT}', $i, $addInformationKey); + if (isset($additionalData[$key])) { + $paymentInfo->setAdditionalInformation( + $key, + $additionalData[$key] + ); + } + } + } + } +} diff --git a/Observer/OrderCancelAfterObserver.php b/Observer/OrderCancelAfterObserver.php new file mode 100644 index 0000000..45c175f --- /dev/null +++ b/Observer/OrderCancelAfterObserver.php @@ -0,0 +1,100 @@ +searchCriteria = $searchCriteria; + $this->transactions = $transactions; + $this->paymentExpiration = $paymentExpiration; + } + + /** + * Excecute convert finance cost. + * + * @param Observer $observer + * + * @return void + */ + public function execute(Observer $observer) + { + /* @var \Magento\Sales\Model\Order $order */ + $order = $observer->getEvent()->getData('order'); + + $payment = $order->getPayment(); + + $amount = $order->getBaseGrandTotal(); + + $orderId = $order->getId(); + $storeId = $order->getStoreId(); + + $searchCriteria = $this->searchCriteria + ->addFilter('order_id', $orderId) + ->addFilter('txn_type', 'order') + ->create(); + + /** @var TransactionRepositoryInterface $transaction */ + $transaction = $this->transactions->getList($searchCriteria)->getFirstItem(); + + $transactionId = $transaction->getTxnId(); + + if ($transactionId) { + $this->paymentExpiration->expire($transactionId, $storeId); + + $payment->setTransactionId($transactionId.'-expire'); + $payment->setPreparedMessage(__('Order Canceled.')); + $payment->setIsTransactionPending(false); + $payment->setIsTransactionDenied(true); + $payment->setAmountCanceled($amount); + $payment->setBaseAmountCanceled($amount); + $payment->setShouldCloseParentTransaction(true); + $payment->addTransaction(Transaction::TYPE_VOID); + $payment->save(); + + $comment = __('Order Canceled.'); + $order->addStatusHistoryComment($comment, $payment->getOrder()->getStatus()); + $order->save(); + } + } +} diff --git a/Plugin/PaymentToken.php b/Plugin/PaymentToken.php new file mode 100644 index 0000000..ea3f3bc --- /dev/null +++ b/Plugin/PaymentToken.php @@ -0,0 +1,71 @@ +getOrder(); + + if ($order->getCustomerIsGuest()) { + return $proceed($token, $payment); + } + + $existingToken = $payTokenManagement->getByGatewayToken( + $token->getGatewayToken(), + $payment->getMethodInstance()->getCode(), + $order->getCustomerId() + ); + + if ($existingToken === null) { + return $proceed($token, $payment); + } + + $existingToken->addData($token->getData()); + + return $proceed($existingToken, $payment); + } +} diff --git a/Plugin/VaultIsInitializeNeeded.php b/Plugin/VaultIsInitializeNeeded.php new file mode 100644 index 0000000..835d23a --- /dev/null +++ b/Plugin/VaultIsInitializeNeeded.php @@ -0,0 +1,33 @@ + + +# Mercado Pago para Adobe Commerce + +Oferece pagamentos com cartões de crédito, débito e também meios offline - além de vantagens exclusivas para quem paga logado na conta Mercado Pago, como créditos, descontos e outras condições especiais. + + +## 🇧🇷 Recursos + + +### Checkout Pro +Pague com o meio de pagamento que preferir e toda a segurança do Mercado Pago. +Se você já tem conta no Mercado Livre, use o mesmo e-mail e senha. +Use seu saldo do Mercado Pago ou cartões salvos para comprar sem preencher mais dados. + +Destaque de Recursos +- Escolha entre Modal ou Redirecionamento para a finalização do pedido +- Defina estilo de elementos no Modal, mantendo a sua identididade visual +- Segurança em confirmidade com PCI +- Antifraude +- Reembolso Online, total ou parcial, diretamente da aplicação + +### Checkout Transparente +Com o Checkout Transparente todas as informações sensiveis são digitadas exclusivamente no ambiente do Mercado Pago utilizando a tecnoligia exclusiva do SecurityField®. Sua loja recebe um token e com isso processa o pagamento de forma transparente. + + + + + + + + + + + + + +#### Cartão de Crédito ou Débito + +Receba com cartões de **crédito ou débito** das principais bandeiras. + +Destaque de Recursos +- Segurança em confirmidade com PCI +- Antifraude +- Reembolso Online, total ou parcial, diretamente da aplicação + + + +#### Pix + +O queridinho do Brasil com toda a segurança e praticidade. + +Destaque +- Você define o tempo de vencimento +- O status é consolidado na sua loja +- Reembolso Online, total ou parcial, diretamente da aplicação + + + + +#### Boleto + +Boleto registrado com baixa automática. + +Destaque +- Você define o tempo de vencimento +- O status é consolidado na sua loja +- Reembolso Online, total ou parcial, diretamente da aplicação + + + +#### Casas Lotéricas + +Um pagamento com baixa automática em até 1 hora. + +Destaque +- Você define o tempo de vencimento +- O status é consolidado na sua loja +- Reembolso Online, total ou parcial, diretamente da aplicação + +## Instalação e Configuração + +Visite nossa [Wiki][wiki] e veja como configurar e instalar nosso módulo. + +## License + +[Open Source License](LICENSE) + + [wiki]: diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 0000000..c63f7aa --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,13 @@ +# Security Policy + +## Supported Versions + +Version maintenance is subject to Magento [lifecycle policy](https://experienceleague.adobe.com/docs/commerce-operations/release/planning/lifecycle-policy.html). + +| Version | Magento Version | Supported | +|---------| :------------------: | :------------------: | +| 1.x.x | 2.4.x | :white_check_mark: | + +## Reporting a Vulnerability + +If you find any vulnerabilities, please contact mercadopago@o2ti.com immediately. diff --git a/Tests/Unit/Controller/Notification/CheckoutCustomTest.php b/Tests/Unit/Controller/Notification/CheckoutCustomTest.php new file mode 100644 index 0000000..e69de29 diff --git a/Tests/Unit/Gateway/Config/ConfigPaymentMethodsOffTest.php b/Tests/Unit/Gateway/Config/ConfigPaymentMethodsOffTest.php new file mode 100644 index 0000000..c2bf996 --- /dev/null +++ b/Tests/Unit/Gateway/Config/ConfigPaymentMethodsOffTest.php @@ -0,0 +1,222 @@ +scopeConfigMock = $this->getMockBuilder(ScopeConfigInterface::class) + ->setMethods([self::CONFIG_METHOD])->getMockForAbstractClass(); + + $this->configMock = $this->getMockBuilder(Config::class)->disableOriginalConstructor()->getMock(); + $this->dateMock = $this->getMockBuilder(DateTime::class)->disableOriginalConstructor()->getMock(); + $this->fingerprintMock = $this->getMockBuilder(Fingerprint::class)->disableOriginalConstructor()->getMock(); + + $this->configMethodsOffMock = $this->getMockBuilder(ConfigMethodsOff::class) + ->setConstructorArgs([ + 'scopeConfig' => $this->scopeConfigMock, + 'date' => $this->dateMock, + 'config' => $this->configMock, + 'fingerprint' => $this->fingerprintMock, + 'methodCode' => ConfigMethodsOff::METHOD + ])->getMock(); + } + + /** + * Tests functions get configs() + */ + + public function testIsActiveGetTrue() { + + $this->scopeConfigMock->expects($this->any())->method(self::CONFIG_METHOD) + ->with(sprintf(self::PATH_PATTERN, ConfigMethodsOff::METHOD, ConfigMethodsOff::ACTIVE))->willReturn(true); + + $configMethodsOff = new ConfigMethodsOff( + $this->scopeConfigMock, + $this->dateMock, + $this->configMock, + $this->fingerprintMock + ); + + $result = $configMethodsOff->isActive(null); + + $this->assertTrue($result); + } + + public function testGetTitleGetWithValue() { + + $this->scopeConfigMock->expects($this->any())->method(self::CONFIG_METHOD) + ->with(sprintf(self::PATH_PATTERN, ConfigMethodsOff::METHOD, ConfigMethodsOff::TITLE))->willReturn('PaymentsOff'); + + $configMethodsOff = new ConfigMethodsOff( + $this->scopeConfigMock, + $this->dateMock, + $this->configMock, + $this->fingerprintMock + ); + + $result = $configMethodsOff->getTitle(null); + + $this->assertEquals('PaymentsOff', $result); + } + + public function testHasUseDocumentIdentificationCaptureGetTrue() { + + $this->scopeConfigMock->expects($this->any())->method(self::CONFIG_METHOD) + ->with(sprintf(self::PATH_PATTERN, ConfigMethodsOff::METHOD, ConfigMethodsOff::USE_GET_DOCUMENT_IDENTIFICATION))->willReturn(true); + + $configMethodsOff = new ConfigMethodsOff( + $this->scopeConfigMock, + $this->dateMock, + $this->configMock, + $this->fingerprintMock + ); + + $result = $configMethodsOff->hasUseDocumentIdentificationCapture(null); + + $this->assertTrue($result); + } + + public function testHasUseNameCaptureGetTrue() { + + $this->scopeConfigMock->expects($this->any())->method(self::CONFIG_METHOD) + ->with(sprintf(self::PATH_PATTERN, ConfigMethodsOff::METHOD, ConfigMethodsOff::USE_GET_NAME))->willReturn(true); + + $configMethodsOff = new ConfigMethodsOff( + $this->scopeConfigMock, + $this->dateMock, + $this->configMock, + $this->fingerprintMock + ); + + $result = $configMethodsOff->hasUseNameCapture(null); + + $this->assertTrue($result); + } + + public function testGetPaymentMethodsOffActiveGetValue() { + $stringGetMethods = 'boleto, pec'; + $this->scopeConfigMock->expects($this->any())->method(self::CONFIG_METHOD) + ->with(sprintf(self::PATH_PATTERN, ConfigMethodsOff::METHOD, ConfigMethodsOff::PAYMENT_METHODS))->willReturn($stringGetMethods); + + $configMethodsOff = new ConfigMethodsOff( + $this->scopeConfigMock, + $this->dateMock, + $this->configMock, + $this->fingerprintMock + ); + + $result = $configMethodsOff->getPaymentMethodsOffActive(null); + + $this->assertEquals($stringGetMethods, $result); + } + + /** + * Tests functions format bar code value + */ + + public function testGetLineCodeWithValidValue() { + $codeParameter = '23791930400000054003380260600346799100633330'; + $expectFormatedCode = '23793.38029 60600.346799 91006.333305 1 93040000005400'; + + $this->configMethodsOffMock->expects($this->any())->method('getLineCode') + ->with($codeParameter)->willReturn($expectFormatedCode); + + $configMethodsOff = new ConfigMethodsOff( + $this->scopeConfigMock, + $this->dateMock, + $this->configMock, + $this->fingerprintMock + ); + + $result = $configMethodsOff->getLineCode($codeParameter); + + $this->assertEquals($expectFormatedCode, $result); + } + + /** + * Tests functions calc bar code digit + */ + + public function testCalcDigitGetValidDigit() { + $expectedDigit = 9; + $codeToCalc = '23793.3802'; + + $this->configMethodsOffMock->expects($this->any())->method('calcDigit') + ->with($codeToCalc)->willReturn($expectedDigit); + + $configMethodsOff = new ConfigMethodsOff( + $this->scopeConfigMock, + $this->dateMock, + $this->configMock, + $this->fingerprintMock + ); + + $result = $configMethodsOff->calcDigit($codeToCalc); + + $this->assertEquals($expectedDigit, $result); + } + + public function testCalcDigitGetInvalidDigit() { + $expectedDigit = 9; + $invalidCodeToCalc = '23793.3803'; + + $this->configMethodsOffMock->expects($this->any())->method('calcDigit') + ->with($invalidCodeToCalc)->willReturn($expectedDigit); + + $configMethodsOff = new ConfigMethodsOff( + $this->scopeConfigMock, + $this->dateMock, + $this->configMock, + $this->fingerprintMock + ); + + $result = $configMethodsOff->calcDigit($invalidCodeToCalc); + + $this->assertNotEquals($expectedDigit, $result); + } +} diff --git a/Tests/Unit/HelloWorldTest.php b/Tests/Unit/HelloWorldTest.php new file mode 100644 index 0000000..af88dee --- /dev/null +++ b/Tests/Unit/HelloWorldTest.php @@ -0,0 +1,19 @@ +assertEquals('Hello World', helloWorld()); + } + + } + + diff --git a/Tests/Unit/Mocks/Gateway/Config/ConfigPaymentMethodsOffMock.php b/Tests/Unit/Mocks/Gateway/Config/ConfigPaymentMethodsOffMock.php new file mode 100644 index 0000000..2c8913b --- /dev/null +++ b/Tests/Unit/Mocks/Gateway/Config/ConfigPaymentMethodsOffMock.php @@ -0,0 +1,8 @@ + true, + 'response' => [ + [ + "accreditation_time" => 2880, + "additional_info_needed" => ["cardholder_name"], + "deferred_capture" => "unsupported", + "financial_institutions" => [], + "id" => "debmaster", + "max_allowed_amount" => 300000, + "min_allowed_amount" => 5, + "name" => "Mastercard Débito", + "payment_type_id" => "debit_card", + "processing_modes" => ["aggregator"], + "secure_thumbnail" => + "https://http2.mlstatic.com/storage/logos-api-admin/157dce60-571b-11e8-95d8-631c1a9a92a9-xl.png", + "settings" => [ + [ + "bin" => [ + "exclusion_pattern" => "^(506302|506429|230868)", + "installments_pattern" => "", + "pattern" => + "^(506406|506405|551353|526400|506449|543924|511765|506428|506391|549672|531294|528598|506412|557924|557921|506407|506380|506365|506311|545325|545290|533987|506309|516415|546378|506253|506354|506300|506351|506389|528480|506356|506215|506214|538088|538405|510586|506427|537938|506399|506441|506312|506422|511852|506377|506280|506279|506278|506277|506213|506398|506397|506337|516611|533922|506413|506254|506367|549685|536783|506373|506439|506343|506393|506421|506282|506342|506283|506294|506344|506319|506320|506384|506364|506334|506287|506297|506432|506263|506352|506284|506247|506361|506424|506423|506410|506355|555924|506350|506353|506258|506274|526404|506386|506251|506245|506313|506411|506314|539944|535900|506265|506335|506402|506374|506383|511761|506415|551509|526197|526196|526194|506206|502275|523691|551515|557602|506275|554173|553800|538984|511265|506205|506201|529575|506249|506204|506392|550897|506414|506416|530113|506304|506255|506250|516102|512280|532485|506257|506236|539955|529571|506259|506323|526476|537030|535943|506269|524021|516016|551440|528430|588772|506333|506332|506307|506306|506305|506199|506336|523595|542878|231018|531198|230951|230884|230948|557671|511391|536324|543451|528514|538756|506458|555691|559213|519464|506483|512104|559471|557906|589617|506218|545730|506217|557905|557907|557908|557909|557910|554718|551081|554492|558426|517712|517721|517795|520116|520416|520694|520698|524711|525678|529028|557874|504536|557875|557561|551077|551244|554627|533609|550233|557991|504563|517771|529093|554628|517747|506340|511114|516594|526424|518847|530686|557551|506228|506229|506270|549613|517440|517439|557923|557922|557920|539975|506212|526498|539177|506208|506202|506316|506429|506302|526354|551238|534381|557604|528074|516576|553467|531374|557567|552486|550770|546249|546213|546150|542432|536219|531462|531260|530952|528749|527523|527515|526226|517572|517279|514377|514104|512992|511067|511017|510805|506346|510125|519537|526777|529595|532794|552787|519040|534196|511320|513932|67903180|52642468|51111421|51111422)", + ], + "card_number" => ["length" => 16, "validation" => "standard"], + "security_code" => [ + "card_location" => "back", + "length" => 3, + "mode" => "mandatory", + ], + ], + ], + "status" => "active", + "thumbnail" => + "https://http2.mlstatic.com/storage/logos-api-admin/157dce60-571b-11e8-95d8-631c1a9a92a9-xl.png", + ], + [ + "accreditation_time" => 2880, + "additional_info_needed" => ["cardholder_name"], + "deferred_capture" => "supported", + "financial_institutions" => [], + "id" => "amex", + "max_allowed_amount" => 300000, + "min_allowed_amount" => 1, + "name" => "American Express", + "payment_type_id" => "credit_card", + "processing_modes" => ["aggregator"], + "secure_thumbnail" => + "https://http2.mlstatic.com/storage/logos-api-admin/b2c93a40-f3be-11eb-9984-b7076edb0bb7-xl.png", + "settings" => [ + [ + "bin" => [ + "exclusion_pattern" => null, + "installments_pattern" => + "^(?!341595|376743|3603(2|4)|360732|36075(5|6)|360935|37159(3|5)|3747((5(8|9))|(62))|3751(3([0-9])|7(7|8))|3764((0([0-9]))|(1([0-8]))|(2(2|8|9))|(3(6|7))|(4[0-9]|5[0-8])|(6([1-7])|7[0-8]|8[0-9]|9(1|3)))|37652(0|9)|37660((1|2)|[5-9])|376((6(2[0-9]|3[5-9]|8[5-8]))|71[0-4])|3771(69|74)|37779[0-8]|3778(0[2-6]|1[3-6]|20)|37782(5|6)|3799(6[6-8]|7(5|7)))", + "pattern" => "^((34)|(37))", + ], + "card_number" => ["length" => 15, "validation" => "standard"], + "security_code" => [ + "card_location" => "front", + "length" => 4, + "mode" => "mandatory", + ], + ], + ], + "status" => "active", + "thumbnail" => + "https://http2.mlstatic.com/storage/logos-api-admin/b2c93a40-f3be-11eb-9984-b7076edb0bb7-xl.png", + ], + [ + "accreditation_time" => 0, + "additional_info_needed" => [], + "deferred_capture" => "does_not_apply", + "financial_institutions" => [["description" => "SPEI", "id" => "1"]], + "id" => "clabe", + "max_allowed_amount" => 5000, + "min_allowed_amount" => 1, + "name" => "STP", + "payment_type_id" => "bank_transfer", + "processing_modes" => ["aggregator"], + "secure_thumbnail" => + "https://www.mercadopago.com/org-img/MP3/API/logos/clabe.gif", + "settings" => [], + "status" => "active", + "thumbnail" => + "http://img.mlstatic.com/org-img/MP3/API/logos/clabe.gif", + ], + [ + "accreditation_time" => 0, + "additional_info_needed" => [ + "identification_type", + "identification_number", + "entity_type", + ], + "deferred_capture" => "unsupported", + "financial_institutions" => [], + "id" => "paycash", + "max_allowed_amount" => 10000, + "min_allowed_amount" => 20, + "name" => "PayCash", + "payment_places" => [ + [ + "payment_option_id" => "7eleven", + "name" => "7 Eleven", + "status" => "active", + "thumbnail" => + "https://http2.mlstatic.com/storage/logos-api-admin/417ddb90-34ab-11e9-b8b8-15cad73057aa-xl.png", + ], + [ + "payment_option_id" => "circlek", + "name" => "Circle K", + "status" => "active", + "thumbnail" => + "https://http2.mlstatic.com/storage/logos-api-admin/6f952c90-34ab-11e9-8357-f13e9b392369-xl.png", + ], + [ + "payment_option_id" => "soriana", + "name" => "Soriana", + "status" => "active", + "thumbnail" => + "https://http2.mlstatic.com/storage/logos-api-admin/dac0bf10-01eb-11ec-ad92-052532916206-xl.png", + ], + [ + "payment_option_id" => "extra", + "name" => "Extra", + "status" => "active", + "thumbnail" => + "https://http2.mlstatic.com/storage/logos-api-admin/9c8f26b0-34ab-11e9-b8b8-15cad73057aa-xl.png", + ], + [ + "payment_option_id" => "calimax", + "name" => "Calimax", + "status" => "active", + "thumbnail" => + "https://http2.mlstatic.com/storage/logos-api-admin/52efa730-01ec-11ec-ba6b-c5f27048193b-xl.png", + ], + ], + "payment_type_id" => "ticket", + "processing_modes" => ["aggregator"], + "secure_thumbnail" => + "https://http2.mlstatic.com/storage/logos-api-admin/23a95840-6817-11ec-a13d-73e40a9e9500-xl.png", + "settings" => [], + "status" => "active", + "thumbnail" => + "https://http2.mlstatic.com/storage/logos-api-admin/23a95840-6817-11ec-a13d-73e40a9e9500-xl.png", + ], + [ + "accreditation_time" => 2880, + "additional_info_needed" => ["cardholder_name"], + "deferred_capture" => "supported", + "financial_institutions" => [], + "id" => "visa", + "max_allowed_amount" => 300000, + "min_allowed_amount" => 5, + "name" => "Visa", + "payment_type_id" => "credit_card", + "processing_modes" => ["aggregator"], + "secure_thumbnail" => + "https://http2.mlstatic.com/storage/logos-api-admin/a5f047d0-9be0-11ec-aad4-c3381f368aaf-xl.png", + "settings" => [ + [ + "bin" => [ + "exclusion_pattern" => + "^(421747|427295|411117|411673|428575|428574|474494|498589|498590|498588|498587|492143|491580|491567|491566|491365|491344|491282|491089|490950|490256|485044|485043|483112|483104|483030|481517|481516|481279|480078|480076|480066|480062|479303|477961|477261|477177|477130|476890|476840|476687|476684|476588|474646|474176|474174|473993|471239|469693|469495|467596|466397|465829|465828|465762|465498|465497|465496|465495|462278|460766|460700|460068|459497|457476|457386|457249|455537|455533|455511|455510|455509|451312|449700|449187|446986|446985|446878|446118|446117|446116|446115|445017|445016|444889|444888|442192|441549|441545|441313|441312|438099|435769|434798|433454|433194|433126|432049|430967|429522|428464|426808|426188|425984|425983|422671|422299|421364|421316|421003|420807|419823|419822|419821|419335|419334|418928|418914|416916|415269|415231|413131|413098|412432|412294|411808|410177|410128|409851|408400|408343|408341|408340|407848|407612|405930|405689|405063|402766|400889|400820|400819|400443|400195|404313|420831|420839|443834|451015|440393|465283|412408|411608|406285|442177|482473|471724|490070|486796|486742|483316|483314|481689|481588|481582|480922|478200|474478|474477|474472|473703|473702|473622|470502|470132|467010|466188|465345|461046|445319|443045|443042|442788|442756|442742|436618|434769|434258|434257|434256|427088|420767|411775|411773|410894|410881|410277|404597|403130|402708|401906|401863|401531|400064)", + "installments_pattern" => + "^(?!(408245|416605|422582|405067|426174|492144)|4(0(0(022|1(0(3|4)|63|7(6|8)|85|99)|2(17|25|4(7|8)|68)|344|4(3(7|9)|49|75|89)|6(34|47|54|89)|770|970)|1(093|178|200|370|684)|2(145|400|7(02|8[5-8]|9(1(7|8)|37|44)))|3(2(17|25|4(6|7)|54)|338|784)|4(024|280|370)|5(0(37|71)|6(43|9[3-5]))|6(1(6(6|8))|263|6(55|69)|897|997)|7(3(0(3|4))|4(09|38)|505|618)|9(152|308|6(0[1-3]|9(0|3))|744|9(21|8(3|4))))|1(0(0(39|84)|39[0-2]|4(07|2(4|5))|718|863)|1(0(5(0|4)|93)|759|8(0(1|4)|54))|2(1(77|87)|345|79(1|3))|4(7(09|20|40|91))|5(2(7(4|5)|8(1|3))|328)|6(0(23|94)|4(1[4-7]|2(4|5)))|7(9(5[3-5]|98))|8(0(4(4|7|8|9)|53)|668)|9(1(48|89|90)|590|6(19|2(0|3|5|8))|806))|2(0(061|3(12|3(8|9)|4(0|1)|767))|1(3(09|55|65|79)|4(01|10)|5(71|91)|644|84[3-8]|9(5(8|9)|6(0|2|4|5)))|2(0(0[4-6]|1(1|2)|23|53|61)|1(0(0|1|3)|85)|2(0(0|1)|74)|463|754)|3(669|808|9(25|44))|4(631|96(5|6))|5(8(2(1|2)|50)|944)|6(055|451|6(84|90))|7(16(4|7))|8(26[7-9]|304)|9768)|3(0(023|49(5|6|7)|535|963)|1307|2(03([0-2]|5)|72(8|9)|959)|3(4(41|60)|8(07|1(0|2|7)|2(2|6)|3(0|1|3)|47))|4(25[6-8]|639|769|9(49|56|95))|6618|7846|8(001|2(2(8|9)|30)|85(4|7)|935)|9(0(13|2(0|7))|14(0|4)|2(5(2|3)|67|76)|3(54|8(8|9)|90)))|4(0(066|69|(3|4))|1(080|1(20|74)|524)|2(01(4|5)|174|312|644|7(42|75))|4(054|4(34|5[6-9])|796)|5596|6(54(0|2)|690|867)|7(198|4(09|10))|8(165|459|502|7(33|99))|9(1(19|28|37|88)))|5(0(0(03|60)|40(7|8)|553|6(26|37|68)|75(0|1)|8(15|3(2|3|8)|4(3|4)|78)|9(10|7(2|9)|80|9(4|5)))|1(248|3(0[7-9]|42)|4(46|51|76)|786)|2(4(07|8(7|8)))|3(211|562)|4(07[3-5]|148|4(25|5(0|1))|6(00|4[0-2]|5[7-9])|8(12|32|45|5(0|1)))|5(1(03|7(0|5|9)|8([1-5]|[7-9])|9[6-9])|349|599|788|98(3|6))|6(137|4(60|7(3|7))|5(13|6[4-6]|8[2-4])|815)|7(0(21|55)|29(1|3)|305|5(09|15)|631|9(3(7|8)|43))|8919|9(0(2(0|3)|60|7(7|8)|80)|3(1[3-6]|56|60|8(0|[3-5]))|4(1(8|9)|26|50)|50(4|5)|918))|6(003(4|5)|1(046|202)|2(080|239|937)|3(158|312)|4(018|29[4-9]|30(0|1))|5(375|7(63|70))|6(0(57|69|7(0|9)))|7(1(12|4(8|9))|481|793)|8(201|531)|9(7(0(0|1)|2(4|5)|7(1|2))|8(70|93)))|7(0(455|598|653)|1(70(1|3))|2(81(1|3))|3(2(00|4[6-8])|702)|4(472|5(12|25|3(8|9))|638)|5(393|491|776)|6(002|33[1-3]|5(07|39|40)|60(4|5|6|8)|993)|7(1(28|57|76)|2(50|72))|9(3(52|7[5-8]|95)))|8(158(2|3)|2(108|4(25|69|7(0|6|9)|81))|3(0(42|66)|1(01|54|61)|3(1(2|6)))|4(1(32|9(3|8)))|5(0(11|29)|4(64|82)|904)|6(422|510)|9(070|167|3(21|89|91)|4(23|67|89)|9(11|25)))|9(0(071|172|225|69(6|8))|1(2(56|68)|41(1|2)|51(1|4)|6(17|4(6|7)|69|7(4|5))|956)|2(0(43|52)|1(37|69|80)|210|306|964)|3(1(0[0-3])|1(0|6)|49(3|4)|7(02|1(5|7|9)|6(2|3|8)|7(0|1)|81)|813)|4(0(16|78)|17(2|3)|611)|6(0(34|45|79|80)|210|6(17|7(0|2)))|8(4(0(1|4|[6-8])|2(3|4)|3(0|1|4|5)|4(2|9)|5(2|3)|84|96)|5(34|54|82)|8(11|58|61))|9847)))", + "pattern" => "^4", + ], + "card_number" => ["length" => 16, "validation" => "standard"], + "security_code" => [ + "card_location" => "back", + "length" => 3, + "mode" => "mandatory", + ], + ], + ], + "status" => "active", + "thumbnail" => + "https://http2.mlstatic.com/storage/logos-api-admin/a5f047d0-9be0-11ec-aad4-c3381f368aaf-xl.png", + ], + [ + "accreditation_time" => 2880, + "additional_info_needed" => ["cardholder_name"], + "deferred_capture" => "supported", + "financial_institutions" => [], + "id" => "master", + "max_allowed_amount" => 300000, + "min_allowed_amount" => 5, + "name" => "Mastercard", + "payment_type_id" => "credit_card", + "processing_modes" => ["aggregator"], + "secure_thumbnail" => + "https://http2.mlstatic.com/storage/logos-api-admin/aa2b8f70-5c85-11ec-ae75-df2bef173be2-xl.png", + "settings" => [ + [ + "bin" => [ + "exclusion_pattern" => + "^(506458|555691|231018|506208|541562|230868|506202|539177|531198|542878|506437|543691|506341|554964|527374|544505|589617|588772|559471|558426|557991|557924|557923|557922|557921|557920|557910|557909|557908|557907|557906|557905|557875|557874|557604|557602|557561|557551|555924|554628|554627|554492|554173|553800|553467|551515|551509|551440|551353|551244|551238|551081|551077|550897|550233|549685|549672|549613|546378|545730|545325|545290|543924|539978|539975|539955|539944|538984|538405|538088|537938|537030|536783|535943|535900|534926|534381|533987|533922|533609|532485|531294|530686|530113|529575|529571|529093|529028|528598|528480|528430|528074|526498|526476|526424|526404|526400|526354|526197|526196|526194|526192|525678|524711|524021|523691|523595|520698|520694|520416|520116|518847|517795|517771|517747|517721|517712|517440|517439|516611|516594|516576|516415|516102|516016|512280|511852|511765|511761|511265|511114|510586|506449|506441|506439|506432|506429|506428|506427|506424|506423|506422|506421|506416|506415|506414|506413|506412|506411|506410|506407|506406|506405|506402|506399|506398|506397|506393|506392|506391|506389|506386|506384|506383|506380|506377|506374|506373|506367|506365|506364|506361|506356|506355|506354|506353|506352|506351|506350|506344|506343|506342|506340|506337|506336|506335|506334|506333|506332|506323|506320|506319|506314|506313|506312|506311|506309|506307|506306|506305|506304|506303|506302|506300|506297|506294|506287|506284|506283|506282|506280|506279|506278|506277|506275|506274|506273|506270|506269|506265|506263|506259|506258|506257|506255|506254|506253|506251|506250|506249|506247|506245|506236|506229|506228|506221|506218|506217|506215|506214|506213|506212|506206|506205|506204|506201|506199|504563|504536|502275|522312|522794|523013|577991|528877|601660|230884|230948|230951|557671|511391|557937|512422|539186|548843|536324|543451|528514|538756|554718|506483|531374|559213|557567|552486|550770|546249|546213|546150|542432|536219|531462|531260|530952|528749|527523|527515|526226|517572|517279|514377|514104|512992|511067|511017|510805|519040|512104|534196|547083|519203|545829|511320|513932)", + "installments_pattern" => + "^(?!(525343|530346|530346|534548|523216|523585|523941|510775|515779|515270|531437|532058|533212|534345|537174|513936|518800|510824|518271|512377|53666914|53666910|53666989|53666909|53666936|53666949|53666984|53666976|53666986|53666978|521411|545351|545054|552568|511916|511421|511052|555326|555607|558105|511747|547477|534629|506434|230958|558306|512912|545608|526777|526777|532794|529595|506444|514065|506442|534548|519111|522618|544875|514509|225100|506450|542917|551507|536286|(5(0(1105|2121|5861|67(2(6|7|8)|3(0|1)|4(1|8)|7(5|6|8))|90(5(1|9)|6[7-9]|91))|1(0(147|447|512|541)|1(623|708|7(39|40))|2(06(7|9)|107|267|3(3(1|2)|63|7(0|4)))|3(368|557)|4(0(0(4)|8(6|7))|322|8(68|95)|9(11|45|54))|5(073|11(7|8)|590|6(01|58)|7(67|87)|8(94))|6(0(64|70)|159|2(20|30|75|83|9(1|2))|376|478|585)|7(640|756|805|980)|8(148|2(77|94)|3(13|61)|4(54|82)|5(36|44)|664|7(59|6(1|7))|8(14|41|50)|9(14|50))|9(603|7(0(2|4)|1(0|4)|70)))|2(0(0(53|79)|1(32|56|84)|3(59|63)|4(0[0-3]|5)|898|9(77|95))|1(039|1(74|80)|3(12|7(0|3)|88|97)|5(09|2(3|4))|8(06|72|92))|2(073|135|273|4(46|99)|590|760|8(15|32|40)|97(2|8))|3(284|457|758|9(16|20|37))|4(003|348|70(2|3)|820)|5(320|4(25|8(6|9)|96)|6(31|40|6[2-4])|718|860|922)|6(396|549|7(69|78|8(7|8))|8(10|6(2|3)|92)|96(2|5|6|8))|7(4((05|06)|25|3(0|7)|6(2|8)|9[5-7])|5(15|33|72)|6(08|09|16|19|60|80|89|97))|8(052|209|392|400|5(87|99)|635|743|860)|9(053|2(05|85)|32(3|9)|86(1|7)|88(1|3|5)))|3(0(0(3(3|4|8)|58|7(2|3))|228|3(63|7(1|2|3))|452|57(4|5)|69(5|6)|780|841|99(4|8))|1(015|3(04|21)|448|6(54|6(3|4)|81)|705|966)|2(198|3(69|79|84|99)|473|817|9(24|30))|3(027|225|5(16|7(1|9))|728)|4(004|150|2(4|(6|9)|62)|447|5(03|1(3|6)|20|43|61|93))|5(0(16|8(1|5|8)|9(1|4|7))|106|32(3|7)|8(22|58|63|67|71))|6(087|143|2(33|69)|380|492|5(18|37)|650|805|969)|7(110|83(1|8))|8(8(07|18))|9(0(1(6|8)|2(8|9)|39|59|6(3|8)|73|83|9(0(0|1))|181|61(2|4)|9(09|19))))|4(0(0(64|78|84)|10(5|6)|168|47(6|7)|593|6(25|31|9(0|1|2|5))|782|9(05|19))|1(187|203|320|465|555|6(46|59|78|94)|7(19|59))|2(418|528|66(1|3)|7(02|19)|8(20|65)|9(74|76|91))|3(4(21|48)|565|696|8(06|55|85))|4(014|199|3(00|12|15)|5(40|70)|6(54|65)|7(31|64)|8(17|28|29|39|59|63|83|91)|9(08|15))|5(053|196|301|430|652|7(12|19|68)|8(10|32)|973)|6(056|4(52|79|99)|55(2|3)|6(16|24|38|89)|7(44|68)|852)|7(059|1(29|3(0|4)|4(1|2)|71)|369|408|874)|8(04(5|6)|166|2(62|93|95)|315|4(74|80)|5(73|9(0|1|5))|6(4(8|9)5(2|3))|7(2(3|4|9)|40|90)|8(2(4|6|7))|9(84|85|98))|9(0(12|20|51|70)|1(5(6|7|8|9)|6(2|3|7))|3(1(8|9)|2(8|9)|39|59|6(3|8)|83|9(0|1))|4(27|51)|585|828))|5(0(154|2(09|30)|568)|1000|2(072|1(28|67)|2(36|52|89|97)|3(0(0|5))|16|36|5(30|61)|6(40|68|93)|937)|3(0(07|96)|444|6(24|3(3|6|8|9)|4(3|5|6|8|9)|5(6|9)|6(5|8)|7(0|2|4)))|4(288|383|4(63|73|82)|61(0|2)|773|865|9(0(4|6)|17|27|3(2|3)|99))|5845|6615|7039|8(285|7(27|63))|9(198|202))|7(5809)|8(9(562|657|892|916))|9(0712)))))", + "pattern" => + "^(5|(286900)|(627180)|(2(221|222|223|224|225|226|227|228|229|23|24|25|26|27|28|29|3|4|5|6|70|71|720)))", + ], + "card_number" => ["length" => 16, "validation" => "standard"], + "security_code" => [ + "card_location" => "back", + "length" => 3, + "mode" => "mandatory", + ], + ], + ], + "status" => "active", + "thumbnail" => + "https://http2.mlstatic.com/storage/logos-api-admin/aa2b8f70-5c85-11ec-ae75-df2bef173be2-xl.png", + ], + [ + "accreditation_time" => 2880, + "additional_info_needed" => ["cardholder_name"], + "deferred_capture" => "unsupported", + "financial_institutions" => [], + "id" => "debvisa", + "max_allowed_amount" => 300000, + "min_allowed_amount" => 5, + "name" => "Visa Débito", + "payment_type_id" => "debit_card", + "processing_modes" => ["aggregator"], + "secure_thumbnail" => + "https://http2.mlstatic.com/storage/logos-api-admin/312238e0-571b-11e8-823a-758d95db88db-xl.png", + "settings" => [ + [ + "bin" => [ + "exclusion_pattern" => + "^(477130|400820|476684|476687|429522|49156649|49156648|49156647|49156646|49156645|49156644|49156643|49156642|49156641|49156640|49156639|49156638|49156637|49156636|49156635|49156634|49156633|49156632|49156631|49156630|49156629|49156628|49156627|49156626|49156625|49156624|49156623|49156622|49156621|49156620|49156619|49156618|49156617|49156616|49156615|49156614|49156613|49156612|49156611|49156610|49156609|49156608|49156607|49156606|49156605|49156604|49156603|49156602|49156601|49156600)", + "installments_pattern" => "", + "pattern" => + "^(498590|420807|412294|457476|471239|422299|479303|474646|460068|459497|438099|419335|419334|405063|481279|491344|444889|444888|465498|465497|465496|465495|426808|407848|492143|410128|485044|485043|426188|421003|408400|457249|419823|457386|480076|480066|415269|412432|400195|460766|460700|469693|445017|445016|446878|432049|413098|465762|407612|428464|435769|411673|420839|412408|411117|411608|421747|482473|402766|410177|455510|455533|455537|409851|415231|441313|455511|481516|408341|408343|411808|446116|446117|446118|481517|441312|446115|455509|498587|408340|441314|430967|474176|421316|483030|491089|491282|418914|418928|442192|491566|491567|491580|491365|476588|480078|433454|425984|425983|422671|449187|449700|405930|441545|441549|400889|467596|446985|446986|466397|469495|473993|476890|477177|477261|477961|490256|490950|404313|406285|442177|434798|474174|476840|480062|405689|433194|451312|433126|465829|465828|400443|420831|419822|483112|483104|419821|421364|416916|400819|471724|490070|486796|486742|483316|483314|481689|481588|481582|480922|478200|474478|474477|474472|473703|473702|473622|470502|470132|467010|466188|465345|461046|445319|443045|443042|442788|442756|442742|436618|434769|434258|434257|434256|427088|420767|411775|411773|410894|410881|410277|404597|403130|402708|401906|401863|401531|400064|41891431|41891430|41892810|41891410|47658885|49156699|49156698|49156697|49156696|49156695|49156694|49156693|49156692|49156691|49156690|49156689|49156688|49156687|49156686|49156685|49156684|49156683|49156682|49156681|49156680|49156679|49156678|49156677|49156676|49156675|49156674|49156673|49156672|49156671|49156670|49156669|49156668|49156667|49156666|49156665|49156664|49156663|49156662|49156661|49156660|49156659|49156658|49156657|49156656|49156655|49156654|49156653|49156652|49156651|49156650)", + ], + "card_number" => ["length" => 16, "validation" => "standard"], + "security_code" => [ + "card_location" => "back", + "length" => 3, + "mode" => "mandatory", + ], + ], + ], + "status" => "active", + "thumbnail" => + "https://http2.mlstatic.com/storage/logos-api-admin/312238e0-571b-11e8-823a-758d95db88db-xl.png", + ], + [ + "accreditation_time" => 60, + "additional_info_needed" => [], + "deferred_capture" => "does_not_apply", + "financial_institutions" => [], + "id" => "serfin", + "max_allowed_amount" => 40000, + "min_allowed_amount" => 5, + "name" => "Santander", + "payment_type_id" => "atm", + "processing_modes" => ["aggregator"], + "secure_thumbnail" => + "https://http2.mlstatic.com/storage/logos-api-admin/9eaa6660-f39b-11eb-8e0d-6f4af49bf82e-xl.png", + "settings" => [], + "status" => "active", + "thumbnail" => + "https://http2.mlstatic.com/storage/logos-api-admin/9eaa6660-f39b-11eb-8e0d-6f4af49bf82e-xl.png", + ], + [ + "accreditation_time" => 60, + "additional_info_needed" => [], + "deferred_capture" => "does_not_apply", + "financial_institutions" => [], + "id" => "bancomer", + "max_allowed_amount" => 40000, + "min_allowed_amount" => 10, + "name" => "BBVA Bancomer", + "payment_type_id" => "atm", + "processing_modes" => ["aggregator"], + "secure_thumbnail" => + "https://http2.mlstatic.com/storage/logos-api-admin/65467f50-5cf3-11ec-813c-8542a9aff8ea-xl.png", + "settings" => [], + "status" => "active", + "thumbnail" => + "https://http2.mlstatic.com/storage/logos-api-admin/65467f50-5cf3-11ec-813c-8542a9aff8ea-xl.png", + ], + [ + "accreditation_time" => 60, + "additional_info_needed" => [], + "deferred_capture" => "does_not_apply", + "financial_institutions" => [], + "id" => "banamex", + "max_allowed_amount" => 40000, + "min_allowed_amount" => 5, + "name" => "Citibanamex", + "payment_type_id" => "atm", + "processing_modes" => ["aggregator"], + "secure_thumbnail" => + "https://http2.mlstatic.com/storage/logos-api-admin/2b3223a0-eaf7-11eb-9a80-1175871fb85a-xl.png", + "settings" => [], + "status" => "active", + "thumbnail" => + "https://http2.mlstatic.com/storage/logos-api-admin/2b3223a0-eaf7-11eb-9a80-1175871fb85a-xl.png", + ], + [ + "accreditation_time" => 2880, + "additional_info_needed" => [], + "deferred_capture" => "does_not_apply", + "financial_institutions" => [], + "id" => "oxxo", + "max_allowed_amount" => 10000, + "min_allowed_amount" => 5, + "name" => "OXXO", + "payment_type_id" => "ticket", + "processing_modes" => ["aggregator"], + "secure_thumbnail" => + "https://http2.mlstatic.com/storage/logos-api-admin/91b830e0-f39b-11eb-9984-b7076edb0bb7-xl.png", + "settings" => [], + "status" => "active", + "thumbnail" => + "https://http2.mlstatic.com/storage/logos-api-admin/91b830e0-f39b-11eb-9984-b7076edb0bb7-xl.png", + ], + [ + "id" => "consumer_credits", + "name" => "Mercado Crédito", + "payment_type_id" => "digital_currency", + "secure_thumbnail" => + "http://img.mlstatic.com/org-img/MP3/API/logos/consumer_credits.gif", + "thumbnail" => + "http://img.mlstatic.com/org-img/MP3/API/logos/consumer_credits.gif", + ] + ] + ]; + + public const WITH_PAYMENT_PLACES_AND_INACTIVE = [ + 'success' => true, + 'response' => [ + [ + "accreditation_time" => 2880, + "additional_info_needed" => ["cardholder_name"], + "deferred_capture" => "unsupported", + "financial_institutions" => [], + "id" => "debmaster", + "max_allowed_amount" => 300000, + "min_allowed_amount" => 5, + "name" => "Mastercard Débito", + "payment_type_id" => "debit_card", + "processing_modes" => ["aggregator"], + "secure_thumbnail" => + "https://http2.mlstatic.com/storage/logos-api-admin/157dce60-571b-11e8-95d8-631c1a9a92a9-xl.png", + "settings" => [ + [ + "bin" => [ + "exclusion_pattern" => "^(506302|506429|230868)", + "installments_pattern" => "", + "pattern" => + "^(506406|506405|551353|526400|506449|543924|511765|506428|506391|549672|531294|528598|506412|557924|557921|506407|506380|506365|506311|545325|545290|533987|506309|516415|546378|506253|506354|506300|506351|506389|528480|506356|506215|506214|538088|538405|510586|506427|537938|506399|506441|506312|506422|511852|506377|506280|506279|506278|506277|506213|506398|506397|506337|516611|533922|506413|506254|506367|549685|536783|506373|506439|506343|506393|506421|506282|506342|506283|506294|506344|506319|506320|506384|506364|506334|506287|506297|506432|506263|506352|506284|506247|506361|506424|506423|506410|506355|555924|506350|506353|506258|506274|526404|506386|506251|506245|506313|506411|506314|539944|535900|506265|506335|506402|506374|506383|511761|506415|551509|526197|526196|526194|506206|502275|523691|551515|557602|506275|554173|553800|538984|511265|506205|506201|529575|506249|506204|506392|550897|506414|506416|530113|506304|506255|506250|516102|512280|532485|506257|506236|539955|529571|506259|506323|526476|537030|535943|506269|524021|516016|551440|528430|588772|506333|506332|506307|506306|506305|506199|506336|523595|542878|231018|531198|230951|230884|230948|557671|511391|536324|543451|528514|538756|506458|555691|559213|519464|506483|512104|559471|557906|589617|506218|545730|506217|557905|557907|557908|557909|557910|554718|551081|554492|558426|517712|517721|517795|520116|520416|520694|520698|524711|525678|529028|557874|504536|557875|557561|551077|551244|554627|533609|550233|557991|504563|517771|529093|554628|517747|506340|511114|516594|526424|518847|530686|557551|506228|506229|506270|549613|517440|517439|557923|557922|557920|539975|506212|526498|539177|506208|506202|506316|506429|506302|526354|551238|534381|557604|528074|516576|553467|531374|557567|552486|550770|546249|546213|546150|542432|536219|531462|531260|530952|528749|527523|527515|526226|517572|517279|514377|514104|512992|511067|511017|510805|506346|510125|519537|526777|529595|532794|552787|519040|534196|511320|513932|67903180|52642468|51111421|51111422)", + ], + "card_number" => ["length" => 16, "validation" => "standard"], + "security_code" => [ + "card_location" => "back", + "length" => 3, + "mode" => "mandatory", + ], + ], + ], + "status" => "active", + "thumbnail" => + "https://http2.mlstatic.com/storage/logos-api-admin/157dce60-571b-11e8-95d8-631c1a9a92a9-xl.png", + ], + [ + "accreditation_time" => 2880, + "additional_info_needed" => ["cardholder_name"], + "deferred_capture" => "supported", + "financial_institutions" => [], + "id" => "amex", + "max_allowed_amount" => 300000, + "min_allowed_amount" => 1, + "name" => "American Express", + "payment_type_id" => "credit_card", + "processing_modes" => ["aggregator"], + "secure_thumbnail" => + "https://http2.mlstatic.com/storage/logos-api-admin/b2c93a40-f3be-11eb-9984-b7076edb0bb7-xl.png", + "settings" => [ + [ + "bin" => [ + "exclusion_pattern" => null, + "installments_pattern" => + "^(?!341595|376743|3603(2|4)|360732|36075(5|6)|360935|37159(3|5)|3747((5(8|9))|(62))|3751(3([0-9])|7(7|8))|3764((0([0-9]))|(1([0-8]))|(2(2|8|9))|(3(6|7))|(4[0-9]|5[0-8])|(6([1-7])|7[0-8]|8[0-9]|9(1|3)))|37652(0|9)|37660((1|2)|[5-9])|376((6(2[0-9]|3[5-9]|8[5-8]))|71[0-4])|3771(69|74)|37779[0-8]|3778(0[2-6]|1[3-6]|20)|37782(5|6)|3799(6[6-8]|7(5|7)))", + "pattern" => "^((34)|(37))", + ], + "card_number" => ["length" => 15, "validation" => "standard"], + "security_code" => [ + "card_location" => "front", + "length" => 4, + "mode" => "mandatory", + ], + ], + ], + "status" => "inactive", + "thumbnail" => + "https://http2.mlstatic.com/storage/logos-api-admin/b2c93a40-f3be-11eb-9984-b7076edb0bb7-xl.png", + ], + [ + "accreditation_time" => 0, + "additional_info_needed" => [], + "deferred_capture" => "does_not_apply", + "financial_institutions" => [["description" => "SPEI", "id" => "1"]], + "id" => "clabe", + "max_allowed_amount" => 5000, + "min_allowed_amount" => 1, + "name" => "STP", + "payment_type_id" => "bank_transfer", + "processing_modes" => ["aggregator"], + "secure_thumbnail" => + "https://www.mercadopago.com/org-img/MP3/API/logos/clabe.gif", + "settings" => [], + "status" => "active", + "thumbnail" => + "http://img.mlstatic.com/org-img/MP3/API/logos/clabe.gif", + ], + [ + "accreditation_time" => 0, + "additional_info_needed" => [ + "identification_type", + "identification_number", + "entity_type", + ], + "deferred_capture" => "unsupported", + "financial_institutions" => [], + "id" => "paycash", + "max_allowed_amount" => 10000, + "min_allowed_amount" => 20, + "name" => "PayCash", + "payment_places" => [ + [ + "payment_option_id" => "7eleven", + "name" => "7 Eleven", + "status" => "inactive", + "thumbnail" => + "https://http2.mlstatic.com/storage/logos-api-admin/417ddb90-34ab-11e9-b8b8-15cad73057aa-xl.png", + ], + [ + "payment_option_id" => "circlek", + "name" => "Circle K", + "status" => "active", + "thumbnail" => + "https://http2.mlstatic.com/storage/logos-api-admin/6f952c90-34ab-11e9-8357-f13e9b392369-xl.png", + ], + [ + "payment_option_id" => "soriana", + "name" => "Soriana", + "status" => "active", + "thumbnail" => + "https://http2.mlstatic.com/storage/logos-api-admin/dac0bf10-01eb-11ec-ad92-052532916206-xl.png", + ], + [ + "payment_option_id" => "extra", + "name" => "Extra", + "status" => "active", + "thumbnail" => + "https://http2.mlstatic.com/storage/logos-api-admin/9c8f26b0-34ab-11e9-b8b8-15cad73057aa-xl.png", + ], + [ + "payment_option_id" => "calimax", + "name" => "Calimax", + "status" => "inactive", + "thumbnail" => + "https://http2.mlstatic.com/storage/logos-api-admin/52efa730-01ec-11ec-ba6b-c5f27048193b-xl.png", + ], + ], + "payment_type_id" => "ticket", + "processing_modes" => ["aggregator"], + "secure_thumbnail" => + "https://http2.mlstatic.com/storage/logos-api-admin/23a95840-6817-11ec-a13d-73e40a9e9500-xl.png", + "settings" => [], + "status" => "active", + "thumbnail" => + "https://http2.mlstatic.com/storage/logos-api-admin/23a95840-6817-11ec-a13d-73e40a9e9500-xl.png", + ], + [ + "accreditation_time" => 2880, + "additional_info_needed" => ["cardholder_name"], + "deferred_capture" => "supported", + "financial_institutions" => [], + "id" => "visa", + "max_allowed_amount" => 300000, + "min_allowed_amount" => 5, + "name" => "Visa", + "payment_type_id" => "credit_card", + "processing_modes" => ["aggregator"], + "secure_thumbnail" => + "https://http2.mlstatic.com/storage/logos-api-admin/a5f047d0-9be0-11ec-aad4-c3381f368aaf-xl.png", + "settings" => [ + [ + "bin" => [ + "exclusion_pattern" => + "^(421747|427295|411117|411673|428575|428574|474494|498589|498590|498588|498587|492143|491580|491567|491566|491365|491344|491282|491089|490950|490256|485044|485043|483112|483104|483030|481517|481516|481279|480078|480076|480066|480062|479303|477961|477261|477177|477130|476890|476840|476687|476684|476588|474646|474176|474174|473993|471239|469693|469495|467596|466397|465829|465828|465762|465498|465497|465496|465495|462278|460766|460700|460068|459497|457476|457386|457249|455537|455533|455511|455510|455509|451312|449700|449187|446986|446985|446878|446118|446117|446116|446115|445017|445016|444889|444888|442192|441549|441545|441313|441312|438099|435769|434798|433454|433194|433126|432049|430967|429522|428464|426808|426188|425984|425983|422671|422299|421364|421316|421003|420807|419823|419822|419821|419335|419334|418928|418914|416916|415269|415231|413131|413098|412432|412294|411808|410177|410128|409851|408400|408343|408341|408340|407848|407612|405930|405689|405063|402766|400889|400820|400819|400443|400195|404313|420831|420839|443834|451015|440393|465283|412408|411608|406285|442177|482473|471724|490070|486796|486742|483316|483314|481689|481588|481582|480922|478200|474478|474477|474472|473703|473702|473622|470502|470132|467010|466188|465345|461046|445319|443045|443042|442788|442756|442742|436618|434769|434258|434257|434256|427088|420767|411775|411773|410894|410881|410277|404597|403130|402708|401906|401863|401531|400064)", + "installments_pattern" => + "^(?!(408245|416605|422582|405067|426174|492144)|4(0(0(022|1(0(3|4)|63|7(6|8)|85|99)|2(17|25|4(7|8)|68)|344|4(3(7|9)|49|75|89)|6(34|47|54|89)|770|970)|1(093|178|200|370|684)|2(145|400|7(02|8[5-8]|9(1(7|8)|37|44)))|3(2(17|25|4(6|7)|54)|338|784)|4(024|280|370)|5(0(37|71)|6(43|9[3-5]))|6(1(6(6|8))|263|6(55|69)|897|997)|7(3(0(3|4))|4(09|38)|505|618)|9(152|308|6(0[1-3]|9(0|3))|744|9(21|8(3|4))))|1(0(0(39|84)|39[0-2]|4(07|2(4|5))|718|863)|1(0(5(0|4)|93)|759|8(0(1|4)|54))|2(1(77|87)|345|79(1|3))|4(7(09|20|40|91))|5(2(7(4|5)|8(1|3))|328)|6(0(23|94)|4(1[4-7]|2(4|5)))|7(9(5[3-5]|98))|8(0(4(4|7|8|9)|53)|668)|9(1(48|89|90)|590|6(19|2(0|3|5|8))|806))|2(0(061|3(12|3(8|9)|4(0|1)|767))|1(3(09|55|65|79)|4(01|10)|5(71|91)|644|84[3-8]|9(5(8|9)|6(0|2|4|5)))|2(0(0[4-6]|1(1|2)|23|53|61)|1(0(0|1|3)|85)|2(0(0|1)|74)|463|754)|3(669|808|9(25|44))|4(631|96(5|6))|5(8(2(1|2)|50)|944)|6(055|451|6(84|90))|7(16(4|7))|8(26[7-9]|304)|9768)|3(0(023|49(5|6|7)|535|963)|1307|2(03([0-2]|5)|72(8|9)|959)|3(4(41|60)|8(07|1(0|2|7)|2(2|6)|3(0|1|3)|47))|4(25[6-8]|639|769|9(49|56|95))|6618|7846|8(001|2(2(8|9)|30)|85(4|7)|935)|9(0(13|2(0|7))|14(0|4)|2(5(2|3)|67|76)|3(54|8(8|9)|90)))|4(0(066|69|(3|4))|1(080|1(20|74)|524)|2(01(4|5)|174|312|644|7(42|75))|4(054|4(34|5[6-9])|796)|5596|6(54(0|2)|690|867)|7(198|4(09|10))|8(165|459|502|7(33|99))|9(1(19|28|37|88)))|5(0(0(03|60)|40(7|8)|553|6(26|37|68)|75(0|1)|8(15|3(2|3|8)|4(3|4)|78)|9(10|7(2|9)|80|9(4|5)))|1(248|3(0[7-9]|42)|4(46|51|76)|786)|2(4(07|8(7|8)))|3(211|562)|4(07[3-5]|148|4(25|5(0|1))|6(00|4[0-2]|5[7-9])|8(12|32|45|5(0|1)))|5(1(03|7(0|5|9)|8([1-5]|[7-9])|9[6-9])|349|599|788|98(3|6))|6(137|4(60|7(3|7))|5(13|6[4-6]|8[2-4])|815)|7(0(21|55)|29(1|3)|305|5(09|15)|631|9(3(7|8)|43))|8919|9(0(2(0|3)|60|7(7|8)|80)|3(1[3-6]|56|60|8(0|[3-5]))|4(1(8|9)|26|50)|50(4|5)|918))|6(003(4|5)|1(046|202)|2(080|239|937)|3(158|312)|4(018|29[4-9]|30(0|1))|5(375|7(63|70))|6(0(57|69|7(0|9)))|7(1(12|4(8|9))|481|793)|8(201|531)|9(7(0(0|1)|2(4|5)|7(1|2))|8(70|93)))|7(0(455|598|653)|1(70(1|3))|2(81(1|3))|3(2(00|4[6-8])|702)|4(472|5(12|25|3(8|9))|638)|5(393|491|776)|6(002|33[1-3]|5(07|39|40)|60(4|5|6|8)|993)|7(1(28|57|76)|2(50|72))|9(3(52|7[5-8]|95)))|8(158(2|3)|2(108|4(25|69|7(0|6|9)|81))|3(0(42|66)|1(01|54|61)|3(1(2|6)))|4(1(32|9(3|8)))|5(0(11|29)|4(64|82)|904)|6(422|510)|9(070|167|3(21|89|91)|4(23|67|89)|9(11|25)))|9(0(071|172|225|69(6|8))|1(2(56|68)|41(1|2)|51(1|4)|6(17|4(6|7)|69|7(4|5))|956)|2(0(43|52)|1(37|69|80)|210|306|964)|3(1(0[0-3])|1(0|6)|49(3|4)|7(02|1(5|7|9)|6(2|3|8)|7(0|1)|81)|813)|4(0(16|78)|17(2|3)|611)|6(0(34|45|79|80)|210|6(17|7(0|2)))|8(4(0(1|4|[6-8])|2(3|4)|3(0|1|4|5)|4(2|9)|5(2|3)|84|96)|5(34|54|82)|8(11|58|61))|9847)))", + "pattern" => "^4", + ], + "card_number" => ["length" => 16, "validation" => "standard"], + "security_code" => [ + "card_location" => "back", + "length" => 3, + "mode" => "mandatory", + ], + ], + ], + "status" => "active", + "thumbnail" => + "https://http2.mlstatic.com/storage/logos-api-admin/a5f047d0-9be0-11ec-aad4-c3381f368aaf-xl.png", + ], + [ + "accreditation_time" => 2880, + "additional_info_needed" => ["cardholder_name"], + "deferred_capture" => "supported", + "financial_institutions" => [], + "id" => "master", + "max_allowed_amount" => 300000, + "min_allowed_amount" => 5, + "name" => "Mastercard", + "payment_type_id" => "credit_card", + "processing_modes" => ["aggregator"], + "secure_thumbnail" => + "https://http2.mlstatic.com/storage/logos-api-admin/aa2b8f70-5c85-11ec-ae75-df2bef173be2-xl.png", + "settings" => [ + [ + "bin" => [ + "exclusion_pattern" => + "^(506458|555691|231018|506208|541562|230868|506202|539177|531198|542878|506437|543691|506341|554964|527374|544505|589617|588772|559471|558426|557991|557924|557923|557922|557921|557920|557910|557909|557908|557907|557906|557905|557875|557874|557604|557602|557561|557551|555924|554628|554627|554492|554173|553800|553467|551515|551509|551440|551353|551244|551238|551081|551077|550897|550233|549685|549672|549613|546378|545730|545325|545290|543924|539978|539975|539955|539944|538984|538405|538088|537938|537030|536783|535943|535900|534926|534381|533987|533922|533609|532485|531294|530686|530113|529575|529571|529093|529028|528598|528480|528430|528074|526498|526476|526424|526404|526400|526354|526197|526196|526194|526192|525678|524711|524021|523691|523595|520698|520694|520416|520116|518847|517795|517771|517747|517721|517712|517440|517439|516611|516594|516576|516415|516102|516016|512280|511852|511765|511761|511265|511114|510586|506449|506441|506439|506432|506429|506428|506427|506424|506423|506422|506421|506416|506415|506414|506413|506412|506411|506410|506407|506406|506405|506402|506399|506398|506397|506393|506392|506391|506389|506386|506384|506383|506380|506377|506374|506373|506367|506365|506364|506361|506356|506355|506354|506353|506352|506351|506350|506344|506343|506342|506340|506337|506336|506335|506334|506333|506332|506323|506320|506319|506314|506313|506312|506311|506309|506307|506306|506305|506304|506303|506302|506300|506297|506294|506287|506284|506283|506282|506280|506279|506278|506277|506275|506274|506273|506270|506269|506265|506263|506259|506258|506257|506255|506254|506253|506251|506250|506249|506247|506245|506236|506229|506228|506221|506218|506217|506215|506214|506213|506212|506206|506205|506204|506201|506199|504563|504536|502275|522312|522794|523013|577991|528877|601660|230884|230948|230951|557671|511391|557937|512422|539186|548843|536324|543451|528514|538756|554718|506483|531374|559213|557567|552486|550770|546249|546213|546150|542432|536219|531462|531260|530952|528749|527523|527515|526226|517572|517279|514377|514104|512992|511067|511017|510805|519040|512104|534196|547083|519203|545829|511320|513932)", + "installments_pattern" => + "^(?!(525343|530346|530346|534548|523216|523585|523941|510775|515779|515270|531437|532058|533212|534345|537174|513936|518800|510824|518271|512377|53666914|53666910|53666989|53666909|53666936|53666949|53666984|53666976|53666986|53666978|521411|545351|545054|552568|511916|511421|511052|555326|555607|558105|511747|547477|534629|506434|230958|558306|512912|545608|526777|526777|532794|529595|506444|514065|506442|534548|519111|522618|544875|514509|225100|506450|542917|551507|536286|(5(0(1105|2121|5861|67(2(6|7|8)|3(0|1)|4(1|8)|7(5|6|8))|90(5(1|9)|6[7-9]|91))|1(0(147|447|512|541)|1(623|708|7(39|40))|2(06(7|9)|107|267|3(3(1|2)|63|7(0|4)))|3(368|557)|4(0(0(4)|8(6|7))|322|8(68|95)|9(11|45|54))|5(073|11(7|8)|590|6(01|58)|7(67|87)|8(94))|6(0(64|70)|159|2(20|30|75|83|9(1|2))|376|478|585)|7(640|756|805|980)|8(148|2(77|94)|3(13|61)|4(54|82)|5(36|44)|664|7(59|6(1|7))|8(14|41|50)|9(14|50))|9(603|7(0(2|4)|1(0|4)|70)))|2(0(0(53|79)|1(32|56|84)|3(59|63)|4(0[0-3]|5)|898|9(77|95))|1(039|1(74|80)|3(12|7(0|3)|88|97)|5(09|2(3|4))|8(06|72|92))|2(073|135|273|4(46|99)|590|760|8(15|32|40)|97(2|8))|3(284|457|758|9(16|20|37))|4(003|348|70(2|3)|820)|5(320|4(25|8(6|9)|96)|6(31|40|6[2-4])|718|860|922)|6(396|549|7(69|78|8(7|8))|8(10|6(2|3)|92)|96(2|5|6|8))|7(4((05|06)|25|3(0|7)|6(2|8)|9[5-7])|5(15|33|72)|6(08|09|16|19|60|80|89|97))|8(052|209|392|400|5(87|99)|635|743|860)|9(053|2(05|85)|32(3|9)|86(1|7)|88(1|3|5)))|3(0(0(3(3|4|8)|58|7(2|3))|228|3(63|7(1|2|3))|452|57(4|5)|69(5|6)|780|841|99(4|8))|1(015|3(04|21)|448|6(54|6(3|4)|81)|705|966)|2(198|3(69|79|84|99)|473|817|9(24|30))|3(027|225|5(16|7(1|9))|728)|4(004|150|2(4|(6|9)|62)|447|5(03|1(3|6)|20|43|61|93))|5(0(16|8(1|5|8)|9(1|4|7))|106|32(3|7)|8(22|58|63|67|71))|6(087|143|2(33|69)|380|492|5(18|37)|650|805|969)|7(110|83(1|8))|8(8(07|18))|9(0(1(6|8)|2(8|9)|39|59|6(3|8)|73|83|9(0(0|1))|181|61(2|4)|9(09|19))))|4(0(0(64|78|84)|10(5|6)|168|47(6|7)|593|6(25|31|9(0|1|2|5))|782|9(05|19))|1(187|203|320|465|555|6(46|59|78|94)|7(19|59))|2(418|528|66(1|3)|7(02|19)|8(20|65)|9(74|76|91))|3(4(21|48)|565|696|8(06|55|85))|4(014|199|3(00|12|15)|5(40|70)|6(54|65)|7(31|64)|8(17|28|29|39|59|63|83|91)|9(08|15))|5(053|196|301|430|652|7(12|19|68)|8(10|32)|973)|6(056|4(52|79|99)|55(2|3)|6(16|24|38|89)|7(44|68)|852)|7(059|1(29|3(0|4)|4(1|2)|71)|369|408|874)|8(04(5|6)|166|2(62|93|95)|315|4(74|80)|5(73|9(0|1|5))|6(4(8|9)5(2|3))|7(2(3|4|9)|40|90)|8(2(4|6|7))|9(84|85|98))|9(0(12|20|51|70)|1(5(6|7|8|9)|6(2|3|7))|3(1(8|9)|2(8|9)|39|59|6(3|8)|83|9(0|1))|4(27|51)|585|828))|5(0(154|2(09|30)|568)|1000|2(072|1(28|67)|2(36|52|89|97)|3(0(0|5))|16|36|5(30|61)|6(40|68|93)|937)|3(0(07|96)|444|6(24|3(3|6|8|9)|4(3|5|6|8|9)|5(6|9)|6(5|8)|7(0|2|4)))|4(288|383|4(63|73|82)|61(0|2)|773|865|9(0(4|6)|17|27|3(2|3)|99))|5845|6615|7039|8(285|7(27|63))|9(198|202))|7(5809)|8(9(562|657|892|916))|9(0712)))))", + "pattern" => + "^(5|(286900)|(627180)|(2(221|222|223|224|225|226|227|228|229|23|24|25|26|27|28|29|3|4|5|6|70|71|720)))", + ], + "card_number" => ["length" => 16, "validation" => "standard"], + "security_code" => [ + "card_location" => "back", + "length" => 3, + "mode" => "mandatory", + ], + ], + ], + "status" => "active", + "thumbnail" => + "https://http2.mlstatic.com/storage/logos-api-admin/aa2b8f70-5c85-11ec-ae75-df2bef173be2-xl.png", + ], + [ + "accreditation_time" => 2880, + "additional_info_needed" => ["cardholder_name"], + "deferred_capture" => "unsupported", + "financial_institutions" => [], + "id" => "debvisa", + "max_allowed_amount" => 300000, + "min_allowed_amount" => 5, + "name" => "Visa Débito", + "payment_type_id" => "debit_card", + "processing_modes" => ["aggregator"], + "secure_thumbnail" => + "https://http2.mlstatic.com/storage/logos-api-admin/312238e0-571b-11e8-823a-758d95db88db-xl.png", + "settings" => [ + [ + "bin" => [ + "exclusion_pattern" => + "^(477130|400820|476684|476687|429522|49156649|49156648|49156647|49156646|49156645|49156644|49156643|49156642|49156641|49156640|49156639|49156638|49156637|49156636|49156635|49156634|49156633|49156632|49156631|49156630|49156629|49156628|49156627|49156626|49156625|49156624|49156623|49156622|49156621|49156620|49156619|49156618|49156617|49156616|49156615|49156614|49156613|49156612|49156611|49156610|49156609|49156608|49156607|49156606|49156605|49156604|49156603|49156602|49156601|49156600)", + "installments_pattern" => "", + "pattern" => + "^(498590|420807|412294|457476|471239|422299|479303|474646|460068|459497|438099|419335|419334|405063|481279|491344|444889|444888|465498|465497|465496|465495|426808|407848|492143|410128|485044|485043|426188|421003|408400|457249|419823|457386|480076|480066|415269|412432|400195|460766|460700|469693|445017|445016|446878|432049|413098|465762|407612|428464|435769|411673|420839|412408|411117|411608|421747|482473|402766|410177|455510|455533|455537|409851|415231|441313|455511|481516|408341|408343|411808|446116|446117|446118|481517|441312|446115|455509|498587|408340|441314|430967|474176|421316|483030|491089|491282|418914|418928|442192|491566|491567|491580|491365|476588|480078|433454|425984|425983|422671|449187|449700|405930|441545|441549|400889|467596|446985|446986|466397|469495|473993|476890|477177|477261|477961|490256|490950|404313|406285|442177|434798|474174|476840|480062|405689|433194|451312|433126|465829|465828|400443|420831|419822|483112|483104|419821|421364|416916|400819|471724|490070|486796|486742|483316|483314|481689|481588|481582|480922|478200|474478|474477|474472|473703|473702|473622|470502|470132|467010|466188|465345|461046|445319|443045|443042|442788|442756|442742|436618|434769|434258|434257|434256|427088|420767|411775|411773|410894|410881|410277|404597|403130|402708|401906|401863|401531|400064|41891431|41891430|41892810|41891410|47658885|49156699|49156698|49156697|49156696|49156695|49156694|49156693|49156692|49156691|49156690|49156689|49156688|49156687|49156686|49156685|49156684|49156683|49156682|49156681|49156680|49156679|49156678|49156677|49156676|49156675|49156674|49156673|49156672|49156671|49156670|49156669|49156668|49156667|49156666|49156665|49156664|49156663|49156662|49156661|49156660|49156659|49156658|49156657|49156656|49156655|49156654|49156653|49156652|49156651|49156650)", + ], + "card_number" => ["length" => 16, "validation" => "standard"], + "security_code" => [ + "card_location" => "back", + "length" => 3, + "mode" => "mandatory", + ], + ], + ], + "status" => "active", + "thumbnail" => + "https://http2.mlstatic.com/storage/logos-api-admin/312238e0-571b-11e8-823a-758d95db88db-xl.png", + ], + [ + "accreditation_time" => 60, + "additional_info_needed" => [], + "deferred_capture" => "does_not_apply", + "financial_institutions" => [], + "id" => "serfin", + "max_allowed_amount" => 40000, + "min_allowed_amount" => 5, + "name" => "Santander", + "payment_type_id" => "atm", + "processing_modes" => ["aggregator"], + "secure_thumbnail" => + "https://http2.mlstatic.com/storage/logos-api-admin/9eaa6660-f39b-11eb-8e0d-6f4af49bf82e-xl.png", + "settings" => [], + "status" => "inactive", + "thumbnail" => + "https://http2.mlstatic.com/storage/logos-api-admin/9eaa6660-f39b-11eb-8e0d-6f4af49bf82e-xl.png", + ], + [ + "accreditation_time" => 60, + "additional_info_needed" => [], + "deferred_capture" => "does_not_apply", + "financial_institutions" => [], + "id" => "bancomer", + "max_allowed_amount" => 40000, + "min_allowed_amount" => 10, + "name" => "BBVA Bancomer", + "payment_type_id" => "atm", + "processing_modes" => ["aggregator"], + "secure_thumbnail" => + "https://http2.mlstatic.com/storage/logos-api-admin/65467f50-5cf3-11ec-813c-8542a9aff8ea-xl.png", + "settings" => [], + "status" => "active", + "thumbnail" => + "https://http2.mlstatic.com/storage/logos-api-admin/65467f50-5cf3-11ec-813c-8542a9aff8ea-xl.png", + ], + [ + "accreditation_time" => 60, + "additional_info_needed" => [], + "deferred_capture" => "does_not_apply", + "financial_institutions" => [], + "id" => "banamex", + "max_allowed_amount" => 40000, + "min_allowed_amount" => 5, + "name" => "Citibanamex", + "payment_type_id" => "atm", + "processing_modes" => ["aggregator"], + "secure_thumbnail" => + "https://http2.mlstatic.com/storage/logos-api-admin/2b3223a0-eaf7-11eb-9a80-1175871fb85a-xl.png", + "settings" => [], + "status" => "active", + "thumbnail" => + "https://http2.mlstatic.com/storage/logos-api-admin/2b3223a0-eaf7-11eb-9a80-1175871fb85a-xl.png", + ], + [ + "accreditation_time" => 2880, + "additional_info_needed" => [], + "deferred_capture" => "does_not_apply", + "financial_institutions" => [], + "id" => "oxxo", + "max_allowed_amount" => 10000, + "min_allowed_amount" => 5, + "name" => "OXXO", + "payment_type_id" => "ticket", + "processing_modes" => ["aggregator"], + "secure_thumbnail" => + "https://http2.mlstatic.com/storage/logos-api-admin/91b830e0-f39b-11eb-9984-b7076edb0bb7-xl.png", + "settings" => [], + "status" => "inactive", + "thumbnail" => + "https://http2.mlstatic.com/storage/logos-api-admin/91b830e0-f39b-11eb-9984-b7076edb0bb7-xl.png", + ], + [ + "id" => "consumer_credits", + "name" => "Mercado Crédito", + "payment_type_id" => "digital_currency", + "secure_thumbnail" => + "http://img.mlstatic.com/org-img/MP3/API/logos/consumer_credits.gif", + "thumbnail" => + "http://img.mlstatic.com/org-img/MP3/API/logos/consumer_credits.gif", + ] + ] + ]; + + public const WITHOUT_PAYMENT_PLACES = [ + 'success' => true, + 'response' => [ + [ + "accreditation_time" => 2880, + "additional_info_needed" => [ + "cardholder_name", + "cardholder_identification_type", + "cardholder_identification_number", + ], + "deferred_capture" => "supported", + "financial_institutions" => [], + "id" => "visa", + "max_allowed_amount" => 60000, + "min_allowed_amount" => 0.5, + "name" => "Visa", + "payment_type_id" => "credit_card", + "processing_modes" => ["aggregator"], + "secure_thumbnail" => + "https://http2.mlstatic.com/storage/logos-api-admin/a5f047d0-9be0-11ec-aad4-c3381f368aaf-xl.png", + "settings" => [ + [ + "bin" => [ + "exclusion_pattern" => + "^(404025|412967|400163|400176|400178|400185|400199|423808|471233|473200|476332|482481|451416|438935|(40117[8-9])|(45763[1-2])|457393|431274|439267)", + "installments_pattern" => + "^(?!(417401|453998|426398|462437|451212|456188|435087|404025|409280|406176|478507|430360|451302|410349))", + "pattern" => "^(4|46348800)", + ], + "card_number" => ["length" => 16, "validation" => "standard"], + "security_code" => [ + "card_location" => "back", + "length" => 3, + "mode" => "mandatory", + ], + ], + ], + "status" => "active", + "thumbnail" => + "https://http2.mlstatic.com/storage/logos-api-admin/a5f047d0-9be0-11ec-aad4-c3381f368aaf-xl.png", + ], + [ + "accreditation_time" => 2880, + "additional_info_needed" => [ + "cardholder_name", + "cardholder_identification_type", + "cardholder_identification_number", + ], + "deferred_capture" => "supported", + "financial_institutions" => [], + "id" => "master", + "max_allowed_amount" => 60000, + "min_allowed_amount" => 0.5, + "name" => "Mastercard", + "payment_type_id" => "credit_card", + "processing_modes" => ["aggregator"], + "secure_thumbnail" => + "https://http2.mlstatic.com/storage/logos-api-admin/aa2b8f70-5c85-11ec-ae75-df2bef173be2-xl.png", + "settings" => [ + [ + "bin" => [ + "exclusion_pattern" => + "^(506704|545377|506706|506761|509887|526968|550207|528635|542652|502121|506721|506722|506776|536969|589916|(50670[7-8])|(506715)|(50671[7-9])|(50672[0-1])|(50672[4-9])|(50673[0-3])|(506739)|(50674[0-8])|(50675[0-3])|(50677[4-8])|(50900[0-9])|(50901[3-9])|(50902[0-9])|(50903[1-5])|(50903[8-9])|(50904[0-9])|(50905[0-9])|(50906[0-4])|(50906[6-9])|(50907[0-2])|(50907[4-5])|(504175)|(50907[6-9])|(50908[0-9])|(509[0-7][0-9]{2})|(509[8]0[0-9])|(50983[1-9])|(5098[4-6][0-9])|(5098[7][0-7])|(50989[7-9])|(509900)|(50991[8-9])|(5099[2-5][0-9])|(5099[6][0-4])|(50997[1-9])|(50998[0-6])|(50999[5-9])|509810)", + "installments_pattern" => + "^(?!(525823|525824|525834|527660|529133|529205|536390|513368|539131|529053|538450|538455|515675|549636|524886|546616|529115|511623|521580|527308|527648|528841|530551|533728|534300|539181|549622|528590|542865|538454|543299|549622|533728|230653|516129|527648|533519|557996|533433|511623|522157|529518|530551|546001|506704|506706|506761|509887|506754|509882|506760|506764|506755|509881|506758|506702|506700|506770|509880|506768|506766|506716|506771|506767|506762|506735|506699|506756|506723|509884|506772|506713|506773|506710|506765|509901|509885|509815|506763|506734|506714|506712|506711|509894|509812|506769|506759|506757|506701))", + "pattern" => + "^(5|(2(221|222|223|224|225|226|227|228|229|23|24|25|26|27|28|29|3|4|5|6|70|71|720)))", + ], + "card_number" => ["length" => 16, "validation" => "standard"], + "security_code" => [ + "card_location" => "back", + "length" => 3, + "mode" => "mandatory", + ], + ], + [ + "bin" => [ + "exclusion_pattern" => + "^(506704|545377|506706|506761|509887|506754|509882|506760|506764|506755|509881|506758|506702|506700|506770|509880|506768|506766|506716|506771|506767|506762|506735|506699|506756|506723|509884|506772|506713|506773|506710|506765|509901|509885|509815|506763|506734|506714|506712|506711|509894|509812|506769|506759|506757|506701)", + "installments_pattern" => + "^(?!(549622|533728|230653|516129|527648|533519|557996|533433|511623|522157|529518|530551|546001))", + "pattern" => "^(532884)", + ], + "card_number" => ["length" => 19, "validation" => "standard"], + "security_code" => [ + "card_location" => "back", + "length" => 3, + "mode" => "mandatory", + ], + ], + ], + "status" => "active", + "thumbnail" => + "https://http2.mlstatic.com/storage/logos-api-admin/aa2b8f70-5c85-11ec-ae75-df2bef173be2-xl.png", + ], + [ + "accreditation_time" => 2880, + "additional_info_needed" => [ + "cardholder_identification_type", + "cardholder_identification_number", + "cardholder_name", + ], + "deferred_capture" => "supported", + "financial_institutions" => [], + "id" => "hipercard", + "max_allowed_amount" => 60000, + "min_allowed_amount" => 0.5, + "name" => "Hipercard", + "payment_type_id" => "credit_card", + "processing_modes" => ["aggregator"], + "secure_thumbnail" => + "https://http2.mlstatic.com/storage/logos-api-admin/fcdc39d0-57ad-11e8-8359-5d73691de80c-xl.png", + "settings" => [ + [ + "bin" => [ + "exclusion_pattern" => null, + "installments_pattern" => + "^((606282)|(637095)|(637568)|(637599)|(637609)|(637612))", + "pattern" => + "^((606282)|(637095)|(637568)|(637599)|(637609)|(637612))", + ], + "card_number" => ["length" => 16, "validation" => "standard"], + "security_code" => [ + "card_location" => "back", + "length" => 3, + "mode" => "mandatory", + ], + ], + [ + "bin" => [ + "exclusion_pattern" => null, + "installments_pattern" => + "^((606282)|(637095)|(637568)|(637599)|(637609)|(637612))", + "pattern" => + "^((606282)|(637095)|(637568)|(637599)|(637609)|(637612))", + ], + "card_number" => ["length" => 16, "validation" => "standard"], + "security_code" => [ + "card_location" => "back", + "length" => 3, + "mode" => "mandatory", + ], + ], + ], + "status" => "active", + "thumbnail" => + "https://http2.mlstatic.com/storage/logos-api-admin/fcdc39d0-57ad-11e8-8359-5d73691de80c-xl.png", + ], + [ + "accreditation_time" => 2880, + "additional_info_needed" => [ + "cardholder_identification_type", + "cardholder_identification_number", + "cardholder_name", + ], + "deferred_capture" => "supported", + "financial_institutions" => [], + "id" => "amex", + "max_allowed_amount" => 60000, + "min_allowed_amount" => 0.5, + "name" => "American Express", + "payment_type_id" => "credit_card", + "processing_modes" => ["aggregator"], + "secure_thumbnail" => + "https://http2.mlstatic.com/storage/logos-api-admin/b2c93a40-f3be-11eb-9984-b7076edb0bb7-xl.png", + "settings" => [ + [ + "bin" => [ + "exclusion_pattern" => "^((384100)|(384140)|(384160))", + "installments_pattern" => + "^(374758|374759|374760|374761|374762|374767|374768|374769|375130|375131|375132|375133|375134|375135|375136|375137|375138|375177|375178|375365|376421|376422|376423|376424|376425|376426|376427|376428|376429|376440|376441|376442|376443|376444|376445|376446|376449|376461|376462|376463|376464|376465|376466|376467|376471|376472|376473|376474|376475|376476|376477|376478|376479|376480|376481|376482|376483|376484|376485|376486|376487|376488|376489|376491|376493|376520|376521|376522|376523|376524|376525|376526|376527|376528|376529|376619|376620|376621|376622|376623|376624|376625|376626|376627|376628|376629|377169|377174|379966|379967|379968)", + "pattern" => "^((34)|(37))", + ], + "card_number" => ["length" => 15, "validation" => "standard"], + "security_code" => [ + "card_location" => "front", + "length" => 4, + "mode" => "mandatory", + ], + ], + ], + "status" => "active", + "thumbnail" => + "https://http2.mlstatic.com/storage/logos-api-admin/b2c93a40-f3be-11eb-9984-b7076edb0bb7-xl.png", + ], + [ + "accreditation_time" => 2880, + "additional_info_needed" => [ + "cardholder_identification_number", + "cardholder_identification_type", + "cardholder_name", + ], + "deferred_capture" => "supported", + "financial_institutions" => [], + "id" => "elo", + "max_allowed_amount" => 60000, + "min_allowed_amount" => 0.5, + "name" => "Elo", + "payment_type_id" => "credit_card", + "processing_modes" => ["aggregator"], + "secure_thumbnail" => + "https://http2.mlstatic.com/storage/logos-api-admin/37f7b160-6278-11ec-ae75-df2bef173be2-xl.png", + "settings" => [ + [ + "bin" => [ + "exclusion_pattern" => + "^(509023|506704|506706|506761|509887|506754|509882|506760|506764|506755|509881|506758|506702|506700|506770|509880|506768|506766|506716|506771|506767|506762|506735|506699|506756|506723|509884|506772|506713|506773|506710|506765|509901|509885|509815|506763|506734|506714|506712|506711|509894|509812|506769|506759|506757|506701|650488)", + "installments_pattern" => + "^(?!(506721))|(506718|(506720)|(50672[4-9])|(50673[0-3])|506739|(50674[1-3])|(50674[5-7])|506753|(50677[4-5])|(50677[7-8])|(50900[0-2])|(50900[4-7])|509009|509014|(50902[0-9])|509030|(50903[5-9])|(50904[0-2])|(50904[4-9])|(50905[0-3])|509064|(50906[6-9])|509072|(50907[4-9])|(50908[0-3])|(50908[5-6])|(50909[1-2])|(50909[5-9])|(50910[0-1])|(50910[7-9])|(50911[0-9])|(50912[0-9])|(50913[0-9])|(50914[0-9])|(50915[0-9])|(50916[0-9])|(50917[0-9])|(50918[0-9])|(50919[0-9])|(50920[0-9])|(50921[0-9])|(50922[0-9])|(50923[0-9])|(50924[0-9])|(50925[0-6])|(50950[7-9])|(50951[0-9])|(50952[0-9])|(50953[0-9])|(50954[0-9])|(50955[0-9])|(50956[0-9])|(50957[0-9])|(50958[0-9])|(50959[0-9])|(50960[0-9])|(50961[0-9])|(50962[0-9])|(50963[0-9])|(50964[0-9])|(50965[0-9])|(50966[0-9])|(50967[0-9])|(50968[0-9])|(50969[0-9])|(50970[0-9])|(50971[0-9])|(50972[0-9])|(50973[0-9])|(50974[0-9])|(50975[0-9])|(50976[0-9])|(50977[0-9])|(50978[0-9])|(50979[0-9])|(50980[0-7])|636368|(65048[5-9])|(65049[0-9])|(65050[0-4])|(65050[6-9])|(65051[0-3])|(65051[8-9])|(65052[0-9])|(65053[0-8])|(65055[2-9])|(65056[0-9])|(65057[0-9])|(65058[0-9])|(65059[0-8])|(65072[0-7])|(65090[1-9])|(65091[0-9])|(65092[0-2])|650928|650939|(65094[6-9])|(65095[0-9])|(65096[0-9])|(65097[0-8])|(65165[2-9])|(65166[0-1])|(65166[3-9])|(65167[0-9])|(65168[0-9])|(65169[0-9])|(65170[0-4])|(65500[0-9])|(65501[0-1])|(65501[3-9])|(65502[1-9])|(65503[0-9])|(65504[0-9])|(65505[0-7]))", + "pattern" => + "^((50670[7-8])|506715|(50671[8-9])|(50672[0-1])|(50672[4-9])|(50673[0-3])|506739|(50674[1-3])|(50674[5-7])|506753|(50677[4-8])|(50900[0-2])|(50900[4-7])|509009|(50901[0-2])|509014|(50902[0-9])|509030|(50903[5-9])|(50904[0-2])|(50904[4-9])|(50905[0-9])|(50906[0-4])|(50906[6-9])|(50907[0-2])|(50907[4-9])|(50908[0-9])|(50909[1-2])|(50909[5-9])|(50910[0-1])|(50910[6-9])|(50911[0-9])|(50912[0-9])|(50913[0-9])|(50914[0-9])|(50915[0-9])|(50916[0-9])|(50917[0-9])|(50918[0-9])|(50919[0-9])|(50920[0-9])|(50921[0-9])|(50922[0-9])|(50923[0-9])|(50924[0-9])|(50925[0-9])|(50926[0-9])|(50927[0-9])|(50928[0-9])|(50929[0-9])|(50930[0-9])|(50931[0-9])|(50932[0-9])|(50933[0-9])|(50934[0-9])|(50935[0-9])|(50936[0-9])|(50937[0-9])|(50938[0-9])|(50939[0-9])|(50940[0-9])|(50941[0-9])|(50942[0-9])|(50943[0-9])|(50944[0-9])|(50945[0-9])|(50946[0-9])|(50947[0-9])|(50948[0-9])|(50949[0-9])|(50950[0-9])|(50951[0-9])|(50952[0-9])|(50953[0-9])|(50954[0-9])|(50955[0-9])|(50956[0-9])|(50957[0-9])|(50958[0-9])|(50959[0-9])|(50960[0-9])|(50961[0-9])|(50962[0-9])|(50963[0-9])|(50964[0-9])|(50965[0-9])|(50966[0-9])|(50967[0-9])|(50968[0-9])|(50969[0-9])|(50970[0-9])|(50971[0-9])|(50972[0-9])|(50973[0-9])|(50974[0-9])|(50975[0-9])|(50976[0-9])|(50977[0-9])|(50978[0-9])|(50979[0-9])|(50980[0-7])|(50983[1-9])|(50984[0-9])|(50985[0-9])|(50986[0-9])|(50987[0-7])|(50989[7-9])|509900|(50991[8-9])|(50992[0-9])|(50993[0-9])|(50994[0-9])|(50995[0-9])|(50996[0-4])|(50997[1-9])|(50998[0-6])|(50999[5-9])|636368|(65040[6-9])|(65041[0-9])|(65042[0-9])|(65043[0-9])|(65048[5-9])|(65049[0-9])|(65050[0-4])|(65050[6-9])|(65051[0-5])|(65051[8-9])|(65052[0-9])|(65053[0-8])|(65055[2-9])|(65056[0-9])|(65057[0-9])|(65058[0-9])|(65059[0-8])|(65072[0-7])|(65090[1-9])|(65091[0-9])|(65092[0-2])|650928|650939|(65094[6-9])|(65095[0-9])|(65096[0-9])|(65097[0-8])|(65165[2-9])|(65166[0-1])|(65166[3-9])|(65167[0-9])|(65168[0-9])|(65169[0-9])|(65170[0-4])|(65500[0-9])|(65501[0-1])|(65501[3-9])|(65502[1-9])|(65503[0-9])|(65504[0-9])|(65505[0-7])|(506704|506706|506761|509887|636297|65005800|65005900|506740))", + ], + "card_number" => ["length" => 16, "validation" => "standard"], + "security_code" => [ + "card_location" => "back", + "length" => 3, + "mode" => "mandatory", + ], + ], + ], + "status" => "active", + "thumbnail" => + "https://http2.mlstatic.com/storage/logos-api-admin/37f7b160-6278-11ec-ae75-df2bef173be2-xl.png", + ], + [ + "accreditation_time" => 0, + "additional_info_needed" => [], + "deferred_capture" => "does_not_apply", + "financial_institutions" => [["description" => "PIX", "id" => "1"]], + "id" => "pix", + "max_allowed_amount" => 9999999, + "min_allowed_amount" => 0.01, + "name" => "PIX", + "payment_type_id" => "bank_transfer", + "processing_modes" => ["aggregator"], + "secure_thumbnail" => + "https://http2.mlstatic.com/storage/logos-api-admin/200454b0-13c2-11eb-a75e-3f6b552aa946-xl.png", + "settings" => [], + "status" => "active", + "thumbnail" => + "https://http2.mlstatic.com/storage/logos-api-admin/200454b0-13c2-11eb-a75e-3f6b552aa946-xl.png", + ], + [ + "accreditation_time" => 60, + "additional_info_needed" => [ + "identification_type", + "identification_number", + "first_name", + "last_name", + ], + "deferred_capture" => "supported", + "financial_institutions" => [], + "id" => "pec", + "max_allowed_amount" => 2003.49, + "min_allowed_amount" => 4, + "name" => "Pagamento na lotérica sem boleto", + "payment_type_id" => "ticket", + "processing_modes" => ["aggregator"], + "secure_thumbnail" => + "https://http2.mlstatic.com/storage/logos-api-admin/70965f00-f3c2-11eb-a186-1134488bf456-xl.png", + "settings" => [], + "status" => "active", + "thumbnail" => + "https://http2.mlstatic.com/storage/logos-api-admin/70965f00-f3c2-11eb-a186-1134488bf456-xl.png", + ], + [ + "accreditation_time" => 1440, + "additional_info_needed" => [ + "identification_type", + "identification_number", + "first_name", + "last_name", + ], + "deferred_capture" => "does_not_apply", + "financial_institutions" => [], + "id" => "bolbradesco", + "max_allowed_amount" => 100000, + "min_allowed_amount" => 4, + "name" => "Boleto", + "payment_type_id" => "ticket", + "processing_modes" => ["aggregator"], + "secure_thumbnail" => + "https://http2.mlstatic.com/storage/logos-api-admin/00174300-571e-11e8-8364-bff51f08d440-xl.png", + "settings" => [], + "status" => "active", + "thumbnail" => + "https://http2.mlstatic.com/storage/logos-api-admin/00174300-571e-11e8-8364-bff51f08d440-xl.png", + ], + [ + "accreditation_time" => 2880, + "additional_info_needed" => [], + "deferred_capture" => "supported", + "financial_institutions" => [], + "id" => "account_money", + "max_allowed_amount" => 10000000, + "min_allowed_amount" => 0.01, + "name" => "Dinheiro na minha conta do MercadoPago", + "payment_type_id" => "account_money", + "processing_modes" => ["aggregator"], + "secure_thumbnail" => + "https://http2.mlstatic.com/storage/logos-api-admin/b4534650-571b-11e8-95d8-631c1a9a92a9-xl.png", + "settings" => [], + "status" => "active", + "thumbnail" => + "https://http2.mlstatic.com/storage/logos-api-admin/b4534650-571b-11e8-95d8-631c1a9a92a9-xl.png", + ], + [ + "accreditation_time" => 0, + "additional_info_needed" => [ + "cardholder_name", + "cardholder_identification_type", + "cardholder_identification_number", + ], + "deferred_capture" => "unsupported", + "financial_institutions" => [], + "id" => "debelo", + "max_allowed_amount" => 60000, + "min_allowed_amount" => 0.5, + "name" => "Elo Debito", + "payment_type_id" => "debit_card", + "processing_modes" => ["aggregator"], + "secure_thumbnail" => + "https://http2.mlstatic.com/storage/logos-api-admin/37f7b160-6278-11ec-ae75-df2bef173be2-xl.png", + "settings" => [ + [ + "bin" => [ + "exclusion_pattern" => null, + "installments_pattern" => "", + "pattern" => "^(506722|509023)", + ], + "card_number" => ["length" => 16, "validation" => "standard"], + "security_code" => [ + "card_location" => "back", + "length" => 3, + "mode" => "mandatory", + ], + ], + ], + "status" => "active", + "thumbnail" => + "https://http2.mlstatic.com/storage/logos-api-admin/37f7b160-6278-11ec-ae75-df2bef173be2-xl.png", + ], + [ + "id" => "consumer_credits", + "name" => "Mercado Crédito", + "payment_type_id" => "digital_currency", + "secure_thumbnail" => + "http://img.mlstatic.com/org-img/MP3/API/logos/consumer_credits.gif", + "thumbnail" => + "http://img.mlstatic.com/org-img/MP3/API/logos/consumer_credits.gif", + ] + ] + ]; + + public const WITHOUT_PAYMENT_PLACES_AND_WITH_INACTIVE = [ + 'success' => true, + 'response' => [ + [ + "accreditation_time" => 2880, + "additional_info_needed" => [ + "cardholder_name", + "cardholder_identification_type", + "cardholder_identification_number", + ], + "deferred_capture" => "supported", + "financial_institutions" => [], + "id" => "visa", + "max_allowed_amount" => 60000, + "min_allowed_amount" => 0.5, + "name" => "Visa", + "payment_type_id" => "credit_card", + "processing_modes" => ["aggregator"], + "secure_thumbnail" => + "https://http2.mlstatic.com/storage/logos-api-admin/a5f047d0-9be0-11ec-aad4-c3381f368aaf-xl.png", + "settings" => [ + [ + "bin" => [ + "exclusion_pattern" => + "^(404025|412967|400163|400176|400178|400185|400199|423808|471233|473200|476332|482481|451416|438935|(40117[8-9])|(45763[1-2])|457393|431274|439267)", + "installments_pattern" => + "^(?!(417401|453998|426398|462437|451212|456188|435087|404025|409280|406176|478507|430360|451302|410349))", + "pattern" => "^(4|46348800)", + ], + "card_number" => ["length" => 16, "validation" => "standard"], + "security_code" => [ + "card_location" => "back", + "length" => 3, + "mode" => "mandatory", + ], + ], + ], + "status" => "active", + "thumbnail" => + "https://http2.mlstatic.com/storage/logos-api-admin/a5f047d0-9be0-11ec-aad4-c3381f368aaf-xl.png", + ], + [ + "accreditation_time" => 2880, + "additional_info_needed" => [ + "cardholder_name", + "cardholder_identification_type", + "cardholder_identification_number", + ], + "deferred_capture" => "supported", + "financial_institutions" => [], + "id" => "master", + "max_allowed_amount" => 60000, + "min_allowed_amount" => 0.5, + "name" => "Mastercard", + "payment_type_id" => "credit_card", + "processing_modes" => ["aggregator"], + "secure_thumbnail" => + "https://http2.mlstatic.com/storage/logos-api-admin/aa2b8f70-5c85-11ec-ae75-df2bef173be2-xl.png", + "settings" => [ + [ + "bin" => [ + "exclusion_pattern" => + "^(506704|545377|506706|506761|509887|526968|550207|528635|542652|502121|506721|506722|506776|536969|589916|(50670[7-8])|(506715)|(50671[7-9])|(50672[0-1])|(50672[4-9])|(50673[0-3])|(506739)|(50674[0-8])|(50675[0-3])|(50677[4-8])|(50900[0-9])|(50901[3-9])|(50902[0-9])|(50903[1-5])|(50903[8-9])|(50904[0-9])|(50905[0-9])|(50906[0-4])|(50906[6-9])|(50907[0-2])|(50907[4-5])|(504175)|(50907[6-9])|(50908[0-9])|(509[0-7][0-9]{2})|(509[8]0[0-9])|(50983[1-9])|(5098[4-6][0-9])|(5098[7][0-7])|(50989[7-9])|(509900)|(50991[8-9])|(5099[2-5][0-9])|(5099[6][0-4])|(50997[1-9])|(50998[0-6])|(50999[5-9])|509810)", + "installments_pattern" => + "^(?!(525823|525824|525834|527660|529133|529205|536390|513368|539131|529053|538450|538455|515675|549636|524886|546616|529115|511623|521580|527308|527648|528841|530551|533728|534300|539181|549622|528590|542865|538454|543299|549622|533728|230653|516129|527648|533519|557996|533433|511623|522157|529518|530551|546001|506704|506706|506761|509887|506754|509882|506760|506764|506755|509881|506758|506702|506700|506770|509880|506768|506766|506716|506771|506767|506762|506735|506699|506756|506723|509884|506772|506713|506773|506710|506765|509901|509885|509815|506763|506734|506714|506712|506711|509894|509812|506769|506759|506757|506701))", + "pattern" => + "^(5|(2(221|222|223|224|225|226|227|228|229|23|24|25|26|27|28|29|3|4|5|6|70|71|720)))", + ], + "card_number" => ["length" => 16, "validation" => "standard"], + "security_code" => [ + "card_location" => "back", + "length" => 3, + "mode" => "mandatory", + ], + ], + [ + "bin" => [ + "exclusion_pattern" => + "^(506704|545377|506706|506761|509887|506754|509882|506760|506764|506755|509881|506758|506702|506700|506770|509880|506768|506766|506716|506771|506767|506762|506735|506699|506756|506723|509884|506772|506713|506773|506710|506765|509901|509885|509815|506763|506734|506714|506712|506711|509894|509812|506769|506759|506757|506701)", + "installments_pattern" => + "^(?!(549622|533728|230653|516129|527648|533519|557996|533433|511623|522157|529518|530551|546001))", + "pattern" => "^(532884)", + ], + "card_number" => ["length" => 19, "validation" => "standard"], + "security_code" => [ + "card_location" => "back", + "length" => 3, + "mode" => "mandatory", + ], + ], + ], + "status" => "active", + "thumbnail" => + "https://http2.mlstatic.com/storage/logos-api-admin/aa2b8f70-5c85-11ec-ae75-df2bef173be2-xl.png", + ], + [ + "accreditation_time" => 2880, + "additional_info_needed" => [ + "cardholder_identification_type", + "cardholder_identification_number", + "cardholder_name", + ], + "deferred_capture" => "supported", + "financial_institutions" => [], + "id" => "hipercard", + "max_allowed_amount" => 60000, + "min_allowed_amount" => 0.5, + "name" => "Hipercard", + "payment_type_id" => "credit_card", + "processing_modes" => ["aggregator"], + "secure_thumbnail" => + "https://http2.mlstatic.com/storage/logos-api-admin/fcdc39d0-57ad-11e8-8359-5d73691de80c-xl.png", + "settings" => [ + [ + "bin" => [ + "exclusion_pattern" => null, + "installments_pattern" => + "^((606282)|(637095)|(637568)|(637599)|(637609)|(637612))", + "pattern" => + "^((606282)|(637095)|(637568)|(637599)|(637609)|(637612))", + ], + "card_number" => ["length" => 16, "validation" => "standard"], + "security_code" => [ + "card_location" => "back", + "length" => 3, + "mode" => "mandatory", + ], + ], + [ + "bin" => [ + "exclusion_pattern" => null, + "installments_pattern" => + "^((606282)|(637095)|(637568)|(637599)|(637609)|(637612))", + "pattern" => + "^((606282)|(637095)|(637568)|(637599)|(637609)|(637612))", + ], + "card_number" => ["length" => 16, "validation" => "standard"], + "security_code" => [ + "card_location" => "back", + "length" => 3, + "mode" => "mandatory", + ], + ], + ], + "status" => "inactive", + "thumbnail" => + "https://http2.mlstatic.com/storage/logos-api-admin/fcdc39d0-57ad-11e8-8359-5d73691de80c-xl.png", + ], + [ + "accreditation_time" => 2880, + "additional_info_needed" => [ + "cardholder_identification_type", + "cardholder_identification_number", + "cardholder_name", + ], + "deferred_capture" => "supported", + "financial_institutions" => [], + "id" => "amex", + "max_allowed_amount" => 60000, + "min_allowed_amount" => 0.5, + "name" => "American Express", + "payment_type_id" => "credit_card", + "processing_modes" => ["aggregator"], + "secure_thumbnail" => + "https://http2.mlstatic.com/storage/logos-api-admin/b2c93a40-f3be-11eb-9984-b7076edb0bb7-xl.png", + "settings" => [ + [ + "bin" => [ + "exclusion_pattern" => "^((384100)|(384140)|(384160))", + "installments_pattern" => + "^(374758|374759|374760|374761|374762|374767|374768|374769|375130|375131|375132|375133|375134|375135|375136|375137|375138|375177|375178|375365|376421|376422|376423|376424|376425|376426|376427|376428|376429|376440|376441|376442|376443|376444|376445|376446|376449|376461|376462|376463|376464|376465|376466|376467|376471|376472|376473|376474|376475|376476|376477|376478|376479|376480|376481|376482|376483|376484|376485|376486|376487|376488|376489|376491|376493|376520|376521|376522|376523|376524|376525|376526|376527|376528|376529|376619|376620|376621|376622|376623|376624|376625|376626|376627|376628|376629|377169|377174|379966|379967|379968)", + "pattern" => "^((34)|(37))", + ], + "card_number" => ["length" => 15, "validation" => "standard"], + "security_code" => [ + "card_location" => "front", + "length" => 4, + "mode" => "mandatory", + ], + ], + ], + "status" => "active", + "thumbnail" => + "https://http2.mlstatic.com/storage/logos-api-admin/b2c93a40-f3be-11eb-9984-b7076edb0bb7-xl.png", + ], + [ + "accreditation_time" => 2880, + "additional_info_needed" => [ + "cardholder_identification_number", + "cardholder_identification_type", + "cardholder_name", + ], + "deferred_capture" => "supported", + "financial_institutions" => [], + "id" => "elo", + "max_allowed_amount" => 60000, + "min_allowed_amount" => 0.5, + "name" => "Elo", + "payment_type_id" => "credit_card", + "processing_modes" => ["aggregator"], + "secure_thumbnail" => + "https://http2.mlstatic.com/storage/logos-api-admin/37f7b160-6278-11ec-ae75-df2bef173be2-xl.png", + "settings" => [ + [ + "bin" => [ + "exclusion_pattern" => + "^(509023|506704|506706|506761|509887|506754|509882|506760|506764|506755|509881|506758|506702|506700|506770|509880|506768|506766|506716|506771|506767|506762|506735|506699|506756|506723|509884|506772|506713|506773|506710|506765|509901|509885|509815|506763|506734|506714|506712|506711|509894|509812|506769|506759|506757|506701|650488)", + "installments_pattern" => + "^(?!(506721))|(506718|(506720)|(50672[4-9])|(50673[0-3])|506739|(50674[1-3])|(50674[5-7])|506753|(50677[4-5])|(50677[7-8])|(50900[0-2])|(50900[4-7])|509009|509014|(50902[0-9])|509030|(50903[5-9])|(50904[0-2])|(50904[4-9])|(50905[0-3])|509064|(50906[6-9])|509072|(50907[4-9])|(50908[0-3])|(50908[5-6])|(50909[1-2])|(50909[5-9])|(50910[0-1])|(50910[7-9])|(50911[0-9])|(50912[0-9])|(50913[0-9])|(50914[0-9])|(50915[0-9])|(50916[0-9])|(50917[0-9])|(50918[0-9])|(50919[0-9])|(50920[0-9])|(50921[0-9])|(50922[0-9])|(50923[0-9])|(50924[0-9])|(50925[0-6])|(50950[7-9])|(50951[0-9])|(50952[0-9])|(50953[0-9])|(50954[0-9])|(50955[0-9])|(50956[0-9])|(50957[0-9])|(50958[0-9])|(50959[0-9])|(50960[0-9])|(50961[0-9])|(50962[0-9])|(50963[0-9])|(50964[0-9])|(50965[0-9])|(50966[0-9])|(50967[0-9])|(50968[0-9])|(50969[0-9])|(50970[0-9])|(50971[0-9])|(50972[0-9])|(50973[0-9])|(50974[0-9])|(50975[0-9])|(50976[0-9])|(50977[0-9])|(50978[0-9])|(50979[0-9])|(50980[0-7])|636368|(65048[5-9])|(65049[0-9])|(65050[0-4])|(65050[6-9])|(65051[0-3])|(65051[8-9])|(65052[0-9])|(65053[0-8])|(65055[2-9])|(65056[0-9])|(65057[0-9])|(65058[0-9])|(65059[0-8])|(65072[0-7])|(65090[1-9])|(65091[0-9])|(65092[0-2])|650928|650939|(65094[6-9])|(65095[0-9])|(65096[0-9])|(65097[0-8])|(65165[2-9])|(65166[0-1])|(65166[3-9])|(65167[0-9])|(65168[0-9])|(65169[0-9])|(65170[0-4])|(65500[0-9])|(65501[0-1])|(65501[3-9])|(65502[1-9])|(65503[0-9])|(65504[0-9])|(65505[0-7]))", + "pattern" => + "^((50670[7-8])|506715|(50671[8-9])|(50672[0-1])|(50672[4-9])|(50673[0-3])|506739|(50674[1-3])|(50674[5-7])|506753|(50677[4-8])|(50900[0-2])|(50900[4-7])|509009|(50901[0-2])|509014|(50902[0-9])|509030|(50903[5-9])|(50904[0-2])|(50904[4-9])|(50905[0-9])|(50906[0-4])|(50906[6-9])|(50907[0-2])|(50907[4-9])|(50908[0-9])|(50909[1-2])|(50909[5-9])|(50910[0-1])|(50910[6-9])|(50911[0-9])|(50912[0-9])|(50913[0-9])|(50914[0-9])|(50915[0-9])|(50916[0-9])|(50917[0-9])|(50918[0-9])|(50919[0-9])|(50920[0-9])|(50921[0-9])|(50922[0-9])|(50923[0-9])|(50924[0-9])|(50925[0-9])|(50926[0-9])|(50927[0-9])|(50928[0-9])|(50929[0-9])|(50930[0-9])|(50931[0-9])|(50932[0-9])|(50933[0-9])|(50934[0-9])|(50935[0-9])|(50936[0-9])|(50937[0-9])|(50938[0-9])|(50939[0-9])|(50940[0-9])|(50941[0-9])|(50942[0-9])|(50943[0-9])|(50944[0-9])|(50945[0-9])|(50946[0-9])|(50947[0-9])|(50948[0-9])|(50949[0-9])|(50950[0-9])|(50951[0-9])|(50952[0-9])|(50953[0-9])|(50954[0-9])|(50955[0-9])|(50956[0-9])|(50957[0-9])|(50958[0-9])|(50959[0-9])|(50960[0-9])|(50961[0-9])|(50962[0-9])|(50963[0-9])|(50964[0-9])|(50965[0-9])|(50966[0-9])|(50967[0-9])|(50968[0-9])|(50969[0-9])|(50970[0-9])|(50971[0-9])|(50972[0-9])|(50973[0-9])|(50974[0-9])|(50975[0-9])|(50976[0-9])|(50977[0-9])|(50978[0-9])|(50979[0-9])|(50980[0-7])|(50983[1-9])|(50984[0-9])|(50985[0-9])|(50986[0-9])|(50987[0-7])|(50989[7-9])|509900|(50991[8-9])|(50992[0-9])|(50993[0-9])|(50994[0-9])|(50995[0-9])|(50996[0-4])|(50997[1-9])|(50998[0-6])|(50999[5-9])|636368|(65040[6-9])|(65041[0-9])|(65042[0-9])|(65043[0-9])|(65048[5-9])|(65049[0-9])|(65050[0-4])|(65050[6-9])|(65051[0-5])|(65051[8-9])|(65052[0-9])|(65053[0-8])|(65055[2-9])|(65056[0-9])|(65057[0-9])|(65058[0-9])|(65059[0-8])|(65072[0-7])|(65090[1-9])|(65091[0-9])|(65092[0-2])|650928|650939|(65094[6-9])|(65095[0-9])|(65096[0-9])|(65097[0-8])|(65165[2-9])|(65166[0-1])|(65166[3-9])|(65167[0-9])|(65168[0-9])|(65169[0-9])|(65170[0-4])|(65500[0-9])|(65501[0-1])|(65501[3-9])|(65502[1-9])|(65503[0-9])|(65504[0-9])|(65505[0-7])|(506704|506706|506761|509887|636297|65005800|65005900|506740))", + ], + "card_number" => ["length" => 16, "validation" => "standard"], + "security_code" => [ + "card_location" => "back", + "length" => 3, + "mode" => "mandatory", + ], + ], + ], + "status" => "active", + "thumbnail" => + "https://http2.mlstatic.com/storage/logos-api-admin/37f7b160-6278-11ec-ae75-df2bef173be2-xl.png", + ], + [ + "accreditation_time" => 0, + "additional_info_needed" => [], + "deferred_capture" => "does_not_apply", + "financial_institutions" => [["description" => "PIX", "id" => "1"]], + "id" => "pix", + "max_allowed_amount" => 9999999, + "min_allowed_amount" => 0.01, + "name" => "PIX", + "payment_type_id" => "bank_transfer", + "processing_modes" => ["aggregator"], + "secure_thumbnail" => + "https://http2.mlstatic.com/storage/logos-api-admin/200454b0-13c2-11eb-a75e-3f6b552aa946-xl.png", + "settings" => [], + "status" => "active", + "thumbnail" => + "https://http2.mlstatic.com/storage/logos-api-admin/200454b0-13c2-11eb-a75e-3f6b552aa946-xl.png", + ], + [ + "accreditation_time" => 60, + "additional_info_needed" => [ + "identification_type", + "identification_number", + "first_name", + "last_name", + ], + "deferred_capture" => "supported", + "financial_institutions" => [], + "id" => "pec", + "max_allowed_amount" => 2003.49, + "min_allowed_amount" => 4, + "name" => "Pagamento na lotérica sem boleto", + "payment_type_id" => "ticket", + "processing_modes" => ["aggregator"], + "secure_thumbnail" => + "https://http2.mlstatic.com/storage/logos-api-admin/70965f00-f3c2-11eb-a186-1134488bf456-xl.png", + "settings" => [], + "status" => "inactive", + "thumbnail" => + "https://http2.mlstatic.com/storage/logos-api-admin/70965f00-f3c2-11eb-a186-1134488bf456-xl.png", + ], + [ + "accreditation_time" => 1440, + "additional_info_needed" => [ + "identification_type", + "identification_number", + "first_name", + "last_name", + ], + "deferred_capture" => "does_not_apply", + "financial_institutions" => [], + "id" => "bolbradesco", + "max_allowed_amount" => 100000, + "min_allowed_amount" => 4, + "name" => "Boleto", + "payment_type_id" => "ticket", + "processing_modes" => ["aggregator"], + "secure_thumbnail" => + "https://http2.mlstatic.com/storage/logos-api-admin/00174300-571e-11e8-8364-bff51f08d440-xl.png", + "settings" => [], + "status" => "active", + "thumbnail" => + "https://http2.mlstatic.com/storage/logos-api-admin/00174300-571e-11e8-8364-bff51f08d440-xl.png", + ], + [ + "accreditation_time" => 2880, + "additional_info_needed" => [], + "deferred_capture" => "supported", + "financial_institutions" => [], + "id" => "account_money", + "max_allowed_amount" => 10000000, + "min_allowed_amount" => 0.01, + "name" => "Dinheiro na minha conta do MercadoPago", + "payment_type_id" => "account_money", + "processing_modes" => ["aggregator"], + "secure_thumbnail" => + "https://http2.mlstatic.com/storage/logos-api-admin/b4534650-571b-11e8-95d8-631c1a9a92a9-xl.png", + "settings" => [], + "status" => "active", + "thumbnail" => + "https://http2.mlstatic.com/storage/logos-api-admin/b4534650-571b-11e8-95d8-631c1a9a92a9-xl.png", + ], + [ + "accreditation_time" => 0, + "additional_info_needed" => [ + "cardholder_name", + "cardholder_identification_type", + "cardholder_identification_number", + ], + "deferred_capture" => "unsupported", + "financial_institutions" => [], + "id" => "debelo", + "max_allowed_amount" => 60000, + "min_allowed_amount" => 0.5, + "name" => "Elo Debito", + "payment_type_id" => "debit_card", + "processing_modes" => ["aggregator"], + "secure_thumbnail" => + "https://http2.mlstatic.com/storage/logos-api-admin/37f7b160-6278-11ec-ae75-df2bef173be2-xl.png", + "settings" => [ + [ + "bin" => [ + "exclusion_pattern" => null, + "installments_pattern" => "", + "pattern" => "^(506722|509023)", + ], + "card_number" => ["length" => 16, "validation" => "standard"], + "security_code" => [ + "card_location" => "back", + "length" => 3, + "mode" => "mandatory", + ], + ], + ], + "status" => "active", + "thumbnail" => + "https://http2.mlstatic.com/storage/logos-api-admin/37f7b160-6278-11ec-ae75-df2bef173be2-xl.png", + ], + [ + "id" => "consumer_credits", + "name" => "Mercado Crédito", + "payment_type_id" => "digital_currency", + "secure_thumbnail" => + "http://img.mlstatic.com/org-img/MP3/API/logos/consumer_credits.gif", + "thumbnail" => + "http://img.mlstatic.com/org-img/MP3/API/logos/consumer_credits.gif", + ] + ] + ]; + + public const SUCCESS_FALSE = [ + 'success' => false, + 'response' => 'Fail get payment methods' + ]; +} diff --git a/Tests/Unit/Mocks/Model/Adminhtml/Source/PaymentMethodsOff/MountPaymentMethodsOffMock.php b/Tests/Unit/Mocks/Model/Adminhtml/Source/PaymentMethodsOff/MountPaymentMethodsOffMock.php new file mode 100644 index 0000000..c0a1117 --- /dev/null +++ b/Tests/Unit/Mocks/Model/Adminhtml/Source/PaymentMethodsOff/MountPaymentMethodsOffMock.php @@ -0,0 +1,86 @@ + [ + 'value' => "bolbradesco", + 'label' => "Boleto", + ], + 1 => [ + 'value' => "pec", + 'label' => "Pagamento na lotérica sem boleto", + ] + ]; + + public const EXPECTED_WITHOUT_PAYMENT_PLACES_AND_WITH_INACTIVE = [ + 0 => [ + 'value' => "bolbradesco", + 'label' => "Boleto", + ] + ]; + + public const EXPECTED_WITH_PAYMENT_PLACES = [ + 0 => [ + 'value' => "7eleven", + 'label' => "7 Eleven", + ], + 1 => [ + 'value' => "bancomer", + 'label' => "BBVA Bancomer", + ], + 2 => [ + 'value' => "calimax", + 'label' => "Calimax", + ], + 3 => [ + 'value' => "circlek", + 'label' => "Circle K", + ], + 4 => [ + 'value' => "banamex", + 'label' => "Citibanamex", + ], + 5 => [ + 'value' => "extra", + 'label' => "Extra", + ], + 6 => [ + 'value' => "oxxo", + 'label' => "OXXO", + ], + 7 => [ + 'value' => "serfin", + 'label' => "Santander", + ], + 8 => [ + 'value' => "soriana", + 'label' => "Soriana", + ] + ]; + + public const EXPECTED_WITH_PAYMENT_PLACES_AND_INACTIVE = [ + 0 => [ + 'value' => "bancomer", + 'label' => "BBVA Bancomer", + ], + 1 => [ + 'value' => "circlek", + 'label' => "Circle K", + ], + 2 => [ + 'value' => "banamex", + 'label' => "Citibanamex", + ], + 3 => [ + 'value' => "extra", + 'label' => "Extra", + ], + 4 => [ + 'value' => "soriana", + 'label' => "Soriana", + ] + ]; +} diff --git a/Tests/Unit/Mocks/Model/Adminhtml/Source/PaymentMethodsOff/ToOptionArrayMock.php b/Tests/Unit/Mocks/Model/Adminhtml/Source/PaymentMethodsOff/ToOptionArrayMock.php new file mode 100644 index 0000000..0efe1d4 --- /dev/null +++ b/Tests/Unit/Mocks/Model/Adminhtml/Source/PaymentMethodsOff/ToOptionArrayMock.php @@ -0,0 +1,102 @@ + [ + 'value' => null, + 'label' => 'Accept all payment methods', + ], + 1 => [ + 'value' => "bolbradesco", + 'label' => "Boleto", + ], + 2 => [ + 'value' => "pec", + 'label' => "Pagamento na lotérica sem boleto", + ] + ]; + + public const EXPECTED_WITHOUT_PAYMENT_PLACES_AND_WITH_INACTIVE = [ + 0 => [ + 'value' => null, + 'label' => 'Accept all payment methods', + ], + 1 => [ + 'value' => "bolbradesco", + 'label' => "Boleto", + ] + ]; + + public const EXPECTED_WITH_PAYMENT_PLACES = [ + 0 => [ + 'value' => null, + 'label' => 'Accept all payment methods', + ], + 1 => [ + 'value' => "7eleven", + 'label' => "7 Eleven", + ], + 2 => [ + 'value' => "bancomer", + 'label' => "BBVA Bancomer", + ], + 3 => [ + 'value' => "calimax", + 'label' => "Calimax", + ], + 4 => [ + 'value' => "circlek", + 'label' => "Circle K", + ], + 5 => [ + 'value' => "banamex", + 'label' => "Citibanamex", + ], + 6 => [ + 'value' => "extra", + 'label' => "Extra", + ], + 7 => [ + 'value' => "oxxo", + 'label' => "OXXO", + ], + 8 => [ + 'value' => "serfin", + 'label' => "Santander", + ], + 9 => [ + 'value' => "soriana", + 'label' => "Soriana", + ] + ]; + + public const EXPECTED_WITH_PAYMENT_PLACES_AND_INACTIVE = [ + 0 => [ + 'value' => null, + 'label' => 'Accept all payment methods', + ], + 1 => [ + 'value' => "bancomer", + 'label' => "BBVA Bancomer", + ], + 2 => [ + 'value' => "circlek", + 'label' => "Circle K", + ], + 3 => [ + 'value' => "banamex", + 'label' => "Citibanamex", + ], + 4 => [ + 'value' => "extra", + 'label' => "Extra", + ], + 5 => [ + 'value' => "soriana", + 'label' => "Soriana", + ] + ]; +} diff --git a/Tests/Unit/Mocks/Model/Ui/ConfigProviderPaymentMethodsOff/FilterPaymentMethodsOffConfigActiveMock.php b/Tests/Unit/Mocks/Model/Ui/ConfigProviderPaymentMethodsOff/FilterPaymentMethodsOffConfigActiveMock.php new file mode 100644 index 0000000..234e92b --- /dev/null +++ b/Tests/Unit/Mocks/Model/Ui/ConfigProviderPaymentMethodsOff/FilterPaymentMethodsOffConfigActiveMock.php @@ -0,0 +1,226 @@ + [ + 'value' => "7eleven", + 'label' => "7 Eleven", + 'logo' => "https://http2.mlstatic.com/storage/logos-api-admin/417ddb90-34ab-11e9-b8b8-15cad73057aa-xl.png", + 'payment_method_id' => "paycash", + 'payment_type_id' => "ticket", + 'payment_option_id' => '7eleven' + ], + 1 => [ + 'value' => "bancomer", + 'label' => "BBVA Bancomer", + 'logo' => "https://http2.mlstatic.com/storage/logos-api-admin/65467f50-5cf3-11ec-813c-8542a9aff8ea-xl.png", + 'payment_method_id' => "bancomer", + 'payment_type_id' => "atm" + ], + 2 => [ + 'value' => "calimax", + 'label' => "Calimax", + 'logo' => "https://http2.mlstatic.com/storage/logos-api-admin/52efa730-01ec-11ec-ba6b-c5f27048193b-xl.png", + 'payment_method_id' => "paycash", + 'payment_type_id' => "ticket", + 'payment_option_id' => 'calimax' + ], + 3 => [ + 'value' => "circlek", + 'label' => "Circle K", + 'logo' => "https://http2.mlstatic.com/storage/logos-api-admin/6f952c90-34ab-11e9-8357-f13e9b392369-xl.png", + 'payment_method_id' => "paycash", + 'payment_type_id' => "ticket", + 'payment_option_id' => 'circlek' + ], + 4 => [ + 'value' => "banamex", + 'label' => "Citibanamex", + 'logo' => "https://http2.mlstatic.com/storage/logos-api-admin/2b3223a0-eaf7-11eb-9a80-1175871fb85a-xl.png", + 'payment_method_id' => "banamex", + 'payment_type_id' => "atm" + ], + 5 => [ + 'value' => "extra", + 'label' => "Extra", + 'logo' => "https://http2.mlstatic.com/storage/logos-api-admin/9c8f26b0-34ab-11e9-b8b8-15cad73057aa-xl.png", + 'payment_method_id' => "paycash", + 'payment_type_id' => "ticket", + 'payment_option_id' => 'extra' + ], + 6 => [ + 'value' => "oxxo", + 'label' => "OXXO", + 'logo' => "https://http2.mlstatic.com/storage/logos-api-admin/91b830e0-f39b-11eb-9984-b7076edb0bb7-xl.png", + 'payment_method_id' => "oxxo", + 'payment_type_id' => "ticket" + ], + 7 => [ + 'value' => "serfin", + 'label' => "Santander", + 'logo' => "https://http2.mlstatic.com/storage/logos-api-admin/9eaa6660-f39b-11eb-8e0d-6f4af49bf82e-xl.png", + 'payment_method_id' => "serfin", + 'payment_type_id' => "atm" + ], + 8 => [ + 'value' => "soriana", + 'label' => "Soriana", + 'logo' => "https://http2.mlstatic.com/storage/logos-api-admin/dac0bf10-01eb-11ec-ad92-052532916206-xl.png", + 'payment_method_id' => "paycash", + 'payment_type_id' => "ticket", + 'payment_option_id' => 'soriana' + ] + ]; + + public const EXPECTED_WITH_7ELEVEN = [ + 0 => [ + 'value' => "7eleven", + 'label' => "7 Eleven", + 'logo' => "https://http2.mlstatic.com/storage/logos-api-admin/417ddb90-34ab-11e9-b8b8-15cad73057aa-xl.png", + 'payment_method_id' => "paycash", + 'payment_type_id' => "ticket", + 'payment_option_id' => '7eleven' + ] + ]; + + public const EXPECTED_WITH_7ELEVEN_SERFIN = [ + 0 => [ + 'value' => "7eleven", + 'label' => "7 Eleven", + 'logo' => "https://http2.mlstatic.com/storage/logos-api-admin/417ddb90-34ab-11e9-b8b8-15cad73057aa-xl.png", + 'payment_method_id' => "paycash", + 'payment_type_id' => "ticket", + 'payment_option_id' => '7eleven' + ], + 1 => [ + 'value' => "serfin", + 'label' => "Santander", + 'logo' => "https://http2.mlstatic.com/storage/logos-api-admin/9eaa6660-f39b-11eb-8e0d-6f4af49bf82e-xl.png", + 'payment_method_id' => "serfin", + 'payment_type_id' => "atm" + ], + ]; + + public const EXPECTED_PAYMENT_METHODS_WITHOUT_7ELEVEN = [ + 0 => [ + 'value' => "bancomer", + 'label' => "BBVA Bancomer", + 'logo' => "https://http2.mlstatic.com/storage/logos-api-admin/65467f50-5cf3-11ec-813c-8542a9aff8ea-xl.png", + 'payment_method_id' => "bancomer", + 'payment_type_id' => "atm" + ], + 1 => [ + 'value' => "calimax", + 'label' => "Calimax", + 'logo' => "https://http2.mlstatic.com/storage/logos-api-admin/52efa730-01ec-11ec-ba6b-c5f27048193b-xl.png", + 'payment_method_id' => "paycash", + 'payment_type_id' => "ticket", + 'payment_option_id' => 'calimax' + ], + 2 => [ + 'value' => "circlek", + 'label' => "Circle K", + 'logo' => "https://http2.mlstatic.com/storage/logos-api-admin/6f952c90-34ab-11e9-8357-f13e9b392369-xl.png", + 'payment_method_id' => "paycash", + 'payment_type_id' => "ticket", + 'payment_option_id' => 'circlek' + ], + 3 => [ + 'value' => "banamex", + 'label' => "Citibanamex", + 'logo' => "https://http2.mlstatic.com/storage/logos-api-admin/2b3223a0-eaf7-11eb-9a80-1175871fb85a-xl.png", + 'payment_method_id' => "banamex", + 'payment_type_id' => "atm" + ], + 4 => [ + 'value' => "extra", + 'label' => "Extra", + 'logo' => "https://http2.mlstatic.com/storage/logos-api-admin/9c8f26b0-34ab-11e9-b8b8-15cad73057aa-xl.png", + 'payment_method_id' => "paycash", + 'payment_type_id' => "ticket", + 'payment_option_id' => 'extra' + ], + 5 => [ + 'value' => "oxxo", + 'label' => "OXXO", + 'logo' => "https://http2.mlstatic.com/storage/logos-api-admin/91b830e0-f39b-11eb-9984-b7076edb0bb7-xl.png", + 'payment_method_id' => "oxxo", + 'payment_type_id' => "ticket" + ], + 6 => [ + 'value' => "serfin", + 'label' => "Santander", + 'logo' => "https://http2.mlstatic.com/storage/logos-api-admin/9eaa6660-f39b-11eb-8e0d-6f4af49bf82e-xl.png", + 'payment_method_id' => "serfin", + 'payment_type_id' => "atm" + ], + 7 => [ + 'value' => "soriana", + 'label' => "Soriana", + 'logo' => "https://http2.mlstatic.com/storage/logos-api-admin/dac0bf10-01eb-11ec-ad92-052532916206-xl.png", + 'payment_method_id' => "paycash", + 'payment_type_id' => "ticket", + 'payment_option_id' => 'soriana' + ] + ]; + + public const EXPECTED_PAYMENT_METHODS_WITHOUT_7ELEVEN_AND_SERFIN = [ + 0 => [ + 'value' => "bancomer", + 'label' => "BBVA Bancomer", + 'logo' => "https://http2.mlstatic.com/storage/logos-api-admin/65467f50-5cf3-11ec-813c-8542a9aff8ea-xl.png", + 'payment_method_id' => "bancomer", + 'payment_type_id' => "atm" + ], + 1 => [ + 'value' => "calimax", + 'label' => "Calimax", + 'logo' => "https://http2.mlstatic.com/storage/logos-api-admin/52efa730-01ec-11ec-ba6b-c5f27048193b-xl.png", + 'payment_method_id' => "paycash", + 'payment_type_id' => "ticket", + 'payment_option_id' => 'calimax' + ], + 2 => [ + 'value' => "circlek", + 'label' => "Circle K", + 'logo' => "https://http2.mlstatic.com/storage/logos-api-admin/6f952c90-34ab-11e9-8357-f13e9b392369-xl.png", + 'payment_method_id' => "paycash", + 'payment_type_id' => "ticket", + 'payment_option_id' => 'circlek' + ], + 3 => [ + 'value' => "banamex", + 'label' => "Citibanamex", + 'logo' => "https://http2.mlstatic.com/storage/logos-api-admin/2b3223a0-eaf7-11eb-9a80-1175871fb85a-xl.png", + 'payment_method_id' => "banamex", + 'payment_type_id' => "atm" + ], + 4 => [ + 'value' => "extra", + 'label' => "Extra", + 'logo' => "https://http2.mlstatic.com/storage/logos-api-admin/9c8f26b0-34ab-11e9-b8b8-15cad73057aa-xl.png", + 'payment_method_id' => "paycash", + 'payment_type_id' => "ticket", + 'payment_option_id' => 'extra' + ], + 5 => [ + 'value' => "oxxo", + 'label' => "OXXO", + 'logo' => "https://http2.mlstatic.com/storage/logos-api-admin/91b830e0-f39b-11eb-9984-b7076edb0bb7-xl.png", + 'payment_method_id' => "oxxo", + 'payment_type_id' => "ticket" + ], + 6 => [ + 'value' => "soriana", + 'label' => "Soriana", + 'logo' => "https://http2.mlstatic.com/storage/logos-api-admin/dac0bf10-01eb-11ec-ad92-052532916206-xl.png", + 'payment_method_id' => "paycash", + 'payment_type_id' => "ticket", + 'payment_option_id' => 'soriana' + ] + ]; + +} diff --git a/Tests/Unit/Mocks/Model/Ui/ConfigProviderPaymentMethodsOff/MountPaymentMethodsOffMock.php b/Tests/Unit/Mocks/Model/Ui/ConfigProviderPaymentMethodsOff/MountPaymentMethodsOffMock.php new file mode 100644 index 0000000..b96e89d --- /dev/null +++ b/Tests/Unit/Mocks/Model/Ui/ConfigProviderPaymentMethodsOff/MountPaymentMethodsOffMock.php @@ -0,0 +1,145 @@ + [ + 'value' => "bolbradesco", + 'label' => "Boleto", + 'logo' => "https://http2.mlstatic.com/storage/logos-api-admin/00174300-571e-11e8-8364-bff51f08d440-xl.png", + 'payment_method_id' => "bolbradesco", + 'payment_type_id' => "ticket" + ], + 1 => [ + 'value' => "pec", + 'label' => "Pagamento na lotérica sem boleto", + 'logo' => "https://http2.mlstatic.com/storage/logos-api-admin/70965f00-f3c2-11eb-a186-1134488bf456-xl.png", + 'payment_method_id' => "pec", + 'payment_type_id' => "ticket" + ] + ]; + + public const EXPECTED_WITHOUT_PAYMENT_PLACES_AND_WITH_INACTIVE = [ + 0 => [ + 'value' => "bolbradesco", + 'label' => "Boleto", + 'logo' => "https://http2.mlstatic.com/storage/logos-api-admin/00174300-571e-11e8-8364-bff51f08d440-xl.png", + 'payment_method_id' => "bolbradesco", + 'payment_type_id' => "ticket" + ] + ]; + + public const EXPECTED_WITH_PAYMENT_PLACES = [ + 0 => [ + 'value' => "7eleven", + 'label' => "7 Eleven", + 'logo' => "https://http2.mlstatic.com/storage/logos-api-admin/417ddb90-34ab-11e9-b8b8-15cad73057aa-xl.png", + 'payment_method_id' => "paycash", + 'payment_type_id' => "ticket", + 'payment_option_id' => '7eleven' + ], + 1 => [ + 'value' => "bancomer", + 'label' => "BBVA Bancomer", + 'logo' => "https://http2.mlstatic.com/storage/logos-api-admin/65467f50-5cf3-11ec-813c-8542a9aff8ea-xl.png", + 'payment_method_id' => "bancomer", + 'payment_type_id' => "atm" + ], + 2 => [ + 'value' => "calimax", + 'label' => "Calimax", + 'logo' => "https://http2.mlstatic.com/storage/logos-api-admin/52efa730-01ec-11ec-ba6b-c5f27048193b-xl.png", + 'payment_method_id' => "paycash", + 'payment_type_id' => "ticket", + 'payment_option_id' => 'calimax' + ], + 3 => [ + 'value' => "circlek", + 'label' => "Circle K", + 'logo' => "https://http2.mlstatic.com/storage/logos-api-admin/6f952c90-34ab-11e9-8357-f13e9b392369-xl.png", + 'payment_method_id' => "paycash", + 'payment_type_id' => "ticket", + 'payment_option_id' => 'circlek' + ], + 4 => [ + 'value' => "banamex", + 'label' => "Citibanamex", + 'logo' => "https://http2.mlstatic.com/storage/logos-api-admin/2b3223a0-eaf7-11eb-9a80-1175871fb85a-xl.png", + 'payment_method_id' => "banamex", + 'payment_type_id' => "atm" + ], + 5 => [ + 'value' => "extra", + 'label' => "Extra", + 'logo' => "https://http2.mlstatic.com/storage/logos-api-admin/9c8f26b0-34ab-11e9-b8b8-15cad73057aa-xl.png", + 'payment_method_id' => "paycash", + 'payment_type_id' => "ticket", + 'payment_option_id' => 'extra' + ], + 6 => [ + 'value' => "oxxo", + 'label' => "OXXO", + 'logo' => "https://http2.mlstatic.com/storage/logos-api-admin/91b830e0-f39b-11eb-9984-b7076edb0bb7-xl.png", + 'payment_method_id' => "oxxo", + 'payment_type_id' => "ticket" + ], + 7 => [ + 'value' => "serfin", + 'label' => "Santander", + 'logo' => "https://http2.mlstatic.com/storage/logos-api-admin/9eaa6660-f39b-11eb-8e0d-6f4af49bf82e-xl.png", + 'payment_method_id' => "serfin", + 'payment_type_id' => "atm" + ], + 8 => [ + 'value' => "soriana", + 'label' => "Soriana", + 'logo' => "https://http2.mlstatic.com/storage/logos-api-admin/dac0bf10-01eb-11ec-ad92-052532916206-xl.png", + 'payment_method_id' => "paycash", + 'payment_type_id' => "ticket", + 'payment_option_id' => 'soriana' + ] + ]; + + public const EXPECTED_WITH_PAYMENT_PLACES_AND_INACTIVE = [ + 0 => [ + 'value' => "bancomer", + 'label' => "BBVA Bancomer", + 'logo' => "https://http2.mlstatic.com/storage/logos-api-admin/65467f50-5cf3-11ec-813c-8542a9aff8ea-xl.png", + 'payment_method_id' => "bancomer", + 'payment_type_id' => "atm" + ], + 1 => [ + 'value' => "circlek", + 'label' => "Circle K", + 'logo' => "https://http2.mlstatic.com/storage/logos-api-admin/6f952c90-34ab-11e9-8357-f13e9b392369-xl.png", + 'payment_method_id' => "paycash", + 'payment_type_id' => "ticket", + 'payment_option_id' => 'circlek' + ], + 2 => [ + 'value' => "banamex", + 'label' => "Citibanamex", + 'logo' => "https://http2.mlstatic.com/storage/logos-api-admin/2b3223a0-eaf7-11eb-9a80-1175871fb85a-xl.png", + 'payment_method_id' => "banamex", + 'payment_type_id' => "atm" + ], + 3 => [ + 'value' => "extra", + 'label' => "Extra", + 'logo' => "https://http2.mlstatic.com/storage/logos-api-admin/9c8f26b0-34ab-11e9-b8b8-15cad73057aa-xl.png", + 'payment_method_id' => "paycash", + 'payment_type_id' => "ticket", + 'payment_option_id' => 'extra' + ], + 4 => [ + 'value' => "soriana", + 'label' => "Soriana", + 'logo' => "https://http2.mlstatic.com/storage/logos-api-admin/dac0bf10-01eb-11ec-ad92-052532916206-xl.png", + 'payment_method_id' => "paycash", + 'payment_type_id' => "ticket", + 'payment_option_id' => 'soriana' + ] + ]; +} diff --git a/Tests/Unit/Mocks/PaymentRefundMock.php b/Tests/Unit/Mocks/PaymentRefundMock.php new file mode 100644 index 0000000..f51089c --- /dev/null +++ b/Tests/Unit/Mocks/PaymentRefundMock.php @@ -0,0 +1,40 @@ + 5, + ]; + + public const PAYMENT_REFUND_RESPONSE_MOCK = [ + "id" => 1009042015, + "payment_id" => 18552260055, + "amount" => 10, + "metadata" => [ + [] + ], + "source" => [ + [ + "name" => "Nome e sobrenome", + "id" => "1003743392", + "type" => "collector" + ] + ], + "date_created" => "2021-11-24T13:58:49.312-04:00", + "unique_sequence_number" => null, + "refund_mode" => "standard", + "adjustment_amount" => 0, + "status" => "approved", + "reason" => null, + "label" => [ + [] + ], + "partition_details" => [ + [] + ] + ]; + +} \ No newline at end of file diff --git a/Tests/Unit/Mocks/PaymentRequestMock.php b/Tests/Unit/Mocks/PaymentRequestMock.php new file mode 100644 index 0000000..df390df --- /dev/null +++ b/Tests/Unit/Mocks/PaymentRequestMock.php @@ -0,0 +1,60 @@ + [ + "items" => [ + [ + "id" => "MLB2907679857", + "title" => "Point Mini", + "description" => "Producto Point para cobros con tarjetas mediante bluetooth", + "picture_url" => "https://http2.mlstatic.com/resources/frontend/statics/growth-sellers-landings/device-mlb-point-i_medium@2x.png", + "category_id" => "electronics", + "quantity" => 1, + "unit_price" => 58.8 + ] + ], + "payer" => [ + "first_name" => "Test", + "last_name" => "Test", + "phone" => [ + "area_code" => 11, + "number" => "987654321" + ], + "address" => [] + ], + "shipments" => [ + "receiver_address" => [ + "zip_code" => "12312-123", + "state_name" => "Rio de Janeiro", + "city_name" => "Buzios", + "street_name" => "Av das Nacoes Unidas", + "street_number" => 3003 + ] + ], + "barcode" => [] + ], + "description" => "Payment for product", + "external_reference" => "MP0001", + "installments" => 1, + "metadata" => [], + "payer" => [ + "entity_type" => "individual", + "type" => "customer", + "identification" => [] + ], + "payment_method_id" => "visa", + "transaction_amount" => 58.8 +]; + +} \ No newline at end of file diff --git a/Tests/Unit/Mocks/PaymentResponseMock.php b/Tests/Unit/Mocks/PaymentResponseMock.php new file mode 100644 index 0000000..3100115 --- /dev/null +++ b/Tests/Unit/Mocks/PaymentResponseMock.php @@ -0,0 +1,105 @@ + 20359978, + "date_created" => "2019-07-10T14:47:58.000Z", + "date_approved" => "2019-07-10T14:47:58.000Z", + "date_last_updated" => "2019-07-10T14:47:58.000Z", + "money_release_date" => "2019-07-24T14:47:58.000Z", + "issuer_id" => 25, + "payment_method_id" => "visa", + "payment_type_id" => "credit_card", + "status" => "approved", + "status_detail" => "accredited", + "currency_id" => "BRL", + "description" => "Point Mini a maquininha que dá o dinheiro de suas vendas na hora.", + "taxes_amount" => 0, + "shipping_amount" => 0, + "collector_id" => 448876418, + "payer" => [ + "id" => 123, + "email" => "test_user_80507629@testuser.com", + "identification" => [ + "number" => 19119119100, + "type" => "CPF" + ], + "type" => "customer" + ], + "metadata" => [], + "additional_info" => [ + "items" => [ + [ + "id" => "PR0001", + "title" => "Point Mini", + "description" => "Producto Point para cobros con tarjetas mediante bluetooth", + "picture_url" => "https://http2.mlstatic.com/resources/frontend/statics/growth-sellers-landings/device-mlb-point-i_medium@2x.png", + "category_id" => "electronics", + "quantity" => 1, + "unit_price" => 58.8 + ] + ], + "payer" => [ + "registration_date" => "2019-01-01T15:01:01.000Z" + ], + "shipments" => [ + "receiver_address" => [ + "street_name" => "Av das Nacoes Unidas", + "street_number" => 3003, + "zip_code" => 6233200, + "city_name" => "Buzios", + "state_name" => "Rio de Janeiro" + ] + ] + ], + "external_reference" => "MP0001", + "transaction_amount" => 58.8, + "transaction_amount_refunded" => 0, + "coupon_amount" => 0, + "transaction_details" => [ + "net_received_amount" => 56.16, + "total_paid_amount" => 58.8, + "overpaid_amount" => 0, + "installment_amount" => 58.8 + ], + "fee_details" => [ + [ + "type" => "coupon_fee", + "amount" => 2.64, + "fee_payer" => "payer" + ] + ], + "statement_descriptor" => "MercadoPago", + "installments" => 1, + "card" => [ + "first_six_digits" => 423564, + "last_four_digits" => 5682, + "expiration_month" => 6, + "expiration_year" => 2023, + "date_created" => "2019-07-10T14:47:58.000Z", + "date_last_updated" => "2019-07-10T14:47:58.000Z", + "cardholder" => [ + "name" => "APRO", + "identification" => [ + "number" => 19119119100, + "type" => "CPF" + ] + ] + ], + "notification_url" => "https://www.suaurl.com/notificacoes/", + "processing_mode" => "aggregator", + "point_of_interaction" => [ + "type" => "PIX", + "application_data" => [ + "name" => "NAME_SDK", + "version" => "VERSION_NUMBER" + ] + ] + ]; + +} \ No newline at end of file diff --git a/Tests/Unit/Model/Adminhtml/Source/PaymentMethodsOffTest.php b/Tests/Unit/Model/Adminhtml/Source/PaymentMethodsOffTest.php new file mode 100644 index 0000000..f23a0da --- /dev/null +++ b/Tests/Unit/Model/Adminhtml/Source/PaymentMethodsOffTest.php @@ -0,0 +1,193 @@ +mpConfigMock = $this->getMockBuilder(MercadoPagoConfig::class)->disableOriginalConstructor()->getMock(); + + $this->requestMock = $this->getMockBuilder(RequestInterface::class)->disableOriginalConstructor()->getMock(); + $this->requestMock->expects($this->any()) + ->method('getParam') + ->with('store', 0) + ->willReturn(1); + + $this->methodsOffMock = $this->getMockBuilder(PaymentMethodsOff::class)->setConstructorArgs([ + 'request' => $this->requestMock, + 'mercadopagoConfig' => $this->mpConfigMock + ])->getMock(); + + $this->paymentMethodsOff = new PaymentMethodsOff( + $this->requestMock, + $this->mpConfigMock + ); + } + + + /** + * Tests function toOptionArray() + */ + + public function testToOptionArrayJustDefaultValue(): void + { + $this->mpConfigMock->expects($this->any()) + ->method('getMpPaymentMethods') + ->with(1) + ->willReturn(PaymentMethodsResponseMock::SUCCESS_FALSE); + + $this->paymentMethodsOff = new PaymentMethodsOff( + $this->requestMock, + $this->mpConfigMock + ); + + $result = $this->paymentMethodsOff->toOptionArray(); + + $this->assertCount(1, $result); + $this->assertArrayHasKey('value', $result[0]); + $this->assertArrayHasKey('label', $result[0]); + $this->assertNull($result[0]['value']); + } + + public function testToOptionArrayWithoutPaymentPlaces(): void + { + $this->mpConfigMock->expects($this->any()) + ->method('getMpPaymentMethods') + ->with(1) + ->willReturn(PaymentMethodsResponseMock::WITHOUT_PAYMENT_PLACES); + + $this->paymentMethodsOff = new PaymentMethodsOff( + $this->requestMock, + $this->mpConfigMock + ); + + $result = $this->paymentMethodsOff->toOptionArray(); + + $this->assertEquals(ToOptionArrayMock::EXPECTED_WITHOUT_PAYMENT_PLACES, $result); + } + + public function testToOptionArrayWithPaymentPlaces(): void + { + $this->mpConfigMock->expects($this->any()) + ->method('getMpPaymentMethods') + ->with(1) + ->willReturn(PaymentMethodsResponseMock::WITH_PAYMENT_PLACES); + + $this->paymentMethodsOff = new PaymentMethodsOff( + $this->requestMock, + $this->mpConfigMock + ); + + $result = $this->paymentMethodsOff->toOptionArray(); + + $this->assertEquals(ToOptionArrayMock::EXPECTED_WITH_PAYMENT_PLACES, $result); + } + + public function testToOptionArrayWithoutPaymentPlacesAndWithInactive(): void + { + $this->mpConfigMock->expects($this->any()) + ->method('getMpPaymentMethods') + ->with(1) + ->willReturn(PaymentMethodsResponseMock::WITHOUT_PAYMENT_PLACES_AND_WITH_INACTIVE); + + $this->paymentMethodsOff = new PaymentMethodsOff( + $this->requestMock, + $this->mpConfigMock + ); + + $result = $this->paymentMethodsOff->toOptionArray(); + + $this->assertEquals(ToOptionArrayMock::EXPECTED_WITHOUT_PAYMENT_PLACES_AND_WITH_INACTIVE, $result); + } + + public function testToOptionArrayWithPaymentPlacesAndInactive(): void + { + $this->mpConfigMock->expects($this->any()) + ->method('getMpPaymentMethods') + ->with(1) + ->willReturn(PaymentMethodsResponseMock::WITH_PAYMENT_PLACES_AND_INACTIVE); + + $this->paymentMethodsOff = new PaymentMethodsOff( + $this->requestMock, + $this->mpConfigMock + ); + + $result = $this->paymentMethodsOff->toOptionArray(); + + $this->assertEquals(ToOptionArrayMock::EXPECTED_WITH_PAYMENT_PLACES_AND_INACTIVE, $result); + } + + /** + * Tests function mountPaymentMethodsOff() + */ + + public function testMountPaymentMethodsOffEmpty(): void + { + $result = $this->paymentMethodsOff->mountPaymentMethodsOff([]); + + $this->assertEmpty($result); + } + + public function testMountPaymentMethodsOffWithoutPaymentPlaces(): void + { + $response = PaymentMethodsResponseMock::WITHOUT_PAYMENT_PLACES['response']; + $result = $this->paymentMethodsOff->mountPaymentMethodsOff($response); + + $this->assertEquals(MountPaymentMethodsOffMock::EXPECTED_WITHOUT_PAYMENT_PLACES, $result); + } + + public function testMountPaymentMethodsOffWithPaymentPlaces(): void + { + $response = PaymentMethodsResponseMock::WITH_PAYMENT_PLACES['response']; + $result = $this->paymentMethodsOff->mountPaymentMethodsOff($response); + + $this->assertEquals(MountPaymentMethodsOffMock::EXPECTED_WITH_PAYMENT_PLACES, $result); + } + + public function testMountPaymentMethodsOffWithoutPaymentPlacesAndWithInactive(): void + { + $response = PaymentMethodsResponseMock::WITHOUT_PAYMENT_PLACES_AND_WITH_INACTIVE['response']; + $result = $this->paymentMethodsOff->mountPaymentMethodsOff($response); + + $this->assertEquals(MountPaymentMethodsOffMock::EXPECTED_WITHOUT_PAYMENT_PLACES_AND_WITH_INACTIVE, $result); + } + + public function testMountPaymentMethodsOffWithPaymentPlacesAndInactive(): void + { + $response = PaymentMethodsResponseMock::WITH_PAYMENT_PLACES_AND_INACTIVE['response']; + $result = $this->paymentMethodsOff->mountPaymentMethodsOff($response); + + $this->assertEquals(MountPaymentMethodsOffMock::EXPECTED_WITH_PAYMENT_PLACES_AND_INACTIVE, $result); + } +} diff --git a/Tests/Unit/Model/Ui/ConfigProviderPaymentMethodsOffTest.php b/Tests/Unit/Model/Ui/ConfigProviderPaymentMethodsOffTest.php new file mode 100644 index 0000000..4395743 --- /dev/null +++ b/Tests/Unit/Model/Ui/ConfigProviderPaymentMethodsOffTest.php @@ -0,0 +1,408 @@ +configMock = $this->getMockBuilder(ConfigPaymentMethodsOff::class)->disableOriginalConstructor()->getMock(); + $this->cartMock = $this->getMockBuilder(CartInterface::class)->disableOriginalConstructor()->getMock(); + $this->escaperMock = $this->getMockBuilder(Escaper::class)->disableOriginalConstructor()->getMock(); + $this->assetRepoMock = $this->getMockBuilder(Repository::class)->disableOriginalConstructor()->getMock(); + $this->mpConfigMock = $this->getMockBuilder(MercadoPagoConfig::class)->disableOriginalConstructor()->getMock(); + + $this->configProviderPaymentMethodsOffMock = $this->getMockBuilder(ConfigProviderPaymentMethodsOff::class)->setConstructorArgs([ + 'config' => $this->configMock, + 'cart' => $this->cartMock, + 'escaper' => $this->escaperMock, + 'mercadopagoConfig' => $this->mpConfigMock, + 'assetRepo' => $this->assetRepoMock + ])->getMock(); + + $this->configProviderPaymentMethodsOff = new ConfigProviderPaymentMethodsOff( + $this->configMock, + $this->cartMock, + $this->escaperMock, + $this->mpConfigMock, + $this->assetRepoMock + ); + } + + /** + * Tests function mountPaymentMethodsOff() + */ + + public function testMountPaymentMethodsOffEmpty(): void + { + $result = $this->configProviderPaymentMethodsOff->mountPaymentMethodsOff([]); + + $this->assertEmpty($result); + } + + public function testMountPaymentMethodsOffWithoutPaymentPlaces(): void + { + $response = PaymentMethodsResponseMock::WITHOUT_PAYMENT_PLACES['response']; + $result = $this->configProviderPaymentMethodsOff->mountPaymentMethodsOff($response); + + $this->assertEquals(MountPaymentMethodsOffMock::EXPECTED_WITHOUT_PAYMENT_PLACES, $result); + foreach ($result as $payment) { + $this->assertTrue(in_array($payment['payment_type_id'], ConfigProviderPaymentMethodsOff::PAYMENT_TYPE_ID_ALLOWED)); + } + } + + public function testMountPaymentMethodsOffWithPaymentPlaces(): void + { + $response = PaymentMethodsResponseMock::WITH_PAYMENT_PLACES['response']; + $result = $this->configProviderPaymentMethodsOff->mountPaymentMethodsOff($response); + + $this->assertEquals(MountPaymentMethodsOffMock::EXPECTED_WITH_PAYMENT_PLACES, $result); + foreach ($result as $payment) { + $this->assertTrue(in_array($payment['payment_type_id'], ConfigProviderPaymentMethodsOff::PAYMENT_TYPE_ID_ALLOWED)); + } + } + + public function testMountPaymentMethodsOffWithoutPaymentPlacesAndWithInactive(): void + { + $response = PaymentMethodsResponseMock::WITHOUT_PAYMENT_PLACES_AND_WITH_INACTIVE['response']; + $result = $this->configProviderPaymentMethodsOff->mountPaymentMethodsOff($response); + + $this->assertEquals(MountPaymentMethodsOffMock::EXPECTED_WITHOUT_PAYMENT_PLACES_AND_WITH_INACTIVE, $result); + foreach ($result as $payment) { + $this->assertTrue(in_array($payment['payment_type_id'], ConfigProviderPaymentMethodsOff::PAYMENT_TYPE_ID_ALLOWED)); + } + } + + public function testMountPaymentMethodsOffWithPaymentPlacesAndInactive(): void + { + $response = PaymentMethodsResponseMock::WITH_PAYMENT_PLACES_AND_INACTIVE['response']; + + $result = $this->configProviderPaymentMethodsOff->mountPaymentMethodsOff($response); + + $this->assertEquals(MountPaymentMethodsOffMock::EXPECTED_WITH_PAYMENT_PLACES_AND_INACTIVE, $result); + foreach ($result as $payment) { + $this->assertTrue(in_array($payment['payment_type_id'], ConfigProviderPaymentMethodsOff::PAYMENT_TYPE_ID_ALLOWED)); + } + } + + /** + * Tests function filterPaymentMethodsOffConfigActive() + */ + + public function testFilterPaymentMethodsOffConfigActiveEmpty(): void + { + $result = $this->configProviderPaymentMethodsOff->filterPaymentMethodsOffConfigActive([], ''); + + $this->assertEmpty($result); + } + + public function testFilterPaymentMethodsOffConfigActivePaymentMethodsEmpty(): void + { + $methodsOffActive = '7eleven,serfin'; + + $result = $this->configProviderPaymentMethodsOff->filterPaymentMethodsOffConfigActive([], $methodsOffActive); + + $this->assertEmpty($result); + } + + public function testFilterPaymentMethodsOffConfigActivePaymentMethodsOffActiveNull(): void + { + $paymentMethods = FilterPaymentMethodsOffConfigActiveMock::EXPECTED_PAYMENT_METHODS; + + $result = $this->configProviderPaymentMethodsOff->filterPaymentMethodsOffConfigActive($paymentMethods, null); + + $this->assertEquals($paymentMethods, $result); + } + + public function testFilterPaymentMethodsOffConfigActivePaymentMethodsOffActiveEmpty(): void + { + $paymentMethods = FilterPaymentMethodsOffConfigActiveMock::EXPECTED_PAYMENT_METHODS; + + $result = $this->configProviderPaymentMethodsOff->filterPaymentMethodsOffConfigActive($paymentMethods, ''); + + $this->assertEquals($paymentMethods, $result); + } + + public function testFilterPaymentMethodsOffConfigActivePaymentMethodsOffInactive7eleven(): void + { + $paymentMethods = FilterPaymentMethodsOffConfigActiveMock::EXPECTED_PAYMENT_METHODS; + $methodsOffInactive = '7eleven'; + + $result = $this->configProviderPaymentMethodsOff->filterPaymentMethodsOffConfigActive($paymentMethods, $methodsOffInactive); + $this->assertEquals(FilterPaymentMethodsOffConfigActiveMock::EXPECTED_PAYMENT_METHODS_WITHOUT_7ELEVEN, $result); + } + + public function testFilterPaymentMethodsOffConfigActivePaymentMethodsOffInactive7elevenSerfin(): void + { + $paymentMethods = FilterPaymentMethodsOffConfigActiveMock::EXPECTED_PAYMENT_METHODS; + $methodsOffInactive = '7eleven,serfin'; + + $result = $this->configProviderPaymentMethodsOff->filterPaymentMethodsOffConfigActive($paymentMethods, $methodsOffInactive); + $this->assertEquals(FilterPaymentMethodsOffConfigActiveMock::EXPECTED_PAYMENT_METHODS_WITHOUT_7ELEVEN_AND_SERFIN, $result); + } + + public function testFilterPaymentMethodsOffConfigActivePaymentMethodsOffActiveDoesNotExist(): void + { + $paymentMethods = FilterPaymentMethodsOffConfigActiveMock::EXPECTED_PAYMENT_METHODS; + $methodsOffActive = 'does_not_exist'; + + $result = $this->configProviderPaymentMethodsOff->filterPaymentMethodsOffConfigActive($paymentMethods, $methodsOffActive); + $this->assertEquals(FilterPaymentMethodsOffConfigActiveMock::EXPECTED_PAYMENT_METHODS, $result); + } + + public function testFilterPaymentMethodsOffConfigActivePaymentMethodsOffInactiveWhitout7elevenAndDoesNotExist(): void + { + $paymentMethods = FilterPaymentMethodsOffConfigActiveMock::EXPECTED_PAYMENT_METHODS; + $methodsOffInactive = '7eleven,does_not_exist'; + + $result = $this->configProviderPaymentMethodsOff->filterPaymentMethodsOffConfigActive($paymentMethods, $methodsOffInactive); + $this->assertEquals(FilterPaymentMethodsOffConfigActiveMock::EXPECTED_PAYMENT_METHODS_WITHOUT_7ELEVEN, $result); + } + + /** + * Tests function getPaymentMethodsOffActive() + */ + + public function testGetPaymentMethodsOffActiveEmpty(): void + { + $storeId = 1; + + $this->configMock = $this->getMockBuilder(ConfigPaymentMethodsOff::class)->disableOriginalConstructor()->getMock(); + $this->configMock->expects($this->any()) + ->method('getPaymentMethodsOffActive') + ->with($storeId) + ->willReturn(null); + + $this->mpConfigMock = $this->getMockBuilder(MercadoPagoConfig::class)->disableOriginalConstructor()->getMock(); + $this->mpConfigMock->expects($this->any()) + ->method('getMpPaymentMethods') + ->with($storeId) + ->willReturn(PaymentMethodsResponseMock::SUCCESS_FALSE); + + $this->configProviderPaymentMethodsOff = new ConfigProviderPaymentMethodsOff( + $this->configMock, + $this->cartMock, + $this->escaperMock, + $this->mpConfigMock, + $this->assetRepoMock + ); + + $result = $this->configProviderPaymentMethodsOff->getPaymentMethodsOffActive($storeId); + $this->assertEmpty($result); + } + + public function testGetPaymentMethodsOffActiveNotEmpty(): void + { + $storeId = 1; + + $this->configMock = $this->getMockBuilder(ConfigPaymentMethodsOff::class)->disableOriginalConstructor()->getMock(); + $this->configMock->expects($this->any()) + ->method('getPaymentMethodsOffActive') + ->with($storeId) + ->willReturn(null); + + $this->mpConfigMock = $this->getMockBuilder(MercadoPagoConfig::class)->disableOriginalConstructor()->getMock(); + $this->mpConfigMock->expects($this->any()) + ->method('getMpPaymentMethods') + ->with($storeId) + ->willReturn(PaymentMethodsResponseMock::WITH_PAYMENT_PLACES); + + $this->configProviderPaymentMethodsOff = new ConfigProviderPaymentMethodsOff( + $this->configMock, + $this->cartMock, + $this->escaperMock, + $this->mpConfigMock, + $this->assetRepoMock + ); + + $result = $this->configProviderPaymentMethodsOff->getPaymentMethodsOffActive($storeId); + $this->assertNotEmpty($result); + } + + public function testGetLogoEmpty(): void + { + $this->assetRepoMock = $this->getMockBuilder(Repository::class)->disableOriginalConstructor()->getMock(); + $this->assetRepoMock->expects($this->any()) + ->method('getUrl') + ->with(ConfigProviderPaymentMethodsOff::PATH_LOGO) + ->willReturn(null); + + $this->configProviderPaymentMethodsOff = new ConfigProviderPaymentMethodsOff( + $this->configMock, + $this->cartMock, + $this->escaperMock, + $this->mpConfigMock, + $this->assetRepoMock + ); + + $result = $this->configProviderPaymentMethodsOff->getLogo(); + $this->assertEmpty($result); + } + + public function testGetLogoNotEmpty(): void + { + $this->assetRepoMock = $this->getMockBuilder(Repository::class)->disableOriginalConstructor()->getMock(); + $this->assetRepoMock->expects($this->any()) + ->method('getUrl') + ->with(ConfigProviderPaymentMethodsOff::PATH_LOGO) + ->willReturn('images/boleto/logo.svg'); + + $this->configProviderPaymentMethodsOff = new ConfigProviderPaymentMethodsOff( + $this->configMock, + $this->cartMock, + $this->escaperMock, + $this->mpConfigMock, + $this->assetRepoMock + ); + + $result = $this->configProviderPaymentMethodsOff->getLogo(); + + $this->assertNotEmpty($result); + $this->assertArrayHasKey('url', $result); + $this->assertArrayHasKey('title', $result); + } + + public function testGetConfigEmpty(): void + { + $storeId = 1; + + $this->cartMock = $this->getMockBuilder(CartInterface::class)->disableOriginalConstructor()->getMock(); + $this->cartMock->expects($this->any()) + ->method('getStoreId') + ->willReturn($storeId); + + $this->configMock = $this->getMockBuilder(ConfigPaymentMethodsOff::class)->disableOriginalConstructor()->getMock(); + $this->configMock->expects($this->any()) + ->method('isActive') + ->with($storeId) + ->willReturn(false); + + $this->configProviderPaymentMethodsOff = new ConfigProviderPaymentMethodsOff( + $this->configMock, + $this->cartMock, + $this->escaperMock, + $this->mpConfigMock, + $this->assetRepoMock + ); + + $result = $this->configProviderPaymentMethodsOff->getConfig(); + $this->assertEmpty($result); + } + + public function testGetConfigNotEmpty(): void + { + $storeId = 2; + + $this->cartMock = $this->getMockBuilder(CartInterface::class)->disableOriginalConstructor()->getMock(); + $this->cartMock->expects($this->any()) + ->method('getStoreId') + ->willReturn($storeId); + + $this->configMock = $this->getMockBuilder(ConfigPaymentMethodsOff::class)->disableOriginalConstructor()->getMock(); + $this->configMock->expects($this->any()) + ->method('isActive') + ->with($storeId) + ->willReturn(true); + $this->configMock->expects($this->any()) + ->method('getTitle') + ->with($storeId) + ->willReturn('Title Payment'); + $this->configMock->expects($this->any()) + ->method('hasUseNameCapture') + ->with($storeId) + ->willReturn(true); + $this->configMock->expects($this->any()) + ->method('hasUseDocumentIdentificationCapture') + ->with($storeId) + ->willReturn(true); + $this->configMock->expects($this->any()) + ->method('getExpirationFormat') + ->with($storeId) + ->willReturn('d/m/Y'); + $this->configMock->expects($this->any()) + ->method('getPaymentMethodsOffActive') + ->with($storeId) + ->willReturn(null); + + $this->assetRepoMock = $this->getMockBuilder(Repository::class)->disableOriginalConstructor()->getMock(); + $this->assetRepoMock->expects($this->any()) + ->method('getUrl') + ->with(ConfigProviderPaymentMethodsOff::PATH_LOGO) + ->willReturn('images/boleto/logo.svg'); + + $this->mpConfigMock = $this->getMockBuilder(MercadoPagoConfig::class)->disableOriginalConstructor()->getMock(); + $this->mpConfigMock->expects($this->any()) + ->method('getMpPaymentMethods') + ->with($storeId) + ->willReturn(PaymentMethodsResponseMock::WITH_PAYMENT_PLACES); + + $this->configProviderPaymentMethodsOff = new ConfigProviderPaymentMethodsOff( + $this->configMock, + $this->cartMock, + $this->escaperMock, + $this->mpConfigMock, + $this->assetRepoMock + ); + + $result = $this->configProviderPaymentMethodsOff->getConfig(); + + $this->assertNotEmpty($result); + $this->assertArrayHasKey('payment', $result); + $this->assertArrayHasKey(ConfigPaymentMethodsOff::METHOD, $result['payment']); + $this->assertArrayHasKey('isActive', $result['payment'][ConfigPaymentMethodsOff::METHOD]); + $this->assertArrayHasKey('title', $result['payment'][ConfigPaymentMethodsOff::METHOD]); + $this->assertArrayHasKey('name_capture', $result['payment'][ConfigPaymentMethodsOff::METHOD]); + $this->assertArrayHasKey('document_identification_capture', $result['payment'][ConfigPaymentMethodsOff::METHOD]); + $this->assertArrayHasKey('expiration', $result['payment'][ConfigPaymentMethodsOff::METHOD]); + $this->assertArrayHasKey('logo', $result['payment'][ConfigPaymentMethodsOff::METHOD]); + $this->assertArrayHasKey('payment_methods_off_active', $result['payment'][ConfigPaymentMethodsOff::METHOD]); + } +} diff --git a/Tests/coverage-checker.php b/Tests/coverage-checker.php new file mode 100644 index 0000000..73106ed --- /dev/null +++ b/Tests/coverage-checker.php @@ -0,0 +1,34 @@ +xpath('//metrics'); +$totalElements = 0; +$checkedElements = 0; + +foreach ($metrics as $metric) { + $totalElements += (int) $metric['elements']; + $checkedElements += (int) $metric['coveredelements']; +} + +$coverage = ($checkedElements / $totalElements) * 100; + +if ($coverage >= $percentage) { + print_r('Code coverage is ' . $coverage); + print_r(' -> Pull Request OK'); + return; +} + +print_r('Code coverage is ' . round($coverage, 2) . '%, which is below the accepted ' . $percentage . '%'); +print_r(' -> Pull Request Rejected'); + diff --git a/Tests/pull-request-coverage-checker.php b/Tests/pull-request-coverage-checker.php new file mode 100644 index 0000000..71a8e50 --- /dev/null +++ b/Tests/pull-request-coverage-checker.php @@ -0,0 +1,130 @@ +xpath('//class'); + $totalElements = 0; + $checkedElements = 0; + + foreach ($classes as $class) { + if (in_array($class['name'], $pullRequestFiles)) { + $totalElements += (int) $class->metrics['elements']; + $checkedElements += (int) $class->metrics['coveredelements']; + } + } + + return [ + 'totalElements' => $totalElements, + 'checkedElements' => $checkedElements, + ]; +} + +/** + * @SuppressWarnings(PHPMD.DevelopmentCodeFragment) + */ +function parse_pull_request_files($argv) { + $pullRequestFiles = []; + + for ($i = 4; $i < count($argv); $i++) { + $filename = str_replace('src/', '', $argv[$i]); + $filename = str_replace('/', '\\', $filename); + $filename = str_replace('.php', '', $filename); + + if (is_testable($filename)) { + $pullRequestFiles[] = $filename; + print_r($filename . ' is a testable file' . PHP_EOL); + } + } + + return $pullRequestFiles; +} + +function is_testable($filename) { + // Add all untestable php files + $whitelist = [ + 'Tests\coverage-checker', + 'Tests\pull-request-coverage-checker', + ]; + + return in_array($filename, $whitelist) ? false : true; +} + +function is_hotfix_branch($branchName) { + return strpos($branchName, 'hotfix'); +} + +function is_release_branch($branchName) { + return strpos($branchName, 'release'); +} + +function is_skipped_branch($branchName) { + return false === (is_hotfix_branch($branchName) || is_release_branch($branchName)); +} + +function validate_clover_file($cloverFile) { + if (!file_exists($cloverFile)) { + throw new InvalidArgumentException('Invalid clover file provided'); + } +} + +function validate_percentage_param($percentage) { + if (!$percentage) { + throw new InvalidArgumentException('An integer checked percentage must be given as second parameter'); + } +} + +/** + * @SuppressWarnings(PHPMD.DevelopmentCodeFragment) + */ +function validate_pull_request_coverage($totalElements, $checkedElements, $percentage) { + $coverage = ($checkedElements / $totalElements) * 100; + + if ($coverage >= $percentage) { + print_r('Code coverage is ' . $coverage); + print_r(' -> Pull Request OK'); + return; + } + + print_r('Code coverage is ' . round($coverage, 2) . '%, which is below the accepted ' . $percentage . '%'); + print_r(' -> Pull Request Rejected'); + + throw new Exception('Code coverage is ' . round($coverage, 2) . '%, which is below the accepted ' . $percentage . '%'); +} + +/** + * @SuppressWarnings(PHPMD.DevelopmentCodeFragment) + */ +function execute($argv) { + $branchName = $argv[3]; + $cloverFile = $argv[1]; + $percentage = min(100, max(0, (int) $argv[2])); + $pullRequestFiles = parse_pull_request_files($argv); + + if (false === is_skipped_branch($branchName)) { + validate_clover_file($cloverFile); + validate_percentage_param($percentage); + + $elements = get_elements($cloverFile, $pullRequestFiles); + $totalElements = $elements['totalElements']; + $checkedElements = $elements['checkedElements']; + + if ($totalElements == 0 || $checkedElements == 0) { + if (count($pullRequestFiles) === 0) { + print_r('Pull request does not contain testable files'); + return; + } + + throw new Exception('Pull Request does not contain tested php files to check code coverage'); + } + + validate_pull_request_coverage($totalElements, $checkedElements, $percentage); + + return; + } +} + +execute($argv); diff --git a/bin/bash.sh b/bin/bash.sh new file mode 100644 index 0000000..5793176 --- /dev/null +++ b/bin/bash.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +docker exec -it magento-php /bin/bash diff --git a/bin/build.sh b/bin/build.sh new file mode 100644 index 0000000..ef12dd4 --- /dev/null +++ b/bin/build.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +docker-compose up -d --build diff --git a/bin/install-mg2.sh b/bin/install-mg2.sh new file mode 100644 index 0000000..2e5df05 --- /dev/null +++ b/bin/install-mg2.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +sudo pecl install -f xdebug-2.9.8 + +echo "Getting Magento 2.4.5..." +curl -LO https://github.com/magento/magento2/archive/refs/tags/2.4.5-p1.zip +unzip -qq 2.4.5-p1.zip +mv magento2-2.4.5-p1 magento2 + +cd magento2 + +echo "Installing..." +composer update +composer install + +bin/magento --version +sudo chmod -Rf 777 var/ pub/ generated/ app/etc/env.php +php -d memory_limit=5G bin/magento +bin/magento setup:upgrade +bin/magento module:enable --all --clear-static-content +php -d memory_limit=5G bin/magento setup:di:compile + +rm -rf ../2.4.5-p1.zip diff --git a/bin/pull-request-coverage.sh b/bin/pull-request-coverage.sh new file mode 100644 index 0000000..a031986 --- /dev/null +++ b/bin/pull-request-coverage.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +echo "Getting pull request head branch..." +export PHPUNIT_HEAD_BRANCH=$(curl -H "Accept: application/vnd.github.v3+json" https://api.github.com/repos/mercadopago/adb-payment-plugin/pulls/${PR_NUMBER} \ +| jq ".head.ref" \ +| xargs) + +echo "Getting pull request files..." +export PHPUNIT_FILES=$(curl -H "Accept: application/vnd.github.v3+json" https://api.github.com/repos/mercadopago/adb-payment-plugin/pulls/${PR_NUMBER}/files \ +| jq ".[].filename" \ +| grep -E 'php"$' \ +| xargs) + +php magento2/app/code/MercadoPago/AdbPayment/Tests/pull-request-coverage-checker.php clover.xml 40 $PHPUNIT_HEAD_BRANCH $PHPUNIT_FILES diff --git a/bin/run-linters.sh b/bin/run-linters.sh new file mode 100644 index 0000000..0844f83 --- /dev/null +++ b/bin/run-linters.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +sh bin/run-sync-files.sh +sh bin/run-phpcs.sh +sh bin/run-phpstan.sh +sh bin/run-phpmd.sh diff --git a/bin/run-phpcs.sh b/bin/run-phpcs.sh new file mode 100644 index 0000000..8240048 --- /dev/null +++ b/bin/run-phpcs.sh @@ -0,0 +1,8 @@ +#!bin/bash +echo "\n" +echo 🐘🔍 '\033[01;33m RUNNING PHPCS \033[0m' +echo "\n" + +docker exec magento-php magento2/vendor/bin/phpcs -q --report=full --standard=Magento2 magento2/app/code/MercadoPago/AdbPayment/ + +echo ✅ "\033[01;32m PHPCS EXECUTED SUCCESSFULLY \n \033[0m" diff --git a/bin/run-phpmd.sh b/bin/run-phpmd.sh new file mode 100644 index 0000000..2070287 --- /dev/null +++ b/bin/run-phpmd.sh @@ -0,0 +1,9 @@ +#!/bin/bash +echo "\n" +echo 🐘🔍 '\033[01;36m RUNNING PHPMD \033[0m' +echo "\n" + +docker exec magento-php phpmd/src/bin/phpmd magento2/app/code/MercadoPago/AdbPayment/ --ignore-violations-on-exit ansi codesize,unusedcode,naming,cleancode + +echo "\n" +echo ✅ "\033[01;32m PHPMD EXECUTED SUCCESSFULLY \n \033[0m" diff --git a/bin/run-phpstan.sh b/bin/run-phpstan.sh new file mode 100644 index 0000000..68f925f --- /dev/null +++ b/bin/run-phpstan.sh @@ -0,0 +1,8 @@ +#!/bin/bash +echo "\n" +echo 🐘🔍 '\033[01;35m RUNNING PHPSTAN \033[0m' +echo "\n" + +docker exec magento-php php -d memory_limit=1G magento2/vendor/bin/phpstan analyse --error-format=table --level 0 magento2/app/code/MercadoPago/AdbPayment/ + +echo ✅ "\033[01;32m PHPSTAN EXECUTED SUCCESSFULLY \n \033[0m" diff --git a/bin/run-sync-files.sh b/bin/run-sync-files.sh new file mode 100644 index 0000000..db95069 --- /dev/null +++ b/bin/run-sync-files.sh @@ -0,0 +1,12 @@ +#!bin/bash +echo "\n" +echo 🐘🔍 '\033[01;33m RUNNING SYNC FILES TO MAGENTO 2 CONTAINER \033[0m' +echo "\n" + +docker cp ./. magento-php:/var/www/html/magento2/app/code/MercadoPago/AdbPayment/ + +if [ $? -eq 0 ]; then + echo ✅ "\033[01;32m SYNC EXECUTED SUCCESSFULLY \n \033[0m" +else + echo 🚫 "\033[01;31m SYNC FAILED \n \033[0m" +fi diff --git a/bin/run-test.sh b/bin/run-test.sh new file mode 100644 index 0000000..1046259 --- /dev/null +++ b/bin/run-test.sh @@ -0,0 +1,11 @@ +#!/bin/bash +echo "\n" +echo ⭐ '\033[01;32m RUNNING UNIT TESTS \033[0m' +echo "\n" + +docker exec magento-php [ -d "reports/" ] || docker exec magento-php mkdir reports/ +docker exec magento-php magento2/vendor/phpunit/phpunit/phpunit --configuration magento2/app/code/MercadoPago/AdbPayment/phpunit.xml --coverage-clover clover.xml --coverage-text --coverage-html reports/ magento2/app/code/MercadoPago/AdbPayment/Tests +docker exec magento-php chmod 777 -Rf reports/ + +echo "\n" +echo ✅ "\033[01;32m SUCCESS - You can access the full report by accessing: http://localhost:8080/reports \n \033[0m" diff --git a/bin/validate-version.sh b/bin/validate-version.sh new file mode 100755 index 0000000..4a9d1a8 --- /dev/null +++ b/bin/validate-version.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +scriptPath=$(dirname -- "$(readlink -f -- "$BASH_SOURCE")") + +changelogPath=$scriptPath/../CHANGELOG.md +modulePath=$scriptPath/../etc/module.xml + +lastChangelogVersion=$(sed -n 's/## \[\([0-9]\+.[0-9]\+.[0-9]\+\)\].*/\1/p' $changelogPath | head -n1 | xargs) +moduleVersion=$(sed -n 's/.*setup_version="\(.*\)".*/\1/p' $modulePath | head -n1 | xargs) + +if [ "$lastChangelogVersion" = "$moduleVersion" ]; then + echo "OK" + echo "CHANGELOG VERSION: $lastChangelogVersion" + echo "MODULE VERSION: $moduleVersion" + exit 0 +else + echo "ERROR - CHANGELOG VERSION DIFFER FROM MODULE VERSION" + echo "CHANGELOG VERSION: $lastChangelogVersion" + echo "MODULE VERSION: $moduleVersion" + exit 1 +fi diff --git a/composer.json b/composer.json new file mode 100644 index 0000000..3870e4b --- /dev/null +++ b/composer.json @@ -0,0 +1,69 @@ +{ + "name": "mercadopago/adb-payment", + "description": "MercadoPago - Payment for Adobe Commerce", + "require": { + "php": "~7.3.0||~7.4.0||~8.1.0", + "magento/framework": ">=103.0", + "magento/module-customer": ">=103.0.0", + "magento/module-config": "101.2.*", + "magento/module-eav": "102.1.*", + "magento/module-sales": "103.0.*", + "magento/module-directory": "100.4.*", + "magento/module-checkout": "100.4.*", + "magento/module-backend": "102.0.*", + "magento/module-theme": "101.1.*", + "magento/module-ui": "101.2.*", + "magento/module-payment": "^100.3", + "magento/module-vault": "101.*", + "magento/zendframework1": ">=1.15.1", + "ext-json": "*", + "ext-gd": "*", + "ext-zip": "*" + }, + "type": "magento2-module", + "authors": [ + { + "name": "Mercado Pago" + } + ], + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "MercadoPago\\AdbPayment\\": "" + } + }, + "require-dev": { + "magento/magento-coding-standard": "*", + "phpmd/phpmd": "^2.13", + "phpstan/extension-installer": "^1.2", + "phpstan/phpstan": "^1.6.8" + }, + "scripts": { + "post-install-cmd": "vendor/bin/phpcs --config-set installed_paths ../../..,../../phpcompatibility/php-compatibility/PHPCompatibility", + "post-update-cmd": "vendor/bin/phpcs --config-set installed_paths ../../..,../../phpcompatibility/php-compatibility/PHPCompatibility" + }, + "repositories": [ + { + "type": "composer", + "url": "https://repo.magento.com/" + }, + { + "type": "composer", + "url": "https://repo-magento-mirror.fooman.co.nz/" + } + ], + "prefer-stable": true, + "minimum-stability": "dev", + "config": { + "allow-plugins": { + "magento/composer-dependency-version-audit-plugin": false, + "phpstan/extension-installer": true + } + } +} diff --git a/composer.lock b/composer.lock new file mode 100644 index 0000000..923249d --- /dev/null +++ b/composer.lock @@ -0,0 +1,8719 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", + "This file is @generated automatically" + ], + "content-hash": "6d5ceb2aaaa52311a2a7d2c1ff8582c0", + "packages": [ + { + "name": "brick/math", + "version": "0.11.0", + "source": { + "type": "git", + "url": "https://github.com/brick/math.git", + "reference": "0ad82ce168c82ba30d1c01ec86116ab52f589478" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/brick/math/zipball/0ad82ce168c82ba30d1c01ec86116ab52f589478", + "reference": "0ad82ce168c82ba30d1c01ec86116ab52f589478", + "shasum": "" + }, + "require": { + "php": "^8.0" + }, + "require-dev": { + "php-coveralls/php-coveralls": "^2.2", + "phpunit/phpunit": "^9.0", + "vimeo/psalm": "5.0.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Brick\\Math\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Arbitrary-precision arithmetic library", + "keywords": [ + "Arbitrary-precision", + "BigInteger", + "BigRational", + "arithmetic", + "bigdecimal", + "bignum", + "brick", + "math" + ], + "support": { + "issues": "https://github.com/brick/math/issues", + "source": "https://github.com/brick/math/tree/0.11.0" + }, + "funding": [ + { + "url": "https://github.com/BenMorel", + "type": "github" + } + ], + "time": "2023-01-15T23:15:59+00:00" + }, + { + "name": "colinmollenhour/credis", + "version": "v1.15.0", + "source": { + "type": "git", + "url": "https://github.com/colinmollenhour/credis.git", + "reference": "28810439de1d9597b7ba11794ed9479fb6f3de7c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/colinmollenhour/credis/zipball/28810439de1d9597b7ba11794ed9479fb6f3de7c", + "reference": "28810439de1d9597b7ba11794ed9479fb6f3de7c", + "shasum": "" + }, + "require": { + "php": ">=5.6.0" + }, + "suggest": { + "ext-redis": "Improved performance for communicating with redis" + }, + "type": "library", + "autoload": { + "classmap": [ + "Client.php", + "Cluster.php", + "Sentinel.php", + "Module.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Colin Mollenhour", + "email": "colin@mollenhour.com" + } + ], + "description": "Credis is a lightweight interface to the Redis key-value store which wraps the phpredis library when available for better performance.", + "homepage": "https://github.com/colinmollenhour/credis", + "support": { + "issues": "https://github.com/colinmollenhour/credis/issues", + "source": "https://github.com/colinmollenhour/credis/tree/v1.15.0" + }, + "time": "2023-04-18T15:34:23+00:00" + }, + { + "name": "colinmollenhour/php-redis-session-abstract", + "version": "v1.5.1", + "source": { + "type": "git", + "url": "https://github.com/colinmollenhour/php-redis-session-abstract.git", + "reference": "3df52a7247a97fb4ec5bddfb731d1a6cddb5ef99" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/colinmollenhour/php-redis-session-abstract/zipball/3df52a7247a97fb4ec5bddfb731d1a6cddb5ef99", + "reference": "3df52a7247a97fb4ec5bddfb731d1a6cddb5ef99", + "shasum": "" + }, + "require": { + "colinmollenhour/credis": "~1.6", + "php": "^5.5 || ^7.0 || ^8.0" + }, + "require-dev": { + "phpunit/phpunit": "^9" + }, + "type": "library", + "autoload": { + "psr-0": { + "Cm\\RedisSession\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Colin Mollenhour" + } + ], + "description": "A Redis-based session handler with optimistic locking", + "homepage": "https://github.com/colinmollenhour/php-redis-session-abstract", + "support": { + "issues": "https://github.com/colinmollenhour/php-redis-session-abstract/issues", + "source": "https://github.com/colinmollenhour/php-redis-session-abstract/tree/v1.5.1" + }, + "time": "2022-11-16T19:36:20+00:00" + }, + { + "name": "composer/ca-bundle", + "version": "1.3.5", + "source": { + "type": "git", + "url": "https://github.com/composer/ca-bundle.git", + "reference": "74780ccf8c19d6acb8d65c5f39cd72110e132bbd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/ca-bundle/zipball/74780ccf8c19d6acb8d65c5f39cd72110e132bbd", + "reference": "74780ccf8c19d6acb8d65c5f39cd72110e132bbd", + "shasum": "" + }, + "require": { + "ext-openssl": "*", + "ext-pcre": "*", + "php": "^5.3.2 || ^7.0 || ^8.0" + }, + "require-dev": { + "phpstan/phpstan": "^0.12.55", + "psr/log": "^1.0", + "symfony/phpunit-bridge": "^4.2 || ^5", + "symfony/process": "^2.5 || ^3.0 || ^4.0 || ^5.0 || ^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\CaBundle\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + } + ], + "description": "Lets you find a path to the system CA bundle, and includes a fallback to the Mozilla CA bundle.", + "keywords": [ + "cabundle", + "cacert", + "certificate", + "ssl", + "tls" + ], + "support": { + "irc": "irc://irc.freenode.org/composer", + "issues": "https://github.com/composer/ca-bundle/issues", + "source": "https://github.com/composer/ca-bundle/tree/1.3.5" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2023-01-11T08:27:00+00:00" + }, + { + "name": "composer/class-map-generator", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/composer/class-map-generator.git", + "reference": "1e1cb2b791facb2dfe32932a7718cf2571187513" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/class-map-generator/zipball/1e1cb2b791facb2dfe32932a7718cf2571187513", + "reference": "1e1cb2b791facb2dfe32932a7718cf2571187513", + "shasum": "" + }, + "require": { + "composer/pcre": "^2 || ^3", + "php": "^7.2 || ^8.0", + "symfony/finder": "^4.4 || ^5.3 || ^6" + }, + "require-dev": { + "phpstan/phpstan": "^1.6", + "phpstan/phpstan-deprecation-rules": "^1", + "phpstan/phpstan-phpunit": "^1", + "phpstan/phpstan-strict-rules": "^1.1", + "symfony/filesystem": "^5.4 || ^6", + "symfony/phpunit-bridge": "^5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\ClassMapGenerator\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "https://seld.be" + } + ], + "description": "Utilities to scan PHP code and generate class maps.", + "keywords": [ + "classmap" + ], + "support": { + "issues": "https://github.com/composer/class-map-generator/issues", + "source": "https://github.com/composer/class-map-generator/tree/1.0.0" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2022-06-19T11:31:27+00:00" + }, + { + "name": "composer/composer", + "version": "2.5.7", + "source": { + "type": "git", + "url": "https://github.com/composer/composer.git", + "reference": "d477018d3f2ebd76dede3d3988a0b1a7add4d81e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/composer/zipball/d477018d3f2ebd76dede3d3988a0b1a7add4d81e", + "reference": "d477018d3f2ebd76dede3d3988a0b1a7add4d81e", + "shasum": "" + }, + "require": { + "composer/ca-bundle": "^1.0", + "composer/class-map-generator": "^1.0", + "composer/metadata-minifier": "^1.0", + "composer/pcre": "^2.1 || ^3.1", + "composer/semver": "^3.0", + "composer/spdx-licenses": "^1.5.7", + "composer/xdebug-handler": "^2.0.2 || ^3.0.3", + "justinrainbow/json-schema": "^5.2.11", + "php": "^7.2.5 || ^8.0", + "psr/log": "^1.0 || ^2.0 || ^3.0", + "react/promise": "^2.8", + "seld/jsonlint": "^1.4", + "seld/phar-utils": "^1.2", + "seld/signal-handler": "^2.0", + "symfony/console": "^5.4.11 || ^6.0.11", + "symfony/filesystem": "^5.4 || ^6.0", + "symfony/finder": "^5.4 || ^6.0", + "symfony/polyfill-php73": "^1.24", + "symfony/polyfill-php80": "^1.24", + "symfony/polyfill-php81": "^1.24", + "symfony/process": "^5.4 || ^6.0" + }, + "require-dev": { + "phpstan/phpstan": "^1.9.3", + "phpstan/phpstan-deprecation-rules": "^1", + "phpstan/phpstan-phpunit": "^1.0", + "phpstan/phpstan-strict-rules": "^1", + "phpstan/phpstan-symfony": "^1.2.10", + "symfony/phpunit-bridge": "^6.0" + }, + "suggest": { + "ext-openssl": "Enabling the openssl extension allows you to access https URLs for repositories and packages", + "ext-zip": "Enabling the zip extension allows you to unzip archives", + "ext-zlib": "Allow gzip compression of HTTP requests" + }, + "bin": [ + "bin/composer" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "2.5-dev" + }, + "phpstan": { + "includes": [ + "phpstan/rules.neon" + ] + } + }, + "autoload": { + "psr-4": { + "Composer\\": "src/Composer" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nils Adermann", + "email": "naderman@naderman.de", + "homepage": "https://www.naderman.de" + }, + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "https://seld.be" + } + ], + "description": "Composer helps you declare, manage and install dependencies of PHP projects. It ensures you have the right stack everywhere.", + "homepage": "https://getcomposer.org/", + "keywords": [ + "autoload", + "dependency", + "package" + ], + "support": { + "irc": "ircs://irc.libera.chat:6697/composer", + "issues": "https://github.com/composer/composer/issues", + "source": "https://github.com/composer/composer/tree/2.5.7" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2023-05-24T13:00:40+00:00" + }, + { + "name": "composer/metadata-minifier", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/composer/metadata-minifier.git", + "reference": "c549d23829536f0d0e984aaabbf02af91f443207" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/metadata-minifier/zipball/c549d23829536f0d0e984aaabbf02af91f443207", + "reference": "c549d23829536f0d0e984aaabbf02af91f443207", + "shasum": "" + }, + "require": { + "php": "^5.3.2 || ^7.0 || ^8.0" + }, + "require-dev": { + "composer/composer": "^2", + "phpstan/phpstan": "^0.12.55", + "symfony/phpunit-bridge": "^4.2 || ^5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\MetadataMinifier\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + } + ], + "description": "Small utility library that handles metadata minification and expansion.", + "keywords": [ + "composer", + "compression" + ], + "support": { + "issues": "https://github.com/composer/metadata-minifier/issues", + "source": "https://github.com/composer/metadata-minifier/tree/1.0.0" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2021-04-07T13:37:33+00:00" + }, + { + "name": "composer/pcre", + "version": "3.1.0", + "source": { + "type": "git", + "url": "https://github.com/composer/pcre.git", + "reference": "4bff79ddd77851fe3cdd11616ed3f92841ba5bd2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/pcre/zipball/4bff79ddd77851fe3cdd11616ed3f92841ba5bd2", + "reference": "4bff79ddd77851fe3cdd11616ed3f92841ba5bd2", + "shasum": "" + }, + "require": { + "php": "^7.4 || ^8.0" + }, + "require-dev": { + "phpstan/phpstan": "^1.3", + "phpstan/phpstan-strict-rules": "^1.1", + "symfony/phpunit-bridge": "^5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\Pcre\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + } + ], + "description": "PCRE wrapping library that offers type-safe preg_* replacements.", + "keywords": [ + "PCRE", + "preg", + "regex", + "regular expression" + ], + "support": { + "issues": "https://github.com/composer/pcre/issues", + "source": "https://github.com/composer/pcre/tree/3.1.0" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2022-11-17T09:50:14+00:00" + }, + { + "name": "composer/semver", + "version": "3.3.2", + "source": { + "type": "git", + "url": "https://github.com/composer/semver.git", + "reference": "3953f23262f2bff1919fc82183ad9acb13ff62c9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/semver/zipball/3953f23262f2bff1919fc82183ad9acb13ff62c9", + "reference": "3953f23262f2bff1919fc82183ad9acb13ff62c9", + "shasum": "" + }, + "require": { + "php": "^5.3.2 || ^7.0 || ^8.0" + }, + "require-dev": { + "phpstan/phpstan": "^1.4", + "symfony/phpunit-bridge": "^4.2 || ^5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\Semver\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nils Adermann", + "email": "naderman@naderman.de", + "homepage": "http://www.naderman.de" + }, + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + }, + { + "name": "Rob Bast", + "email": "rob.bast@gmail.com", + "homepage": "http://robbast.nl" + } + ], + "description": "Semver library that offers utilities, version constraint parsing and validation.", + "keywords": [ + "semantic", + "semver", + "validation", + "versioning" + ], + "support": { + "irc": "irc://irc.freenode.org/composer", + "issues": "https://github.com/composer/semver/issues", + "source": "https://github.com/composer/semver/tree/3.3.2" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2022-04-01T19:23:25+00:00" + }, + { + "name": "composer/spdx-licenses", + "version": "1.5.7", + "source": { + "type": "git", + "url": "https://github.com/composer/spdx-licenses.git", + "reference": "c848241796da2abf65837d51dce1fae55a960149" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/spdx-licenses/zipball/c848241796da2abf65837d51dce1fae55a960149", + "reference": "c848241796da2abf65837d51dce1fae55a960149", + "shasum": "" + }, + "require": { + "php": "^5.3.2 || ^7.0 || ^8.0" + }, + "require-dev": { + "phpstan/phpstan": "^0.12.55", + "symfony/phpunit-bridge": "^4.2 || ^5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\Spdx\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nils Adermann", + "email": "naderman@naderman.de", + "homepage": "http://www.naderman.de" + }, + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + }, + { + "name": "Rob Bast", + "email": "rob.bast@gmail.com", + "homepage": "http://robbast.nl" + } + ], + "description": "SPDX licenses list and validation library.", + "keywords": [ + "license", + "spdx", + "validator" + ], + "support": { + "irc": "irc://irc.freenode.org/composer", + "issues": "https://github.com/composer/spdx-licenses/issues", + "source": "https://github.com/composer/spdx-licenses/tree/1.5.7" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2022-05-23T07:37:50+00:00" + }, + { + "name": "composer/xdebug-handler", + "version": "3.0.3", + "source": { + "type": "git", + "url": "https://github.com/composer/xdebug-handler.git", + "reference": "ced299686f41dce890debac69273b47ffe98a40c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/ced299686f41dce890debac69273b47ffe98a40c", + "reference": "ced299686f41dce890debac69273b47ffe98a40c", + "shasum": "" + }, + "require": { + "composer/pcre": "^1 || ^2 || ^3", + "php": "^7.2.5 || ^8.0", + "psr/log": "^1 || ^2 || ^3" + }, + "require-dev": { + "phpstan/phpstan": "^1.0", + "phpstan/phpstan-strict-rules": "^1.1", + "symfony/phpunit-bridge": "^6.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Composer\\XdebugHandler\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "John Stevenson", + "email": "john-stevenson@blueyonder.co.uk" + } + ], + "description": "Restarts a process without Xdebug.", + "keywords": [ + "Xdebug", + "performance" + ], + "support": { + "irc": "irc://irc.freenode.org/composer", + "issues": "https://github.com/composer/xdebug-handler/issues", + "source": "https://github.com/composer/xdebug-handler/tree/3.0.3" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2022-02-25T21:32:43+00:00" + }, + { + "name": "ezyang/htmlpurifier", + "version": "v4.16.0", + "source": { + "type": "git", + "url": "https://github.com/ezyang/htmlpurifier.git", + "reference": "523407fb06eb9e5f3d59889b3978d5bfe94299c8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ezyang/htmlpurifier/zipball/523407fb06eb9e5f3d59889b3978d5bfe94299c8", + "reference": "523407fb06eb9e5f3d59889b3978d5bfe94299c8", + "shasum": "" + }, + "require": { + "php": "~5.6.0 || ~7.0.0 || ~7.1.0 || ~7.2.0 || ~7.3.0 || ~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0" + }, + "require-dev": { + "cerdic/css-tidy": "^1.7 || ^2.0", + "simpletest/simpletest": "dev-master" + }, + "suggest": { + "cerdic/css-tidy": "If you want to use the filter 'Filter.ExtractStyleBlocks'.", + "ext-bcmath": "Used for unit conversion and imagecrash protection", + "ext-iconv": "Converts text to and from non-UTF-8 encodings", + "ext-tidy": "Used for pretty-printing HTML" + }, + "type": "library", + "autoload": { + "files": [ + "library/HTMLPurifier.composer.php" + ], + "psr-0": { + "HTMLPurifier": "library/" + }, + "exclude-from-classmap": [ + "/library/HTMLPurifier/Language/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL-2.1-or-later" + ], + "authors": [ + { + "name": "Edward Z. Yang", + "email": "admin@htmlpurifier.org", + "homepage": "http://ezyang.com" + } + ], + "description": "Standards compliant HTML filter written in PHP", + "homepage": "http://htmlpurifier.org/", + "keywords": [ + "html" + ], + "support": { + "issues": "https://github.com/ezyang/htmlpurifier/issues", + "source": "https://github.com/ezyang/htmlpurifier/tree/v4.16.0" + }, + "time": "2022-09-18T07:06:19+00:00" + }, + { + "name": "guzzlehttp/guzzle", + "version": "7.7.0", + "source": { + "type": "git", + "url": "https://github.com/guzzle/guzzle.git", + "reference": "fb7566caccf22d74d1ab270de3551f72a58399f5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/fb7566caccf22d74d1ab270de3551f72a58399f5", + "reference": "fb7566caccf22d74d1ab270de3551f72a58399f5", + "shasum": "" + }, + "require": { + "ext-json": "*", + "guzzlehttp/promises": "^1.5.3 || ^2.0", + "guzzlehttp/psr7": "^1.9.1 || ^2.4.5", + "php": "^7.2.5 || ^8.0", + "psr/http-client": "^1.0", + "symfony/deprecation-contracts": "^2.2 || ^3.0" + }, + "provide": { + "psr/http-client-implementation": "1.0" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.8.1", + "ext-curl": "*", + "php-http/client-integration-tests": "dev-master#2c025848417c1135031fdf9c728ee53d0a7ceaee as 3.0.999", + "php-http/message-factory": "^1.1", + "phpunit/phpunit": "^8.5.29 || ^9.5.23", + "psr/log": "^1.1 || ^2.0 || ^3.0" + }, + "suggest": { + "ext-curl": "Required for CURL handler support", + "ext-intl": "Required for Internationalized Domain Name (IDN) support", + "psr/log": "Required for using the Log middleware" + }, + "type": "library", + "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + } + }, + "autoload": { + "files": [ + "src/functions_include.php" + ], + "psr-4": { + "GuzzleHttp\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "Jeremy Lindblom", + "email": "jeremeamia@gmail.com", + "homepage": "https://github.com/jeremeamia" + }, + { + "name": "George Mponos", + "email": "gmponos@gmail.com", + "homepage": "https://github.com/gmponos" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/Nyholm" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "homepage": "https://github.com/sagikazarmark" + }, + { + "name": "Tobias Schultze", + "email": "webmaster@tubo-world.de", + "homepage": "https://github.com/Tobion" + } + ], + "description": "Guzzle is a PHP HTTP client library", + "keywords": [ + "client", + "curl", + "framework", + "http", + "http client", + "psr-18", + "psr-7", + "rest", + "web service" + ], + "support": { + "issues": "https://github.com/guzzle/guzzle/issues", + "source": "https://github.com/guzzle/guzzle/tree/7.7.0" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://github.com/Nyholm", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/guzzle", + "type": "tidelift" + } + ], + "time": "2023-05-21T14:04:53+00:00" + }, + { + "name": "guzzlehttp/promises", + "version": "2.0.0", + "source": { + "type": "git", + "url": "https://github.com/guzzle/promises.git", + "reference": "3a494dc7dc1d7d12e511890177ae2d0e6c107da6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/promises/zipball/3a494dc7dc1d7d12e511890177ae2d0e6c107da6", + "reference": "3a494dc7dc1d7d12e511890177ae2d0e6c107da6", + "shasum": "" + }, + "require": { + "php": "^7.2.5 || ^8.0" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.8.1", + "phpunit/phpunit": "^8.5.29 || ^9.5.23" + }, + "type": "library", + "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\Promise\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/Nyholm" + }, + { + "name": "Tobias Schultze", + "email": "webmaster@tubo-world.de", + "homepage": "https://github.com/Tobion" + } + ], + "description": "Guzzle promises library", + "keywords": [ + "promise" + ], + "support": { + "issues": "https://github.com/guzzle/promises/issues", + "source": "https://github.com/guzzle/promises/tree/2.0.0" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://github.com/Nyholm", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/promises", + "type": "tidelift" + } + ], + "time": "2023-05-21T13:50:22+00:00" + }, + { + "name": "guzzlehttp/psr7", + "version": "2.5.0", + "source": { + "type": "git", + "url": "https://github.com/guzzle/psr7.git", + "reference": "b635f279edd83fc275f822a1188157ffea568ff6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/b635f279edd83fc275f822a1188157ffea568ff6", + "reference": "b635f279edd83fc275f822a1188157ffea568ff6", + "shasum": "" + }, + "require": { + "php": "^7.2.5 || ^8.0", + "psr/http-factory": "^1.0", + "psr/http-message": "^1.1 || ^2.0", + "ralouphie/getallheaders": "^3.0" + }, + "provide": { + "psr/http-factory-implementation": "1.0", + "psr/http-message-implementation": "1.0" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.8.1", + "http-interop/http-factory-tests": "^0.9", + "phpunit/phpunit": "^8.5.29 || ^9.5.23" + }, + "suggest": { + "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" + }, + "type": "library", + "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\Psr7\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "George Mponos", + "email": "gmponos@gmail.com", + "homepage": "https://github.com/gmponos" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/Nyholm" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "homepage": "https://github.com/sagikazarmark" + }, + { + "name": "Tobias Schultze", + "email": "webmaster@tubo-world.de", + "homepage": "https://github.com/Tobion" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "homepage": "https://sagikazarmark.hu" + } + ], + "description": "PSR-7 message implementation that also provides common utility methods", + "keywords": [ + "http", + "message", + "psr-7", + "request", + "response", + "stream", + "uri", + "url" + ], + "support": { + "issues": "https://github.com/guzzle/psr7/issues", + "source": "https://github.com/guzzle/psr7/tree/2.5.0" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://github.com/Nyholm", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/psr7", + "type": "tidelift" + } + ], + "time": "2023-04-17T16:11:26+00:00" + }, + { + "name": "justinrainbow/json-schema", + "version": "5.2.12", + "source": { + "type": "git", + "url": "https://github.com/justinrainbow/json-schema.git", + "reference": "ad87d5a5ca981228e0e205c2bc7dfb8e24559b60" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/justinrainbow/json-schema/zipball/ad87d5a5ca981228e0e205c2bc7dfb8e24559b60", + "reference": "ad87d5a5ca981228e0e205c2bc7dfb8e24559b60", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "~2.2.20||~2.15.1", + "json-schema/json-schema-test-suite": "1.2.0", + "phpunit/phpunit": "^4.8.35" + }, + "bin": [ + "bin/validate-json" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "JsonSchema\\": "src/JsonSchema/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bruno Prieto Reis", + "email": "bruno.p.reis@gmail.com" + }, + { + "name": "Justin Rainbow", + "email": "justin.rainbow@gmail.com" + }, + { + "name": "Igor Wiedler", + "email": "igor@wiedler.ch" + }, + { + "name": "Robert Schönthal", + "email": "seroscho@googlemail.com" + } + ], + "description": "A library to validate a json schema.", + "homepage": "https://github.com/justinrainbow/json-schema", + "keywords": [ + "json", + "schema" + ], + "support": { + "issues": "https://github.com/justinrainbow/json-schema/issues", + "source": "https://github.com/justinrainbow/json-schema/tree/5.2.12" + }, + "time": "2022-04-13T08:02:27+00:00" + }, + { + "name": "laminas/laminas-captcha", + "version": "2.16.0", + "source": { + "type": "git", + "url": "https://github.com/laminas/laminas-captcha.git", + "reference": "8623619b1b634ba3672f91a9fb610deffec9c932" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laminas/laminas-captcha/zipball/8623619b1b634ba3672f91a9fb610deffec9c932", + "reference": "8623619b1b634ba3672f91a9fb610deffec9c932", + "shasum": "" + }, + "require": { + "laminas/laminas-recaptcha": "^3.4.0", + "laminas/laminas-session": "^2.12", + "laminas/laminas-stdlib": "^3.10.1", + "laminas/laminas-text": "^2.9.0", + "laminas/laminas-validator": "^2.19.0", + "php": "~8.0.0 || ~8.1.0 || ~8.2.0" + }, + "conflict": { + "zendframework/zend-captcha": "*" + }, + "require-dev": { + "ext-gd": "*", + "laminas/laminas-coding-standard": "~2.4.0", + "phpunit/phpunit": "^9.5.26", + "psalm/plugin-phpunit": "^0.18.4", + "vimeo/psalm": "^5.1" + }, + "suggest": { + "laminas/laminas-i18n-resources": "Translations of captcha messages" + }, + "type": "library", + "autoload": { + "psr-4": { + "Laminas\\Captcha\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "Generate and validate CAPTCHAs using Figlets, images, ReCaptcha, and more", + "homepage": "https://laminas.dev", + "keywords": [ + "captcha", + "laminas" + ], + "support": { + "chat": "https://laminas.dev/chat", + "docs": "https://docs.laminas.dev/laminas-captcha/", + "forum": "https://discourse.laminas.dev", + "issues": "https://github.com/laminas/laminas-captcha/issues", + "rss": "https://github.com/laminas/laminas-captcha/releases.atom", + "source": "https://github.com/laminas/laminas-captcha" + }, + "funding": [ + { + "url": "https://funding.communitybridge.org/projects/laminas-project", + "type": "community_bridge" + } + ], + "time": "2023-01-01T13:12:40+00:00" + }, + { + "name": "laminas/laminas-code", + "version": "4.11.0", + "source": { + "type": "git", + "url": "https://github.com/laminas/laminas-code.git", + "reference": "169123b3ede20a9193480c53de2a8194f8c073ec" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laminas/laminas-code/zipball/169123b3ede20a9193480c53de2a8194f8c073ec", + "reference": "169123b3ede20a9193480c53de2a8194f8c073ec", + "shasum": "" + }, + "require": { + "php": "~8.1.0 || ~8.2.0" + }, + "require-dev": { + "doctrine/annotations": "^2.0.0", + "ext-phar": "*", + "laminas/laminas-coding-standard": "^2.3.0", + "laminas/laminas-stdlib": "^3.6.1", + "phpunit/phpunit": "^10.0.9", + "psalm/plugin-phpunit": "^0.18.4", + "vimeo/psalm": "^5.7.1" + }, + "suggest": { + "doctrine/annotations": "Doctrine\\Common\\Annotations >=1.0 for annotation features", + "laminas/laminas-stdlib": "Laminas\\Stdlib component" + }, + "type": "library", + "autoload": { + "psr-4": { + "Laminas\\Code\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "Extensions to the PHP Reflection API, static code scanning, and code generation", + "homepage": "https://laminas.dev", + "keywords": [ + "code", + "laminas", + "laminasframework" + ], + "support": { + "chat": "https://laminas.dev/chat", + "docs": "https://docs.laminas.dev/laminas-code/", + "forum": "https://discourse.laminas.dev", + "issues": "https://github.com/laminas/laminas-code/issues", + "rss": "https://github.com/laminas/laminas-code/releases.atom", + "source": "https://github.com/laminas/laminas-code" + }, + "funding": [ + { + "url": "https://funding.communitybridge.org/projects/laminas-project", + "type": "community_bridge" + } + ], + "time": "2023-05-14T12:05:38+00:00" + }, + { + "name": "laminas/laminas-config", + "version": "3.8.0", + "source": { + "type": "git", + "url": "https://github.com/laminas/laminas-config.git", + "reference": "46baad58d0b12cf98539e04334eff40a1fdfb9a0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laminas/laminas-config/zipball/46baad58d0b12cf98539e04334eff40a1fdfb9a0", + "reference": "46baad58d0b12cf98539e04334eff40a1fdfb9a0", + "shasum": "" + }, + "require": { + "ext-json": "*", + "laminas/laminas-stdlib": "^3.6", + "php": "~8.0.0 || ~8.1.0 || ~8.2.0", + "psr/container": "^1.0" + }, + "conflict": { + "container-interop/container-interop": "<1.2.0", + "zendframework/zend-config": "*" + }, + "require-dev": { + "laminas/laminas-coding-standard": "~2.4.0", + "laminas/laminas-filter": "~2.23.0", + "laminas/laminas-i18n": "~2.19.0", + "laminas/laminas-servicemanager": "~3.19.0", + "phpunit/phpunit": "~9.5.25" + }, + "suggest": { + "laminas/laminas-filter": "^2.7.2; install if you want to use the Filter processor", + "laminas/laminas-i18n": "^2.7.4; install if you want to use the Translator processor", + "laminas/laminas-servicemanager": "^2.7.8 || ^3.3; if you need an extensible plugin manager for use with the Config Factory" + }, + "type": "library", + "autoload": { + "psr-4": { + "Laminas\\Config\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "provides a nested object property based user interface for accessing this configuration data within application code", + "homepage": "https://laminas.dev", + "keywords": [ + "config", + "laminas" + ], + "support": { + "chat": "https://laminas.dev/chat", + "docs": "https://docs.laminas.dev/laminas-config/", + "forum": "https://discourse.laminas.dev", + "issues": "https://github.com/laminas/laminas-config/issues", + "rss": "https://github.com/laminas/laminas-config/releases.atom", + "source": "https://github.com/laminas/laminas-config" + }, + "funding": [ + { + "url": "https://funding.communitybridge.org/projects/laminas-project", + "type": "community_bridge" + } + ], + "time": "2022-10-16T14:21:22+00:00" + }, + { + "name": "laminas/laminas-crypt", + "version": "3.10.0", + "source": { + "type": "git", + "url": "https://github.com/laminas/laminas-crypt.git", + "reference": "588375caf4d505fee90d1449e9714c912ceb5051" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laminas/laminas-crypt/zipball/588375caf4d505fee90d1449e9714c912ceb5051", + "reference": "588375caf4d505fee90d1449e9714c912ceb5051", + "shasum": "" + }, + "require": { + "ext-mbstring": "*", + "laminas/laminas-math": "^3.4", + "laminas/laminas-servicemanager": "^3.11.2", + "laminas/laminas-stdlib": "^3.6", + "php": "~8.0.0 || ~8.1.0 || ~8.2.0", + "psr/container": "^1.1" + }, + "conflict": { + "zendframework/zend-crypt": "*" + }, + "require-dev": { + "laminas/laminas-coding-standard": "~2.4.0", + "phpunit/phpunit": "^9.5.25" + }, + "suggest": { + "ext-openssl": "Required for most features of Laminas\\Crypt" + }, + "type": "library", + "autoload": { + "psr-4": { + "Laminas\\Crypt\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "Strong cryptography tools and password hashing", + "homepage": "https://laminas.dev", + "keywords": [ + "crypt", + "laminas" + ], + "support": { + "chat": "https://laminas.dev/chat", + "docs": "https://docs.laminas.dev/laminas-crypt/", + "forum": "https://discourse.laminas.dev", + "issues": "https://github.com/laminas/laminas-crypt/issues", + "rss": "https://github.com/laminas/laminas-crypt/releases.atom", + "source": "https://github.com/laminas/laminas-crypt" + }, + "funding": [ + { + "url": "https://funding.communitybridge.org/projects/laminas-project", + "type": "community_bridge" + } + ], + "time": "2023-03-03T15:57:57+00:00" + }, + { + "name": "laminas/laminas-db", + "version": "2.18.0", + "source": { + "type": "git", + "url": "https://github.com/laminas/laminas-db.git", + "reference": "4df7a3f7ffe268e8683306fcec125c269408b295" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laminas/laminas-db/zipball/4df7a3f7ffe268e8683306fcec125c269408b295", + "reference": "4df7a3f7ffe268e8683306fcec125c269408b295", + "shasum": "" + }, + "require": { + "laminas/laminas-stdlib": "^3.7.1", + "php": "~8.0.0 || ~8.1.0|| ~8.2.0" + }, + "conflict": { + "zendframework/zend-db": "*" + }, + "require-dev": { + "laminas/laminas-coding-standard": "^2.4.0", + "laminas/laminas-eventmanager": "^3.6.0", + "laminas/laminas-hydrator": "^4.7", + "laminas/laminas-servicemanager": "^3.19.0", + "phpunit/phpunit": "^9.5.25" + }, + "suggest": { + "laminas/laminas-eventmanager": "Laminas\\EventManager component", + "laminas/laminas-hydrator": "(^3.2 || ^4.3) Laminas\\Hydrator component for using HydratingResultSets", + "laminas/laminas-servicemanager": "Laminas\\ServiceManager component" + }, + "type": "library", + "extra": { + "laminas": { + "component": "Laminas\\Db", + "config-provider": "Laminas\\Db\\ConfigProvider" + } + }, + "autoload": { + "psr-4": { + "Laminas\\Db\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "Database abstraction layer, SQL abstraction, result set abstraction, and RowDataGateway and TableDataGateway implementations", + "homepage": "https://laminas.dev", + "keywords": [ + "db", + "laminas" + ], + "support": { + "chat": "https://laminas.dev/chat", + "docs": "https://docs.laminas.dev/laminas-db/", + "forum": "https://discourse.laminas.dev", + "issues": "https://github.com/laminas/laminas-db/issues", + "rss": "https://github.com/laminas/laminas-db/releases.atom", + "source": "https://github.com/laminas/laminas-db" + }, + "funding": [ + { + "url": "https://funding.communitybridge.org/projects/laminas-project", + "type": "community_bridge" + } + ], + "time": "2023-05-05T16:22:28+00:00" + }, + { + "name": "laminas/laminas-escaper", + "version": "2.12.0", + "source": { + "type": "git", + "url": "https://github.com/laminas/laminas-escaper.git", + "reference": "ee7a4c37bf3d0e8c03635d5bddb5bb3184ead490" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laminas/laminas-escaper/zipball/ee7a4c37bf3d0e8c03635d5bddb5bb3184ead490", + "reference": "ee7a4c37bf3d0e8c03635d5bddb5bb3184ead490", + "shasum": "" + }, + "require": { + "ext-ctype": "*", + "ext-mbstring": "*", + "php": "^7.4 || ~8.0.0 || ~8.1.0 || ~8.2.0" + }, + "conflict": { + "zendframework/zend-escaper": "*" + }, + "require-dev": { + "infection/infection": "^0.26.6", + "laminas/laminas-coding-standard": "~2.4.0", + "maglnet/composer-require-checker": "^3.8.0", + "phpunit/phpunit": "^9.5.18", + "psalm/plugin-phpunit": "^0.17.0", + "vimeo/psalm": "^4.22.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Laminas\\Escaper\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "Securely and safely escape HTML, HTML attributes, JavaScript, CSS, and URLs", + "homepage": "https://laminas.dev", + "keywords": [ + "escaper", + "laminas" + ], + "support": { + "chat": "https://laminas.dev/chat", + "docs": "https://docs.laminas.dev/laminas-escaper/", + "forum": "https://discourse.laminas.dev", + "issues": "https://github.com/laminas/laminas-escaper/issues", + "rss": "https://github.com/laminas/laminas-escaper/releases.atom", + "source": "https://github.com/laminas/laminas-escaper" + }, + "funding": [ + { + "url": "https://funding.communitybridge.org/projects/laminas-project", + "type": "community_bridge" + } + ], + "time": "2022-10-10T10:11:09+00:00" + }, + { + "name": "laminas/laminas-eventmanager", + "version": "3.10.0", + "source": { + "type": "git", + "url": "https://github.com/laminas/laminas-eventmanager.git", + "reference": "5a5114ab2d3fa4424faa46a2fb0a4e49a61f6eba" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laminas/laminas-eventmanager/zipball/5a5114ab2d3fa4424faa46a2fb0a4e49a61f6eba", + "reference": "5a5114ab2d3fa4424faa46a2fb0a4e49a61f6eba", + "shasum": "" + }, + "require": { + "php": "~8.0.0 || ~8.1.0 || ~8.2.0" + }, + "conflict": { + "container-interop/container-interop": "<1.2", + "zendframework/zend-eventmanager": "*" + }, + "require-dev": { + "laminas/laminas-coding-standard": "~2.5.0", + "laminas/laminas-stdlib": "^3.15", + "phpbench/phpbench": "^1.2.7", + "phpunit/phpunit": "^9.5.26", + "psalm/plugin-phpunit": "^0.18.0", + "psr/container": "^1.1.2 || ^2.0.2", + "vimeo/psalm": "^5.0.0" + }, + "suggest": { + "laminas/laminas-stdlib": "^2.7.3 || ^3.0, to use the FilterChain feature", + "psr/container": "^1.1.2 || ^2.0.2, to use the lazy listeners feature" + }, + "type": "library", + "autoload": { + "psr-4": { + "Laminas\\EventManager\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "Trigger and listen to events within a PHP application", + "homepage": "https://laminas.dev", + "keywords": [ + "event", + "eventmanager", + "events", + "laminas" + ], + "support": { + "chat": "https://laminas.dev/chat", + "docs": "https://docs.laminas.dev/laminas-eventmanager/", + "forum": "https://discourse.laminas.dev", + "issues": "https://github.com/laminas/laminas-eventmanager/issues", + "rss": "https://github.com/laminas/laminas-eventmanager/releases.atom", + "source": "https://github.com/laminas/laminas-eventmanager" + }, + "funding": [ + { + "url": "https://funding.communitybridge.org/projects/laminas-project", + "type": "community_bridge" + } + ], + "time": "2023-01-11T19:52:45+00:00" + }, + { + "name": "laminas/laminas-file", + "version": "2.12.0", + "source": { + "type": "git", + "url": "https://github.com/laminas/laminas-file.git", + "reference": "9e8ff3a6d7ccaad0865581ef672a7c48260b65d9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laminas/laminas-file/zipball/9e8ff3a6d7ccaad0865581ef672a7c48260b65d9", + "reference": "9e8ff3a6d7ccaad0865581ef672a7c48260b65d9", + "shasum": "" + }, + "require": { + "laminas/laminas-stdlib": "^2.7.7 || ^3.15.0", + "php": "~8.0.0 || ~8.1.0 || ~8.2.0" + }, + "conflict": { + "zendframework/zend-file": "*" + }, + "require-dev": { + "laminas/laminas-coding-standard": "~1.0.0", + "laminas/laminas-filter": "^2.7.2", + "laminas/laminas-i18n": "^2.7.4", + "laminas/laminas-progressbar": "^2.5.2", + "laminas/laminas-servicemanager": "^2.7.8 || ^3.3", + "laminas/laminas-session": "^2.8", + "laminas/laminas-validator": "^2.10.1", + "phpunit/phpunit": "^9.5.10" + }, + "suggest": { + "laminas/laminas-filter": "Laminas\\Filter component", + "laminas/laminas-i18n": "Laminas\\I18n component", + "laminas/laminas-validator": "Laminas\\Validator component" + }, + "type": "library", + "autoload": { + "psr-4": { + "Laminas\\File\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "Locate PHP classfiles", + "homepage": "https://laminas.dev", + "keywords": [ + "file", + "laminas" + ], + "support": { + "chat": "https://laminas.dev/chat", + "docs": "https://docs.laminas.dev/laminas-file/", + "forum": "https://discourse.laminas.dev", + "issues": "https://github.com/laminas/laminas-file/issues", + "rss": "https://github.com/laminas/laminas-file/releases.atom", + "source": "https://github.com/laminas/laminas-file" + }, + "funding": [ + { + "url": "https://funding.communitybridge.org/projects/laminas-project", + "type": "community_bridge" + } + ], + "time": "2022-11-21T06:59:25+00:00" + }, + { + "name": "laminas/laminas-filter", + "version": "2.32.0", + "source": { + "type": "git", + "url": "https://github.com/laminas/laminas-filter.git", + "reference": "2b7e6b2b26a92412c38336ee3089251164edf141" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laminas/laminas-filter/zipball/2b7e6b2b26a92412c38336ee3089251164edf141", + "reference": "2b7e6b2b26a92412c38336ee3089251164edf141", + "shasum": "" + }, + "require": { + "ext-mbstring": "*", + "laminas/laminas-servicemanager": "^3.21.0", + "laminas/laminas-stdlib": "^3.13.0", + "php": "~8.1.0 || ~8.2.0" + }, + "conflict": { + "laminas/laminas-validator": "<2.10.1", + "zendframework/zend-filter": "*" + }, + "require-dev": { + "laminas/laminas-coding-standard": "~2.5.0", + "laminas/laminas-crypt": "^3.10", + "laminas/laminas-uri": "^2.10", + "pear/archive_tar": "^1.4.14", + "phpunit/phpunit": "^10.1.3", + "psalm/plugin-phpunit": "^0.18.4", + "psr/http-factory": "^1.0.2", + "vimeo/psalm": "^5.11" + }, + "suggest": { + "laminas/laminas-crypt": "Laminas\\Crypt component, for encryption filters", + "laminas/laminas-i18n": "Laminas\\I18n component for filters depending on i18n functionality", + "laminas/laminas-uri": "Laminas\\Uri component, for the UriNormalize filter", + "psr/http-factory-implementation": "psr/http-factory-implementation, for creating file upload instances when consuming PSR-7 in file upload filters" + }, + "type": "library", + "extra": { + "laminas": { + "component": "Laminas\\Filter", + "config-provider": "Laminas\\Filter\\ConfigProvider" + } + }, + "autoload": { + "psr-4": { + "Laminas\\Filter\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "Programmatically filter and normalize data and files", + "homepage": "https://laminas.dev", + "keywords": [ + "filter", + "laminas" + ], + "support": { + "chat": "https://laminas.dev/chat", + "docs": "https://docs.laminas.dev/laminas-filter/", + "forum": "https://discourse.laminas.dev", + "issues": "https://github.com/laminas/laminas-filter/issues", + "rss": "https://github.com/laminas/laminas-filter/releases.atom", + "source": "https://github.com/laminas/laminas-filter" + }, + "funding": [ + { + "url": "https://funding.communitybridge.org/projects/laminas-project", + "type": "community_bridge" + } + ], + "time": "2023-05-16T23:25:05+00:00" + }, + { + "name": "laminas/laminas-http", + "version": "2.18.0", + "source": { + "type": "git", + "url": "https://github.com/laminas/laminas-http.git", + "reference": "76de9008f889bc7088f85a41d0d2b06c2b59c53d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laminas/laminas-http/zipball/76de9008f889bc7088f85a41d0d2b06c2b59c53d", + "reference": "76de9008f889bc7088f85a41d0d2b06c2b59c53d", + "shasum": "" + }, + "require": { + "laminas/laminas-loader": "^2.8", + "laminas/laminas-stdlib": "^3.6", + "laminas/laminas-uri": "^2.9.1", + "laminas/laminas-validator": "^2.15", + "php": "~8.0.0 || ~8.1.0 || ~8.2.0" + }, + "conflict": { + "zendframework/zend-http": "*" + }, + "require-dev": { + "ext-curl": "*", + "laminas/laminas-coding-standard": "~2.4.0", + "phpunit/phpunit": "^9.5.25" + }, + "suggest": { + "paragonie/certainty": "For automated management of cacert.pem" + }, + "type": "library", + "autoload": { + "psr-4": { + "Laminas\\Http\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "Provides an easy interface for performing Hyper-Text Transfer Protocol (HTTP) requests", + "homepage": "https://laminas.dev", + "keywords": [ + "http", + "http client", + "laminas" + ], + "support": { + "chat": "https://laminas.dev/chat", + "docs": "https://docs.laminas.dev/laminas-http/", + "forum": "https://discourse.laminas.dev", + "issues": "https://github.com/laminas/laminas-http/issues", + "rss": "https://github.com/laminas/laminas-http/releases.atom", + "source": "https://github.com/laminas/laminas-http" + }, + "funding": [ + { + "url": "https://funding.communitybridge.org/projects/laminas-project", + "type": "community_bridge" + } + ], + "time": "2022-11-23T15:45:41+00:00" + }, + { + "name": "laminas/laminas-i18n", + "version": "2.23.0", + "source": { + "type": "git", + "url": "https://github.com/laminas/laminas-i18n.git", + "reference": "bb844a1141bb6e65d8889f5a08383f761a8270b2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laminas/laminas-i18n/zipball/bb844a1141bb6e65d8889f5a08383f761a8270b2", + "reference": "bb844a1141bb6e65d8889f5a08383f761a8270b2", + "shasum": "" + }, + "require": { + "ext-intl": "*", + "laminas/laminas-servicemanager": "^3.21.0", + "laminas/laminas-stdlib": "^3.0", + "php": "~8.1.0 || ~8.2.0" + }, + "conflict": { + "laminas/laminas-view": "<2.20.0", + "zendframework/zend-i18n": "*" + }, + "require-dev": { + "laminas/laminas-cache": "^3.10.1", + "laminas/laminas-cache-storage-adapter-memory": "^2.2.0", + "laminas/laminas-cache-storage-deprecated-factory": "^1.1", + "laminas/laminas-coding-standard": "~2.5.0", + "laminas/laminas-config": "^3.8.0", + "laminas/laminas-eventmanager": "^3.10", + "laminas/laminas-filter": "^2.31", + "laminas/laminas-validator": "^2.30.1", + "laminas/laminas-view": "^2.27", + "phpunit/phpunit": "^10.1.3", + "psalm/plugin-phpunit": "^0.18.4", + "vimeo/psalm": "^5.11" + }, + "suggest": { + "laminas/laminas-cache": "You should install this package to cache the translations", + "laminas/laminas-config": "You should install this package to use the INI translation format", + "laminas/laminas-eventmanager": "You should install this package to use the events in the translator", + "laminas/laminas-filter": "You should install this package to use the provided filters", + "laminas/laminas-i18n-resources": "This package provides validator and captcha translations", + "laminas/laminas-validator": "You should install this package to use the provided validators", + "laminas/laminas-view": "You should install this package to use the provided view helpers" + }, + "type": "library", + "extra": { + "laminas": { + "component": "Laminas\\I18n", + "config-provider": "Laminas\\I18n\\ConfigProvider" + } + }, + "autoload": { + "psr-4": { + "Laminas\\I18n\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "Provide translations for your application, and filter and validate internationalized values", + "homepage": "https://laminas.dev", + "keywords": [ + "i18n", + "laminas" + ], + "support": { + "chat": "https://laminas.dev/chat", + "docs": "https://docs.laminas.dev/laminas-i18n/", + "forum": "https://discourse.laminas.dev", + "issues": "https://github.com/laminas/laminas-i18n/issues", + "rss": "https://github.com/laminas/laminas-i18n/releases.atom", + "source": "https://github.com/laminas/laminas-i18n" + }, + "funding": [ + { + "url": "https://funding.communitybridge.org/projects/laminas-project", + "type": "community_bridge" + } + ], + "time": "2023-05-16T23:22:24+00:00" + }, + { + "name": "laminas/laminas-loader", + "version": "2.9.0", + "source": { + "type": "git", + "url": "https://github.com/laminas/laminas-loader.git", + "reference": "51ed9c3fa42d1098a9997571730c0cbf42d078d3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laminas/laminas-loader/zipball/51ed9c3fa42d1098a9997571730c0cbf42d078d3", + "reference": "51ed9c3fa42d1098a9997571730c0cbf42d078d3", + "shasum": "" + }, + "require": { + "php": "~8.0.0 || ~8.1.0 || ~8.2.0" + }, + "conflict": { + "zendframework/zend-loader": "*" + }, + "require-dev": { + "laminas/laminas-coding-standard": "~2.4.0", + "phpunit/phpunit": "~9.5.25" + }, + "type": "library", + "autoload": { + "psr-4": { + "Laminas\\Loader\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "Autoloading and plugin loading strategies", + "homepage": "https://laminas.dev", + "keywords": [ + "laminas", + "loader" + ], + "support": { + "chat": "https://laminas.dev/chat", + "docs": "https://docs.laminas.dev/laminas-loader/", + "forum": "https://discourse.laminas.dev", + "issues": "https://github.com/laminas/laminas-loader/issues", + "rss": "https://github.com/laminas/laminas-loader/releases.atom", + "source": "https://github.com/laminas/laminas-loader" + }, + "funding": [ + { + "url": "https://funding.communitybridge.org/projects/laminas-project", + "type": "community_bridge" + } + ], + "time": "2022-10-16T12:50:49+00:00" + }, + { + "name": "laminas/laminas-mail", + "version": "2.23.0", + "source": { + "type": "git", + "url": "https://github.com/laminas/laminas-mail.git", + "reference": "3ae64e7cfd505552fbee2e556746c345ccc33cf7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laminas/laminas-mail/zipball/3ae64e7cfd505552fbee2e556746c345ccc33cf7", + "reference": "3ae64e7cfd505552fbee2e556746c345ccc33cf7", + "shasum": "" + }, + "require": { + "ext-iconv": "*", + "laminas/laminas-loader": "^2.9.0", + "laminas/laminas-mime": "^2.11.0", + "laminas/laminas-stdlib": "^3.17.0", + "laminas/laminas-validator": "^2.31.0", + "php": "~8.1.0 || ~8.2.0", + "symfony/polyfill-intl-idn": "^1.27.0", + "symfony/polyfill-mbstring": "^1.27.0", + "webmozart/assert": "^1.11.0" + }, + "require-dev": { + "laminas/laminas-coding-standard": "~2.5.0", + "laminas/laminas-crypt": "^3.10.0", + "laminas/laminas-db": "^2.18", + "laminas/laminas-servicemanager": "^3.21", + "phpunit/phpunit": "^10.1.3", + "psalm/plugin-phpunit": "^0.18.4", + "symfony/process": "^6.2.10", + "vimeo/psalm": "^5.11" + }, + "suggest": { + "laminas/laminas-crypt": "^3.10 Crammd5 support in SMTP Auth", + "laminas/laminas-servicemanager": "^3.21 when using SMTP to deliver messages" + }, + "type": "library", + "extra": { + "laminas": { + "component": "Laminas\\Mail", + "config-provider": "Laminas\\Mail\\ConfigProvider" + } + }, + "autoload": { + "psr-4": { + "Laminas\\Mail\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "Provides generalized functionality to compose and send both text and MIME-compliant multipart e-mail messages", + "homepage": "https://laminas.dev", + "keywords": [ + "laminas", + "mail" + ], + "support": { + "chat": "https://laminas.dev/chat", + "docs": "https://docs.laminas.dev/laminas-mail/", + "forum": "https://discourse.laminas.dev", + "issues": "https://github.com/laminas/laminas-mail/issues", + "rss": "https://github.com/laminas/laminas-mail/releases.atom", + "source": "https://github.com/laminas/laminas-mail" + }, + "funding": [ + { + "url": "https://funding.communitybridge.org/projects/laminas-project", + "type": "community_bridge" + } + ], + "time": "2023-05-25T13:15:12+00:00" + }, + { + "name": "laminas/laminas-math", + "version": "3.6.0", + "source": { + "type": "git", + "url": "https://github.com/laminas/laminas-math.git", + "reference": "5770fc632a3614f5526632a8b70f41b65130460e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laminas/laminas-math/zipball/5770fc632a3614f5526632a8b70f41b65130460e", + "reference": "5770fc632a3614f5526632a8b70f41b65130460e", + "shasum": "" + }, + "require": { + "ext-mbstring": "*", + "php": "~8.0.0 || ~8.1.0 || ~8.2.0" + }, + "conflict": { + "zendframework/zend-math": "*" + }, + "require-dev": { + "laminas/laminas-coding-standard": "~2.4.0", + "phpunit/phpunit": "~9.5.25" + }, + "suggest": { + "ext-bcmath": "If using the bcmath functionality", + "ext-gmp": "If using the gmp functionality" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.2.x-dev", + "dev-develop": "3.3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Laminas\\Math\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "Create cryptographically secure pseudo-random numbers, and manage big integers", + "homepage": "https://laminas.dev", + "keywords": [ + "laminas", + "math" + ], + "support": { + "chat": "https://laminas.dev/chat", + "docs": "https://docs.laminas.dev/laminas-math/", + "forum": "https://discourse.laminas.dev", + "issues": "https://github.com/laminas/laminas-math/issues", + "rss": "https://github.com/laminas/laminas-math/releases.atom", + "source": "https://github.com/laminas/laminas-math" + }, + "funding": [ + { + "url": "https://funding.communitybridge.org/projects/laminas-project", + "type": "community_bridge" + } + ], + "time": "2022-10-16T14:22:28+00:00" + }, + { + "name": "laminas/laminas-mime", + "version": "2.11.0", + "source": { + "type": "git", + "url": "https://github.com/laminas/laminas-mime.git", + "reference": "60ec04b755821c79c1987ce291b44e69f2c0831f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laminas/laminas-mime/zipball/60ec04b755821c79c1987ce291b44e69f2c0831f", + "reference": "60ec04b755821c79c1987ce291b44e69f2c0831f", + "shasum": "" + }, + "require": { + "laminas/laminas-stdlib": "^2.7 || ^3.0", + "php": "~8.0.0 || ~8.1.0 || ~8.2.0" + }, + "conflict": { + "zendframework/zend-mime": "*" + }, + "require-dev": { + "laminas/laminas-coding-standard": "~2.4.0", + "laminas/laminas-mail": "^2.19.0", + "phpunit/phpunit": "~9.5.25" + }, + "suggest": { + "laminas/laminas-mail": "Laminas\\Mail component" + }, + "type": "library", + "autoload": { + "psr-4": { + "Laminas\\Mime\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "Create and parse MIME messages and parts", + "homepage": "https://laminas.dev", + "keywords": [ + "laminas", + "mime" + ], + "support": { + "chat": "https://laminas.dev/chat", + "docs": "https://docs.laminas.dev/laminas-mime/", + "forum": "https://discourse.laminas.dev", + "issues": "https://github.com/laminas/laminas-mime/issues", + "rss": "https://github.com/laminas/laminas-mime/releases.atom", + "source": "https://github.com/laminas/laminas-mime" + }, + "funding": [ + { + "url": "https://funding.communitybridge.org/projects/laminas-project", + "type": "community_bridge" + } + ], + "time": "2022-10-18T08:38:15+00:00" + }, + { + "name": "laminas/laminas-oauth", + "version": "2.5.0", + "source": { + "type": "git", + "url": "https://github.com/laminas/laminas-oauth.git", + "reference": "882daa922f3d4f3c1a4282d5c0afeddabefaadb9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laminas/laminas-oauth/zipball/882daa922f3d4f3c1a4282d5c0afeddabefaadb9", + "reference": "882daa922f3d4f3c1a4282d5c0afeddabefaadb9", + "shasum": "" + }, + "require": { + "laminas/laminas-config": "^3.7", + "laminas/laminas-crypt": "^3.6.0", + "laminas/laminas-http": "^2.15", + "laminas/laminas-i18n": "^2.13.0", + "laminas/laminas-loader": "^2.8", + "laminas/laminas-math": "^3.5", + "laminas/laminas-stdlib": "^3.10", + "laminas/laminas-uri": "^2.9", + "php": "~8.0.0 || ~8.1.0 || ~8.2.0" + }, + "conflict": { + "zendframework/zendoauth": "*" + }, + "require-dev": { + "laminas/laminas-coding-standard": "~1.0.0", + "phpunit/phpunit": "^9.5.5" + }, + "type": "library", + "autoload": { + "psr-4": { + "Laminas\\OAuth\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "homepage": "https://laminas.dev", + "keywords": [ + "laminas", + "oauth" + ], + "support": { + "chat": "https://laminas.dev/chat", + "forum": "https://discourse.laminas.dev", + "issues": "https://github.com/laminas/laminas-oauth/issues", + "rss": "https://github.com/laminas/laminas-oauth/releases.atom", + "source": "https://github.com/laminas/laminas-oauth" + }, + "funding": [ + { + "url": "https://funding.communitybridge.org/projects/laminas-project", + "type": "community_bridge" + } + ], + "time": "2022-11-17T10:40:56+00:00" + }, + { + "name": "laminas/laminas-permissions-acl", + "version": "2.14.0", + "source": { + "type": "git", + "url": "https://github.com/laminas/laminas-permissions-acl.git", + "reference": "86cecb540cf8f2e088d70d8acef1fc9203ed5023" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laminas/laminas-permissions-acl/zipball/86cecb540cf8f2e088d70d8acef1fc9203ed5023", + "reference": "86cecb540cf8f2e088d70d8acef1fc9203ed5023", + "shasum": "" + }, + "require": { + "php": "~8.0.0 || ~8.1.0 || ~8.2.0" + }, + "conflict": { + "laminas/laminas-servicemanager": "<3.0", + "zendframework/zend-permissions-acl": "*" + }, + "require-dev": { + "laminas/laminas-coding-standard": "~2.5.0", + "laminas/laminas-servicemanager": "^3.19", + "phpbench/phpbench": "^1.2", + "phpunit/phpunit": "^9.5.26", + "psalm/plugin-phpunit": "^0.18.0", + "vimeo/psalm": "^5.0" + }, + "suggest": { + "laminas/laminas-servicemanager": "To support Laminas\\Permissions\\Acl\\Assertion\\AssertionManager plugin manager usage" + }, + "type": "library", + "autoload": { + "psr-4": { + "Laminas\\Permissions\\Acl\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "Provides a lightweight and flexible access control list (ACL) implementation for privileges management", + "homepage": "https://laminas.dev", + "keywords": [ + "acl", + "laminas" + ], + "support": { + "chat": "https://laminas.dev/chat", + "docs": "https://docs.laminas.dev/laminas-permissions-acl/", + "forum": "https://discourse.laminas.dev", + "issues": "https://github.com/laminas/laminas-permissions-acl/issues", + "rss": "https://github.com/laminas/laminas-permissions-acl/releases.atom", + "source": "https://github.com/laminas/laminas-permissions-acl" + }, + "funding": [ + { + "url": "https://funding.communitybridge.org/projects/laminas-project", + "type": "community_bridge" + } + ], + "time": "2023-02-01T16:19:54+00:00" + }, + { + "name": "laminas/laminas-recaptcha", + "version": "3.6.0", + "source": { + "type": "git", + "url": "https://github.com/laminas/laminas-recaptcha.git", + "reference": "ead14136a0ded44d1a72f4885df0f3333065d919" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laminas/laminas-recaptcha/zipball/ead14136a0ded44d1a72f4885df0f3333065d919", + "reference": "ead14136a0ded44d1a72f4885df0f3333065d919", + "shasum": "" + }, + "require": { + "ext-json": "*", + "laminas/laminas-http": "^2.15", + "laminas/laminas-stdlib": "^3.10.1", + "php": "~8.0.0 || ~8.1.0 || ~8.2.0" + }, + "conflict": { + "zendframework/zendservice-recaptcha": "*" + }, + "require-dev": { + "laminas/laminas-coding-standard": "~2.4.0", + "laminas/laminas-config": "^3.7", + "laminas/laminas-validator": "^2.15", + "phpunit/phpunit": "^9.5.26", + "psalm/plugin-phpunit": "^0.18.0", + "vimeo/psalm": "^5.0.0" + }, + "suggest": { + "laminas/laminas-validator": "~2.0, if using ReCaptcha's Mailhide API" + }, + "type": "library", + "autoload": { + "psr-4": { + "Laminas\\ReCaptcha\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "OOP wrapper for the ReCaptcha web service", + "homepage": "https://laminas.dev", + "keywords": [ + "laminas", + "recaptcha" + ], + "support": { + "chat": "https://laminas.dev/chat", + "docs": "https://docs.laminas.dev/laminas-recaptcha/", + "forum": "https://discourse.laminas.dev", + "issues": "https://github.com/laminas/laminas-recaptcha/issues", + "rss": "https://github.com/laminas/laminas-recaptcha/releases.atom", + "source": "https://github.com/laminas/laminas-recaptcha" + }, + "funding": [ + { + "url": "https://funding.communitybridge.org/projects/laminas-project", + "type": "community_bridge" + } + ], + "time": "2022-12-05T21:28:54+00:00" + }, + { + "name": "laminas/laminas-servicemanager", + "version": "3.21.0", + "source": { + "type": "git", + "url": "https://github.com/laminas/laminas-servicemanager.git", + "reference": "625f2aa3bc6dd02688b2da5155b3a69870812bda" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laminas/laminas-servicemanager/zipball/625f2aa3bc6dd02688b2da5155b3a69870812bda", + "reference": "625f2aa3bc6dd02688b2da5155b3a69870812bda", + "shasum": "" + }, + "require": { + "laminas/laminas-stdlib": "^3.17", + "php": "~8.1.0 || ~8.2.0", + "psr/container": "^1.0" + }, + "conflict": { + "ext-psr": "*", + "laminas/laminas-code": "<4.10.0", + "zendframework/zend-code": "<3.3.1", + "zendframework/zend-servicemanager": "*" + }, + "provide": { + "psr/container-implementation": "^1.0" + }, + "replace": { + "container-interop/container-interop": "^1.2.0" + }, + "require-dev": { + "composer/package-versions-deprecated": "^1.11.99.5", + "friendsofphp/proxy-manager-lts": "^1.0.14", + "laminas/laminas-code": "^4.10.0", + "laminas/laminas-coding-standard": "~2.5.0", + "laminas/laminas-container-config-test": "^0.8", + "laminas/laminas-dependency-plugin": "^2.2", + "mikey179/vfsstream": "^1.6.11", + "phpbench/phpbench": "^1.2.9", + "phpunit/phpunit": "^10.0.17", + "psalm/plugin-phpunit": "^0.18.4", + "vimeo/psalm": "^5.8.0" + }, + "suggest": { + "friendsofphp/proxy-manager-lts": "ProxyManager ^2.1.1 to handle lazy initialization of services" + }, + "bin": [ + "bin/generate-deps-for-config-factory", + "bin/generate-factory-for-class" + ], + "type": "library", + "autoload": { + "files": [ + "src/autoload.php" + ], + "psr-4": { + "Laminas\\ServiceManager\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "Factory-Driven Dependency Injection Container", + "homepage": "https://laminas.dev", + "keywords": [ + "PSR-11", + "dependency-injection", + "di", + "dic", + "laminas", + "service-manager", + "servicemanager" + ], + "support": { + "chat": "https://laminas.dev/chat", + "docs": "https://docs.laminas.dev/laminas-servicemanager/", + "forum": "https://discourse.laminas.dev", + "issues": "https://github.com/laminas/laminas-servicemanager/issues", + "rss": "https://github.com/laminas/laminas-servicemanager/releases.atom", + "source": "https://github.com/laminas/laminas-servicemanager" + }, + "funding": [ + { + "url": "https://funding.communitybridge.org/projects/laminas-project", + "type": "community_bridge" + } + ], + "time": "2023-05-14T12:24:54+00:00" + }, + { + "name": "laminas/laminas-session", + "version": "2.16.0", + "source": { + "type": "git", + "url": "https://github.com/laminas/laminas-session.git", + "reference": "9c845a0361625d5775cad6f043716196201ad41f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laminas/laminas-session/zipball/9c845a0361625d5775cad6f043716196201ad41f", + "reference": "9c845a0361625d5775cad6f043716196201ad41f", + "shasum": "" + }, + "require": { + "laminas/laminas-eventmanager": "^3.5", + "laminas/laminas-servicemanager": "^3.15.1", + "laminas/laminas-stdlib": "^3.10.1", + "php": "~8.0.0 || ~8.1.0 || ~8.2.0" + }, + "conflict": { + "zendframework/zend-session": "*" + }, + "require-dev": { + "laminas/laminas-cache": "^3.8", + "laminas/laminas-cache-storage-adapter-memory": "^2.2", + "laminas/laminas-coding-standard": "~2.4.0", + "laminas/laminas-db": "^2.15", + "laminas/laminas-http": "^2.17.1", + "laminas/laminas-validator": "^2.28", + "mongodb/mongodb": "~1.13.0", + "phpunit/phpunit": "^9.5.26", + "psalm/plugin-phpunit": "^0.18.0", + "vimeo/psalm": "^5.0" + }, + "suggest": { + "laminas/laminas-cache": "Laminas\\Cache component", + "laminas/laminas-db": "Laminas\\Db component", + "laminas/laminas-http": "Laminas\\Http component", + "laminas/laminas-servicemanager": "Laminas\\ServiceManager component", + "laminas/laminas-validator": "Laminas\\Validator component", + "mongodb/mongodb": "If you want to use the MongoDB session save handler" + }, + "type": "library", + "extra": { + "laminas": { + "component": "Laminas\\Session", + "config-provider": "Laminas\\Session\\ConfigProvider" + } + }, + "autoload": { + "psr-4": { + "Laminas\\Session\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "Object-oriented interface to PHP sessions and storage", + "homepage": "https://laminas.dev", + "keywords": [ + "laminas", + "session" + ], + "support": { + "chat": "https://laminas.dev/chat", + "docs": "https://docs.laminas.dev/laminas-session/", + "forum": "https://discourse.laminas.dev", + "issues": "https://github.com/laminas/laminas-session/issues", + "rss": "https://github.com/laminas/laminas-session/releases.atom", + "source": "https://github.com/laminas/laminas-session" + }, + "funding": [ + { + "url": "https://funding.communitybridge.org/projects/laminas-project", + "type": "community_bridge" + } + ], + "time": "2022-12-04T11:15:36+00:00" + }, + { + "name": "laminas/laminas-stdlib", + "version": "3.17.0", + "source": { + "type": "git", + "url": "https://github.com/laminas/laminas-stdlib.git", + "reference": "dd35c868075bad80b6718959740913e178eb4274" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laminas/laminas-stdlib/zipball/dd35c868075bad80b6718959740913e178eb4274", + "reference": "dd35c868075bad80b6718959740913e178eb4274", + "shasum": "" + }, + "require": { + "php": "~8.1.0 || ~8.2.0" + }, + "conflict": { + "zendframework/zend-stdlib": "*" + }, + "require-dev": { + "laminas/laminas-coding-standard": "^2.5", + "phpbench/phpbench": "^1.2.9", + "phpunit/phpunit": "^10.0.16", + "psalm/plugin-phpunit": "^0.18.4", + "vimeo/psalm": "^5.8" + }, + "type": "library", + "autoload": { + "psr-4": { + "Laminas\\Stdlib\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "SPL extensions, array utilities, error handlers, and more", + "homepage": "https://laminas.dev", + "keywords": [ + "laminas", + "stdlib" + ], + "support": { + "chat": "https://laminas.dev/chat", + "docs": "https://docs.laminas.dev/laminas-stdlib/", + "forum": "https://discourse.laminas.dev", + "issues": "https://github.com/laminas/laminas-stdlib/issues", + "rss": "https://github.com/laminas/laminas-stdlib/releases.atom", + "source": "https://github.com/laminas/laminas-stdlib" + }, + "funding": [ + { + "url": "https://funding.communitybridge.org/projects/laminas-project", + "type": "community_bridge" + } + ], + "time": "2023-03-20T13:51:37+00:00" + }, + { + "name": "laminas/laminas-text", + "version": "2.10.0", + "source": { + "type": "git", + "url": "https://github.com/laminas/laminas-text.git", + "reference": "40f7acdb284d41553d32db811e704d6e15e415b4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laminas/laminas-text/zipball/40f7acdb284d41553d32db811e704d6e15e415b4", + "reference": "40f7acdb284d41553d32db811e704d6e15e415b4", + "shasum": "" + }, + "require": { + "laminas/laminas-servicemanager": "^3.19.0", + "laminas/laminas-stdlib": "^3.7.1", + "php": "~8.0.0 || ~8.1.0 || ~8.2.0" + }, + "conflict": { + "zendframework/zend-text": "*" + }, + "require-dev": { + "laminas/laminas-coding-standard": "~2.4.0", + "phpunit/phpunit": "^9.5", + "psalm/plugin-phpunit": "^0.18.4", + "vimeo/psalm": "^5.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "Laminas\\Text\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "Create FIGlets and text-based tables", + "homepage": "https://laminas.dev", + "keywords": [ + "laminas", + "text" + ], + "support": { + "chat": "https://laminas.dev/chat", + "docs": "https://docs.laminas.dev/laminas-text/", + "forum": "https://discourse.laminas.dev", + "issues": "https://github.com/laminas/laminas-text/issues", + "rss": "https://github.com/laminas/laminas-text/releases.atom", + "source": "https://github.com/laminas/laminas-text" + }, + "funding": [ + { + "url": "https://funding.communitybridge.org/projects/laminas-project", + "type": "community_bridge" + } + ], + "time": "2022-12-11T15:36:27+00:00" + }, + { + "name": "laminas/laminas-uri", + "version": "2.10.0", + "source": { + "type": "git", + "url": "https://github.com/laminas/laminas-uri.git", + "reference": "663b050294945c7345cc3a61f3ca661d5f9e1f80" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laminas/laminas-uri/zipball/663b050294945c7345cc3a61f3ca661d5f9e1f80", + "reference": "663b050294945c7345cc3a61f3ca661d5f9e1f80", + "shasum": "" + }, + "require": { + "laminas/laminas-escaper": "^2.9", + "laminas/laminas-validator": "^2.15", + "php": "~8.0.0 || ~8.1.0 || ~8.2.0" + }, + "conflict": { + "zendframework/zend-uri": "*" + }, + "require-dev": { + "laminas/laminas-coding-standard": "~2.4.0", + "phpunit/phpunit": "^9.5.25" + }, + "type": "library", + "autoload": { + "psr-4": { + "Laminas\\Uri\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "A component that aids in manipulating and validating » Uniform Resource Identifiers (URIs)", + "homepage": "https://laminas.dev", + "keywords": [ + "laminas", + "uri" + ], + "support": { + "chat": "https://laminas.dev/chat", + "docs": "https://docs.laminas.dev/laminas-uri/", + "forum": "https://discourse.laminas.dev", + "issues": "https://github.com/laminas/laminas-uri/issues", + "rss": "https://github.com/laminas/laminas-uri/releases.atom", + "source": "https://github.com/laminas/laminas-uri" + }, + "funding": [ + { + "url": "https://funding.communitybridge.org/projects/laminas-project", + "type": "community_bridge" + } + ], + "time": "2022-10-16T15:02:45+00:00" + }, + { + "name": "laminas/laminas-validator", + "version": "2.31.0", + "source": { + "type": "git", + "url": "https://github.com/laminas/laminas-validator.git", + "reference": "7dc274aa5afd5e23be0dbea13363e3d66ba5808b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laminas/laminas-validator/zipball/7dc274aa5afd5e23be0dbea13363e3d66ba5808b", + "reference": "7dc274aa5afd5e23be0dbea13363e3d66ba5808b", + "shasum": "" + }, + "require": { + "laminas/laminas-servicemanager": "^3.21.0", + "laminas/laminas-stdlib": "^3.13", + "php": "~8.1.0 || ~8.2.0", + "psr/http-message": "^1.0.1 || ^2.0.0" + }, + "conflict": { + "zendframework/zend-validator": "*" + }, + "require-dev": { + "laminas/laminas-coding-standard": "^2.5", + "laminas/laminas-db": "^2.18", + "laminas/laminas-filter": "^2.32", + "laminas/laminas-http": "^2.18", + "laminas/laminas-i18n": "^2.23", + "laminas/laminas-session": "^2.16", + "laminas/laminas-uri": "^2.10.0", + "phpunit/phpunit": "^10.1.3", + "psalm/plugin-phpunit": "^0.18.4", + "psr/http-client": "^1.0.2", + "psr/http-factory": "^1.0.2", + "vimeo/psalm": "^5.11" + }, + "suggest": { + "laminas/laminas-db": "Laminas\\Db component, required by the (No)RecordExists validator", + "laminas/laminas-filter": "Laminas\\Filter component, required by the Digits validator", + "laminas/laminas-i18n": "Laminas\\I18n component to allow translation of validation error messages", + "laminas/laminas-i18n-resources": "Translations of validator messages", + "laminas/laminas-servicemanager": "Laminas\\ServiceManager component to allow using the ValidatorPluginManager and validator chains", + "laminas/laminas-session": "Laminas\\Session component, ^2.8; required by the Csrf validator", + "laminas/laminas-uri": "Laminas\\Uri component, required by the Uri and Sitemap\\Loc validators", + "psr/http-message": "psr/http-message, required when validating PSR-7 UploadedFileInterface instances via the Upload and UploadFile validators" + }, + "type": "library", + "extra": { + "laminas": { + "component": "Laminas\\Validator", + "config-provider": "Laminas\\Validator\\ConfigProvider" + } + }, + "autoload": { + "psr-4": { + "Laminas\\Validator\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "Validation classes for a wide range of domains, and the ability to chain validators to create complex validation criteria", + "homepage": "https://laminas.dev", + "keywords": [ + "laminas", + "validator" + ], + "support": { + "chat": "https://laminas.dev/chat", + "docs": "https://docs.laminas.dev/laminas-validator/", + "forum": "https://discourse.laminas.dev", + "issues": "https://github.com/laminas/laminas-validator/issues", + "rss": "https://github.com/laminas/laminas-validator/releases.atom", + "source": "https://github.com/laminas/laminas-validator" + }, + "funding": [ + { + "url": "https://funding.communitybridge.org/projects/laminas-project", + "type": "community_bridge" + } + ], + "time": "2023-05-19T09:42:26+00:00" + }, + { + "name": "magento/composer-dependency-version-audit-plugin", + "version": "0.1.5", + "dist": { + "type": "zip", + "url": "https://repo.magento.com/archives/magento/composer-dependency-version-audit-plugin/magento-composer-dependency-version-audit-plugin-0.1.5.0.zip", + "shasum": "5bbab92d2727217628a6806ad59d6c7fe1ec0651" + }, + "require": { + "composer-plugin-api": "^1.0 || ^2.0", + "composer/composer": "^1.9 || ^2.0" + }, + "require-dev": { + "phpunit/phpunit": "^9" + }, + "type": "composer-plugin", + "extra": { + "class": "Magento\\ComposerDependencyVersionAuditPlugin\\Plugin" + }, + "autoload": { + "psr-4": { + "Magento\\ComposerDependencyVersionAuditPlugin\\": "src/" + } + }, + "license": [ + "OSL-3.0" + ], + "description": "Validating packages through a composer plugin" + }, + { + "name": "magento/framework", + "version": "103.0.6", + "dist": { + "type": "zip", + "url": "https://repo.magento.com/archives/magento/framework/magento-framework-103.0.6.0.zip", + "shasum": "598095f567a6cb974d1c46a3ef5e5c8ab7ae46a1" + }, + "require": { + "colinmollenhour/php-redis-session-abstract": "^1.5", + "composer/composer": "^2.0, !=2.2.16", + "ext-bcmath": "*", + "ext-curl": "*", + "ext-dom": "*", + "ext-gd": "*", + "ext-hash": "*", + "ext-iconv": "*", + "ext-intl": "*", + "ext-openssl": "*", + "ext-simplexml": "*", + "ext-sodium": "*", + "ext-xsl": "*", + "ezyang/htmlpurifier": "^4.16", + "guzzlehttp/guzzle": "^7.5", + "laminas/laminas-code": "^4.5", + "laminas/laminas-escaper": "^2.10", + "laminas/laminas-file": "^2.11", + "laminas/laminas-filter": "^2.17", + "laminas/laminas-http": "^2.15", + "laminas/laminas-i18n": "^2.17", + "laminas/laminas-mail": "^2.16", + "laminas/laminas-mime": "^2.9", + "laminas/laminas-oauth": "^2.4", + "laminas/laminas-permissions-acl": "^2.10", + "laminas/laminas-stdlib": "^3.11", + "laminas/laminas-uri": "^2.9", + "laminas/laminas-validator": "^2.23", + "lib-libxml": "*", + "magento/composer-dependency-version-audit-plugin": "^0.1", + "magento/zend-cache": "^1.16", + "magento/zend-db": "^1.16", + "magento/zend-pdf": "^1.16", + "monolog/monolog": "^2.7", + "php": "~8.1.0||~8.2.0", + "ramsey/uuid": "^4.2", + "symfony/console": "^5.4", + "symfony/intl": "^5.4", + "symfony/process": "^5.4", + "tedivm/jshrink": "^1.4", + "webonyx/graphql-php": "^15.0", + "wikimedia/less.php": "^3.2" + }, + "suggest": { + "ext-imagick": "Use Image Magick >=3.0.0 as an optional alternative image processing library" + }, + "type": "magento2-library", + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\Framework\\": "" + } + }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "description": "N/A" + }, + { + "name": "magento/framework-bulk", + "version": "101.0.2", + "dist": { + "type": "zip", + "url": "https://repo.magento.com/archives/magento/framework-bulk/magento-framework-bulk-101.0.2.0.zip", + "shasum": "2bb9c0551674fd1c0303077710a87f972f3d4f13" + }, + "require": { + "magento/framework": "103.0.*", + "php": "~8.1.0||~8.2.0" + }, + "type": "magento2-library", + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\Framework\\Bulk\\": "" + } + }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "description": "N/A" + }, + { + "name": "magento/framework-message-queue", + "version": "100.4.6", + "dist": { + "type": "zip", + "url": "https://repo.magento.com/archives/magento/framework-message-queue/magento-framework-message-queue-100.4.6.0.zip", + "shasum": "c21ecfe0ac369cedc61aa6abd9bb36c8ddb000ce" + }, + "require": { + "magento/framework": "103.0.*", + "php": "~8.1.0||~8.2.0" + }, + "type": "magento2-library", + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\Framework\\MessageQueue\\": "" + } + }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "description": "N/A" + }, + { + "name": "magento/module-asynchronous-operations", + "version": "100.4.6", + "dist": { + "type": "zip", + "url": "https://repo.magento.com/archives/magento/module-asynchronous-operations/magento-module-asynchronous-operations-100.4.6.0.zip", + "shasum": "8a345135c231a15a0c82f24dedc431eb2c1d283b" + }, + "require": { + "magento/framework": "103.0.*", + "magento/framework-bulk": "101.0.*", + "magento/framework-message-queue": "100.4.*", + "magento/module-authorization": "100.4.*", + "magento/module-backend": "102.0.*", + "magento/module-ui": "101.2.*", + "php": "~8.1.0||~8.2.0" + }, + "suggest": { + "magento/module-admin-notification": "100.4.*", + "magento/module-logging": "*" + }, + "type": "magento2-module", + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\AsynchronousOperations\\": "" + } + }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "description": "N/A" + }, + { + "name": "magento/module-authorization", + "version": "100.4.6", + "dist": { + "type": "zip", + "url": "https://repo.magento.com/archives/magento/module-authorization/magento-module-authorization-100.4.6.0.zip", + "shasum": "bc0c8b14e4c67464d491c5591377c5dabbbecb19" + }, + "require": { + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "php": "~8.1.0||~8.2.0" + }, + "type": "magento2-module", + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\Authorization\\": "" + } + }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "description": "Authorization module provides access to Magento ACL functionality." + }, + { + "name": "magento/module-backend", + "version": "102.0.6", + "dist": { + "type": "zip", + "url": "https://repo.magento.com/archives/magento/module-backend/magento-module-backend-102.0.6.0.zip", + "shasum": "981680a87f6dbf94ab8c8428eae7f78185563075" + }, + "require": { + "magento/framework": "103.0.*", + "magento/module-backup": "100.4.*", + "magento/module-catalog": "104.0.*", + "magento/module-cms": "104.0.*", + "magento/module-config": "101.2.*", + "magento/module-customer": "103.0.*", + "magento/module-developer": "100.4.*", + "magento/module-directory": "100.4.*", + "magento/module-eav": "102.1.*", + "magento/module-quote": "101.2.*", + "magento/module-reports": "100.4.*", + "magento/module-require-js": "100.4.*", + "magento/module-sales": "103.0.*", + "magento/module-security": "100.4.*", + "magento/module-store": "101.1.*", + "magento/module-translation": "100.4.*", + "magento/module-ui": "101.2.*", + "magento/module-user": "101.2.*", + "php": "~8.1.0||~8.2.0" + }, + "suggest": { + "magento/module-theme": "101.1.*" + }, + "type": "magento2-module", + "autoload": { + "files": [ + "registration.php", + "cli_commands.php" + ], + "psr-4": { + "Magento\\Backend\\": "" + } + }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "description": "N/A" + }, + { + "name": "magento/module-backup", + "version": "100.4.6", + "dist": { + "type": "zip", + "url": "https://repo.magento.com/archives/magento/module-backup/magento-module-backup-100.4.6.0.zip", + "shasum": "a2aef0d79aff16176add10d9d3713c47421b453c" + }, + "require": { + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-cron": "100.4.*", + "magento/module-store": "101.1.*", + "php": "~8.1.0||~8.2.0" + }, + "type": "magento2-module", + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\Backup\\": "" + } + }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "description": "N/A" + }, + { + "name": "magento/module-bundle", + "version": "101.0.6", + "dist": { + "type": "zip", + "url": "https://repo.magento.com/archives/magento/module-bundle/magento-module-bundle-101.0.6.0.zip", + "shasum": "40b01b9ccb1933584f9a1ab03da2356abfd93106" + }, + "require": { + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-catalog-inventory": "100.4.*", + "magento/module-catalog-rule": "101.2.*", + "magento/module-checkout": "100.4.*", + "magento/module-config": "101.2.*", + "magento/module-customer": "103.0.*", + "magento/module-directory": "100.4.*", + "magento/module-eav": "102.1.*", + "magento/module-gift-message": "100.4.*", + "magento/module-media-storage": "100.4.*", + "magento/module-quote": "101.2.*", + "magento/module-sales": "103.0.*", + "magento/module-store": "101.1.*", + "magento/module-tax": "100.4.*", + "magento/module-ui": "101.2.*", + "php": "~8.1.0||~8.2.0" + }, + "suggest": { + "magento/module-bundle-sample-data": "Sample Data version: 100.4.*", + "magento/module-sales-rule": "101.2.*", + "magento/module-webapi": "100.4.*" + }, + "type": "magento2-module", + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\Bundle\\": "" + } + }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "description": "N/A" + }, + { + "name": "magento/module-captcha", + "version": "100.4.6", + "dist": { + "type": "zip", + "url": "https://repo.magento.com/archives/magento/module-captcha/magento-module-captcha-100.4.6.0.zip", + "shasum": "13af06077798ad8ee679cc579548201e69ad403c" + }, + "require": { + "laminas/laminas-captcha": "^2.12", + "laminas/laminas-db": "^2.13.4", + "magento/framework": "103.0.*", + "magento/module-authorization": "100.4.*", + "magento/module-backend": "102.0.*", + "magento/module-checkout": "100.4.*", + "magento/module-customer": "103.0.*", + "magento/module-sales": "103.0.*", + "magento/module-store": "101.1.*", + "php": "~8.1.0||~8.2.0" + }, + "type": "magento2-module", + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\Captcha\\": "" + } + }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "description": "N/A" + }, + { + "name": "magento/module-catalog", + "version": "104.0.6", + "dist": { + "type": "zip", + "url": "https://repo.magento.com/archives/magento/module-catalog/magento-module-catalog-104.0.6.0.zip", + "shasum": "680dad8f65627d3f6efeebe100393a1b629af7fd" + }, + "require": { + "magento/framework": "103.0.*", + "magento/module-asynchronous-operations": "100.4.*", + "magento/module-authorization": "100.4.*", + "magento/module-backend": "102.0.*", + "magento/module-catalog-inventory": "100.4.*", + "magento/module-catalog-rule": "101.2.*", + "magento/module-catalog-url-rewrite": "100.4.*", + "magento/module-checkout": "100.4.*", + "magento/module-cms": "104.0.*", + "magento/module-config": "101.2.*", + "magento/module-customer": "103.0.*", + "magento/module-directory": "100.4.*", + "magento/module-eav": "102.1.*", + "magento/module-indexer": "100.4.*", + "magento/module-media-storage": "100.4.*", + "magento/module-msrp": "100.4.*", + "magento/module-page-cache": "100.4.*", + "magento/module-product-alert": "100.4.*", + "magento/module-quote": "101.2.*", + "magento/module-store": "101.1.*", + "magento/module-tax": "100.4.*", + "magento/module-theme": "101.1.*", + "magento/module-ui": "101.2.*", + "magento/module-url-rewrite": "102.0.*", + "magento/module-widget": "101.2.*", + "magento/module-wishlist": "101.2.*", + "php": "~8.1.0||~8.2.0" + }, + "suggest": { + "magento/module-catalog-sample-data": "Sample Data version: 100.4.*", + "magento/module-cookie": "100.4.*", + "magento/module-sales": "103.0.*" + }, + "type": "magento2-module", + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\Catalog\\": "" + } + }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "description": "N/A" + }, + { + "name": "magento/module-catalog-import-export", + "version": "101.1.6", + "dist": { + "type": "zip", + "url": "https://repo.magento.com/archives/magento/module-catalog-import-export/magento-module-catalog-import-export-101.1.6.0.zip", + "shasum": "759454e86fb3b47cbe88ff627d64b3a00faf5502" + }, + "require": { + "ext-ctype": "*", + "magento/framework": "103.0.*", + "magento/module-authorization": "100.4.*", + "magento/module-catalog": "104.0.*", + "magento/module-catalog-inventory": "100.4.*", + "magento/module-catalog-url-rewrite": "100.4.*", + "magento/module-customer": "103.0.*", + "magento/module-eav": "102.1.*", + "magento/module-import-export": "101.0.*", + "magento/module-media-storage": "100.4.*", + "magento/module-store": "101.1.*", + "magento/module-tax": "100.4.*", + "php": "~8.1.0||~8.2.0" + }, + "type": "magento2-module", + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\CatalogImportExport\\": "" + } + }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "description": "N/A" + }, + { + "name": "magento/module-catalog-inventory", + "version": "100.4.6", + "dist": { + "type": "zip", + "url": "https://repo.magento.com/archives/magento/module-catalog-inventory/magento-module-catalog-inventory-100.4.6.0.zip", + "shasum": "50ba89bd2ee24a5481a38beaa317971440bb3527" + }, + "require": { + "magento/framework": "103.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-config": "101.2.*", + "magento/module-customer": "103.0.*", + "magento/module-eav": "102.1.*", + "magento/module-quote": "101.2.*", + "magento/module-store": "101.1.*", + "magento/module-ui": "101.2.*", + "php": "~8.1.0||~8.2.0" + }, + "type": "magento2-module", + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\CatalogInventory\\": "" + } + }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "description": "N/A" + }, + { + "name": "magento/module-catalog-rule", + "version": "101.2.6", + "dist": { + "type": "zip", + "url": "https://repo.magento.com/archives/magento/module-catalog-rule/magento-module-catalog-rule-101.2.6.0.zip", + "shasum": "e619391f89f9c296e35775b6dbd11c6e3d0c44f0" + }, + "require": { + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-customer": "103.0.*", + "magento/module-eav": "102.1.*", + "magento/module-rule": "100.4.*", + "magento/module-store": "101.1.*", + "magento/module-ui": "101.2.*", + "php": "~8.1.0||~8.2.0" + }, + "suggest": { + "magento/module-catalog-rule-sample-data": "Sample Data version: 100.4.*", + "magento/module-import-export": "101.0.*" + }, + "type": "magento2-module", + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\CatalogRule\\": "" + } + }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "description": "N/A" + }, + { + "name": "magento/module-catalog-url-rewrite", + "version": "100.4.6", + "dist": { + "type": "zip", + "url": "https://repo.magento.com/archives/magento/module-catalog-url-rewrite/magento-module-catalog-url-rewrite-100.4.6.0.zip", + "shasum": "37b8c6a498ef5a1493e88d98cb5cc295ab5c5f22" + }, + "require": { + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-catalog-import-export": "101.1.*", + "magento/module-eav": "102.1.*", + "magento/module-import-export": "101.0.*", + "magento/module-store": "101.1.*", + "magento/module-ui": "101.2.*", + "magento/module-url-rewrite": "102.0.*", + "php": "~8.1.0||~8.2.0" + }, + "suggest": { + "magento/module-webapi": "100.4.*" + }, + "type": "magento2-module", + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\CatalogUrlRewrite\\": "" + } + }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "description": "N/A" + }, + { + "name": "magento/module-checkout", + "version": "100.4.6", + "dist": { + "type": "zip", + "url": "https://repo.magento.com/archives/magento/module-checkout/magento-module-checkout-100.4.6.0.zip", + "shasum": "6b8de0f1a392ad35fe74c2d8991f26f21b7b38a9" + }, + "require": { + "magento/framework": "103.0.*", + "magento/module-authorization": "100.4.*", + "magento/module-captcha": "100.4.*", + "magento/module-catalog": "104.0.*", + "magento/module-catalog-inventory": "100.4.*", + "magento/module-config": "101.2.*", + "magento/module-customer": "103.0.*", + "magento/module-directory": "100.4.*", + "magento/module-eav": "102.1.*", + "magento/module-msrp": "100.4.*", + "magento/module-page-cache": "100.4.*", + "magento/module-payment": "100.4.*", + "magento/module-quote": "101.2.*", + "magento/module-sales": "103.0.*", + "magento/module-sales-rule": "101.2.*", + "magento/module-security": "100.4.*", + "magento/module-shipping": "100.4.*", + "magento/module-store": "101.1.*", + "magento/module-tax": "100.4.*", + "magento/module-theme": "101.1.*", + "magento/module-ui": "101.2.*", + "php": "~8.1.0||~8.2.0" + }, + "suggest": { + "magento/module-cookie": "100.4.*" + }, + "type": "magento2-module", + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\Checkout\\": "" + } + }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "description": "N/A" + }, + { + "name": "magento/module-cms", + "version": "104.0.6", + "dist": { + "type": "zip", + "url": "https://repo.magento.com/archives/magento/module-cms/magento-module-cms-104.0.6.0.zip", + "shasum": "6a67a41b5589ee5140f345ca0c2db137eefd8379" + }, + "require": { + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-email": "101.1.*", + "magento/module-media-storage": "100.4.*", + "magento/module-store": "101.1.*", + "magento/module-theme": "101.1.*", + "magento/module-ui": "101.2.*", + "magento/module-variable": "100.4.*", + "magento/module-widget": "101.2.*", + "php": "~8.1.0||~8.2.0" + }, + "suggest": { + "magento/module-cms-sample-data": "Sample Data version: 100.4.*" + }, + "type": "magento2-module", + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\Cms\\": "" + } + }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "description": "N/A" + }, + { + "name": "magento/module-cms-url-rewrite", + "version": "100.4.5", + "dist": { + "type": "zip", + "url": "https://repo.magento.com/archives/magento/module-cms-url-rewrite/magento-module-cms-url-rewrite-100.4.5.0.zip", + "shasum": "08958e1a35a0dd053943669da20b1c3a91d4b896" + }, + "require": { + "magento/framework": "103.0.*", + "magento/module-cms": "104.0.*", + "magento/module-store": "101.1.*", + "magento/module-url-rewrite": "102.0.*", + "php": "~8.1.0||~8.2.0" + }, + "type": "magento2-module", + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\CmsUrlRewrite\\": "" + } + }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "description": "N/A" + }, + { + "name": "magento/module-config", + "version": "101.2.6", + "dist": { + "type": "zip", + "url": "https://repo.magento.com/archives/magento/module-config/magento-module-config-101.2.6.0.zip", + "shasum": "5e9911a5ffb3523258fb369ca260e9507849ade9" + }, + "require": { + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-cron": "100.4.*", + "magento/module-deploy": "100.4.*", + "magento/module-directory": "100.4.*", + "magento/module-email": "101.1.*", + "magento/module-media-storage": "100.4.*", + "magento/module-store": "101.1.*", + "php": "~8.1.0||~8.2.0" + }, + "type": "magento2-module", + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\Config\\": "" + } + }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "description": "N/A" + }, + { + "name": "magento/module-contact", + "version": "100.4.5", + "dist": { + "type": "zip", + "url": "https://repo.magento.com/archives/magento/module-contact/magento-module-contact-100.4.5.0.zip", + "shasum": "f1826bfffeb3cc6901af30927824843dead28cc6" + }, + "require": { + "magento/framework": "103.0.*", + "magento/module-cms": "104.0.*", + "magento/module-config": "101.2.*", + "magento/module-customer": "103.0.*", + "magento/module-store": "101.1.*", + "php": "~8.1.0||~8.2.0" + }, + "type": "magento2-module", + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\Contact\\": "" + } + }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "description": "N/A" + }, + { + "name": "magento/module-cron", + "version": "100.4.6", + "dist": { + "type": "zip", + "url": "https://repo.magento.com/archives/magento/module-cron/magento-module-cron-100.4.6.0.zip", + "shasum": "03e886ea8de44eaaae1021c5f0d9781b7490cd93" + }, + "require": { + "magento/framework": "103.0.*", + "magento/module-store": "101.1.*", + "php": "~8.1.0||~8.2.0" + }, + "suggest": { + "magento/module-config": "101.2.*" + }, + "type": "magento2-module", + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\Cron\\": "" + } + }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "description": "N/A" + }, + { + "name": "magento/module-customer", + "version": "103.0.6", + "dist": { + "type": "zip", + "url": "https://repo.magento.com/archives/magento/module-customer/magento-module-customer-103.0.6.0.zip", + "shasum": "c1fac91883b9f88a0fdc949e735bef63fe083478" + }, + "require": { + "magento/framework": "103.0.*", + "magento/module-authorization": "100.4.*", + "magento/module-backend": "102.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-checkout": "100.4.*", + "magento/module-config": "101.2.*", + "magento/module-directory": "100.4.*", + "magento/module-eav": "102.1.*", + "magento/module-integration": "100.4.*", + "magento/module-media-storage": "100.4.*", + "magento/module-newsletter": "100.4.*", + "magento/module-page-cache": "100.4.*", + "magento/module-quote": "101.2.*", + "magento/module-sales": "103.0.*", + "magento/module-store": "101.1.*", + "magento/module-tax": "100.4.*", + "magento/module-theme": "101.1.*", + "magento/module-ui": "101.2.*", + "magento/module-wishlist": "101.2.*", + "php": "~8.1.0||~8.2.0" + }, + "suggest": { + "magento/module-cookie": "100.4.*", + "magento/module-customer-sample-data": "Sample Data version: 100.4.*", + "magento/module-webapi": "100.4.*" + }, + "type": "magento2-module", + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\Customer\\": "" + } + }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "description": "N/A" + }, + { + "name": "magento/module-deploy", + "version": "100.4.6", + "dist": { + "type": "zip", + "url": "https://repo.magento.com/archives/magento/module-deploy/magento-module-deploy-100.4.6.0.zip", + "shasum": "9f8fdb18f528dfa63d3b824af23553467c39cb06" + }, + "require": { + "magento/framework": "103.0.*", + "magento/module-config": "101.2.*", + "magento/module-require-js": "100.4.*", + "magento/module-store": "101.1.*", + "magento/module-user": "101.2.*", + "php": "~8.1.0||~8.2.0" + }, + "type": "magento2-module", + "autoload": { + "files": [ + "cli_commands.php", + "registration.php" + ], + "psr-4": { + "Magento\\Deploy\\": "" + } + }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "description": "N/A" + }, + { + "name": "magento/module-developer", + "version": "100.4.6", + "dist": { + "type": "zip", + "url": "https://repo.magento.com/archives/magento/module-developer/magento-module-developer-100.4.6.0.zip", + "shasum": "654a870880e4700339847649db862e811942a00f" + }, + "require": { + "magento/framework": "103.0.*", + "magento/module-config": "101.2.*", + "magento/module-store": "101.1.*", + "php": "~8.1.0||~8.2.0" + }, + "type": "magento2-module", + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\Developer\\": "" + } + }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "description": "N/A" + }, + { + "name": "magento/module-directory", + "version": "100.4.6", + "dist": { + "type": "zip", + "url": "https://repo.magento.com/archives/magento/module-directory/magento-module-directory-100.4.6.0.zip", + "shasum": "0046708e894b6d8fc9a13a0494e05844cf38ff31" + }, + "require": { + "lib-libxml": "*", + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-config": "101.2.*", + "magento/module-store": "101.1.*", + "php": "~8.1.0||~8.2.0" + }, + "type": "magento2-module", + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\Directory\\": "" + } + }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "description": "N/A" + }, + { + "name": "magento/module-downloadable", + "version": "100.4.6", + "dist": { + "type": "zip", + "url": "https://repo.magento.com/archives/magento/module-downloadable/magento-module-downloadable-100.4.6.0.zip", + "shasum": "141266b6b85fc64eef5375d5722d44218aae49d4" + }, + "require": { + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-catalog-inventory": "100.4.*", + "magento/module-checkout": "100.4.*", + "magento/module-config": "101.2.*", + "magento/module-customer": "103.0.*", + "magento/module-directory": "100.4.*", + "magento/module-eav": "102.1.*", + "magento/module-gift-message": "100.4.*", + "magento/module-media-storage": "100.4.*", + "magento/module-quote": "101.2.*", + "magento/module-sales": "103.0.*", + "magento/module-store": "101.1.*", + "magento/module-tax": "100.4.*", + "magento/module-theme": "101.1.*", + "magento/module-ui": "101.2.*", + "php": "~8.1.0||~8.2.0" + }, + "suggest": { + "magento/module-downloadable-sample-data": "Sample Data version: 100.4.*" + }, + "type": "magento2-module", + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\Downloadable\\": "" + } + }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "description": "N/A" + }, + { + "name": "magento/module-eav", + "version": "102.1.6", + "dist": { + "type": "zip", + "url": "https://repo.magento.com/archives/magento/module-eav/magento-module-eav-102.1.6.0.zip", + "shasum": "12b53ec5b46c57fa0188d19df7d7965c18af3845" + }, + "require": { + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-config": "101.2.*", + "magento/module-media-storage": "100.4.*", + "magento/module-store": "101.1.*", + "php": "~8.1.0||~8.2.0" + }, + "type": "magento2-module", + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\Eav\\": "" + } + }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "description": "N/A" + }, + { + "name": "magento/module-email", + "version": "101.1.6", + "dist": { + "type": "zip", + "url": "https://repo.magento.com/archives/magento/module-email/magento-module-email-101.1.6.0.zip", + "shasum": "b3dbf67a10677326ed836b11904ead5ead1ba890" + }, + "require": { + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-cms": "104.0.*", + "magento/module-config": "101.2.*", + "magento/module-media-storage": "100.4.*", + "magento/module-require-js": "100.4.*", + "magento/module-store": "101.1.*", + "magento/module-theme": "101.1.*", + "magento/module-ui": "101.2.*", + "magento/module-variable": "100.4.*", + "php": "~8.1.0||~8.2.0" + }, + "suggest": { + "magento/module-theme": "101.1.*" + }, + "type": "magento2-module", + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\Email\\": "" + } + }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "description": "N/A" + }, + { + "name": "magento/module-gift-message", + "version": "100.4.5", + "dist": { + "type": "zip", + "url": "https://repo.magento.com/archives/magento/module-gift-message/magento-module-gift-message-100.4.5.0.zip", + "shasum": "0fdd983d9426c8a307217632888aaa3cf27c0813" + }, + "require": { + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-checkout": "100.4.*", + "magento/module-customer": "103.0.*", + "magento/module-quote": "101.2.*", + "magento/module-sales": "103.0.*", + "magento/module-store": "101.1.*", + "magento/module-ui": "101.2.*", + "php": "~8.1.0||~8.2.0" + }, + "suggest": { + "magento/module-eav": "102.1.*", + "magento/module-multishipping": "100.4.*" + }, + "type": "magento2-module", + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\GiftMessage\\": "" + } + }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "description": "N/A" + }, + { + "name": "magento/module-import-export", + "version": "101.0.6", + "dist": { + "type": "zip", + "url": "https://repo.magento.com/archives/magento/module-import-export/magento-module-import-export-101.0.6.0.zip", + "shasum": "327ac5dac6b4f238d6c43682e0fccca67777129b" + }, + "require": { + "ext-ctype": "*", + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-eav": "102.1.*", + "magento/module-media-storage": "100.4.*", + "magento/module-store": "101.1.*", + "magento/module-ui": "101.2.*", + "php": "~8.1.0||~8.2.0" + }, + "type": "magento2-module", + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\ImportExport\\": "" + } + }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "description": "N/A" + }, + { + "name": "magento/module-indexer", + "version": "100.4.6", + "dist": { + "type": "zip", + "url": "https://repo.magento.com/archives/magento/module-indexer/magento-module-indexer-100.4.6.0.zip", + "shasum": "de59fc4caf71aacc7dfd895a2cdacb094beddbd3" + }, + "require": { + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "php": "~8.1.0||~8.2.0" + }, + "type": "magento2-module", + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\Indexer\\": "" + } + }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "description": "N/A" + }, + { + "name": "magento/module-integration", + "version": "100.4.6", + "dist": { + "type": "zip", + "url": "https://repo.magento.com/archives/magento/module-integration/magento-module-integration-100.4.6.0.zip", + "shasum": "4fd650526f5a38c495760e1360cc78d6ed2b61a6" + }, + "require": { + "magento/framework": "103.0.*", + "magento/module-authorization": "100.4.*", + "magento/module-backend": "102.0.*", + "magento/module-customer": "103.0.*", + "magento/module-security": "100.4.*", + "magento/module-store": "101.1.*", + "magento/module-ui": "101.2.*", + "magento/module-user": "101.2.*", + "php": "~8.1.0||~8.2.0" + }, + "type": "magento2-module", + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\Integration\\": "" + } + }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "description": "N/A" + }, + { + "name": "magento/module-media-storage", + "version": "100.4.5", + "dist": { + "type": "zip", + "url": "https://repo.magento.com/archives/magento/module-media-storage/magento-module-media-storage-100.4.5.0.zip", + "shasum": "eff7965c56ed3331d883fd689181b0d9c4468ad5" + }, + "require": { + "magento/framework": "103.0.*", + "magento/framework-bulk": "101.0.*", + "magento/module-asynchronous-operations": "100.4.*", + "magento/module-authorization": "100.4.*", + "magento/module-backend": "102.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-config": "101.2.*", + "magento/module-store": "101.1.*", + "magento/module-theme": "101.1.*", + "php": "~8.1.0||~8.2.0" + }, + "type": "magento2-module", + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\MediaStorage\\": "" + } + }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "description": "N/A" + }, + { + "name": "magento/module-msrp", + "version": "100.4.5", + "dist": { + "type": "zip", + "url": "https://repo.magento.com/archives/magento/module-msrp/magento-module-msrp-100.4.5.0.zip", + "shasum": "20190271a54ea1a584e1a59ee5c744e981b3cef1" + }, + "require": { + "magento/framework": "103.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-downloadable": "100.4.*", + "magento/module-eav": "102.1.*", + "magento/module-store": "101.1.*", + "magento/module-tax": "100.4.*", + "php": "~8.1.0||~8.2.0" + }, + "suggest": { + "magento/module-bundle": "101.0.*", + "magento/module-msrp-sample-data": "Sample Data version: 100.4.*" + }, + "type": "magento2-module", + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\Msrp\\": "" + } + }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "description": "N/A" + }, + { + "name": "magento/module-newsletter", + "version": "100.4.6", + "dist": { + "type": "zip", + "url": "https://repo.magento.com/archives/magento/module-newsletter/magento-module-newsletter-100.4.6.0.zip", + "shasum": "23efdc3842544d681613816f42faad5a2fc6b240" + }, + "require": { + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-cms": "104.0.*", + "magento/module-customer": "103.0.*", + "magento/module-eav": "102.1.*", + "magento/module-email": "101.1.*", + "magento/module-require-js": "100.4.*", + "magento/module-store": "101.1.*", + "magento/module-ui": "101.2.*", + "magento/module-widget": "101.2.*", + "php": "~8.1.0||~8.2.0" + }, + "type": "magento2-module", + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\Newsletter\\": "" + } + }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "description": "N/A" + }, + { + "name": "magento/module-page-cache", + "version": "100.4.6", + "dist": { + "type": "zip", + "url": "https://repo.magento.com/archives/magento/module-page-cache/magento-module-page-cache-100.4.6.0.zip", + "shasum": "60a88d7805b2b9596bae3fc22e6dd1f04e37537c" + }, + "require": { + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-config": "101.2.*", + "magento/module-store": "101.1.*", + "php": "~8.1.0||~8.2.0" + }, + "type": "magento2-module", + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\PageCache\\": "" + } + }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "description": "N/A" + }, + { + "name": "magento/module-payment", + "version": "100.4.6", + "dist": { + "type": "zip", + "url": "https://repo.magento.com/archives/magento/module-payment/magento-module-payment-100.4.6.0.zip", + "shasum": "22762fe72aafffb6ceff5a346cc6643b2f8d87ab" + }, + "require": { + "magento/framework": "103.0.*", + "magento/module-checkout": "100.4.*", + "magento/module-config": "101.2.*", + "magento/module-directory": "100.4.*", + "magento/module-quote": "101.2.*", + "magento/module-sales": "103.0.*", + "magento/module-store": "101.1.*", + "magento/module-ui": "101.2.*", + "magento/module-vault": "101.2.*", + "php": "~8.1.0||~8.2.0" + }, + "type": "magento2-module", + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\Payment\\": "" + } + }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "description": "N/A" + }, + { + "name": "magento/module-product-alert", + "version": "100.4.5", + "dist": { + "type": "zip", + "url": "https://repo.magento.com/archives/magento/module-product-alert/magento-module-product-alert-100.4.5.0.zip", + "shasum": "4dd8e33723cf0d397eb1382e92e3a0af43bb9f09" + }, + "require": { + "magento/framework": "103.0.*", + "magento/framework-bulk": "101.0.*", + "magento/module-asynchronous-operations": "100.4.*", + "magento/module-authorization": "100.4.*", + "magento/module-backend": "102.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-customer": "103.0.*", + "magento/module-store": "101.1.*", + "magento/module-theme": "101.1.*", + "php": "~8.1.0||~8.2.0" + }, + "suggest": { + "magento/module-config": "101.2.*" + }, + "type": "magento2-module", + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\ProductAlert\\": "" + } + }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "description": "N/A" + }, + { + "name": "magento/module-quote", + "version": "101.2.6", + "dist": { + "type": "zip", + "url": "https://repo.magento.com/archives/magento/module-quote/magento-module-quote-101.2.6.0.zip", + "shasum": "cd225ff41050c7b052ab3d583c916b05ae35a72f" + }, + "require": { + "magento/framework": "103.0.*", + "magento/module-authorization": "100.4.*", + "magento/module-backend": "102.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-catalog-inventory": "100.4.*", + "magento/module-checkout": "100.4.*", + "magento/module-customer": "103.0.*", + "magento/module-directory": "100.4.*", + "magento/module-eav": "102.1.*", + "magento/module-payment": "100.4.*", + "magento/module-sales": "103.0.*", + "magento/module-sales-sequence": "100.4.*", + "magento/module-shipping": "100.4.*", + "magento/module-store": "101.1.*", + "magento/module-tax": "100.4.*", + "php": "~8.1.0||~8.2.0" + }, + "suggest": { + "magento/module-webapi": "100.4.*" + }, + "type": "magento2-module", + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\Quote\\": "" + } + }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "description": "N/A" + }, + { + "name": "magento/module-reports", + "version": "100.4.6", + "dist": { + "type": "zip", + "url": "https://repo.magento.com/archives/magento/module-reports/magento-module-reports-100.4.6.0.zip", + "shasum": "c8a6d5f366aa12fccf0adccb6a756758dfef06b6" + }, + "require": { + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-catalog-inventory": "100.4.*", + "magento/module-cms": "104.0.*", + "magento/module-config": "101.2.*", + "magento/module-customer": "103.0.*", + "magento/module-directory": "100.4.*", + "magento/module-downloadable": "100.4.*", + "magento/module-eav": "102.1.*", + "magento/module-quote": "101.2.*", + "magento/module-review": "100.4.*", + "magento/module-sales": "103.0.*", + "magento/module-sales-rule": "101.2.*", + "magento/module-store": "101.1.*", + "magento/module-tax": "100.4.*", + "magento/module-widget": "101.2.*", + "magento/module-wishlist": "101.2.*", + "php": "~8.1.0||~8.2.0" + }, + "type": "magento2-module", + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\Reports\\": "" + } + }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "description": "N/A" + }, + { + "name": "magento/module-require-js", + "version": "100.4.2", + "dist": { + "type": "zip", + "url": "https://repo.magento.com/archives/magento/module-require-js/magento-module-require-js-100.4.2.0.zip", + "shasum": "642f592fb47428acb6bfb07b9e0ace551aa9df5f" + }, + "require": { + "magento/framework": "103.0.*", + "php": "~8.1.0||~8.2.0" + }, + "type": "magento2-module", + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\RequireJs\\": "" + } + }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "description": "N/A" + }, + { + "name": "magento/module-review", + "version": "100.4.6", + "dist": { + "type": "zip", + "url": "https://repo.magento.com/archives/magento/module-review/magento-module-review-100.4.6.0.zip", + "shasum": "ef05b54dbb31be615e7dc029f14bcad1e41aab0a" + }, + "require": { + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-customer": "103.0.*", + "magento/module-eav": "102.1.*", + "magento/module-newsletter": "100.4.*", + "magento/module-store": "101.1.*", + "magento/module-theme": "101.1.*", + "magento/module-ui": "101.2.*", + "php": "~8.1.0||~8.2.0" + }, + "suggest": { + "magento/module-cookie": "100.4.*", + "magento/module-review-sample-data": "Sample Data version: 100.4.*" + }, + "type": "magento2-module", + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\Review\\": "" + } + }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "description": "N/A" + }, + { + "name": "magento/module-rss", + "version": "100.4.4", + "dist": { + "type": "zip", + "url": "https://repo.magento.com/archives/magento/module-rss/magento-module-rss-100.4.4.0.zip", + "shasum": "a8e6833313aa10bf92f3f567a29ca1b9e9c85422" + }, + "require": { + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-customer": "103.0.*", + "magento/module-store": "101.1.*", + "php": "~8.1.0||~8.2.0" + }, + "type": "magento2-module", + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\Rss\\": "" + } + }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "description": "N/A" + }, + { + "name": "magento/module-rule", + "version": "100.4.5", + "dist": { + "type": "zip", + "url": "https://repo.magento.com/archives/magento/module-rule/magento-module-rule-100.4.5.0.zip", + "shasum": "caefdf53ae3ba5dcb2bb09013f9028f55b591d7e" + }, + "require": { + "lib-libxml": "*", + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-eav": "102.1.*", + "magento/module-store": "101.1.*", + "php": "~8.1.0||~8.2.0" + }, + "type": "magento2-module", + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\Rule\\": "" + } + }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "description": "N/A" + }, + { + "name": "magento/module-sales", + "version": "103.0.6", + "dist": { + "type": "zip", + "url": "https://repo.magento.com/archives/magento/module-sales/magento-module-sales-103.0.6.0.zip", + "shasum": "25edc463493e854aaeff458d03944d4abde694b3" + }, + "require": { + "magento/framework": "103.0.*", + "magento/module-authorization": "100.4.*", + "magento/module-backend": "102.0.*", + "magento/module-bundle": "101.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-catalog-inventory": "100.4.*", + "magento/module-checkout": "100.4.*", + "magento/module-config": "101.2.*", + "magento/module-customer": "103.0.*", + "magento/module-directory": "100.4.*", + "magento/module-eav": "102.1.*", + "magento/module-gift-message": "100.4.*", + "magento/module-media-storage": "100.4.*", + "magento/module-payment": "100.4.*", + "magento/module-quote": "101.2.*", + "magento/module-reports": "100.4.*", + "magento/module-sales-rule": "101.2.*", + "magento/module-sales-sequence": "100.4.*", + "magento/module-shipping": "100.4.*", + "magento/module-store": "101.1.*", + "magento/module-tax": "100.4.*", + "magento/module-theme": "101.1.*", + "magento/module-ui": "101.2.*", + "magento/module-widget": "101.2.*", + "magento/module-wishlist": "101.2.*", + "php": "~8.1.0||~8.2.0" + }, + "suggest": { + "magento/module-sales-sample-data": "Sample Data version: 100.4.*" + }, + "type": "magento2-module", + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\Sales\\": "" + } + }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "description": "N/A" + }, + { + "name": "magento/module-sales-rule", + "version": "101.2.6", + "dist": { + "type": "zip", + "url": "https://repo.magento.com/archives/magento/module-sales-rule/magento-module-sales-rule-101.2.6.0.zip", + "shasum": "4b503924ac3bc5142c27e75c22ea331dd5926866" + }, + "require": { + "magento/framework": "103.0.*", + "magento/framework-bulk": "101.0.*", + "magento/module-asynchronous-operations": "100.4.*", + "magento/module-authorization": "100.4.*", + "magento/module-backend": "102.0.*", + "magento/module-captcha": "100.4.*", + "magento/module-catalog": "104.0.*", + "magento/module-catalog-rule": "101.2.*", + "magento/module-checkout": "100.4.*", + "magento/module-config": "101.2.*", + "magento/module-customer": "103.0.*", + "magento/module-directory": "100.4.*", + "magento/module-eav": "102.1.*", + "magento/module-payment": "100.4.*", + "magento/module-quote": "101.2.*", + "magento/module-reports": "100.4.*", + "magento/module-rule": "100.4.*", + "magento/module-sales": "103.0.*", + "magento/module-shipping": "100.4.*", + "magento/module-store": "101.1.*", + "magento/module-ui": "101.2.*", + "magento/module-widget": "101.2.*", + "php": "~8.1.0||~8.2.0" + }, + "suggest": { + "magento/module-sales-rule-sample-data": "Sample Data version: 100.4.*" + }, + "type": "magento2-module", + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\SalesRule\\": "" + } + }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "description": "N/A" + }, + { + "name": "magento/module-sales-sequence", + "version": "100.4.3", + "dist": { + "type": "zip", + "url": "https://repo.magento.com/archives/magento/module-sales-sequence/magento-module-sales-sequence-100.4.3.0.zip", + "shasum": "c2c30c0993e022159dd5b944a198a7ff899e2066" + }, + "require": { + "magento/framework": "103.0.*", + "php": "~8.1.0||~8.2.0" + }, + "type": "magento2-module", + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\SalesSequence\\": "" + } + }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "description": "N/A" + }, + { + "name": "magento/module-security", + "version": "100.4.6", + "dist": { + "type": "zip", + "url": "https://repo.magento.com/archives/magento/module-security/magento-module-security-100.4.6.0.zip", + "shasum": "307393f4a3bf057e4e1e1297265259b26f05cdb7" + }, + "require": { + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-config": "101.2.*", + "magento/module-store": "101.1.*", + "magento/module-user": "101.2.*", + "php": "~8.1.0||~8.2.0" + }, + "suggest": { + "magento/module-customer": "103.0.*" + }, + "type": "magento2-module", + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\Security\\": "" + } + }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "description": "Security management module" + }, + { + "name": "magento/module-shipping", + "version": "100.4.6", + "dist": { + "type": "zip", + "url": "https://repo.magento.com/archives/magento/module-shipping/magento-module-shipping-100.4.6.0.zip", + "shasum": "2142e5f799f4fcf3f1f5e4498d13454c60b18edd" + }, + "require": { + "ext-gd": "*", + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-catalog-inventory": "100.4.*", + "magento/module-contact": "100.4.*", + "magento/module-customer": "103.0.*", + "magento/module-directory": "100.4.*", + "magento/module-payment": "100.4.*", + "magento/module-quote": "101.2.*", + "magento/module-sales": "103.0.*", + "magento/module-store": "101.1.*", + "magento/module-tax": "100.4.*", + "magento/module-ui": "101.2.*", + "magento/module-user": "101.2.*", + "php": "~8.1.0||~8.2.0" + }, + "suggest": { + "magento/module-config": "101.2.*", + "magento/module-fedex": "100.4.*", + "magento/module-ups": "100.4.*" + }, + "type": "magento2-module", + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\Shipping\\": "" + } + }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "description": "N/A" + }, + { + "name": "magento/module-store", + "version": "101.1.6", + "dist": { + "type": "zip", + "url": "https://repo.magento.com/archives/magento/module-store/magento-module-store-101.1.6.0.zip", + "shasum": "85800089d778fb2ff2a836ce09b83065b726e938" + }, + "require": { + "magento/framework": "103.0.*", + "magento/module-authorization": "100.4.*", + "magento/module-backend": "102.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-config": "101.2.*", + "magento/module-customer": "103.0.*", + "magento/module-directory": "100.4.*", + "magento/module-media-storage": "100.4.*", + "magento/module-ui": "101.2.*", + "php": "~8.1.0||~8.2.0" + }, + "suggest": { + "magento/module-deploy": "100.4.*" + }, + "type": "magento2-module", + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\Store\\": "" + } + }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "description": "N/A" + }, + { + "name": "magento/module-tax", + "version": "100.4.6", + "dist": { + "type": "zip", + "url": "https://repo.magento.com/archives/magento/module-tax/magento-module-tax-100.4.6.0.zip", + "shasum": "6c4bd17f7cdb40dcf228a6099af41b8c896025f4" + }, + "require": { + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-checkout": "100.4.*", + "magento/module-config": "101.2.*", + "magento/module-customer": "103.0.*", + "magento/module-directory": "100.4.*", + "magento/module-eav": "102.1.*", + "magento/module-page-cache": "100.4.*", + "magento/module-quote": "101.2.*", + "magento/module-reports": "100.4.*", + "magento/module-sales": "103.0.*", + "magento/module-shipping": "100.4.*", + "magento/module-store": "101.1.*", + "magento/module-ui": "101.2.*", + "php": "~8.1.0||~8.2.0" + }, + "suggest": { + "magento/module-tax-sample-data": "Sample Data version: 100.4.*" + }, + "type": "magento2-module", + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\Tax\\": "" + } + }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "description": "N/A" + }, + { + "name": "magento/module-theme", + "version": "101.1.6", + "dist": { + "type": "zip", + "url": "https://repo.magento.com/archives/magento/module-theme/magento-module-theme-101.1.6.0.zip", + "shasum": "d76e2417215de1613206a3a2d45d0659056b85f1" + }, + "require": { + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-cms": "104.0.*", + "magento/module-config": "101.2.*", + "magento/module-customer": "103.0.*", + "magento/module-eav": "102.1.*", + "magento/module-media-storage": "100.4.*", + "magento/module-require-js": "100.4.*", + "magento/module-store": "101.1.*", + "magento/module-ui": "101.2.*", + "magento/module-widget": "101.2.*", + "php": "~8.1.0||~8.2.0" + }, + "suggest": { + "magento/module-deploy": "100.4.*", + "magento/module-directory": "100.4.*", + "magento/module-theme-sample-data": "Sample Data version: 100.4.*" + }, + "type": "magento2-module", + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\Theme\\": "" + } + }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "description": "N/A" + }, + { + "name": "magento/module-translation", + "version": "100.4.6", + "dist": { + "type": "zip", + "url": "https://repo.magento.com/archives/magento/module-translation/magento-module-translation-100.4.6.0.zip", + "shasum": "a5292c7319e662393bf7f71a4e6139ed3a491c04" + }, + "require": { + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-deploy": "100.4.*", + "magento/module-developer": "100.4.*", + "magento/module-store": "101.1.*", + "magento/module-theme": "101.1.*", + "php": "~8.1.0||~8.2.0" + }, + "suggest": { + "magento/module-deploy": "100.4.*" + }, + "type": "magento2-module", + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\Translation\\": "" + } + }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "description": "N/A" + }, + { + "name": "magento/module-ui", + "version": "101.2.6", + "dist": { + "type": "zip", + "url": "https://repo.magento.com/archives/magento/module-ui/magento-module-ui-101.2.6.0.zip", + "shasum": "6a7e50cd6c6dd49622665bc9a764af20691c1dc3" + }, + "require": { + "magento/framework": "103.0.*", + "magento/module-authorization": "100.4.*", + "magento/module-backend": "102.0.*", + "magento/module-eav": "102.1.*", + "magento/module-store": "101.1.*", + "magento/module-user": "101.2.*", + "php": "~8.1.0||~8.2.0" + }, + "suggest": { + "magento/module-config": "101.2.*" + }, + "type": "magento2-module", + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\Ui\\": "" + } + }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "description": "N/A" + }, + { + "name": "magento/module-url-rewrite", + "version": "102.0.5", + "dist": { + "type": "zip", + "url": "https://repo.magento.com/archives/magento/module-url-rewrite/magento-module-url-rewrite-102.0.5.0.zip", + "shasum": "685aa0381083bc752d373d1bc5d4f340a62f035d" + }, + "require": { + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-catalog-url-rewrite": "100.4.*", + "magento/module-cms": "104.0.*", + "magento/module-cms-url-rewrite": "100.4.*", + "magento/module-store": "101.1.*", + "magento/module-ui": "101.2.*", + "php": "~8.1.0||~8.2.0" + }, + "type": "magento2-module", + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\UrlRewrite\\": "" + } + }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "description": "N/A" + }, + { + "name": "magento/module-user", + "version": "101.2.6", + "dist": { + "type": "zip", + "url": "https://repo.magento.com/archives/magento/module-user/magento-module-user-101.2.6.0.zip", + "shasum": "7fedf788997f6b217d71c0680b4868dc7a7b8681" + }, + "require": { + "magento/framework": "103.0.*", + "magento/module-authorization": "100.4.*", + "magento/module-backend": "102.0.*", + "magento/module-email": "101.1.*", + "magento/module-integration": "100.4.*", + "magento/module-security": "100.4.*", + "magento/module-store": "101.1.*", + "magento/module-ui": "101.2.*", + "php": "~8.1.0||~8.2.0" + }, + "type": "magento2-module", + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\User\\": "" + } + }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "description": "N/A" + }, + { + "name": "magento/module-variable", + "version": "100.4.4", + "dist": { + "type": "zip", + "url": "https://repo.magento.com/archives/magento/module-variable/magento-module-variable-100.4.4.0.zip", + "shasum": "8dd7d5655d7d464cddee47a26e108cfc688c897d" + }, + "require": { + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-config": "101.2.*", + "magento/module-store": "101.1.*", + "magento/module-ui": "101.2.*", + "php": "~8.1.0||~8.2.0" + }, + "type": "magento2-module", + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\Variable\\": "" + } + }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "description": "N/A" + }, + { + "name": "magento/module-vault", + "version": "101.2.6", + "dist": { + "type": "zip", + "url": "https://repo.magento.com/archives/magento/module-vault/magento-module-vault-101.2.6.0.zip", + "shasum": "074654cedee1b08293bc9ffff4b9236491341a3f" + }, + "require": { + "magento/framework": "103.0.*", + "magento/module-checkout": "100.4.*", + "magento/module-customer": "103.0.*", + "magento/module-payment": "100.4.*", + "magento/module-quote": "101.2.*", + "magento/module-sales": "103.0.*", + "magento/module-store": "101.1.*", + "magento/module-theme": "101.1.*", + "php": "~8.1.0||~8.2.0" + }, + "type": "magento2-module", + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\Vault\\": "" + } + }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ] + }, + { + "name": "magento/module-widget", + "version": "101.2.6", + "dist": { + "type": "zip", + "url": "https://repo.magento.com/archives/magento/module-widget/magento-module-widget-101.2.6.0.zip", + "shasum": "f51e6671685c912e3721a6d1605457c679b9e749" + }, + "require": { + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-catalog": "104.0.*", + "magento/module-cms": "104.0.*", + "magento/module-email": "101.1.*", + "magento/module-store": "101.1.*", + "magento/module-theme": "101.1.*", + "magento/module-ui": "101.2.*", + "magento/module-variable": "100.4.*", + "php": "~8.1.0||~8.2.0" + }, + "suggest": { + "magento/module-widget-sample-data": "Sample Data version: 100.4.*" + }, + "type": "magento2-module", + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\Widget\\": "" + } + }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "description": "N/A" + }, + { + "name": "magento/module-wishlist", + "version": "101.2.6", + "dist": { + "type": "zip", + "url": "https://repo.magento.com/archives/magento/module-wishlist/magento-module-wishlist-101.2.6.0.zip", + "shasum": "6748d88279b43cd8af73b14d30a0b46ceb79dfb1" + }, + "require": { + "magento/framework": "103.0.*", + "magento/module-backend": "102.0.*", + "magento/module-captcha": "100.4.*", + "magento/module-catalog": "104.0.*", + "magento/module-catalog-inventory": "100.4.*", + "magento/module-checkout": "100.4.*", + "magento/module-customer": "103.0.*", + "magento/module-rss": "100.4.*", + "magento/module-sales": "103.0.*", + "magento/module-store": "101.1.*", + "magento/module-theme": "101.1.*", + "magento/module-ui": "101.2.*", + "php": "~8.1.0||~8.2.0" + }, + "suggest": { + "magento/module-bundle": "101.0.*", + "magento/module-configurable-product": "100.4.*", + "magento/module-cookie": "100.4.*", + "magento/module-downloadable": "100.4.*", + "magento/module-grouped-product": "100.4.*", + "magento/module-wishlist-sample-data": "Sample Data version: 100.4.*" + }, + "type": "magento2-module", + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\Wishlist\\": "" + } + }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "description": "N/A" + }, + { + "name": "magento/zend-cache", + "version": "1.16.0", + "source": { + "type": "git", + "url": "https://github.com/magento/magento-zend-cache.git", + "reference": "75e6a43f198b17ea4b0c3f46b700b7a757eba84d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/magento/magento-zend-cache/zipball/75e6a43f198b17ea4b0c3f46b700b7a757eba84d", + "reference": "75e6a43f198b17ea4b0c3f46b700b7a757eba84d", + "shasum": "" + }, + "require": { + "magento/zend-exception": "^1.16", + "magento/zend-log": "^1.16", + "php": ">=7.0.0" + }, + "replace": { + "zf1/zend-cache": "^1.12", + "zfs1/zend-cache": "^1.12" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.16.x-dev" + } + }, + "autoload": { + "psr-0": { + "Zend_Cache": "library/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "Zend Framework 1 Cache package", + "homepage": "http://framework.zend.com/", + "keywords": [ + "ZF1", + "cache", + "framework", + "zend" + ], + "support": { + "issues": "https://github.com/magento/magento-zend-cache/issues", + "source": "https://github.com/magento/magento-zend-cache/tree/1.16.0" + }, + "time": "2022-09-22T19:09:32+00:00" + }, + { + "name": "magento/zend-db", + "version": "1.16.0", + "source": { + "type": "git", + "url": "https://github.com/magento/magento-zend-db.git", + "reference": "def36bc00e49cf0056a59192e52f2e83077b933c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/magento/magento-zend-db/zipball/def36bc00e49cf0056a59192e52f2e83077b933c", + "reference": "def36bc00e49cf0056a59192e52f2e83077b933c", + "shasum": "" + }, + "require": { + "magento/zend-exception": "^1.16", + "magento/zend-loader": "^1.16", + "php": ">=7.0.0" + }, + "replace": { + "zf1/zend-db": "^1.12", + "zfs1/zend-db": "^1.12" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.16.x-dev" + } + }, + "autoload": { + "psr-0": { + "Zend_Db": "library/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "Zend Framework 1 Db package", + "homepage": "http://framework.zend.com/", + "keywords": [ + "ZF1", + "db", + "framework", + "zend" + ], + "support": { + "issues": "https://github.com/magento/magento-zend-db/issues", + "source": "https://github.com/magento/magento-zend-db/tree/1.16.0" + }, + "time": "2022-09-22T18:19:14+00:00" + }, + { + "name": "magento/zend-exception", + "version": "1.16.0", + "source": { + "type": "git", + "url": "https://github.com/magento/magento-zend-exception.git", + "reference": "5219ba961e36dc1a713da3ad4f1594a87c71f758" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/magento/magento-zend-exception/zipball/5219ba961e36dc1a713da3ad4f1594a87c71f758", + "reference": "5219ba961e36dc1a713da3ad4f1594a87c71f758", + "shasum": "" + }, + "require": { + "php": ">=7.0.0" + }, + "replace": { + "zf1/zend-exception": "^1.12", + "zfs1/zend-exception": "^1.12" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.16.x-dev" + } + }, + "autoload": { + "psr-0": { + "Zend_Exception": "library/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "Zend Framework 1 Exception package", + "homepage": "http://framework.zend.com/", + "keywords": [ + "ZF1", + "exception", + "framework", + "zend" + ], + "support": { + "issues": "https://github.com/magento/magento-zend-exception/issues", + "source": "https://github.com/magento/magento-zend-exception/tree/1.16.0" + }, + "time": "2022-09-22T19:06:06+00:00" + }, + { + "name": "magento/zend-loader", + "version": "1.16.0", + "source": { + "type": "git", + "url": "https://github.com/magento/magento-zend-loader.git", + "reference": "200786c8009d668917a42250ed72ebf8c4c958d2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/magento/magento-zend-loader/zipball/200786c8009d668917a42250ed72ebf8c4c958d2", + "reference": "200786c8009d668917a42250ed72ebf8c4c958d2", + "shasum": "" + }, + "require": { + "magento/zend-exception": "^1.16.0", + "php": ">=7.0.0" + }, + "replace": { + "zf1/zend-loader": "^1.12", + "zf1s/zend-loader": "^1.12" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.16.x-dev" + } + }, + "autoload": { + "psr-0": { + "Zend_Loader": "library/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "Zend Framework 1 Loader package", + "homepage": "http://framework.zend.com/", + "keywords": [ + "ZF1", + "framework", + "loader", + "zend" + ], + "support": { + "issues": "https://github.com/magento/magento-zend-loader/issues", + "source": "https://github.com/magento/magento-zend-loader/tree/1.16.0" + }, + "time": "2022-09-22T19:00:04+00:00" + }, + { + "name": "magento/zend-log", + "version": "1.16.0", + "source": { + "type": "git", + "url": "https://github.com/magento/magento-zend-log.git", + "reference": "c03b9febe92c501288cf441d41b49cd01f1e8a50" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/magento/magento-zend-log/zipball/c03b9febe92c501288cf441d41b49cd01f1e8a50", + "reference": "c03b9febe92c501288cf441d41b49cd01f1e8a50", + "shasum": "" + }, + "require": { + "magento/zend-exception": "^1.16", + "php": ">=7.0.0" + }, + "replace": { + "zf1/zend-log": "^1.12", + "zfs1/zend-log": "^1.12" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.16.x-dev" + } + }, + "autoload": { + "psr-0": { + "Zend_Log": "library/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "Zend Framework 1 Log package", + "homepage": "http://framework.zend.com/", + "keywords": [ + "ZF1", + "framework", + "log", + "zend" + ], + "support": { + "issues": "https://github.com/magento/magento-zend-log/issues", + "source": "https://github.com/magento/magento-zend-log/tree/1.16.0" + }, + "time": "2022-09-22T19:03:03+00:00" + }, + { + "name": "magento/zend-memory", + "version": "1.16.0", + "source": { + "type": "git", + "url": "https://github.com/magento/magento-zend-memory.git", + "reference": "0d48804c6718cc9f15e5c356e6192fd6fff8932b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/magento/magento-zend-memory/zipball/0d48804c6718cc9f15e5c356e6192fd6fff8932b", + "reference": "0d48804c6718cc9f15e5c356e6192fd6fff8932b", + "shasum": "" + }, + "require": { + "magento/zend-cache": "^1.16", + "magento/zend-exception": "^1.16", + "php": ">=7.0.0" + }, + "replace": { + "zf1/zend-memory": "^1.12", + "zfs1/zend-memory": "^1.12" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.16.x-dev" + } + }, + "autoload": { + "psr-0": { + "Zend_Memory": "library/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "Zend Framework 1 Memory package", + "homepage": "http://framework.zend.com/", + "keywords": [ + "ZF1", + "framework", + "memory", + "zend" + ], + "support": { + "issues": "https://github.com/magento/magento-zend-memory/issues", + "source": "https://github.com/magento/magento-zend-memory/tree/1.16.0" + }, + "time": "2022-09-22T18:17:46+00:00" + }, + { + "name": "magento/zend-pdf", + "version": "1.16.2", + "source": { + "type": "git", + "url": "https://github.com/magento/magento-zend-pdf.git", + "reference": "120ad9e854231431e3a5837f00158a91885b3fbe" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/magento/magento-zend-pdf/zipball/120ad9e854231431e3a5837f00158a91885b3fbe", + "reference": "120ad9e854231431e3a5837f00158a91885b3fbe", + "shasum": "" + }, + "require": { + "ext-ctype": "*", + "ext-gd": "*", + "ext-iconv": "*", + "ext-zlib": "*", + "magento/zend-exception": "^1.16", + "magento/zend-log": "^1.16", + "magento/zend-memory": "^1.16", + "php": ">=7.0.0" + }, + "replace": { + "zf1/zend-pdf": "^1.12", + "zfs1/zend-pdf": "^1.12" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.16.x-dev" + } + }, + "autoload": { + "psr-0": { + "Zend_Pdf": "library/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "Zend Framework 1 Pdf package", + "homepage": "http://framework.zend.com/", + "keywords": [ + "ZF1", + "framework", + "pdf", + "zend" + ], + "support": { + "issues": "https://github.com/magento/magento-zend-pdf/issues", + "source": "https://github.com/magento/magento-zend-pdf/tree/1.16.2" + }, + "time": "2023-02-08T18:07:39+00:00" + }, + { + "name": "magento/zendframework1", + "version": "1.15.1", + "source": { + "type": "git", + "url": "https://github.com/magento/zf1.git", + "reference": "2381396d2a9a528be2f367b5ce2dddf650eac1d0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/magento/zf1/zipball/2381396d2a9a528be2f367b5ce2dddf650eac1d0", + "reference": "2381396d2a9a528be2f367b5ce2dddf650eac1d0", + "shasum": "" + }, + "require": { + "php": ">=7.0.0" + }, + "require-dev": { + "phpunit/dbunit": "1.3.*", + "phpunit/phpunit": "3.7.*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.12.x-dev" + } + }, + "autoload": { + "psr-0": { + "Zend_": "library/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "include-path": [ + "library/" + ], + "license": [ + "BSD-3-Clause" + ], + "description": "Magento Zend Framework 1", + "homepage": "http://framework.zend.com/", + "keywords": [ + "ZF1", + "framework" + ], + "support": { + "issues": "https://github.com/magento/zf1/issues", + "source": "https://github.com/magento/zf1/tree/1.15.1" + }, + "time": "2022-06-21T01:22:39+00:00" + }, + { + "name": "monolog/monolog", + "version": "2.9.1", + "source": { + "type": "git", + "url": "https://github.com/Seldaek/monolog.git", + "reference": "f259e2b15fb95494c83f52d3caad003bbf5ffaa1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/f259e2b15fb95494c83f52d3caad003bbf5ffaa1", + "reference": "f259e2b15fb95494c83f52d3caad003bbf5ffaa1", + "shasum": "" + }, + "require": { + "php": ">=7.2", + "psr/log": "^1.0.1 || ^2.0 || ^3.0" + }, + "provide": { + "psr/log-implementation": "1.0.0 || 2.0.0 || 3.0.0" + }, + "require-dev": { + "aws/aws-sdk-php": "^2.4.9 || ^3.0", + "doctrine/couchdb": "~1.0@dev", + "elasticsearch/elasticsearch": "^7 || ^8", + "ext-json": "*", + "graylog2/gelf-php": "^1.4.2 || ^2@dev", + "guzzlehttp/guzzle": "^7.4", + "guzzlehttp/psr7": "^2.2", + "mongodb/mongodb": "^1.8", + "php-amqplib/php-amqplib": "~2.4 || ^3", + "phpspec/prophecy": "^1.15", + "phpstan/phpstan": "^0.12.91", + "phpunit/phpunit": "^8.5.14", + "predis/predis": "^1.1 || ^2.0", + "rollbar/rollbar": "^1.3 || ^2 || ^3", + "ruflin/elastica": "^7", + "swiftmailer/swiftmailer": "^5.3|^6.0", + "symfony/mailer": "^5.4 || ^6", + "symfony/mime": "^5.4 || ^6" + }, + "suggest": { + "aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB", + "doctrine/couchdb": "Allow sending log messages to a CouchDB server", + "elasticsearch/elasticsearch": "Allow sending log messages to an Elasticsearch server via official client", + "ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)", + "ext-curl": "Required to send log messages using the IFTTTHandler, the LogglyHandler, the SendGridHandler, the SlackWebhookHandler or the TelegramBotHandler", + "ext-mbstring": "Allow to work properly with unicode symbols", + "ext-mongodb": "Allow sending log messages to a MongoDB server (via driver)", + "ext-openssl": "Required to send log messages using SSL", + "ext-sockets": "Allow sending log messages to a Syslog server (via UDP driver)", + "graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server", + "mongodb/mongodb": "Allow sending log messages to a MongoDB server (via library)", + "php-amqplib/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib", + "rollbar/rollbar": "Allow sending log messages to Rollbar", + "ruflin/elastica": "Allow sending log messages to an Elastic Search server" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "2.x-dev" + } + }, + "autoload": { + "psr-4": { + "Monolog\\": "src/Monolog" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "https://seld.be" + } + ], + "description": "Sends your logs to files, sockets, inboxes, databases and various web services", + "homepage": "https://github.com/Seldaek/monolog", + "keywords": [ + "log", + "logging", + "psr-3" + ], + "support": { + "issues": "https://github.com/Seldaek/monolog/issues", + "source": "https://github.com/Seldaek/monolog/tree/2.9.1" + }, + "funding": [ + { + "url": "https://github.com/Seldaek", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/monolog/monolog", + "type": "tidelift" + } + ], + "time": "2023-02-06T13:44:46+00:00" + }, + { + "name": "psr/container", + "version": "1.1.2", + "source": { + "type": "git", + "url": "https://github.com/php-fig/container.git", + "reference": "513e0666f7216c7459170d56df27dfcefe1689ea" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/container/zipball/513e0666f7216c7459170d56df27dfcefe1689ea", + "reference": "513e0666f7216c7459170d56df27dfcefe1689ea", + "shasum": "" + }, + "require": { + "php": ">=7.4.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Psr\\Container\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common Container Interface (PHP FIG PSR-11)", + "homepage": "https://github.com/php-fig/container", + "keywords": [ + "PSR-11", + "container", + "container-interface", + "container-interop", + "psr" + ], + "support": { + "issues": "https://github.com/php-fig/container/issues", + "source": "https://github.com/php-fig/container/tree/1.1.2" + }, + "time": "2021-11-05T16:50:12+00:00" + }, + { + "name": "psr/http-client", + "version": "1.0.2", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-client.git", + "reference": "0955afe48220520692d2d09f7ab7e0f93ffd6a31" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-client/zipball/0955afe48220520692d2d09f7ab7e0f93ffd6a31", + "reference": "0955afe48220520692d2d09f7ab7e0f93ffd6a31", + "shasum": "" + }, + "require": { + "php": "^7.0 || ^8.0", + "psr/http-message": "^1.0 || ^2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Client\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP clients", + "homepage": "https://github.com/php-fig/http-client", + "keywords": [ + "http", + "http-client", + "psr", + "psr-18" + ], + "support": { + "source": "https://github.com/php-fig/http-client/tree/1.0.2" + }, + "time": "2023-04-10T20:12:12+00:00" + }, + { + "name": "psr/http-factory", + "version": "1.0.2", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-factory.git", + "reference": "e616d01114759c4c489f93b099585439f795fe35" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-factory/zipball/e616d01114759c4c489f93b099585439f795fe35", + "reference": "e616d01114759c4c489f93b099585439f795fe35", + "shasum": "" + }, + "require": { + "php": ">=7.0.0", + "psr/http-message": "^1.0 || ^2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interfaces for PSR-7 HTTP message factories", + "keywords": [ + "factory", + "http", + "message", + "psr", + "psr-17", + "psr-7", + "request", + "response" + ], + "support": { + "source": "https://github.com/php-fig/http-factory/tree/1.0.2" + }, + "time": "2023-04-10T20:10:41+00:00" + }, + { + "name": "psr/http-message", + "version": "2.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-message.git", + "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/402d35bcb92c70c026d1a6a9883f06b2ead23d71", + "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP messages", + "homepage": "https://github.com/php-fig/http-message", + "keywords": [ + "http", + "http-message", + "psr", + "psr-7", + "request", + "response" + ], + "support": { + "source": "https://github.com/php-fig/http-message/tree/2.0" + }, + "time": "2023-04-04T09:54:51+00:00" + }, + { + "name": "psr/log", + "version": "2.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/log.git", + "reference": "ef29f6d262798707a9edd554e2b82517ef3a9376" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/log/zipball/ef29f6d262798707a9edd554e2b82517ef3a9376", + "reference": "ef29f6d262798707a9edd554e2b82517ef3a9376", + "shasum": "" + }, + "require": { + "php": ">=8.0.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Log\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for logging libraries", + "homepage": "https://github.com/php-fig/log", + "keywords": [ + "log", + "psr", + "psr-3" + ], + "support": { + "source": "https://github.com/php-fig/log/tree/2.0.0" + }, + "time": "2021-07-14T16:41:46+00:00" + }, + { + "name": "ralouphie/getallheaders", + "version": "3.0.3", + "source": { + "type": "git", + "url": "https://github.com/ralouphie/getallheaders.git", + "reference": "120b605dfeb996808c31b6477290a714d356e822" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822", + "reference": "120b605dfeb996808c31b6477290a714d356e822", + "shasum": "" + }, + "require": { + "php": ">=5.6" + }, + "require-dev": { + "php-coveralls/php-coveralls": "^2.1", + "phpunit/phpunit": "^5 || ^6.5" + }, + "type": "library", + "autoload": { + "files": [ + "src/getallheaders.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ralph Khattar", + "email": "ralph.khattar@gmail.com" + } + ], + "description": "A polyfill for getallheaders.", + "support": { + "issues": "https://github.com/ralouphie/getallheaders/issues", + "source": "https://github.com/ralouphie/getallheaders/tree/develop" + }, + "time": "2019-03-08T08:55:37+00:00" + }, + { + "name": "ramsey/collection", + "version": "2.0.0", + "source": { + "type": "git", + "url": "https://github.com/ramsey/collection.git", + "reference": "a4b48764bfbb8f3a6a4d1aeb1a35bb5e9ecac4a5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ramsey/collection/zipball/a4b48764bfbb8f3a6a4d1aeb1a35bb5e9ecac4a5", + "reference": "a4b48764bfbb8f3a6a4d1aeb1a35bb5e9ecac4a5", + "shasum": "" + }, + "require": { + "php": "^8.1" + }, + "require-dev": { + "captainhook/plugin-composer": "^5.3", + "ergebnis/composer-normalize": "^2.28.3", + "fakerphp/faker": "^1.21", + "hamcrest/hamcrest-php": "^2.0", + "jangregor/phpstan-prophecy": "^1.0", + "mockery/mockery": "^1.5", + "php-parallel-lint/php-console-highlighter": "^1.0", + "php-parallel-lint/php-parallel-lint": "^1.3", + "phpcsstandards/phpcsutils": "^1.0.0-rc1", + "phpspec/prophecy-phpunit": "^2.0", + "phpstan/extension-installer": "^1.2", + "phpstan/phpstan": "^1.9", + "phpstan/phpstan-mockery": "^1.1", + "phpstan/phpstan-phpunit": "^1.3", + "phpunit/phpunit": "^9.5", + "psalm/plugin-mockery": "^1.1", + "psalm/plugin-phpunit": "^0.18.4", + "ramsey/coding-standard": "^2.0.3", + "ramsey/conventional-commits": "^1.3", + "vimeo/psalm": "^5.4" + }, + "type": "library", + "extra": { + "captainhook": { + "force-install": true + }, + "ramsey/conventional-commits": { + "configFile": "conventional-commits.json" + } + }, + "autoload": { + "psr-4": { + "Ramsey\\Collection\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ben Ramsey", + "email": "ben@benramsey.com", + "homepage": "https://benramsey.com" + } + ], + "description": "A PHP library for representing and manipulating collections.", + "keywords": [ + "array", + "collection", + "hash", + "map", + "queue", + "set" + ], + "support": { + "issues": "https://github.com/ramsey/collection/issues", + "source": "https://github.com/ramsey/collection/tree/2.0.0" + }, + "funding": [ + { + "url": "https://github.com/ramsey", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/ramsey/collection", + "type": "tidelift" + } + ], + "time": "2022-12-31T21:50:55+00:00" + }, + { + "name": "ramsey/uuid", + "version": "4.7.4", + "source": { + "type": "git", + "url": "https://github.com/ramsey/uuid.git", + "reference": "60a4c63ab724854332900504274f6150ff26d286" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ramsey/uuid/zipball/60a4c63ab724854332900504274f6150ff26d286", + "reference": "60a4c63ab724854332900504274f6150ff26d286", + "shasum": "" + }, + "require": { + "brick/math": "^0.8.8 || ^0.9 || ^0.10 || ^0.11", + "ext-json": "*", + "php": "^8.0", + "ramsey/collection": "^1.2 || ^2.0" + }, + "replace": { + "rhumsaa/uuid": "self.version" + }, + "require-dev": { + "captainhook/captainhook": "^5.10", + "captainhook/plugin-composer": "^5.3", + "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", + "doctrine/annotations": "^1.8", + "ergebnis/composer-normalize": "^2.15", + "mockery/mockery": "^1.3", + "paragonie/random-lib": "^2", + "php-mock/php-mock": "^2.2", + "php-mock/php-mock-mockery": "^1.3", + "php-parallel-lint/php-parallel-lint": "^1.1", + "phpbench/phpbench": "^1.0", + "phpstan/extension-installer": "^1.1", + "phpstan/phpstan": "^1.8", + "phpstan/phpstan-mockery": "^1.1", + "phpstan/phpstan-phpunit": "^1.1", + "phpunit/phpunit": "^8.5 || ^9", + "ramsey/composer-repl": "^1.4", + "slevomat/coding-standard": "^8.4", + "squizlabs/php_codesniffer": "^3.5", + "vimeo/psalm": "^4.9" + }, + "suggest": { + "ext-bcmath": "Enables faster math with arbitrary-precision integers using BCMath.", + "ext-gmp": "Enables faster math with arbitrary-precision integers using GMP.", + "ext-uuid": "Enables the use of PeclUuidTimeGenerator and PeclUuidRandomGenerator.", + "paragonie/random-lib": "Provides RandomLib for use with the RandomLibAdapter", + "ramsey/uuid-doctrine": "Allows the use of Ramsey\\Uuid\\Uuid as Doctrine field type." + }, + "type": "library", + "extra": { + "captainhook": { + "force-install": true + } + }, + "autoload": { + "files": [ + "src/functions.php" + ], + "psr-4": { + "Ramsey\\Uuid\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "A PHP library for generating and working with universally unique identifiers (UUIDs).", + "keywords": [ + "guid", + "identifier", + "uuid" + ], + "support": { + "issues": "https://github.com/ramsey/uuid/issues", + "source": "https://github.com/ramsey/uuid/tree/4.7.4" + }, + "funding": [ + { + "url": "https://github.com/ramsey", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/ramsey/uuid", + "type": "tidelift" + } + ], + "time": "2023-04-15T23:01:58+00:00" + }, + { + "name": "react/promise", + "version": "v2.10.0", + "source": { + "type": "git", + "url": "https://github.com/reactphp/promise.git", + "reference": "f913fb8cceba1e6644b7b90c4bfb678ed8a3ef38" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/reactphp/promise/zipball/f913fb8cceba1e6644b7b90c4bfb678ed8a3ef38", + "reference": "f913fb8cceba1e6644b7b90c4bfb678ed8a3ef38", + "shasum": "" + }, + "require": { + "php": ">=5.4.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.5 || ^5.7 || ^4.8.36" + }, + "type": "library", + "autoload": { + "files": [ + "src/functions_include.php" + ], + "psr-4": { + "React\\Promise\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jan Sorgalla", + "email": "jsorgalla@gmail.com", + "homepage": "https://sorgalla.com/" + }, + { + "name": "Christian Lück", + "email": "christian@clue.engineering", + "homepage": "https://clue.engineering/" + }, + { + "name": "Cees-Jan Kiewiet", + "email": "reactphp@ceesjankiewiet.nl", + "homepage": "https://wyrihaximus.net/" + }, + { + "name": "Chris Boden", + "email": "cboden@gmail.com", + "homepage": "https://cboden.dev/" + } + ], + "description": "A lightweight implementation of CommonJS Promises/A for PHP", + "keywords": [ + "promise", + "promises" + ], + "support": { + "issues": "https://github.com/reactphp/promise/issues", + "source": "https://github.com/reactphp/promise/tree/v2.10.0" + }, + "funding": [ + { + "url": "https://opencollective.com/reactphp", + "type": "open_collective" + } + ], + "time": "2023-05-02T15:15:43+00:00" + }, + { + "name": "seld/jsonlint", + "version": "1.10.0", + "source": { + "type": "git", + "url": "https://github.com/Seldaek/jsonlint.git", + "reference": "594fd6462aad8ecee0b45ca5045acea4776667f1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Seldaek/jsonlint/zipball/594fd6462aad8ecee0b45ca5045acea4776667f1", + "reference": "594fd6462aad8ecee0b45ca5045acea4776667f1", + "shasum": "" + }, + "require": { + "php": "^5.3 || ^7.0 || ^8.0" + }, + "require-dev": { + "phpstan/phpstan": "^1.5", + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0 || ^8.5.13" + }, + "bin": [ + "bin/jsonlint" + ], + "type": "library", + "autoload": { + "psr-4": { + "Seld\\JsonLint\\": "src/Seld/JsonLint/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + } + ], + "description": "JSON Linter", + "keywords": [ + "json", + "linter", + "parser", + "validator" + ], + "support": { + "issues": "https://github.com/Seldaek/jsonlint/issues", + "source": "https://github.com/Seldaek/jsonlint/tree/1.10.0" + }, + "funding": [ + { + "url": "https://github.com/Seldaek", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/seld/jsonlint", + "type": "tidelift" + } + ], + "time": "2023-05-11T13:16:46+00:00" + }, + { + "name": "seld/phar-utils", + "version": "1.2.1", + "source": { + "type": "git", + "url": "https://github.com/Seldaek/phar-utils.git", + "reference": "ea2f4014f163c1be4c601b9b7bd6af81ba8d701c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Seldaek/phar-utils/zipball/ea2f4014f163c1be4c601b9b7bd6af81ba8d701c", + "reference": "ea2f4014f163c1be4c601b9b7bd6af81ba8d701c", + "shasum": "" + }, + "require": { + "php": ">=5.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Seld\\PharUtils\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be" + } + ], + "description": "PHAR file format utilities, for when PHP phars you up", + "keywords": [ + "phar" + ], + "support": { + "issues": "https://github.com/Seldaek/phar-utils/issues", + "source": "https://github.com/Seldaek/phar-utils/tree/1.2.1" + }, + "time": "2022-08-31T10:31:18+00:00" + }, + { + "name": "seld/signal-handler", + "version": "2.0.1", + "source": { + "type": "git", + "url": "https://github.com/Seldaek/signal-handler.git", + "reference": "f69d119511dc0360440cdbdaa71829c149b7be75" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Seldaek/signal-handler/zipball/f69d119511dc0360440cdbdaa71829c149b7be75", + "reference": "f69d119511dc0360440cdbdaa71829c149b7be75", + "shasum": "" + }, + "require": { + "php": ">=7.2.0" + }, + "require-dev": { + "phpstan/phpstan": "^1", + "phpstan/phpstan-deprecation-rules": "^1.0", + "phpstan/phpstan-phpunit": "^1", + "phpstan/phpstan-strict-rules": "^1.3", + "phpunit/phpunit": "^7.5.20 || ^8.5.23", + "psr/log": "^1 || ^2 || ^3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "2.x-dev" + } + }, + "autoload": { + "psr-4": { + "Seld\\Signal\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + } + ], + "description": "Simple unix signal handler that silently fails where signals are not supported for easy cross-platform development", + "keywords": [ + "posix", + "sigint", + "signal", + "sigterm", + "unix" + ], + "support": { + "issues": "https://github.com/Seldaek/signal-handler/issues", + "source": "https://github.com/Seldaek/signal-handler/tree/2.0.1" + }, + "time": "2022-07-20T18:31:45+00:00" + }, + { + "name": "symfony/console", + "version": "v5.4.23", + "source": { + "type": "git", + "url": "https://github.com/symfony/console.git", + "reference": "90f21e27d0d88ce38720556dd164d4a1e4c3934c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/console/zipball/90f21e27d0d88ce38720556dd164d4a1e4c3934c", + "reference": "90f21e27d0d88ce38720556dd164d4a1e4c3934c", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1|^3", + "symfony/polyfill-mbstring": "~1.0", + "symfony/polyfill-php73": "^1.9", + "symfony/polyfill-php80": "^1.16", + "symfony/service-contracts": "^1.1|^2|^3", + "symfony/string": "^5.1|^6.0" + }, + "conflict": { + "psr/log": ">=3", + "symfony/dependency-injection": "<4.4", + "symfony/dotenv": "<5.1", + "symfony/event-dispatcher": "<4.4", + "symfony/lock": "<4.4", + "symfony/process": "<4.4" + }, + "provide": { + "psr/log-implementation": "1.0|2.0" + }, + "require-dev": { + "psr/log": "^1|^2", + "symfony/config": "^4.4|^5.0|^6.0", + "symfony/dependency-injection": "^4.4|^5.0|^6.0", + "symfony/event-dispatcher": "^4.4|^5.0|^6.0", + "symfony/lock": "^4.4|^5.0|^6.0", + "symfony/process": "^4.4|^5.0|^6.0", + "symfony/var-dumper": "^4.4|^5.0|^6.0" + }, + "suggest": { + "psr/log": "For using the console logger", + "symfony/event-dispatcher": "", + "symfony/lock": "", + "symfony/process": "" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Console\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Eases the creation of beautiful and testable command line interfaces", + "homepage": "https://symfony.com", + "keywords": [ + "cli", + "command-line", + "console", + "terminal" + ], + "support": { + "source": "https://github.com/symfony/console/tree/v5.4.23" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-04-24T18:47:29+00:00" + }, + { + "name": "symfony/deprecation-contracts", + "version": "v3.2.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/deprecation-contracts.git", + "reference": "e2d1534420bd723d0ef5aec58a22c5fe60ce6f5e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/e2d1534420bd723d0ef5aec58a22c5fe60ce6f5e", + "reference": "e2d1534420bd723d0ef5aec58a22c5fe60ce6f5e", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.3-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "autoload": { + "files": [ + "function.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "A generic function and convention to trigger deprecation notices", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.2.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-03-01T10:25:55+00:00" + }, + { + "name": "symfony/filesystem", + "version": "v6.2.10", + "source": { + "type": "git", + "url": "https://github.com/symfony/filesystem.git", + "reference": "fd588debf7d1bc16a2c84b4b3b71145d9946b894" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/fd588debf7d1bc16a2c84b4b3b71145d9946b894", + "reference": "fd588debf7d1bc16a2c84b4b3b71145d9946b894", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-mbstring": "~1.8" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Filesystem\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides basic utilities for the filesystem", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/filesystem/tree/v6.2.10" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-04-18T13:46:08+00:00" + }, + { + "name": "symfony/finder", + "version": "v6.2.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/finder.git", + "reference": "20808dc6631aecafbe67c186af5dcb370be3a0eb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/finder/zipball/20808dc6631aecafbe67c186af5dcb370be3a0eb", + "reference": "20808dc6631aecafbe67c186af5dcb370be3a0eb", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "require-dev": { + "symfony/filesystem": "^6.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Finder\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Finds files and directories via an intuitive fluent interface", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/finder/tree/v6.2.7" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-02-16T09:57:23+00:00" + }, + { + "name": "symfony/intl", + "version": "v5.4.23", + "source": { + "type": "git", + "url": "https://github.com/symfony/intl.git", + "reference": "962789bbc76c82c266623321ffc24416f574b636" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/intl/zipball/962789bbc76c82c266623321ffc24416f574b636", + "reference": "962789bbc76c82c266623321ffc24416f574b636", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1|^3", + "symfony/polyfill-php80": "^1.16" + }, + "require-dev": { + "symfony/filesystem": "^4.4|^5.0|^6.0" + }, + "type": "library", + "autoload": { + "files": [ + "Resources/functions.php" + ], + "psr-4": { + "Symfony\\Component\\Intl\\": "" + }, + "classmap": [ + "Resources/stubs" + ], + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + }, + { + "name": "Eriksen Costa", + "email": "eriksen.costa@infranology.com.br" + }, + { + "name": "Igor Wiedler", + "email": "igor@wiedler.ch" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides a PHP replacement layer for the C intl extension that includes additional data from the ICU library", + "homepage": "https://symfony.com", + "keywords": [ + "i18n", + "icu", + "internationalization", + "intl", + "l10n", + "localization" + ], + "support": { + "source": "https://github.com/symfony/intl/tree/v5.4.23" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-04-13T10:36:25+00:00" + }, + { + "name": "symfony/polyfill-ctype", + "version": "v1.27.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "5bbc823adecdae860bb64756d639ecfec17b050a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/5bbc823adecdae860bb64756d639ecfec17b050a", + "reference": "5bbc823adecdae860bb64756d639ecfec17b050a", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "provide": { + "ext-ctype": "*" + }, + "suggest": { + "ext-ctype": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.27-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Ctype\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Gert de Pagter", + "email": "BackEndTea@gmail.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for ctype functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "ctype", + "polyfill", + "portable" + ], + "support": { + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.27.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-11-03T14:55:06+00:00" + }, + { + "name": "symfony/polyfill-intl-grapheme", + "version": "v1.27.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-grapheme.git", + "reference": "511a08c03c1960e08a883f4cffcacd219b758354" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/511a08c03c1960e08a883f4cffcacd219b758354", + "reference": "511a08c03c1960e08a883f4cffcacd219b758354", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.27-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Intl\\Grapheme\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for intl's grapheme_* functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "grapheme", + "intl", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.27.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-11-03T14:55:06+00:00" + }, + { + "name": "symfony/polyfill-intl-idn", + "version": "v1.27.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-idn.git", + "reference": "639084e360537a19f9ee352433b84ce831f3d2da" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/639084e360537a19f9ee352433b84ce831f3d2da", + "reference": "639084e360537a19f9ee352433b84ce831f3d2da", + "shasum": "" + }, + "require": { + "php": ">=7.1", + "symfony/polyfill-intl-normalizer": "^1.10", + "symfony/polyfill-php72": "^1.10" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.27-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Intl\\Idn\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Laurent Bassin", + "email": "laurent@bassin.info" + }, + { + "name": "Trevor Rowbotham", + "email": "trevor.rowbotham@pm.me" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for intl's idn_to_ascii and idn_to_utf8 functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "idn", + "intl", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.27.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-11-03T14:55:06+00:00" + }, + { + "name": "symfony/polyfill-intl-normalizer", + "version": "v1.27.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-normalizer.git", + "reference": "19bd1e4fcd5b91116f14d8533c57831ed00571b6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/19bd1e4fcd5b91116f14d8533c57831ed00571b6", + "reference": "19bd1e4fcd5b91116f14d8533c57831ed00571b6", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.27-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Intl\\Normalizer\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for intl's Normalizer class and related functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "intl", + "normalizer", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.27.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-11-03T14:55:06+00:00" + }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.27.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/8ad114f6b39e2c98a8b0e3bd907732c207c2b534", + "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "provide": { + "ext-mbstring": "*" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.27-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for the Mbstring extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.27.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-11-03T14:55:06+00:00" + }, + { + "name": "symfony/polyfill-php72", + "version": "v1.27.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php72.git", + "reference": "869329b1e9894268a8a61dabb69153029b7a8c97" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/869329b1e9894268a8a61dabb69153029b7a8c97", + "reference": "869329b1e9894268a8a61dabb69153029b7a8c97", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.27-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Php72\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php72/tree/v1.27.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-11-03T14:55:06+00:00" + }, + { + "name": "symfony/polyfill-php73", + "version": "v1.27.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php73.git", + "reference": "9e8ecb5f92152187c4799efd3c96b78ccab18ff9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/9e8ecb5f92152187c4799efd3c96b78ccab18ff9", + "reference": "9e8ecb5f92152187c4799efd3c96b78ccab18ff9", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.27-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Php73\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php73/tree/v1.27.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-11-03T14:55:06+00:00" + }, + { + "name": "symfony/polyfill-php80", + "version": "v1.27.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php80.git", + "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936", + "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.27-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Php80\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ion Bazan", + "email": "ion.bazan@gmail.com" + }, + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php80/tree/v1.27.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-11-03T14:55:06+00:00" + }, + { + "name": "symfony/polyfill-php81", + "version": "v1.27.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php81.git", + "reference": "707403074c8ea6e2edaf8794b0157a0bfa52157a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/707403074c8ea6e2edaf8794b0157a0bfa52157a", + "reference": "707403074c8ea6e2edaf8794b0157a0bfa52157a", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.27-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Php81\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 8.1+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php81/tree/v1.27.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-11-03T14:55:06+00:00" + }, + { + "name": "symfony/process", + "version": "v5.4.23", + "source": { + "type": "git", + "url": "https://github.com/symfony/process.git", + "reference": "4b842fc4b61609e0a155a114082bd94e31e98287" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/process/zipball/4b842fc4b61609e0a155a114082bd94e31e98287", + "reference": "4b842fc4b61609e0a155a114082bd94e31e98287", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/polyfill-php80": "^1.16" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Process\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Executes commands in sub-processes", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/process/tree/v5.4.23" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-04-18T13:50:24+00:00" + }, + { + "name": "symfony/service-contracts", + "version": "v2.5.2", + "source": { + "type": "git", + "url": "https://github.com/symfony/service-contracts.git", + "reference": "4b426aac47d6427cc1a1d0f7e2ac724627f5966c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/4b426aac47d6427cc1a1d0f7e2ac724627f5966c", + "reference": "4b426aac47d6427cc1a1d0f7e2ac724627f5966c", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "psr/container": "^1.1", + "symfony/deprecation-contracts": "^2.1|^3" + }, + "conflict": { + "ext-psr": "<1.1|>=2" + }, + "suggest": { + "symfony/service-implementation": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "2.5-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Contracts\\Service\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Generic abstractions related to writing services", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "support": { + "source": "https://github.com/symfony/service-contracts/tree/v2.5.2" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-05-30T19:17:29+00:00" + }, + { + "name": "symfony/string", + "version": "v6.2.8", + "source": { + "type": "git", + "url": "https://github.com/symfony/string.git", + "reference": "193e83bbd6617d6b2151c37fff10fa7168ebddef" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/string/zipball/193e83bbd6617d6b2151c37fff10fa7168ebddef", + "reference": "193e83bbd6617d6b2151c37fff10fa7168ebddef", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-intl-grapheme": "~1.0", + "symfony/polyfill-intl-normalizer": "~1.0", + "symfony/polyfill-mbstring": "~1.0" + }, + "conflict": { + "symfony/translation-contracts": "<2.0" + }, + "require-dev": { + "symfony/error-handler": "^5.4|^6.0", + "symfony/http-client": "^5.4|^6.0", + "symfony/intl": "^6.2", + "symfony/translation-contracts": "^2.0|^3.0", + "symfony/var-exporter": "^5.4|^6.0" + }, + "type": "library", + "autoload": { + "files": [ + "Resources/functions.php" + ], + "psr-4": { + "Symfony\\Component\\String\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides an object-oriented API to strings and deals with bytes, UTF-8 code points and grapheme clusters in a unified way", + "homepage": "https://symfony.com", + "keywords": [ + "grapheme", + "i18n", + "string", + "unicode", + "utf-8", + "utf8" + ], + "support": { + "source": "https://github.com/symfony/string/tree/v6.2.8" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-03-20T16:06:02+00:00" + }, + { + "name": "tedivm/jshrink", + "version": "v1.6.6", + "source": { + "type": "git", + "url": "https://github.com/tedious/JShrink.git", + "reference": "e72133d6e220d79295346954292536b0980eef80" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/tedious/JShrink/zipball/e72133d6e220d79295346954292536b0980eef80", + "reference": "e72133d6e220d79295346954292536b0980eef80", + "shasum": "" + }, + "require": { + "php": "^7.0|^8.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^3.14", + "php-coveralls/php-coveralls": "^2.5.0", + "phpunit/phpunit": "^9|^10" + }, + "type": "library", + "autoload": { + "psr-0": { + "JShrink": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Robert Hafner", + "email": "tedivm@tedivm.com" + } + ], + "description": "Javascript Minifier built in PHP", + "homepage": "http://github.com/tedious/JShrink", + "keywords": [ + "javascript", + "minifier" + ], + "support": { + "issues": "https://github.com/tedious/JShrink/issues", + "source": "https://github.com/tedious/JShrink/tree/v1.6.6" + }, + "funding": [ + { + "url": "https://github.com/tedivm", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/tedivm/jshrink", + "type": "tidelift" + } + ], + "time": "2023-04-18T22:30:38+00:00" + }, + { + "name": "webmozart/assert", + "version": "1.11.0", + "source": { + "type": "git", + "url": "https://github.com/webmozarts/assert.git", + "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/webmozarts/assert/zipball/11cb2199493b2f8a3b53e7f19068fc6aac760991", + "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991", + "shasum": "" + }, + "require": { + "ext-ctype": "*", + "php": "^7.2 || ^8.0" + }, + "conflict": { + "phpstan/phpstan": "<0.12.20", + "vimeo/psalm": "<4.6.1 || 4.6.2" + }, + "require-dev": { + "phpunit/phpunit": "^8.5.13" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.10-dev" + } + }, + "autoload": { + "psr-4": { + "Webmozart\\Assert\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Assertions to validate method input/output with nice error messages.", + "keywords": [ + "assert", + "check", + "validate" + ], + "support": { + "issues": "https://github.com/webmozarts/assert/issues", + "source": "https://github.com/webmozarts/assert/tree/1.11.0" + }, + "time": "2022-06-03T18:03:27+00:00" + }, + { + "name": "webonyx/graphql-php", + "version": "v15.4.0", + "source": { + "type": "git", + "url": "https://github.com/webonyx/graphql-php.git", + "reference": "99290f7945a5b39ad823f7600fa196de62597e9d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/webonyx/graphql-php/zipball/99290f7945a5b39ad823f7600fa196de62597e9d", + "reference": "99290f7945a5b39ad823f7600fa196de62597e9d", + "shasum": "" + }, + "require": { + "ext-json": "*", + "ext-mbstring": "*", + "php": "^7.4 || ^8" + }, + "require-dev": { + "amphp/amp": "^2.6", + "amphp/http-server": "^2.1", + "dms/phpunit-arraysubset-asserts": "^0.4", + "ergebnis/composer-normalize": "^2.28", + "mll-lab/php-cs-fixer-config": "^5.0", + "nyholm/psr7": "^1.5", + "phpbench/phpbench": "^1.2", + "phpstan/extension-installer": "^1.1", + "phpstan/phpstan": "1.10.15", + "phpstan/phpstan-phpunit": "1.3.11", + "phpstan/phpstan-strict-rules": "1.5.1", + "phpunit/phpunit": "^9.5", + "psr/http-message": "^1 || ^2", + "react/http": "^1.6", + "react/promise": "^2.9", + "rector/rector": "^0.16.0", + "symfony/polyfill-php81": "^1.23", + "symfony/var-exporter": "^5 || ^6", + "thecodingmachine/safe": "^1.3 || ^2" + }, + "suggest": { + "amphp/http-server": "To leverage async resolving with webserver on AMPHP platform", + "psr/http-message": "To use standard GraphQL server", + "react/promise": "To leverage async resolving on React PHP platform" + }, + "type": "library", + "autoload": { + "psr-4": { + "GraphQL\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "A PHP port of GraphQL reference implementation", + "homepage": "https://github.com/webonyx/graphql-php", + "keywords": [ + "api", + "graphql" + ], + "support": { + "issues": "https://github.com/webonyx/graphql-php/issues", + "source": "https://github.com/webonyx/graphql-php/tree/v15.4.0" + }, + "funding": [ + { + "url": "https://opencollective.com/webonyx-graphql-php", + "type": "open_collective" + } + ], + "time": "2023-05-11T10:26:08+00:00" + }, + { + "name": "wikimedia/less.php", + "version": "v3.2.1", + "source": { + "type": "git", + "url": "https://github.com/wikimedia/less.php.git", + "reference": "0d5b30ba792bdbf8991a646fc9c30561b38a5559" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/wikimedia/less.php/zipball/0d5b30ba792bdbf8991a646fc9c30561b38a5559", + "reference": "0d5b30ba792bdbf8991a646fc9c30561b38a5559", + "shasum": "" + }, + "require": { + "php": ">=7.2.9" + }, + "require-dev": { + "mediawiki/mediawiki-codesniffer": "40.0.1", + "mediawiki/mediawiki-phan-config": "0.12.0", + "mediawiki/minus-x": "1.1.1", + "php-parallel-lint/php-console-highlighter": "1.0.0", + "php-parallel-lint/php-parallel-lint": "1.3.2", + "phpunit/phpunit": "^8.5" + }, + "bin": [ + "bin/lessc" + ], + "type": "library", + "autoload": { + "psr-0": { + "Less": "lib/" + }, + "classmap": [ + "lessc.inc.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "Timo Tijhof", + "homepage": "https://timotijhof.net" + }, + { + "name": "Josh Schmidt", + "homepage": "https://github.com/oyejorge" + }, + { + "name": "Matt Agar", + "homepage": "https://github.com/agar" + }, + { + "name": "Martin Jantošovič", + "homepage": "https://github.com/Mordred" + } + ], + "description": "PHP port of the LESS processor", + "homepage": "https://gerrit.wikimedia.org/g/mediawiki/libs/less.php", + "keywords": [ + "css", + "less", + "less.js", + "lesscss", + "php", + "stylesheet" + ], + "support": { + "issues": "https://github.com/wikimedia/less.php/issues", + "source": "https://github.com/wikimedia/less.php/tree/v3.2.1" + }, + "time": "2023-02-03T06:43:41+00:00" + } + ], + "packages-dev": [ + { + "name": "magento/magento-coding-standard", + "version": "31", + "source": { + "type": "git", + "url": "https://github.com/magento/magento-coding-standard.git", + "reference": "1172711ea1947d0258adae8d8e0a72669f1c2d99" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/magento/magento-coding-standard/zipball/1172711ea1947d0258adae8d8e0a72669f1c2d99", + "reference": "1172711ea1947d0258adae8d8e0a72669f1c2d99", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-simplexml": "*", + "php": ">=7.4", + "phpcompatibility/php-compatibility": "^9.3", + "rector/rector": "^0.15.10", + "squizlabs/php_codesniffer": "^3.6.1", + "webonyx/graphql-php": "^15.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.5.8" + }, + "type": "phpcodesniffer-standard", + "autoload": { + "psr-4": { + "Magento2\\": "Magento2/", + "Magento2Framework\\": "Magento2Framework/" + }, + "classmap": [ + "PHP_CodeSniffer/Tokenizers/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "description": "A set of Magento specific PHP CodeSniffer rules.", + "support": { + "issues": "https://github.com/magento/magento-coding-standard/issues", + "source": "https://github.com/magento/magento-coding-standard/tree/v31" + }, + "time": "2023-02-01T15:38:47+00:00" + }, + { + "name": "pdepend/pdepend", + "version": "2.14.0", + "source": { + "type": "git", + "url": "https://github.com/pdepend/pdepend.git", + "reference": "1121d4b04af06e33e9659bac3a6741b91cab1de1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/pdepend/pdepend/zipball/1121d4b04af06e33e9659bac3a6741b91cab1de1", + "reference": "1121d4b04af06e33e9659bac3a6741b91cab1de1", + "shasum": "" + }, + "require": { + "php": ">=5.3.7", + "symfony/config": "^2.3.0|^3|^4|^5|^6.0", + "symfony/dependency-injection": "^2.3.0|^3|^4|^5|^6.0", + "symfony/filesystem": "^2.3.0|^3|^4|^5|^6.0" + }, + "require-dev": { + "easy-doc/easy-doc": "0.0.0|^1.2.3", + "gregwar/rst": "^1.0", + "phpunit/phpunit": "^4.8.36|^5.7.27", + "squizlabs/php_codesniffer": "^2.0.0" + }, + "bin": [ + "src/bin/pdepend" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.x-dev" + } + }, + "autoload": { + "psr-4": { + "PDepend\\": "src/main/php/PDepend" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "Official version of pdepend to be handled with Composer", + "keywords": [ + "PHP Depend", + "PHP_Depend", + "dev", + "pdepend" + ], + "support": { + "issues": "https://github.com/pdepend/pdepend/issues", + "source": "https://github.com/pdepend/pdepend/tree/2.14.0" + }, + "funding": [ + { + "url": "https://tidelift.com/funding/github/packagist/pdepend/pdepend", + "type": "tidelift" + } + ], + "time": "2023-05-26T13:15:18+00:00" + }, + { + "name": "phpcompatibility/php-compatibility", + "version": "9.3.5", + "source": { + "type": "git", + "url": "https://github.com/PHPCompatibility/PHPCompatibility.git", + "reference": "9fb324479acf6f39452e0655d2429cc0d3914243" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibility/zipball/9fb324479acf6f39452e0655d2429cc0d3914243", + "reference": "9fb324479acf6f39452e0655d2429cc0d3914243", + "shasum": "" + }, + "require": { + "php": ">=5.3", + "squizlabs/php_codesniffer": "^2.3 || ^3.0.2" + }, + "conflict": { + "squizlabs/php_codesniffer": "2.6.2" + }, + "require-dev": { + "phpunit/phpunit": "~4.5 || ^5.0 || ^6.0 || ^7.0" + }, + "suggest": { + "dealerdirect/phpcodesniffer-composer-installer": "^0.5 || This Composer plugin will sort out the PHPCS 'installed_paths' automatically.", + "roave/security-advisories": "dev-master || Helps prevent installing dependencies with known security issues." + }, + "type": "phpcodesniffer-standard", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL-3.0-or-later" + ], + "authors": [ + { + "name": "Wim Godden", + "homepage": "https://github.com/wimg", + "role": "lead" + }, + { + "name": "Juliette Reinders Folmer", + "homepage": "https://github.com/jrfnl", + "role": "lead" + }, + { + "name": "Contributors", + "homepage": "https://github.com/PHPCompatibility/PHPCompatibility/graphs/contributors" + } + ], + "description": "A set of sniffs for PHP_CodeSniffer that checks for PHP cross-version compatibility.", + "homepage": "http://techblog.wimgodden.be/tag/codesniffer/", + "keywords": [ + "compatibility", + "phpcs", + "standards" + ], + "support": { + "issues": "https://github.com/PHPCompatibility/PHPCompatibility/issues", + "source": "https://github.com/PHPCompatibility/PHPCompatibility" + }, + "time": "2019-12-27T09:44:58+00:00" + }, + { + "name": "phpmd/phpmd", + "version": "2.13.0", + "source": { + "type": "git", + "url": "https://github.com/phpmd/phpmd.git", + "reference": "dad0228156856b3ad959992f9748514fa943f3e3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpmd/phpmd/zipball/dad0228156856b3ad959992f9748514fa943f3e3", + "reference": "dad0228156856b3ad959992f9748514fa943f3e3", + "shasum": "" + }, + "require": { + "composer/xdebug-handler": "^1.0 || ^2.0 || ^3.0", + "ext-xml": "*", + "pdepend/pdepend": "^2.12.1", + "php": ">=5.3.9" + }, + "require-dev": { + "easy-doc/easy-doc": "0.0.0 || ^1.3.2", + "ext-json": "*", + "ext-simplexml": "*", + "gregwar/rst": "^1.0", + "mikey179/vfsstream": "^1.6.8", + "phpunit/phpunit": "^4.8.36 || ^5.7.27", + "squizlabs/php_codesniffer": "^2.0" + }, + "bin": [ + "src/bin/phpmd" + ], + "type": "library", + "autoload": { + "psr-0": { + "PHPMD\\": "src/main/php" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Manuel Pichler", + "email": "github@manuel-pichler.de", + "homepage": "https://github.com/manuelpichler", + "role": "Project Founder" + }, + { + "name": "Marc Würth", + "email": "ravage@bluewin.ch", + "homepage": "https://github.com/ravage84", + "role": "Project Maintainer" + }, + { + "name": "Other contributors", + "homepage": "https://github.com/phpmd/phpmd/graphs/contributors", + "role": "Contributors" + } + ], + "description": "PHPMD is a spin-off project of PHP Depend and aims to be a PHP equivalent of the well known Java tool PMD.", + "homepage": "https://phpmd.org/", + "keywords": [ + "mess detection", + "mess detector", + "pdepend", + "phpmd", + "pmd" + ], + "support": { + "irc": "irc://irc.freenode.org/phpmd", + "issues": "https://github.com/phpmd/phpmd/issues", + "source": "https://github.com/phpmd/phpmd/tree/2.13.0" + }, + "funding": [ + { + "url": "https://tidelift.com/funding/github/packagist/phpmd/phpmd", + "type": "tidelift" + } + ], + "time": "2022-09-10T08:44:15+00:00" + }, + { + "name": "phpstan/extension-installer", + "version": "1.3.1", + "source": { + "type": "git", + "url": "https://github.com/phpstan/extension-installer.git", + "reference": "f45734bfb9984c6c56c4486b71230355f066a58a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpstan/extension-installer/zipball/f45734bfb9984c6c56c4486b71230355f066a58a", + "reference": "f45734bfb9984c6c56c4486b71230355f066a58a", + "shasum": "" + }, + "require": { + "composer-plugin-api": "^2.0", + "php": "^7.2 || ^8.0", + "phpstan/phpstan": "^1.9.0" + }, + "require-dev": { + "composer/composer": "^2.0", + "php-parallel-lint/php-parallel-lint": "^1.2.0", + "phpstan/phpstan-strict-rules": "^0.11 || ^0.12 || ^1.0" + }, + "type": "composer-plugin", + "extra": { + "class": "PHPStan\\ExtensionInstaller\\Plugin" + }, + "autoload": { + "psr-4": { + "PHPStan\\ExtensionInstaller\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Composer plugin for automatic installation of PHPStan extensions", + "support": { + "issues": "https://github.com/phpstan/extension-installer/issues", + "source": "https://github.com/phpstan/extension-installer/tree/1.3.1" + }, + "time": "2023-05-24T08:59:17+00:00" + }, + { + "name": "phpstan/phpstan", + "version": "1.10.15", + "source": { + "type": "git", + "url": "https://github.com/phpstan/phpstan.git", + "reference": "762c4dac4da6f8756eebb80e528c3a47855da9bd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/762c4dac4da6f8756eebb80e528c3a47855da9bd", + "reference": "762c4dac4da6f8756eebb80e528c3a47855da9bd", + "shasum": "" + }, + "require": { + "php": "^7.2|^8.0" + }, + "conflict": { + "phpstan/phpstan-shim": "*" + }, + "bin": [ + "phpstan", + "phpstan.phar" + ], + "type": "library", + "autoload": { + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "PHPStan - PHP Static Analysis Tool", + "keywords": [ + "dev", + "static analysis" + ], + "support": { + "docs": "https://phpstan.org/user-guide/getting-started", + "forum": "https://github.com/phpstan/phpstan/discussions", + "issues": "https://github.com/phpstan/phpstan/issues", + "security": "https://github.com/phpstan/phpstan/security/policy", + "source": "https://github.com/phpstan/phpstan-src" + }, + "funding": [ + { + "url": "https://github.com/ondrejmirtes", + "type": "github" + }, + { + "url": "https://github.com/phpstan", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpstan/phpstan", + "type": "tidelift" + } + ], + "time": "2023-05-09T15:28:01+00:00" + }, + { + "name": "rector/rector", + "version": "0.15.25", + "source": { + "type": "git", + "url": "https://github.com/rectorphp/rector.git", + "reference": "015935c7ed9e48a4f5895ba974f337e20a263841" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/rectorphp/rector/zipball/015935c7ed9e48a4f5895ba974f337e20a263841", + "reference": "015935c7ed9e48a4f5895ba974f337e20a263841", + "shasum": "" + }, + "require": { + "php": "^7.2|^8.0", + "phpstan/phpstan": "^1.10.14" + }, + "conflict": { + "rector/rector-doctrine": "*", + "rector/rector-downgrade-php": "*", + "rector/rector-phpunit": "*", + "rector/rector-symfony": "*" + }, + "bin": [ + "bin/rector" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "0.15-dev" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Instant Upgrade and Automated Refactoring of any PHP code", + "keywords": [ + "automation", + "dev", + "migration", + "refactoring" + ], + "support": { + "issues": "https://github.com/rectorphp/rector/issues", + "source": "https://github.com/rectorphp/rector/tree/0.15.25" + }, + "funding": [ + { + "url": "https://github.com/tomasvotruba", + "type": "github" + } + ], + "time": "2023-04-20T16:07:39+00:00" + }, + { + "name": "squizlabs/php_codesniffer", + "version": "3.7.2", + "source": { + "type": "git", + "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", + "reference": "ed8e00df0a83aa96acf703f8c2979ff33341f879" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/ed8e00df0a83aa96acf703f8c2979ff33341f879", + "reference": "ed8e00df0a83aa96acf703f8c2979ff33341f879", + "shasum": "" + }, + "require": { + "ext-simplexml": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": ">=5.4.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" + }, + "bin": [ + "bin/phpcs", + "bin/phpcbf" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.x-dev" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Greg Sherwood", + "role": "lead" + } + ], + "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", + "homepage": "https://github.com/squizlabs/PHP_CodeSniffer", + "keywords": [ + "phpcs", + "standards", + "static analysis" + ], + "support": { + "issues": "https://github.com/squizlabs/PHP_CodeSniffer/issues", + "source": "https://github.com/squizlabs/PHP_CodeSniffer", + "wiki": "https://github.com/squizlabs/PHP_CodeSniffer/wiki" + }, + "time": "2023-02-22T23:07:41+00:00" + }, + { + "name": "symfony/config", + "version": "v6.2.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/config.git", + "reference": "249271da6f545d6579e0663374f8249a80be2893" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/config/zipball/249271da6f545d6579e0663374f8249a80be2893", + "reference": "249271da6f545d6579e0663374f8249a80be2893", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "symfony/deprecation-contracts": "^2.1|^3", + "symfony/filesystem": "^5.4|^6.0", + "symfony/polyfill-ctype": "~1.8" + }, + "conflict": { + "symfony/finder": "<5.4" + }, + "require-dev": { + "symfony/event-dispatcher": "^5.4|^6.0", + "symfony/finder": "^5.4|^6.0", + "symfony/messenger": "^5.4|^6.0", + "symfony/service-contracts": "^1.1|^2|^3", + "symfony/yaml": "^5.4|^6.0" + }, + "suggest": { + "symfony/yaml": "To use the yaml reference dumper" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Config\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Helps you find, load, combine, autofill and validate configuration values of any kind", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/config/tree/v6.2.7" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-02-14T08:44:56+00:00" + }, + { + "name": "symfony/dependency-injection", + "version": "v6.2.10", + "source": { + "type": "git", + "url": "https://github.com/symfony/dependency-injection.git", + "reference": "d732a66a2672669232c0b4536c8c96724a679780" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/d732a66a2672669232c0b4536c8c96724a679780", + "reference": "d732a66a2672669232c0b4536c8c96724a679780", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "psr/container": "^1.1|^2.0", + "symfony/deprecation-contracts": "^2.1|^3", + "symfony/service-contracts": "^1.1.6|^2.0|^3.0", + "symfony/var-exporter": "^6.2.7" + }, + "conflict": { + "ext-psr": "<1.1|>=2", + "symfony/config": "<6.1", + "symfony/finder": "<5.4", + "symfony/proxy-manager-bridge": "<6.2", + "symfony/yaml": "<5.4" + }, + "provide": { + "psr/container-implementation": "1.1|2.0", + "symfony/service-implementation": "1.1|2.0|3.0" + }, + "require-dev": { + "symfony/config": "^6.1", + "symfony/expression-language": "^5.4|^6.0", + "symfony/yaml": "^5.4|^6.0" + }, + "suggest": { + "symfony/config": "", + "symfony/expression-language": "For using expressions in service container configuration", + "symfony/finder": "For using double-star glob patterns or when GLOB_BRACE portability is required", + "symfony/yaml": "" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\DependencyInjection\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Allows you to standardize and centralize the way objects are constructed in your application", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/dependency-injection/tree/v6.2.10" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-04-21T15:42:15+00:00" + }, + { + "name": "symfony/var-exporter", + "version": "v6.2.10", + "source": { + "type": "git", + "url": "https://github.com/symfony/var-exporter.git", + "reference": "9a07920c2058bafee921ce4d90aeef2193837d63" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/var-exporter/zipball/9a07920c2058bafee921ce4d90aeef2193837d63", + "reference": "9a07920c2058bafee921ce4d90aeef2193837d63", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "require-dev": { + "symfony/var-dumper": "^5.4|^6.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\VarExporter\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Allows exporting any serializable PHP data structure to plain PHP code", + "homepage": "https://symfony.com", + "keywords": [ + "clone", + "construct", + "export", + "hydrate", + "instantiate", + "lazy-loading", + "proxy", + "serialize" + ], + "support": { + "source": "https://github.com/symfony/var-exporter/tree/v6.2.10" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-04-21T08:33:05+00:00" + } + ], + "aliases": [], + "minimum-stability": "dev", + "stability-flags": [], + "prefer-stable": true, + "prefer-lowest": false, + "platform": { + "php": "~7.3.0||~7.4.0||~8.1.0", + "ext-json": "*", + "ext-gd": "*", + "ext-zip": "*" + }, + "platform-dev": [], + "plugin-api-version": "2.3.0" +} diff --git a/crowdin.yml b/crowdin.yml new file mode 100644 index 0000000..991c2f4 --- /dev/null +++ b/crowdin.yml @@ -0,0 +1,38 @@ +project_id: '554895' +base_path: i18n +base_url: 'https://api.crowdin.com' +preserve_hierarchy: 1 +files: + - source: /i18n/en_US.csv + - source: /i18n/pt_BR.csv +targets: + - name: /i18n/pt_BR.csv + sources: + - /i18n/en_US.csv + file: /i18n/%locale_with_underscore%.csv + format: crowdin-csv + - name: /i18n/es_AR.csv + sources: + - /i18n/en_US.csv + file: /i18n/%locale_with_underscore%.csv + format: crowdin-csv + - name: /i18n/es_CL.csv + sources: + - /i18n/en_US.csv + file: /i18n/%locale_with_underscore%.csv + format: crowdin-csv + - name: /i18n/es_CO.csv + sources: + - /i18n/en_US.csv + file: /i18n/%locale_with_underscore%.csv + format: crowdin-csv + - name: /i18n/es_MX.csv + sources: + - /i18n/en_US.csv + file: /i18n/%locale_with_underscore%.csv + format: crowdin-csv + - name: /i18n/es_MX.csv + sources: + - /i18n/en_PE.csv + file: /i18n/%locale_with_underscore%.csv + format: crowdin-csv diff --git a/etc/acl.xml b/etc/acl.xml new file mode 100644 index 0000000..7825e76 --- /dev/null +++ b/etc/acl.xml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + diff --git a/etc/adminhtml/di.xml b/etc/adminhtml/di.xml new file mode 100644 index 0000000..ac3cae0 --- /dev/null +++ b/etc/adminhtml/di.xml @@ -0,0 +1,75 @@ + + + + + + + + + + \Magento\Framework\View\Element\Message\Renderer\BlockRenderer::CODE + + MercadoPago_AdbPayment::messages/homolog_message.phtml + + + + + + + + + + 0 + + + + + + + 0 + + + + + + + 0 + + + + + + + 0 + + + + + + + 0 + + + + + + + 0 + + + + + + + 0 + + + + diff --git a/etc/adminhtml/events.xml b/etc/adminhtml/events.xml new file mode 100644 index 0000000..b3681c9 --- /dev/null +++ b/etc/adminhtml/events.xml @@ -0,0 +1,14 @@ + + + + + + + diff --git a/etc/adminhtml/system.xml b/etc/adminhtml/system.xml new file mode 100644 index 0000000..5505f21 --- /dev/null +++ b/etc/adminhtml/system.xml @@ -0,0 +1,25 @@ + + + + +
+ + + complex mercadopago-payment-section + MercadoPago\AdbPayment\Model\Adminhtml\Source\PaymentGroup + here.]]> + + + + + +
+
+
diff --git a/etc/adminhtml/system/basic_settings.xml b/etc/adminhtml/system/basic_settings.xml new file mode 100644 index 0000000..f7eb9e2 --- /dev/null +++ b/etc/adminhtml/system/basic_settings.xml @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/etc/adminhtml/system/basic_settings/api_refund.xml b/etc/adminhtml/system/basic_settings/api_refund.xml new file mode 100644 index 0000000..379e601 --- /dev/null +++ b/etc/adminhtml/system/basic_settings/api_refund.xml @@ -0,0 +1,13 @@ + + + + + + + Magento\Config\Model\Config\Source\Yesno + Enable the creation of a Credit Note when a refund occurs in Mercado Pago. + payment/mercadopago_adbpayment/receive_refund + required-entry + + + diff --git a/etc/adminhtml/system/basic_settings/credentials.xml b/etc/adminhtml/system/basic_settings/credentials.xml new file mode 100644 index 0000000..a443002 --- /dev/null +++ b/etc/adminhtml/system/basic_settings/credentials.xml @@ -0,0 +1,48 @@ + + + + + In order to sell or test a store, you must first enter your test and production credentials.

Using the account of the collaborator with access to Mercado Pago Seller Account, search the credentials according to the account: Argentina, Brazil, Chile, Colombia, Mexico, Uruguay and Peru.

]]>
+ + + MercadoPago\AdbPayment\Model\Adminhtml\Source\Environment + payment/mercadopago_adbpayment/environment + When operational mode is set as Sandbox, your sales will not be communicated to financial institutions. + required-entry validate-select + + + + payment/mercadopago_adbpayment/client_id_production + required-entry + + production + + + + + Magento\Config\Model\Config\Backend\Encrypted + payment/mercadopago_adbpayment/client_secret_production + required-entry + + production + + + + + payment/mercadopago_adbpayment/client_id_sandbox + required-entry + + sandbox + + + + + Magento\Config\Model\Config\Backend\Encrypted + payment/mercadopago_adbpayment/client_secret_sandbox + required-entry + + sandbox + + +
+
diff --git a/etc/adminhtml/system/basic_settings/developers.xml b/etc/adminhtml/system/basic_settings/developers.xml new file mode 100644 index 0000000..33de453 --- /dev/null +++ b/etc/adminhtml/system/basic_settings/developers.xml @@ -0,0 +1,20 @@ + + + + + + + Magento\Config\Model\Config\Source\Yesno + payment/mercadopago_adbpayment/debug + We record your store's communications with Mercado Pago in orer to offer a better support. Please note it is not recommended to use the debug mode when your store is in production mode. + + + + payment/mercadopago_adbpayment/sandbox_rewrite_notification_url + You can override notification URLs which are automatically generated. In order to use the module's default, please do not fill in this details. + + sandbox + + + + diff --git a/etc/adminhtml/system/basic_settings/more_data.xml b/etc/adminhtml/system/basic_settings/more_data.xml new file mode 100644 index 0000000..0529057 --- /dev/null +++ b/etc/adminhtml/system/basic_settings/more_data.xml @@ -0,0 +1,24 @@ + + + + + + + This is the store's name as it will appear on the customer's invoice. In case the sale was made through Checkout Pro, the invoice will also show Mercado Pago in the name. + payment/mercadopago_adbpayment/statement_descriptor + required-entry + + + + The product category of your store on Mercado Pago. + MercadoPago\AdbPayment\Model\Adminhtml\Source\Category + payment/mercadopago_adbpayment/category + required-entry validate-select + + + + payment/mercadopago_adbpayment/integrator_id + here.]]> + + + diff --git a/etc/adminhtml/system/checkout_pro.xml b/etc/adminhtml/system/checkout_pro.xml new file mode 100644 index 0000000..8aea6a4 --- /dev/null +++ b/etc/adminhtml/system/checkout_pro.xml @@ -0,0 +1,142 @@ + + + + + + + Magento\Config\Model\Config\Source\Yesno + payment/mercadopago_adbpayment_checkout_pro/active + + + + Payment method title at the store's checkout. + payment/mercadopago_adbpayment_checkout_pro/title + + + + Calendar days. + required-entry validate-number validate-zero-or-greater + payment/mercadopago_adbpayment_checkout_pro/expiration + + + + Magento\Config\Model\Config\Source\Yesno + payment/mercadopago_adbpayment_checkout_pro/binary_mode + + + + Modal: Buyer will close via modal on the checkout screen. Redirection: Buyer will be redirected to the Mercado Pago website. + MercadoPago\AdbPayment\Model\Adminhtml\Source\TypeRedirect + required-entry validate-select + payment/mercadopago_adbpayment_checkout_pro/type_redirect + + + + MercadoPago\AdbPayment\Model\Adminhtml\Source\MerchantPaymentMethods + payment/mercadopago_adbpayment_checkout_pro/excluded + Select the payment methods you do NOT want to accept. + + + + It is possible to configure the number of installments in Checkout Pro, but the limit of installments per purchase will also depend on the minimum and maximum amount defined by each flag in the country of your store. + MercadoPago\AdbPayment\Model\Adminhtml\Source\MaxInstallments + required-entry validate-select + payment/mercadopago_adbpayment_checkout_pro/max_installments + + + + You can link your Checkout Pro sales with external services. + + + + + Magento\Config\Model\Config\Source\Yesno + payment/mercadopago_adbpayment_checkout_pro/include_facebook + + + + Link your sales with Facebook by entering the ID No. and your tracking code. + payment/mercadopago_adbpayment_checkout_pro/facebook_ad + required-entry + + 1 + + + + + + + + Magento\Config\Model\Config\Source\Yesno + payment/mercadopago_adbpayment_checkout_pro/include_google + + + + Link your sales with Google Ads by entering the ID No. and your tracking code. + payment/mercadopago_adbpayment_checkout_pro/conversion_id + required-entry + + 1 + + + + + Link your sales with Google Ads by entering the Label and your tracking code. + payment/mercadopago_adbpayment_checkout_pro/conversion_label + required-entry + + 1 + + + + + + + Set up how the items will appear in the modal window in which the buyer will complete the purchase. + + modal + + + + required-entry validate-no-html-tags + MercadoPago\AdbPayment\Model\Config\Backend\Color + payment/mercadopago_adbpayment_checkout_pro/theme_header + MercadoPago\AdbPayment\Block\Adminhtml\System\Config\Form\ColorPicker + + + + required-entry validate-no-html-tags + MercadoPago\AdbPayment\Model\Config\Backend\Color + payment/mercadopago_adbpayment_checkout_pro/theme_elements + MercadoPago\AdbPayment\Block\Adminhtml\System\Config\Form\ColorPicker + + + + + + + Minimum amount to pay with Checkout Pro. + validate-number validate-zero-or-greater + payment/mercadopago_adbpayment_checkout_pro/min_order_total + + + + Maximum amount to pay with Checkout Pro + validate-number validate-zero-or-greater + payment/mercadopago_adbpayment_checkout_pro/max_order_total + + + + Countries eligible to use this payment method. + Magento\Directory\Model\Config\Source\Country + payment/mercadopago_adbpayment_checkout_pro/specificcountry + + + + Sets up in which order the payment methods will be shown at the Checkout. + validate-number + payment/mercadopago_adbpayment_checkout_pro/sort_order + + + + diff --git a/etc/adminhtml/system/checkout_transparent.xml b/etc/adminhtml/system/checkout_transparent.xml new file mode 100644 index 0000000..5a2b95a --- /dev/null +++ b/etc/adminhtml/system/checkout_transparent.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/etc/adminhtml/system/checkout_transparent/credit_card.xml b/etc/adminhtml/system/checkout_transparent/credit_card.xml new file mode 100644 index 0000000..00b900d --- /dev/null +++ b/etc/adminhtml/system/checkout_transparent/credit_card.xml @@ -0,0 +1,76 @@ + + + + + + + Magento\Config\Model\Config\Source\Yesno + payment/mercadopago_adbpayment_cc/active + + + + Payment method title at the store's checkout. + payment/mercadopago_adbpayment_cc/title + + + + Allows buyer to save the card for future use. + Magento\Config\Model\Config\Source\Yesno + payment/mercadopago_adbpayment_cc_vault/active + + + + Consult the store's business sector to be able to select capturing the payment at the time of the purchase or at a later moment. + MercadoPago\AdbPayment\Model\Adminhtml\Source\PaymentAction + payment/mercadopago_adbpayment_cc/payment_action + + + + MercadoPago\AdbPayment\Model\Adminhtml\Source\IsBinaryMode + payment/mercadopago_adbpayment_cc/can_initialize + + + + Activate this option if you want to obtain buyer`s documents details, using an additional field on the payment form. Disable it if your store already gets these details. + + + Magento\Config\Model\Config\Source\Enabledisable + payment/mercadopago_adbpayment_cc/get_document_identification + + + + + + + MercadoPago\AdbPayment\Block\Adminhtml\System\Config\Form\Button + + + + + + + Minimum amount for payment with this payment method. + validate-number validate-zero-or-greater + payment/mercadopago_adbpayment_cc/min_order_total + + + + Maximum amount for payment with this payment method. + validate-number validate-zero-or-greater + payment/mercadopago_adbpayment_cc/max_order_total + + + + Countries eligible to use this payment method. + Magento\Directory\Model\Config\Source\Country + payment/mercadopago_adbpayment_cc/specificcountry + + + + Sets up in which order the payment methods will be shown at the Checkout. + validate-number + payment/mercadopago_adbpayment_cc/sort_order + + + + diff --git a/etc/adminhtml/system/checkout_transparent/payment_methods_off.xml b/etc/adminhtml/system/checkout_transparent/payment_methods_off.xml new file mode 100644 index 0000000..fa29753 --- /dev/null +++ b/etc/adminhtml/system/checkout_transparent/payment_methods_off.xml @@ -0,0 +1,65 @@ + + + + + + + + + Magento\Config\Model\Config\Source\Yesno + payment/mercadopago_adbpayment_payment_methods_off/active + + + + + payment/mercadopago_adbpayment_payment_methods_off/title + + + + + Calendar days. + required-entry validate-number + payment/mercadopago_adbpayment_payment_methods_off/expiration + + + + + Select the payment methods you do NOT want to accept. + MercadoPago\AdbPayment\Model\Adminhtml\Source\PaymentMethodsOff + payment/mercadopago_adbpayment_payment_methods_off/payment_methods + + + + + Activate this option if you want to obtain buyer`s documents details, using an additional field on the payment form. Disable it if your store already gets these details. + + + Magento\Config\Model\Config\Source\Enabledisable + payment/mercadopago_adbpayment_payment_methods_off/get_name + + + + In case you leave this option active, an additional field in the payment form will obtain this information. If disabled, details will be retrieved directly from other fields within your store. + Magento\Config\Model\Config\Source\Enabledisable + payment/mercadopago_adbpayment_payment_methods_off/get_document_identification + + + + + + + + Countries eligible to use this payment method. + Magento\Directory\Model\Config\Source\Country + payment/mercadopago_adbpayment_payment_methods_off/specificcountry + + + + Sets up in which order the payment methods will be shown at the Checkout. + validate-number + payment/mercadopago_adbpayment_payment_methods_off/sort_order + + + + + diff --git a/etc/adminhtml/system/checkout_transparent/pix.xml b/etc/adminhtml/system/checkout_transparent/pix.xml new file mode 100644 index 0000000..b56507d --- /dev/null +++ b/etc/adminhtml/system/checkout_transparent/pix.xml @@ -0,0 +1,61 @@ + + + + + + MLB + + + + Magento\Config\Model\Config\Source\Yesno + payment/mercadopago_adbpayment_pix/active + + + + Payment method title at the store's checkout. + payment/mercadopago_adbpayment_pix/title + + + + MercadoPago\AdbPayment\Model\Adminhtml\Source\PixExpiration + payment/mercadopago_adbpayment_pix/expiration + required-entry validate-select + + + + Activate this option if you want to obtain buyer`s documents details, using an additional field on the payment form. Disable it if your store already gets these details. + + + Magento\Config\Model\Config\Source\Enabledisable + payment/mercadopago_adbpayment_pix/get_document_identification + + + + + + + Minimum amount to pay with Pec. + validate-number validate-zero-or-greater + payment/mercadopago_adbpayment_pix/min_order_total + + + + Maximum amount to pay with Pec. + validate-number validate-zero-or-greater + payment/mercadopago_adbpayment_pix/max_order_total + + + + Countries eligible to use this payment method. + Magento\Directory\Model\Config\Source\Country + payment/mercadopago_adbpayment_pix/specificcountry + + + + Sets up in which order the payment methods will be shown at the Checkout. + validate-number + payment/mercadopago_adbpayment_pix/sort_order + + + + diff --git a/etc/adminhtml/system/checkout_transparent/pse.xml b/etc/adminhtml/system/checkout_transparent/pse.xml new file mode 100644 index 0000000..71420cf --- /dev/null +++ b/etc/adminhtml/system/checkout_transparent/pse.xml @@ -0,0 +1,60 @@ + + + + + + MCO + + + + Magento\Config\Model\Config\Source\Yesno + payment/mercadopago_adbpayment_pse/active + + + + payment/mercadopago_adbpayment_pse/title + + + + Calendar days. + required-entry validate-number + payment/mercadopago_adbpayment_pse/expiration + + + + Activate this option if you want to obtain buyer`s documents details, using an additional field on the payment form. Disable it if your store already gets these details. + + + Magento\Config\Model\Config\Source\Enabledisable + payment/mercadopago_adbpayment_pse/get_document_identification + + + + + + + Minimum amount to pay with Pse. + validate-number validate-zero-or-greater + payment/mercadopago_adbpayment_pse/min_order_total + + + + Maximum amount to pay with Pse. + validate-number validate-zero-or-greater + payment/mercadopago_adbpayment_pse/max_order_total + + + + Countries eligible to use this payment method. + Magento\Directory\Model\Config\Source\Country + payment/mercadopago_adbpayment_pse/specificcountry + + + + Sets up in which order the payment methods will be shown at the Checkout. + validate-number + payment/mercadopago_adbpayment_pse/sort_order + + + + diff --git a/etc/adminhtml/system/checkout_transparent/two_credit_card.xml b/etc/adminhtml/system/checkout_transparent/two_credit_card.xml new file mode 100644 index 0000000..b868619 --- /dev/null +++ b/etc/adminhtml/system/checkout_transparent/two_credit_card.xml @@ -0,0 +1,59 @@ + + + + + + + Magento\Config\Model\Config\Source\Yesno + payment/mercadopago_adbpayment_twocc/active + + + + Payment method title at the store's checkout. + payment/mercadopago_adbpayment_twocc/title + + + + Activate this option if you want to obtain buyer`s documents details, using an additional field on the payment form. Disable it if your store already gets these details. + + + Magento\Config\Model\Config\Source\Enabledisable + payment/mercadopago_adbpayment_twocc/get_document_identification + + + + + + + MercadoPago\AdbPayment\Block\Adminhtml\System\Config\Form\Button + + + + + + + Minimum amount for payment with this payment method. + validate-number validate-zero-or-greater + payment/mercadopago_adbpayment_twocc/min_order_total + + + + Maximum amount for payment with this payment method. + validate-number validate-zero-or-greater + payment/mercadopago_adbpayment_twocc/max_order_total + + + + Countries eligible to use this payment method. + Magento\Directory\Model\Config\Source\Country + payment/mercadopago_adbpayment_twocc/specificcountry + + + + Sets up in which order the payment methods will be shown at the Checkout. + validate-number + payment/mercadopago_adbpayment_twocc/sort_order + + + + diff --git a/etc/adminhtml/system/checkout_transparent/webpay.xml b/etc/adminhtml/system/checkout_transparent/webpay.xml new file mode 100644 index 0000000..ec1893a --- /dev/null +++ b/etc/adminhtml/system/checkout_transparent/webpay.xml @@ -0,0 +1,60 @@ + + + + + + MLC + + + + Magento\Config\Model\Config\Source\Yesno + payment/mercadopago_adbpayment_webpay/active + + + + payment/mercadopago_adbpayment_webpay/title + + + + Calendar days. + required-entry validate-number + payment/mercadopago_adbpayment_webpay/expiration + + + + Activate this option if you want to obtain buyer`s documents details, using an additional field on the payment form. Disable it if your store already gets these details. + + + Magento\Config\Model\Config\Source\Enabledisable + payment/mercadopago_adbpayment_webpay/get_document_identification + + + + + + + Minimum amount to pay with Webpay. + validate-number validate-zero-or-greater + payment/mercadopago_adbpayment_webpay/min_order_total + + + + Maximum amount to pay with Webpay. + validate-number validate-zero-or-greater + payment/mercadopago_adbpayment_webpay/max_order_total + + + + Countries eligible to use this payment method. + Magento\Directory\Model\Config\Source\Country + payment/mercadopago_adbpayment_webpay/specificcountry + + + + Sets up in which order the payment methods will be shown at the Checkout. + validate-number + payment/mercadopago_adbpayment_webpay/sort_order + + + + diff --git a/etc/adminhtml/system/merchant_profile.xml b/etc/adminhtml/system/merchant_profile.xml new file mode 100644 index 0000000..f62f9de --- /dev/null +++ b/etc/adminhtml/system/merchant_profile.xml @@ -0,0 +1,56 @@ + + + + + + + MercadoPago\AdbPayment\Model\Adminhtml\Source\Environment + payment/mercadopago_adbpayment/environment + + + + payment/mercadopago_adbpayment/id_sandbox + + sandbox + + + + + payment/mercadopago_adbpayment/email_sandbox + + sandbox + + + + + payment/mercadopago_adbpayment/name_sandbox + + sandbox + + + + + payment/mercadopago_adbpayment/id_production + + production + + + + + payment/mercadopago_adbpayment/email_production + + production + + + + + payment/mercadopago_adbpayment/name_production + + production + + + + payment/mercadopago_adbpayment/site_id + + + diff --git a/etc/config.xml b/etc/config.xml new file mode 100644 index 0000000..073fe85 --- /dev/null +++ b/etc/config.xml @@ -0,0 +1,350 @@ + + + + + + + 0 + 1 + production + Store Name + + + + + MercadoPagoBaseFacade + pending + authorize + MercadoPago + 1 + 0 + 1 + mercadopago_group + address + 0 + 1 + 3 + 2 + 1 + 1 + + + + 1 + MercadoPagoCcFacade + processing + authorize_capture + Credit or Debit Card + MERCHANT_KEY + mp_payment_id,card_installments,card_finance_cost,card_type,card_number,card_holder_name,card_exp_month,card_exp_year,payer_document_identification,payer_document_type,mp_status,mp_status_detail + mp_payment_id,card_exp_month,card_exp_year,payer_document_type,mp_status,mp_status_detail + 1 + 0 + 0 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 1 + mercadopago_group + visa,master,elo,amex,debmaster,hipercard,debvisa,debelo,cabal,debcabal,cmr,cencosud,diners,tarshop,argencard,naranja,maestro,tengo,sodexo,carnet,toka,mercadopagocard,edenred,redcompra,webpay,magna,presto,codensa,lider,creditel,oca + visa,master,amex,diners,debmaster,debvisa,codensa + visa,master,elo,amex,debmaster,hipercard,debvisa,debelo,cabal,debcabal + visa,master,amex,diners,debmaster,debvisa,redcompra,webpay,magna,presto + visa,master,amex,debmaster,hipercard,debvisa,cabal,debcabal,cmr,cencosud,diners,tarshop,argencard + visa,master,amex,debmaster,hipercard,debvisa,tengo,sodexo,carnet,toka,mercadopagocard,edenred + visa,master,amex,diners,debmaster,debvisa,lider,creditel,oca + visa,master,amex,diners,debmaster,debvisa,mediotest + + + + + + + + + + 1 + 1 + 0 + 1 + 200000 + 1 + AF,AL,DZ,AS,AD,AO,AI,AQ,AG,AR,AM,AW,AU,AT,AX,AZ,BS,BH,BD,BB,BY,BE,BZ,BJ,BM,BL,BT,BO,BQ,BA,BW,BV,BR,IO,VG,BN,BG,BF,BI,KH,CM,CA,CD,CV,KY,CF,TD,CL,CN,CX,CW,CC,CO,KM,CG,CK,CR,HR,CU,CY,CZ,DK,DJ,DM,DO,EC,EG,SV,GQ,ER,EE,ET,FK,FO,FJ,FI,FR,GF,PF,TF,GA,GM,GE,DE,GG,GH,GI,GR,GL,GD,GP,GU,GT,GN,GW,GY,HT,HM,HN,HK,HU,IS,IM,IN,ID,IR,IQ,IE,IL,IT,CI,JE,JM,JP,JO,KZ,KE,KI,KW,KG,LA,LV,LB,LS,LR,LY,LI,LT,LU,ME,MF,MO,MK,MG,MW,MY,MV,ML,MT,MH,MQ,MR,MU,YT,FX,MX,FM,MD,MC,MN,MS,MA,MZ,MM,NA,NR,NP,NL,AN,NC,NZ,NI,NE,NG,NU,NF,KP,MP,NO,OM,PK,PW,PA,PG,PY,PE,PH,PN,PL,PS,PT,PR,QA,RE,RO,RS,RU,RW,SH,KN,LC,PM,VC,WS,SM,ST,SA,SN,SC,SL,SG,SK,SI,SB,SO,ZA,GS,KR,ES,LK,SD,SR,SJ,SZ,SE,CH,SX,SY,TL,TW,TJ,TZ,TH,TG,TK,TO,TT,TN,TR,TM,TC,TV,VI,UG,UA,AE,GB,US,UM,UY,UZ,VU,VA,VE,VN,WF,EH,XK,YE,ZM,ZW,XX + MLB,MLA,MLU,MLM,MCO,MLC,MPE + 10 + + + 1 + MercadoPagoTwoCcFacade + processing + authorize_capture + Pay with two cards + MERCHANT_KEY + mp_payment_id,payment_0_id,card_0_installments,card_0_finance_cost,card_0_type,card_0_number,card_0_holder_name,card_0_exp_month,card_0_exp_year,payer_0_document_identification,payer_0_document_type,mp_0_status,mp_0_status_detail,payment_1_id,card_1_installments,card_1_finance_cost,card_1_type,card_1_number,card_1_holder_name,card_1_exp_month,card_1_exp_year,payer_1_document_identification,payer_1_document_type,mp_1_status,mp_1_status_detail + mp_payment_id,payment_0_id,card_0_exp_month,card_0_exp_year,payer_0_document_type,mp_0_status,mp_0_status_detail,payment_1_id,card_1_exp_month,card_1_exp_year,payer_1_document_type,mp_1_status,mp_1_status_detail + 1 + 0 + 0 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + mercadopago_group + visa,master,elo,amex,debmaster,hipercard,debvisa,debelo,cabal,debcabal,cmr,cencosud,diners,tarshop,argencard,naranja,maestro,tengo,sodexo,carnet,toka,mercadopagocard,edenred,redcompra,webpay,magna,presto,codensa,lider,creditel,oca + visa,master,amex,diners,debmaster,debvisa,codensa + visa,master,elo,amex,debmaster,hipercard,debvisa,debelo,cabal,debcabal + visa,master,amex,diners,debmaster,debvisa,redcompra,webpay,magna,presto + visa,master,amex,debmaster,hipercard,debvisa,cabal,debcabal,cmr,cencosud,diners,tarshop,argencard + visa,master,amex,debmaster,hipercard,debvisa,tengo,sodexo,carnet,toka,mercadopagocard,edenred + visa,master,amex,diners,debmaster,debvisa,lider,creditel,oca + visa,master,amex,diners,debmaster,debvisa,mediotest + + + + + + + + + + 1 + 0 + 1 + 200000 + 1 + AF,AL,DZ,AS,AD,AO,AI,AQ,AG,AR,AM,AW,AU,AT,AX,AZ,BS,BH,BD,BB,BY,BE,BZ,BJ,BM,BL,BT,BO,BQ,BA,BW,BV,BR,IO,VG,BN,BG,BF,BI,KH,CM,CA,CD,CV,KY,CF,TD,CL,CN,CX,CW,CC,CO,KM,CG,CK,CR,HR,CU,CY,CZ,DK,DJ,DM,DO,EC,EG,SV,GQ,ER,EE,ET,FK,FO,FJ,FI,FR,GF,PF,TF,GA,GM,GE,DE,GG,GH,GI,GR,GL,GD,GP,GU,GT,GN,GW,GY,HT,HM,HN,HK,HU,IS,IM,IN,ID,IR,IQ,IE,IL,IT,CI,JE,JM,JP,JO,KZ,KE,KI,KW,KG,LA,LV,LB,LS,LR,LY,LI,LT,LU,ME,MF,MO,MK,MG,MW,MY,MV,ML,MT,MH,MQ,MR,MU,YT,FX,MX,FM,MD,MC,MN,MS,MA,MZ,MM,NA,NR,NP,NL,AN,NC,NZ,NI,NE,NG,NU,NF,KP,MP,NO,OM,PK,PW,PA,PG,PY,PE,PH,PN,PL,PS,PT,PR,QA,RE,RO,RS,RU,RW,SH,KN,LC,PM,VC,WS,SM,ST,SA,SN,SC,SL,SG,SK,SI,SB,SO,ZA,GS,KR,ES,LK,SD,SR,SJ,SZ,SE,CH,SX,SY,TL,TW,TJ,TZ,TH,TG,TK,TO,TT,TN,TR,TM,TC,TV,VI,UG,UA,AE,GB,US,UM,UY,UZ,VU,VA,VE,VN,WF,EH,XK,YE,ZM,ZW,XX + MLB,MLA,MLU,MLM,MCO,MLC,MPE + 10 + + + 1 + MercadoPagoCcVaultFacade + mp_payment_id,card_installments,card_finance_cost,card_type,card_number,card_holder_name,card_exp_month,card_exp_year,payer_document_identification,payer_document_type,mp_status,mp_status_detail + mp_payment_id,card_exp_month,card_exp_year,payer_document_type,mp_status,mp_status_detail + Stored Cards (MercadoPago) + 0 + 0 + 1 + mercadopago_group + + + 1 + MercadoPagoCheckoutProFacade + pending + Checkout Pro + MERCHANT_KEY + payer_first_name,payer_last_name,init_point,date_of_expiration,id,payer_document_type,mp_installments,mp_payment_type_id,mp_payment_id,mp_status,mp_status_detail,payment_0_id,payment_0_type,payment_0_card_number,payment_0_expiration,payment_0_installments,payment_0_total_amount,payment_0_paid_amount,mp_0_status,mp_0_status_detail,payment_1_id,payment_1_type,payment_1_card_number,payment_1_installments,payment_1_total_amount,payment_1_paid_amount,mp_1_status,mp_1_status_detail,payment_1_expiration + mp_payment_id,payer_document_type,mp_status,mp_status_detail,payment_0_id,mp_0_status,mp_0_status_detail,payment_1_id,mp_1_status,mp_1_status_detail + order + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + mercadopago_group + 1 + 1 + security of Mercado Pago.
If you already have an account at Mercado Livre, use the same email and password.
Use your Mercado Pago account balance or saved cards to buy without filling out more details.]]>
+ modal + 12 + #00AEEF + #00AEEF + 1 + 200000 + 1 + AF,AL,DZ,AS,AD,AO,AI,AQ,AG,AR,AM,AW,AU,AT,AX,AZ,BS,BH,BD,BB,BY,BE,BZ,BJ,BM,BL,BT,BO,BQ,BA,BW,BV,BR,IO,VG,BN,BG,BF,BI,KH,CM,CA,CD,CV,KY,CF,TD,CL,CN,CX,CW,CC,CO,KM,CG,CK,CR,HR,CU,CY,CZ,DK,DJ,DM,DO,EC,EG,SV,GQ,ER,EE,ET,FK,FO,FJ,FI,FR,GF,PF,TF,GA,GM,GE,DE,GG,GH,GI,GR,GL,GD,GP,GU,GT,GN,GW,GY,HT,HM,HN,HK,HU,IS,IM,IN,ID,IR,IQ,IE,IL,IT,CI,JE,JM,JP,JO,KZ,KE,KI,KW,KG,LA,LV,LB,LS,LR,LY,LI,LT,LU,ME,MF,MO,MK,MG,MW,MY,MV,ML,MT,MH,MQ,MR,MU,YT,FX,MX,FM,MD,MC,MN,MS,MA,MZ,MM,NA,NR,NP,NL,AN,NC,NZ,NI,NE,NG,NU,NF,KP,MP,NO,OM,PK,PW,PA,PG,PY,PE,PH,PN,PL,PS,PT,PR,QA,RE,RO,RS,RU,RW,SH,KN,LC,PM,VC,WS,SM,ST,SA,SN,SC,SL,SG,SK,SI,SB,SO,ZA,GS,KR,ES,LK,SD,SR,SJ,SZ,SE,CH,SX,SY,TL,TW,TJ,TZ,TH,TG,TK,TO,TT,TN,TR,TM,TC,TV,VI,UG,UA,AE,GB,US,UM,UY,UZ,VU,VA,VE,VN,WF,EH,XK,YE,ZM,ZW,XX + MLB,MLA,MLU,MLM,MCO,MLC,MPE + 12 +
+ + MercadoPagoPaymentMethodsOffFacade + pending + Ticket - MercadoPago + MERCHANT_KEY + mp_payment_id,payer_first_name,payer_last_name,payer_document_identification,barcode,external_resource_url,date_of_expiration,verification_code,financial_institution,payer_document_type,line_code,mp_status,mp_status_detail + mp_payment_id,verification_code,financial_institution,payer_document_type,mp_status,mp_status_detail + order + + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + mercadopago_group + 1 + + 0 + 1 + AF,AL,DZ,AS,AD,AO,AI,AQ,AG,AR,AM,AW,AU,AT,AX,AZ,BS,BH,BD,BB,BY,BE,BZ,BJ,BM,BL,BT,BO,BQ,BA,BW,BV,BR,IO,VG,BN,BG,BF,BI,KH,CM,CA,CD,CV,KY,CF,TD,CL,CN,CX,CW,CC,CO,KM,CG,CK,CR,HR,CU,CY,CZ,DK,DJ,DM,DO,EC,EG,SV,GQ,ER,EE,ET,FK,FO,FJ,FI,FR,GF,PF,TF,GA,GM,GE,DE,GG,GH,GI,GR,GL,GD,GP,GU,GT,GN,GW,GY,HT,HM,HN,HK,HU,IS,IM,IN,ID,IR,IQ,IE,IL,IT,CI,JE,JM,JP,JO,KZ,KE,KI,KW,KG,LA,LV,LB,LS,LR,LY,LI,LT,LU,ME,MF,MO,MK,MG,MW,MY,MV,ML,MT,MH,MQ,MR,MU,YT,FX,MX,FM,MD,MC,MN,MS,MA,MZ,MM,NA,NR,NP,NL,AN,NC,NZ,NI,NE,NG,NU,NF,KP,MP,NO,OM,PK,PW,PA,PG,PY,PE,PH,PN,PL,PS,PT,PR,QA,RE,RO,RS,RU,RW,SH,KN,LC,PM,VC,WS,SM,ST,SA,SN,SC,SL,SG,SK,SI,SB,SO,ZA,GS,KR,ES,LK,SD,SR,SJ,SZ,SE,CH,SX,SY,TL,TW,TJ,TZ,TH,TG,TK,TO,TT,TN,TR,TM,TC,TV,VI,UG,UA,AE,GB,US,UM,UY,UZ,VU,VA,VE,VN,WF,EH,XK,YE,ZM,ZW,XX + 13 + + + MercadoPagoPixFacade + pending + Pix + 30 + MERCHANT_KEY + mp_payment_id,payment_method_id,payer_first_name,payer_last_name,payer_document_identification,qr_code,qr_code_base64,ticket_url,date_of_expiration,payer_document_type,mp_status,mp_status_detail + mp_payment_id,ticket_url,payer_document_type,mp_status,mp_status_detail + order + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + mercadopago_group + 30 + immediate approval.
The payment term is up to %1.
At checkout, you will receive the code to make payment at the bank of your choice (check with your bank for your daily Pix transfer limit).]]>
+ 0 + 1 + 200000 + 1 + BR + MLB + 11 +
+ + MercadoPagoPseFacade + pending + Pse + MERCHANT_KEY + mp_payment_id,payer_first_name,payer_last_name,payer_document_identification,barcode,external_resource_url,date_of_expiration,verification_code,financial_institution,payer_document_type,mp_status,mp_status_detail + mp_payment_id,verification_code,payer_document_type,mp_status,mp_status_detail + order + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + mercadopago_group + 1 + + + 1 + 1 + 340000000 + 1 + CO + MCO + 15 + + + MercadoPagoWebpayFacade + pending + Redcompra Webpay + MERCHANT_KEY + mp_payment_id,payer_first_name,payer_last_name,payer_document_identification,barcode,external_resource_url,date_of_expiration,verification_code,financial_institution,payer_document_type,mp_status,mp_status_detail + mp_payment_id,verification_code,payer_document_type,mp_status,mp_status_detail + order + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + mercadopago_group + 1 + + 1 + 50 + 3000000 + 1 + CL + MLC + 15 + +
+ + + + https://sdk.mercadopago.com/js/v2?source=Magento + + + +
+
diff --git a/etc/cron_groups.xml b/etc/cron_groups.xml new file mode 100644 index 0000000..3663e38 --- /dev/null +++ b/etc/cron_groups.xml @@ -0,0 +1,20 @@ + + + + + 1 + 4 + 2 + 10 + 60 + 600 + 1 + + diff --git a/etc/crontab.xml b/etc/crontab.xml new file mode 100644 index 0000000..addad49 --- /dev/null +++ b/etc/crontab.xml @@ -0,0 +1,31 @@ + + + + + + 0 0 1 * * + + + 0 9 * * * + + + 0 9 * * 1-5 + + + 0 9 * * 1-5 + + + 9 9 * * 1-5 + + + 13 9 * * 1-5 + + + diff --git a/etc/csp_whitelist.xml b/etc/csp_whitelist.xml new file mode 100644 index 0000000..203bfc2 --- /dev/null +++ b/etc/csp_whitelist.xml @@ -0,0 +1,101 @@ + + + + + + + *.mercadopago.com + *.mercadolivre.com + *.mercadolibre.com + *.mercadolibre.com.br + https://mercadopago.com.br + *.mercadopago.com.br + *.mlstatic.com + + + + + *.mercadopago.com + *.mercadolivre.com + *.mercadolibre.com + *.mercadolibre.com.br + https://mercadopago.com.br + *.mercadopago.com.br + *.mlstatic.com + + + + + *.mercadopago.com + *.mercadolivre.com + *.mercadolibre.com + *.mercadolibre.com.br + https://mercadopago.com.br + *.mercadopago.com.br + *.mlstatic.com + + + + + *.mercadopago.com + *.mercadolivre.com + *.mercadolibre.com + *.mercadolibre.com.br + https://mercadopago.com.br + *.mercadopago.com.br + *.mlstatic.com + + + + + *.mercadopago.com + *.mercadolivre.com + *.mercadolibre.com + *.mercadolibre.com.br + https://mercadopago.com.br + *.mercadopago.com.br + *.mlstatic.com + + + + + *.mercadopago.com + *.mercadolivre.com + *.mercadolibre.com + *.mercadolibre.com.br + https://mercadopago.com.br + *.mercadopago.com.br + *.mlstatic.com + + + + + *.mercadopago.com + *.mercadolivre.com + *.mercadolibre.com + *.mercadolibre.com.br + https://mercadopago.com.br + *.mercadopago.com.br + *.mlstatic.com + + + + + *.mercadopago.com + *.mercadolivre.com + *.mercadolibre.com + *.mercadolibre.com.br + https://mercadopago.com.br + *.mercadopago.com.br + *.mlstatic.com + + + + diff --git a/etc/db_schema.xml b/etc/db_schema.xml new file mode 100644 index 0000000..32a1356 --- /dev/null +++ b/etc/db_schema.xml @@ -0,0 +1,43 @@ + + + + + + + + + + + +
+ + + + + +
+ + + +
+ + + + + +
+ + + + + +
+
diff --git a/etc/db_schema_whitelist.json b/etc/db_schema_whitelist.json new file mode 100644 index 0000000..26ad021 --- /dev/null +++ b/etc/db_schema_whitelist.json @@ -0,0 +1,43 @@ +{ + "sales_order": { + "column": { + "ext_order_id": true, + "finance_cost_amount": true, + "base_finance_cost_amount": true, + "finance_cost_amount_invoiced": true, + "base_finance_cost_amount_invoiced": true, + "finance_cost_amount_refunded": true, + "base_finance_cost_amount_refunded": true + } + }, + "quote": { + "column": { + "finance_cost_amount": true, + "base_finance_cost_amount": true, + "first_card_amount": true, + "second_card_amount": true + } + }, + "quote_address": { + "column": { + "discount_coupon_amount": true, + "base_discount_coupon_amount": true + } + }, + "sales_invoice": { + "column": { + "finance_cost_amount": true, + "base_finance_cost_amount": true, + "finance_cost_amount_invoiced": true, + "base_finance_cost_amount_invoiced": true + } + }, + "sales_creditmemo": { + "column": { + "finance_cost_amount": true, + "base_finance_cost_amount": true, + "finance_cost_amount_refund": true, + "base_finance_cost_amount_refund": true + } + } +} \ No newline at end of file diff --git a/etc/di.xml b/etc/di.xml new file mode 100644 index 0000000..1cc2dd6 --- /dev/null +++ b/etc/di.xml @@ -0,0 +1,1783 @@ + + + + + + + + + + + + + + + + MercadoPago\AdbPayment\Console\Command\Adminstrative\FetchMerchantInfo + MercadoPago\AdbPayment\Console\Command\Adminstrative\PaymentExpirations + MercadoPago\AdbPayment\Console\Command\Notification\FetchOrderStatus + MercadoPago\AdbPayment\Console\Command\Notification\CheckoutProAddChild + + + + + + + + + + + + + + + + + + + + 0 + 1 + 0 + 1 + + + + + + + Magento\Framework\Url + + + + + + Magento\Framework\Url + + + + + + Magento\Framework\Url + + + + + + + + + + + MercadoPago\AdbPayment\Model\Ui\ConfigProviderBase::CODE + MercadoPago\AdbPayment\Block\Sales\Form\Card + MercadoPago\AdbPayment\Block\Sales\Info\Card + MercadoPagoValueHandlerPool + MercadoPagoCcCommandPool + + + + + + + MercadoPago\AdbPayment\Model\Ui\ConfigProviderCc::CODE + MercadoPago\AdbPayment\Block\Sales\Form\Card + MercadoPago\AdbPayment\Block\Sales\Info\Card + MercadoPagoCcValueHandlerPool + MercadoPagoCcValidatorPool + MercadoPagoCcCommandPool + + + + + + + MercadoPago\AdbPayment\Model\Ui\ConfigProviderTwoCc::CODE + MercadoPago\AdbPayment\Block\Sales\Form\Card + MercadoPago\AdbPayment\Block\Sales\Info\TwoCc + MercadoPagoTwoCcValueHandlerPool + MercadoPagoTwoCcValidatorPool + MercadoPagoTwoCcCommandPool + + + + + + + MercadoPago\AdbPayment\Model\Ui\ConfigProviderCc::VAULT_CODE + MercadoPagoVaultPaymentConfig + MercadoPagoVaultPaymentValueHandlerPool + MercadoPagoCcValidatorPool + MercadoPagoCcFacade + MercadoPagoCcCommandPool + + + + + + + MercadoPago\AdbPayment\Model\Ui\ConfigProviderCheckoutPro::CODE + MercadoPago\AdbPayment\Block\Sales\Form\CheckoutPro + MercadoPago\AdbPayment\Block\Sales\Info\CheckoutPro + MercadoPagoCheckoutProValueHandlerPool + MercadoPagoCheckoutProValidatorPool + MercadoPagoCheckoutProCommandPool + + + + + + + MercadoPago\AdbPayment\Model\Ui\ConfigProviderPaymentMethodsOff::CODE + MercadoPago\AdbPayment\Block\Sales\Form\PaymentMethodsOff + MercadoPago\AdbPayment\Block\Sales\Info\PaymentMethodsOff + MercadoPagoPaymentMethodsOffValueHandlerPool + MercadoPagoPaymentMethodsOffValidatorPool + MercadoPagoPaymentMethodsOffCommandPool + + + + + + + MercadoPago\AdbPayment\Model\Ui\ConfigProviderPix::CODE + MercadoPago\AdbPayment\Block\Sales\Form\Pix + MercadoPago\AdbPayment\Block\Sales\Info\Pix + MercadoPagoPixValueHandlerPool + MercadoPagoPixValidatorPool + MercadoPagoPixCommandPool + + + + + + + MercadoPago\AdbPayment\Model\Ui\ConfigProviderPse::CODE + MercadoPago\AdbPayment\Block\Sales\Form\Pse + MercadoPago\AdbPayment\Block\Sales\Info\Pse + MercadoPagoPseValueHandlerPool + MercadoPagoPseValidatorPool + MercadoPagoBankTransferCommandPool + + + + + + + MercadoPago\AdbPayment\Model\Ui\ConfigProviderWebpay::CODE + MercadoPago\AdbPayment\Block\Sales\Form\Webpay + MercadoPago\AdbPayment\Block\Sales\Info\Webpay + MercadoPagoWebpayValueHandlerPool + MercadoPagoWebpayValidatorPool + MercadoPagoBankTransferCommandPool + + + + + + + + MercadoPagoCcCommandManager + MercadoPagoTwoCcCommandManager + MercadoPagoCcCommandManager + MercadoPagoCheckoutProCommandManager + MercadoPagoPaymentMethodsOffCommandManager + MercadoPagoPixCommandManager + MercadoPagoPseCommandManager + MercadoPagoWebpayCommandManager + + + + + + + + + + + + + MercadoPago\AdbPayment\Gateway\Config\ConfigPaymentMethodsOff + + + + + + + MercadoPagoPaymentMethodsOffCountryValidator + + + + + + + + MercadoPago\AdbPayment\Gateway\Config\ConfigCc + + + + + + + MercadoPagoCcCountryValidator + + + + + + + + MercadoPago\AdbPayment\Gateway\Config\ConfigTwoCc + + + + + + + MercadoPagoTwoCcCountryValidator + + + + + + + + MercadoPago\AdbPayment\Gateway\Config\ConfigCheckoutPro + + + + + + + MercadoPagoCheckoutProCountryValidator + + + + + + + + MercadoPago\AdbPayment\Gateway\Config\ConfigPix + + + + + + + MercadoPagoPixCountryValidator + + + + + + + + MercadoPago\AdbPayment\Gateway\Config\ConfigPse + + + + + + + MercadoPagoPseCountryValidator + + + + + + + + MercadoPago\AdbPayment\Gateway\Config\ConfigWebpay + + + + + + + MercadoPagoWebpayCountryValidator + + + + + + + + \MercadoPago\AdbPayment\Model\Ui\ConfigProviderBase::CODE + + + + + + \MercadoPago\AdbPayment\Model\Ui\ConfigProviderCc::CODE + + + + + + \MercadoPago\AdbPayment\Model\Ui\ConfigProviderTwoCc::CODE + + + + + + \MercadoPago\AdbPayment\Model\Ui\ConfigProviderCc::VAULT_CODE + + + + + + \MercadoPago\AdbPayment\Model\Ui\ConfigProviderCheckoutPro::CODE + + + + + + \MercadoPago\AdbPayment\Model\Ui\ConfigProviderPaymentMethodsOff::CODE + + + + + + \MercadoPago\AdbPayment\Model\Ui\ConfigProviderPix::CODE + + + + + + \MercadoPago\AdbPayment\Model\Ui\ConfigProviderPse::CODE + + + + + + \MercadoPago\AdbPayment\Model\Ui\ConfigProviderWebpay::CODE + + + + + + + MercadoPagoCcConfig + + + + + + MercadoPagoCheckoutProConfig + + + + + + MercadoPagoPaymentMethodsOffConfig + + + + + + MercadoPagoPixConfig + + + + + + MercadoPagoPseConfig + + + + + + MercadoPagoWebpayConfig + + + + + + MercadoPagoTwoCcConfig + + + + + + + + MercadoPagoCheckoutProOrderCommand + MercadoPagoRefundCommand + MercadoPagoCheckoutProFetchCommand + MercadoPagoCheckoutProCancelPaymentCommand + MercadoPagoCheckoutProVoidPaymentCommand + MercadoPagoCheckoutProCaptureCommand + + + + + + + + MercadoPagoCheckoutProCommandPool + MercadoPagoBaseFetchRequest + MercadoPagoFetchResponseHandlerComposite + MercadoPago\AdbPayment\Gateway\Http\TransferFactory + MercadoPago\AdbPayment\Gateway\Http\Client\FetchPaymentClient + MercadoPagoTransactionValidator + MercadoPagoVirtualErrorMessageMapper + + + + + + + MercadoPagoCheckoutProCommandPool + MercadoPagoCheckoutProOrderRequest + MercadoPagoCheckoutProOrderResponseHandlerComposite + MercadoPago\AdbPayment\Gateway\Http\TransferFactory + MercadoPago\AdbPayment\Gateway\Http\Client\CreateOrderPaymentCheckoutProClient + MercadoPagoTransactionValidator + MercadoPagoVirtualErrorMessageMapper + + + + + + + + MercadoPago\AdbPayment\Gateway\Request\StoreIdDataRequest + MercadoPago\AdbPayment\Gateway\Request\CheckoutProNotificationUrlDataRequest + MercadoPago\AdbPayment\Gateway\Request\ExternalReferenceDataRequest + MercadoPago\AdbPayment\Gateway\Request\BinaryModeDataRequest + MercadoPago\AdbPayment\Gateway\Request\DescriptionDataRequest + MercadoPago\AdbPayment\Gateway\Request\BackUrlsDataRequest + MercadoPago\AdbPayment\Gateway\Request\ExcludedCheckoutProDataRequest + MercadoPago\AdbPayment\Gateway\Request\InstallmentsCheckoutProDataRequest + MercadoPago\AdbPayment\Gateway\Request\TracksCheckoutProDataRequest + MercadoPago\AdbPayment\Gateway\Request\TransactionAmountDataRequest + MercadoPago\AdbPayment\Gateway\Request\ItemsAndDatailsCostDataRequest + MercadoPago\AdbPayment\Gateway\Request\PayerDataRequest + MercadoPago\AdbPayment\Gateway\Request\PayerCheckoutProDataRequest + MercadoPago\AdbPayment\Gateway\Request\DocumentIdentificationDataRequest + MercadoPago\AdbPayment\Gateway\Request\BillingAddressDataRequest + MercadoPago\AdbPayment\Gateway\Request\ShippingsDataRequest + MercadoPago\AdbPayment\Gateway\Request\MetadataPaymentDataRequest + MercadoPago\AdbPayment\Gateway\Request\MetadataPaymentCheckoutProDataRequest + MercadoPago\AdbPayment\Gateway\Request\CheckoutProPaymentDataRequest + + + + + + + + + MercadoPago\AdbPayment\Gateway\Response\ExtOrdIdHandler + MercadoPago\AdbPayment\Gateway\Response\TxnIdCheckoutProHandler + + + + + + + + + MercadoPagoPaymentMethodsOffOrderCommand + MercadoPagoRefundCommand + MercadoPagoPaymentMethodsOffFetchCommand + MercadoPagoPaymentMethodsOffCancelPaymentCommand + MercadoPagoPaymentMethodsOffVoidPaymentCommand + MercadoPagoPaymentMethodsOffCaptureCommand + + + + + + + + MercadoPagoPaymentMethodsOffCommandPool + MercadoPagoPaymentMethodsOffOrderRequest + MercadoPagoPaymentMethodsOffOrderResponseHandlerComposite + MercadoPago\AdbPayment\Gateway\Http\TransferFactory + MercadoPago\AdbPayment\Gateway\Http\Client\CreateOrderPaymentCustomClient + MercadoPagoTransactionValidator + MercadoPagoVirtualErrorMessageMapper + + + + + + + + MercadoPago\AdbPayment\Gateway\Request\StoreIdDataRequest + MercadoPago\AdbPayment\Gateway\Request\NotificationUrlDataRequest + MercadoPago\AdbPayment\Gateway\Request\ExternalReferenceDataRequest + MercadoPago\AdbPayment\Gateway\Request\DescriptionDataRequest + MercadoPago\AdbPayment\Gateway\Request\TransactionAmountDataRequest + MercadoPago\AdbPayment\Gateway\Request\PayerDataRequest + MercadoPago\AdbPayment\Gateway\Request\DocumentIdentificationDataRequest + MercadoPago\AdbPayment\Gateway\Request\BillingAddressDataRequest + MercadoPago\AdbPayment\Gateway\Request\AdditionalInfoDataRequest + MercadoPago\AdbPayment\Gateway\Request\AdditionalInfoItemsDataRequest + MercadoPago\AdbPayment\Gateway\Request\AdditionalInfoPayerDataRequest + MercadoPago\AdbPayment\Gateway\Request\AdditionalInfoShippingsDataRequest + MercadoPago\AdbPayment\Gateway\Request\MetadataPaymentDataRequest + MercadoPago\AdbPayment\Gateway\Request\MetadataPaymentMethodsOffDataRequest + MercadoPago\AdbPayment\Gateway\Request\PaymentMethodsOffDataRequest + + + + + + + + + MercadoPago\AdbPayment\Gateway\Response\ExtOrdIdHandler + MercadoPago\AdbPayment\Gateway\Response\TxnIdPaymentMethodsOffHandler + + + + + + + + + MercadoPagoBankTransferOrderCommand + MercadoPagoRefundCommand + MercadoPagoBankTransferFetchCommand + MercadoPagoBankTransferCancelPaymentCommand + MercadoPagoBankTransferVoidPaymentCommand + MercadoPagoBankTransferCaptureCommand + + + + + + + + MercadoPagoBankTransferCommandPool + MercadoPagoBankTransferOrderRequest + MercadoPagoBankTransferOrderResponseHandlerComposite + MercadoPago\AdbPayment\Gateway\Http\TransferFactory + MercadoPago\AdbPayment\Gateway\Http\Client\CreateOrderPaymentCustomClient + MercadoPagoTransactionValidator + MercadoPagoVirtualErrorMessageMapper + + + + + + + + MercadoPago\AdbPayment\Gateway\Request\StoreIdDataRequest + MercadoPago\AdbPayment\Gateway\Request\NotificationUrlDataRequest + MercadoPago\AdbPayment\Gateway\Request\ExternalReferenceDataRequest + MercadoPago\AdbPayment\Gateway\Request\DescriptionDataRequest + MercadoPago\AdbPayment\Gateway\Request\TransactionAmountDataRequest + MercadoPago\AdbPayment\Gateway\Request\PayerDataRequest + MercadoPago\AdbPayment\Gateway\Request\DocumentIdentificationDataRequest + MercadoPago\AdbPayment\Gateway\Request\BillingAddressDataRequest + MercadoPago\AdbPayment\Gateway\Request\AdditionalInfoDataRequest + MercadoPago\AdbPayment\Gateway\Request\AdditionalInfoIpDataRequest + MercadoPago\AdbPayment\Gateway\Request\AdditionalInfoItemsDataRequest + MercadoPago\AdbPayment\Gateway\Request\AdditionalInfoPayerDataRequest + MercadoPago\AdbPayment\Gateway\Request\AdditionalInfoShippingsDataRequest + MercadoPago\AdbPayment\Gateway\Request\MetadataPaymentDataRequest + MercadoPago\AdbPayment\Gateway\Request\MetadataPaymentBankTransfDataRequest + MercadoPago\AdbPayment\Gateway\Request\BankTransferPaymentDataRequest + MercadoPago\AdbPayment\Gateway\Request\BankTransDetailsDataRequest + + + + + + + + + MercadoPago\AdbPayment\Gateway\Response\ExtOrdIdHandler + MercadoPago\AdbPayment\Gateway\Response\TxnIdBankTransferHandler + + + + + + + + + MercadoPagoPixOrderCommand + MercadoPagoRefundCommand + MercadoPagoPixCancelPaymentCommand + MercadoPagoPixFetchCommand + MercadoPagoPixVoidPaymentCommand + MercadoPagoPixCaptureCommand + + + + + + + + MercadoPagoPixCommandPool + MercadoPagoPixOrderRequest + MercadoPagoPixOrderResponseHandlerComposite + MercadoPago\AdbPayment\Gateway\Http\TransferFactory + MercadoPago\AdbPayment\Gateway\Http\Client\CreateOrderPaymentCustomClient + MercadoPagoTransactionValidator + MercadoPagoVirtualErrorMessageMapper + + + + + + + + MercadoPago\AdbPayment\Gateway\Request\StoreIdDataRequest + MercadoPago\AdbPayment\Gateway\Request\NotificationUrlDataRequest + MercadoPago\AdbPayment\Gateway\Request\ExternalReferenceDataRequest + MercadoPago\AdbPayment\Gateway\Request\DescriptionDataRequest + MercadoPago\AdbPayment\Gateway\Request\TransactionAmountDataRequest + MercadoPago\AdbPayment\Gateway\Request\PayerDataRequest + MercadoPago\AdbPayment\Gateway\Request\DocumentIdentificationDataRequest + MercadoPago\AdbPayment\Gateway\Request\BillingAddressDataRequest + MercadoPago\AdbPayment\Gateway\Request\AdditionalInfoDataRequest + MercadoPago\AdbPayment\Gateway\Request\AdditionalInfoItemsDataRequest + MercadoPago\AdbPayment\Gateway\Request\AdditionalInfoPayerDataRequest + MercadoPago\AdbPayment\Gateway\Request\AdditionalInfoShippingsDataRequest + MercadoPago\AdbPayment\Gateway\Request\MetadataPaymentDataRequest + MercadoPago\AdbPayment\Gateway\Request\MetadataPaymentPixDataRequest + MercadoPago\AdbPayment\Gateway\Request\PointOfInteractionPaymentDataRequest + MercadoPago\AdbPayment\Gateway\Request\PixPaymentDataRequest + + + + + + + + + MercadoPago\AdbPayment\Gateway\Response\ExtOrdIdHandler + MercadoPago\AdbPayment\Gateway\Response\TxnIdPixHandler + + + + + + + + + MercadoPagoInitializeCcCommand + MercadoPagoAuthorizeCcCommand + MercadoPagoCaptureCcCommand + MercadoPagoRefundCommand + MercadoPagoDenyPaymentCommand + MercadoPagoDenyPaymentCommand + MercadoPagoAcceptPaymentCommand + MercadoPagoDenyPaymentCommand + MercadoPagoCcVaultInitializeCommand + MercadoPagoCcVaultAuthorizeCommand + MercadoPagoCcVaultCaptureCommand + MercadoPagoCcVaultCaptureCommand + MercadoPagoCcFetchCommand + + + + + + + + MercadoPagoCcCommandPool + MercadoPagoCcAuthorizationRequest + MercadoPagoInitializeResponseHandlerComposite + MercadoPago\AdbPayment\Gateway\Http\TransferFactory + MercadoPago\AdbPayment\Gateway\Http\Client\CreateOrderPaymentCustomClient + MercadoPagoTransactionValidator + MercadoPagoVirtualErrorMessageMapper + + + + + + + MercadoPagoCcCommandPool + MercadoPagoCcVaultRequest + MercadoPagoInitializeResponseHandlerComposite + MercadoPago\AdbPayment\Gateway\Http\TransferFactory + MercadoPago\AdbPayment\Gateway\Http\Client\CreateOrderPaymentCustomClient + MercadoPagoTransactionValidator + MercadoPagoVirtualErrorMessageMapper + + + + + + + + MercadoPago\AdbPayment\Gateway\Response\ExtOrdIdHandler + MercadoPago\AdbPayment\Gateway\Response\TxnIdCcHandler + MercadoPago\AdbPayment\Gateway\Response\CcTransactionInitializeHandler + MercadoPago\AdbPayment\Gateway\Response\VaultDetailsHandler + + + + + + + + MercadoPagoCcCommandPool + MercadoPagoBaseFetchRequest + MercadoPagoFetchResponseHandlerComposite + MercadoPago\AdbPayment\Gateway\Http\TransferFactory + MercadoPago\AdbPayment\Gateway\Http\Client\FetchPaymentClient + MercadoPagoTransactionValidator + MercadoPagoVirtualErrorMessageMapper + + + + + + + + MercadoPago\AdbPayment\Gateway\Request\StoreIdDataRequest + MercadoPago\AdbPayment\Gateway\Request\NotificationUrlDataRequest + MercadoPago\AdbPayment\Gateway\Request\ExternalReferenceDataRequest + MercadoPago\AdbPayment\Gateway\Request\DescriptionDataRequest + MercadoPago\AdbPayment\Gateway\Request\TransactionAmountDataRequest + MercadoPago\AdbPayment\Gateway\Request\PayerDataRequest + MercadoPago\AdbPayment\Gateway\Request\DocumentIdentificationDataRequest + MercadoPago\AdbPayment\Gateway\Request\BillingAddressDataRequest + MercadoPago\AdbPayment\Gateway\Request\AdditionalInfoDataRequest + MercadoPago\AdbPayment\Gateway\Request\AdditionalInfoItemsDataRequest + MercadoPago\AdbPayment\Gateway\Request\AdditionalInfoPayerDataRequest + MercadoPago\AdbPayment\Gateway\Request\AdditionalInfoShippingsDataRequest + MercadoPago\AdbPayment\Gateway\Request\MetadataPaymentDataRequest + MercadoPago\AdbPayment\Gateway\Request\MetadataPaymentCcDataRequest + MercadoPago\AdbPayment\Gateway\Request\CcPaymentDataRequest + MercadoPago\AdbPayment\Gateway\Request\CaptureAmountRequest + + + + + + + + + MercadoPagoInitializeTwoCcCommand + MercadoPagoCaptureTwoCcCommand + MercadoPagoRefundCommandTwoCc + MercadoPagoDenyPaymentCommand + MercadoPagoDenyPaymentCommand + MercadoPagoAcceptPaymentCommand + MercadoPagoDenyPaymentCommand + MercadoPagoCcVaultInitializeCommand + MercadoPagoCcVaultAuthorizeCommand + MercadoPagoCcVaultCaptureCommand + MercadoPagoCcVaultCaptureCommand + MercadoPagoCcFetchCommand + + + + + + + + MercadoPagoTwoCcCommandPool + MercadoPagoTwoCcAuthorizationRequest + MercadoPagoTwoCcInitializeResponseHandlerComposite + MercadoPago\AdbPayment\Gateway\Http\TransferFactory + MercadoPago\AdbPayment\Gateway\Http\Client\CreateOrderPaymentCustomClient + MercadoPagoTransactionValidator + MercadoPagoVirtualErrorMessageMapper + + + + + + + + MercadoPago\AdbPayment\Gateway\Response\ExtOrdIdHandler + MercadoPago\AdbPayment\Gateway\Response\TxnIdCcHandler + MercadoPago\AdbPayment\Gateway\Response\CcTransactionInitializeHandler + + + + + + + + + MercadoPago\AdbPayment\Gateway\Request\StoreIdDataRequest + MercadoPago\AdbPayment\Gateway\Request\NotificationUrlDataRequest + MercadoPago\AdbPayment\Gateway\Request\ExternalReferenceDataRequest + MercadoPago\AdbPayment\Gateway\Request\DescriptionDataRequest + MercadoPago\AdbPayment\Gateway\Request\TransactionAmountDataRequest + MercadoPago\AdbPayment\Gateway\Request\PayerDataRequest + MercadoPago\AdbPayment\Gateway\Request\DocumentIdentificationDataRequest + MercadoPago\AdbPayment\Gateway\Request\BillingAddressDataRequest + MercadoPago\AdbPayment\Gateway\Request\AdditionalInfoDataRequest + MercadoPago\AdbPayment\Gateway\Request\AdditionalInfoItemsDataRequest + MercadoPago\AdbPayment\Gateway\Request\AdditionalInfoPayerDataRequest + MercadoPago\AdbPayment\Gateway\Request\AdditionalInfoShippingsDataRequest + MercadoPago\AdbPayment\Gateway\Request\MetadataPaymentDataRequest + MercadoPago\AdbPayment\Gateway\Request\MetadataPaymentCcDataRequest + MercadoPago\AdbPayment\Gateway\Request\TwoCcPaymentDataRequest + MercadoPago\AdbPayment\Gateway\Request\TransactionInfoDataRequest + + + + + + + + MercadoPagoTwoCcCommandPool + MercadoPagoTwoCcAuthorizationRequest + MercadoPagoTwoCcAuthorizationResponseHandlerComposite + MercadoPago\AdbPayment\Gateway\Http\TransferFactory + MercadoPago\AdbPayment\Gateway\Http\Client\CreateOrderPaymentCustomClient + MercadoPagoTransactionValidator + MercadoPagoVirtualErrorMessageMapper + + + + + + + + MercadoPago\AdbPayment\Gateway\Response\ExtOrdIdHandler + MercadoPago\AdbPayment\Gateway\Response\TxnIdTwoCcHandler + MercadoPago\AdbPayment\Gateway\Response\TwoCcTransactionAuthorizationHandler + + + + + + + + MercadoPagoTwoCcCommandPool + MercadoPagoTwoCcAuthorizationRequest + MercadoPagoTwoCcCaptureResponseHandlerComposite + MercadoPago\AdbPayment\Gateway\Http\TransferFactory + MercadoPago\AdbPayment\Gateway\Http\Client\CreateOrderPaymentCustomClient + MercadoPagoTransactionValidator + MercadoPagoVirtualErrorMessageMapper + + + + + + + + MercadoPago\AdbPayment\Gateway\Response\ExtOrdIdHandler + MercadoPago\AdbPayment\Gateway\Response\TxnIdTwoCcHandler + MercadoPago\AdbPayment\Gateway\Response\TwoCcTransactionAuthorizationHandler + + + + + + + + MercadoPagoCcCommandPool + MercadoPagoCcAuthorizationRequest + MercadoPagoAuthorizationResponseHandlerComposite + MercadoPago\AdbPayment\Gateway\Http\TransferFactory + MercadoPago\AdbPayment\Gateway\Http\Client\CreateOrderPaymentCustomClient + MercadoPagoTransactionValidator + MercadoPagoVirtualErrorMessageMapper + + + + + + + + MercadoPago\AdbPayment\Gateway\Response\ExtOrdIdHandler + MercadoPago\AdbPayment\Gateway\Response\TxnIdCcHandler + MercadoPago\AdbPayment\Gateway\Response\CcTransactionAuthorizationHandler + MercadoPago\AdbPayment\Gateway\Response\VaultDetailsHandler + + + + + + + + MercadoPagoCcCommandPool + MercadoPagoCcAuthorizationRequest + MercadoPagoCaptureResponseHandlerComposite + MercadoPago\AdbPayment\Gateway\Http\TransferFactory + MercadoPago\AdbPayment\Gateway\Http\Client\CapturePaymentClient + MercadoPagoTransactionValidator + MercadoPagoVirtualErrorMessageMapper + + + + + + + + MercadoPago\AdbPayment\Gateway\Response\ExtOrdIdHandler + MercadoPago\AdbPayment\Gateway\Response\TxnIdCcHandler + MercadoPago\AdbPayment\Gateway\Response\CcTransactionCaptureHandler + MercadoPago\AdbPayment\Gateway\Response\VaultDetailsHandler + + + + + + + + MercadoPagoCcCommandPool + MercadoPagoCcVaultRequest + MercadoPagoCcVaultCaptureResponseHandlerComposite + MercadoPago\AdbPayment\Gateway\Http\TransferFactory + MercadoPago\AdbPayment\Gateway\Http\Client\CreateOrderPaymentCustomClient + MercadoPagoTransactionValidator + MercadoPagoVirtualErrorMessageMapper + + + + + + + MercadoPagoCcCommandPool + MercadoPagoCcVaultRequest + MercadoPagoCcVaultAuthorizeResponseHandlerComposite + MercadoPago\AdbPayment\Gateway\Http\TransferFactory + MercadoPago\AdbPayment\Gateway\Http\Client\CreateOrderPaymentCustomClient + MercadoPagoTransactionValidator + MercadoPagoVirtualErrorMessageMapper + + + + + + + + MercadoPago\AdbPayment\Gateway\Request\StoreIdDataRequest + MercadoPago\AdbPayment\Gateway\Request\NotificationUrlDataRequest + MercadoPago\AdbPayment\Gateway\Request\ExternalReferenceDataRequest + MercadoPago\AdbPayment\Gateway\Request\DescriptionDataRequest + MercadoPago\AdbPayment\Gateway\Request\TransactionAmountDataRequest + MercadoPago\AdbPayment\Gateway\Request\PayerDataRequest + MercadoPago\AdbPayment\Gateway\Request\DocumentIdentificationDataRequest + MercadoPago\AdbPayment\Gateway\Request\BillingAddressDataRequest + MercadoPago\AdbPayment\Gateway\Request\AdditionalInfoDataRequest + MercadoPago\AdbPayment\Gateway\Request\AdditionalInfoItemsDataRequest + MercadoPago\AdbPayment\Gateway\Request\AdditionalInfoPayerDataRequest + MercadoPago\AdbPayment\Gateway\Request\AdditionalInfoShippingsDataRequest + MercadoPago\AdbPayment\Gateway\Request\MetadataPaymentDataRequest + MercadoPago\AdbPayment\Gateway\Request\MetadataPaymentCcDataRequest + MercadoPago\AdbPayment\Gateway\Request\CcVaultPaymentDataRequest + + + + + + + + + MercadoPago\AdbPayment\Gateway\Response\ExtOrdIdHandler + MercadoPago\AdbPayment\Gateway\Response\TxnIdCcHandler + MercadoPago\AdbPayment\Gateway\Response\CcTransactionAuthorizationHandler + + + + + + + + + MercadoPago\AdbPayment\Gateway\Response\ExtOrdIdHandler + MercadoPago\AdbPayment\Gateway\Response\TxnIdCcHandler + MercadoPago\AdbPayment\Gateway\Response\CcTransactionCaptureHandler + + + + + + + + MercadoPagoPaymentMethodsOffCommandPool + MercadoPagoBaseFetchRequest + MercadoPagoFetchResponseHandlerComposite + MercadoPago\AdbPayment\Gateway\Http\TransferFactory + MercadoPago\AdbPayment\Gateway\Http\Client\FetchPaymentClient + MercadoPagoTransactionValidator + MercadoPagoVirtualErrorMessageMapper + + + + + + + MercadoPagoBankTransferCommandPool + MercadoPagoBaseFetchRequest + MercadoPagoFetchResponseHandlerComposite + MercadoPago\AdbPayment\Gateway\Http\TransferFactory + MercadoPago\AdbPayment\Gateway\Http\Client\FetchPaymentClient + MercadoPagoTransactionValidator + MercadoPagoVirtualErrorMessageMapper + + + + + + + + MercadoPago\AdbPayment\Gateway\Request\StoreIdDataRequest + MercadoPago\AdbPayment\Gateway\Request\NotificationIdDataRequest + MercadoPago\AdbPayment\Gateway\Request\ExtPaymentIdDataRequest + + + + + + + + + MercadoPago\AdbPayment\Gateway\Response\FetchPaymentHandler + + + + + + + + MercadoPagoPaymentMethodsOffCommandPool + MercadoPagoBaseVoidRequest + MercadoPagoVoidResponseHandlerComposite + MercadoPago\AdbPayment\Gateway\Http\TransferFactory + MercadoPago\AdbPayment\Gateway\Http\Client\CancelPaymentClient + MercadoPagoTransactionValidator + MercadoPagoVirtualErrorMessageMapper + + + + + + MercadoPagoBankTransferCommandPool + MercadoPagoBaseVoidRequest + MercadoPagoVoidResponseHandlerComposite + MercadoPago\AdbPayment\Gateway\Http\TransferFactory + MercadoPago\AdbPayment\Gateway\Http\Client\CancelPaymentClient + MercadoPagoTransactionValidator + MercadoPagoVirtualErrorMessageMapper + + + + + + MercadoPagoCheckoutProCommandPool + MercadoPagoBaseVoidRequest + MercadoPagoVoidResponseHandlerComposite + MercadoPago\AdbPayment\Gateway\Http\TransferFactory + MercadoPago\AdbPayment\Gateway\Http\Client\CancelPaymentClient + MercadoPagoTransactionValidator + MercadoPagoVirtualErrorMessageMapper + + + + + + + MercadoPagoPaymentMethodsOffCommandPool + MercadoPagoBaseVoidRequest + MercadoPagoVoidResponseHandlerComposite + MercadoPago\AdbPayment\Gateway\Http\TransferFactory + MercadoPago\AdbPayment\Gateway\Http\Client\FetchPaymentClient + MercadoPagoTransactionValidator + MercadoPagoVirtualErrorMessageMapper + + + + + + MercadoPagoBankTransferCommandPool + MercadoPagoBaseVoidRequest + MercadoPagoVoidResponseHandlerComposite + MercadoPago\AdbPayment\Gateway\Http\TransferFactory + MercadoPago\AdbPayment\Gateway\Http\Client\FetchPaymentClient + MercadoPagoTransactionValidator + MercadoPagoVirtualErrorMessageMapper + + + + + + MercadoPagoCheckoutProCommandPool + MercadoPagoBaseVoidRequest + MercadoPagoVoidResponseHandlerComposite + MercadoPago\AdbPayment\Gateway\Http\TransferFactory + MercadoPago\AdbPayment\Gateway\Http\Client\FetchPaymentClient + MercadoPagoTransactionValidator + MercadoPagoVirtualErrorMessageMapper + + + + + + + + MercadoPago\AdbPayment\Gateway\Request\StoreIdDataRequest + MercadoPago\AdbPayment\Gateway\Request\ExtPaymentIdDataRequest + + + + + + + + + MercadoPago\AdbPayment\Gateway\Response\VoidPaymentHandler + + + + + + + + MercadoPagoPaymentMethodsOffCommandPool + MercadoPagoCaptureRequest + MercadoPagoBaseCaptureResponseHandlerComposite + MercadoPago\AdbPayment\Gateway\Http\TransferFactory + MercadoPago\AdbPayment\Gateway\Http\Client\FetchPaymentClient + MercadoPagoTransactionValidator + MercadoPagoVirtualErrorMessageMapper + + + + + + MercadoPagoBankTransferCommandPool + MercadoPagoCaptureRequest + MercadoPagoBaseCaptureResponseHandlerComposite + MercadoPago\AdbPayment\Gateway\Http\TransferFactory + MercadoPago\AdbPayment\Gateway\Http\Client\FetchPaymentClient + MercadoPagoTransactionValidator + MercadoPagoVirtualErrorMessageMapper + + + + + + MercadoPagoCheckoutProCommandPool + MercadoPagoCaptureRequest + MercadoPagoBaseCaptureResponseHandlerComposite + MercadoPago\AdbPayment\Gateway\Http\TransferFactory + MercadoPago\AdbPayment\Gateway\Http\Client\FetchPaymentClient + MercadoPagoTransactionValidator + MercadoPagoVirtualErrorMessageMapper + + + + + + + + MercadoPago\AdbPayment\Gateway\Request\StoreIdDataRequest + MercadoPago\AdbPayment\Gateway\Request\NotificationIdDataRequest + MercadoPago\AdbPayment\Gateway\Request\ExtPaymentIdDataRequest + + + + + + + + + MercadoPago\AdbPayment\Gateway\Response\CapturePaymentHandler + + + + + + + + MercadoPagoPixCommandPool + MercadoPagoBaseFetchRequest + MercadoPagoFetchResponseHandlerComposite + MercadoPago\AdbPayment\Gateway\Http\TransferFactory + MercadoPago\AdbPayment\Gateway\Http\Client\FetchPaymentClient + MercadoPagoTransactionValidator + MercadoPagoVirtualErrorMessageMapper + + + + + + + MercadoPagoPixCommandPool + MercadoPagoBaseVoidRequest + MercadoPagoVoidResponseHandlerComposite + MercadoPago\AdbPayment\Gateway\Http\TransferFactory + MercadoPago\AdbPayment\Gateway\Http\Client\CancelPaymentClient + MercadoPagoTransactionValidator + MercadoPagoVirtualErrorMessageMapper + + + + + + + MercadoPagoPixCommandPool + MercadoPagoBaseVoidRequest + MercadoPagoVoidResponseHandlerComposite + MercadoPago\AdbPayment\Gateway\Http\TransferFactory + MercadoPago\AdbPayment\Gateway\Http\Client\FetchPaymentClient + MercadoPagoTransactionValidator + MercadoPagoVirtualErrorMessageMapper + + + + + + + MercadoPagoPixCommandPool + MercadoPagoCaptureRequest + MercadoPagoBaseCaptureResponseHandlerComposite + MercadoPago\AdbPayment\Gateway\Http\TransferFactory + MercadoPago\AdbPayment\Gateway\Http\Client\FetchPaymentClient + MercadoPagoTransactionValidator + MercadoPagoVirtualErrorMessageMapper + + + + + + + MercadoPagoRefundRequest + MercadoPago\AdbPayment\Gateway\Http\TransferFactory + MercadoPago\AdbPayment\Gateway\Http\Client\RefundClient + MercadoPagoRefundResponseHandlerComposite + MercadoPagoTransactionValidator + MercadoPagoVirtualErrorMessageMapper + + + + + + + + MercadoPago\AdbPayment\Gateway\Request\StoreIdDataRequest + MercadoPago\AdbPayment\Gateway\Request\RefundRequest + + + + + + + + + MercadoPago\AdbPayment\Gateway\Response\RefundHandler + + + + + + + + MercadoPagoRefundRequestTwoCc + MercadoPago\AdbPayment\Gateway\Http\TransferFactory + MercadoPago\AdbPayment\Gateway\Http\Client\RefundClientTwoCc + MercadoPagoRefundResponseHandlerComposite + MercadoPagoTransactionValidator + MercadoPagoVirtualErrorMessageMapper + + + + + + + + MercadoPago\AdbPayment\Gateway\Request\StoreIdDataRequest + MercadoPago\AdbPayment\Gateway\Request\RefundRequestTwoCc + + + + + + + + MercadoPagoAcceptPaymentRequest + MercadoPago\AdbPayment\Gateway\Http\TransferFactory + MercadoPago\AdbPayment\Gateway\Http\Client\AcceptPaymentClient + MercadoPagoAccpetPaymentResponseHandlerComposite + MercadoPagoTransactionValidator + MercadoPagoVirtualErrorMessageMapper + + + + + + + + MercadoPago\AdbPayment\Gateway\Request\StoreIdDataRequest + MercadoPago\AdbPayment\Gateway\Request\ExtPaymentIdDataRequest + + + + + + + + + MercadoPago\AdbPayment\Gateway\Response\AcceptPaymentHandler + + + + + + + + MercadoPagoDenyPaymentRequest + MercadoPago\AdbPayment\Gateway\Http\TransferFactory + MercadoPago\AdbPayment\Gateway\Http\Client\DenyPaymentClient + MercadoPagoDenyPaymentResponseHandlerComposite + MercadoPagoTransactionValidator + MercadoPagoVirtualErrorMessageMapper + + + + + + + + MercadoPago\AdbPayment\Gateway\Request\StoreIdDataRequest + MercadoPago\AdbPayment\Gateway\Request\ExtPaymentIdDataRequest + + + + + + + + + MercadoPago\AdbPayment\Gateway\Response\DenyPaymentHandler + + + + + + + + mercadopago_error_mapping.xml + + + + + MercadoPagoErrorMappingConfigReader + mercadopago_error_mapper + + + + + MercadoPagoErrorMappingData + + + + + + + + true + + + MercadoPago\AdbPayment\Gateway\Validator\GeneralResponseValidator + + + + + + + + + MercadoPagoBaseConfigValueHandler + + + + + + + MercadoPagoBaseConfig + + + + + + + MercadoPagoCcConfigValueHandler + + + + + + + MercadoPagoCcConfig + + + + + + + MercadoPagoTwoCcConfigValueHandler + + + + + + + MercadoPagoTwoCcConfig + + + + + + MercadoPagoCcCommandPool + + + + + + MercadoPagoTwoCcCommandPool + + + + + + + MercadoPagoVaultPaymentValueHandler + + + + + + + MercadoPagoVaultPaymentConfig + + + + + + MercadoPagoCheckoutProCommandPool + + + + + + + MercadoPagoCheckoutProConfigValueHandler + + + + + + + MercadoPagoCheckoutProConfig + + + + + + MercadoPagoPaymentMethodsOffCommandPool + + + + + + + MercadoPagoPaymentMethodsOffConfigValueHandler + + + + + + + MercadoPagoPaymentMethodsOffConfig + + + + + + MercadoPagoPixCommandPool + + + + + + + MercadoPagoPixConfigValueHandler + + + + + + + MercadoPagoPixConfig + + + + + + MercadoPagoBankTransferCommandPool + + + + + + + MercadoPagoPseConfigValueHandler + + + + + + + MercadoPagoPseConfig + + + + + + MercadoPagoBankTransferCommandPool + + + + + + + MercadoPagoWebpayConfigValueHandler + + + + + + + MercadoPagoWebpayConfig + + + + + + + MercadoPagoBaseConfig + + + + + + MercadoPagoBaseConfig + + + + + + MercadoPagoBaseConfig + + + + + + MercadoPagoBaseConfig + + + + + + MercadoPagoBaseConfig + + + + + + MercadoPagoBaseConfig + + + + + + MercadoPagoBaseConfig + + + + + + MercadoPagoBaseConfig + + + + + + MercadoPagoBaseConfig + + + + + + MercadoPagoBaseConfig + + + + + + MercadoPagoBaseConfig + + + + + + MercadoPagoBaseConfig + + + + + + + MercadoPagoLogger + + + + + + MercadoPagoLogger + + + + + + MercadoPagoLogger + + + + + + MercadoPagoLogger + + + + + + MercadoPagoLogger + + + + + + MercadoPagoLogger + + + + + + MercadoPagoLogger + + + + + + MercadoPagoLogger + + + + + + MercadoPagoLogger + + + + + + MercadoPagoLogger + + + + + + MercadoPagoLogger + + + + + + MercadoPagoLogger + + + + + + MercadoPagoLogger + + + + + + MercadoPagoLogger + + + + + + MercadoPagoLogger + + + + + + MercadoPagoLogger + + + + + + MercadoPagoLogger + + + + + + MercadoPagoLogger + + + + + + MercadoPagoLogger + + + + + + MercadoPagoLogger + + + + + + MercadoPagoLogger + + + + + + MercadoPagoLogger + + + + + + MercadoPagoLogger + + + + + + MercadoPagoLogger + + + diff --git a/etc/events.xml b/etc/events.xml new file mode 100644 index 0000000..3eb1e67 --- /dev/null +++ b/etc/events.xml @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/etc/extension_attributes.xml b/etc/extension_attributes.xml new file mode 100644 index 0000000..f9aa282 --- /dev/null +++ b/etc/extension_attributes.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + diff --git a/etc/fieldset.xml b/etc/fieldset.xml new file mode 100644 index 0000000..14a1687 --- /dev/null +++ b/etc/fieldset.xml @@ -0,0 +1,34 @@ + + + + +
+ + + + + + +
+
+ + + + + + + + + + +
+
+
diff --git a/etc/frontend/di.xml b/etc/frontend/di.xml new file mode 100644 index 0000000..2db2bfd --- /dev/null +++ b/etc/frontend/di.xml @@ -0,0 +1,89 @@ + + + + + + + MercadoPago\AdbPayment\Model\Ui\ConfigProviderBase + MercadoPago\AdbPayment\Model\Ui\ConfigProviderCc + MercadoPago\AdbPayment\Model\Ui\Vault\ConfigProvider + MercadoPago\AdbPayment\Model\Ui\ConfigProviderCheckoutPro + MercadoPago\AdbPayment\Model\Ui\ConfigProviderPaymentMethodsOff + MercadoPago\AdbPayment\Model\Ui\ConfigProviderPix + MercadoPago\AdbPayment\Model\Ui\ConfigProviderPse + MercadoPago\AdbPayment\Model\Ui\ConfigProviderWebpay + MercadoPago\AdbPayment\Model\Ui\ConfigProviderTwoCc + + + + + + + 1 + + + + + + + 1 + + + + + + + 1 + + + + + + + 1 + + + + + + + 1 + + + + + + + 1 + + + + + + + MercadoPago\AdbPayment\Gateway\Config\ConfigCc::METHOD + + + + + + + MercadoPago\AdbPayment\Gateway\Config\ConfigTwoCc::METHOD + + + + + + + MercadoPago\AdbPayment\Model\Ui\TokenUiComponentProvider + + + + diff --git a/etc/frontend/routes.xml b/etc/frontend/routes.xml new file mode 100644 index 0000000..29f7d90 --- /dev/null +++ b/etc/frontend/routes.xml @@ -0,0 +1,16 @@ + + + + + + + + + diff --git a/etc/mercadopago_error_mapping.xml b/etc/mercadopago_error_mapping.xml new file mode 100644 index 0000000..05f067f --- /dev/null +++ b/etc/mercadopago_error_mapping.xml @@ -0,0 +1,36 @@ + + + + + + Your payment was declined due to an error in the store setup. Please get in touch with the store support and try again later. + It was not possible to complete the payment due to a communication error. Please try again later. + Your payment was declined because some of your card details are incorrect. Please check the information to complete the purchase. + Your payment was declined. We recommend that you use the device and payment method you usually use for online shopping. + It was not possible to complete the payment. Please use another method to complete the purchase. + It was not possible to complete the payment due to a communication error. Please try again later or use another payment method. + + The card details are incorrect. + The card details are incorrect. + The card details are incorrect. + The card details are incorrect. + The payment was rejected due to suspicion of fraud. + The payment method used requires prior authorization of the purchase amount. + This card is blocked. + It was not possible to complete the payment. Please use another method to complete the purchase. + You made a similar payment a short time ago. Please use another payment method. + Something went wrong with the payment. Please use another card or choose a different payment method. + Something went wrong with the payment. Please use another card or choose a different payment method. + The number of installments chosen is invalid. + The maximum number of attempts was reached. + Something went wrong. Please try again. + Your payment was declined because some of your card details are incorrect. Please check the information to complete the purchase or try another payment method. + + diff --git a/etc/module.xml b/etc/module.xml new file mode 100644 index 0000000..e280ba8 --- /dev/null +++ b/etc/module.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + diff --git a/etc/payment.xml b/etc/payment.xml new file mode 100644 index 0000000..3c756e2 --- /dev/null +++ b/etc/payment.xml @@ -0,0 +1,135 @@ + + + + + + + + + + + 1 + + + 1 + + + 1 + + + 1 + + + 1 + + + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/etc/pdf.xml b/etc/pdf.xml new file mode 100644 index 0000000..fbff7c0 --- /dev/null +++ b/etc/pdf.xml @@ -0,0 +1,21 @@ + + + + + + Finance Cost + finance_cost + 7 + false + 500 + + + diff --git a/etc/sales.xml b/etc/sales.xml new file mode 100644 index 0000000..13a6427 --- /dev/null +++ b/etc/sales.xml @@ -0,0 +1,27 @@ + + + +
+ + + +
+
+ + + +
+
+ + + +
+
diff --git a/etc/webapi.xml b/etc/webapi.xml new file mode 100644 index 0000000..cb89d1e --- /dev/null +++ b/etc/webapi.xml @@ -0,0 +1,42 @@ + + + + + + + + + + %cart_id% + + + + + + + + + + + + + + + + + + + + + %cart_id% + + + diff --git a/i18n/en_US.csv b/i18n/en_US.csv new file mode 100644 index 0000000..f7520ef --- /dev/null +++ b/i18n/en_US.csv @@ -0,0 +1,378 @@ +"Finance Cost","Finance Cost" +"Discount for payment at sight","Discount for payment at sight" +"Set up installments and interest","Set up installments and interest" +"Order not found.","Order not found." +"Mercado Pago, refund notification","Mercado Pago, refund notification" +"The order %1, was refunded directly on Mercado Pago, you need to create an offline refund.","The order %1, was refunded directly on Mercado Pago, you need to create an offline refund." +Unavailable.,Unavailable. +"You should not be here...","You should not be here..." +"Order Canceled.","Order Canceled." +"Transaction has been declined. Please try again later.","Transaction has been declined. Please try again later." +"%1 minutes","%1 minutes" +"1 hour","1 hour" +"12 hours","12 hours" +"1 day","1 day" +"Payment for order %1 in store %2","Payment for order %1 in store %2" +Tax,Tax +"Awaiting payment of the Card.","Awaiting payment of the Card." +"Awaiting payment.","Awaiting payment." +"Awaiting payment through Checkout Pro.","Awaiting payment through Checkout Pro." +"Awaiting payment through Pix.","Awaiting payment through Pix." +"The gateway declined the transaction.","The gateway declined the transaction." +"Please select a category","Please select a category" +description,description +Production,Production +"Sandbox - Testing environment","Sandbox - Testing environment" +"Yes, Processed Order Synchronous","Yes, Processed Order Synchronous" +"No, Processed Order Asynchronous","No, Processed Order Asynchronous" +"1 installment","1 installment" +"2 installments","2 installments" +"3 installments","3 installments" +"4 installments","4 installments" +"5 installments","5 installments" +"6 installments","6 installments" +"7 installments","7 installments" +"8 installments","8 installments" +"9 installments","9 installments" +"10 installments","10 installments" +"11 installments","11 installments" +"12 installments","12 installments" +"13 installments","13 installments" +"14 installments","14 installments" +"15 installments","15 installments" +"16 installments","16 installments" +"17 installments","17 installments" +"18 installments","18 installments" +"19 installments","19 installments" +"20 installments","20 installments" +"21 installments","21 installments" +"22 installments","22 installments" +"23 installments","23 installments" +"24 installments","24 installments" +"25 installments","25 installments" +"26 installments","26 installments" +"27 installments","27 installments" +"28 installments","28 installments" +"29 installments","29 installments" +"30 installments","30 installments" +"31 installments","31 installments" +"32 installments","32 installments" +"33 installments","33 installments" +"34 installments","34 installments" +"35 installments","35 installments" +"36 installments","36 installments" +"Do Not Delete","Do Not Delete" +name,name +"Authorization for future capture","Authorization for future capture" +"Authorization for immediate capture","Authorization for immediate capture" +Configure,Configure +Close,Close +"15 minutes","15 minutes" +"30 minutes - recommended","30 minutes - recommended" +"24 hours","24 hours" +"Modal window in store environment","Modal window in store environment" +"Redirection to Mercado Pago environment","Redirection to Mercado Pago environment" +"Cart %1 doesn't contain products","Cart %1 doesn't contain products" +"There was an error when creating the payment. Please try again later.","There was an error when creating the payment. Please try again later." +"It was not possible to save on the installment cost amount","It was not possible to save on the installment cost amount" +"Default Store %1 - Set Data for store id %2 Web Site Id %3","Default Store %1 - Set Data for store id %2 Web Site Id %3" +Finished,Finished +"Store ID: %1 Not allowed for production use","Store ID: %1 Not allowed for production use" +"There was an error saving: %1","There was an error saving: %1" +"Error fetching information: %1","Error fetching information: %1" +"Please check store id %1 credentials","Please check store id %1 credentials" +"Order %1 - Increment Id %2 - state %3","Order %1 - Increment Id %2 - state %3" +"Card - MercadoPago","Card - MercadoPago" +"Checkout Pro - MercadoPago","Checkout Pro - MercadoPago" +"Pix - MercadoPago","Pix - MercadoPago" +"Pse - MercadoPago","Pse - MercadoPago" +"Webpay - MercadoPago","Webpay - MercadoPago" +"Document Type","Document Type" +"Document number","Document number" +Instruction,Instruction +"Due date","Due date" +"In order to comply with PCI regulations, the administrator cannot capture this payment method.","In order to comply with PCI regulations, the administrator cannot capture this payment method." +"Payer Entity Type","Payer Entity Type" +"Financial Institution","Financial Institution" +"Your access credential for store %1 is valid but you don\'t have production use permission. Request approval before use by click here.","Your access credential for store %1 is valid but you don't have production use permission. Request approval before use by click here." +"Your payment will be valid until","Your payment will be valid until" +"Link for payment","Link for payment" +"Details for payment","Details for payment" +"Verification Code","Verification Code" +"Line Code is","Line Code is" +"Issued on behalf of","Issued on behalf of" +"Mercado Pago partnership code","Mercado Pago partnership code" +"To pay, please scan the QR code","To pay, please scan the QR code" +"or, if you prefer, copy-paste the code","or, if you prefer, copy-paste the code" +"Further instructions","Further instructions" +"The Line Code is","The Line Code is" +Copy,Copy +Copied,Copied +"Enter the ID Document you used in the purchase","Enter the ID Document you used in the purchase" +Pix,Pix +Waiting...,Waiting... +"Place Order","Place Order" +"Payer First Name","Payer First Name" +"Payer Last Name","Payer Last Name" +"Card details","Card details" +"Card number","Card number" +"CVV - Card Verification Value","CVV - Card Verification Value" +"What is this?","What is this?" +"Expiration month","Expiration month" +"Expiration year","Expiration year" +"Card holder full name","Card holder full name" +"Number of installments","Number of installments" +"Save for later use.","Save for later use." +"A 3-digit number in italics on the back of your card.","A 3-digit number in italics on the back of your card." +"Entity Type","Entity Type" +"Please provide a valid document identification.","Please provide a valid document identification." +"Unable to make payment, check card details.","Unable to make payment, check card details." +"Payment Services","Payment Services" +"Permission to set up the module","Permission to set up the module" +"","" +"Technical support available here.","Technical support available here." +"Basic Settings","Basic Settings" +"Mercado Pago integration","Mercado Pago integration" +"

In order to sell or test a store, you must first enter your test and production credentials.

Using the account of the collaborator with access to Mercado Pago Seller Account, search the credentials according to the account: Argentina, Brazil, Chile, Colombia, Mexico, Uruguay and Peru.

","

In order to sell or test a store, you must first enter your test and production credentials.

Using the account of the collaborator with access to Mercado Pago Seller Account, search the credentials according to the account: Argentina, Brazil, Chile, Colombia, Mexico, Uruguay and Peru.

" +"Checkout operation mode","Checkout operation mode" +"When operational mode is set as Sandbox, your sales will not be communicated to financial institutions.","When operational mode is set as Sandbox, your sales will not be communicated to financial institutions." +"Public Key - production","Public Key - production" +"Access Token - production","Access Token - production" +"Public Key - Sandbox","Public Key - Sandbox" +"Access Token - Sandbox","Access Token - Sandbox" +"Developers support","Developers support" +Debug,Debug +"We record your store's communications with Mercado Pago in orer to offer a better support. Please note it is not recommended to use the debug mode when your store is in production mode.","We record your store's communications with Mercado Pago in orer to offer a better support. Please note it is not recommended to use the debug mode when your store is in production mode." +"Rewrite notification URL","Rewrite notification URL" +"You can override notification URLs which are automatically generated. In order to use the module's default, please do not fill in this details.","You can override notification URLs which are automatically generated. In order to use the module's default, please do not fill in this details." +"Store Name, Category and Integrator ID","Store Name, Category and Integrator ID" +"Store Name","Store Name" +"This is the store's name as it will appear on the customer's invoice. In case the sale was made through Checkout Pro, the invoice will also show Mercado Pago in the name.","This is the store's name as it will appear on the customer's invoice. In case the sale was made through Checkout Pro, the invoice will also show Mercado Pago in the name." +"Category of your store","Category of your store" +"The product category of your store on Mercado Pago.","The product category of your store on Mercado Pago." +"Integrator ID","Integrator ID" +"With this number, we are able to identify all your transactions and know how many sales were processed using your account. Become a certified Mercado Pago partner and request your integrator_id here.","With this number, we are able to identify all your transactions and know how many sales were processed using your account. Become a certified Mercado Pago partner and request your integrator_id here." +"Sales requirements","Sales requirements" +"Checkout Pro","Checkout Pro" +Enabled,Enabled +Title,Title +"Payment method title at the store's checkout.","Payment method title at the store's checkout." +"Deadline for payment","Deadline for payment" +"Calendar days.","Calendar days." +"Payment completion view","Payment completion view" +"Modal: Buyer will close via modal on the checkout screen. Redirection: Buyer will be redirected to the Mercado Pago website.","Modal: Buyer will close via modal on the checkout screen. Redirection: Buyer will be redirected to the Mercado Pago website." +"Removed payment method","Removed payment method" +"Select the payment methods you do NOT want to accept.","Select the payment methods you do NOT want to accept." +"Installment options limit","Installment options limit" +"It is possible to configure the number of installments in Checkout Pro, but the limit of installments per purchase will also depend on the minimum and maximum amount defined by each flag in the country of your store.","It is possible to configure the number of installments in Checkout Pro, but the limit of installments per purchase will also depend on the minimum and maximum amount defined by each flag in the country of your store." +"Conversion tags","Conversion tags" +"You can link your Checkout Pro sales with external services.","You can link your Checkout Pro sales with external services." +Facebook,Facebook +"Link your sales with Facebook by entering the ID No. and your tracking code.","Link your sales with Facebook by entering the ID No. and your tracking code." +"Google Ads","Google Ads" +"Link your sales with Google Ads by entering the ID No. and your tracking code.","Link your sales with Google Ads by entering the ID No. and your tracking code." +"Link your sales with Google Ads by entering the Label and your tracking code.","Link your sales with Google Ads by entering the Label and your tracking code." +"Customization and Styles","Customization and Styles" +"Set up how the items will appear in the modal window in which the buyer will complete the purchase.","Set up how the items will appear in the modal window in which the buyer will complete the purchase." +"Header Color","Header Color" +"Elements Color","Elements Color" +"Common Payment Method Definitions","Common Payment Method Definitions" +"Minimum order total","Minimum order total" +"Minimum amount to pay with Checkout Pro.","Minimum amount to pay with Checkout Pro." +"Maximum order amount","Maximum order amount" +"Maximum amount to pay with Checkout Pro","Maximum amount to pay with Checkout Pro" +"Payment From Specific Countries","Payment From Specific Countries" +"Countries eligible to use this payment method.","Countries eligible to use this payment method." +"Sort Order","Sort Order" +"Sets up in which order the payment methods will be shown at the Checkout.","Sets up in which order the payment methods will be shown at the Checkout." +"Checkout Transparent","Checkout Transparent" +"Capture of customer details in the payment form","Capture of customer details in the payment form" +"Activate this option if you want to obtain buyer`s documents details, using an additional field on the payment form. Disable it if your store already gets these details.","Activate this option if you want to obtain buyer`s documents details, using an additional field on the payment form. Disable it if your store already gets these details." +"Capture document identification","Capture document identification" +"Capture name","Capture name" +"In case you leave this option active, an additional field in the payment form will obtain this information. If disabled, details will be retrieved directly from other fields within your store.","In case you leave this option active, an additional field in the payment form will obtain this information. If disabled, details will be retrieved directly from other fields within your store." +"Credit and debit cards","Credit and debit cards" +"Enable vault","Enable vault" +"Allows buyer to save the card for future use.","Allows buyer to save the card for future use." +"Payment Action","Payment Action" +"Consult the store's business sector to be able to select capturing the payment at the time of the purchase or at a later moment.","Consult the store's business sector to be able to select capturing the payment at the time of the purchase or at a later moment." +"Use Binary Mode","Use Binary Mode" +"Installment and interest","Installment and interest" +"Set within your account","Set within your account" +"Minimum amount for payment with this payment method.","Minimum amount for payment with this payment method." +"Maximum amount for payment with this payment method.","Maximum amount for payment with this payment method." +Pse,Pse +"Minimum amount to pay with Pse.","Minimum amount to pay with Pse." +"Maximum amount to pay with Pse.","Maximum amount to pay with Pse." +Webpay,Webpay +"Minimum amount to pay with Webpay.","Minimum amount to pay with Webpay." +"Maximum amount to pay with Webpay.","Maximum amount to pay with Webpay." +"Store information hosted in Mercado Pago","Store information hosted in Mercado Pago" +"User Id","User Id" +"User Email","User Email" +"User Name","User Name" +"mp_payment_id","Payment Id (Mercado Pago)" +"card_installments","Installments" +"card_finance_cost","Financial Cost" +"card_type","Card Type" +"card_number","Card Number" +"card_holder_name","Card Holder Name" +"card_exp_year","Card Exp Year" +"card_exp_month","Card Exp Month" +"payer_document_identification","Document number" +"payer_first_name","First Name" +"payer_last_name","Last Name" +"init_point","Url" +"date_of_expiration","Date of Expiration" +"barcode","Barcode" +"external_resource_url","External Resource Url" +"verification_code","Verification Code" +"financial_institution","Financial Institution" +"payer_document_type","Payer Document Type" +"mp_status","Status (Mercado Pago)" +"mp_status_detail","Status Detail (Mercado Pago)" +"Link","Link" +"Line Code","Line Code" +"Payer Document Type","Payer Document Type" +"Payment Type (Mercado Pago)","Payment Type (Mercado Pago)" +"Installments (Mercado Pago)","Installments (Mercado Pago)" +"Pix QR Code","Pix QR Code" +"Pix Code","Pix Code" +"The order %1, was refunded directly on Mercado Pago, you need to check stock of sold items.","The order %1, was refunded directly on Mercado Pago, you need to check stock of sold items." +"The order %1, was refunded directly on Mercado Pago, but an error occured when refunding offline, you need to check order refunds and stock of sold items.","The order %1, was refunded directly on Mercado Pago, but an error occured when refunding offline, you need to check order refunds and stock of sold items." +"Order refunded in Mercado Pago, refunded offline in the store.","Order refunded in Mercado Pago, refunded offline in the store." +"Order refunded.","Order refunded." +"API Integration","API Integration" +"Receive refund notification","Receive refund notification" +"Enable the creation of a Credit Note when a refund occurs in Mercado Pago.","Enable the creation of a Credit Note when a refund occurs in Mercado Pago." +"Enable Facebook pixel","Enable Facebook pixel" +"Enable Google pixel","Enable Google pixel" +"Please check store id %1 credentials, they are invalid so they were deleted.","Please check store id %1 credentials, they are invalid so they were deleted." +"Your payment was declined due to an error in the store setup. Please get in touch with the store support and try again later.","Your payment was declined due to an error in the store setup. Please get in touch with the store support and try again later." +"It was not possible to complete the payment due to a communication error. Please try again later.","It was not possible to complete the payment due to a communication error. Please try again later." +"Your payment was declined because some of your card details are incorrect. Please check the information to complete the purchase.","Your payment was declined because some of your card details are incorrect. Please check the information to complete the purchase." +"Your payment was declined. We recommend that you use the device and payment method you usually use for online shopping.","Your payment was declined. We recommend that you use the device and payment method you usually use for online shopping." +"It was not possible to complete the payment. Please use another method to complete the purchase.","It was not possible to complete the payment. Please use another method to complete the purchase." +"It was not possible to complete the payment due to a communication error. Please try again later or use another payment method.","It was not possible to complete the payment due to a communication error. Please try again later or use another payment method." +"Offline Payments Methods","Offline Payments Methods" +"Exclude Payment Methods","Exclude Payment Methods" +"Select the payment methods you do NOT want to accept.","Select the payment methods you do NOT want to accept." +"Payment Title","Payment Title" +"Accept all payment methods","Accept all payment methods" +"There are no payment methods available, please contact the seller.", "There are no payment methods available, please contact the seller." +"Generate the ticket and pay it wherever you want.","Generate the ticket and pay it wherever you want." +"Will be approved within 2 business days.","Will be approved within 2 business days." +"Ticket - MercadoPago","Ticket - MercadoPago" +"Expiration","Expiration" +"PAYMENT INFORMATION","PAYMENT INFORMATION" +"Payment Number (Mercado Pago): %1","Payment Number (Mercado Pago): %1" +"FIRST PAYMENT METHOD", "FIRST PAYMENT METHOD" +"Card number:","Card number:" +"Expiration date:","Expiration date:" +"Card holder:","Card holder:" +"Payment method:","ayment method:" +"Installments:","Installments:" +"Identification in the invoice:","Identification in the invoice:" +"Payment status:","Payment status:" +"Detailed payment status:","Detailed payment status:" +"SECOND PAYMENT METHOD","SECOND PAYMENT METHOD" +"Your order is %1!","Your order is %1!" +"Thank you for your purchase!","Thank you for your purchase!" +"We are processing your payment","We are processing your payment" +"Continue Shopping","Continue Shopping" +"Create an Account","Create an Account" +"First card details:","First card details:" +"Enter the amount to be paid with the first method *", "Enter the amount to be paid with the first method *" +"Value not allowed!","Value not allowed!" +"Remaining value ","Remaining value " +"Credit card","Credit card" +"Second card details:","Second card details:" +"Payment processed by Mercado Pago","Payment processed by Mercado Pago" +"This is a required field.","This is a required field." +"You can track your order status by creating an account.","You can track your order status by creating an account." +"cardNumber should be a number.","cardNumber should be a number." +"cardNumber is empty.","cardNumber is empty." +"cardNumber should be of length between '8' and '19'.","cardNumber should be of length between '8' and '19'." +"securityCode should be a number.","securityCode should be a number." +"securityCode should be of length '3' or '4'.","securityCode should be of length '3' or '4'." +"securityCode is empty.","securityCode is empty." +"expirationMonth should be a number.","expirationMonth should be a number." +"expirationMonth is empty.","expirationMonth is empty." +"expirationYear should be of length '2' or '4'.","expirationYear should be of length '2' or '4'." +"expirationYear should be a number.","expirationYear should be a number." +"expirationYear is empty.","expirationYear is empty." +"expirationMonth should be a value from 1 to 12.","expirationMonth should be a value from 1 to 12." +"expirationYear value should be greater or equal than %1.", "Expiration year is invalid" +"expirationMonth value should be greater than '%1' or expirationYear value should be greater than '%2'.", "Expiration month or expiration year value is invalid." +"cardNumber should be of length '16'.","Card number should be of length 16." +"Pay with two cards","Pay with two cards" +"Payment with two cards","Payment with two cards" +"Interest-free","Interest-free" +"Your Bank will apply Interest","Your Bank will apply Interest" +"Complete your order to proceed with payment.","Complete your order to proceed with payment." +"approved","Approved" +"cancelled","Cancelled" +"authorized","Authorized" +"accredited","Accredited" +"rejected","Rejected" +"pending","Pending" +"partially_refunded","Partially Refunded" +"cc_rejected_call_for_authorize","Authorization request rejected" +"in_process","In process" +"by_admin","By Admin" +"cc_rejected_high_risk","High risk" +"cc_rejected_insufficient_amount","Insufficient amount" +"cc_rejected_other_reason","Other reason" +"cc_rejected_bad_filled_security_code","Bad filled security_code" +"cc_rejected_bad_filled_other","Bad filled" +"cc_rejected_bad_filled_card_number","Bad filled card_number" +"cc_rejected_bad_filled_date","Bad filled date" +"cc_rejected_card_disabled","Card disabled" +"cc_rejected_max_attempts","Max attempts" +"cc_rejected_invalid_installments","Invalid installments" +"cc_rejected_duplicated_payment","Duplicated payment" +"bank_rejected","Bank rejected" +"bank_error","Bank error" +"rejected_by_bank","Rejected by bank" +"refunded","Refunded" +"by_collector","By collector" +"expired","Expired", +"by_payer","By payer" +"pending_review_manual","Pending manual review" +"pending_capture","Pending capture" +"reimbursed","Reimbursed" +"pending_waiting_payment","Waiting pending payment" +"pending_waiting_for_remedy","Pending awaiting solution" +"unavailable","Unavailable" +"pending_waiting_transfer","Pending awaiting transfer" +"Credit or Debit Card","Credit or Debit Card" +"Email Address","Email Address" +"We'll email you an order confirmation with details and tracking info.","We'll email you an order confirmation with details and tracking info." +"Your order number is: %1.","Your order number is: %1!" +"Your order # is: %1.","Your order # is: %1!" +"By continuing, you agree to our ","By continuing, you agree to our " +"Terms and Conditions.","Terms and Conditions." +"Status (Mercado Pago)","Status (Mercado Pago)" +"Status Detail (Mercado Pago)","Status Detail (Mercado Pago)" +"Google Ads - Id","Google Ads - Id" +"Google Ads - Label","Google Ads - Label" +"The card details are incorrect.","The card details are incorrect." +"The payment was rejected due to suspicion of fraud.","The payment was rejected due to suspicion of fraud." +"The payment method used requires prior authorization of the purchase amount.","The payment method used requires prior authorization of the purchase amount." +"This card is blocked.","This card is blocked." +"You made a similar payment a short time ago. Please use another payment method.","You made a similar payment a short time ago. Please use another payment method." +"Something went wrong with the payment. Please use another card or choose a different payment method.","Something went wrong with the payment. Please use another card or choose a different payment method." +"The number of installments chosen is invalid.","The number of installments chosen is invalid." +"The maximum number of attempts was reached.","The maximum number of attempts was reached." +"Something went wrong. Please try again.","Something went wrong. Please try again." +"It was not possible to complete the payment. Please use another method to complete the purchase.","It was not possible to complete the payment. Please use another method to complete the purchase." +"Your payment was declined because some of your card details are incorrect. Please check the information to complete the purchase or try another payment method.","Your payment was declined because some of your card details are incorrect. Please check the information to complete the purchase or try another payment method." +"Your credentials are incorrect. Please double-check in your account your credentials are correct.","Your credentials are incorrect. Please double-check in your account your credentials are correct." +"Your credentials are incorrect. Test credentials have been filled in and should be used in sandbox mode. Please check the credentials again.","Your credentials are incorrect. Test credentials have been filled in and should be used in sandbox mode. Please check the credentials again." +"Your credentials are incorrect. Production credentials have been filled in and should be used in production mode. Please check the credentials again.","Your credentials are incorrect. Production credentials have been filled in and should be used in production mode. Please check the credentials again." +"Minimum transaction amount not allowed for the chosen brand. Please choose another flag or make a purchase over %1.","Minimum transaction amount not allowed for the chosen brand. Please choose another flag or make a purchase over %1." +"Download the Boleto","Download the Boleto" +"pending_contingency","pending_contingency" +"Pay with the method of payment you prefer and all the security of Mercado Pago.
If you already have an account at Mercado Livre, use the same email and password.
Use your Mercado Pago account balance or saved cards to buy without filling out more details.","Pay with the method of payment you prefer and all the security of Mercado Pago.
If you already have an account at Mercado Livre, use the same email and password.
Use your Mercado Pago account balance or saved cards to buy without filling out more details." +"Payments with immediate approval.
The payment term is up to %1.
At checkout, you will receive the code to make payment at the bank of your choice (check with your bank for your daily Pix transfer limit).","Payments with immediate approval.
The payment term is up to %1.
At checkout, you will receive the code to make payment at the bank of your choice (check with your bank for your daily Pix transfer limit)." +"Please fill a valid color in the Checkout Pro configuration","Please fill a valid color in the Checkout Pro configuration" diff --git a/i18n/es_AR.csv b/i18n/es_AR.csv new file mode 100644 index 0000000..1c482de --- /dev/null +++ b/i18n/es_AR.csv @@ -0,0 +1,378 @@ +"Finance Cost","Custo do Parcelamento" +"Discount for payment at sight","Descuento para pagar en un pago" +"Set up installments and interest","Definir cuotas e intereses" +"Order not found.","Pedido no localizado." +"Mercado Pago, refund notification","Mercado Pago, notificación de reembolso" +"The order %1, was refunded directly on Mercado Pago, you need to create an offline refund.","El pedido %1, fue reembolsado directamente en Mercado Pago, necesitas crear un reembolso offline." +Unavailable.,No disponible. +"You should not be here...","No tienes que estar aquí..." +"Order Canceled.","Pedido cancelado." +"Transaction has been declined. Please try again later.","La operación fue rechazada. Por favor inténtalo de nuevo más tarde." +"%1 minutes","%1 minutos" +"1 hour","1 hora" +"12 hours","12 horas" +"1 day","1 día" +"Payment for order %1 in store %2","Pago del pedido %1 en la tienda %2" +Tax,Impuesto +"Awaiting payment of the Card.","Esperando pago via tarjeta." +"Awaiting payment.","Esperando pago." +"Awaiting payment through Checkout Pro.","Esperando pago a través del Checkout Pro." +"Awaiting payment through Pix.","Esperando pago via Pix." +"The gateway declined the transaction.","El gateway rechazó la operación." +"Please select a category","Por favor, selecciona una categoría" +description,descripción +Production,Producción +"Sandbox - Testing environment","Ecositema de testeo" +"Yes, Processed Order Synchronous","Sí, procesar solicitudes sincrónicamente" +"No, Processed Order Asynchronous","No, procesar solicitudes asíncronas" +"1 installment","1 cuota" +"2 installments","2 cuotas" +"3 installments","3 cuotas" +"4 installments","4 cuotas" +"5 installments","5 cuotas" +"6 installments","6 cuotas" +"7 installments","7 cuotas" +"8 installments","8 cuotas" +"9 installments","9 cuotas" +"10 installments","10 cuotas" +"11 installments","11 cuotas" +"12 installments","12 cuotas" +"13 installments","13 cuotas" +"14 installments","14 cuotas" +"15 installments","15 cuotas" +"16 installments","16 cuotas" +"17 installments","17 cuotas" +"18 installments","18 cuotas" +"19 installments","19 cuotas" +"20 installments","20 cuotas" +"21 installments","21 cuotas" +"22 installments","22 cuotas" +"23 installments","23 cuotas" +"24 installments","24 cuotas" +"25 installments","25 cuotas" +"26 installments","26 cuotas" +"27 installments","27 cuotas" +"28 installments","28 cuotas" +"29 installments","29 cuotas" +"30 installments","30 cuotas" +"31 installments","31 cuotas" +"32 installments","32 cuotas" +"33 installments","33 cuotas" +"34 installments","34 cuotas" +"35 installments","35 cuotas" +"36 installments","36 cuotas" +"Do Not Delete","No Finalizar" +name,nombre +"Authorization for future capture","Autorización para la captura futura" +"Authorization for immediate capture","Autorización y captura inmediata" +Configure,Configure +Close,Cerrar +"15 minutes","15 minutos" +"30 minutes - recommended","30 minutos - recomendado" +"24 hours","24 horas" +"Modal window in store environment","Ventana modal en el ecosistema de la tienda" +"Redirection to Mercado Pago environment","Redireccionamiento al ecosistema de Mercado Pago" +"Cart %1 doesn't contain products","El carrito %1 no tiene productos" +"There was an error when creating the payment. Please try again later.","Error al crear el pago. Inténtalo de nuevo más tarde." +"It was not possible to save on the installment cost amount","No fue posible economizar el monto del costo de las cuotas" +"Default Store %1 - Set Data for store id %2 Web Site Id %3","Store ID: %1 No habilitado para el uso en producción" +Finished,Finalizado +"Store ID: %1 Not allowed for production use","Datos del comerciante obtenidos con éxito." +"There was an error saving: %1","Error al guardar: %1" +"Error fetching information: %1","Error al obtener información %1" +"Please check store id %1 credentials","Por favor, verifica las credenciales de la tienda id %1" +"Order %1 - Increment Id %2 - state %3","Order %1 - Increment ID %2 - Status %3" +"Card - MercadoPago","Card - MercadoPago" +"Checkout Pro - MercadoPago","Checkout Pro - MercadoPago" +"Pix - MercadoPago","Pix - MercadoPago" +"Pse - MercadoPago","Pse - MercadoPago" +"Webpay - MercadoPago","Webpay - MercadoPago" +"Document Type","Tipo de documento" +"Document number","Número del documento" +Instruction,Instrucciones +"Due date","Vencimiento" +"In order to comply with PCI regulations, the administrator cannot capture this payment method.","Debido al cumplimiento de la normativa PCI, no es posible capturar este método de pago por el administrador." +"Payer Entity Type","Tipo de la institución de pago" +"Financial Institution","Institución financiera" +"Your access credential for store %1 is valid but you don\'t have production use permission. Request approval before use by click here.","Tu credencial de acceso a la tienda %1 es válida, pero no tienes permiso de uso de producción. Solicita aprobación antes de usar clic aquí." +"Your payment will be valid until","Tu pago es válido hasta" +"Link for payment","Link para pago" +"Details for payment","Detalles para el pago" +"Verification Code","Código de verificación" +"Line Code is","El line code es" +"Issued on behalf of","Emitido en nombre de" +"Mercado Pago partnership code","Código de convenio con Mercado Pago" +"To pay, please scan the QR code","Para pagar, escanea el código QR" +"or, if you prefer, copy-paste the code","o, si prefieres, copia y pega el código" +"Further instructions","Leer más instrucciones" +"The Line Code is","El line code es" +Copy,Copiar +Copied,Copiado +"Enter the ID Document you used in the purchase","Ingresa el Documento de identificación usado en la compra" +Pix,Pix +Waiting...,Esperando... +"Place Order","Realizar Pedido" +"Payer First Name","Nombre del Pagador" +"Payer Last Name","Apellido del Pagador" +"Card details","Datos de la tarjeta" +"Card number","Número de la tarjeta" +"CVV - Card Verification Value","CVV - Código de seguridad" +"What is this?","¿Qué es eso?" +"Expiration month","Mes de vencimiento" +"Expiration year","Año de vencimiento" +"Card holder full name","Nombre impreso en la tarjeta" +"Number of installments","Número de cuotas" +"Save for later use.","Guardar para uso futuro." +"A 3-digit number in italics on the back of your card.","Un número de 3 dígitos en itálica en el dorso de tu tarjeta." +"Entity Type","Tipo de entidad" +"Please provide a valid document identification.","No fue posible realizar el pago. Por favor, presenta un documento de identidad válido." +"Unable to make payment, check card details.","No fue posible realizar el pago. Por favor, verifica los datos de la tarjeta." +"Payment Services","Servicio de pago" +"Permission to set up the module","Permiso para configurar el módulo" +"","" +"Technical support available here.","Soporte técnico disponible aquí." +"Basic Settings","Configuraciones básicas" +"Mercado Pago integration","Integración con Mercado Pago" +"

In order to sell or test a store, you must first enter your test and production credentials.

Using the account of the collaborator with access to Mercado Pago Seller Account, search the credentials according to the account: Argentina, Brazil, Chile, Colombia, Mexico, Uruguay and Peru.

","

Para vender o testear la tienda , tienes que ingresar las credenciales de test y de producción.

Con el colaborador con acceso a la Cuenta del Vendedor de Mercado Pago, busca las credenciales según la cuenta: Argentina, Brazil, Chile, Colombia, Mexico, Uruguay and Peru.

" +"Checkout operation mode","Modo de Operación del Checkout" +"When operational mode is set as Sandbox, your sales will not be communicated to financial institutions.","Cuando el modo operacional esté definido como Sandbox, tus ventas no serán comunicadas a las instituciones financieras." +"Public Key - production","Public Key - producción" +"Access Token - production","Access Token - producción" +"Public Key - Sandbox","Public Key - Sandbox" +"Access Token - Sandbox","Access Token - Sandbox" +"Developers support","Soporte para desarrolladores" +Debug,Debug +"We record your store's communications with Mercado Pago in orer to offer a better support. Please note it is not recommended to use the debug mode when your store is in production mode.","Registramos las comunicaciones de tu tienda con Mercado Pago para ofrecer un soporte aún mejor. Atención: no se recomienda usar el modo debug con la tienda en modo de producción." +"Rewrite notification URL","Reescribe la notificación URL" +"You can override notification URLs which are automatically generated. In order to use the module's default, please do not fill in this details.","Puedes substituir las URLs de notificación que se generan automáticamente. Para usar el padrón del módulo, por favor, no cargues estos datos." +"Store Name, Category and Integrator ID","Nombre de la tienda, Categoría e ID del Integrador" +"Store Name","Nombre de la tienda" +"This is the store's name as it will appear on the customer's invoice. In case the sale was made through Checkout Pro, the invoice will also show Mercado Pago in the name.","El nombre de la tienda igual a como figurará en la factura del cliente. Si la venta se hizo por medio del Checkout Pro, la factura también identificará a Mercado Pago en el nombre." +"Category of your store","Categoría de tu tienda" +"The product category of your store on Mercado Pago.","La categoría del producto de tu tienda en Mercado Pago." +"Integrator ID","ID del integrador" +"With this number, we are able to identify all your transactions and know how many sales were processed using your account. Become a certified Mercado Pago partner and request your integrator_id here.","Con este número, podemos identificar todas tus operaciones y saber cuántas ventas fueron procesadas con tu cuenta. Conviértete en un socio certificado de Mercado Pago y pide tu integrator_id here." +"Sales requirements","Exigencias de ventas" +"Checkout Pro","Checkout Pro" +Enabled,Activado +Title,Título +"Payment method title at the store's checkout.","Título de la forma de pago en el checkout de la tienda." +"Deadline for payment","Plazo límite para el pago" +"Calendar days.","Días seguidos." +"Payment completion view","Visualización de la finalización del pago" +"Modal: Buyer will close via modal on the checkout screen. Redirection: Buyer will be redirected to the Mercado Pago website.","Modal, el cliente finalizará vía modal en la pantalla de checkout. Redireccionamiento, el cliente será redireccionado al sitio de Mercado Pago" +"Removed payment method","Medio de pago finalizado" +"Select the payment methods you do NOT want to accept.","Selecciona los medios de pago que NO quieres aceptar." +"Installment options limit","Límite de cuotas" +"It is possible to configure the number of installments in Checkout Pro, but the limit of installments per purchase will also depend on the minimum and maximum amount defined by each flag in the country of your store.","Se puede configurar el número de cuotas en Checkout Pro, pero el límite de cuotas por compra también depende de los valores mínimo y máximo determinados por cada bandera del país en que se encuentra tu tienda." +"Conversion tags","Tags de conversión" +"You can link your Checkout Pro sales with external services.","Puedes asociar tus ventas del Checkout Pro a servicios externos." +Facebook,Facebook +"Link your sales with Facebook by entering the ID No. and your tracking code.","Asocia tus ventas al Facebook, informando el ID del de tu código de rastreo." +"Google Ads","Google Ads" +"Link your sales with Google Ads by entering the ID No. and your tracking code.","Asocia tus ventas al Google Ads, informando el ID del tu código de rastreo." +"Link your sales with Google Ads by entering the Label and your tracking code.","Asocia tus ventas al Google Ads, informando el Label del tu código de rastreo." +"Customization and Styles","Personalización y estilos" +"Set up how the items will appear in the modal window in which the buyer will complete the purchase.","Define la apariencia de los ítems en la ventana modal en la que el cliente finalizará la compra." +"Header Color","Color del header" +"Elements Color","Colores de los elementos" +"Common Payment Method Definitions","Definiciones comunes de medios de pago" +"Minimum order total","Monto mínimo del pedido" +"Minimum amount to pay with Checkout Pro.","Monto mínimo para pago con Checkout Pro." +"Maximum order amount","Monto máximo de pedido" +"Maximum amount to pay with Checkout Pro","Monto máximo a pagar con Checkout Pro." +"Payment From Specific Countries","Pago de países específicos" +"Countries eligible to use this payment method.","Países que pueden usar este medio de pago." +"Sort Order","Orden de visualización" +"Sets up in which order the payment methods will be shown at the Checkout.","Define el orden de visualización del medio de pago en el Checkout." +"Checkout Transparent","Checkout Transparente" +"Capture of customer details in the payment form","Captura de datos del cliente en el formulario de pago" +"Activate this option if you want to obtain buyer`s documents details, using an additional field on the payment form. Disable it if your store already gets these details.","Activa esta función para capturar documentos de clientes con un campo adicional en el formulario de pago. Desactívala si la tienda ya captura estos datos." +"Capture document identification","Capturar documento de identificación" +"Capture name","Capturar nombre" +"In case you leave this option active, an additional field in the payment form will obtain this information. If disabled, details will be retrieved directly from other fields within your store.","Si se activa, el formulario de pago mostrará un campo adicional para colectar esa información. Si se inhabilita, el monto será capturado directamente de otros campos en tu tienda." +"Credit and debit cards","Tarjeta de crédito y débito" +"Enable vault","Habilitar caja fuerte" +"Allows buyer to save the card for future use.","Permite que tu cliente guarde la tarjeta para uso futuro." +"Payment Action","Perfil de pago" +"Consult the store's business sector to be able to select capturing the payment at the time of the purchase or at a later moment.","Consulta la rama de negocios de la tienda para poder elegir entre capturar el pago en el acto de la compra o posteriormente." +"Use Binary Mode","Usa el modo binario" +"Installment and interest","Cuotas e intereses" +"Set within your account","Definir en tu cuenta" +"Minimum amount for payment with this payment method.","Monto mínimo para este medio de pago." +"Maximum amount for payment with this payment method.","Monto máximo para este medio de pago." +Pse,Pse +"Minimum amount to pay with Pse.","Monto mínimo a pagar con Pse." +"Maximum amount to pay with Pse.","Monto máximo a pagar con Pse." +Webpay,Webpay +"Minimum amount to pay with Webpay.","Monto mínimo a pagar con Webpay." +"Maximum amount to pay with Webpay.","Monto máximo a pagar con Webpay." +"Store information hosted in Mercado Pago","Información de la tienda en Mercado Pago" +"User Id","Código de identificación" +"User Email","E-mail de usuario" +"User Name","Nombre" +"mp_payment_id","Identificación de pago (Mercado Pago)" +"card_installments","Cuotas" +"card_finance_cost","Custo do Parcelamento" +"card_type","Bandera" +"card_number","Numero de tarjeta" +"card_holder_name","Nombre impreso en tarjeta" +"card_exp_year","Año de vencimiento" +"card_exp_month","Mês de vencimiento" +"payer_document_identification","Documento de identificación" +"payer_first_name","Nombre" +"payer_last_name","Apellido" +"init_point","Link" +"date_of_expiration","Fecha de expiración" +"barcode","Código de barras" +"external_resource_url","Enlace de pago" +"verification_code","Código de verificación" +"financial_institution","Institución" +"payer_document_type","Tipo de documento" +"mp_status","Estado (Mercado Pago)" +"mp_status_detail","Estado Detallado (Mercado Pago)" +"Link","Link" +"Line Code","Código de Barras" +"Payer Document Type","Tipo de Documento" +"Payment Type (Mercado Pago)","Tipo de pago (Mercado Pago )" +"Installments (Mercado Pago)","Financiacíon o quotas (Mercado Pago )" +"Pix QR Code","Código QR do pix" +"Pix Code","Código de pix" +"The order %1, was refunded directly on Mercado Pago, you need to check stock of sold items.","El pedido %1 ha sido reembolsado directamente en el Mercado Pago, debe verificar su inventario de productos vendidos." +"The order %1, was refunded directly on Mercado Pago, but an error occured when refunding offline, you need to check order refunds and stock of sold items.","El pedido %1, fue reembolsado directamente en Mercado Pago, pero ocurrió un error al reembolsar fuera de línea, debe consultar las devoluciones del pedido y el stock de artículos vendidos." +"Order refunded in Mercado Pago, refunded offline in the store.","Solicitud reembolsada del Mercado Pago, reembolsado offline creado en la tienda." +"Order refunded.","Solicitud refactada.." +"API Integration","Integración de API" +"Receive refund notification","Recibir notificación de reembolso" +"Enable the creation of a Credit Note when a refund occurs in Mercado Pago.","Habilitar la creación de notas de credito cuando ocurra un reembolso en Mercado Pago." +"Enable Facebook pixel","Activar Pixel de Facebook" +"Enable Google pixel","Activar Google Pixel" +"Please check store id %1 credentials, they are invalid so they were deleted.","Verifique las credenciales de la tienda ID %1, no son válidas para que se eliminen." +"Your payment was declined due to an error in the store setup. Please get in touch with the store support and try again later.","Tu pago fue rechazado por un error en la configuración de la tienda. Contáctate con el soporte de la tienda e inténtalo más tarde." +"It was not possible to complete the payment due to a communication error. Please try again later.","No pudimos completar el pago por una falla de comunicación. Inténtalo más tarde." +"Your payment was declined because some of your card details are incorrect. Please check the information to complete the purchase.","Tu pago fue rechazado porque algún dato de la tarjeta es incorrecto. Verifica la información para finalizar la compra." +"Your payment was declined. We recommend that you use the device and payment method you usually use for online shopping.","Tu pago fue rechazado. Recomendamos que utilices el dispositivo y el medio de pago que sueles usar para compras online." +"It was not possible to complete the payment. Please use another method to complete the purchase.","No pudimos completar el pago. Usa otro medio para finalizar tu compra." +"It was not possible to complete the payment due to a communication error. Please try again later or use another payment method.","No pudimos completar el pago por una falla de comunicación. Inténtalo más tarde o usa otro medio de pago." +"Offline Payments Methods","Medios de Pago OFF" +"Exclude Payment Methods","Excluir métodos de pago" +"Select the payment methods you do NOT want to accept.","Seleccione los métodos de pago que NO desea aceptar." +"Payment Title","Título del metodo de pago" +"Accept all payment methods","Aceptar todos los medios de pago" +"There are no payment methods available, please contact the seller.", "No hay métodos de pago disponibles, póngase en contacto con el vendedor." +"Generate the ticket and pay it wherever you want.","Genere el ticket de pago y pague." +"Will be approved within 2 business days.","Será aprobado en hasta 2 días hábiles." +"Ticket - MercadoPago","Ticket - MercadoPago" +"Expiration","Vencimiento" +"PAYMENT INFORMATION","INFORMACIÓN DE PAGO" +"Payment Number (Mercado Pago): %1","Número de Pago (Mercado Pago): %1" +"FIRST PAYMENT METHOD", "PRIMERA FORMA DE PAGO" +"Card number:","Número de la tarjeta:" +"Expiration date:","Fecha de vencimiento:" +"Card holder:","Titular de la tarjeta:" +"Payment method:","Medio de pago:" +"Installments:","Cuotas:" +"Identification in the invoice:","Identificación en el resumen:" +"Payment status:","Estado del pago:" +"Detailed payment status:","Estado detallado del pago:" +"SECOND PAYMENT METHOD","SEGUNDA FORMA DE PAGO" +"Your order is %1!","Recibimos tu pedido %1!" +"Thank you for your purchase!","Gracias por su compra!" +"We are processing your payment","Estamos procesando tu pago" +"Continue Shopping","Seguir comprando" +"Create an Account","Crear una cuenta" +"First card details:","Datos de la primera tarjeta:" +"Enter the amount to be paid with the first method *", "Ingresá el monto a pagar con el primer medio *" +"Value not allowed!","Valor no permitido!" +"Remaining value ","Valor restante " +"Credit card","Tarjeta de crédito" +"Second card details:","Datos de la segunda tarjeta:" +"Payment processed by Mercado Pago","Pago procesado por Mercado Pago" +"This is a required field.","Este es un campo obligatorio." +"You can track your order status by creating an account.","Puede rastrear el estado de su pedido creando una cuenta." +"cardNumber should be a number.","Número de la tarjeta debería ser un número." +"cardNumber is empty.","Número de la tarjeta está vacío." +"cardNumber should be of length between '8' and '19'.","Número de la tarjeta debe ser de longitud entre '8' y '19'." +"securityCode should be a number.","CVV - Código de seguridad debería ser un número." +"securityCode should be of length '3' or '4'.","CVV - Código de seguridad debe ser de longitud '3' o '4'." +"securityCode is empty.","CVV - Código de seguridad esta vacio." +"expirationMonth should be a number.","Mes de vencimiento debería ser un número." +"expirationMonth is empty.","Mes de vencimiento esta vacio." +"expirationYear should be of length '2' or '4'.","Año de vencimiento debe ser de longitud '2' o '4'." +"expirationYear should be a number.","Año de vencimiento debería ser un número." +"expirationYear is empty.","Año de vencimiento esta vacio." +"expirationMonth should be a value from 1 to 12.","Mes de vencimiento debe ser un valor de 1 a 12." +"expirationYear value should be greater or equal than %1.", "Año de vencimiento no es válido" +"expirationMonth value should be greater than '%1' or expirationYear value should be greater than '%2'.", "Mes de vencimiento o el valor del año de vencimiento no es válido." +"cardNumber should be of length '16'.","Número de la tarjeta debe ser de longitud 16." +"Pay with two cards","Pagar con dos tarjetas" +"Payment with two cards","Pago con dos tarjetas" +"Interest-free","Sin interés" +"Your Bank will apply Interest","Tu Banco aplicará Intereses" +"Complete your order to proceed with payment.","Finaliza tu pedido para proceder con el pago." +"approved","Aprobado" +"cancelled","Cancelado" +"authorized","Autorizado" +"accredited","Autorizado" +"rejected","Rechazado" +"pending","Pendiente" +"partially_refunded","Reembolso Parcial" +"cc_rejected_call_for_authorize","Solicitud de autorización rechazada" +"in_process","En proceso" +"by_admin","Por Admin" +"cc_rejected_high_risk","Alto riesgo" +"cc_rejected_insufficient_amount","Valor Insuficiente" +"cc_rejected_other_reason","Otro Motivo" +"cc_rejected_bad_filled_security_code","security_code rellenado incorrectamente" +"cc_rejected_bad_filled_other","Rellenado incorrectamente" +"cc_rejected_bad_filled_card_number","card_number rellenado incorrectamente" +"cc_rejected_bad_filled_date","Data rellenado incorrectamente" +"cc_rejected_card_disabled","Tarjeta desactivada" +"cc_rejected_max_attempts","Intentos máximos" +"cc_rejected_invalid_installments","Cuotas llenado incorrectamente" +"cc_rejected_duplicated_payment","Pago duplicado" +"bank_rejected","Rechazado por el banco" +"bank_error","Error del banco" +"rejected_by_bank","Rechazado por el Banco" +"refunded","Reintegrado" +"by_collector","Por Vendedor" +"expired","Expirado", +"by_payer","Por pagador" +"pending_review_manual","Pendiente de revisión manual" +"pending_capture","Captura pendiente" +"reimbursed","Reintegrado" +"pending_waiting_payment","Aguardando pago pendiente" +"pending_waiting_for_remedy","Pendiente en espera de solución" +"unavailable","Indisponible" +"pending_waiting_transfer","Pendiente aguardando transferencia" +"Credit or Debit Card","Tarjeta de Crédito o Débito" +"Email Address","Correo electrónico" +"We'll email you an order confirmation with details and tracking info.","Enviaremos un correo electrónico con la confirmación del pedido con detalles e información de seguimiento." +"Your order number is: %1.","Recibimos su pedido: %1!" +"Your order # is: %1.","Recibimos su pedido: %1!" +"By continuing, you agree to our ","Al continuar aceptas nuestros " +"Terms and Conditions.","Términos y Condiciones." +"Status (Mercado Pago)","Estado (Mercado Pago)" +"Status Detail (Mercado Pago)","Detalle de estado (Mercado Pago)" +"Google Ads - Id","Google Ads - Id" +"Google Ads - Label","Google Ads - Label" +"The card details are incorrect.","Los datos de la tarjeta son incorrectos." +"The payment was rejected due to suspicion of fraud.","El pago fue rechazado por sospecha de fraude." +"The payment method used requires prior authorization of the purchase amount.","El medio de pago utilizado requiere previa autorización del monto de la compra." +"This card is blocked.","La tarjeta está bloqueada." +"You made a similar payment a short time ago. Please use another payment method.","Hiciste un pago similar recientemente, usa otro medio de pago." +"Something went wrong with the payment. Please use another card or choose a different payment method.","Algo salió mal con el pago. Paga con otra tarjeta o elige otro medio de pago." +"The number of installments chosen is invalid.","El número de cuotas elegido no es válido." +"The maximum number of attempts was reached.","Alcanzaste el número máximo de intentos de pago." +"Something went wrong. Please try again.","Algo salió mal, por favor inténtalo de nuevo." +"It was not possible to complete the payment. Please use another method to complete the purchase.","No pudimos completar el pago. Usa otro medio para finalizar tu compra." +"Your payment was declined because some of your card details are incorrect. Please check the information to complete the purchase or try another payment method.","Tu pago fue rechazado porque algún dato de la tarjeta es incorrecto. Verifica la información para finalizar la compra o utiliza otro método de pago." +"Your credentials are incorrect. Please double-check in your account your credentials are correct.","Sus credenciales son incorrectas. Regrese para completar las credenciales de su tienda correctamente." +"Your credentials are incorrect. Test credentials have been filled in and should be used in sandbox mode. Please check the credentials again.","Sus credenciales son incorrectas. Las credenciales son de prueba y se deben usar en modo sandbox. Por favor, regrese para completar las credenciales de nuevo." +"Your credentials are incorrect. Production credentials have been filled in and should be used in production mode. Please check the credentials again.","Sus credenciales son incorrectas. Las credenciales son de Producción y se deben usar en modo Producción. Por favor, regrese para completar las credenciales de nuevo." +"Minimum transaction amount not allowed for the chosen brand. Please choose another flag or make a purchase over %1.", "Monto mínimo de transacción no permitido para la Bandera elegida. Elija otra Bandera o realice una compra superior a %1." +"Download the Boleto","Descarga del boleto" +"pending_contingency", "Pendiente de contingencia" +"Pay with the method of payment you prefer and all the security of Mercado Pago.
If you already have an account at Mercado Livre, use the same email and password.
Use your Mercado Pago account balance or saved cards to buy without filling out more details.","Paga con el medio de pago que prefieras y disfruta de la seguridad de Mercado Pago.
Si ya tiene una cuenta en Mercado Livre, use el mismo e-mail y clave.
Usa tu saldo de Mercado Pago o tarjetas guardadas para comprar sin llenar más detalles." +"Payments with immediate approval.
The payment term is up to %1.
At checkout, you will receive the code to make payment at the bank of your choice (check with your bank for your daily Pix transfer limit).", "Pagos con aprobación inmediata.
El plazo de pago es hasta %1.
Al finalizar la compra, recibirá el código para realizar el pago en el banco de su elección (verifique con su banco cuál es su límite diario de transferencia de Pix)." +"Please fill a valid color in the Checkout Pro configuration","Complete un color válido en la configuración de Checkout Pro" diff --git a/i18n/es_CL.csv b/i18n/es_CL.csv new file mode 100644 index 0000000..1c482de --- /dev/null +++ b/i18n/es_CL.csv @@ -0,0 +1,378 @@ +"Finance Cost","Custo do Parcelamento" +"Discount for payment at sight","Descuento para pagar en un pago" +"Set up installments and interest","Definir cuotas e intereses" +"Order not found.","Pedido no localizado." +"Mercado Pago, refund notification","Mercado Pago, notificación de reembolso" +"The order %1, was refunded directly on Mercado Pago, you need to create an offline refund.","El pedido %1, fue reembolsado directamente en Mercado Pago, necesitas crear un reembolso offline." +Unavailable.,No disponible. +"You should not be here...","No tienes que estar aquí..." +"Order Canceled.","Pedido cancelado." +"Transaction has been declined. Please try again later.","La operación fue rechazada. Por favor inténtalo de nuevo más tarde." +"%1 minutes","%1 minutos" +"1 hour","1 hora" +"12 hours","12 horas" +"1 day","1 día" +"Payment for order %1 in store %2","Pago del pedido %1 en la tienda %2" +Tax,Impuesto +"Awaiting payment of the Card.","Esperando pago via tarjeta." +"Awaiting payment.","Esperando pago." +"Awaiting payment through Checkout Pro.","Esperando pago a través del Checkout Pro." +"Awaiting payment through Pix.","Esperando pago via Pix." +"The gateway declined the transaction.","El gateway rechazó la operación." +"Please select a category","Por favor, selecciona una categoría" +description,descripción +Production,Producción +"Sandbox - Testing environment","Ecositema de testeo" +"Yes, Processed Order Synchronous","Sí, procesar solicitudes sincrónicamente" +"No, Processed Order Asynchronous","No, procesar solicitudes asíncronas" +"1 installment","1 cuota" +"2 installments","2 cuotas" +"3 installments","3 cuotas" +"4 installments","4 cuotas" +"5 installments","5 cuotas" +"6 installments","6 cuotas" +"7 installments","7 cuotas" +"8 installments","8 cuotas" +"9 installments","9 cuotas" +"10 installments","10 cuotas" +"11 installments","11 cuotas" +"12 installments","12 cuotas" +"13 installments","13 cuotas" +"14 installments","14 cuotas" +"15 installments","15 cuotas" +"16 installments","16 cuotas" +"17 installments","17 cuotas" +"18 installments","18 cuotas" +"19 installments","19 cuotas" +"20 installments","20 cuotas" +"21 installments","21 cuotas" +"22 installments","22 cuotas" +"23 installments","23 cuotas" +"24 installments","24 cuotas" +"25 installments","25 cuotas" +"26 installments","26 cuotas" +"27 installments","27 cuotas" +"28 installments","28 cuotas" +"29 installments","29 cuotas" +"30 installments","30 cuotas" +"31 installments","31 cuotas" +"32 installments","32 cuotas" +"33 installments","33 cuotas" +"34 installments","34 cuotas" +"35 installments","35 cuotas" +"36 installments","36 cuotas" +"Do Not Delete","No Finalizar" +name,nombre +"Authorization for future capture","Autorización para la captura futura" +"Authorization for immediate capture","Autorización y captura inmediata" +Configure,Configure +Close,Cerrar +"15 minutes","15 minutos" +"30 minutes - recommended","30 minutos - recomendado" +"24 hours","24 horas" +"Modal window in store environment","Ventana modal en el ecosistema de la tienda" +"Redirection to Mercado Pago environment","Redireccionamiento al ecosistema de Mercado Pago" +"Cart %1 doesn't contain products","El carrito %1 no tiene productos" +"There was an error when creating the payment. Please try again later.","Error al crear el pago. Inténtalo de nuevo más tarde." +"It was not possible to save on the installment cost amount","No fue posible economizar el monto del costo de las cuotas" +"Default Store %1 - Set Data for store id %2 Web Site Id %3","Store ID: %1 No habilitado para el uso en producción" +Finished,Finalizado +"Store ID: %1 Not allowed for production use","Datos del comerciante obtenidos con éxito." +"There was an error saving: %1","Error al guardar: %1" +"Error fetching information: %1","Error al obtener información %1" +"Please check store id %1 credentials","Por favor, verifica las credenciales de la tienda id %1" +"Order %1 - Increment Id %2 - state %3","Order %1 - Increment ID %2 - Status %3" +"Card - MercadoPago","Card - MercadoPago" +"Checkout Pro - MercadoPago","Checkout Pro - MercadoPago" +"Pix - MercadoPago","Pix - MercadoPago" +"Pse - MercadoPago","Pse - MercadoPago" +"Webpay - MercadoPago","Webpay - MercadoPago" +"Document Type","Tipo de documento" +"Document number","Número del documento" +Instruction,Instrucciones +"Due date","Vencimiento" +"In order to comply with PCI regulations, the administrator cannot capture this payment method.","Debido al cumplimiento de la normativa PCI, no es posible capturar este método de pago por el administrador." +"Payer Entity Type","Tipo de la institución de pago" +"Financial Institution","Institución financiera" +"Your access credential for store %1 is valid but you don\'t have production use permission. Request approval before use by click here.","Tu credencial de acceso a la tienda %1 es válida, pero no tienes permiso de uso de producción. Solicita aprobación antes de usar clic aquí." +"Your payment will be valid until","Tu pago es válido hasta" +"Link for payment","Link para pago" +"Details for payment","Detalles para el pago" +"Verification Code","Código de verificación" +"Line Code is","El line code es" +"Issued on behalf of","Emitido en nombre de" +"Mercado Pago partnership code","Código de convenio con Mercado Pago" +"To pay, please scan the QR code","Para pagar, escanea el código QR" +"or, if you prefer, copy-paste the code","o, si prefieres, copia y pega el código" +"Further instructions","Leer más instrucciones" +"The Line Code is","El line code es" +Copy,Copiar +Copied,Copiado +"Enter the ID Document you used in the purchase","Ingresa el Documento de identificación usado en la compra" +Pix,Pix +Waiting...,Esperando... +"Place Order","Realizar Pedido" +"Payer First Name","Nombre del Pagador" +"Payer Last Name","Apellido del Pagador" +"Card details","Datos de la tarjeta" +"Card number","Número de la tarjeta" +"CVV - Card Verification Value","CVV - Código de seguridad" +"What is this?","¿Qué es eso?" +"Expiration month","Mes de vencimiento" +"Expiration year","Año de vencimiento" +"Card holder full name","Nombre impreso en la tarjeta" +"Number of installments","Número de cuotas" +"Save for later use.","Guardar para uso futuro." +"A 3-digit number in italics on the back of your card.","Un número de 3 dígitos en itálica en el dorso de tu tarjeta." +"Entity Type","Tipo de entidad" +"Please provide a valid document identification.","No fue posible realizar el pago. Por favor, presenta un documento de identidad válido." +"Unable to make payment, check card details.","No fue posible realizar el pago. Por favor, verifica los datos de la tarjeta." +"Payment Services","Servicio de pago" +"Permission to set up the module","Permiso para configurar el módulo" +"","" +"Technical support available here.","Soporte técnico disponible aquí." +"Basic Settings","Configuraciones básicas" +"Mercado Pago integration","Integración con Mercado Pago" +"

In order to sell or test a store, you must first enter your test and production credentials.

Using the account of the collaborator with access to Mercado Pago Seller Account, search the credentials according to the account: Argentina, Brazil, Chile, Colombia, Mexico, Uruguay and Peru.

","

Para vender o testear la tienda , tienes que ingresar las credenciales de test y de producción.

Con el colaborador con acceso a la Cuenta del Vendedor de Mercado Pago, busca las credenciales según la cuenta: Argentina, Brazil, Chile, Colombia, Mexico, Uruguay and Peru.

" +"Checkout operation mode","Modo de Operación del Checkout" +"When operational mode is set as Sandbox, your sales will not be communicated to financial institutions.","Cuando el modo operacional esté definido como Sandbox, tus ventas no serán comunicadas a las instituciones financieras." +"Public Key - production","Public Key - producción" +"Access Token - production","Access Token - producción" +"Public Key - Sandbox","Public Key - Sandbox" +"Access Token - Sandbox","Access Token - Sandbox" +"Developers support","Soporte para desarrolladores" +Debug,Debug +"We record your store's communications with Mercado Pago in orer to offer a better support. Please note it is not recommended to use the debug mode when your store is in production mode.","Registramos las comunicaciones de tu tienda con Mercado Pago para ofrecer un soporte aún mejor. Atención: no se recomienda usar el modo debug con la tienda en modo de producción." +"Rewrite notification URL","Reescribe la notificación URL" +"You can override notification URLs which are automatically generated. In order to use the module's default, please do not fill in this details.","Puedes substituir las URLs de notificación que se generan automáticamente. Para usar el padrón del módulo, por favor, no cargues estos datos." +"Store Name, Category and Integrator ID","Nombre de la tienda, Categoría e ID del Integrador" +"Store Name","Nombre de la tienda" +"This is the store's name as it will appear on the customer's invoice. In case the sale was made through Checkout Pro, the invoice will also show Mercado Pago in the name.","El nombre de la tienda igual a como figurará en la factura del cliente. Si la venta se hizo por medio del Checkout Pro, la factura también identificará a Mercado Pago en el nombre." +"Category of your store","Categoría de tu tienda" +"The product category of your store on Mercado Pago.","La categoría del producto de tu tienda en Mercado Pago." +"Integrator ID","ID del integrador" +"With this number, we are able to identify all your transactions and know how many sales were processed using your account. Become a certified Mercado Pago partner and request your integrator_id here.","Con este número, podemos identificar todas tus operaciones y saber cuántas ventas fueron procesadas con tu cuenta. Conviértete en un socio certificado de Mercado Pago y pide tu integrator_id here." +"Sales requirements","Exigencias de ventas" +"Checkout Pro","Checkout Pro" +Enabled,Activado +Title,Título +"Payment method title at the store's checkout.","Título de la forma de pago en el checkout de la tienda." +"Deadline for payment","Plazo límite para el pago" +"Calendar days.","Días seguidos." +"Payment completion view","Visualización de la finalización del pago" +"Modal: Buyer will close via modal on the checkout screen. Redirection: Buyer will be redirected to the Mercado Pago website.","Modal, el cliente finalizará vía modal en la pantalla de checkout. Redireccionamiento, el cliente será redireccionado al sitio de Mercado Pago" +"Removed payment method","Medio de pago finalizado" +"Select the payment methods you do NOT want to accept.","Selecciona los medios de pago que NO quieres aceptar." +"Installment options limit","Límite de cuotas" +"It is possible to configure the number of installments in Checkout Pro, but the limit of installments per purchase will also depend on the minimum and maximum amount defined by each flag in the country of your store.","Se puede configurar el número de cuotas en Checkout Pro, pero el límite de cuotas por compra también depende de los valores mínimo y máximo determinados por cada bandera del país en que se encuentra tu tienda." +"Conversion tags","Tags de conversión" +"You can link your Checkout Pro sales with external services.","Puedes asociar tus ventas del Checkout Pro a servicios externos." +Facebook,Facebook +"Link your sales with Facebook by entering the ID No. and your tracking code.","Asocia tus ventas al Facebook, informando el ID del de tu código de rastreo." +"Google Ads","Google Ads" +"Link your sales with Google Ads by entering the ID No. and your tracking code.","Asocia tus ventas al Google Ads, informando el ID del tu código de rastreo." +"Link your sales with Google Ads by entering the Label and your tracking code.","Asocia tus ventas al Google Ads, informando el Label del tu código de rastreo." +"Customization and Styles","Personalización y estilos" +"Set up how the items will appear in the modal window in which the buyer will complete the purchase.","Define la apariencia de los ítems en la ventana modal en la que el cliente finalizará la compra." +"Header Color","Color del header" +"Elements Color","Colores de los elementos" +"Common Payment Method Definitions","Definiciones comunes de medios de pago" +"Minimum order total","Monto mínimo del pedido" +"Minimum amount to pay with Checkout Pro.","Monto mínimo para pago con Checkout Pro." +"Maximum order amount","Monto máximo de pedido" +"Maximum amount to pay with Checkout Pro","Monto máximo a pagar con Checkout Pro." +"Payment From Specific Countries","Pago de países específicos" +"Countries eligible to use this payment method.","Países que pueden usar este medio de pago." +"Sort Order","Orden de visualización" +"Sets up in which order the payment methods will be shown at the Checkout.","Define el orden de visualización del medio de pago en el Checkout." +"Checkout Transparent","Checkout Transparente" +"Capture of customer details in the payment form","Captura de datos del cliente en el formulario de pago" +"Activate this option if you want to obtain buyer`s documents details, using an additional field on the payment form. Disable it if your store already gets these details.","Activa esta función para capturar documentos de clientes con un campo adicional en el formulario de pago. Desactívala si la tienda ya captura estos datos." +"Capture document identification","Capturar documento de identificación" +"Capture name","Capturar nombre" +"In case you leave this option active, an additional field in the payment form will obtain this information. If disabled, details will be retrieved directly from other fields within your store.","Si se activa, el formulario de pago mostrará un campo adicional para colectar esa información. Si se inhabilita, el monto será capturado directamente de otros campos en tu tienda." +"Credit and debit cards","Tarjeta de crédito y débito" +"Enable vault","Habilitar caja fuerte" +"Allows buyer to save the card for future use.","Permite que tu cliente guarde la tarjeta para uso futuro." +"Payment Action","Perfil de pago" +"Consult the store's business sector to be able to select capturing the payment at the time of the purchase or at a later moment.","Consulta la rama de negocios de la tienda para poder elegir entre capturar el pago en el acto de la compra o posteriormente." +"Use Binary Mode","Usa el modo binario" +"Installment and interest","Cuotas e intereses" +"Set within your account","Definir en tu cuenta" +"Minimum amount for payment with this payment method.","Monto mínimo para este medio de pago." +"Maximum amount for payment with this payment method.","Monto máximo para este medio de pago." +Pse,Pse +"Minimum amount to pay with Pse.","Monto mínimo a pagar con Pse." +"Maximum amount to pay with Pse.","Monto máximo a pagar con Pse." +Webpay,Webpay +"Minimum amount to pay with Webpay.","Monto mínimo a pagar con Webpay." +"Maximum amount to pay with Webpay.","Monto máximo a pagar con Webpay." +"Store information hosted in Mercado Pago","Información de la tienda en Mercado Pago" +"User Id","Código de identificación" +"User Email","E-mail de usuario" +"User Name","Nombre" +"mp_payment_id","Identificación de pago (Mercado Pago)" +"card_installments","Cuotas" +"card_finance_cost","Custo do Parcelamento" +"card_type","Bandera" +"card_number","Numero de tarjeta" +"card_holder_name","Nombre impreso en tarjeta" +"card_exp_year","Año de vencimiento" +"card_exp_month","Mês de vencimiento" +"payer_document_identification","Documento de identificación" +"payer_first_name","Nombre" +"payer_last_name","Apellido" +"init_point","Link" +"date_of_expiration","Fecha de expiración" +"barcode","Código de barras" +"external_resource_url","Enlace de pago" +"verification_code","Código de verificación" +"financial_institution","Institución" +"payer_document_type","Tipo de documento" +"mp_status","Estado (Mercado Pago)" +"mp_status_detail","Estado Detallado (Mercado Pago)" +"Link","Link" +"Line Code","Código de Barras" +"Payer Document Type","Tipo de Documento" +"Payment Type (Mercado Pago)","Tipo de pago (Mercado Pago )" +"Installments (Mercado Pago)","Financiacíon o quotas (Mercado Pago )" +"Pix QR Code","Código QR do pix" +"Pix Code","Código de pix" +"The order %1, was refunded directly on Mercado Pago, you need to check stock of sold items.","El pedido %1 ha sido reembolsado directamente en el Mercado Pago, debe verificar su inventario de productos vendidos." +"The order %1, was refunded directly on Mercado Pago, but an error occured when refunding offline, you need to check order refunds and stock of sold items.","El pedido %1, fue reembolsado directamente en Mercado Pago, pero ocurrió un error al reembolsar fuera de línea, debe consultar las devoluciones del pedido y el stock de artículos vendidos." +"Order refunded in Mercado Pago, refunded offline in the store.","Solicitud reembolsada del Mercado Pago, reembolsado offline creado en la tienda." +"Order refunded.","Solicitud refactada.." +"API Integration","Integración de API" +"Receive refund notification","Recibir notificación de reembolso" +"Enable the creation of a Credit Note when a refund occurs in Mercado Pago.","Habilitar la creación de notas de credito cuando ocurra un reembolso en Mercado Pago." +"Enable Facebook pixel","Activar Pixel de Facebook" +"Enable Google pixel","Activar Google Pixel" +"Please check store id %1 credentials, they are invalid so they were deleted.","Verifique las credenciales de la tienda ID %1, no son válidas para que se eliminen." +"Your payment was declined due to an error in the store setup. Please get in touch with the store support and try again later.","Tu pago fue rechazado por un error en la configuración de la tienda. Contáctate con el soporte de la tienda e inténtalo más tarde." +"It was not possible to complete the payment due to a communication error. Please try again later.","No pudimos completar el pago por una falla de comunicación. Inténtalo más tarde." +"Your payment was declined because some of your card details are incorrect. Please check the information to complete the purchase.","Tu pago fue rechazado porque algún dato de la tarjeta es incorrecto. Verifica la información para finalizar la compra." +"Your payment was declined. We recommend that you use the device and payment method you usually use for online shopping.","Tu pago fue rechazado. Recomendamos que utilices el dispositivo y el medio de pago que sueles usar para compras online." +"It was not possible to complete the payment. Please use another method to complete the purchase.","No pudimos completar el pago. Usa otro medio para finalizar tu compra." +"It was not possible to complete the payment due to a communication error. Please try again later or use another payment method.","No pudimos completar el pago por una falla de comunicación. Inténtalo más tarde o usa otro medio de pago." +"Offline Payments Methods","Medios de Pago OFF" +"Exclude Payment Methods","Excluir métodos de pago" +"Select the payment methods you do NOT want to accept.","Seleccione los métodos de pago que NO desea aceptar." +"Payment Title","Título del metodo de pago" +"Accept all payment methods","Aceptar todos los medios de pago" +"There are no payment methods available, please contact the seller.", "No hay métodos de pago disponibles, póngase en contacto con el vendedor." +"Generate the ticket and pay it wherever you want.","Genere el ticket de pago y pague." +"Will be approved within 2 business days.","Será aprobado en hasta 2 días hábiles." +"Ticket - MercadoPago","Ticket - MercadoPago" +"Expiration","Vencimiento" +"PAYMENT INFORMATION","INFORMACIÓN DE PAGO" +"Payment Number (Mercado Pago): %1","Número de Pago (Mercado Pago): %1" +"FIRST PAYMENT METHOD", "PRIMERA FORMA DE PAGO" +"Card number:","Número de la tarjeta:" +"Expiration date:","Fecha de vencimiento:" +"Card holder:","Titular de la tarjeta:" +"Payment method:","Medio de pago:" +"Installments:","Cuotas:" +"Identification in the invoice:","Identificación en el resumen:" +"Payment status:","Estado del pago:" +"Detailed payment status:","Estado detallado del pago:" +"SECOND PAYMENT METHOD","SEGUNDA FORMA DE PAGO" +"Your order is %1!","Recibimos tu pedido %1!" +"Thank you for your purchase!","Gracias por su compra!" +"We are processing your payment","Estamos procesando tu pago" +"Continue Shopping","Seguir comprando" +"Create an Account","Crear una cuenta" +"First card details:","Datos de la primera tarjeta:" +"Enter the amount to be paid with the first method *", "Ingresá el monto a pagar con el primer medio *" +"Value not allowed!","Valor no permitido!" +"Remaining value ","Valor restante " +"Credit card","Tarjeta de crédito" +"Second card details:","Datos de la segunda tarjeta:" +"Payment processed by Mercado Pago","Pago procesado por Mercado Pago" +"This is a required field.","Este es un campo obligatorio." +"You can track your order status by creating an account.","Puede rastrear el estado de su pedido creando una cuenta." +"cardNumber should be a number.","Número de la tarjeta debería ser un número." +"cardNumber is empty.","Número de la tarjeta está vacío." +"cardNumber should be of length between '8' and '19'.","Número de la tarjeta debe ser de longitud entre '8' y '19'." +"securityCode should be a number.","CVV - Código de seguridad debería ser un número." +"securityCode should be of length '3' or '4'.","CVV - Código de seguridad debe ser de longitud '3' o '4'." +"securityCode is empty.","CVV - Código de seguridad esta vacio." +"expirationMonth should be a number.","Mes de vencimiento debería ser un número." +"expirationMonth is empty.","Mes de vencimiento esta vacio." +"expirationYear should be of length '2' or '4'.","Año de vencimiento debe ser de longitud '2' o '4'." +"expirationYear should be a number.","Año de vencimiento debería ser un número." +"expirationYear is empty.","Año de vencimiento esta vacio." +"expirationMonth should be a value from 1 to 12.","Mes de vencimiento debe ser un valor de 1 a 12." +"expirationYear value should be greater or equal than %1.", "Año de vencimiento no es válido" +"expirationMonth value should be greater than '%1' or expirationYear value should be greater than '%2'.", "Mes de vencimiento o el valor del año de vencimiento no es válido." +"cardNumber should be of length '16'.","Número de la tarjeta debe ser de longitud 16." +"Pay with two cards","Pagar con dos tarjetas" +"Payment with two cards","Pago con dos tarjetas" +"Interest-free","Sin interés" +"Your Bank will apply Interest","Tu Banco aplicará Intereses" +"Complete your order to proceed with payment.","Finaliza tu pedido para proceder con el pago." +"approved","Aprobado" +"cancelled","Cancelado" +"authorized","Autorizado" +"accredited","Autorizado" +"rejected","Rechazado" +"pending","Pendiente" +"partially_refunded","Reembolso Parcial" +"cc_rejected_call_for_authorize","Solicitud de autorización rechazada" +"in_process","En proceso" +"by_admin","Por Admin" +"cc_rejected_high_risk","Alto riesgo" +"cc_rejected_insufficient_amount","Valor Insuficiente" +"cc_rejected_other_reason","Otro Motivo" +"cc_rejected_bad_filled_security_code","security_code rellenado incorrectamente" +"cc_rejected_bad_filled_other","Rellenado incorrectamente" +"cc_rejected_bad_filled_card_number","card_number rellenado incorrectamente" +"cc_rejected_bad_filled_date","Data rellenado incorrectamente" +"cc_rejected_card_disabled","Tarjeta desactivada" +"cc_rejected_max_attempts","Intentos máximos" +"cc_rejected_invalid_installments","Cuotas llenado incorrectamente" +"cc_rejected_duplicated_payment","Pago duplicado" +"bank_rejected","Rechazado por el banco" +"bank_error","Error del banco" +"rejected_by_bank","Rechazado por el Banco" +"refunded","Reintegrado" +"by_collector","Por Vendedor" +"expired","Expirado", +"by_payer","Por pagador" +"pending_review_manual","Pendiente de revisión manual" +"pending_capture","Captura pendiente" +"reimbursed","Reintegrado" +"pending_waiting_payment","Aguardando pago pendiente" +"pending_waiting_for_remedy","Pendiente en espera de solución" +"unavailable","Indisponible" +"pending_waiting_transfer","Pendiente aguardando transferencia" +"Credit or Debit Card","Tarjeta de Crédito o Débito" +"Email Address","Correo electrónico" +"We'll email you an order confirmation with details and tracking info.","Enviaremos un correo electrónico con la confirmación del pedido con detalles e información de seguimiento." +"Your order number is: %1.","Recibimos su pedido: %1!" +"Your order # is: %1.","Recibimos su pedido: %1!" +"By continuing, you agree to our ","Al continuar aceptas nuestros " +"Terms and Conditions.","Términos y Condiciones." +"Status (Mercado Pago)","Estado (Mercado Pago)" +"Status Detail (Mercado Pago)","Detalle de estado (Mercado Pago)" +"Google Ads - Id","Google Ads - Id" +"Google Ads - Label","Google Ads - Label" +"The card details are incorrect.","Los datos de la tarjeta son incorrectos." +"The payment was rejected due to suspicion of fraud.","El pago fue rechazado por sospecha de fraude." +"The payment method used requires prior authorization of the purchase amount.","El medio de pago utilizado requiere previa autorización del monto de la compra." +"This card is blocked.","La tarjeta está bloqueada." +"You made a similar payment a short time ago. Please use another payment method.","Hiciste un pago similar recientemente, usa otro medio de pago." +"Something went wrong with the payment. Please use another card or choose a different payment method.","Algo salió mal con el pago. Paga con otra tarjeta o elige otro medio de pago." +"The number of installments chosen is invalid.","El número de cuotas elegido no es válido." +"The maximum number of attempts was reached.","Alcanzaste el número máximo de intentos de pago." +"Something went wrong. Please try again.","Algo salió mal, por favor inténtalo de nuevo." +"It was not possible to complete the payment. Please use another method to complete the purchase.","No pudimos completar el pago. Usa otro medio para finalizar tu compra." +"Your payment was declined because some of your card details are incorrect. Please check the information to complete the purchase or try another payment method.","Tu pago fue rechazado porque algún dato de la tarjeta es incorrecto. Verifica la información para finalizar la compra o utiliza otro método de pago." +"Your credentials are incorrect. Please double-check in your account your credentials are correct.","Sus credenciales son incorrectas. Regrese para completar las credenciales de su tienda correctamente." +"Your credentials are incorrect. Test credentials have been filled in and should be used in sandbox mode. Please check the credentials again.","Sus credenciales son incorrectas. Las credenciales son de prueba y se deben usar en modo sandbox. Por favor, regrese para completar las credenciales de nuevo." +"Your credentials are incorrect. Production credentials have been filled in and should be used in production mode. Please check the credentials again.","Sus credenciales son incorrectas. Las credenciales son de Producción y se deben usar en modo Producción. Por favor, regrese para completar las credenciales de nuevo." +"Minimum transaction amount not allowed for the chosen brand. Please choose another flag or make a purchase over %1.", "Monto mínimo de transacción no permitido para la Bandera elegida. Elija otra Bandera o realice una compra superior a %1." +"Download the Boleto","Descarga del boleto" +"pending_contingency", "Pendiente de contingencia" +"Pay with the method of payment you prefer and all the security of Mercado Pago.
If you already have an account at Mercado Livre, use the same email and password.
Use your Mercado Pago account balance or saved cards to buy without filling out more details.","Paga con el medio de pago que prefieras y disfruta de la seguridad de Mercado Pago.
Si ya tiene una cuenta en Mercado Livre, use el mismo e-mail y clave.
Usa tu saldo de Mercado Pago o tarjetas guardadas para comprar sin llenar más detalles." +"Payments with immediate approval.
The payment term is up to %1.
At checkout, you will receive the code to make payment at the bank of your choice (check with your bank for your daily Pix transfer limit).", "Pagos con aprobación inmediata.
El plazo de pago es hasta %1.
Al finalizar la compra, recibirá el código para realizar el pago en el banco de su elección (verifique con su banco cuál es su límite diario de transferencia de Pix)." +"Please fill a valid color in the Checkout Pro configuration","Complete un color válido en la configuración de Checkout Pro" diff --git a/i18n/es_CO.csv b/i18n/es_CO.csv new file mode 100644 index 0000000..1c482de --- /dev/null +++ b/i18n/es_CO.csv @@ -0,0 +1,378 @@ +"Finance Cost","Custo do Parcelamento" +"Discount for payment at sight","Descuento para pagar en un pago" +"Set up installments and interest","Definir cuotas e intereses" +"Order not found.","Pedido no localizado." +"Mercado Pago, refund notification","Mercado Pago, notificación de reembolso" +"The order %1, was refunded directly on Mercado Pago, you need to create an offline refund.","El pedido %1, fue reembolsado directamente en Mercado Pago, necesitas crear un reembolso offline." +Unavailable.,No disponible. +"You should not be here...","No tienes que estar aquí..." +"Order Canceled.","Pedido cancelado." +"Transaction has been declined. Please try again later.","La operación fue rechazada. Por favor inténtalo de nuevo más tarde." +"%1 minutes","%1 minutos" +"1 hour","1 hora" +"12 hours","12 horas" +"1 day","1 día" +"Payment for order %1 in store %2","Pago del pedido %1 en la tienda %2" +Tax,Impuesto +"Awaiting payment of the Card.","Esperando pago via tarjeta." +"Awaiting payment.","Esperando pago." +"Awaiting payment through Checkout Pro.","Esperando pago a través del Checkout Pro." +"Awaiting payment through Pix.","Esperando pago via Pix." +"The gateway declined the transaction.","El gateway rechazó la operación." +"Please select a category","Por favor, selecciona una categoría" +description,descripción +Production,Producción +"Sandbox - Testing environment","Ecositema de testeo" +"Yes, Processed Order Synchronous","Sí, procesar solicitudes sincrónicamente" +"No, Processed Order Asynchronous","No, procesar solicitudes asíncronas" +"1 installment","1 cuota" +"2 installments","2 cuotas" +"3 installments","3 cuotas" +"4 installments","4 cuotas" +"5 installments","5 cuotas" +"6 installments","6 cuotas" +"7 installments","7 cuotas" +"8 installments","8 cuotas" +"9 installments","9 cuotas" +"10 installments","10 cuotas" +"11 installments","11 cuotas" +"12 installments","12 cuotas" +"13 installments","13 cuotas" +"14 installments","14 cuotas" +"15 installments","15 cuotas" +"16 installments","16 cuotas" +"17 installments","17 cuotas" +"18 installments","18 cuotas" +"19 installments","19 cuotas" +"20 installments","20 cuotas" +"21 installments","21 cuotas" +"22 installments","22 cuotas" +"23 installments","23 cuotas" +"24 installments","24 cuotas" +"25 installments","25 cuotas" +"26 installments","26 cuotas" +"27 installments","27 cuotas" +"28 installments","28 cuotas" +"29 installments","29 cuotas" +"30 installments","30 cuotas" +"31 installments","31 cuotas" +"32 installments","32 cuotas" +"33 installments","33 cuotas" +"34 installments","34 cuotas" +"35 installments","35 cuotas" +"36 installments","36 cuotas" +"Do Not Delete","No Finalizar" +name,nombre +"Authorization for future capture","Autorización para la captura futura" +"Authorization for immediate capture","Autorización y captura inmediata" +Configure,Configure +Close,Cerrar +"15 minutes","15 minutos" +"30 minutes - recommended","30 minutos - recomendado" +"24 hours","24 horas" +"Modal window in store environment","Ventana modal en el ecosistema de la tienda" +"Redirection to Mercado Pago environment","Redireccionamiento al ecosistema de Mercado Pago" +"Cart %1 doesn't contain products","El carrito %1 no tiene productos" +"There was an error when creating the payment. Please try again later.","Error al crear el pago. Inténtalo de nuevo más tarde." +"It was not possible to save on the installment cost amount","No fue posible economizar el monto del costo de las cuotas" +"Default Store %1 - Set Data for store id %2 Web Site Id %3","Store ID: %1 No habilitado para el uso en producción" +Finished,Finalizado +"Store ID: %1 Not allowed for production use","Datos del comerciante obtenidos con éxito." +"There was an error saving: %1","Error al guardar: %1" +"Error fetching information: %1","Error al obtener información %1" +"Please check store id %1 credentials","Por favor, verifica las credenciales de la tienda id %1" +"Order %1 - Increment Id %2 - state %3","Order %1 - Increment ID %2 - Status %3" +"Card - MercadoPago","Card - MercadoPago" +"Checkout Pro - MercadoPago","Checkout Pro - MercadoPago" +"Pix - MercadoPago","Pix - MercadoPago" +"Pse - MercadoPago","Pse - MercadoPago" +"Webpay - MercadoPago","Webpay - MercadoPago" +"Document Type","Tipo de documento" +"Document number","Número del documento" +Instruction,Instrucciones +"Due date","Vencimiento" +"In order to comply with PCI regulations, the administrator cannot capture this payment method.","Debido al cumplimiento de la normativa PCI, no es posible capturar este método de pago por el administrador." +"Payer Entity Type","Tipo de la institución de pago" +"Financial Institution","Institución financiera" +"Your access credential for store %1 is valid but you don\'t have production use permission. Request approval before use by click here.","Tu credencial de acceso a la tienda %1 es válida, pero no tienes permiso de uso de producción. Solicita aprobación antes de usar clic aquí." +"Your payment will be valid until","Tu pago es válido hasta" +"Link for payment","Link para pago" +"Details for payment","Detalles para el pago" +"Verification Code","Código de verificación" +"Line Code is","El line code es" +"Issued on behalf of","Emitido en nombre de" +"Mercado Pago partnership code","Código de convenio con Mercado Pago" +"To pay, please scan the QR code","Para pagar, escanea el código QR" +"or, if you prefer, copy-paste the code","o, si prefieres, copia y pega el código" +"Further instructions","Leer más instrucciones" +"The Line Code is","El line code es" +Copy,Copiar +Copied,Copiado +"Enter the ID Document you used in the purchase","Ingresa el Documento de identificación usado en la compra" +Pix,Pix +Waiting...,Esperando... +"Place Order","Realizar Pedido" +"Payer First Name","Nombre del Pagador" +"Payer Last Name","Apellido del Pagador" +"Card details","Datos de la tarjeta" +"Card number","Número de la tarjeta" +"CVV - Card Verification Value","CVV - Código de seguridad" +"What is this?","¿Qué es eso?" +"Expiration month","Mes de vencimiento" +"Expiration year","Año de vencimiento" +"Card holder full name","Nombre impreso en la tarjeta" +"Number of installments","Número de cuotas" +"Save for later use.","Guardar para uso futuro." +"A 3-digit number in italics on the back of your card.","Un número de 3 dígitos en itálica en el dorso de tu tarjeta." +"Entity Type","Tipo de entidad" +"Please provide a valid document identification.","No fue posible realizar el pago. Por favor, presenta un documento de identidad válido." +"Unable to make payment, check card details.","No fue posible realizar el pago. Por favor, verifica los datos de la tarjeta." +"Payment Services","Servicio de pago" +"Permission to set up the module","Permiso para configurar el módulo" +"","" +"Technical support available here.","Soporte técnico disponible aquí." +"Basic Settings","Configuraciones básicas" +"Mercado Pago integration","Integración con Mercado Pago" +"

In order to sell or test a store, you must first enter your test and production credentials.

Using the account of the collaborator with access to Mercado Pago Seller Account, search the credentials according to the account: Argentina, Brazil, Chile, Colombia, Mexico, Uruguay and Peru.

","

Para vender o testear la tienda , tienes que ingresar las credenciales de test y de producción.

Con el colaborador con acceso a la Cuenta del Vendedor de Mercado Pago, busca las credenciales según la cuenta: Argentina, Brazil, Chile, Colombia, Mexico, Uruguay and Peru.

" +"Checkout operation mode","Modo de Operación del Checkout" +"When operational mode is set as Sandbox, your sales will not be communicated to financial institutions.","Cuando el modo operacional esté definido como Sandbox, tus ventas no serán comunicadas a las instituciones financieras." +"Public Key - production","Public Key - producción" +"Access Token - production","Access Token - producción" +"Public Key - Sandbox","Public Key - Sandbox" +"Access Token - Sandbox","Access Token - Sandbox" +"Developers support","Soporte para desarrolladores" +Debug,Debug +"We record your store's communications with Mercado Pago in orer to offer a better support. Please note it is not recommended to use the debug mode when your store is in production mode.","Registramos las comunicaciones de tu tienda con Mercado Pago para ofrecer un soporte aún mejor. Atención: no se recomienda usar el modo debug con la tienda en modo de producción." +"Rewrite notification URL","Reescribe la notificación URL" +"You can override notification URLs which are automatically generated. In order to use the module's default, please do not fill in this details.","Puedes substituir las URLs de notificación que se generan automáticamente. Para usar el padrón del módulo, por favor, no cargues estos datos." +"Store Name, Category and Integrator ID","Nombre de la tienda, Categoría e ID del Integrador" +"Store Name","Nombre de la tienda" +"This is the store's name as it will appear on the customer's invoice. In case the sale was made through Checkout Pro, the invoice will also show Mercado Pago in the name.","El nombre de la tienda igual a como figurará en la factura del cliente. Si la venta se hizo por medio del Checkout Pro, la factura también identificará a Mercado Pago en el nombre." +"Category of your store","Categoría de tu tienda" +"The product category of your store on Mercado Pago.","La categoría del producto de tu tienda en Mercado Pago." +"Integrator ID","ID del integrador" +"With this number, we are able to identify all your transactions and know how many sales were processed using your account. Become a certified Mercado Pago partner and request your integrator_id here.","Con este número, podemos identificar todas tus operaciones y saber cuántas ventas fueron procesadas con tu cuenta. Conviértete en un socio certificado de Mercado Pago y pide tu integrator_id here." +"Sales requirements","Exigencias de ventas" +"Checkout Pro","Checkout Pro" +Enabled,Activado +Title,Título +"Payment method title at the store's checkout.","Título de la forma de pago en el checkout de la tienda." +"Deadline for payment","Plazo límite para el pago" +"Calendar days.","Días seguidos." +"Payment completion view","Visualización de la finalización del pago" +"Modal: Buyer will close via modal on the checkout screen. Redirection: Buyer will be redirected to the Mercado Pago website.","Modal, el cliente finalizará vía modal en la pantalla de checkout. Redireccionamiento, el cliente será redireccionado al sitio de Mercado Pago" +"Removed payment method","Medio de pago finalizado" +"Select the payment methods you do NOT want to accept.","Selecciona los medios de pago que NO quieres aceptar." +"Installment options limit","Límite de cuotas" +"It is possible to configure the number of installments in Checkout Pro, but the limit of installments per purchase will also depend on the minimum and maximum amount defined by each flag in the country of your store.","Se puede configurar el número de cuotas en Checkout Pro, pero el límite de cuotas por compra también depende de los valores mínimo y máximo determinados por cada bandera del país en que se encuentra tu tienda." +"Conversion tags","Tags de conversión" +"You can link your Checkout Pro sales with external services.","Puedes asociar tus ventas del Checkout Pro a servicios externos." +Facebook,Facebook +"Link your sales with Facebook by entering the ID No. and your tracking code.","Asocia tus ventas al Facebook, informando el ID del de tu código de rastreo." +"Google Ads","Google Ads" +"Link your sales with Google Ads by entering the ID No. and your tracking code.","Asocia tus ventas al Google Ads, informando el ID del tu código de rastreo." +"Link your sales with Google Ads by entering the Label and your tracking code.","Asocia tus ventas al Google Ads, informando el Label del tu código de rastreo." +"Customization and Styles","Personalización y estilos" +"Set up how the items will appear in the modal window in which the buyer will complete the purchase.","Define la apariencia de los ítems en la ventana modal en la que el cliente finalizará la compra." +"Header Color","Color del header" +"Elements Color","Colores de los elementos" +"Common Payment Method Definitions","Definiciones comunes de medios de pago" +"Minimum order total","Monto mínimo del pedido" +"Minimum amount to pay with Checkout Pro.","Monto mínimo para pago con Checkout Pro." +"Maximum order amount","Monto máximo de pedido" +"Maximum amount to pay with Checkout Pro","Monto máximo a pagar con Checkout Pro." +"Payment From Specific Countries","Pago de países específicos" +"Countries eligible to use this payment method.","Países que pueden usar este medio de pago." +"Sort Order","Orden de visualización" +"Sets up in which order the payment methods will be shown at the Checkout.","Define el orden de visualización del medio de pago en el Checkout." +"Checkout Transparent","Checkout Transparente" +"Capture of customer details in the payment form","Captura de datos del cliente en el formulario de pago" +"Activate this option if you want to obtain buyer`s documents details, using an additional field on the payment form. Disable it if your store already gets these details.","Activa esta función para capturar documentos de clientes con un campo adicional en el formulario de pago. Desactívala si la tienda ya captura estos datos." +"Capture document identification","Capturar documento de identificación" +"Capture name","Capturar nombre" +"In case you leave this option active, an additional field in the payment form will obtain this information. If disabled, details will be retrieved directly from other fields within your store.","Si se activa, el formulario de pago mostrará un campo adicional para colectar esa información. Si se inhabilita, el monto será capturado directamente de otros campos en tu tienda." +"Credit and debit cards","Tarjeta de crédito y débito" +"Enable vault","Habilitar caja fuerte" +"Allows buyer to save the card for future use.","Permite que tu cliente guarde la tarjeta para uso futuro." +"Payment Action","Perfil de pago" +"Consult the store's business sector to be able to select capturing the payment at the time of the purchase or at a later moment.","Consulta la rama de negocios de la tienda para poder elegir entre capturar el pago en el acto de la compra o posteriormente." +"Use Binary Mode","Usa el modo binario" +"Installment and interest","Cuotas e intereses" +"Set within your account","Definir en tu cuenta" +"Minimum amount for payment with this payment method.","Monto mínimo para este medio de pago." +"Maximum amount for payment with this payment method.","Monto máximo para este medio de pago." +Pse,Pse +"Minimum amount to pay with Pse.","Monto mínimo a pagar con Pse." +"Maximum amount to pay with Pse.","Monto máximo a pagar con Pse." +Webpay,Webpay +"Minimum amount to pay with Webpay.","Monto mínimo a pagar con Webpay." +"Maximum amount to pay with Webpay.","Monto máximo a pagar con Webpay." +"Store information hosted in Mercado Pago","Información de la tienda en Mercado Pago" +"User Id","Código de identificación" +"User Email","E-mail de usuario" +"User Name","Nombre" +"mp_payment_id","Identificación de pago (Mercado Pago)" +"card_installments","Cuotas" +"card_finance_cost","Custo do Parcelamento" +"card_type","Bandera" +"card_number","Numero de tarjeta" +"card_holder_name","Nombre impreso en tarjeta" +"card_exp_year","Año de vencimiento" +"card_exp_month","Mês de vencimiento" +"payer_document_identification","Documento de identificación" +"payer_first_name","Nombre" +"payer_last_name","Apellido" +"init_point","Link" +"date_of_expiration","Fecha de expiración" +"barcode","Código de barras" +"external_resource_url","Enlace de pago" +"verification_code","Código de verificación" +"financial_institution","Institución" +"payer_document_type","Tipo de documento" +"mp_status","Estado (Mercado Pago)" +"mp_status_detail","Estado Detallado (Mercado Pago)" +"Link","Link" +"Line Code","Código de Barras" +"Payer Document Type","Tipo de Documento" +"Payment Type (Mercado Pago)","Tipo de pago (Mercado Pago )" +"Installments (Mercado Pago)","Financiacíon o quotas (Mercado Pago )" +"Pix QR Code","Código QR do pix" +"Pix Code","Código de pix" +"The order %1, was refunded directly on Mercado Pago, you need to check stock of sold items.","El pedido %1 ha sido reembolsado directamente en el Mercado Pago, debe verificar su inventario de productos vendidos." +"The order %1, was refunded directly on Mercado Pago, but an error occured when refunding offline, you need to check order refunds and stock of sold items.","El pedido %1, fue reembolsado directamente en Mercado Pago, pero ocurrió un error al reembolsar fuera de línea, debe consultar las devoluciones del pedido y el stock de artículos vendidos." +"Order refunded in Mercado Pago, refunded offline in the store.","Solicitud reembolsada del Mercado Pago, reembolsado offline creado en la tienda." +"Order refunded.","Solicitud refactada.." +"API Integration","Integración de API" +"Receive refund notification","Recibir notificación de reembolso" +"Enable the creation of a Credit Note when a refund occurs in Mercado Pago.","Habilitar la creación de notas de credito cuando ocurra un reembolso en Mercado Pago." +"Enable Facebook pixel","Activar Pixel de Facebook" +"Enable Google pixel","Activar Google Pixel" +"Please check store id %1 credentials, they are invalid so they were deleted.","Verifique las credenciales de la tienda ID %1, no son válidas para que se eliminen." +"Your payment was declined due to an error in the store setup. Please get in touch with the store support and try again later.","Tu pago fue rechazado por un error en la configuración de la tienda. Contáctate con el soporte de la tienda e inténtalo más tarde." +"It was not possible to complete the payment due to a communication error. Please try again later.","No pudimos completar el pago por una falla de comunicación. Inténtalo más tarde." +"Your payment was declined because some of your card details are incorrect. Please check the information to complete the purchase.","Tu pago fue rechazado porque algún dato de la tarjeta es incorrecto. Verifica la información para finalizar la compra." +"Your payment was declined. We recommend that you use the device and payment method you usually use for online shopping.","Tu pago fue rechazado. Recomendamos que utilices el dispositivo y el medio de pago que sueles usar para compras online." +"It was not possible to complete the payment. Please use another method to complete the purchase.","No pudimos completar el pago. Usa otro medio para finalizar tu compra." +"It was not possible to complete the payment due to a communication error. Please try again later or use another payment method.","No pudimos completar el pago por una falla de comunicación. Inténtalo más tarde o usa otro medio de pago." +"Offline Payments Methods","Medios de Pago OFF" +"Exclude Payment Methods","Excluir métodos de pago" +"Select the payment methods you do NOT want to accept.","Seleccione los métodos de pago que NO desea aceptar." +"Payment Title","Título del metodo de pago" +"Accept all payment methods","Aceptar todos los medios de pago" +"There are no payment methods available, please contact the seller.", "No hay métodos de pago disponibles, póngase en contacto con el vendedor." +"Generate the ticket and pay it wherever you want.","Genere el ticket de pago y pague." +"Will be approved within 2 business days.","Será aprobado en hasta 2 días hábiles." +"Ticket - MercadoPago","Ticket - MercadoPago" +"Expiration","Vencimiento" +"PAYMENT INFORMATION","INFORMACIÓN DE PAGO" +"Payment Number (Mercado Pago): %1","Número de Pago (Mercado Pago): %1" +"FIRST PAYMENT METHOD", "PRIMERA FORMA DE PAGO" +"Card number:","Número de la tarjeta:" +"Expiration date:","Fecha de vencimiento:" +"Card holder:","Titular de la tarjeta:" +"Payment method:","Medio de pago:" +"Installments:","Cuotas:" +"Identification in the invoice:","Identificación en el resumen:" +"Payment status:","Estado del pago:" +"Detailed payment status:","Estado detallado del pago:" +"SECOND PAYMENT METHOD","SEGUNDA FORMA DE PAGO" +"Your order is %1!","Recibimos tu pedido %1!" +"Thank you for your purchase!","Gracias por su compra!" +"We are processing your payment","Estamos procesando tu pago" +"Continue Shopping","Seguir comprando" +"Create an Account","Crear una cuenta" +"First card details:","Datos de la primera tarjeta:" +"Enter the amount to be paid with the first method *", "Ingresá el monto a pagar con el primer medio *" +"Value not allowed!","Valor no permitido!" +"Remaining value ","Valor restante " +"Credit card","Tarjeta de crédito" +"Second card details:","Datos de la segunda tarjeta:" +"Payment processed by Mercado Pago","Pago procesado por Mercado Pago" +"This is a required field.","Este es un campo obligatorio." +"You can track your order status by creating an account.","Puede rastrear el estado de su pedido creando una cuenta." +"cardNumber should be a number.","Número de la tarjeta debería ser un número." +"cardNumber is empty.","Número de la tarjeta está vacío." +"cardNumber should be of length between '8' and '19'.","Número de la tarjeta debe ser de longitud entre '8' y '19'." +"securityCode should be a number.","CVV - Código de seguridad debería ser un número." +"securityCode should be of length '3' or '4'.","CVV - Código de seguridad debe ser de longitud '3' o '4'." +"securityCode is empty.","CVV - Código de seguridad esta vacio." +"expirationMonth should be a number.","Mes de vencimiento debería ser un número." +"expirationMonth is empty.","Mes de vencimiento esta vacio." +"expirationYear should be of length '2' or '4'.","Año de vencimiento debe ser de longitud '2' o '4'." +"expirationYear should be a number.","Año de vencimiento debería ser un número." +"expirationYear is empty.","Año de vencimiento esta vacio." +"expirationMonth should be a value from 1 to 12.","Mes de vencimiento debe ser un valor de 1 a 12." +"expirationYear value should be greater or equal than %1.", "Año de vencimiento no es válido" +"expirationMonth value should be greater than '%1' or expirationYear value should be greater than '%2'.", "Mes de vencimiento o el valor del año de vencimiento no es válido." +"cardNumber should be of length '16'.","Número de la tarjeta debe ser de longitud 16." +"Pay with two cards","Pagar con dos tarjetas" +"Payment with two cards","Pago con dos tarjetas" +"Interest-free","Sin interés" +"Your Bank will apply Interest","Tu Banco aplicará Intereses" +"Complete your order to proceed with payment.","Finaliza tu pedido para proceder con el pago." +"approved","Aprobado" +"cancelled","Cancelado" +"authorized","Autorizado" +"accredited","Autorizado" +"rejected","Rechazado" +"pending","Pendiente" +"partially_refunded","Reembolso Parcial" +"cc_rejected_call_for_authorize","Solicitud de autorización rechazada" +"in_process","En proceso" +"by_admin","Por Admin" +"cc_rejected_high_risk","Alto riesgo" +"cc_rejected_insufficient_amount","Valor Insuficiente" +"cc_rejected_other_reason","Otro Motivo" +"cc_rejected_bad_filled_security_code","security_code rellenado incorrectamente" +"cc_rejected_bad_filled_other","Rellenado incorrectamente" +"cc_rejected_bad_filled_card_number","card_number rellenado incorrectamente" +"cc_rejected_bad_filled_date","Data rellenado incorrectamente" +"cc_rejected_card_disabled","Tarjeta desactivada" +"cc_rejected_max_attempts","Intentos máximos" +"cc_rejected_invalid_installments","Cuotas llenado incorrectamente" +"cc_rejected_duplicated_payment","Pago duplicado" +"bank_rejected","Rechazado por el banco" +"bank_error","Error del banco" +"rejected_by_bank","Rechazado por el Banco" +"refunded","Reintegrado" +"by_collector","Por Vendedor" +"expired","Expirado", +"by_payer","Por pagador" +"pending_review_manual","Pendiente de revisión manual" +"pending_capture","Captura pendiente" +"reimbursed","Reintegrado" +"pending_waiting_payment","Aguardando pago pendiente" +"pending_waiting_for_remedy","Pendiente en espera de solución" +"unavailable","Indisponible" +"pending_waiting_transfer","Pendiente aguardando transferencia" +"Credit or Debit Card","Tarjeta de Crédito o Débito" +"Email Address","Correo electrónico" +"We'll email you an order confirmation with details and tracking info.","Enviaremos un correo electrónico con la confirmación del pedido con detalles e información de seguimiento." +"Your order number is: %1.","Recibimos su pedido: %1!" +"Your order # is: %1.","Recibimos su pedido: %1!" +"By continuing, you agree to our ","Al continuar aceptas nuestros " +"Terms and Conditions.","Términos y Condiciones." +"Status (Mercado Pago)","Estado (Mercado Pago)" +"Status Detail (Mercado Pago)","Detalle de estado (Mercado Pago)" +"Google Ads - Id","Google Ads - Id" +"Google Ads - Label","Google Ads - Label" +"The card details are incorrect.","Los datos de la tarjeta son incorrectos." +"The payment was rejected due to suspicion of fraud.","El pago fue rechazado por sospecha de fraude." +"The payment method used requires prior authorization of the purchase amount.","El medio de pago utilizado requiere previa autorización del monto de la compra." +"This card is blocked.","La tarjeta está bloqueada." +"You made a similar payment a short time ago. Please use another payment method.","Hiciste un pago similar recientemente, usa otro medio de pago." +"Something went wrong with the payment. Please use another card or choose a different payment method.","Algo salió mal con el pago. Paga con otra tarjeta o elige otro medio de pago." +"The number of installments chosen is invalid.","El número de cuotas elegido no es válido." +"The maximum number of attempts was reached.","Alcanzaste el número máximo de intentos de pago." +"Something went wrong. Please try again.","Algo salió mal, por favor inténtalo de nuevo." +"It was not possible to complete the payment. Please use another method to complete the purchase.","No pudimos completar el pago. Usa otro medio para finalizar tu compra." +"Your payment was declined because some of your card details are incorrect. Please check the information to complete the purchase or try another payment method.","Tu pago fue rechazado porque algún dato de la tarjeta es incorrecto. Verifica la información para finalizar la compra o utiliza otro método de pago." +"Your credentials are incorrect. Please double-check in your account your credentials are correct.","Sus credenciales son incorrectas. Regrese para completar las credenciales de su tienda correctamente." +"Your credentials are incorrect. Test credentials have been filled in and should be used in sandbox mode. Please check the credentials again.","Sus credenciales son incorrectas. Las credenciales son de prueba y se deben usar en modo sandbox. Por favor, regrese para completar las credenciales de nuevo." +"Your credentials are incorrect. Production credentials have been filled in and should be used in production mode. Please check the credentials again.","Sus credenciales son incorrectas. Las credenciales son de Producción y se deben usar en modo Producción. Por favor, regrese para completar las credenciales de nuevo." +"Minimum transaction amount not allowed for the chosen brand. Please choose another flag or make a purchase over %1.", "Monto mínimo de transacción no permitido para la Bandera elegida. Elija otra Bandera o realice una compra superior a %1." +"Download the Boleto","Descarga del boleto" +"pending_contingency", "Pendiente de contingencia" +"Pay with the method of payment you prefer and all the security of Mercado Pago.
If you already have an account at Mercado Livre, use the same email and password.
Use your Mercado Pago account balance or saved cards to buy without filling out more details.","Paga con el medio de pago que prefieras y disfruta de la seguridad de Mercado Pago.
Si ya tiene una cuenta en Mercado Livre, use el mismo e-mail y clave.
Usa tu saldo de Mercado Pago o tarjetas guardadas para comprar sin llenar más detalles." +"Payments with immediate approval.
The payment term is up to %1.
At checkout, you will receive the code to make payment at the bank of your choice (check with your bank for your daily Pix transfer limit).", "Pagos con aprobación inmediata.
El plazo de pago es hasta %1.
Al finalizar la compra, recibirá el código para realizar el pago en el banco de su elección (verifique con su banco cuál es su límite diario de transferencia de Pix)." +"Please fill a valid color in the Checkout Pro configuration","Complete un color válido en la configuración de Checkout Pro" diff --git a/i18n/es_MX.csv b/i18n/es_MX.csv new file mode 100644 index 0000000..1c482de --- /dev/null +++ b/i18n/es_MX.csv @@ -0,0 +1,378 @@ +"Finance Cost","Custo do Parcelamento" +"Discount for payment at sight","Descuento para pagar en un pago" +"Set up installments and interest","Definir cuotas e intereses" +"Order not found.","Pedido no localizado." +"Mercado Pago, refund notification","Mercado Pago, notificación de reembolso" +"The order %1, was refunded directly on Mercado Pago, you need to create an offline refund.","El pedido %1, fue reembolsado directamente en Mercado Pago, necesitas crear un reembolso offline." +Unavailable.,No disponible. +"You should not be here...","No tienes que estar aquí..." +"Order Canceled.","Pedido cancelado." +"Transaction has been declined. Please try again later.","La operación fue rechazada. Por favor inténtalo de nuevo más tarde." +"%1 minutes","%1 minutos" +"1 hour","1 hora" +"12 hours","12 horas" +"1 day","1 día" +"Payment for order %1 in store %2","Pago del pedido %1 en la tienda %2" +Tax,Impuesto +"Awaiting payment of the Card.","Esperando pago via tarjeta." +"Awaiting payment.","Esperando pago." +"Awaiting payment through Checkout Pro.","Esperando pago a través del Checkout Pro." +"Awaiting payment through Pix.","Esperando pago via Pix." +"The gateway declined the transaction.","El gateway rechazó la operación." +"Please select a category","Por favor, selecciona una categoría" +description,descripción +Production,Producción +"Sandbox - Testing environment","Ecositema de testeo" +"Yes, Processed Order Synchronous","Sí, procesar solicitudes sincrónicamente" +"No, Processed Order Asynchronous","No, procesar solicitudes asíncronas" +"1 installment","1 cuota" +"2 installments","2 cuotas" +"3 installments","3 cuotas" +"4 installments","4 cuotas" +"5 installments","5 cuotas" +"6 installments","6 cuotas" +"7 installments","7 cuotas" +"8 installments","8 cuotas" +"9 installments","9 cuotas" +"10 installments","10 cuotas" +"11 installments","11 cuotas" +"12 installments","12 cuotas" +"13 installments","13 cuotas" +"14 installments","14 cuotas" +"15 installments","15 cuotas" +"16 installments","16 cuotas" +"17 installments","17 cuotas" +"18 installments","18 cuotas" +"19 installments","19 cuotas" +"20 installments","20 cuotas" +"21 installments","21 cuotas" +"22 installments","22 cuotas" +"23 installments","23 cuotas" +"24 installments","24 cuotas" +"25 installments","25 cuotas" +"26 installments","26 cuotas" +"27 installments","27 cuotas" +"28 installments","28 cuotas" +"29 installments","29 cuotas" +"30 installments","30 cuotas" +"31 installments","31 cuotas" +"32 installments","32 cuotas" +"33 installments","33 cuotas" +"34 installments","34 cuotas" +"35 installments","35 cuotas" +"36 installments","36 cuotas" +"Do Not Delete","No Finalizar" +name,nombre +"Authorization for future capture","Autorización para la captura futura" +"Authorization for immediate capture","Autorización y captura inmediata" +Configure,Configure +Close,Cerrar +"15 minutes","15 minutos" +"30 minutes - recommended","30 minutos - recomendado" +"24 hours","24 horas" +"Modal window in store environment","Ventana modal en el ecosistema de la tienda" +"Redirection to Mercado Pago environment","Redireccionamiento al ecosistema de Mercado Pago" +"Cart %1 doesn't contain products","El carrito %1 no tiene productos" +"There was an error when creating the payment. Please try again later.","Error al crear el pago. Inténtalo de nuevo más tarde." +"It was not possible to save on the installment cost amount","No fue posible economizar el monto del costo de las cuotas" +"Default Store %1 - Set Data for store id %2 Web Site Id %3","Store ID: %1 No habilitado para el uso en producción" +Finished,Finalizado +"Store ID: %1 Not allowed for production use","Datos del comerciante obtenidos con éxito." +"There was an error saving: %1","Error al guardar: %1" +"Error fetching information: %1","Error al obtener información %1" +"Please check store id %1 credentials","Por favor, verifica las credenciales de la tienda id %1" +"Order %1 - Increment Id %2 - state %3","Order %1 - Increment ID %2 - Status %3" +"Card - MercadoPago","Card - MercadoPago" +"Checkout Pro - MercadoPago","Checkout Pro - MercadoPago" +"Pix - MercadoPago","Pix - MercadoPago" +"Pse - MercadoPago","Pse - MercadoPago" +"Webpay - MercadoPago","Webpay - MercadoPago" +"Document Type","Tipo de documento" +"Document number","Número del documento" +Instruction,Instrucciones +"Due date","Vencimiento" +"In order to comply with PCI regulations, the administrator cannot capture this payment method.","Debido al cumplimiento de la normativa PCI, no es posible capturar este método de pago por el administrador." +"Payer Entity Type","Tipo de la institución de pago" +"Financial Institution","Institución financiera" +"Your access credential for store %1 is valid but you don\'t have production use permission. Request approval before use by click here.","Tu credencial de acceso a la tienda %1 es válida, pero no tienes permiso de uso de producción. Solicita aprobación antes de usar clic aquí." +"Your payment will be valid until","Tu pago es válido hasta" +"Link for payment","Link para pago" +"Details for payment","Detalles para el pago" +"Verification Code","Código de verificación" +"Line Code is","El line code es" +"Issued on behalf of","Emitido en nombre de" +"Mercado Pago partnership code","Código de convenio con Mercado Pago" +"To pay, please scan the QR code","Para pagar, escanea el código QR" +"or, if you prefer, copy-paste the code","o, si prefieres, copia y pega el código" +"Further instructions","Leer más instrucciones" +"The Line Code is","El line code es" +Copy,Copiar +Copied,Copiado +"Enter the ID Document you used in the purchase","Ingresa el Documento de identificación usado en la compra" +Pix,Pix +Waiting...,Esperando... +"Place Order","Realizar Pedido" +"Payer First Name","Nombre del Pagador" +"Payer Last Name","Apellido del Pagador" +"Card details","Datos de la tarjeta" +"Card number","Número de la tarjeta" +"CVV - Card Verification Value","CVV - Código de seguridad" +"What is this?","¿Qué es eso?" +"Expiration month","Mes de vencimiento" +"Expiration year","Año de vencimiento" +"Card holder full name","Nombre impreso en la tarjeta" +"Number of installments","Número de cuotas" +"Save for later use.","Guardar para uso futuro." +"A 3-digit number in italics on the back of your card.","Un número de 3 dígitos en itálica en el dorso de tu tarjeta." +"Entity Type","Tipo de entidad" +"Please provide a valid document identification.","No fue posible realizar el pago. Por favor, presenta un documento de identidad válido." +"Unable to make payment, check card details.","No fue posible realizar el pago. Por favor, verifica los datos de la tarjeta." +"Payment Services","Servicio de pago" +"Permission to set up the module","Permiso para configurar el módulo" +"","" +"Technical support available here.","Soporte técnico disponible aquí." +"Basic Settings","Configuraciones básicas" +"Mercado Pago integration","Integración con Mercado Pago" +"

In order to sell or test a store, you must first enter your test and production credentials.

Using the account of the collaborator with access to Mercado Pago Seller Account, search the credentials according to the account: Argentina, Brazil, Chile, Colombia, Mexico, Uruguay and Peru.

","

Para vender o testear la tienda , tienes que ingresar las credenciales de test y de producción.

Con el colaborador con acceso a la Cuenta del Vendedor de Mercado Pago, busca las credenciales según la cuenta: Argentina, Brazil, Chile, Colombia, Mexico, Uruguay and Peru.

" +"Checkout operation mode","Modo de Operación del Checkout" +"When operational mode is set as Sandbox, your sales will not be communicated to financial institutions.","Cuando el modo operacional esté definido como Sandbox, tus ventas no serán comunicadas a las instituciones financieras." +"Public Key - production","Public Key - producción" +"Access Token - production","Access Token - producción" +"Public Key - Sandbox","Public Key - Sandbox" +"Access Token - Sandbox","Access Token - Sandbox" +"Developers support","Soporte para desarrolladores" +Debug,Debug +"We record your store's communications with Mercado Pago in orer to offer a better support. Please note it is not recommended to use the debug mode when your store is in production mode.","Registramos las comunicaciones de tu tienda con Mercado Pago para ofrecer un soporte aún mejor. Atención: no se recomienda usar el modo debug con la tienda en modo de producción." +"Rewrite notification URL","Reescribe la notificación URL" +"You can override notification URLs which are automatically generated. In order to use the module's default, please do not fill in this details.","Puedes substituir las URLs de notificación que se generan automáticamente. Para usar el padrón del módulo, por favor, no cargues estos datos." +"Store Name, Category and Integrator ID","Nombre de la tienda, Categoría e ID del Integrador" +"Store Name","Nombre de la tienda" +"This is the store's name as it will appear on the customer's invoice. In case the sale was made through Checkout Pro, the invoice will also show Mercado Pago in the name.","El nombre de la tienda igual a como figurará en la factura del cliente. Si la venta se hizo por medio del Checkout Pro, la factura también identificará a Mercado Pago en el nombre." +"Category of your store","Categoría de tu tienda" +"The product category of your store on Mercado Pago.","La categoría del producto de tu tienda en Mercado Pago." +"Integrator ID","ID del integrador" +"With this number, we are able to identify all your transactions and know how many sales were processed using your account. Become a certified Mercado Pago partner and request your integrator_id here.","Con este número, podemos identificar todas tus operaciones y saber cuántas ventas fueron procesadas con tu cuenta. Conviértete en un socio certificado de Mercado Pago y pide tu integrator_id here." +"Sales requirements","Exigencias de ventas" +"Checkout Pro","Checkout Pro" +Enabled,Activado +Title,Título +"Payment method title at the store's checkout.","Título de la forma de pago en el checkout de la tienda." +"Deadline for payment","Plazo límite para el pago" +"Calendar days.","Días seguidos." +"Payment completion view","Visualización de la finalización del pago" +"Modal: Buyer will close via modal on the checkout screen. Redirection: Buyer will be redirected to the Mercado Pago website.","Modal, el cliente finalizará vía modal en la pantalla de checkout. Redireccionamiento, el cliente será redireccionado al sitio de Mercado Pago" +"Removed payment method","Medio de pago finalizado" +"Select the payment methods you do NOT want to accept.","Selecciona los medios de pago que NO quieres aceptar." +"Installment options limit","Límite de cuotas" +"It is possible to configure the number of installments in Checkout Pro, but the limit of installments per purchase will also depend on the minimum and maximum amount defined by each flag in the country of your store.","Se puede configurar el número de cuotas en Checkout Pro, pero el límite de cuotas por compra también depende de los valores mínimo y máximo determinados por cada bandera del país en que se encuentra tu tienda." +"Conversion tags","Tags de conversión" +"You can link your Checkout Pro sales with external services.","Puedes asociar tus ventas del Checkout Pro a servicios externos." +Facebook,Facebook +"Link your sales with Facebook by entering the ID No. and your tracking code.","Asocia tus ventas al Facebook, informando el ID del de tu código de rastreo." +"Google Ads","Google Ads" +"Link your sales with Google Ads by entering the ID No. and your tracking code.","Asocia tus ventas al Google Ads, informando el ID del tu código de rastreo." +"Link your sales with Google Ads by entering the Label and your tracking code.","Asocia tus ventas al Google Ads, informando el Label del tu código de rastreo." +"Customization and Styles","Personalización y estilos" +"Set up how the items will appear in the modal window in which the buyer will complete the purchase.","Define la apariencia de los ítems en la ventana modal en la que el cliente finalizará la compra." +"Header Color","Color del header" +"Elements Color","Colores de los elementos" +"Common Payment Method Definitions","Definiciones comunes de medios de pago" +"Minimum order total","Monto mínimo del pedido" +"Minimum amount to pay with Checkout Pro.","Monto mínimo para pago con Checkout Pro." +"Maximum order amount","Monto máximo de pedido" +"Maximum amount to pay with Checkout Pro","Monto máximo a pagar con Checkout Pro." +"Payment From Specific Countries","Pago de países específicos" +"Countries eligible to use this payment method.","Países que pueden usar este medio de pago." +"Sort Order","Orden de visualización" +"Sets up in which order the payment methods will be shown at the Checkout.","Define el orden de visualización del medio de pago en el Checkout." +"Checkout Transparent","Checkout Transparente" +"Capture of customer details in the payment form","Captura de datos del cliente en el formulario de pago" +"Activate this option if you want to obtain buyer`s documents details, using an additional field on the payment form. Disable it if your store already gets these details.","Activa esta función para capturar documentos de clientes con un campo adicional en el formulario de pago. Desactívala si la tienda ya captura estos datos." +"Capture document identification","Capturar documento de identificación" +"Capture name","Capturar nombre" +"In case you leave this option active, an additional field in the payment form will obtain this information. If disabled, details will be retrieved directly from other fields within your store.","Si se activa, el formulario de pago mostrará un campo adicional para colectar esa información. Si se inhabilita, el monto será capturado directamente de otros campos en tu tienda." +"Credit and debit cards","Tarjeta de crédito y débito" +"Enable vault","Habilitar caja fuerte" +"Allows buyer to save the card for future use.","Permite que tu cliente guarde la tarjeta para uso futuro." +"Payment Action","Perfil de pago" +"Consult the store's business sector to be able to select capturing the payment at the time of the purchase or at a later moment.","Consulta la rama de negocios de la tienda para poder elegir entre capturar el pago en el acto de la compra o posteriormente." +"Use Binary Mode","Usa el modo binario" +"Installment and interest","Cuotas e intereses" +"Set within your account","Definir en tu cuenta" +"Minimum amount for payment with this payment method.","Monto mínimo para este medio de pago." +"Maximum amount for payment with this payment method.","Monto máximo para este medio de pago." +Pse,Pse +"Minimum amount to pay with Pse.","Monto mínimo a pagar con Pse." +"Maximum amount to pay with Pse.","Monto máximo a pagar con Pse." +Webpay,Webpay +"Minimum amount to pay with Webpay.","Monto mínimo a pagar con Webpay." +"Maximum amount to pay with Webpay.","Monto máximo a pagar con Webpay." +"Store information hosted in Mercado Pago","Información de la tienda en Mercado Pago" +"User Id","Código de identificación" +"User Email","E-mail de usuario" +"User Name","Nombre" +"mp_payment_id","Identificación de pago (Mercado Pago)" +"card_installments","Cuotas" +"card_finance_cost","Custo do Parcelamento" +"card_type","Bandera" +"card_number","Numero de tarjeta" +"card_holder_name","Nombre impreso en tarjeta" +"card_exp_year","Año de vencimiento" +"card_exp_month","Mês de vencimiento" +"payer_document_identification","Documento de identificación" +"payer_first_name","Nombre" +"payer_last_name","Apellido" +"init_point","Link" +"date_of_expiration","Fecha de expiración" +"barcode","Código de barras" +"external_resource_url","Enlace de pago" +"verification_code","Código de verificación" +"financial_institution","Institución" +"payer_document_type","Tipo de documento" +"mp_status","Estado (Mercado Pago)" +"mp_status_detail","Estado Detallado (Mercado Pago)" +"Link","Link" +"Line Code","Código de Barras" +"Payer Document Type","Tipo de Documento" +"Payment Type (Mercado Pago)","Tipo de pago (Mercado Pago )" +"Installments (Mercado Pago)","Financiacíon o quotas (Mercado Pago )" +"Pix QR Code","Código QR do pix" +"Pix Code","Código de pix" +"The order %1, was refunded directly on Mercado Pago, you need to check stock of sold items.","El pedido %1 ha sido reembolsado directamente en el Mercado Pago, debe verificar su inventario de productos vendidos." +"The order %1, was refunded directly on Mercado Pago, but an error occured when refunding offline, you need to check order refunds and stock of sold items.","El pedido %1, fue reembolsado directamente en Mercado Pago, pero ocurrió un error al reembolsar fuera de línea, debe consultar las devoluciones del pedido y el stock de artículos vendidos." +"Order refunded in Mercado Pago, refunded offline in the store.","Solicitud reembolsada del Mercado Pago, reembolsado offline creado en la tienda." +"Order refunded.","Solicitud refactada.." +"API Integration","Integración de API" +"Receive refund notification","Recibir notificación de reembolso" +"Enable the creation of a Credit Note when a refund occurs in Mercado Pago.","Habilitar la creación de notas de credito cuando ocurra un reembolso en Mercado Pago." +"Enable Facebook pixel","Activar Pixel de Facebook" +"Enable Google pixel","Activar Google Pixel" +"Please check store id %1 credentials, they are invalid so they were deleted.","Verifique las credenciales de la tienda ID %1, no son válidas para que se eliminen." +"Your payment was declined due to an error in the store setup. Please get in touch with the store support and try again later.","Tu pago fue rechazado por un error en la configuración de la tienda. Contáctate con el soporte de la tienda e inténtalo más tarde." +"It was not possible to complete the payment due to a communication error. Please try again later.","No pudimos completar el pago por una falla de comunicación. Inténtalo más tarde." +"Your payment was declined because some of your card details are incorrect. Please check the information to complete the purchase.","Tu pago fue rechazado porque algún dato de la tarjeta es incorrecto. Verifica la información para finalizar la compra." +"Your payment was declined. We recommend that you use the device and payment method you usually use for online shopping.","Tu pago fue rechazado. Recomendamos que utilices el dispositivo y el medio de pago que sueles usar para compras online." +"It was not possible to complete the payment. Please use another method to complete the purchase.","No pudimos completar el pago. Usa otro medio para finalizar tu compra." +"It was not possible to complete the payment due to a communication error. Please try again later or use another payment method.","No pudimos completar el pago por una falla de comunicación. Inténtalo más tarde o usa otro medio de pago." +"Offline Payments Methods","Medios de Pago OFF" +"Exclude Payment Methods","Excluir métodos de pago" +"Select the payment methods you do NOT want to accept.","Seleccione los métodos de pago que NO desea aceptar." +"Payment Title","Título del metodo de pago" +"Accept all payment methods","Aceptar todos los medios de pago" +"There are no payment methods available, please contact the seller.", "No hay métodos de pago disponibles, póngase en contacto con el vendedor." +"Generate the ticket and pay it wherever you want.","Genere el ticket de pago y pague." +"Will be approved within 2 business days.","Será aprobado en hasta 2 días hábiles." +"Ticket - MercadoPago","Ticket - MercadoPago" +"Expiration","Vencimiento" +"PAYMENT INFORMATION","INFORMACIÓN DE PAGO" +"Payment Number (Mercado Pago): %1","Número de Pago (Mercado Pago): %1" +"FIRST PAYMENT METHOD", "PRIMERA FORMA DE PAGO" +"Card number:","Número de la tarjeta:" +"Expiration date:","Fecha de vencimiento:" +"Card holder:","Titular de la tarjeta:" +"Payment method:","Medio de pago:" +"Installments:","Cuotas:" +"Identification in the invoice:","Identificación en el resumen:" +"Payment status:","Estado del pago:" +"Detailed payment status:","Estado detallado del pago:" +"SECOND PAYMENT METHOD","SEGUNDA FORMA DE PAGO" +"Your order is %1!","Recibimos tu pedido %1!" +"Thank you for your purchase!","Gracias por su compra!" +"We are processing your payment","Estamos procesando tu pago" +"Continue Shopping","Seguir comprando" +"Create an Account","Crear una cuenta" +"First card details:","Datos de la primera tarjeta:" +"Enter the amount to be paid with the first method *", "Ingresá el monto a pagar con el primer medio *" +"Value not allowed!","Valor no permitido!" +"Remaining value ","Valor restante " +"Credit card","Tarjeta de crédito" +"Second card details:","Datos de la segunda tarjeta:" +"Payment processed by Mercado Pago","Pago procesado por Mercado Pago" +"This is a required field.","Este es un campo obligatorio." +"You can track your order status by creating an account.","Puede rastrear el estado de su pedido creando una cuenta." +"cardNumber should be a number.","Número de la tarjeta debería ser un número." +"cardNumber is empty.","Número de la tarjeta está vacío." +"cardNumber should be of length between '8' and '19'.","Número de la tarjeta debe ser de longitud entre '8' y '19'." +"securityCode should be a number.","CVV - Código de seguridad debería ser un número." +"securityCode should be of length '3' or '4'.","CVV - Código de seguridad debe ser de longitud '3' o '4'." +"securityCode is empty.","CVV - Código de seguridad esta vacio." +"expirationMonth should be a number.","Mes de vencimiento debería ser un número." +"expirationMonth is empty.","Mes de vencimiento esta vacio." +"expirationYear should be of length '2' or '4'.","Año de vencimiento debe ser de longitud '2' o '4'." +"expirationYear should be a number.","Año de vencimiento debería ser un número." +"expirationYear is empty.","Año de vencimiento esta vacio." +"expirationMonth should be a value from 1 to 12.","Mes de vencimiento debe ser un valor de 1 a 12." +"expirationYear value should be greater or equal than %1.", "Año de vencimiento no es válido" +"expirationMonth value should be greater than '%1' or expirationYear value should be greater than '%2'.", "Mes de vencimiento o el valor del año de vencimiento no es válido." +"cardNumber should be of length '16'.","Número de la tarjeta debe ser de longitud 16." +"Pay with two cards","Pagar con dos tarjetas" +"Payment with two cards","Pago con dos tarjetas" +"Interest-free","Sin interés" +"Your Bank will apply Interest","Tu Banco aplicará Intereses" +"Complete your order to proceed with payment.","Finaliza tu pedido para proceder con el pago." +"approved","Aprobado" +"cancelled","Cancelado" +"authorized","Autorizado" +"accredited","Autorizado" +"rejected","Rechazado" +"pending","Pendiente" +"partially_refunded","Reembolso Parcial" +"cc_rejected_call_for_authorize","Solicitud de autorización rechazada" +"in_process","En proceso" +"by_admin","Por Admin" +"cc_rejected_high_risk","Alto riesgo" +"cc_rejected_insufficient_amount","Valor Insuficiente" +"cc_rejected_other_reason","Otro Motivo" +"cc_rejected_bad_filled_security_code","security_code rellenado incorrectamente" +"cc_rejected_bad_filled_other","Rellenado incorrectamente" +"cc_rejected_bad_filled_card_number","card_number rellenado incorrectamente" +"cc_rejected_bad_filled_date","Data rellenado incorrectamente" +"cc_rejected_card_disabled","Tarjeta desactivada" +"cc_rejected_max_attempts","Intentos máximos" +"cc_rejected_invalid_installments","Cuotas llenado incorrectamente" +"cc_rejected_duplicated_payment","Pago duplicado" +"bank_rejected","Rechazado por el banco" +"bank_error","Error del banco" +"rejected_by_bank","Rechazado por el Banco" +"refunded","Reintegrado" +"by_collector","Por Vendedor" +"expired","Expirado", +"by_payer","Por pagador" +"pending_review_manual","Pendiente de revisión manual" +"pending_capture","Captura pendiente" +"reimbursed","Reintegrado" +"pending_waiting_payment","Aguardando pago pendiente" +"pending_waiting_for_remedy","Pendiente en espera de solución" +"unavailable","Indisponible" +"pending_waiting_transfer","Pendiente aguardando transferencia" +"Credit or Debit Card","Tarjeta de Crédito o Débito" +"Email Address","Correo electrónico" +"We'll email you an order confirmation with details and tracking info.","Enviaremos un correo electrónico con la confirmación del pedido con detalles e información de seguimiento." +"Your order number is: %1.","Recibimos su pedido: %1!" +"Your order # is: %1.","Recibimos su pedido: %1!" +"By continuing, you agree to our ","Al continuar aceptas nuestros " +"Terms and Conditions.","Términos y Condiciones." +"Status (Mercado Pago)","Estado (Mercado Pago)" +"Status Detail (Mercado Pago)","Detalle de estado (Mercado Pago)" +"Google Ads - Id","Google Ads - Id" +"Google Ads - Label","Google Ads - Label" +"The card details are incorrect.","Los datos de la tarjeta son incorrectos." +"The payment was rejected due to suspicion of fraud.","El pago fue rechazado por sospecha de fraude." +"The payment method used requires prior authorization of the purchase amount.","El medio de pago utilizado requiere previa autorización del monto de la compra." +"This card is blocked.","La tarjeta está bloqueada." +"You made a similar payment a short time ago. Please use another payment method.","Hiciste un pago similar recientemente, usa otro medio de pago." +"Something went wrong with the payment. Please use another card or choose a different payment method.","Algo salió mal con el pago. Paga con otra tarjeta o elige otro medio de pago." +"The number of installments chosen is invalid.","El número de cuotas elegido no es válido." +"The maximum number of attempts was reached.","Alcanzaste el número máximo de intentos de pago." +"Something went wrong. Please try again.","Algo salió mal, por favor inténtalo de nuevo." +"It was not possible to complete the payment. Please use another method to complete the purchase.","No pudimos completar el pago. Usa otro medio para finalizar tu compra." +"Your payment was declined because some of your card details are incorrect. Please check the information to complete the purchase or try another payment method.","Tu pago fue rechazado porque algún dato de la tarjeta es incorrecto. Verifica la información para finalizar la compra o utiliza otro método de pago." +"Your credentials are incorrect. Please double-check in your account your credentials are correct.","Sus credenciales son incorrectas. Regrese para completar las credenciales de su tienda correctamente." +"Your credentials are incorrect. Test credentials have been filled in and should be used in sandbox mode. Please check the credentials again.","Sus credenciales son incorrectas. Las credenciales son de prueba y se deben usar en modo sandbox. Por favor, regrese para completar las credenciales de nuevo." +"Your credentials are incorrect. Production credentials have been filled in and should be used in production mode. Please check the credentials again.","Sus credenciales son incorrectas. Las credenciales son de Producción y se deben usar en modo Producción. Por favor, regrese para completar las credenciales de nuevo." +"Minimum transaction amount not allowed for the chosen brand. Please choose another flag or make a purchase over %1.", "Monto mínimo de transacción no permitido para la Bandera elegida. Elija otra Bandera o realice una compra superior a %1." +"Download the Boleto","Descarga del boleto" +"pending_contingency", "Pendiente de contingencia" +"Pay with the method of payment you prefer and all the security of Mercado Pago.
If you already have an account at Mercado Livre, use the same email and password.
Use your Mercado Pago account balance or saved cards to buy without filling out more details.","Paga con el medio de pago que prefieras y disfruta de la seguridad de Mercado Pago.
Si ya tiene una cuenta en Mercado Livre, use el mismo e-mail y clave.
Usa tu saldo de Mercado Pago o tarjetas guardadas para comprar sin llenar más detalles." +"Payments with immediate approval.
The payment term is up to %1.
At checkout, you will receive the code to make payment at the bank of your choice (check with your bank for your daily Pix transfer limit).", "Pagos con aprobación inmediata.
El plazo de pago es hasta %1.
Al finalizar la compra, recibirá el código para realizar el pago en el banco de su elección (verifique con su banco cuál es su límite diario de transferencia de Pix)." +"Please fill a valid color in the Checkout Pro configuration","Complete un color válido en la configuración de Checkout Pro" diff --git a/i18n/es_PE.csv b/i18n/es_PE.csv new file mode 100644 index 0000000..dd1ba63 --- /dev/null +++ b/i18n/es_PE.csv @@ -0,0 +1,378 @@ +"Finance Cost","Custo do Parcelamento" +"Discount for payment at sight","Descuento para pagar en un pago" +"Set up installments and interest","Definir cuotas e intereses" +"Order not found.","Pedido no localizado." +"Mercado Pago, refund notification","Mercado Pago, notificación de reembolso" +"The order %1, was refunded directly on Mercado Pago, you need to create an offline refund.","El pedido %1, fue reembolsado directamente en Mercado Pago, necesitas crear un reembolso offline." +Unavailable.,No disponible. +"You should not be here...","No tienes que estar aquí..." +"Order Canceled.","Pedido cancelado." +"Transaction has been declined. Please try again later.","La operación fue rechazada. Por favor inténtalo de nuevo más tarde." +"%1 minutes","%1 minutos" +"1 hour","1 hora" +"12 hours","12 horas" +"1 day","1 día" +"Payment for order %1 in store %2","Pago del pedido %1 en la tienda %2" +Tax,Impuesto +"Awaiting payment of the Card.","Esperando pago via tarjeta." +"Awaiting payment.","Esperando pago." +"Awaiting payment through Checkout Pro.","Esperando pago a través del Checkout Pro." +"Awaiting payment through Pix.","Esperando pago via Pix." +"The gateway declined the transaction.","El gateway rechazó la operación." +"Please select a category","Por favor, selecciona una categoría" +description,descripción +Production,Producción +"Sandbox - Testing environment","Ecositema de testeo" +"Yes, Processed Order Synchronous","Sí, procesar solicitudes sincrónicamente" +"No, Processed Order Asynchronous","No, procesar solicitudes asíncronas" +"1 installment","1 cuota" +"2 installments","2 cuotas" +"3 installments","3 cuotas" +"4 installments","4 cuotas" +"5 installments","5 cuotas" +"6 installments","6 cuotas" +"7 installments","7 cuotas" +"8 installments","8 cuotas" +"9 installments","9 cuotas" +"10 installments","10 cuotas" +"11 installments","11 cuotas" +"12 installments","12 cuotas" +"13 installments","13 cuotas" +"14 installments","14 cuotas" +"15 installments","15 cuotas" +"16 installments","16 cuotas" +"17 installments","17 cuotas" +"18 installments","18 cuotas" +"19 installments","19 cuotas" +"20 installments","20 cuotas" +"21 installments","21 cuotas" +"22 installments","22 cuotas" +"23 installments","23 cuotas" +"24 installments","24 cuotas" +"25 installments","25 cuotas" +"26 installments","26 cuotas" +"27 installments","27 cuotas" +"28 installments","28 cuotas" +"29 installments","29 cuotas" +"30 installments","30 cuotas" +"31 installments","31 cuotas" +"32 installments","32 cuotas" +"33 installments","33 cuotas" +"34 installments","34 cuotas" +"35 installments","35 cuotas" +"36 installments","36 cuotas" +"Do Not Delete","No Finalizar" +name,nombre +"Authorization for future capture","Autorización para la captura futura" +"Authorization for immediate capture","Autorización y captura inmediata" +Configure,Configure +Close,Cerrar +"15 minutes","15 minutos" +"30 minutes - recommended","30 minutos - recomendado" +"24 hours","24 horas" +"Modal window in store environment","Ventana modal en el ecosistema de la tienda" +"Redirection to Mercado Pago environment","Redireccionamiento al ecosistema de Mercado Pago" +"Cart %1 doesn't contain products","El carrito %1 no tiene productos" +"There was an error when creating the payment. Please try again later.","Error al crear el pago. Inténtalo de nuevo más tarde." +"It was not possible to save on the installment cost amount","No fue posible economizar el monto del costo de las cuotas" +"Default Store %1 - Set Data for store id %2 Web Site Id %3","Store ID: %1 No habilitado para el uso en producción" +Finished,Finalizado +"Store ID: %1 Not allowed for production use","Datos del comerciante obtenidos con éxito." +"There was an error saving: %1","Error al guardar: %1" +"Error fetching information: %1","Error al obtener información %1" +"Please check store id %1 credentials","Por favor, verifica las credenciales de la tienda id %1" +"Order %1 - Increment Id %2 - state %3","Order %1 - Increment ID %2 - Status %3" +"Card - MercadoPago","Card - MercadoPago" +"Checkout Pro - MercadoPago","Checkout Pro - MercadoPago" +"Pix - MercadoPago","Pix - MercadoPago" +"Pse - MercadoPago","Pse - MercadoPago" +"Webpay - MercadoPago","Webpay - MercadoPago" +"Document Type","Tipo de documento" +"Document number","Número del documento" +Instruction,Instrucciones +"Due date","Vencimiento" +"In order to comply with PCI regulations, the administrator cannot capture this payment method.","Debido al cumplimiento de la normativa PCI, no es posible capturar este método de pago por el administrador." +"Payer Entity Type","Tipo de la institución de pago" +"Financial Institution","Institución financiera" +"Your access credential for store %1 is valid but you don\'t have production use permission. Request approval before use by click here.","Tu credencial de acceso a la tienda %1 es válida, pero no tienes permiso de uso de producción. Solicita aprobación antes de usar clic aquí." +"Your payment will be valid until","Tu pago es válido hasta" +"Link for payment","Link para pago" +"Details for payment","Detalles para el pago" +"Verification Code","Código de verificación" +"Line Code is","El line code es" +"Issued on behalf of","Emitido en nombre de" +"Mercado Pago partnership code","Código de convenio con Mercado Pago" +"To pay, please scan the QR code","Para pagar, escanea el código QR" +"or, if you prefer, copy-paste the code","o, si prefieres, copia y pega el código" +"Further instructions","Leer más instrucciones" +"The Line Code is","El line code es" +Copy,Copiar +Copied,Copiado +"Enter the ID Document you used in the purchase","Ingresa el Documento de identificación usado en la compra" +Pix,Pix +Waiting...,Esperando... +"Place Order","Realizar Pedido" +"Payer First Name","Nombre del Pagador" +"Payer Last Name","Apellido del Pagador" +"Card details","Datos de la tarjeta" +"Card number","Número de la tarjeta" +"CVV - Card Verification Value","CVV - Código de seguridad" +"What is this?","¿Qué es eso?" +"Expiration month","Mes de vencimiento" +"Expiration year","Año de vencimiento" +"Card holder full name","Nombre impreso en la tarjeta" +"Number of installments","Número de cuotas" +"Save for later use.","Guardar para uso futuro." +"A 3-digit number in italics on the back of your card.","Un número de 3 dígitos en itálica en el dorso de tu tarjeta." +"Entity Type","Tipo de entidad" +"Please provide a valid document identification.","No fue posible realizar el pago. Por favor, presenta un documento de identidad válido." +"Unable to make payment, check card details.","No fue posible realizar el pago. Por favor, verifica los datos de la tarjeta." +"Payment Services","Servicio de pago" +"Permission to set up the module","Permiso para configurar el módulo" +"","" +"Technical support available here.","Soporte técnico disponible aquí." +"Basic Settings","Configuraciones básicas" +"Mercado Pago integration","Integración con Mercado Pago" +"

In order to sell or test a store, you must first enter your test and production credentials.

Using the account of the collaborator with access to Mercado Pago Seller Account, search the credentials according to the account: Argentina, Brazil, Chile, Colombia, Mexico, Uruguay and Peru.

","

Para vender o testear la tienda , tienes que ingresar las credenciales de test y de producción.

Con el colaborador con acceso a la Cuenta del Vendedor de Mercado Pago, busca las credenciales según la cuenta: Argentina, Brazil, Chile, Colombia, Mexico, Uruguay and Peru.

" +"Checkout operation mode","Modo de Operación del Checkout" +"When operational mode is set as Sandbox, your sales will not be communicated to financial institutions.","Cuando el modo operacional esté definido como Sandbox, tus ventas no serán comunicadas a las instituciones financieras." +"Public Key - production","Public Key - producción" +"Access Token - production","Access Token - producción" +"Public Key - Sandbox","Public Key - Sandbox" +"Access Token - Sandbox","Access Token - Sandbox" +"Developers support","Soporte para desarrolladores" +Debug,Debug +"We record your store's communications with Mercado Pago in orer to offer a better support. Please note it is not recommended to use the debug mode when your store is in production mode.","Registramos las comunicaciones de tu tienda con Mercado Pago para ofrecer un soporte aún mejor. Atención: no se recomienda usar el modo debug con la tienda en modo de producción." +"Rewrite notification URL","Reescribe la notificación URL" +"You can override notification URLs which are automatically generated. In order to use the module's default, please do not fill in this details.","Puedes substituir las URLs de notificación que se generan automáticamente. Para usar el padrón del módulo, por favor, no cargues estos datos." +"Store Name, Category and Integrator ID","Nombre de la tienda, Categoría e ID del Integrador" +"Store Name","Nombre de la tienda" +"This is the store's name as it will appear on the customer's invoice. In case the sale was made through Checkout Pro, the invoice will also show Mercado Pago in the name.","El nombre de la tienda igual a como figurará en la factura del cliente. Si la venta se hizo por medio del Checkout Pro, la factura también identificará a Mercado Pago en el nombre." +"Category of your store","Categoría de tu tienda" +"The product category of your store on Mercado Pago.","La categoría del producto de tu tienda en Mercado Pago." +"Integrator ID","ID del integrador" +"With this number, we are able to identify all your transactions and know how many sales were processed using your account. Become a certified Mercado Pago partner and request your integrator_id here.","Con este número, podemos identificar todas tus operaciones y saber cuántas ventas fueron procesadas con tu cuenta. Conviértete en un socio certificado de Mercado Pago y pide tu integrator_id here." +"Sales requirements","Exigencias de ventas" +"Checkout Pro","Checkout Pro" +Enabled,Activado +Title,Título +"Payment method title at the store's checkout.","Título de la forma de pago en el checkout de la tienda." +"Deadline for payment","Plazo límite para el pago" +"Calendar days.","Días seguidos." +"Payment completion view","Visualización de la finalización del pago" +"Modal: Buyer will close via modal on the checkout screen. Redirection: Buyer will be redirected to the Mercado Pago website.","Modal, el cliente finalizará vía modal en la pantalla de checkout. Redireccionamiento, el cliente será redireccionado al sitio de Mercado Pago" +"Removed payment method","Medio de pago finalizado" +"Select the payment methods you do NOT want to accept.","Selecciona los medios de pago que NO quieres aceptar." +"Installment options limit","Límite de cuotas" +"It is possible to configure the number of installments in Checkout Pro, but the limit of installments per purchase will also depend on the minimum and maximum amount defined by each flag in the country of your store.","Se puede configurar el número de cuotas en Checkout Pro, pero el límite de cuotas por compra también depende de los valores mínimo y máximo determinados por cada bandera del país en que se encuentra tu tienda." +"Conversion tags","Tags de conversión" +"You can link your Checkout Pro sales with external services.","Puedes asociar tus ventas del Checkout Pro a servicios externos." +Facebook,Facebook +"Link your sales with Facebook by entering the ID No. and your tracking code.","Asocia tus ventas al Facebook, informando el ID del de tu código de rastreo." +"Google Ads","Google Ads" +"Link your sales with Google Ads by entering the ID No. and your tracking code.","Asocia tus ventas al Google Ads, informando el ID del tu código de rastreo." +"Link your sales with Google Ads by entering the Label and your tracking code.","Asocia tus ventas al Google Ads, informando el Label del tu código de rastreo." +"Customization and Styles","Personalización y estilos" +"Set up how the items will appear in the modal window in which the buyer will complete the purchase.","Define la apariencia de los ítems en la ventana modal en la que el cliente finalizará la compra." +"Header Color","Color del header" +"Elements Color","Colores de los elementos" +"Common Payment Method Definitions","Definiciones comunes de medios de pago" +"Minimum order total","Monto mínimo del pedido" +"Minimum amount to pay with Checkout Pro.","Monto mínimo para pago con Checkout Pro." +"Maximum order amount","Monto máximo de pedido" +"Maximum amount to pay with Checkout Pro","Monto máximo a pagar con Checkout Pro." +"Payment From Specific Countries","Pago de países específicos" +"Countries eligible to use this payment method.","Países que pueden usar este medio de pago." +"Sort Order","Orden de visualización" +"Sets up in which order the payment methods will be shown at the Checkout.","Define el orden de visualización del medio de pago en el Checkout." +"Checkout Transparent","Checkout Transparente" +"Capture of customer details in the payment form","Captura de datos del cliente en el formulario de pago" +"Activate this option if you want to obtain buyer`s documents details, using an additional field on the payment form. Disable it if your store already gets these details.","Activa esta función para capturar documentos de clientes con un campo adicional en el formulario de pago. Desactívala si la tienda ya captura estos datos." +"Capture document identification","Capturar documento de identificación" +"Capture name","Capturar nombre" +"In case you leave this option active, an additional field in the payment form will obtain this information. If disabled, details will be retrieved directly from other fields within your store.","Si se activa, el formulario de pago mostrará un campo adicional para colectar esa información. Si se inhabilita, el monto será capturado directamente de otros campos en tu tienda." +"Credit and debit cards","Tarjeta de crédito y débito" +"Enable vault","Habilitar caja fuerte" +"Allows buyer to save the card for future use.","Permite que tu cliente guarde la tarjeta para uso futuro." +"Payment Action","Perfil de pago" +"Consult the store's business sector to be able to select capturing the payment at the time of the purchase or at a later moment.","Consulta la rama de negocios de la tienda para poder elegir entre capturar el pago en el acto de la compra o posteriormente." +"Use Binary Mode","Usa el modo binario" +"Installment and interest","Cuotas e intereses" +"Set within your account","Definir en tu cuenta" +"Minimum amount for payment with this payment method.","Monto mínimo para este medio de pago." +"Maximum amount for payment with this payment method.","Monto máximo para este medio de pago." +Pse,Pse +"Minimum amount to pay with Pse.","Monto mínimo a pagar con Pse." +"Maximum amount to pay with Pse.","Monto máximo a pagar con Pse." +Webpay,Webpay +"Minimum amount to pay with Webpay.","Monto mínimo a pagar con Webpay." +"Maximum amount to pay with Webpay.","Monto máximo a pagar con Webpay." +"Store information hosted in Mercado Pago","Información de la tienda en Mercado Pago" +"User Id","Código de identificación" +"User Email","E-mail de usuario" +"User Name","Nombre" +"mp_payment_id","Identificación de pago (Mercado Pago)" +"card_installments","Cuotas" +"card_finance_cost","Custo do Parcelamento" +"card_type","Bandera" +"card_number","Numero de tarjeta" +"card_holder_name","Nombre impreso en tarjeta" +"card_exp_year","Año de vencimiento" +"card_exp_month","Mês de vencimiento" +"payer_document_identification","Documento de identificación" +"payer_first_name","Nombre" +"payer_last_name","Apellido" +"init_point","Link" +"date_of_expiration","Fecha de expiración" +"barcode","Código de barras" +"external_resource_url","Enlace de pago" +"verification_code","Código de verificación" +"financial_institution","Institución" +"payer_document_type","Tipo de documento" +"mp_status","Estado (Mercado Pago)" +"mp_status_detail","Estado Detallado (Mercado Pago)" +"Link","Link" +"Line Code","Código de Barras" +"Payer Document Type","Tipo de Documento" +"Payment Type (Mercado Pago)","Tipo de pago (Mercado Pago )" +"Installments (Mercado Pago)","Financiacíon o quotas (Mercado Pago )" +"Pix QR Code","Código QR do pix" +"Pix Code","Código de pix" +"The order %1, was refunded directly on Mercado Pago, you need to check stock of sold items.","El pedido %1 ha sido reembolsado directamente en el Mercado Pago, debe verificar su inventario de productos vendidos." +"The order %1, was refunded directly on Mercado Pago, but an error occured when refunding offline, you need to check order refunds and stock of sold items.","El pedido %1, fue reembolsado directamente en Mercado Pago, pero ocurrió un error al reembolsar fuera de línea, debe consultar las devoluciones del pedido y el stock de artículos vendidos." +"Order refunded in Mercado Pago, refunded offline in the store.","Solicitud reembolsada del Mercado Pago, reembolsado offline creado en la tienda." +"Order refunded.","Solicitud refactada.." +"API Integration","Integración de API" +"Receive refund notification","Recibir notificación de reembolso" +"Enable the creation of a Credit Note when a refund occurs in Mercado Pago.","Habilitar la creación de notas de credito cuando ocurra un reembolso en Mercado Pago." +"Enable Facebook pixel","Activar Pixel de Facebook" +"Enable Google pixel","Activar Google Pixel" +"Please check store id %1 credentials, they are invalid so they were deleted.","Verifique las credenciales de la tienda ID %1, no son válidas para que se eliminen." +"Your payment was declined due to an error in the store setup. Please get in touch with the store support and try again later.","Tu pago fue rechazado por un error en la configuración de la tienda. Contáctate con el soporte de la tienda e inténtalo más tarde." +"It was not possible to complete the payment due to a communication error. Please try again later.","No pudimos completar el pago por una falla de comunicación. Inténtalo más tarde." +"Your payment was declined because some of your card details are incorrect. Please check the information to complete the purchase.","Tu pago fue rechazado porque algún dato de la tarjeta es incorrecto. Verifica la información para finalizar la compra." +"Your payment was declined. We recommend that you use the device and payment method you usually use for online shopping.","Tu pago fue rechazado. Recomendamos que utilices el dispositivo y el medio de pago que sueles usar para compras online." +"It was not possible to complete the payment. Please use another method to complete the purchase.","No pudimos completar el pago. Usa otro medio para finalizar tu compra." +"It was not possible to complete the payment due to a communication error. Please try again later or use another payment method.","No pudimos completar el pago por una falla de comunicación. Inténtalo más tarde o usa otro medio de pago." +"Offline Payments Methods","Medios de Pago OFF" +"Exclude Payment Methods","Excluir métodos de pago" +"Select the payment methods you do NOT want to accept.","Seleccione los métodos de pago que NO desea aceptar." +"Payment Title","Título del metodo de pago" +"Accept all payment methods","Aceptar todos los medios de pago" +"There are no payment methods available, please contact the seller.", "No hay métodos de pago disponibles, póngase en contacto con el vendedor." +"Generate the ticket and pay it wherever you want.","Genere el ticket de pago y pague." +"Will be approved within 2 business days.","Será aprobado en hasta 2 días hábiles." +"Ticket - MercadoPago","Ticket - MercadoPago" +"Expiration","Vencimiento" +"PAYMENT INFORMATION","INFORMACIÓN DE PAGO" +"Payment Number (Mercado Pago): %1","Número de Pago (Mercado Pago): %1" +"FIRST PAYMENT METHOD", "PRIMERA FORMA DE PAGO" +"Card number:","Número de la tarjeta:" +"Expiration date:","Fecha de vencimiento:" +"Card holder:","Titular de la tarjeta:" +"Payment method:","Medio de pago:" +"Installments:","Cuotas:" +"Identification in the invoice:","Identificación en el resumen:" +"Payment status:","Estado del pago:" +"Detailed payment status:","Estado detallado del pago:" +"SECOND PAYMENT METHOD","SEGUNDA FORMA DE PAGO" +"Your order is %1!","Recibimos tu pedido %1!" +"Thank you for your purchase!","Gracias por su compra!" +"We are processing your payment","Estamos procesando tu pago" +"Continue Shopping","Seguir comprando" +"Create an Account","Crear una cuenta" +"First card details:","Datos de la primera tarjeta:" +"Enter the amount to be paid with the first method *", "Ingresá el monto a pagar con el primer medio *" +"Value not allowed!","Valor no permitido!" +"Remaining value ","Valor restante " +"Credit card","Tarjeta de crédito" +"Second card details:","Datos de la segunda tarjeta:" +"Payment processed by Mercado Pagoo","Pago procesado por Mercado Pago" +"This is a required field.","Este es un campo obligatorio." +"You can track your order status by creating an account.","Puede rastrear el estado de su pedido creando una cuenta." +"cardNumber should be a number.","Número de la tarjeta debería ser un número." +"cardNumber is empty.","Número de la tarjeta está vacío." +"cardNumber should be of length between '8' and '19'.","Número de la tarjeta debe ser de longitud entre '8' y '19'." +"securityCode should be a number.","CVV - Código de seguridad debería ser un número." +"securityCode should be of length '3' or '4'.","CVV - Código de seguridad debe ser de longitud '3' o '4'." +"securityCode is empty.","CVV - Código de seguridad esta vacio." +"expirationMonth should be a number.","Mes de vencimiento debería ser un número." +"expirationMonth is empty.","Mes de vencimiento esta vacio." +"expirationYear should be of length '2' or '4'.","Año de vencimiento debe ser de longitud '2' o '4'." +"expirationYear should be a number.","Año de vencimiento debería ser un número." +"expirationYear is empty.","Año de vencimiento esta vacio." +"expirationMonth should be a value from 1 to 12.","Mes de vencimiento debe ser un valor de 1 a 12." +"expirationYear value should be greater or equal than %1.", "Año de vencimiento no es válido" +"expirationMonth value should be greater than '%1' or expirationYear value should be greater than '%2'.", "Mes de vencimiento o el valor del año de vencimiento no es válido." +"cardNumber should be of length '16'.","Número de la tarjeta debe ser de longitud 16." +"Pay with two cards","Pagar con dos tarjetas" +"Payment with two cards","Pago con dos tarjetas" +"Interest-free","Sin interés" +"Your Bank will apply Interest","Tu Banco aplicará Intereses" +"Complete your order to proceed with payment.","Finaliza tu pedido para proceder con el pago." +"approved","Aprobado" +"cancelled","Cancelado" +"authorized","Autorizado" +"accredited","Autorizado" +"rejected","Rechazado" +"pending","Pendiente" +"partially_refunded","Reembolso Parcial" +"cc_rejected_call_for_authorize","Solicitud de autorización rechazada" +"in_process","En proceso" +"by_admin","Por Admin" +"cc_rejected_high_risk","Alto riesgo" +"cc_rejected_insufficient_amount","Valor Insuficiente" +"cc_rejected_other_reason","Otro Motivo" +"cc_rejected_bad_filled_security_code","security_code rellenado incorrectamente" +"cc_rejected_bad_filled_other","Rellenado incorrectamente" +"cc_rejected_bad_filled_card_number","card_number rellenado incorrectamente" +"cc_rejected_bad_filled_date","Data rellenado incorrectamente" +"cc_rejected_card_disabled","Tarjeta desactivada" +"cc_rejected_max_attempts","Intentos máximos" +"cc_rejected_invalid_installments","Cuotas llenado incorrectamente" +"cc_rejected_duplicated_payment","Pago duplicado" +"bank_rejected","Rechazado por el banco" +"bank_error","Error del banco" +"rejected_by_bank","Rechazado por el Banco" +"refunded","Reintegrado" +"by_collector","Por Vendedor" +"expired","Expirado", +"by_payer","Por pagador" +"pending_review_manual","Pendiente de revisión manual" +"pending_capture","Captura pendiente" +"reimbursed","Reintegrado" +"pending_waiting_payment","Aguardando pago pendiente" +"pending_waiting_for_remedy","Pendiente en espera de solución" +"unavailable","Indisponible" +"pending_waiting_transfer","Pendiente aguardando transferencia" +"Credit or Debit Card","Tarjeta de Crédito o Débito" +"Email Address","Correo electrónico" +"We'll email you an order confirmation with details and tracking info.","Enviaremos un correo electrónico con la confirmación del pedido con detalles e información de seguimiento." +"Your order number is: %1.","Recibimos su pedido: %1!" +"Your order # is: %1.","Recibimos su pedido: %1!" +"By continuing, you agree to our ","Al continuar aceptas nuestros " +"Terms and Conditions.","Términos y Condiciones." +"Status (Mercado Pago)","Estado (Mercado Pago)" +"Status Detail (Mercado Pago)","Detalle de estado (Mercado Pago)" +"Google Ads - Id","Google Ads - Id" +"Google Ads - Label","Google Ads - Label" +"The card details are incorrect.","Los datos de la tarjeta son incorrectos." +"The payment was rejected due to suspicion of fraud.","El pago fue rechazado por sospecha de fraude." +"The payment method used requires prior authorization of the purchase amount.","El medio de pago utilizado requiere previa autorización del monto de la compra." +"This card is blocked.","La tarjeta está bloqueada." +"You made a similar payment a short time ago. Please use another payment method.","Hiciste un pago similar recientemente, usa otro medio de pago." +"Something went wrong with the payment. Please use another card or choose a different payment method.","Algo salió mal con el pago. Paga con otra tarjeta o elige otro medio de pago." +"The number of installments chosen is invalid.","El número de cuotas elegido no es válido." +"The maximum number of attempts was reached.","Alcanzaste el número máximo de intentos de pago." +"Something went wrong. Please try again.","Algo salió mal, por favor inténtalo de nuevo." +"It was not possible to complete the payment. Please use another method to complete the purchase.","No pudimos completar el pago. Usa otro medio para finalizar tu compra." +"Your payment was declined because some of your card details are incorrect. Please check the information to complete the purchase or try another payment method.","Tu pago fue rechazado porque algún dato de la tarjeta es incorrecto. Verifica la información para finalizar la compra o utiliza otro método de pago." +"Your credentials are incorrect. Please double-check in your account your credentials are correct.","Sus credenciales son incorrectas. Regrese para completar las credenciales de su tienda correctamente." +"Your credentials are incorrect. Test credentials have been filled in and should be used in sandbox mode. Please check the credentials again.","Sus credenciales son incorrectas. Las credenciales son de prueba y se deben usar en modo sandbox. Por favor, regrese para completar las credenciales de nuevo." +"Your credentials are incorrect. Production credentials have been filled in and should be used in production mode. Please check the credentials again.","Sus credenciales son incorrectas. Las credenciales son de Producción y se deben usar en modo Producción. Por favor, regrese para completar las credenciales de nuevo." +"Minimum transaction amount not allowed for the chosen brand. Please choose another flag or make a purchase over %1.", "Monto mínimo de transacción no permitido para la Bandera elegida. Elija otra Bandera o realice una compra superior a %1." +"Download the Boleto","Descarga del boleto" +"pending_contingency", "Pendiente de contingencia" +"Pay with the method of payment you prefer and all the security of Mercado Pago.
If you already have an account at Mercado Livre, use the same email and password.
Use your Mercado Pago account balance or saved cards to buy without filling out more details.","Paga con el medio de pago que prefieras y disfruta de la seguridad de Mercado Pago.
Si ya tiene una cuenta en Mercado Livre, use el mismo e-mail y clave.
Usa tu saldo de Mercado Pago o tarjetas guardadas para comprar sin llenar más detalles." +"Payments with immediate approval.
The payment term is up to %1.
At checkout, you will receive the code to make payment at the bank of your choice (check with your bank for your daily Pix transfer limit).", "Pagos con aprobación inmediata.
El plazo de pago es hasta %1.
Al finalizar la compra, recibirá el código para realizar el pago en el banco de su elección (verifique con su banco cuál es su límite diario de transferencia de Pix)." +"Please fill a valid color in the Checkout Pro configuration","Complete un color válido en la configuración de Checkout Pro" diff --git a/i18n/es_UY.csv b/i18n/es_UY.csv new file mode 100644 index 0000000..a1b8a6f --- /dev/null +++ b/i18n/es_UY.csv @@ -0,0 +1,378 @@ +"Finance Cost","Custo do Parcelamento" +"Discount for payment at sight","Descuento para pagar en un pago" +"Set up installments and interest","Definir cuotas e intereses" +"Order not found.","Pedido no localizado." +"Mercado Pago, refund notification","Mercado Pago, notificación de reembolso" +"The order %1, was refunded directly on Mercado Pago, you need to create an offline refund.","El pedido %1, fue reembolsado directamente en Mercado Pago, necesitas crear un reembolso offline." +Unavailable.,No disponible. +"You should not be here...","No tienes que estar aquí..." +"Order Canceled.","Pedido cancelado." +"Transaction has been declined. Please try again later.","La operación fue rechazada. Por favor inténtalo de nuevo más tarde." +"%1 minutes","%1 minutos" +"1 hour","1 hora" +"12 hours","12 horas" +"1 day","1 día" +"Payment for order %1 in store %2","Pago del pedido %1 en la tienda %2" +Tax,Impuesto +"Awaiting payment of the Card.","Esperando pago via tarjeta." +"Awaiting payment.","Esperando pago." +"Awaiting payment through Checkout Pro.","Esperando pago a través del Checkout Pro." +"Awaiting payment through Pix.","Esperando pago via Pix." +"The gateway declined the transaction.","El gateway rechazó la operación." +"Please select a category","Por favor, selecciona una categoría" +description,descripción +Production,Producción +"Sandbox - Testing environment","Ecositema de testeo" +"Yes, Processed Order Synchronous","Sí, procesar solicitudes sincrónicamente" +"No, Processed Order Asynchronous","No, procesar solicitudes asíncronas" +"1 installment","1 cuota" +"2 installments","2 cuotas" +"3 installments","3 cuotas" +"4 installments","4 cuotas" +"5 installments","5 cuotas" +"6 installments","6 cuotas" +"7 installments","7 cuotas" +"8 installments","8 cuotas" +"9 installments","9 cuotas" +"10 installments","10 cuotas" +"11 installments","11 cuotas" +"12 installments","12 cuotas" +"13 installments","13 cuotas" +"14 installments","14 cuotas" +"15 installments","15 cuotas" +"16 installments","16 cuotas" +"17 installments","17 cuotas" +"18 installments","18 cuotas" +"19 installments","19 cuotas" +"20 installments","20 cuotas" +"21 installments","21 cuotas" +"22 installments","22 cuotas" +"23 installments","23 cuotas" +"24 installments","24 cuotas" +"25 installments","25 cuotas" +"26 installments","26 cuotas" +"27 installments","27 cuotas" +"28 installments","28 cuotas" +"29 installments","29 cuotas" +"30 installments","30 cuotas" +"31 installments","31 cuotas" +"32 installments","32 cuotas" +"33 installments","33 cuotas" +"34 installments","34 cuotas" +"35 installments","35 cuotas" +"36 installments","36 cuotas" +"Do Not Delete","No Finalizar" +name,nombre +"Authorization for future capture","Autorización para la captura futura" +"Authorization for immediate capture","Autorización y captura inmediata" +Configure,Configure +Close,Cerrar +"15 minutes","15 minutos" +"30 minutes - recommended","30 minutos - recomendado" +"24 hours","24 horas" +"Modal window in store environment","Ventana modal en el ecosistema de la tienda" +"Redirection to Mercado Pago environment","Redireccionamiento al ecosistema de Mercado Pago" +"Cart %1 doesn't contain products","El carrito %1 no tiene productos" +"There was an error when creating the payment. Please try again later.","Error al crear el pago. Inténtalo de nuevo más tarde." +"It was not possible to save on the installment cost amount","No fue posible economizar el monto del costo de las cuotas" +"Default Store %1 - Set Data for store id %2 Web Site Id %3","Store ID: %1 No habilitado para el uso en producción" +Finished,Finalizado +"Store ID: %1 Not allowed for production use","Datos del comerciante obtenidos con éxito." +"There was an error saving: %1","Error al guardar: %1" +"Error fetching information: %1","Error al obtener información %1" +"Please check store id %1 credentials","Por favor, verifica las credenciales de la tienda id %1" +"Order %1 - Increment Id %2 - state %3","Order %1 - Increment ID %2 - Status %3" +"Card - MercadoPago","Card - MercadoPago" +"Checkout Pro - MercadoPago","Checkout Pro - MercadoPago" +"Pix - MercadoPago","Pix - MercadoPago" +"Pse - MercadoPago","Pse - MercadoPago" +"Webpay - MercadoPago","Webpay - MercadoPago" +"Document Type","Tipo de documento" +"Document number","Número del documento" +Instruction,Instrucciones +"Due date","Vencimiento" +"In order to comply with PCI regulations, the administrator cannot capture this payment method.","Debido al cumplimiento de la normativa PCI, no es posible capturar este método de pago por el administrador." +"Payer Entity Type","Tipo de la institución de pago" +"Financial Institution","Institución financiera" +"Your access credential for store %1 is valid but you don\'t have production use permission. Request approval before use by click here.","Tu credencial de acceso a la tienda %1 es válida, pero no tienes permiso de uso de producción. Solicita aprobación antes de usar clic aquí." +"Your payment will be valid until","Tu pago es válido hasta" +"Link for payment","Link para pago" +"Details for payment","Detalles para el pago" +"Verification Code","Código de verificación" +"Line Code is","El line code es" +"Issued on behalf of","Emitido en nombre de" +"Mercado Pago partnership code","Código de convenio con Mercado Pago" +"To pay, please scan the QR code","Para pagar, escanea el código QR" +"or, if you prefer, copy-paste the code","o, si prefieres, copia y pega el código" +"Further instructions","Leer más instrucciones" +"The Line Code is","El line code es" +Copy,Copiar +Copied,Copiado +"Enter the ID Document you used in the purchase","Ingresa el Documento de identificación usado en la compra" +Pix,Pix +Waiting...,Esperando... +"Place Order","Realizar Pedido" +"Payer First Name","Nombre del Pagador" +"Payer Last Name","Apellido del Pagador" +"Card details","Datos de la tarjeta" +"Card number","Número de la tarjeta" +"CVV - Card Verification Value","CVV - Código de seguridad" +"What is this?","¿Qué es eso?" +"Expiration month","Mes de vencimiento" +"Expiration year","Año de vencimiento" +"Card holder full name","Nombre impreso en la tarjeta" +"Number of installments","Número de cuotas" +"Save for later use.","Guardar para uso futuro." +"A 3-digit number in italics on the back of your card.","Un número de 3 dígitos en itálica en el dorso de tu tarjeta." +"Entity Type","Tipo de entidad" +"Please provide a valid document identification.","No fue posible realizar el pago. Por favor, presenta un documento de identidad válido." +"Unable to make payment, check card details.","No fue posible realizar el pago. Por favor, verifica los datos de la tarjeta." +"Payment Services","Servicio de pago" +"Permission to set up the module","Permiso para configurar el módulo" +"","" +"Technical support available here.","Soporte técnico disponible aquí." +"Basic Settings","Configuraciones básicas" +"Mercado Pago integration","Integración con Mercado Pago" +"

In order to sell or test a store, you must first enter your test and production credentials.

Using the account of the collaborator with access to Mercado Pago Seller Account, search the credentials according to the account: Argentina, Brazil, Chile, Colombia, Mexico, Uruguay and Peru.

","

Para vender o testear la tienda , tienes que ingresar las credenciales de test y de producción.

Con el colaborador con acceso a la Cuenta del Vendedor de Mercado Pago, busca las credenciales según la cuenta: Argentina, Brazil, Chile, Colombia, Mexico, Uruguay and Peru.

" +"Checkout operation mode","Modo de Operación del Checkout" +"When operational mode is set as Sandbox, your sales will not be communicated to financial institutions.","Cuando el modo operacional esté definido como Sandbox, tus ventas no serán comunicadas a las instituciones financieras." +"Public Key - production","Public Key - producción" +"Access Token - production","Access Token - producción" +"Public Key - Sandbox","Public Key - Sandbox" +"Access Token - Sandbox","Access Token - Sandbox" +"Developers support","Soporte para desarrolladores" +Debug,Debug +"We record your store's communications with Mercado Pago in orer to offer a better support. Please note it is not recommended to use the debug mode when your store is in production mode.","Registramos las comunicaciones de tu tienda con Mercado Pago para ofrecer un soporte aún mejor. Atención: no se recomienda usar el modo debug con la tienda en modo de producción." +"Rewrite notification URL","Reescribe la notificación URL" +"You can override notification URLs which are automatically generated. In order to use the module's default, please do not fill in this details.","Puedes substituir las URLs de notificación que se generan automáticamente. Para usar el padrón del módulo, por favor, no cargues estos datos." +"Store Name, Category and Integrator ID","Nombre de la tienda, Categoría e ID del Integrador" +"Store Name","Nombre de la tienda" +"This is the store's name as it will appear on the customer's invoice. In case the sale was made through Checkout Pro, the invoice will also show Mercado Pago in the name.","El nombre de la tienda igual a como figurará en la factura del cliente. Si la venta se hizo por medio del Checkout Pro, la factura también identificará a Mercado Pago en el nombre." +"Category of your store","Categoría de tu tienda" +"The product category of your store on Mercado Pago.","La categoría del producto de tu tienda en Mercado Pago." +"Integrator ID","ID del integrador" +"With this number, we are able to identify all your transactions and know how many sales were processed using your account. Become a certified Mercado Pago partner and request your integrator_id here.","Con este número, podemos identificar todas tus operaciones y saber cuántas ventas fueron procesadas con tu cuenta. Conviértete en un socio certificado de Mercado Pago y pide tu integrator_id here." +"Sales requirements","Exigencias de ventas" +"Checkout Pro","Checkout Pro" +Enabled,Activado +Title,Título +"Payment method title at the store's checkout.","Título de la forma de pago en el checkout de la tienda." +"Deadline for payment","Plazo límite para el pago" +"Calendar days.","Días seguidos." +"Payment completion view","Visualización de la finalización del pago" +"Modal: Buyer will close via modal on the checkout screen. Redirection: Buyer will be redirected to the Mercado Pago website.","Modal, el cliente finalizará vía modal en la pantalla de checkout. Redireccionamiento, el cliente será redireccionado al sitio de Mercado Pago" +"Removed payment method","Medio de pago finalizado" +"Select the payment methods you do NOT want to accept.","Selecciona los medios de pago que NO quieres aceptar." +"Installment options limit","Límite de cuotas" +"It is possible to configure the number of installments in Checkout Pro, but the limit of installments per purchase will also depend on the minimum and maximum amount defined by each flag in the country of your store.","Se puede configurar el número de cuotas en Checkout Pro, pero el límite de cuotas por compra también depende de los valores mínimo y máximo determinados por cada bandera del país en que se encuentra tu tienda." +"Conversion tags","Tags de conversión" +"You can link your Checkout Pro sales with external services.","Puedes asociar tus ventas del Checkout Pro a servicios externos." +Facebook,Facebook +"Link your sales with Facebook by entering the ID No. and your tracking code.","Asocia tus ventas al Facebook, informando el ID del de tu código de rastreo." +"Google Ads","Google Ads" +"Link your sales with Google Ads by entering the ID No. and your tracking code.","Asocia tus ventas al Google Ads, informando el ID del tu código de rastreo." +"Link your sales with Google Ads by entering the Label and your tracking code.","Asocia tus ventas al Google Ads, informando el Label del tu código de rastreo." +"Customization and Styles","Personalización y estilos" +"Set up how the items will appear in the modal window in which the buyer will complete the purchase.","Define la apariencia de los ítems en la ventana modal en la que el cliente finalizará la compra." +"Header Color","Color del header" +"Elements Color","Colores de los elementos" +"Common Payment Method Definitions","Definiciones comunes de medios de pago" +"Minimum order total","Monto mínimo del pedido" +"Minimum amount to pay with Checkout Pro.","Monto mínimo a pagar con Checkout Pro." +"Maximum order amount","Monto máximo de pedido" +"Maximum amount to pay with Checkout Pro","Monto máximo a pagar con Checkout Pro." +"Payment From Specific Countries","Pago de países específicos" +"Countries eligible to use this payment method.","Países que pueden usar este medio de pago." +"Sort Order","Orden de visualización" +"Sets up in which order the payment methods will be shown at the Checkout.","Define el orden de visualización del medio de pago en el Checkout." +"Checkout Transparent","Checkout Transparente" +"Capture of customer details in the payment form","Captura de datos del cliente en el formulario de pago" +"Activate this option if you want to obtain buyer`s documents details, using an additional field on the payment form. Disable it if your store already gets these details.","Activa esta función para capturar documentos de clientes con un campo adicional en el formulario de pago. Desactívala si la tienda ya captura estos datos." +"Capture document identification","Capturar documento de identificación" +"Capture name","Capturar nombre" +"In case you leave this option active, an additional field in the payment form will obtain this information. If disabled, details will be retrieved directly from other fields within your store.","Si se activa, el formulario de pago mostrará un campo adicional para colectar esa información. Si se inhabilita, el monto será capturado directamente de otros campos en tu tienda." +"Credit and debit cards","Tarjeta de crédito y débito" +"Enable vault","Habilitar caja fuerte" +"Allows buyer to save the card for future use.","Permite que tu cliente guarde la tarjeta para uso futuro." +"Payment Action","Perfil de pago" +"Consult the store's business sector to be able to select capturing the payment at the time of the purchase or at a later moment.","Consulta la rama de negocios de la tienda para poder elegir entre capturar el pago en el acto de la compra o posteriormente." +"Use Binary Mode","Usa el modo binario" +"Installment and interest","Cuotas e intereses" +"Set within your account","Definir en tu cuenta" +"Minimum amount for payment with this payment method.","Monto mínimo para este medio de pago." +"Maximum amount for payment with this payment method.","Monto máximo para este medio de pago." +Pse,Pse +"Minimum amount to pay with Pse.","Monto mínimo a pagar con Pse." +"Maximum amount to pay with Pse.","Monto máximo a pagar con Pse." +Webpay,Webpay +"Minimum amount to pay with Webpay.","Monto mínimo a pagar con Webpay." +"Maximum amount to pay with Webpay.","Monto máximo a pagar con Webpay." +"Store information hosted in Mercado Pago","Información de la tienda en Mercado Pago" +"User Id","Código de identificación" +"User Email","E-mail de usuario" +"User Name","Nombre" +"mp_payment_id","Identificación de pago (Mercado Pago)" +"card_installments","Cuotas" +"card_finance_cost","Custo do Parcelamento" +"card_type","Bandera" +"card_number","Numero de tarjeta" +"card_holder_name","Nombre impreso en tarjeta" +"card_exp_year","Año de vencimiento" +"card_exp_month","Mês de vencimiento" +"payer_document_identification","Documento de identificación" +"payer_first_name","Nombre" +"payer_last_name","Apellido" +"init_point","Link" +"date_of_expiration","Fecha de expiración" +"barcode","Código de barras" +"external_resource_url","Enlace de pago" +"verification_code","Código de verificación" +"financial_institution","Institución" +"payer_document_type","Tipo de documento" +"mp_status","Estado (Mercado Pago)" +"mp_status_detail","Estado Detallado (Mercado Pago)" +"Link","Link" +"Line Code","Código de Barras" +"Payer Document Type","Tipo de Documento" +"Payment Type (Mercado Pago)","Tipo de pago (Mercado Pago )" +"Installments (Mercado Pago)","Financiacíon o quotas (Mercado Pago )" +"Pix QR Code","Código QR do pix" +"Pix Code","Código de pix" +"The order %1, was refunded directly on Mercado Pago, you need to check stock of sold items.","El pedido %1 ha sido reembolsado directamente en el Mercado Pago, debe verificar su inventario de productos vendidos." +"The order %1, was refunded directly on Mercado Pago, but an error occured when refunding offline, you need to check order refunds and stock of sold items.","El pedido %1, fue reembolsado directamente en Mercado Pago, pero ocurrió un error al reembolsar fuera de línea, debe consultar las devoluciones del pedido y el stock de artículos vendidos." +"Order refunded in Mercado Pago, refunded offline in the store.","Solicitud reembolsada del Mercado Pago, reembolsado offline creado en la tienda." +"Order refunded.","Solicitud refactada.." +"API Integration","Integración de API" +"Receive refund notification","Recibir notificación de reembolso" +"Enable the creation of a Credit Note when a refund occurs in Mercado Pago.","Habilitar la creación de notas de credito cuando ocurra un reembolso en Mercado Pago." +"Enable Facebook pixel","Activar Pixel de Facebook" +"Enable Google pixel","Activar Google Pixel" +"Please check store id %1 credentials, they are invalid so they were deleted.","Verifique las credenciales de la tienda ID %1, no son válidas para que se eliminen." +"Your payment was declined due to an error in the store setup. Please get in touch with the store support and try again later.","Tu pago fue rechazado por un error en la configuración de la tienda. Contáctate con el soporte de la tienda e inténtalo más tarde." +"It was not possible to complete the payment due to a communication error. Please try again later.","No pudimos completar el pago por una falla de comunicación. Inténtalo más tarde." +"Your payment was declined because some of your card details are incorrect. Please check the information to complete the purchase.","Tu pago fue rechazado porque algún dato de la tarjeta es incorrecto. Verifica la información para finalizar la compra." +"Your payment was declined. We recommend that you use the device and payment method you usually use for online shopping.","Tu pago fue rechazado. Recomendamos que utilices el dispositivo y el medio de pago que sueles usar para compras online." +"It was not possible to complete the payment. Please use another method to complete the purchase.","No pudimos completar el pago. Usa otro medio para finalizar tu compra." +"It was not possible to complete the payment due to a communication error. Please try again later or use another payment method.","No pudimos completar el pago por una falla de comunicación. Inténtalo más tarde o usa otro medio de pago." +"Offline Payments Methods","Medios de Pago OFF" +"Exclude Payment Methods","Excluir métodos de pago" +"Select the payment methods you do NOT want to accept.","Seleccione los métodos de pago que NO desea aceptar." +"Payment Title","Título del metodo de pago" +"Accept all payment methods","Aceptar todos los medios de pago" +"There are no payment methods available, please contact the seller.", "No hay métodos de pago disponibles, póngase en contacto con el vendedor." +"Generate the ticket and pay it wherever you want.","Genere el ticket de pago y pague." +"Will be approved within 2 business days.","Será aprobado en hasta 2 días hábiles." +"Ticket - MercadoPago","Ticket - MercadoPago" +"Expiration","Vencimiento" +"PAYMENT INFORMATION","INFORMACIÓN DE PAGO" +"Payment Number (Mercado Pago): %1","Número de Pago (Mercado Pago): %1" +"FIRST PAYMENT METHOD", "PRIMERA FORMA DE PAGO" +"Card number:","Número de la tarjeta:" +"Expiration date:","Fecha de vencimiento:" +"Card holder:","Titular de la tarjeta:" +"Payment method:","Medio de pago:" +"Installments:","Cuotas:" +"Identification in the invoice:","Identificación en el resumen:" +"Payment status:","Estado del pago:" +"Detailed payment status:","Estado detallado del pago:" +"SECOND PAYMENT METHOD","SEGUNDA FORMA DE PAGO" +"Your order is %1!","Recibimos tu pedido %1!" +"Thank you for your purchase!","Gracias por su compra!" +"We are processing your payment","Estamos procesando tu pago" +"Continue Shopping","Seguir comprando" +"Create an Account","Crear una cuenta" +"First card details:","Datos de la primera tarjeta:" +"Enter the amount to be paid with the first method *", "Ingresá el monto a pagar con el primer medio *" +"Value not allowed!","Valor no permitido!" +"Remaining value ","Valor restante " +"Credit card","Tarjeta de crédito" +"Second card details:","Datos de la segunda tarjeta:" +"Payment processed by Mercado Pago","Pago procesado por Mercado Pago" +"This is a required field.","Este es un campo obligatorio." +"You can track your order status by creating an account.","Puede rastrear el estado de su pedido creando una cuenta." +"cardNumber should be a number.","Número de la tarjeta debería ser un número." +"cardNumber is empty.","Número de la tarjeta está vacío." +"cardNumber should be of length between '8' and '19'.","Número de la tarjeta debe ser de longitud entre '8' y '19'." +"securityCode should be a number.","CVV - Código de seguridad debería ser un número." +"securityCode should be of length '3' or '4'.","CVV - Código de seguridad debe ser de longitud '3' o '4'." +"securityCode is empty.","CVV - Código de seguridad esta vacio." +"expirationMonth should be a number.","Mes de vencimiento debería ser un número." +"expirationMonth is empty.","Mes de vencimiento esta vacio." +"expirationYear should be of length '2' or '4'.","Año de vencimiento debe ser de longitud '2' o '4'." +"expirationYear should be a number.","Año de vencimiento debería ser un número." +"expirationYear is empty.","Año de vencimiento esta vacio." +"expirationMonth should be a value from 1 to 12.","Mes de vencimiento debe ser un valor de 1 a 12." +"expirationYear value should be greater or equal than %1.", "Año de vencimiento no es válido" +"expirationMonth value should be greater than '%1' or expirationYear value should be greater than '%2'.", "Mes de vencimiento o el valor del año de vencimiento no es válido." +"cardNumber should be of length '16'.","Número de la tarjeta debe ser de longitud 16." +"Pay with two cards","Pagar con dos tarjetas" +"Payment with two cards","Pago con dos tarjetas" +"Interest-free","Sin interés" +"Your Bank will apply Interest","Tu Banco aplicará Intereses" +"Complete your order to proceed with payment.","Finaliza tu pedido para proceder con el pago." +"approved","Aprobado" +"cancelled","Cancelado" +"authorized","Autorizado" +"accredited","Autorizado" +"rejected","Rechazado" +"pending","Pendiente" +"partially_refunded","Reembolso Parcial" +"cc_rejected_call_for_authorize","Solicitud de autorización rechazada" +"in_process","En proceso" +"by_admin","Por Admin" +"cc_rejected_high_risk","Alto riesgo" +"cc_rejected_insufficient_amount","Valor Insuficiente" +"cc_rejected_other_reason","Otro Motivo" +"cc_rejected_bad_filled_security_code","security_code rellenado incorrectamente" +"cc_rejected_bad_filled_other","Rellenado incorrectamente" +"cc_rejected_bad_filled_card_number","card_number rellenado incorrectamente" +"cc_rejected_bad_filled_date","Data rellenado incorrectamente" +"cc_rejected_card_disabled","Tarjeta desactivada" +"cc_rejected_max_attempts","Intentos máximos" +"cc_rejected_invalid_installments","Cuotas llenado incorrectamente" +"cc_rejected_duplicated_payment","Pago duplicado" +"bank_rejected","Rechazado por el banco" +"bank_error","Error del banco" +"rejected_by_bank","Rechazado por el Banco" +"refunded","Reintegrado" +"by_collector","Por Vendedor" +"expired","Expirado", +"by_payer","Por pagador" +"pending_review_manual","Pendiente de revisión manual" +"pending_capture","Captura pendiente" +"reimbursed","Reintegrado" +"pending_waiting_payment","Aguardando pago pendiente" +"pending_waiting_for_remedy","Pendiente en espera de solución" +"unavailable","Indisponible" +"pending_waiting_transfer","Pendiente aguardando transferencia" +"Credit or Debit Card","Tarjeta de Crédito o Débito" +"Email Address","Correo electrónico" +"We'll email you an order confirmation with details and tracking info.","Enviaremos un correo electrónico con la confirmación del pedido con detalles e información de seguimiento." +"Your order number is: %1.","Recibimos su pedido: %1!" +"Your order # is: %1.","Recibimos su pedido: %1!" +"By continuing, you agree to our ","Al continuar aceptas nuestros " +"Terms and Conditions.","Términos y Condiciones." +"Status (Mercado Pago)","Estado (Mercado Pago)" +"Status Detail (Mercado Pago)","Detalle de estado (Mercado Pago)" +"Google Ads - Id","Google Ads - Id" +"Google Ads - Label","Google Ads - Label" +"The card details are incorrect.","Los datos de la tarjeta son incorrectos." +"The payment was rejected due to suspicion of fraud.","El pago fue rechazado por sospecha de fraude." +"The payment method used requires prior authorization of the purchase amount.","El medio de pago utilizado requiere previa autorización del monto de la compra." +"This card is blocked.","La tarjeta está bloqueada." +"You made a similar payment a short time ago. Please use another payment method.","Hiciste un pago similar recientemente, usa otro medio de pago." +"Something went wrong with the payment. Please use another card or choose a different payment method.","Algo salió mal con el pago. Paga con otra tarjeta o elige otro medio de pago." +"The number of installments chosen is invalid.","El número de cuotas elegido no es válido." +"The maximum number of attempts was reached.","Alcanzaste el número máximo de intentos de pago." +"Something went wrong. Please try again.","Algo salió mal, por favor inténtalo de nuevo." +"It was not possible to complete the payment. Please use another method to complete the purchase.","No pudimos completar el pago. Usa otro medio para finalizar tu compra." +"Your payment was declined because some of your card details are incorrect. Please check the information to complete the purchase or try another payment method.","Tu pago fue rechazado porque algún dato de la tarjeta es incorrecto. Verifica la información para finalizar la compra o utiliza otro método de pago." +"Your credentials are incorrect. Please double-check in your account your credentials are correct.","Sus credenciales son incorrectas. Regrese para completar las credenciales de su tienda correctamente." +"Your credentials are incorrect. Test credentials have been filled in and should be used in sandbox mode. Please check the credentials again.","Sus credenciales son incorrectas. Las credenciales son de prueba y se deben usar en modo sandbox. Por favor, regrese para completar las credenciales de nuevo." +"Your credentials are incorrect. Production credentials have been filled in and should be used in production mode. Please check the credentials again.","Sus credenciales son incorrectas. Las credenciales son de Producción y se deben usar en modo Producción. Por favor, regrese para completar las credenciales de nuevo." +"Minimum transaction amount not allowed for the chosen brand. Please choose another flag or make a purchase over %1.", "Monto mínimo de transacción no permitido para la Bandera elegida. Elija otra Bandera o realice una compra superior a %1." +"Download the Boleto","Descarga del boleto" +"pending_contingency", "Pendiente de contingencia" +"Pay with the method of payment you prefer and all the security of Mercado Pago.
If you already have an account at Mercado Livre, use the same email and password.
Use your Mercado Pago account balance or saved cards to buy without filling out more details.","Paga con el medio de pago que prefieras y disfruta de la seguridad de Mercado Pago.
Si ya tiene una cuenta en Mercado Livre, use el mismo e-mail y clave.
Usa tu saldo de Mercado Pago o tarjetas guardadas para comprar sin llenar más detalles." +"Payments with immediate approval.
The payment term is up to %1.
At checkout, you will receive the code to make payment at the bank of your choice (check with your bank for your daily Pix transfer limit).", "Pagos con aprobación inmediata.
El plazo de pago es hasta %1.
Al finalizar la compra, recibirá el código para realizar el pago en el banco de su elección (verifique con su banco cuál es su límite diario de transferencia de Pix)." +"Please fill a valid color in the Checkout Pro configuration","Complete un color válido en la configuración de Checkout Pro" diff --git a/i18n/not_collectable.csv b/i18n/not_collectable.csv new file mode 100644 index 0000000..76c2cc5 --- /dev/null +++ b/i18n/not_collectable.csv @@ -0,0 +1,20 @@ +"mp_payment_id","Payment Id (Mercado Pago)" +"card_installments","Installments" +"card_finance_cost","Custo do Parcelamento" +"card_type","Card Type" +"card_number","Card Number" +"card_holder_name","Card Holder Name" +"card_exp_year","Card Exp Year" +"card_exp_month","Card Exp Month" +"payer_document_identification","Document number" +"payer_first_name","First Name" +"payer_last_name","Last Name" +"init_point","Url" +"date_of_expiration","Date of Expiration" +"barcode","Barcode" +"external_resource_url","External Resource Url" +"verification_code","Verification Code" +"financial_institution","Financial Institution" +"payer_document_type","Payer Document Type" +"mp_status","Status (Mercado Pago)" +"mp_status_detail","Status Detail (Mercado Pago)" diff --git a/i18n/pt_BR.csv b/i18n/pt_BR.csv new file mode 100644 index 0000000..4b05649 --- /dev/null +++ b/i18n/pt_BR.csv @@ -0,0 +1,378 @@ +"Finance Cost","Custo do Parcelamento" +"Discount for payment at sight","Desconto para pagamento à vista" +"Set up installments and interest","Definir Parcelas e Juros" +"Order not found.","Pedido não localizado." +"Mercado Pago, refund notification","Mercado Pago, notificação de reembolso" +"The order %1, was refunded directly on Mercado Pago, you need to create an offline refund.","O pedido %1, foi reembolsado diretamente no Mercado Pago, você precisa realizar um reembolso offine." +Unavailable.,Indisponível. +"You should not be here...","Não é para você estar aqui..." +"Order Canceled.","Pedido cancelado." +"Transaction has been declined. Please try again later.","A transação foi recusada. Por favor, tente novamente mais tarde." +"%1 minutes","%1 minutos" +"1 hour","1 hora" +"12 hours","12 horas" +"1 day","1 dia" +"Payment for order %1 in store %2","Pagamento do pedido %1 na loja %2" +Tax,Imposto +"Awaiting payment of the Card.","Aguardando pagamento via Cartão." +"Awaiting payment.","Aguardando pagamento." +"Awaiting payment through Checkout Pro.","Aguardando pagamento por meio do Checkout Pro." +"Awaiting payment through Pix.","Aguardando pagamento via Pix." +"The gateway declined the transaction.","O gateway recusou a transação." +"Please select a category","Por favor, selecione uma categoria" +description,descrição +Production,Produção +"Sandbox - Testing environment","Sandbox - Ambiente de teste" +"Yes, Processed Order Synchronous","Sim, processar pedidos síncrono" +"No, Processed Order Asynchronous","Não, processar pedidos assíncrono" +"1 installment","1 parcela" +"2 installments","2 parcelas" +"3 installments","3 parcelas" +"4 installments","4 parcelas" +"5 installments","5 parcelas" +"6 installments","6 parcelas" +"7 installments","7 parcelas" +"8 installments","8 parcelas" +"9 installments","9 parcelas" +"10 installments","10 parcelas" +"11 installments","11 parcelas" +"12 installments","12 parcelas" +"13 installments","13 parcelas" +"14 installments","14 parcelas" +"15 installments","15 parcelas" +"16 installments","16 parcelas" +"17 installments","17 parcelas" +"18 installments","18 parcelas" +"19 installments","19 parcelas" +"20 installments","20 parcelas" +"21 installments","21 parcelas" +"22 installments","22 parcelas" +"23 installments","23 parcelas" +"24 installments","24 parcelas" +"25 installments","25 parcelas" +"26 installments","26 parcelas" +"27 installments","27 parcelas" +"28 installments","28 parcelas" +"29 installments","29 parcelas" +"30 installments","30 parcelas" +"31 installments","31 parcelas" +"32 installments","32 parcelas" +"33 installments","33 parcelas" +"34 installments","34 parcelas" +"35 installments","35 parcelas" +"36 installments","36 parcelas" +"Do Not Delete","Não Excluir" +name,nome +"Authorization for future capture","Autorização para captura futura" +"Authorization for immediate capture","Autorização e captura imediata" +Configure,Configurar +Close,Fechar +"15 minutes","15 minutos" +"30 minutes - recommended","30 minutos - recomendado" +"24 hours","24 horas" +"Modal window in store environment","Janela modal no ambiente da loja" +"Redirection to Mercado Pago environment","Redirecionamento para o ambiente do Mercado Pago" +"Cart %1 doesn't contain products","O carrinho %1 não tem produtos" +"There was an error when creating the payment. Please try again later.","Erro ao criar o pagamento. Tente novamente mais tarde." +"It was not possible to save on the installment cost amount","Não foi possível salvar o valor do custo de parcelamento" +"Default Store %1 - Set Data for store id %2 Web Site Id %3","Store ID: %1 Não habilitado para uso em produção" +Finished,Concluído +"Store ID: %1 Not allowed for production use","Store ID: %1 Não habilitada para uso em produção." +"There was an error saving: %1","Erro ao salvar: %1" +"Error fetching information: %1","Erro ao obter informações: %1" +"Please check store id %1 credentials","Por favor, verifique as credenciais da loja id %1" +"Order %1 - Increment Id %2 - state %3","Order %1 - Increment Id %2 - state %3" +"Card - MercadoPago","Card - MercadoPago" +"Checkout Pro - MercadoPago","Checkout Pro - MercadoPago" +"Pix - MercadoPago","Pix - MercadoPago" +"Pse - MercadoPago","Pse - MercadoPago" +"Webpay - MercadoPago","Webpay - MercadoPago" +"Document Type","Tipo de Documento" +"Document number","Número do documento" +Instruction,Instruções +"Due date","Vencimento" +"In order to comply with PCI regulations, the administrator cannot capture this payment method.","Devido à conformidade com o PCI, não é possível capturar esta forma de pagamento pelo administrador." +"Payer Entity Type","Tipo da instituição de pagamento" +"Financial Institution","Instituição financeira" +"Your access credential for store %1 is valid but you don\'t have production use permission. Request approval before use by click here.","Sua credencial de acesso à loja %1 é válida, mas você não tem permissão de uso de produção. Solicite aprovação antes de usar clique aqui." +"Your payment will be valid until","Seu pagamento é válido até" +"Link for payment","Link para pagamento" +"Details for payment","Detalhes para o pagamento" +"Verification Code","Código de Verificação" +"Line Code is","O código de barras é" +"Issued on behalf of","Emitido em nome de" +"Mercado Pago partnership code","Código do convênio com o Mercado Pago" +"To pay, please scan the QR code","Para pagar, escaneie o código QR" +"or, if you prefer, copy-paste the code","ou, se preferir, copie e cole o código" +"Further instructions","Ler mais instruções" +"The Line Code is","O código de barras é" +Copy,Copiar +Copied,Copiado +"Enter the ID Document you used in the purchase","Informe o Documento de Identificação usado na compra" +Pix,Pix +Waiting...,Aguardando... +"Place Order","Realizar pedido" +"Payer First Name","Nome do Pagador" +"Payer Last Name","Sobrenome do Pagador" +"Card details","Dados do cartão" +"Card number","Número do cartão" +"CVV - Card Verification Value","CVV - Código de segurança" +"What is this?","O que é isso?" +"Expiration month","Mês de vencimento" +"Expiration year","Ano de vencimento" +"Card holder full name","Nome impresso no cartão" +"Number of installments","Número de parcelas" +"Save for later use.","Salvar para uso futuro." +"A 3-digit number in italics on the back of your card.","Um número de 3 dígitos em itálico no verso do seu cartão." +"Entity Type","Tipo" +"Please provide a valid document identification.","Por favor, forneça um documento de identificação válido." +"Unable to make payment, check card details.","Não foi possível efetuar o pagamento. Por favor, verifique os dados do cartão." +"Payment Services","Serviços de pagamento" +"Permission to set up the module","Permissão para configurar o módulo" +"","" +"Technical support available here.","Suporte técnico disponível aqui." +"Basic Settings","Configurações Básicas" +"Mercado Pago integration","Integração com o Mercado Pago" +"

In order to sell or test a store, you must first enter your test and production credentials.

Using the account of the collaborator with access to Mercado Pago Seller Account, search the credentials according to the account: Argentina, Brazil, Chile, Colombia, Mexico, Uruguay and Peru.

","

Para vender ou testar loja, é preciso inserir credenciais de teste e de produção.

Com o colaborador com acesso da Conta de Vendedor do Mercado Pago, busque as credenciais de acordo com a conta: Argentina, Brazil, Chile, Colombia, Mexico, Uruguay e Peru.

" +"Checkout operation mode","Modo de Operação do Checkout" +"When operational mode is set as Sandbox, your sales will not be communicated to financial institutions.","Quando o modo operacional estiver definido como Sandbox, suas vendas não serão comunicadas às instituições financeiras." +"Public Key - production","Public Key - produção" +"Access Token - production","Access Token - produção" +"Public Key - Sandbox","Public Key - Sandbox" +"Access Token - Sandbox","Access Token - Sandbox" +"Developers support","Suporte para desenvolvedores" +Debug,Debug +"We record your store's communications with Mercado Pago in orer to offer a better support. Please note it is not recommended to use the debug mode when your store is in production mode.","Registramos as comunicações da sua loja com o Mercado Pago para oferecer um suporte ainda melhor. Atenção: não é recomendado usar o modo debug com a loja em modo de produção." +"Rewrite notification URL","Reescrever a URL de notificação" +"You can override notification URLs which are automatically generated. In order to use the module's default, please do not fill in this details.","Você pode substituir os URLs de notificação que são gerados automaticamente. Para usar o padrão do módulo, por favor, não preencha esses dados." +"Store Name, Category and Integrator ID","Nome da loja, Categoria e ID do Integrador" +"Store Name","Nome da loja" +"This is the store's name as it will appear on the customer's invoice. In case the sale was made through Checkout Pro, the invoice will also show Mercado Pago in the name.","O nome da loja conforme vai constar na fatura do cliente. Se a venda foi feita por meio do Checkout Pro, a fatura também identificará o Mercado Pago no nome." +"Category of your store","Categoria da sua loja" +"The product category of your store on Mercado Pago.","A categoria de produto da sua loja no Mercado Pago." +"Integrator ID","ID do Integrador" +"With this number, we are able to identify all your transactions and know how many sales were processed using your account. Become a certified Mercado Pago partner and request your integrator_id here.","Com este número, nós podemos identificar todas as suas transações e saber quantas vendas foram processadas com a sua conta. Torne-se um parceiro certificado do Mercado Pago e solicite seu integrator_id here." +"Sales requirements","Exigências de vendas" +"Checkout Pro","Checkout Pro" +"Enabled","Ativado" +"Title","Título" +"Payment method title at the store's checkout.","Título da forma de pagamento no checkout da loja." +"Deadline for payment","Prazo limite para pagamento" +"Calendar days.","Dias corridos." +"Payment completion view","Visualização da conclusão de pagamento" +"Modal: Buyer will close via modal on the checkout screen. Redirection: Buyer will be redirected to the Mercado Pago website.","Modal, o cliente vai concluir via modal na tela de checkout. Redirecionamento, o cliente será redirecionado para o site do Mercado Pago" +"Removed payment method","Meio de pagamento excluído" +"Select the payment methods you do NOT want to accept.","Selecione os meios de pagamento que você NÃO quer aceitar." +"Installment options limit","Limite de Parcelas" +"It is possible to configure the number of installments in Checkout Pro, but the limit of installments per purchase will also depend on the minimum and maximum amount defined by each flag in the country of your store.","É possível configurar o número de parcelas no Checkout Pro, mas o limite de parcelas por compra também depende dos valores mínimo e máximo determinados por cada bandeira do país em que sua loja se encontra." +"Conversion tags","Tags de Conversão" +"You can link your Checkout Pro sales with external services.","Você pode associar suas vendas do Checkout Pro a serviços externos." +Facebook,Facebook +"Link your sales with Facebook by entering the ID No. and your tracking code.","Associe suas vendas ao Facebook, informando o ID e seu código de rastreamento." +"Google Ads","Google Ads" +"Link your sales with Google Ads by entering the ID No. and your tracking code.","Associe suas vendas ao Google Ads, informando o ID de seu código de rastreamento." +"Link your sales with Google Ads by entering the Label and your tracking code.","Associe suas vendas ao Google Ads, informando a Label de seu código de rastreamento." +"Customization and Styles","Personalização e estilos" +"Set up how the items will appear in the modal window in which the buyer will complete the purchase.","Defina a aparência de itens na janela modal em que o cliente conclui a compra." +"Header Color","Cor do header" +"Elements Color","Cores dos elementos" +"Common Payment Method Definitions","Definições comuns de meios de pagamento" +"Minimum order total","Valor mínimo do pedido" +"Minimum amount to pay with Checkout Pro.","Valor mínimo para pagamento com Checkout Pro." +"Maximum order amount","Valor máximo de pedido" +"Maximum amount to pay with Checkout Pro","Valor máximo para pagamento com Checkout Pro." +"Payment From Specific Countries","Pagamento de países específicos" +"Countries eligible to use this payment method.","Países que podem usar este meio de pagamento." +"Sort Order","Ordem de exibição" +"Sets up in which order the payment methods will be shown at the Checkout.","Define a ordem de exibição do meio de pagamento no Checkout." +"Checkout Transparent","Checkout Transparente" +"Capture of customer details in the payment form","Captura de dados do cliente no formulário de pagamento" +"Activate this option if you want to obtain buyer`s documents details, using an additional field on the payment form. Disable it if your store already gets these details.","Ative esta função para capturar documentos de clientes com um campo adicional no formulário de pagamento. Desative se a loja já captura estes dados. " +"Capture document identification","Capturar documento de identificação" +"Capture name","Capturar nome" +"In case you leave this option active, an additional field in the payment form will obtain this information. If disabled, details will be retrieved directly from other fields within your store.","Se ativado, o formulário de pagamento vai mostrar um campo adicional para coletar essas informações. Se desabilitado, o valor será capturado diretamente de outros campos em sua loja." +"Credit and debit cards","Cartão de crédito e débito" +"Enable vault","Habilitar cofre" +"Allows buyer to save the card for future use.","Permite que seu cliente salve o cartão para uso futuro." +"Payment Action","Perfil do pagamento" +"Consult the store's business sector to be able to select capturing the payment at the time of the purchase or at a later moment.","Consulte o ramo de negócios da loja para poder escolher entre capturar o pagamento no ato da compra ou posteriormente." +"Use Binary Mode","Usar modo binário" +"Installment and interest","Parcelamento e juros" +"Set within your account","Definir na sua conta" +"Minimum amount for payment with this payment method.","Valor mínimo para este meio de pagamento." +"Maximum amount for payment with this payment method.","Valor máximo para este meio de pagamento." +Pse,Pse +"Minimum amount to pay with Pse.","Valor mínimo para pagamento Pse." +"Maximum amount to pay with Pse.","Valor máximo para pagamento Pse." +Webpay,Webpay +"Minimum amount to pay with Webpay.","Valor mínimo para pagamento Webpay." +"Maximum amount to pay with Webpay.","Valor máximo para pagamento Webpay." +"Store information hosted in Mercado Pago","Informações da loja no Mercado Pago" +"User Id","Código de identificação" +"User Email","E-mail do usuário" +"User Name","Nome" +"mp_payment_id","Identificação do Pagamento (Mercado Pago)" +"card_installments","Parcelas" +"card_finance_cost","Custo do Parcelamento" +"card_type","Bandeira" +"card_number","Número do cartão" +"card_holder_name","Nome impresso no cartão" +"card_exp_year","Ano de Expiração" +"card_exp_month","Mês de Expiração" +"payer_document_identification","Documento de Identificação" +"payer_first_name","Nome" +"payer_last_name","Sobrenome" +"init_point","Link" +"date_of_expiration","Data de Expiração" +"barcode","Código de Barras" +"external_resource_url","Link de Pagamento" +"verification_code","Código de Verificação" +"financial_institution","Instituição" +"payer_document_type","Tipo de Documento" +"mp_status","Status (Mercado Pago)" +"mp_status_detail","Status Detalhado (Mercado Pago)" +"Link","Link" +"Line Code","Código de Barras" +"Payer Document Type","Tipo de Documento" +"Payment Type (Mercado Pago)","Tipo de Pagamento (Mercado Pago)" +"Installments (Mercado Pago)","Parcelamento (Mercado Pago)" +"Pix QR Code","QR Code do Pix" +"Pix Code","Código do Pix" +"The order %1, was refunded directly on Mercado Pago, you need to check stock of sold items.","O pedido %1, foi reembolsado diretamente no Mercado Pago, você precisa verificar o estoque de itens vendidos." +"The order %1, was refunded directly on Mercado Pago, but an error occured when refunding offline, you need to check order refunds and stock of sold items.","O pedido %1, foi reembolsado diretamente no Mercado Pago, mas ocorreu um erro ao reembolsar offline, é necessário verificar o reembolso do pedido e estoque de itens vendidos." +"Order refunded in Mercado Pago, refunded offline in the store.","Pedido reembolsado no Mercado Pago, reembolsado offline criado na loja." +"Order refunded.","Pedido reembolsado." +"API Integration","API Integração" +"Receive refund notification","Receber notificação de reembolso" +"Enable the creation of a Credit Note when a refund occurs in Mercado Pago.","Habilite a criação Nota de Crédito quando ocorrer um reembolso no Mercado Pago." +"Enable Facebook pixel","Ativar pixel do Facebook" +"Enable Google pixel","Ativar pixel do Google" +"Please check store id %1 credentials, they are invalid so they were deleted.","Por favor, verifique as credenciais da loja ID %1, elas são inválidas portanto vão ser apagadas." +"Your payment was declined due to an error in the store setup. Please get in touch with the store support and try again later.","Seu pagamento recusado por um erro na configuração da loja. Entre em contato com o suporte da loja e tente novamente mais tarde." +"It was not possible to complete the payment due to a communication error. Please try again later.","Não foi possível completar o pagamento por uma falha de comunicação. Tente novamente mais tarde." +"Your payment was declined because some of your card details are incorrect. Please check the information to complete the purchase.","Seu pagamento foi recusado, pois algum dado do cartão está incorreto. Verifique as informações para finalizar a compra." +"Your payment was declined. We recommend that you use the device and payment method you usually use for online shopping.","Seu pagamento foi recusado. Recomendamos que você utilize o dispositivo e meio de pagamento que costuma usar para compras on-line." +"It was not possible to complete the payment. Please use another method to complete the purchase.","Não foi possível completar o pagamento. Use outro meio para finalizar sua compra." +"It was not possible to complete the payment due to a communication error. Please try again later or use another payment method.","Não foi possível completar o pagamento por uma falha de comunicação. Tente novamente mais tarde ou use outro meio de pagamento." +"Offline Payments Methods","Métodos de Pagamento Offline" +"Exclude Payment Methods","Excluir métodos de pagamento" +"Select the payment methods you do NOT want to accept.","Selecione os métodos de pagamento que você NÃO deseja aceitar." +"Payment Title","Título do Método de Pagamento" +"Accept all payment methods","Aceite todos os métodos de pagamento" +"There are no payment methods available, please contact the seller.", "Não há métodos de pagamento disponíveis, entre em contato com o vendedor." +"Generate the ticket and pay it wherever you want.", "Gere o boleto e pague-o onde quiser." +"Will be approved within 2 business days.","Será aprovado até 2 dias úteis." +"Ticket - MercadoPago","Ticket - MercadoPago" +"Expiration","Expiração" +"PAYMENT INFORMATION","INFORMAÇÃO DE PAGAMENTO" +"Payment Number (Mercado Pago): %1","Número de Pagamento (Mercado Pago): %1" +"FIRST PAYMENT METHOD", "PRIMEIRO MEIO DE PAGAMENTO" +"Card number:","Número do cartão:" +"Expiration date:","Data de vencimento:" +"Card holder:","Titular do cartão:" +"Payment method:","Meio de pagamento:" +"Installments:","Parcelas:" +"Identification in the invoice:","Identificação na Fatura:" +"Payment status:","Status do pagamento:" +"Detailed payment status:","Status detalhado do pagamento:" +"SECOND PAYMENT METHOD","SEGUNDO MEIO DE PAGAMENTO" +"Your order is %1!","Recebemos seu pedido %1!" +"Thank you for your purchase!","Agradecemos pela sua compra!" +"We are processing your payment","Estamos processando seu pagamento" +"Continue Shopping","Continuar comprando" +"Create an Account","Criar uma conta" +"First card details:","Dados do primeiro cartão:" +"Enter the amount to be paid with the first method *", "Insira o valor a pagar com o primeiro meio *" +"Value not allowed!","Valor não permitido!" +"Remaining value ","Valor restante " +"Credit card","Cartão de crédito" +"Second card details:","Dados do segundo cartão:" +"Payment processed by Mercado Pago","Pagamento procesado por Mercado Pago" +"This is a required field.","Este é um campo obrigatório." +"You can track your order status by creating an account.","Você pode acompanhar o status do seu pedido criando uma conta." +"cardNumber should be a number.","Número do cartão deve ser um número." +"cardNumber is empty.","Número do cartão está vazio." +"cardNumber should be of length between '8' and '19'.","Número do cartão deve ter tamanho entre '8' ou '19' dígitos." +"securityCode should be a number.","CVV - Código de segurança deve ser um número." +"securityCode should be of length '3' or '4'.","CVV - Código de segurança deve ter tamanho de '3' ou '4' dígitos." +"securityCode is empty.","CVV - Código de segurança está vazio." +"expirationMonth should be a number.","Mês de expiração deve ser um número." +"expirationMonth is empty.","Mês de expiração is empty." +"expirationYear should be of length '2' or '4'.","Ano de expiração deve ter tamanho de '2' or '4' dígitos." +"expirationYear should be a number.","Ano de expiração deve ser um número." +"expirationYear is empty.","Ano de expiração está vazio." +"expirationMonth should be a value from 1 to 12.","Mês de expiração deve ser um valor entre 1 e 12." +"expirationYear value should be greater or equal than %1.", "Ano de expiração é inválido" +"expirationMonth value should be greater than '%1' or expirationYear value should be greater than '%2'.", "Mês de expiração ou ano de expiração é inválido." +"cardNumber should be of length '16'.","Número do cartão deve ter tamanho de 16 dígitos." +"Pay with two cards","Pagar com dois cartões" +"Payment with two cards","Pagamento com dois cartões" +"Interest-free","Sem juros" +"Your Bank will apply Interest","Seu banco aplicará juros" +"Complete your order to proceed with payment.","Finalize seu pedido para seguir com o pagamento." +"approved","Aprovado" +"cancelled","Cancelado" +"authorized","Autorizado" +"accredited","Acreditado" +"rejected","Rejeitado" +"pending","Pendente" +"partially_refunded","Reembolso Parcial" +"cc_rejected_call_for_authorize","Pedido de autorização rejeitado" +"in_process","Em processo" +"by_admin","Pelo Admin" +"cc_rejected_high_risk","Alto risco" +"cc_rejected_insufficient_amount","Valor Insuficiente" +"cc_rejected_other_reason","Outro Motivo" +"cc_rejected_bad_filled_security_code","security_code preenchido incorretamente" +"cc_rejected_bad_filled_other","Preenchido incorretamente" +"cc_rejected_bad_filled_card_number","card_number preenchido incorretamente" +"cc_rejected_bad_filled_date","Data preenchida incorretamente" +"cc_rejected_card_disabled","Cartão Desativado" +"cc_rejected_max_attempts","Tentativas máximas" +"cc_rejected_invalid_installments","Parcela preenchida incorretamente" +"cc_rejected_duplicated_payment","Pagamento Duplicado" +"bank_rejected","Banco rejeitado" +"bank_error","Erro do Banco" +"rejected_by_bank","Rejeitado pelo Banco" +"refunded","Reembolsado" +"by_collector","Pelo Vendedor" +"expired","Expirado", +"by_payer","Pelo pagador" +"pending_review_manual","Pendente de revisão manual" +"pending_capture","Pendente de captura" +"reimbursed","Reembolsado" +"pending_waiting_payment","Aguardando pagamento pendente" +"pending_waiting_for_remedy","Pendente aguardando solução" +"unavailable","Indisponível" +"pending_waiting_transfer","Peendente aguardando transferencia" +"Credit or Debit Card","Cartão de Crédito ou Débito" +"Email Address","Endereço de email" +"We'll email you an order confirmation with details and tracking info.","Enviaremos um e-mail com a confirmação do pedido com detalhes e informações de rastreamento." +"Your order number is: %1.","Recebemos seu pedido: %1!" +"Your order # is: %1.","Recebemos seu pedido: %1!" +"By continuing, you agree to our ","Ao continuar você aceita nossos " +"Terms and Conditions.","Termos e Condições." +"Status (Mercado Pago)","Status (Mercado Pago)" +"Status Detail (Mercado Pago)","Detalhe status (Mercado Pago)" +"Google Ads - Id","Google Ads - Id" +"Google Ads - Label","Google Ads - Label" +"The card details are incorrect.","Os dados do cartão estão incorretos." +"The payment was rejected due to suspicion of fraud.","O pagamento foi recusado por suspeita de fraude." +"The payment method used requires prior authorization of the purchase amount.","O meio de pagamento utilizado requer autorização prévia do valor da compra." +"This card is blocked.","O cartão está bloqueado." +"You made a similar payment a short time ago. Please use another payment method.","Você fez um pagamento parecido há pouco tempo, utilize outro meio de pagamento." +"Something went wrong with the payment. Please use another card or choose a different payment method.","Algo deu errado com o pagamento. Pague com outro cartão ou escolha outro meio de pagamento." +"The number of installments chosen is invalid.","O número de parcelas escolhido é inválido." +"The maximum number of attempts was reached.","O número máximo de tentativas de pagamento foi atingido." +"Something went wrong. Please try again.","Algo deu errado, tente novamente." +"It was not possible to complete the payment. Please use another method to complete the purchase.","Não foi possível completar o pagamento. Use outro meio para finalizar sua compra." +"Your payment was declined because some of your card details are incorrect. Please check the information to complete the purchase or try another payment method.","Seu pagamento foi recusado, pois algum dado do cartão está incorreto. Verifique as informações para finalizar a compra ou tente com outro meio de pagamento." +"Your credentials are incorrect. Please double-check in your account your credentials are correct.","Suas credenciais estão incorretas. Por favor verifique novamente se preencheu as credenciais da sua loja corretamente." +"Your credentials are incorrect. Test credentials have been filled in and should be used in sandbox mode. Please check the credentials again.","Suas credenciais estão incorretas. Foram preenchidas credenciais de teste e devem ser usadas no modo sandbox. Por favor verifique as credenciais novamente." +"Your credentials are incorrect. Production credentials have been filled in and should be used in production mode. Please check the credentials again.","Suas credenciais estão incorretas. Foram preenchidas credenciais de produção e devem ser usadas no modo produção. Por favor verifique as credenciais novamente." +"Minimum transaction amount not allowed for the chosen brand. Please choose another flag or make a purchase over %1.", "Valor mínimo da transação não permitido para a bandeira escolhida. Por favor escolha outra bandeira ou faça uma compra acima de %1." +"Download the Boleto","Download do Boleto" +"pending_contingency", "Pendente de contingência" +"Pay with the method of payment you prefer and all the security of Mercado Pago.
If you already have an account at Mercado Livre, use the same email and password.
Use your Mercado Pago account balance or saved cards to buy without filling out more details.","Pague com o meio de pagamento que preferir e toda a segurança do Mercado Pago.
Se você já tem conta no Mercado Livre, use o mesmo e-mail e senha.
Use seu saldo do Mercado Pago ou cartões salvos para comprar sem preencher mais dados." +"Payments with immediate approval.
The payment term is up to %1.
At checkout, you will receive the code to make payment at the bank of your choice (check with your bank for your daily Pix transfer limit).","Pagamentos com aprovação imediata.
O prazo de pagamento é de até %1.
Ao finalizar a compra, você receberá o código para fazer o pagamento no banco que escolher (consulte seu banco para saber seu limite diário de transferência por Pix)." +"Please fill a valid color in the Checkout Pro configuration","Preencha uma cor válida na configuração do Checkout Pro" diff --git a/phpstan.neon b/phpstan.neon new file mode 100644 index 0000000..dd5d8bd --- /dev/null +++ b/phpstan.neon @@ -0,0 +1,8 @@ +parameters: + level: 1 + fileExtensions: + - php + - phtml + excludePaths: + - %currentWorkingDirectory%/vendor/* + \ No newline at end of file diff --git a/phpunit.xml b/phpunit.xml new file mode 100644 index 0000000..e0241ed --- /dev/null +++ b/phpunit.xml @@ -0,0 +1,19 @@ + + + + + + ./ + + + + + + Tests + + + + + + + diff --git a/registration.php b/registration.php new file mode 100644 index 0000000..1a85432 --- /dev/null +++ b/registration.php @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/view/adminhtml/layout/sales_order_creditmemo_new.xml b/view/adminhtml/layout/sales_order_creditmemo_new.xml new file mode 100644 index 0000000..d1e661c --- /dev/null +++ b/view/adminhtml/layout/sales_order_creditmemo_new.xml @@ -0,0 +1,17 @@ + + + + + + + + + diff --git a/view/adminhtml/layout/sales_order_creditmemo_updateqty.xml b/view/adminhtml/layout/sales_order_creditmemo_updateqty.xml new file mode 100644 index 0000000..d1e661c --- /dev/null +++ b/view/adminhtml/layout/sales_order_creditmemo_updateqty.xml @@ -0,0 +1,17 @@ + + + + + + + + + diff --git a/view/adminhtml/layout/sales_order_creditmemo_view.xml b/view/adminhtml/layout/sales_order_creditmemo_view.xml new file mode 100644 index 0000000..d1e661c --- /dev/null +++ b/view/adminhtml/layout/sales_order_creditmemo_view.xml @@ -0,0 +1,17 @@ + + + + + + + + + diff --git a/view/adminhtml/layout/sales_order_invoice_new.xml b/view/adminhtml/layout/sales_order_invoice_new.xml new file mode 100644 index 0000000..1690238 --- /dev/null +++ b/view/adminhtml/layout/sales_order_invoice_new.xml @@ -0,0 +1,17 @@ + + + + + + + + + diff --git a/view/adminhtml/layout/sales_order_invoice_updateqty.xml b/view/adminhtml/layout/sales_order_invoice_updateqty.xml new file mode 100644 index 0000000..1690238 --- /dev/null +++ b/view/adminhtml/layout/sales_order_invoice_updateqty.xml @@ -0,0 +1,17 @@ + + + + + + + + + diff --git a/view/adminhtml/layout/sales_order_invoice_view.xml b/view/adminhtml/layout/sales_order_invoice_view.xml new file mode 100644 index 0000000..1690238 --- /dev/null +++ b/view/adminhtml/layout/sales_order_invoice_view.xml @@ -0,0 +1,17 @@ + + + + + + + + + diff --git a/view/adminhtml/layout/sales_order_view.xml b/view/adminhtml/layout/sales_order_view.xml new file mode 100644 index 0000000..d5ff094 --- /dev/null +++ b/view/adminhtml/layout/sales_order_view.xml @@ -0,0 +1,17 @@ + + + + + + + + + diff --git a/view/adminhtml/templates/form/cc.phtml b/view/adminhtml/templates/form/cc.phtml new file mode 100644 index 0000000..120cc1f --- /dev/null +++ b/view/adminhtml/templates/form/cc.phtml @@ -0,0 +1,32 @@ +escapeHtml($block->getMethodCode()); +?> +
+ escapeHtml( + __('In order to comply with PCI regulations, the administrator cannot capture this payment method.') + ); ?> +
+renderStyleAsTag( + "display:none", + 'fieldset#payment_form_' . /* @noEscape */ $code +) ?> + +renderTag('script', [], $scriptString, false) ?> diff --git a/view/adminhtml/templates/form/checkout-pro.phtml b/view/adminhtml/templates/form/checkout-pro.phtml new file mode 100644 index 0000000..240fd1b --- /dev/null +++ b/view/adminhtml/templates/form/checkout-pro.phtml @@ -0,0 +1,32 @@ + +
+
+ +
+ escapeHtml($block->getExpiration())) ?> +
+
+
+ +
+ getInstruction()) ?> +
+
+
+ +renderStyleAsTag( + "display:none", + 'fieldset#payment_form_' . $block->escapeJs($block->getMethodCode()) +) ?> diff --git a/view/adminhtml/templates/form/payment-methods-off.phtml b/view/adminhtml/templates/form/payment-methods-off.phtml new file mode 100644 index 0000000..7c25cf8 --- /dev/null +++ b/view/adminhtml/templates/form/payment-methods-off.phtml @@ -0,0 +1,106 @@ +escapeHtml($block->getMethodCode()); +$publicToken = $block->escapeHtml($block->getMpPublicKey()); +?> +
+
+ +
+ +
+
+
+ +
+ +
+
+ +
+ +
+ escapeHtml($block->getExpiration())) ?> +
+
+
+ +
+ getInstruction()) ?> +
+
+
+ +renderStyleAsTag( + "display:none", + 'fieldset#payment_form_' . $block->escapeJs($block->getMethodCode()) +) ?> + { + const optValue = option[value]; + const optLabel = option[label]; + + const opt = document.createElement('option'); + opt.value = optValue; + opt.textContent = optLabel; + + tempOptions.appendChild(opt); + }); + + elem.appendChild(tempOptions); + }; + getIdentificationTypes(); + }); +script; +?> +renderTag('script', [], $scriptString, false) ?> diff --git a/view/adminhtml/templates/form/pix.phtml b/view/adminhtml/templates/form/pix.phtml new file mode 100644 index 0000000..b5d6b06 --- /dev/null +++ b/view/adminhtml/templates/form/pix.phtml @@ -0,0 +1,106 @@ +escapeHtml($block->getMethodCode()); +$publicToken = $block->escapeHtml($block->getMpPublicKey()); +?> + +
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ getInstruction()) ?> +
+
+
+ + +renderStyleAsTag( + "display:none", + 'fieldset#payment_form_' . $block->escapeJs($block->getMethodCode()) +) ?> + { + const optValue = option[value]; + const optLabel = option[label]; + + const opt = document.createElement('option'); + opt.value = optValue; + opt.textContent = optLabel; + + tempOptions.appendChild(opt); + }); + + elem.appendChild(tempOptions); + }; + getIdentificationTypes(); + }); +script; +?> +renderTag('script', [], $scriptString, false) ?> diff --git a/view/adminhtml/templates/form/pse.phtml b/view/adminhtml/templates/form/pse.phtml new file mode 100644 index 0000000..5eefd7a --- /dev/null +++ b/view/adminhtml/templates/form/pse.phtml @@ -0,0 +1,138 @@ +escapeHtml($block->getMethodCode()); +$paymentMethodId = $block->escapeHtml($block->getPaymentMethodId()); +$publicToken = $block->escapeHtml($block->getMpPublicKey()); +?> + +
+ +
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ getInstruction()) ?> +
+
+
+ + +renderStyleAsTag( + "display:none", + 'fieldset#payment_form_' . $block->escapeJs($block->getMethodCode()) +) ?> + { + const optValue = option[value]; + const optLabel = option[label]; + + const opt = document.createElement('option'); + opt.value = optValue; + opt.textContent = optLabel; + + tempOptions.appendChild(opt); + }); + + elem.appendChild(tempOptions); + }; + getIdentificationTypes(); + }); +script; +?> +renderTag('script', [], $scriptString, false) ?> diff --git a/view/adminhtml/templates/form/webpay.phtml b/view/adminhtml/templates/form/webpay.phtml new file mode 100644 index 0000000..54fae8e --- /dev/null +++ b/view/adminhtml/templates/form/webpay.phtml @@ -0,0 +1,123 @@ +escapeHtml($block->getMethodCode()); +$paymentMethodId = $block->escapeHtml($block->getPaymentMethodId()); +$publicToken = $block->escapeHtml($block->getMpPublicKey()); +?> + +
+ +
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ getInstruction()) ?> +
+
+
+ + +renderStyleAsTag( + "display:none", + 'fieldset#payment_form_' . $block->escapeJs($block->getMethodCode()) +) ?> + { + const optValue = option[value]; + const optLabel = option[label]; + + const opt = document.createElement('option'); + opt.value = optValue; + opt.textContent = optLabel; + + tempOptions.appendChild(opt); + }); + + elem.appendChild(tempOptions); + }; + getIdentificationTypes(); + }); +script; +?> +renderTag('script', [], $scriptString, false) ?> diff --git a/view/adminhtml/templates/info/cc/instructions.phtml b/view/adminhtml/templates/info/cc/instructions.phtml new file mode 100644 index 0000000..3c18009 --- /dev/null +++ b/view/adminhtml/templates/info/cc/instructions.phtml @@ -0,0 +1,101 @@ +escapeHtml(__($block->getMethod()->getTitle())); +$specificInfo = $block->getSpecificInformation(); +$mpPaymentId = isset($specificInfo['mp_payment_id']) ? $specificInfo['mp_payment_id'] : null; +?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
escapeHtml(__('mp_payment_id')); ?>escapeHtml($mpPaymentId); ?>
escapeHtml(__('mp_payment_id')); ?>:escapeHtml($specificInfo['card_payment_id']) ?>
escapeHtml(__('card_installments')); ?>:escapeHtml($specificInfo['card_installments']) ?>
escapeHtml(__('card_finance_cost')); ?>:getFormatedPrice($specificInfo['card_finance_cost']) ?>
escapeHtml(__('card_type')); ?>:escapeHtml($specificInfo['card_type']) ?>
escapeHtml(__('card_number')); ?>:escapeHtml($specificInfo['card_number']) ?>
escapeHtml(__('card_holder_name')); ?>:escapeHtml($specificInfo['card_holder_name']) ?>
escapeHtml(__('card_exp_month')); ?>:escapeHtml($specificInfo['card_exp_month']) ?>
escapeHtml(__('card_exp_year')); ?>:escapeHtml($specificInfo['card_exp_year']) ?>
escapeHtml(__('payer_document_type')); ?>:escapeHtml($specificInfo['payer_document_type']) ?>
escapeHtml(__('payer_document_identification')); ?>:escapeHtml($specificInfo['payer_document_identification']) ?>
escapeHtml(__('mp_status')); ?>:escapeHtml(__($specificInfo['mp_status'])) ?>
escapeHtml(__('mp_status_detail')); ?>:escapeHtml(__($specificInfo['mp_status_detail'])) ?>
+ diff --git a/view/adminhtml/templates/info/checkout-pro/instructions.phtml b/view/adminhtml/templates/info/checkout-pro/instructions.phtml new file mode 100644 index 0000000..03cf73b --- /dev/null +++ b/view/adminhtml/templates/info/checkout-pro/instructions.phtml @@ -0,0 +1,93 @@ +escapeHtml($block->getMethod()->getTitle()); +$specificInfo = $block->getSpecificInformation(); +?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ escapeHtml(__('Link')); ?> + + + escapeHtml(__('Details for payment')); ?> + +
+ +

escapeHtml(__('FIRST PAYMENT METHOD')) ?>

+ +

escapeHtml(__('SECOND PAYMENT METHOD')) ?>

+ +
escapeHtml(__('mp_payment_id')); ?>:escapeHtml($specificInfo['payment_' . $i . '_id']) ?>
escapeHtml(__('Installments (Mercado Pago)')); ?>:escapeHtml($specificInfo['payment_' . $i . '_installments']) ?>
escapeHtml(__('Expiration')); ?>: + formatDate( + $specificInfo['payment_' . $i . '_expiration'], + \IntlDateFormatter::MEDIUM, + false + ) ?> +
escapeHtml(__('Payment Type (Mercado Pago)')); ?>:escapeHtml($specificInfo['payment_' . $i . '_type']) ?>
escapeHtml(__('Status (Mercado Pago)')); ?>:escapeHtml(__($specificInfo['mp_' . $i . '_status'])) ?>
escapeHtml(__('Status Detail (Mercado Pago)')); ?>:escapeHtml(__($specificInfo['mp_' . $i . '_status_detail'])) ?>
+ diff --git a/view/adminhtml/templates/info/payment-methods-off/instructions.phtml b/view/adminhtml/templates/info/payment-methods-off/instructions.phtml new file mode 100644 index 0000000..1d33f38 --- /dev/null +++ b/view/adminhtml/templates/info/payment-methods-off/instructions.phtml @@ -0,0 +1,112 @@ +escapeHtml(__($block->getMethod()->getTitle())); +$specificInfo = $block->getSpecificInformation(); +$mpPaymentId = isset($specificInfo['mp_payment_id']) ? $specificInfo['mp_payment_id']: null; +$expirationDate = isset($specificInfo['date_of_expiration']) ? $specificInfo['date_of_expiration'] : null; +$lineCode = isset($specificInfo['line_code']) ? $specificInfo['line_code']: null; +$barcode = isset($specificInfo['barcode']) ? $specificInfo['barcode'] : null; +$externalLink = isset($specificInfo['external_resource_url']) ? $specificInfo['external_resource_url'] : null; +$payerDocumentIdentification = + isset($specificInfo['payer_document_identification']) ? + $specificInfo['payer_document_identification'] : null; +$payerDocumentType = + isset($specificInfo['payer_document_type']) ? + $specificInfo['payer_document_type'] : null; +$ticketUrl = isset($specificInfo['ticket_url']) ? $specificInfo['ticket_url'] : null; +$status = isset($specificInfo['mp_status']) ? $specificInfo['mp_status'] : null; +$statusDetail = isset($specificInfo['mp_status_detail']) ? $specificInfo['mp_status_detail'] : null; +?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
escapeHtml(__('mp_payment_id')); ?>escapeHtml($mpPaymentId); ?>
escapeHtml(__('Expiration')); ?> + formatDate( + $expirationDate, + \IntlDateFormatter::MEDIUM, + false + ) ?> +
+ escapeHtml(__('Link')); ?> + + + escapeHtml(__('Download the Boleto')); ?> + +
+ escapeHtml(__('Line Code')); ?> + + escapeHtml($lineCode) ?> +
+ escapeHtml(__('Payer Document Type')); ?> + + escapeHtml($payerDocumentType) ?> +
+ escapeHtml(__('Document number')); ?> + + escapeHtml($payerDocumentIdentification) ?> +
+ escapeHtml(__('Status (Mercado Pago)')); ?> + + escapeHtml(__($status)) ?> +
+ escapeHtml(__('Status Detail (Mercado Pago)')); ?> + + escapeHtml(__($statusDetail)) ?> +
+ diff --git a/view/adminhtml/templates/info/pix/instructions.phtml b/view/adminhtml/templates/info/pix/instructions.phtml new file mode 100644 index 0000000..c6a8872 --- /dev/null +++ b/view/adminhtml/templates/info/pix/instructions.phtml @@ -0,0 +1,117 @@ +escapeHtml(__($block->getMethod()->getTitle())); +$specificInfo = $block->getSpecificInformation(); +$mpPaymentId = isset($specificInfo['mp_payment_id']) ? $specificInfo['mp_payment_id']: null; +$expirationDate = isset($specificInfo['date_of_expiration']) ? $specificInfo['date_of_expiration'] : null; +$qrCode = isset($specificInfo['qr_code']) ? $specificInfo['qr_code']: null; +$qrCodeImage = isset($specificInfo['qr_code_base64']) ? $specificInfo['qr_code_base64'] : null; +$payerDocumentIdentification = + isset($specificInfo['payer_document_identification']) ? + $specificInfo['payer_document_identification'] : null; +$payerDocumentType = + isset($specificInfo['payer_document_type']) ? + $specificInfo['payer_document_type'] : null; +$ticketUrl = isset($specificInfo['ticket_url']) ? $specificInfo['ticket_url'] : null; +$status = isset($specificInfo['mp_status']) ? $specificInfo['mp_status'] : null; +$statusDetail = isset($specificInfo['mp_status_detail']) ? $specificInfo['mp_status_detail'] : null; +?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
escapeHtml(__('mp_payment_id')); ?>escapeHtml($mpPaymentId); ?>
escapeHtml(__('Expiration')); ?> + formatDate( + $expirationDate, + \IntlDateFormatter::MEDIUM, + true + ) ?> +
+ escapeHtml(__('Pix QR Code')); ?> + + <?= /* @noEscape */ $title ?> +
+ escapeHtml(__('Pix Code')); ?> + + +
+ escapeHtml(__('Payer Document Type')); ?> + + escapeHtml($payerDocumentType) ?> +
+ escapeHtml(__('Document number')); ?> + + escapeHtml($payerDocumentIdentification) ?> +
+ escapeHtml(__('Status (Mercado Pago)')); ?> + + escapeHtml(__($status)) ?> +
+ escapeHtml(__('Status Detail (Mercado Pago)')); ?> + + escapeHtml(__($statusDetail)) ?> +
+ diff --git a/view/adminhtml/templates/info/pse/instructions.phtml b/view/adminhtml/templates/info/pse/instructions.phtml new file mode 100644 index 0000000..7b6c5f7 --- /dev/null +++ b/view/adminhtml/templates/info/pse/instructions.phtml @@ -0,0 +1,119 @@ +escapeHtml(__($block->getMethod()->getTitle())); +$specificInfo = $block->getSpecificInformation(); +$mpPaymentId = isset($specificInfo['mp_payment_id']) ? $specificInfo['mp_payment_id']: null; +$expirationDate = isset($specificInfo['date_of_expiration']) ? $specificInfo['date_of_expiration'] : null; +$lineCode = isset($specificInfo['line_code']) ? $specificInfo['line_code']: null; +$barcode = isset($specificInfo['barcode']) ? $specificInfo['barcode'] : null; +$externalLink = isset($specificInfo['external_resource_url']) ? $specificInfo['external_resource_url'] : null; +$payerDocumentIdentification = + isset($specificInfo['payer_document_identification']) ? + $specificInfo['payer_document_identification'] : null; +$payerDocumentType = + isset($specificInfo['payer_document_type']) ? + $specificInfo['payer_document_type'] : null; +$ticketUrl = isset($specificInfo['ticket_url']) ? $specificInfo['ticket_url'] : null; +$status = isset($specificInfo['mp_status']) ? $specificInfo['mp_status'] : null; +$statusDetail = isset($specificInfo['mp_status_detail']) ? $specificInfo['mp_status_detail'] : null; +?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
escapeHtml(__('mp_payment_id')); ?>escapeHtml($mpPaymentId); ?>
escapeHtml(__('Expiration')); ?> + formatDate( + $expirationDate, + \IntlDateFormatter::MEDIUM, + false + ) ?> +
+ escapeHtml(__('Link')); ?> + + + escapeHtml(__('Details for payment')); ?> + +
+ escapeHtml(__('Line Code')); ?> + + +
+ escapeHtml(__('Payer Document Type')); ?> + + escapeHtml($payerDocumentType) ?> +
+ escapeHtml(__('Document number')); ?> + + escapeHtml($payerDocumentIdentification) ?> +
+ escapeHtml(__('Status (Mercado Pago)')); ?> + + escapeHtml(__($status)) ?> +
+ escapeHtml(__('Status Detail (Mercado Pago)')); ?> + + escapeHtml(__($statusDetail)) ?> +
+ diff --git a/view/adminhtml/templates/info/twocc/instructions.phtml b/view/adminhtml/templates/info/twocc/instructions.phtml new file mode 100644 index 0000000..64ba32a --- /dev/null +++ b/view/adminhtml/templates/info/twocc/instructions.phtml @@ -0,0 +1,112 @@ +escapeHtml(__($block->getMethod()->getTitle())); +$specificInfo = $block->getSpecificInformation(); +$mpPaymentId = isset($specificInfo['mp_payment_id']) ? $specificInfo['mp_payment_id'] : null; +?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
escapeHtml(__('mp_payment_id')); ?>escapeHtml($mpPaymentId); ?>
+ +

escapeHtml(__('FIRST PAYMENT METHOD')) ?>

+ +

escapeHtml(__('SECOND PAYMENT METHOD')) ?>

+ +
escapeHtml(__('mp_payment_id')); ?>:escapeHtml($specificInfo['payment_' . $i . '_id']) ?>
escapeHtml(__('card_installments')); ?>:escapeHtml($specificInfo['card_' . $i . '_installments']) ?>
escapeHtml(__('card_finance_cost')); ?>:getFormatedPrice($specificInfo['card_' . $i . '_finance_cost']) ?>
escapeHtml(__('card_type')); ?>:escapeHtml($specificInfo['card_' . $i . '_type']) ?>
escapeHtml(__('card_number')); ?>:escapeHtml($specificInfo['card_' . $i . '_number']) ?>
escapeHtml(__('card_holder_name')); ?>:escapeHtml($specificInfo['card_' . $i . '_holder_name']) ?>
escapeHtml(__('card_exp_month')); ?>:escapeHtml($specificInfo['card_' . $i . '_exp_month']) ?>
escapeHtml(__('card_exp_year')); ?>:escapeHtml($specificInfo['card_' . $i . '_exp_year']) ?>
escapeHtml(__('payer_document_type')); ?>:escapeHtml($specificInfo['payer_' . $i . '_document_type']) ?>
escapeHtml(__('payer_document_identification')); ?>:escapeHtml($specificInfo['payer_' . $i . '_document_identification']) ?>
escapeHtml(__('mp_status')); ?>:escapeHtml(__($specificInfo['mp_' . $i . '_status'])) ?>
escapeHtml(__('mp_status_detail')); ?>:escapeHtml(__($specificInfo['mp_' . $i . '_status_detail'])) ?>
+ diff --git a/view/adminhtml/templates/info/webpay/instructions.phtml b/view/adminhtml/templates/info/webpay/instructions.phtml new file mode 100644 index 0000000..72a86f5 --- /dev/null +++ b/view/adminhtml/templates/info/webpay/instructions.phtml @@ -0,0 +1,119 @@ +escapeHtml(__($block->getMethod()->getTitle())); +$specificInfo = $block->getSpecificInformation(); +$mpPaymentId = isset($specificInfo['mp_payment_id']) ? $specificInfo['mp_payment_id']: null; +$expirationDate = isset($specificInfo['date_of_expiration']) ? $specificInfo['date_of_expiration'] : null; +$lineCode = isset($specificInfo['line_code']) ? $specificInfo['line_code']: null; +$barcode = isset($specificInfo['barcode']) ? $specificInfo['barcode'] : null; +$externalLink = isset($specificInfo['external_resource_url']) ? $specificInfo['external_resource_url'] : null; +$payerDocumentIdentification = + isset($specificInfo['payer_document_identification']) ? + $specificInfo['payer_document_identification'] : null; +$payerDocumentType = + isset($specificInfo['payer_document_type']) ? + $specificInfo['payer_document_type'] : null; +$ticketUrl = isset($specificInfo['ticket_url']) ? $specificInfo['ticket_url'] : null; +$status = isset($specificInfo['mp_status']) ? $specificInfo['mp_status'] : null; +$statusDetail = isset($specificInfo['mp_status_detail']) ? $specificInfo['mp_status_detail'] : null; +?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
escapeHtml(__('mp_payment_id')); ?>escapeHtml($mpPaymentId); ?>
escapeHtml(__('Expiration')); ?> + formatDate( + $expirationDate, + \IntlDateFormatter::MEDIUM, + false + ) ?> +
+ escapeHtml(__('Link')); ?> + + + escapeHtml(__('Details for payment')); ?> + +
+ escapeHtml(__('Line Code')); ?> + + +
+ escapeHtml(__('Payer Document Type')); ?> + + escapeHtml($payerDocumentType) ?> +
+ escapeHtml(__('Document number')); ?> + + escapeHtml($payerDocumentIdentification) ?> +
+ escapeHtml(__('Status (Mercado Pago)')); ?> + + escapeHtml(__($status)) ?> +
+ escapeHtml(__('Status Detail (Mercado Pago)')); ?> + + escapeHtml(__($statusDetail))?> +
+ diff --git a/view/adminhtml/templates/messages/homolog_message.phtml b/view/adminhtml/templates/messages/homolog_message.phtml new file mode 100644 index 0000000..fb6dacb --- /dev/null +++ b/view/adminhtml/templates/messages/homolog_message.phtml @@ -0,0 +1,21 @@ + +escapeHtml( + __( + // phpcs:ignore Generic.Files.LineLength + 'Your access credential for store %1 is valid but you don\'t have production use permission. Request approval before use by click here.', + $block->getData('store'), + $block->getData('url') + ), + ['a'] +); ?> diff --git a/view/adminhtml/templates/system/config/form/field/button.phtml b/view/adminhtml/templates/system/config/form/field/button.phtml new file mode 100644 index 0000000..7538922 --- /dev/null +++ b/view/adminhtml/templates/system/config/form/field/button.phtml @@ -0,0 +1,14 @@ + + +getButtonHtml(); ?> diff --git a/view/adminhtml/web/css/system_config.css b/view/adminhtml/web/css/system_config.css new file mode 100644 index 0000000..3cdd79f --- /dev/null +++ b/view/adminhtml/web/css/system_config.css @@ -0,0 +1,44 @@ +/** + * Copyright © MercadoPago. All rights reserved. + * + * @author Mercado Pago + * @license See LICENSE for license details. + */ +.complex.mercadopago-payment-section .heading strong { + display: flex; + flex-direction: row; + align-items: center; + font-weight: normal; +} + +.complex.mercadopago-payment-section .mercadopago-payment-logo { + flex-basis: 15%; + height: 70px; + background: url('../images/core/logo.svg') no-repeat center center; + -webkit-background-size: contain; + -moz-background-size: contain; + -o-background-size: contain; + background-size: contain; +} + +.complex.mercadopago-payment-section .mercadopago-payment-byline { + flex-basis: 85%; + padding-left: 2%; +} + +.complex.mercadopago-payment-section .button-container { float: right; } + +fieldset#payment_other_mercadopago_base, +fieldset#payment_us_mercadopago_base { + margin-left: 2%; +} + +.mercadopago-featured-session { + background-color:#f8f8f8; + border:1px solid #e3e3e3; + padding:10px; +} + +.mercadopago-sub-title { + padding-top: 15px; +} diff --git a/view/base/requirejs-config.js b/view/base/requirejs-config.js new file mode 100644 index 0000000..8637a65 --- /dev/null +++ b/view/base/requirejs-config.js @@ -0,0 +1,9 @@ +var config = { + map: { + '*': { + 'clipboard':'MercadoPago_AdbPayment/js/view/payment/lib/clipboardjs/clipboard', + 'widgetClipboard':'MercadoPago_AdbPayment/js/view/payment/lib/clipboardjs/widgetClipboard', + 'MercadoPagoSDKJs': 'https://sdk.mercadopago.com/js/v2?source=Magento' + } + } +}; diff --git a/view/base/web/images/abitab/logo.svg b/view/base/web/images/abitab/logo.svg new file mode 100644 index 0000000..dbf15c7 --- /dev/null +++ b/view/base/web/images/abitab/logo.svg @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/view/base/web/images/banamex/logo.svg b/view/base/web/images/banamex/logo.svg new file mode 100644 index 0000000..880f2f8 --- /dev/null +++ b/view/base/web/images/banamex/logo.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/view/base/web/images/bancomer/logo.svg b/view/base/web/images/bancomer/logo.svg new file mode 100644 index 0000000..1edd859 --- /dev/null +++ b/view/base/web/images/bancomer/logo.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/view/base/web/images/boleto/logo.svg b/view/base/web/images/boleto/logo.svg new file mode 100644 index 0000000..64234f5 --- /dev/null +++ b/view/base/web/images/boleto/logo.svg @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/view/base/web/images/cc/agencard.svg b/view/base/web/images/cc/agencard.svg new file mode 100644 index 0000000..7214c5a --- /dev/null +++ b/view/base/web/images/cc/agencard.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/view/base/web/images/cc/amex.svg b/view/base/web/images/cc/amex.svg new file mode 100644 index 0000000..a85ac6a --- /dev/null +++ b/view/base/web/images/cc/amex.svg @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/view/base/web/images/cc/cabal.svg b/view/base/web/images/cc/cabal.svg new file mode 100644 index 0000000..586854f --- /dev/null +++ b/view/base/web/images/cc/cabal.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/view/base/web/images/cc/carnet.svg b/view/base/web/images/cc/carnet.svg new file mode 100644 index 0000000..dd86ee0 --- /dev/null +++ b/view/base/web/images/cc/carnet.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/view/base/web/images/cc/cencosud.svg b/view/base/web/images/cc/cencosud.svg new file mode 100644 index 0000000..88abe30 --- /dev/null +++ b/view/base/web/images/cc/cencosud.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/view/base/web/images/cc/cmr.svg b/view/base/web/images/cc/cmr.svg new file mode 100644 index 0000000..23539da --- /dev/null +++ b/view/base/web/images/cc/cmr.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/view/base/web/images/cc/codensa.svg b/view/base/web/images/cc/codensa.svg new file mode 100644 index 0000000..f73b449 --- /dev/null +++ b/view/base/web/images/cc/codensa.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/view/base/web/images/cc/creditel.svg b/view/base/web/images/cc/creditel.svg new file mode 100644 index 0000000..3011fe4 --- /dev/null +++ b/view/base/web/images/cc/creditel.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/view/base/web/images/cc/debcabal.svg b/view/base/web/images/cc/debcabal.svg new file mode 100644 index 0000000..be50f1f --- /dev/null +++ b/view/base/web/images/cc/debcabal.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/view/base/web/images/cc/debelo.svg b/view/base/web/images/cc/debelo.svg new file mode 100644 index 0000000..472d345 --- /dev/null +++ b/view/base/web/images/cc/debelo.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/view/base/web/images/cc/debmaestro.svg b/view/base/web/images/cc/debmaestro.svg new file mode 100644 index 0000000..4ccea7d --- /dev/null +++ b/view/base/web/images/cc/debmaestro.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/view/base/web/images/cc/debvisa.svg b/view/base/web/images/cc/debvisa.svg new file mode 100644 index 0000000..a0d5a6e --- /dev/null +++ b/view/base/web/images/cc/debvisa.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/view/base/web/images/cc/diners.svg b/view/base/web/images/cc/diners.svg new file mode 100644 index 0000000..0bd760d --- /dev/null +++ b/view/base/web/images/cc/diners.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/view/base/web/images/cc/edenred.svg b/view/base/web/images/cc/edenred.svg new file mode 100644 index 0000000..b596598 --- /dev/null +++ b/view/base/web/images/cc/edenred.svg @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/view/base/web/images/cc/elo.svg b/view/base/web/images/cc/elo.svg new file mode 100644 index 0000000..472d345 --- /dev/null +++ b/view/base/web/images/cc/elo.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/view/base/web/images/cc/hipercard.svg b/view/base/web/images/cc/hipercard.svg new file mode 100644 index 0000000..4a913e5 --- /dev/null +++ b/view/base/web/images/cc/hipercard.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/view/base/web/images/cc/lider.svg b/view/base/web/images/cc/lider.svg new file mode 100644 index 0000000..6ca60b1 --- /dev/null +++ b/view/base/web/images/cc/lider.svg @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/view/base/web/images/cc/logo.svg b/view/base/web/images/cc/logo.svg new file mode 100644 index 0000000..f73b449 --- /dev/null +++ b/view/base/web/images/cc/logo.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/view/base/web/images/cc/maestro.svg b/view/base/web/images/cc/maestro.svg new file mode 100644 index 0000000..4ccea7d --- /dev/null +++ b/view/base/web/images/cc/maestro.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/view/base/web/images/cc/magna.svg b/view/base/web/images/cc/magna.svg new file mode 100644 index 0000000..f73b449 --- /dev/null +++ b/view/base/web/images/cc/magna.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/view/base/web/images/cc/master.svg b/view/base/web/images/cc/master.svg new file mode 100644 index 0000000..d96949f --- /dev/null +++ b/view/base/web/images/cc/master.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/view/base/web/images/cc/mercadopagocard.svg b/view/base/web/images/cc/mercadopagocard.svg new file mode 100644 index 0000000..f73b449 --- /dev/null +++ b/view/base/web/images/cc/mercadopagocard.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/view/base/web/images/cc/naranja.svg b/view/base/web/images/cc/naranja.svg new file mode 100644 index 0000000..2268500 --- /dev/null +++ b/view/base/web/images/cc/naranja.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/view/base/web/images/cc/oca.svg b/view/base/web/images/cc/oca.svg new file mode 100644 index 0000000..ed0285d --- /dev/null +++ b/view/base/web/images/cc/oca.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/view/base/web/images/cc/presto.svg b/view/base/web/images/cc/presto.svg new file mode 100644 index 0000000..fa8ec68 --- /dev/null +++ b/view/base/web/images/cc/presto.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/view/base/web/images/cc/redcompra.svg b/view/base/web/images/cc/redcompra.svg new file mode 100644 index 0000000..a484398 --- /dev/null +++ b/view/base/web/images/cc/redcompra.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/view/base/web/images/cc/sodexo.svg b/view/base/web/images/cc/sodexo.svg new file mode 100644 index 0000000..d5f81cf --- /dev/null +++ b/view/base/web/images/cc/sodexo.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/view/base/web/images/cc/tarjeta.svg b/view/base/web/images/cc/tarjeta.svg new file mode 100644 index 0000000..94b5c36 --- /dev/null +++ b/view/base/web/images/cc/tarjeta.svg @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/view/base/web/images/cc/tarshop.svg b/view/base/web/images/cc/tarshop.svg new file mode 100644 index 0000000..94b5c36 --- /dev/null +++ b/view/base/web/images/cc/tarshop.svg @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/view/base/web/images/cc/tengo.svg b/view/base/web/images/cc/tengo.svg new file mode 100644 index 0000000..8ab7376 --- /dev/null +++ b/view/base/web/images/cc/tengo.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/view/base/web/images/cc/toka.svg b/view/base/web/images/cc/toka.svg new file mode 100644 index 0000000..f7e5718 --- /dev/null +++ b/view/base/web/images/cc/toka.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/view/base/web/images/cc/visa.svg b/view/base/web/images/cc/visa.svg new file mode 100644 index 0000000..ac83694 --- /dev/null +++ b/view/base/web/images/cc/visa.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/view/base/web/images/cc/webpay.svg b/view/base/web/images/cc/webpay.svg new file mode 100644 index 0000000..4538f58 --- /dev/null +++ b/view/base/web/images/cc/webpay.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/view/base/web/images/checkout-pro/logo.svg b/view/base/web/images/checkout-pro/logo.svg new file mode 100644 index 0000000..c0bd594 --- /dev/null +++ b/view/base/web/images/checkout-pro/logo.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/view/base/web/images/core/logo.svg b/view/base/web/images/core/logo.svg new file mode 100644 index 0000000..8b48700 --- /dev/null +++ b/view/base/web/images/core/logo.svg @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/view/base/web/images/efecty/logo.svg b/view/base/web/images/efecty/logo.svg new file mode 100644 index 0000000..d17dc79 --- /dev/null +++ b/view/base/web/images/efecty/logo.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/view/base/web/images/oxxo/logo.svg b/view/base/web/images/oxxo/logo.svg new file mode 100644 index 0000000..5163ef0 --- /dev/null +++ b/view/base/web/images/oxxo/logo.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/view/base/web/images/pago-efectivo/logo.svg b/view/base/web/images/pago-efectivo/logo.svg new file mode 100644 index 0000000..83bbc9f --- /dev/null +++ b/view/base/web/images/pago-efectivo/logo.svg @@ -0,0 +1,4 @@ + + + + diff --git a/view/base/web/images/pago-facil/logo.svg b/view/base/web/images/pago-facil/logo.svg new file mode 100644 index 0000000..0617aec --- /dev/null +++ b/view/base/web/images/pago-facil/logo.svg @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/view/base/web/images/pay-cash/logo.svg b/view/base/web/images/pay-cash/logo.svg new file mode 100644 index 0000000..6b7f324 --- /dev/null +++ b/view/base/web/images/pay-cash/logo.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/view/base/web/images/pec/logo.svg b/view/base/web/images/pec/logo.svg new file mode 100644 index 0000000..4cb907c --- /dev/null +++ b/view/base/web/images/pec/logo.svg @@ -0,0 +1,4 @@ + + + + diff --git a/view/base/web/images/pix/logo.svg b/view/base/web/images/pix/logo.svg new file mode 100644 index 0000000..1b91a87 --- /dev/null +++ b/view/base/web/images/pix/logo.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/view/base/web/images/pse/logo.svg b/view/base/web/images/pse/logo.svg new file mode 100644 index 0000000..d0b3e1e --- /dev/null +++ b/view/base/web/images/pse/logo.svg @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/view/base/web/images/rapi-pago/logo.svg b/view/base/web/images/rapi-pago/logo.svg new file mode 100644 index 0000000..43d5ac4 --- /dev/null +++ b/view/base/web/images/rapi-pago/logo.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/view/base/web/images/redpagos/logo.svg b/view/base/web/images/redpagos/logo.svg new file mode 100644 index 0000000..5b3e9a6 --- /dev/null +++ b/view/base/web/images/redpagos/logo.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/view/base/web/images/serfin/logo.svg b/view/base/web/images/serfin/logo.svg new file mode 100644 index 0000000..f5c0e7d --- /dev/null +++ b/view/base/web/images/serfin/logo.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/view/base/web/images/twocc/card.svg b/view/base/web/images/twocc/card.svg new file mode 100644 index 0000000..8698ecc --- /dev/null +++ b/view/base/web/images/twocc/card.svg @@ -0,0 +1,4 @@ + + + + diff --git a/view/base/web/images/twocc/edit.svg b/view/base/web/images/twocc/edit.svg new file mode 100644 index 0000000..b3a6535 --- /dev/null +++ b/view/base/web/images/twocc/edit.svg @@ -0,0 +1,3 @@ + + + diff --git a/view/base/web/images/twocc/footer-logo.svg b/view/base/web/images/twocc/footer-logo.svg new file mode 100644 index 0000000..c2ff812 --- /dev/null +++ b/view/base/web/images/twocc/footer-logo.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/view/base/web/images/twocc/logo.svg b/view/base/web/images/twocc/logo.svg new file mode 100644 index 0000000..7314c45 --- /dev/null +++ b/view/base/web/images/twocc/logo.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/view/base/web/images/webpay/logo.svg b/view/base/web/images/webpay/logo.svg new file mode 100644 index 0000000..4538f58 --- /dev/null +++ b/view/base/web/images/webpay/logo.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/view/base/web/js/validation/custom-validation-mixin.js b/view/base/web/js/validation/custom-validation-mixin.js new file mode 100644 index 0000000..43dfeb7 --- /dev/null +++ b/view/base/web/js/validation/custom-validation-mixin.js @@ -0,0 +1,194 @@ +/** + * Copyright © MercadoPago. All rights reserved. + * + * @author Mercado Pago + * @license See LICENSE for license details. + */ + + define(['jquery'], function ($) { + 'use strict'; + + return function () { + + /** + * Invalidate Common CNPJ + * @param {String} value + * @return {boolean} + */ + function getInvalidateCommonCNPJ(value) { + if ( + value === '00000000000000' || + value === '11111111111111' || + value === '22222222222222' || + value === '33333333333333' || + value === '44444444444444' || + value === '55555555555555' || + value === '66666666666666' || + value === '77777777777777' || + value === '88888888888888' || + value === '99999999999999' + ) { + return true; + } + return false; + } + + /** + * Invalidate Common CPF + * @param {String} value + * @return {boolean} + */ + function getInvalidateCommonCPF(value) { + if ( + value === '00000000000' || + value === '11111111111' || + value === '22222222222' || + value === '33333333333' || + value === '44444444444' || + value === '55555555555' || + value === '66666666666' || + value === '77777777777' || + value === '88888888888' || + value === '99999999999' + ) { + return true; + } + return false; + } + + /** + * Validate CPF + * + * @param {String} cpf - CPF number + * @return {Boolean} + */ + function validateCPF(cpf) { + + if (cpf.length !== 11) { + return false; + } + + if (getInvalidateCommonCPF(cpf)) { + return false; + } + + let add = 0, + i, + j, + rev; + + for (i = 0; i < 9; i++) { + add += parseInt(cpf.charAt(i), 10) * (10 - i); + } + + rev = 11 - add % 11; + if (rev === 10 || rev === 11) { + rev = 0; + } + if (rev !== parseInt(cpf.charAt(9), 10)) { + return false; + } + + add = 0; + for (j = 0; j < 10; j++) { + add += parseInt(cpf.charAt(j), 10) * (11 - j); + } + + rev = 11 - add % 11; + + if (rev === 10 || rev === 11) { + rev = 0; + } + + if (rev !== parseInt(cpf.charAt(10), 10)) { + return false; + } + + return true; + } + + /** + * Validate CNPJ + * + * @param {String} cnpj - CNPJ number + * @return {Boolean} + */ + function validateCNPJ(cnpj) { + var tamanho = cnpj.length - 2, + numeros = cnpj.substring(0, tamanho), + digitos = cnpj.substring(tamanho), + soma = 0, + pos = tamanho - 7; + + if (cnpj.length !== 14) { + return false; + } + + if (getInvalidateCommonCNPJ(cnpj)) { + return false; + } + + let i, + j, + resultado; + + for (i = tamanho; i >= 1; i--) { + soma += numeros.charAt(tamanho - i) * pos--; + if (pos < 2) { + pos = 9; + } + } + resultado = soma % 11 < 2 ? 0 : 11 - soma % 11; + + if (resultado !== parseInt(digitos.charAt(0), 10)) { + return false; + } + + tamanho += 1; + numeros = cnpj.substring(0, tamanho); + soma = 0; + pos = tamanho - 7; + for (j = tamanho; j >= 1; j--) { + soma += numeros.charAt(tamanho - j) * pos--; + if (pos < 2) { + pos = 9; + } + } + resultado = soma % 11 < 2 ? 0 : 11 - soma % 11; + + if (resultado !== parseInt(digitos.charAt(1), 10)) { + return false; + } + + return true; + } + + /** + * Add Validation Document Identification + */ + $.validator.addMethod( + 'mp-validate-document-identification', + + /** + * Validate document idenfitication. + * + * @param {String} value - document idenfitication number + * @return {Boolean} + */ + function (value) { + var documment = value.replace(/[^\d]+/g, ''); + + if (documment.length === 14) { + return validateCNPJ(documment); + } + + if (documment.length === 11) { + return validateCPF(documment); + } + + return false; + }, + $.mage.__('Please provide a valid document identification.') + ); + }; +}); diff --git a/view/base/web/js/view/payment/lib/clipboardjs/clipboard.js b/view/base/web/js/view/payment/lib/clipboardjs/clipboard.js new file mode 100644 index 0000000..b5651fd --- /dev/null +++ b/view/base/web/js/view/payment/lib/clipboardjs/clipboard.js @@ -0,0 +1,974 @@ +/* eslint-disable */ +/*! + * clipboard.js v2.0.6 + * https://clipboardjs.com/ + * + * Licensed MIT © Zeno Rocha + */ +(function webpackUniversalModuleDefinition(root, factory) { + if(typeof exports === 'object' && typeof module === 'object') + module.exports = factory(); + else if(typeof define === 'function' && define.amd) + define([], factory); + else if(typeof exports === 'object') + exports["ClipboardJS"] = factory(); + else + root["ClipboardJS"] = factory(); +})(this, function() { +return /******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); +/******/ } +/******/ }; +/******/ +/******/ // define __esModule on exports +/******/ __webpack_require__.r = function(exports) { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ +/******/ // create a fake namespace object +/******/ // mode & 1: value is a module id, require it +/******/ // mode & 2: merge all properties of value into the ns +/******/ // mode & 4: return value when already ns object +/******/ // mode & 8|1: behave like require +/******/ __webpack_require__.t = function(value, mode) { +/******/ if(mode & 1) value = __webpack_require__(value); +/******/ if(mode & 8) return value; +/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; +/******/ var ns = Object.create(null); +/******/ __webpack_require__.r(ns); +/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); +/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); +/******/ return ns; +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = 6); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ (function(module, exports) { + +function select(element) { + var selectedText; + + if (element.nodeName === 'SELECT') { + element.focus(); + + selectedText = element.value; + } + else if (element.nodeName === 'INPUT' || element.nodeName === 'TEXTAREA') { + var isReadOnly = element.hasAttribute('readonly'); + + if (!isReadOnly) { + element.setAttribute('readonly', ''); + } + + element.select(); + element.setSelectionRange(0, element.value.length); + + if (!isReadOnly) { + element.removeAttribute('readonly'); + } + + selectedText = element.value; + } + else { + if (element.hasAttribute('contenteditable')) { + element.focus(); + } + + var selection = window.getSelection(); + var range = document.createRange(); + + range.selectNodeContents(element); + selection.removeAllRanges(); + selection.addRange(range); + + selectedText = selection.toString(); + } + + return selectedText; +} + +module.exports = select; + + +/***/ }), +/* 1 */ +/***/ (function(module, exports) { + +function E () { + // Keep this empty so it's easier to inherit from + // (via https://github.com/lipsmack from https://github.com/scottcorgan/tiny-emitter/issues/3) +} + +E.prototype = { + on: function (name, callback, ctx) { + var e = this.e || (this.e = {}); + + (e[name] || (e[name] = [])).push({ + fn: callback, + ctx: ctx + }); + + return this; + }, + + once: function (name, callback, ctx) { + var self = this; + function listener () { + self.off(name, listener); + callback.apply(ctx, arguments); + }; + + listener._ = callback + return this.on(name, listener, ctx); + }, + + emit: function (name) { + var data = [].slice.call(arguments, 1); + var evtArr = ((this.e || (this.e = {}))[name] || []).slice(); + var i = 0; + var len = evtArr.length; + + for (i; i < len; i++) { + evtArr[i].fn.apply(evtArr[i].ctx, data); + } + + return this; + }, + + off: function (name, callback) { + var e = this.e || (this.e = {}); + var evts = e[name]; + var liveEvents = []; + + if (evts && callback) { + for (var i = 0, len = evts.length; i < len; i++) { + if (evts[i].fn !== callback && evts[i].fn._ !== callback) + liveEvents.push(evts[i]); + } + } + + // Remove event from queue to prevent memory leak + // Suggested by https://github.com/lazd + // Ref: https://github.com/scottcorgan/tiny-emitter/commit/c6ebfaa9bc973b33d110a84a307742b7cf94c953#commitcomment-5024910 + + (liveEvents.length) + ? e[name] = liveEvents + : delete e[name]; + + return this; + } +}; + +module.exports = E; +module.exports.TinyEmitter = E; + + +/***/ }), +/* 2 */ +/***/ (function(module, exports, __webpack_require__) { + +var is = __webpack_require__(3); +var delegate = __webpack_require__(4); + +/** + * Validates all params and calls the right + * listener function based on its target type. + * + * @param {String|HTMLElement|HTMLCollection|NodeList} target + * @param {String} type + * @param {Function} callback + * @return {Object} + */ +function listen(target, type, callback) { + if (!target && !type && !callback) { + throw new Error('Missing required arguments'); + } + + if (!is.string(type)) { + throw new TypeError('Second argument must be a String'); + } + + if (!is.fn(callback)) { + throw new TypeError('Third argument must be a Function'); + } + + if (is.node(target)) { + return listenNode(target, type, callback); + } + else if (is.nodeList(target)) { + return listenNodeList(target, type, callback); + } + else if (is.string(target)) { + return listenSelector(target, type, callback); + } + else { + throw new TypeError('First argument must be a String, HTMLElement, HTMLCollection, or NodeList'); + } +} + +/** + * Adds an event listener to a HTML element + * and returns a remove listener function. + * + * @param {HTMLElement} node + * @param {String} type + * @param {Function} callback + * @return {Object} + */ +function listenNode(node, type, callback) { + node.addEventListener(type, callback); + + return { + destroy: function() { + node.removeEventListener(type, callback); + } + } +} + +/** + * Add an event listener to a list of HTML elements + * and returns a remove listener function. + * + * @param {NodeList|HTMLCollection} nodeList + * @param {String} type + * @param {Function} callback + * @return {Object} + */ +function listenNodeList(nodeList, type, callback) { + Array.prototype.forEach.call(nodeList, function(node) { + node.addEventListener(type, callback); + }); + + return { + destroy: function() { + Array.prototype.forEach.call(nodeList, function(node) { + node.removeEventListener(type, callback); + }); + } + } +} + +/** + * Add an event listener to a selector + * and returns a remove listener function. + * + * @param {String} selector + * @param {String} type + * @param {Function} callback + * @return {Object} + */ +function listenSelector(selector, type, callback) { + return delegate(document.body, selector, type, callback); +} + +module.exports = listen; + + +/***/ }), +/* 3 */ +/***/ (function(module, exports) { + +/** + * Check if argument is a HTML element. + * + * @param {Object} value + * @return {Boolean} + */ +exports.node = function(value) { + return value !== undefined + && value instanceof HTMLElement + && value.nodeType === 1; +}; + +/** + * Check if argument is a list of HTML elements. + * + * @param {Object} value + * @return {Boolean} + */ +exports.nodeList = function(value) { + var type = Object.prototype.toString.call(value); + + return value !== undefined + && (type === '[object NodeList]' || type === '[object HTMLCollection]') + && ('length' in value) + && (value.length === 0 || exports.node(value[0])); +}; + +/** + * Check if argument is a string. + * + * @param {Object} value + * @return {Boolean} + */ +exports.string = function(value) { + return typeof value === 'string' + || value instanceof String; +}; + +/** + * Check if argument is a function. + * + * @param {Object} value + * @return {Boolean} + */ +exports.fn = function(value) { + var type = Object.prototype.toString.call(value); + + return type === '[object Function]'; +}; + + +/***/ }), +/* 4 */ +/***/ (function(module, exports, __webpack_require__) { + +var closest = __webpack_require__(5); + +/** + * Delegates event to a selector. + * + * @param {Element} element + * @param {String} selector + * @param {String} type + * @param {Function} callback + * @param {Boolean} useCapture + * @return {Object} + */ +function _delegate(element, selector, type, callback, useCapture) { + var listenerFn = listener.apply(this, arguments); + + element.addEventListener(type, listenerFn, useCapture); + + return { + destroy: function() { + element.removeEventListener(type, listenerFn, useCapture); + } + } +} + +/** + * Delegates event to a selector. + * + * @param {Element|String|Array} [elements] + * @param {String} selector + * @param {String} type + * @param {Function} callback + * @param {Boolean} useCapture + * @return {Object} + */ +function delegate(elements, selector, type, callback, useCapture) { + // Handle the regular Element usage + if (typeof elements.addEventListener === 'function') { + return _delegate.apply(null, arguments); + } + + // Handle Element-less usage, it defaults to global delegation + if (typeof type === 'function') { + // Use `document` as the first parameter, then apply arguments + // This is a short way to .unshift `arguments` without running into deoptimizations + return _delegate.bind(null, document).apply(null, arguments); + } + + // Handle Selector-based usage + if (typeof elements === 'string') { + elements = document.querySelectorAll(elements); + } + + // Handle Array-like based usage + return Array.prototype.map.call(elements, function (element) { + return _delegate(element, selector, type, callback, useCapture); + }); +} + +/** + * Finds closest match and invokes callback. + * + * @param {Element} element + * @param {String} selector + * @param {String} type + * @param {Function} callback + * @return {Function} + */ +function listener(element, selector, type, callback) { + return function(e) { + e.delegateTarget = closest(e.target, selector); + + if (e.delegateTarget) { + callback.call(element, e); + } + } +} + +module.exports = delegate; + + +/***/ }), +/* 5 */ +/***/ (function(module, exports) { + +var DOCUMENT_NODE_TYPE = 9; + +/** + * A polyfill for Element.matches() + */ +if (typeof Element !== 'undefined' && !Element.prototype.matches) { + var proto = Element.prototype; + + proto.matches = proto.matchesSelector || + proto.mozMatchesSelector || + proto.msMatchesSelector || + proto.oMatchesSelector || + proto.webkitMatchesSelector; +} + +/** + * Finds the closest parent that matches a selector. + * + * @param {Element} element + * @param {String} selector + * @return {Function} + */ +function closest (element, selector) { + while (element && element.nodeType !== DOCUMENT_NODE_TYPE) { + if (typeof element.matches === 'function' && + element.matches(selector)) { + return element; + } + element = element.parentNode; + } +} + +module.exports = closest; + + +/***/ }), +/* 6 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); + +// EXTERNAL MODULE: ./node_modules/select/src/select.js +var src_select = __webpack_require__(0); +var select_default = /*#__PURE__*/__webpack_require__.n(src_select); + +// CONCATENATED MODULE: ./src/clipboard-action.js +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + + + +/** + * Inner class which performs selection from either `text` or `target` + * properties and then executes copy or cut operations. + */ + +var clipboard_action_ClipboardAction = function () { + /** + * @param {Object} options + */ + function ClipboardAction(options) { + _classCallCheck(this, ClipboardAction); + + this.resolveOptions(options); + this.initSelection(); + } + + /** + * Defines base properties passed from constructor. + * @param {Object} options + */ + + + _createClass(ClipboardAction, [{ + key: 'resolveOptions', + value: function resolveOptions() { + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + + this.action = options.action; + this.container = options.container; + this.emitter = options.emitter; + this.target = options.target; + this.text = options.text; + this.trigger = options.trigger; + + this.selectedText = ''; + } + + /** + * Decides which selection strategy is going to be applied based + * on the existence of `text` and `target` properties. + */ + + }, { + key: 'initSelection', + value: function initSelection() { + if (this.text) { + this.selectFake(); + } else if (this.target) { + this.selectTarget(); + } + } + + /** + * Creates a fake textarea element, sets its value from `text` property, + * and makes a selection on it. + */ + + }, { + key: 'selectFake', + value: function selectFake() { + var _this = this; + + var isRTL = document.documentElement.getAttribute('dir') == 'rtl'; + + this.removeFake(); + + this.fakeHandlerCallback = function () { + return _this.removeFake(); + }; + this.fakeHandler = this.container.addEventListener('click', this.fakeHandlerCallback) || true; + + this.fakeElem = document.createElement('textarea'); + // Prevent zooming on iOS + this.fakeElem.style.fontSize = '12pt'; + // Reset box model + this.fakeElem.style.border = '0'; + this.fakeElem.style.padding = '0'; + this.fakeElem.style.margin = '0'; + // Move element out of screen horizontally + this.fakeElem.style.position = 'absolute'; + this.fakeElem.style[isRTL ? 'right' : 'left'] = '-9999px'; + // Move element to the same position vertically + var yPosition = window.pageYOffset || document.documentElement.scrollTop; + this.fakeElem.style.top = yPosition + 'px'; + + this.fakeElem.setAttribute('readonly', ''); + this.fakeElem.value = this.text; + + this.container.appendChild(this.fakeElem); + + this.selectedText = select_default()(this.fakeElem); + this.copyText(); + } + + /** + * Only removes the fake element after another click event, that way + * a user can hit `Ctrl+C` to copy because selection still exists. + */ + + }, { + key: 'removeFake', + value: function removeFake() { + if (this.fakeHandler) { + this.container.removeEventListener('click', this.fakeHandlerCallback); + this.fakeHandler = null; + this.fakeHandlerCallback = null; + } + + if (this.fakeElem) { + this.container.removeChild(this.fakeElem); + this.fakeElem = null; + } + } + + /** + * Selects the content from element passed on `target` property. + */ + + }, { + key: 'selectTarget', + value: function selectTarget() { + this.selectedText = select_default()(this.target); + this.copyText(); + } + + /** + * Executes the copy operation based on the current selection. + */ + + }, { + key: 'copyText', + value: function copyText() { + var succeeded = void 0; + + try { + succeeded = document.execCommand(this.action); + } catch (err) { + succeeded = false; + } + + this.handleResult(succeeded); + } + + /** + * Fires an event based on the copy operation result. + * @param {Boolean} succeeded + */ + + }, { + key: 'handleResult', + value: function handleResult(succeeded) { + this.emitter.emit(succeeded ? 'success' : 'error', { + action: this.action, + text: this.selectedText, + trigger: this.trigger, + clearSelection: this.clearSelection.bind(this) + }); + } + + /** + * Moves focus away from `target` and back to the trigger, removes current selection. + */ + + }, { + key: 'clearSelection', + value: function clearSelection() { + if (this.trigger) { + this.trigger.focus(); + } + document.activeElement.blur(); + window.getSelection().removeAllRanges(); + } + + /** + * Sets the `action` to be performed which can be either 'copy' or 'cut'. + * @param {String} action + */ + + }, { + key: 'destroy', + + + /** + * Destroy lifecycle. + */ + value: function destroy() { + this.removeFake(); + } + }, { + key: 'action', + set: function set() { + var action = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'copy'; + + this._action = action; + + if (this._action !== 'copy' && this._action !== 'cut') { + throw new Error('Invalid "action" value, use either "copy" or "cut"'); + } + } + + /** + * Gets the `action` property. + * @return {String} + */ + , + get: function get() { + return this._action; + } + + /** + * Sets the `target` property using an element + * that will be have its content copied. + * @param {Element} target + */ + + }, { + key: 'target', + set: function set(target) { + if (target !== undefined) { + if (target && (typeof target === 'undefined' ? 'undefined' : _typeof(target)) === 'object' && target.nodeType === 1) { + if (this.action === 'copy' && target.hasAttribute('disabled')) { + throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute'); + } + + if (this.action === 'cut' && (target.hasAttribute('readonly') || target.hasAttribute('disabled'))) { + throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes'); + } + + this._target = target; + } else { + throw new Error('Invalid "target" value, use a valid Element'); + } + } + } + + /** + * Gets the `target` property. + * @return {String|HTMLElement} + */ + , + get: function get() { + return this._target; + } + }]); + + return ClipboardAction; +}(); + +/* harmony default export */ var clipboard_action = (clipboard_action_ClipboardAction); +// EXTERNAL MODULE: ./node_modules/tiny-emitter/index.js +var tiny_emitter = __webpack_require__(1); +var tiny_emitter_default = /*#__PURE__*/__webpack_require__.n(tiny_emitter); + +// EXTERNAL MODULE: ./node_modules/good-listener/src/listen.js +var listen = __webpack_require__(2); +var listen_default = /*#__PURE__*/__webpack_require__.n(listen); + +// CONCATENATED MODULE: ./src/clipboard.js +var clipboard_typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; + +var clipboard_createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +function clipboard_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + + + + + +/** + * Base class which takes one or more elements, adds event listeners to them, + * and instantiates a new `ClipboardAction` on each click. + */ + +var clipboard_Clipboard = function (_Emitter) { + _inherits(Clipboard, _Emitter); + + /** + * @param {String|HTMLElement|HTMLCollection|NodeList} trigger + * @param {Object} options + */ + function Clipboard(trigger, options) { + clipboard_classCallCheck(this, Clipboard); + + var _this = _possibleConstructorReturn(this, (Clipboard.__proto__ || Object.getPrototypeOf(Clipboard)).call(this)); + + _this.resolveOptions(options); + _this.listenClick(trigger); + return _this; + } + + /** + * Defines if attributes would be resolved using internal setter functions + * or custom functions that were passed in the constructor. + * @param {Object} options + */ + + + clipboard_createClass(Clipboard, [{ + key: 'resolveOptions', + value: function resolveOptions() { + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + + this.action = typeof options.action === 'function' ? options.action : this.defaultAction; + this.target = typeof options.target === 'function' ? options.target : this.defaultTarget; + this.text = typeof options.text === 'function' ? options.text : this.defaultText; + this.container = clipboard_typeof(options.container) === 'object' ? options.container : document.body; + } + + /** + * Adds a click event listener to the passed trigger. + * @param {String|HTMLElement|HTMLCollection|NodeList} trigger + */ + + }, { + key: 'listenClick', + value: function listenClick(trigger) { + var _this2 = this; + + this.listener = listen_default()(trigger, 'click', function (e) { + return _this2.onClick(e); + }); + } + + /** + * Defines a new `ClipboardAction` on each click event. + * @param {Event} e + */ + + }, { + key: 'onClick', + value: function onClick(e) { + var trigger = e.delegateTarget || e.currentTarget; + + if (this.clipboardAction) { + this.clipboardAction = null; + } + + this.clipboardAction = new clipboard_action({ + action: this.action(trigger), + target: this.target(trigger), + text: this.text(trigger), + container: this.container, + trigger: trigger, + emitter: this + }); + } + + /** + * Default `action` lookup function. + * @param {Element} trigger + */ + + }, { + key: 'defaultAction', + value: function defaultAction(trigger) { + return getAttributeValue('action', trigger); + } + + /** + * Default `target` lookup function. + * @param {Element} trigger + */ + + }, { + key: 'defaultTarget', + value: function defaultTarget(trigger) { + var selector = getAttributeValue('target', trigger); + + if (selector) { + return document.querySelector(selector); + } + } + + /** + * Returns the support of the given action, or all actions if no action is + * given. + * @param {String} [action] + */ + + }, { + key: 'defaultText', + + + /** + * Default `text` lookup function. + * @param {Element} trigger + */ + value: function defaultText(trigger) { + return getAttributeValue('text', trigger); + } + + /** + * Destroy lifecycle. + */ + + }, { + key: 'destroy', + value: function destroy() { + this.listener.destroy(); + + if (this.clipboardAction) { + this.clipboardAction.destroy(); + this.clipboardAction = null; + } + } + }], [{ + key: 'isSupported', + value: function isSupported() { + var action = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ['copy', 'cut']; + + var actions = typeof action === 'string' ? [action] : action; + var support = !!document.queryCommandSupported; + + actions.forEach(function (action) { + support = support && !!document.queryCommandSupported(action); + }); + + return support; + } + }]); + + return Clipboard; +}(tiny_emitter_default.a); + +/** + * Helper function to retrieve attribute value. + * @param {String} suffix + * @param {Element} element + */ + + +function getAttributeValue(suffix, element) { + var attribute = 'data-clipboard-' + suffix; + + if (!element.hasAttribute(attribute)) { + return; + } + + return element.getAttribute(attribute); +} + +/* harmony default export */ var clipboard = __webpack_exports__["default"] = (clipboard_Clipboard); + +/***/ }) +/******/ ])["default"]; +}); \ No newline at end of file diff --git a/view/base/web/js/view/payment/lib/clipboardjs/widgetClipboard.js b/view/base/web/js/view/payment/lib/clipboardjs/widgetClipboard.js new file mode 100644 index 0000000..01c1822 --- /dev/null +++ b/view/base/web/js/view/payment/lib/clipboardjs/widgetClipboard.js @@ -0,0 +1,49 @@ +/** + * Copyright © O2TI. All rights reserved. + * @author Mercado Pago + * @license See LICENSE for license details. + */ + + define([ + 'jquery', + 'clipboard', + 'jquery-ui-modules/widget' +], function ($, ClipboardJS) { + 'use strict'; + + $.widget('mage.widgetClipboard', { + /** + * Create. + * + * @returns {void} + */ + _create() { + this._super(); + if (this.options.enabled) { + this._copy(); + } + }, + + /** + * Copy. + * + * @returns {void} + */ + _copy() { + var self = this, + btn = $(self.element), + clipboard = new ClipboardJS('#' + btn.prop('id'), {}); + + clipboard.on('success', function (e) { + $(self.element).text(self.options.copiedtext); + setTimeout(() => { + console.log($(self.element)); + $(self.element).text(self.options.textBtn); + }, 300); + e.clearSelection(); + }); + } + }); + + return $.mage.widgetClipboard; +}); diff --git a/view/frontend/layout/checkout_cart_index.xml b/view/frontend/layout/checkout_cart_index.xml new file mode 100644 index 0000000..7529ee9 --- /dev/null +++ b/view/frontend/layout/checkout_cart_index.xml @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + MercadoPago_AdbPayment/js/view/cart/totals/finance_cost + + Finance Cost + + + + + + + + + + + + diff --git a/view/frontend/layout/checkout_index_index.xml b/view/frontend/layout/checkout_index_index.xml new file mode 100644 index 0000000..5055cfb --- /dev/null +++ b/view/frontend/layout/checkout_index_index.xml @@ -0,0 +1,94 @@ + + + + + + + + + + + + + + uiComponent + + + + + + + MercadoPago_AdbPayment/js/view/payment/mercadopago + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + + + + + + + + + + + + + + + + + MercadoPago_AdbPayment/js/view/checkout/cart/totals/finance_cost + 20 + + MercadoPago_AdbPayment/checkout/cart/totals/finance_cost + Finance Cost + + + + + + + + + + + + + + + + diff --git a/view/frontend/layout/checkout_onepage_success.xml b/view/frontend/layout/checkout_onepage_success.xml new file mode 100644 index 0000000..97fc072 --- /dev/null +++ b/view/frontend/layout/checkout_onepage_success.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + diff --git a/view/frontend/layout/sales_email_order_creditmemo_items.xml b/view/frontend/layout/sales_email_order_creditmemo_items.xml new file mode 100644 index 0000000..365e517 --- /dev/null +++ b/view/frontend/layout/sales_email_order_creditmemo_items.xml @@ -0,0 +1,17 @@ + + + + + + + + + diff --git a/view/frontend/layout/sales_email_order_invoice_items.xml b/view/frontend/layout/sales_email_order_invoice_items.xml new file mode 100644 index 0000000..365e517 --- /dev/null +++ b/view/frontend/layout/sales_email_order_invoice_items.xml @@ -0,0 +1,17 @@ + + + + + + + + + diff --git a/view/frontend/layout/sales_email_order_items.xml b/view/frontend/layout/sales_email_order_items.xml new file mode 100644 index 0000000..e042a87 --- /dev/null +++ b/view/frontend/layout/sales_email_order_items.xml @@ -0,0 +1,17 @@ + + + + + + + + + diff --git a/view/frontend/layout/sales_guest_invoice.xml b/view/frontend/layout/sales_guest_invoice.xml new file mode 100644 index 0000000..365e517 --- /dev/null +++ b/view/frontend/layout/sales_guest_invoice.xml @@ -0,0 +1,17 @@ + + + + + + + + + diff --git a/view/frontend/layout/sales_guest_print.xml b/view/frontend/layout/sales_guest_print.xml new file mode 100644 index 0000000..e042a87 --- /dev/null +++ b/view/frontend/layout/sales_guest_print.xml @@ -0,0 +1,17 @@ + + + + + + + + + diff --git a/view/frontend/layout/sales_guest_printinvoice.xml b/view/frontend/layout/sales_guest_printinvoice.xml new file mode 100644 index 0000000..365e517 --- /dev/null +++ b/view/frontend/layout/sales_guest_printinvoice.xml @@ -0,0 +1,17 @@ + + + + + + + + + diff --git a/view/frontend/layout/sales_guest_view.xml b/view/frontend/layout/sales_guest_view.xml new file mode 100644 index 0000000..e042a87 --- /dev/null +++ b/view/frontend/layout/sales_guest_view.xml @@ -0,0 +1,17 @@ + + + + + + + + + diff --git a/view/frontend/layout/sales_order_creditmemo.xml b/view/frontend/layout/sales_order_creditmemo.xml new file mode 100644 index 0000000..f39fb2c --- /dev/null +++ b/view/frontend/layout/sales_order_creditmemo.xml @@ -0,0 +1,17 @@ + + + + + + + + + diff --git a/view/frontend/layout/sales_order_invoice.xml b/view/frontend/layout/sales_order_invoice.xml new file mode 100644 index 0000000..365e517 --- /dev/null +++ b/view/frontend/layout/sales_order_invoice.xml @@ -0,0 +1,17 @@ + + + + + + + + + diff --git a/view/frontend/layout/sales_order_print.xml b/view/frontend/layout/sales_order_print.xml new file mode 100644 index 0000000..e042a87 --- /dev/null +++ b/view/frontend/layout/sales_order_print.xml @@ -0,0 +1,17 @@ + + + + + + + + + diff --git a/view/frontend/layout/sales_order_view.xml b/view/frontend/layout/sales_order_view.xml new file mode 100644 index 0000000..e042a87 --- /dev/null +++ b/view/frontend/layout/sales_order_view.xml @@ -0,0 +1,17 @@ + + + + + + + + + diff --git a/view/frontend/layout/vault_cards_listaction.xml b/view/frontend/layout/vault_cards_listaction.xml new file mode 100644 index 0000000..01c05b9 --- /dev/null +++ b/view/frontend/layout/vault_cards_listaction.xml @@ -0,0 +1,18 @@ + + + + + + + + + + + diff --git a/view/frontend/requirejs-config.js b/view/frontend/requirejs-config.js new file mode 100644 index 0000000..d0b7a94 --- /dev/null +++ b/view/frontend/requirejs-config.js @@ -0,0 +1,24 @@ +/** + * Copyright © MercadoPago. All rights reserved. + * @author Mercado Pago + * @license See LICENSE for license details. + */ +let config = { + paths: { + 'mercadoPagoSkdJs':'https://sdk.mercadopago.com/js/v2?source=Magento', + 'initMPCheckout': 'MercadoPago_AdbPayment/js/view/payment/initMPCheckout', + 'observerCheckoutPro': 'MercadoPago_AdbPayment/js/view/payment/observerCheckoutPro' + }, + shim: { + 'mercadoPagoSkdJs': { + 'deps': ['jquery'] + } + }, + config: { + mixins: { + 'mage/validation': { + 'MercadoPago_AdbPayment/js/validation/custom-validation-mixin': true + } + } + } +}; diff --git a/view/frontend/templates/info/cc/instructions.phtml b/view/frontend/templates/info/cc/instructions.phtml new file mode 100644 index 0000000..197c64e --- /dev/null +++ b/view/frontend/templates/info/cc/instructions.phtml @@ -0,0 +1,63 @@ +escapeHtml(__($block->getMethod()->getTitle())); +$specificInfo = $block->getSpecificInformation(); +?> + +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
escapeHtml(__('card_installments')); ?>:escapeHtml($specificInfo['card_installments']) ?>
escapeHtml(__('card_finance_cost')); ?>:getFormatedPrice($specificInfo['card_finance_cost']) ?>
escapeHtml(__('card_type')); ?>:escapeHtml($specificInfo['card_type']) ?>
escapeHtml(__('card_number')); ?>:escapeHtml($specificInfo['card_number']) ?>
escapeHtml(__('card_holder_name')); ?>:escapeHtml($specificInfo['card_holder_name']) ?>
escapeHtml(__('payer_document_identification')); ?>:escapeHtml($specificInfo['payer_document_identification']) ?>
+
+
+ diff --git a/view/frontend/templates/info/checkout-pro/instructions.phtml b/view/frontend/templates/info/checkout-pro/instructions.phtml new file mode 100644 index 0000000..f2dc721 --- /dev/null +++ b/view/frontend/templates/info/checkout-pro/instructions.phtml @@ -0,0 +1,55 @@ +escapeHtml(__($block->getMethod()->getTitle())); +$specificInfo = $block->getSpecificInformation(); +$expirationDate = isset($specificInfo['date_of_expiration']) ? $specificInfo['date_of_expiration'] : null; +$externalLink = isset($specificInfo['init_point']) ? $specificInfo['init_point'] : null; +?> + +
+
+
+ + + + + + + + + + + + + + + + +
escapeHtml(__('Expiration')); ?> + formatDate( + $expirationDate, + \IntlDateFormatter::MEDIUM, + false + ) ?> +
+ escapeHtml(__('Link')); ?> + + + escapeHtml(__('Details for payment')); ?> + +
+
+
+ diff --git a/view/frontend/templates/info/payment-methods-off/instructions.phtml b/view/frontend/templates/info/payment-methods-off/instructions.phtml new file mode 100644 index 0000000..e82acd2 --- /dev/null +++ b/view/frontend/templates/info/payment-methods-off/instructions.phtml @@ -0,0 +1,117 @@ +escapeHtml(__($block->getMethod()->getTitle())); +$specificInfo = $block->getSpecificInformation(); +$mpPaymentId = isset($specificInfo['mp_payment_id']) ? $specificInfo['mp_payment_id']: null; +$expirationDate = isset($specificInfo['date_of_expiration']) ? $specificInfo['date_of_expiration'] : null; +$lineCode = isset($specificInfo['line_code']) ? $specificInfo['line_code']: null; +$barcode = isset($specificInfo['barcode']) ? $specificInfo['barcode'] : null; +$externalLink = isset($specificInfo['external_resource_url']) ? $specificInfo['external_resource_url'] : null; +$payerDocumentIdentification = + isset($specificInfo['payer_document_identification']) ? + $specificInfo['payer_document_identification'] : null; +$payerDocumentType = + isset($specificInfo['payer_document_type']) ? + $specificInfo['payer_document_type'] : null; +$ticketUrl = isset($specificInfo['ticket_url']) ? $specificInfo['ticket_url'] : null; +$status = isset($specificInfo['mp_status']) ? $specificInfo['mp_status'] : null; +$statusDetail = isset($specificInfo['mp_status_detail']) ? $specificInfo['mp_status_detail'] : null; +?> + +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
escapeHtml(__('mp_payment_id')); ?>escapeHtml($mpPaymentId); ?>
escapeHtml(__('Expiration')); ?> + formatDate( + $expirationDate, + \IntlDateFormatter::MEDIUM, + false + ) ?> +
+ escapeHtml(__('Link')); ?> + + + escapeHtml(__('Download the Boleto')); ?> + +
+ escapeHtml(__('Line Code')); ?> + + +
+ escapeHtml(__('Payer Document Type')); ?> + + escapeHtml($payerDocumentType) ?> +
+ escapeHtml(__('Document number')); ?> + + escapeHtml($payerDocumentIdentification) ?> +
+ escapeHtml(__('Status (Mercado Pago)')); ?> + + escapeHtml(__($status)) ?> +
+ escapeHtml(__('Status Detail (Mercado Pago)')); ?> + + escapeHtml(__($status)) ?> +
+
+
+ diff --git a/view/frontend/templates/info/pix/instructions.phtml b/view/frontend/templates/info/pix/instructions.phtml new file mode 100644 index 0000000..cbfb3b6 --- /dev/null +++ b/view/frontend/templates/info/pix/instructions.phtml @@ -0,0 +1,122 @@ +escapeHtml(__($block->getMethod()->getTitle())); +$specificInfo = $block->getSpecificInformation(); +$mpPaymentId = isset($specificInfo['mp_payment_id']) ? $specificInfo['mp_payment_id']: null; +$expirationDate = isset($specificInfo['date_of_expiration']) ? $specificInfo['date_of_expiration'] : null; +$qrCode = isset($specificInfo['qr_code']) ? $specificInfo['qr_code']: null; +$qrCodeImage = isset($specificInfo['qr_code_base64']) ? $specificInfo['qr_code_base64'] : null; +$payerDocumentIdentification = + isset($specificInfo['payer_document_identification']) ? + $specificInfo['payer_document_identification'] : null; +$payerDocumentType = + isset($specificInfo['payer_document_type']) ? + $specificInfo['payer_document_type'] : null; +$ticketUrl = isset($specificInfo['ticket_url']) ? $specificInfo['ticket_url'] : null; +$status = isset($specificInfo['mp_status']) ? $specificInfo['mp_status'] : null; +$statusDetail = isset($specificInfo['mp_status_detail']) ? $specificInfo['mp_status_detail'] : null; +?> + + + +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
escapeHtml(__('mp_payment_id')); ?>escapeHtml($mpPaymentId); ?>
escapeHtml(__('Expiration')); ?> + formatDate( + $expirationDate, + \IntlDateFormatter::MEDIUM, + true + ) ?> +
+ escapeHtml(__('Pix QR Code')); ?> + + <?= /* @noEscape */ $title ?> +
+ escapeHtml(__('Pix Code')); ?> + + +
+ escapeHtml(__('Payer Document Type')); ?> + + escapeHtml($payerDocumentType) ?> +
+ escapeHtml(__('Document number')); ?> + + escapeHtml($payerDocumentIdentification) ?> +
+ escapeHtml(__('Status (Mercado Pago)')); ?> + + escapeHtml(__($status)) ?> +
+ escapeHtml(__('Status Detail (Mercado Pago)')); ?> + + escapeHtml(__($status)) ?> +
+
+
+ diff --git a/view/frontend/templates/info/pse/instructions.phtml b/view/frontend/templates/info/pse/instructions.phtml new file mode 100644 index 0000000..0b2622c --- /dev/null +++ b/view/frontend/templates/info/pse/instructions.phtml @@ -0,0 +1,113 @@ +escapeHtml(__($block->getMethod()->getTitle())); +$specificInfo = $block->getSpecificInformation(); +$mpPaymentId = isset($specificInfo['mp_payment_id']) ? $specificInfo['mp_payment_id']: null; +$expirationDate = isset($specificInfo['date_of_expiration']) ? $specificInfo['date_of_expiration'] : null; +$lineCode = isset($specificInfo['line_code']) ? $specificInfo['line_code']: null; +$barcode = isset($specificInfo['barcode']) ? $specificInfo['barcode'] : null; +$externalLink = isset($specificInfo['external_resource_url']) ? $specificInfo['external_resource_url'] : null; +$payerDocumentIdentification = + isset($specificInfo['payer_document_identification']) ? + $specificInfo['payer_document_identification'] : null; +$payerDocumentType = + isset($specificInfo['payer_document_type']) ? + $specificInfo['payer_document_type'] : null; +$ticketUrl = isset($specificInfo['ticket_url']) ? $specificInfo['ticket_url'] : null; +$status = isset($specificInfo['mp_status']) ? $specificInfo['mp_status'] : null; +$statusDetail = isset($specificInfo['mp_status_detail']) ? $specificInfo['mp_status_detail'] : null; +?> + +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
escapeHtml(__('mp_payment_id')); ?>escapeHtml($mpPaymentId); ?>
escapeHtml(__('Expiration')); ?> + formatDate( + $expirationDate, + \IntlDateFormatter::MEDIUM, + false + ) ?> +
+ escapeHtml(__('Link')); ?> + + + escapeHtml(__('Details for payment')); ?> + +
+ escapeHtml(__('Payer Document Type')); ?> + + escapeHtml($payerDocumentType) ?> +
+ escapeHtml(__('Document number')); ?> + + escapeHtml($payerDocumentIdentification) ?> +
+ escapeHtml(__('Status (Mercado Pago)')); ?> + + escapeHtml(__($status)) ?> +
+ escapeHtml(__('Status Detail (Mercado Pago)')); ?> + + escapeHtml(__($status)) ?> +
+
+
+ diff --git a/view/frontend/templates/info/twocc/instructions.phtml b/view/frontend/templates/info/twocc/instructions.phtml new file mode 100644 index 0000000..805f20b --- /dev/null +++ b/view/frontend/templates/info/twocc/instructions.phtml @@ -0,0 +1,74 @@ +escapeHtml(__($block->getMethod()->getTitle())); +$specificInfo = $block->getSpecificInformation(); +?> + +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +

escapeHtml(__('FIRST PAYMENT METHOD')) ?>

+ +

escapeHtml(__('SECOND PAYMENT METHOD')) ?>

+ +
escapeHtml(__('card_installments')); ?>:escapeHtml($specificInfo['card_' . $i . '_installments']) ?>
escapeHtml(__('card_finance_cost')); ?>:getFormatedPrice($specificInfo['card_' . $i . '_finance_cost']) ?>
escapeHtml(__('card_type')); ?>:escapeHtml($specificInfo['card_' . $i . '_type']) ?>
escapeHtml(__('card_number')); ?>:escapeHtml($specificInfo['card_' . $i . '_number']) ?>
escapeHtml(__('card_holder_name')); ?>:escapeHtml($specificInfo['card_' . $i . '_holder_name']) ?>
escapeHtml(__('payer_document_identification')); ?>:escapeHtml($specificInfo['payer_' . $i . '_document_identification']) ?>
+
+
+ diff --git a/view/frontend/templates/info/webpay/instructions.phtml b/view/frontend/templates/info/webpay/instructions.phtml new file mode 100644 index 0000000..2e9fa6d --- /dev/null +++ b/view/frontend/templates/info/webpay/instructions.phtml @@ -0,0 +1,113 @@ +escapeHtml(__($block->getMethod()->getTitle())); +$specificInfo = $block->getSpecificInformation(); +$mpPaymentId = isset($specificInfo['mp_payment_id']) ? $specificInfo['mp_payment_id']: null; +$expirationDate = isset($specificInfo['date_of_expiration']) ? $specificInfo['date_of_expiration'] : null; +$lineCode = isset($specificInfo['line_code']) ? $specificInfo['line_code']: null; +$barcode = isset($specificInfo['barcode']) ? $specificInfo['barcode'] : null; +$externalLink = isset($specificInfo['external_resource_url']) ? $specificInfo['external_resource_url'] : null; +$payerDocumentIdentification = + isset($specificInfo['payer_document_identification']) ? + $specificInfo['payer_document_identification'] : null; +$payerDocumentType = + isset($specificInfo['payer_document_type']) ? + $specificInfo['payer_document_type'] : null; +$ticketUrl = isset($specificInfo['ticket_url']) ? $specificInfo['ticket_url'] : null; +$status = isset($specificInfo['mp_status']) ? $specificInfo['mp_status'] : null; +$statusDetail = isset($specificInfo['mp_status_detail']) ? $specificInfo['mp_status_detail'] : null; +?> + +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
escapeHtml(__('mp_payment_id')); ?>escapeHtml($mpPaymentId); ?>
escapeHtml(__('Expiration')); ?> + formatDate( + $expirationDate, + \IntlDateFormatter::MEDIUM, + false + ) ?> +
+ escapeHtml(__('Link')); ?> + + + escapeHtml(__('Details for payment')); ?> + +
+ escapeHtml(__('Payer Document Type')); ?> + + escapeHtml($payerDocumentType) ?> +
+ escapeHtml(__('Document number')); ?> + + escapeHtml($payerDocumentIdentification) ?> +
+ escapeHtml(__('Status (Mercado Pago)')); ?> + + escapeHtml(__($status)) ?> +
+ escapeHtml(__('Status Detail (Mercado Pago)')); ?> + + escapeHtml(__($status)) ?> +
+
+
+ diff --git a/view/frontend/templates/order/success/default.phtml b/view/frontend/templates/order/success/default.phtml new file mode 100644 index 0000000..813c56d --- /dev/null +++ b/view/frontend/templates/order/success/default.phtml @@ -0,0 +1,35 @@ + + +

escapeHtml(__($block->getTitleByPaymentStatus($block->getInfo('mp_status')))) ?>

+getOrderId()) :?> + getCanViewOrder()) :?> +

escapeHtml(__('Your order number is: %1.', sprintf('%s', $block->escapeUrl($block->getViewOrderUrl()), $block->getOrderId())), ['a', 'strong']) ?>

+ +

escapeHtml(__('Your order # is: %1.', $block->getOrderId()), ['span']) ?>

+ +

escapeHtml(__('We\'ll email you an order confirmation with details and tracking info.')) ?>

+ +getInfo('external_resource_url')): ?> + + + diff --git a/view/frontend/templates/order/success/payment-method-off.phtml b/view/frontend/templates/order/success/payment-method-off.phtml new file mode 100644 index 0000000..df2545b --- /dev/null +++ b/view/frontend/templates/order/success/payment-method-off.phtml @@ -0,0 +1,82 @@ + + +
+ getInfo('message_line_code'); + $messageInfo = $block->getInfo('message_info'); + $messageWillApproved = $block->getInfo('message_will_approved'); + $messageDocument = $block->getInfo('message_document'); + $document = $block->getInfo('payer_document_identification'); + $lineCode = $block->getInfo('line_code'); + + ?> + + +

escapeHtml(__($messageInfo)) ?>

+ + + +

escapeHtml(__($messageLineCode)) ?>:

+ +
+
+ +
+ +
+
+
+ + + +

escapeHtml(__($messageDocument)) ?>:

+ + + +

escapeHtml(__($messageWillApproved)) ?>

+ + +
+ getInfo('external_resource_url')) { ?> + + escapeHtml(__('Details for payment')) ?> + + +
+ + +
+ diff --git a/view/frontend/templates/order/success/pix.phtml b/view/frontend/templates/order/success/pix.phtml new file mode 100644 index 0000000..8156db5 --- /dev/null +++ b/view/frontend/templates/order/success/pix.phtml @@ -0,0 +1,65 @@ + +getInfo('qr_code_base64'); +?> +

escapeHtml(__($block->getTitleByPaymentStatus($block->getInfo('mp_status')))) ?>

+getOrderId()) :?> + getCanViewOrder()) :?> +

escapeHtml(__('Your order number is: %1.', sprintf('%s', $block->escapeUrl($block->getViewOrderUrl()), $block->getOrderId())), ['a', 'strong']) ?>

+ +

escapeHtml(__('Your order # is: %1.', $block->getOrderId()), ['span']) ?>

+ +

escapeHtml(__('We\'ll email you an order confirmation with details and tracking info.')) ?>

+ +
+

+ escapeHtml(__('To pay, please scan the QR code')) ?> +

+ <?= $block->escapeHtml(__('Pix')) ?> +
+

+

+ escapeHtml(__('or, if you prefer, copy-paste the code')) ?> +

+
+ +
+ +
+
+
+

+
+ + diff --git a/view/frontend/templates/order/success/twocc.phtml b/view/frontend/templates/order/success/twocc.phtml new file mode 100644 index 0000000..8275b2e --- /dev/null +++ b/view/frontend/templates/order/success/twocc.phtml @@ -0,0 +1,85 @@ + + +

escapeHtml(__($block->getTitleByPaymentStatus())) ?>

+ +
+

escapeHtml(__('Your order is %1!', $block->getOrderId()), ['b']) ?>

+
+ +
+

escapeHtml(__('PAYMENT INFORMATION')) ?>

+

escapeHtml(__('Payment Number (Mercado Pago): %1', $block->getInfo('mp_payment_id'))) ?>

+
+ + +
+ +

escapeHtml(__('FIRST PAYMENT METHOD')) ?>

+ +

escapeHtml(__('SECOND PAYMENT METHOD')) ?>

+ + +

+ + escapeHtml(__('Card number:')) ?> + escapeHtml(__($block->getInfo('card_'.$i.'_number'))) ?> +

+

+ + escapeHtml(__('Expiration date:')) ?> + escapeHtml(__('%1/%2', $block->getInfo('card_'.$i.'_exp_month'), $block->getInfo('card_'.$i.'_exp_year'))) ?> +

+

+ + escapeHtml(__('Card holder:')) ?> + escapeHtml(__($block->getInfo('card_'.$i.'_holder_name'))) ?> +

+

+ + escapeHtml(__('Payment method:')) ?> + escapeHtml(__($block->getInfo('card_'.$i.'_type'))) ?> +

+

+ + escapeHtml(__('Installments:')) ?> + escapeHtml(__($block->getInfo('card_'.$i.'_installments'))) ?> +

+ getInfo('card_'.$i.'_finance_cost')): ?> +

+ + escapeHtml(__('Finance Cost')) ?>: + getFormatedPrice($block->getInfo('card_'.$i.'_finance_cost'))) ?> +

+ +

+ + escapeHtml(__('Identification in the invoice:')) ?> + escapeHtml(__($block->getStatementDescriptor())) ?> +

+

+ + escapeHtml(__('Payment status:')) ?> + escapeHtml(__($block->getInfo('mp_'.$i.'_status'))) ?> +

+

+ + escapeHtml(__('Detailed payment status:')) ?> + escapeHtml(__($block->getInfo('mp_'.$i.'_status_detail'))) ?> +

+
+ + + diff --git a/view/frontend/templates/success.phtml b/view/frontend/templates/success.phtml new file mode 100644 index 0000000..894fc64 --- /dev/null +++ b/view/frontend/templates/success.phtml @@ -0,0 +1,18 @@ + + +
+ + getAdditionalInfoHtml() ?> + + +
diff --git a/view/frontend/web/css/source/_module.less b/view/frontend/web/css/source/_module.less new file mode 100644 index 0000000..e5f44e8 --- /dev/null +++ b/view/frontend/web/css/source/_module.less @@ -0,0 +1,647 @@ +@label_floating-padding-x: 15px; +@label_floating-padding-y: 13px; +@mercadopago-fields-input__padding-top: @label_floating-padding-y; +@mercadopago-fields-input__padding-bottom: @label_floating-padding-y; +@mercadopago-fields-input__padding-right: @indent__xs; +@mercadopago-fields-input__padding-left: @indent__s; +@mercadopago-checkout__box-shadow: 0 3px 5px rgba(57, 22, 58, .05); +@mercadopago-checkout__border-radius: 3px; +@mercadopago-checkout__margin-adjust: 21px; +@import 'twocc.less'; + +& when (@media-common =true) { + + //css Two Cards + .payment-method { + .payment-method-title { + .payment-method-label { + .payment-method-label-icon { + .mp-logo-title { + height: 28px; + } + } + + } + } + + .payment-method-content { + .mp-header-two-cards { + font-family: 'Open Sans'; + font-style: normal; + + .mp-header-title-one { + font-weight: 600; + font-size: 16px; + line-height: 23px; + color: rgba(0, 0, 0, 0.8); + margin: 5px 0px 16px 0px; + } + + .mp-header-subtitle { + font-weight: 400; + font-size: 11px; + line-height: 18px; + color: rgba(0, 0, 0, 0.9); + } + + .mp-subtitle { + font-weight: 400; + font-size: 13px; + line-height: 18px; + color: rgba(0, 0, 0, 0.55); + margin: 4px 0px 16px 0px; + } + + .mp-message { + color: red; + font-weight: 400; + font-size: 13px; + line-height: 18px; + margin: 4px 0px 16px 0px; + display: none; + } + + input { + box-sizing: border-box; + width: 328px; + height: 52px; + display: flex; + flex-direction: column; + justify-content: center; + align-items: flex-start; + padding: 0px 12px; + background: #FFFFFF; + border: 1px solid rgba(0, 0, 0, 0.25); + border-radius: 6px; + margin-bottom: 10px; + } + + input::placeholder { + color: rgba(0, 0, 0, 0.25); + } + + input::-webkit-input-placeholder { + color: rgba(0, 0, 0, 0.25); + } + + input::-ms-input-placeholder { + color: rgba(0, 0, 0, 0.25); + } + + input::-moz-placeholder { + color: rgba(0, 0, 0, 0.25); + } + + .mp-progress-bar { + width: 324px; + height: 4px; + border-radius: 5px; + background-color: rgba(0, 0, 0, 0.1); + } + + .mp-progress-bar div { + height: 100%; + background-color: #3483FA; + border-radius: 5px; + width: 0px; + } + } + + .mp-header-title-two { + font-family: 'Open Sans'; + font-style: normal; + font-weight: 600; + font-size: 16px; + line-height: 23px; + color: rgba(0, 0, 0, 0.8); + margin: 16px 0px; + } + + .mp-footer { + display: flex; + margin-top: 22px; + align-items: center; + + .mp-footer-subtitle { + font-weight: 400; + font-size: 11px; + line-height: 17px; + color: #BFBFBF; + margin-left: 8px; + } + + .mp-footer-logo { + width: 39px; + height: 28px; + } + } + + .mp-divider { + width: 100; + height: 1px; + background: #CCCCCC; + margin: 38px 0px 16px 0px; + } + } + + //end css TWo Cards + + .text-tea { + font-size: 12px; + line-height: 1.1; + } + + .text-cft { + font-size: 27px; + line-height: 1.1; + } + + .payment-method-title { + &.field { + display: inline-flex; + width: 100%; + } + } + + .control-mp-iframe { + background-color: @input-text__background; + border: @input-text__border; + border-radius: @input-text__border-radius; + height: 48px; + position: relative; + + &.has-error { + border-color: @error__color; + } + + .field-tooltip { + height: 0; + right: @indent__xs; + text-align: right; + top: @indent__s; + width: 28px; + } + + .input-mp-iframe { + height: 100%; + position: absolute; + width: 90%; + } + + .label { + display: block; + font-weight: normal; + margin-bottom: 0; + overflow: hidden; + padding: @label_floating-padding-y @label_floating-padding-x; + pointer-events: none; + position: absolute; + text-overflow: ellipsis; + top: 0; + transition: all .1s ease-in-out; + white-space: nowrap; + width: 70%; + } + + &.in-focus, + &.is-valid { + .label { + font-size: 10px; + padding-bottom: calc(@label_floating-padding-y/3) !important; + padding-top: calc(@label_floating-padding-y/3) !important; + } + } + } + + .mp-message-error { + display: block; + color: #e02b27; + font-size: 1.2rem; + } + + .payment-method-label { + display: table; + vertical-align: middle; + + .payment-method-label-icon { + display: table-cell; + line-height: 0; + vertical-align: middle; + + img { + width: 46px; + } + } + + .payment-method-label-title { + display: table-cell; + padding-left: 10px; + vertical-align: middle; + } + } + + .checkout-payment-method { + .form { + margin-bottom: @indent__base; + } + + .payments { + .legend { + &:extend(.abs-add-clearfix all); + &:extend(.abs-visually-hidden-reset all); + } + } + } + + .payment-methods-off-input { + float: left; + margin-right: 10px; + } + + .payment-methods-off-option { + width: 40%; + display: inline-flex; + align-items: center; + margin: 0 0 1rem; + } + + .payment-methods-off-label { + display: flex; + align-items: center; + justify-content: flex-start; + padding-left: 8px; + } + + .payment-methods-off-logo-container { + width: 60px; + height: 40px; + display: flex; + align-items: center; + justify-content: center; + background: #fff; + border: 1px solid #e5e5e5; + box-sizing: border-box; + border-radius: 4px; + padding: 4px; + } + + .payment-methods-off-logo-image { + width: auto; + height: auto; + max-width: 100%; + max-height: 100% !important; + position: inherit !important; + float: none !important; + margin: 0 !important; + font-size: 10px; + text-overflow: ellipsis; + overflow: hidden; + } + + .legend { + .credit-card-types { + .item { + display: inline-flex; + list-style: none; + margin: 0; + text-align: right; + vertical-align: top; + + img { + -webkit-filter: grayscale(0%); + filter: grayscale(0%); + width: 20px; + } + } + } + } + + .field-to-pay { + margin: 0 @indent__s; + + &._hidden { + &:extend(.abs-visually-hidden all); + } + } + + .fieldset { + &.fieldset-ajust-margin-bottom { + margin-bottom: @indent__base; + } + + &.payment-mercadopago { + border: 1px solid; + border-color: @color-gray-light2; + + /* stylelint-disable-next-line CssSyntaxError */ + .lib-css(background-color, @color-white); + .lib-css(border-radius, @mercadopago-checkout__border-radius); + .lib-css(padding-bottom, @indent__s); + + .legend { + align-items: center; + display: flex; + flex-direction: row; + justify-content: space-between; + &:extend(.abs-visually-hidden-reset all); + + border-top-left-radius: 4px; + border-top-right-radius: 4px; + border-bottom: 1px solid; + border-color: @color-gray-light2; + padding: 10px 20px; + background-color: @color-gray-light01; + width: 100%; + + &-icon { + margin-right: 0; + text-align: right; + } + } + + .not-editable-title { + padding: @indent__base; + text-align: center; + .lib-heading(h3); + } + + } + + .field { + &.choice { + margin-bottom: @indent__base; + } + + &.mercadopago-input-group { + box-sizing: border-box; + display: inline-block; + margin-bottom: @indent__base; + position: relative; + vertical-align: top; + width: 100%; + + .control { + + input[type='text'], + input[type='password'], + input[type='url'], + input[type='tel'], + input[type='search'], + input[type='number'], + input[type='datetime'], + input[type='email'], + select { + height: unset; + padding: @label_floating-padding-y @label_floating-padding-x; + width: 100%; + } + + input::placeholder { + color: transparent; + } + + input::-webkit-input-placeholder { + color: transparent; + } + + input::-ms-input-placeholder { + color: transparent; + } + + input::-moz-placeholder { + color: transparent; + } + + .label { + display: block; + font-weight: normal; + margin-bottom: 0; + overflow: hidden; + padding: @label_floating-padding-y @label_floating-padding-x; + pointer-events: none; + position: absolute; + text-overflow: ellipsis; + top: 0; + transition: all .1s ease-in-out; + white-space: nowrap; + width: 80%; + } + + select:not(:checked), + input:not(:placeholder-shown) { + padding-bottom: calc(@label_floating-padding-y / 3) !important; + padding-top: calc(@label_floating-padding-y + @label_floating-padding-y * (2 / 3)) !important; + } + + select:not(:checked)~.label, + input:not(:placeholder-shown)~.label { + font-size: 10px; + padding-bottom: calc(@label_floating-padding-y/3) !important; + padding-top: calc(@label_floating-padding-y/3) !important; + } + } + } + + &.document-number { + float: right; + padding-left: 10px; + width: 70%; + } + + &.document-type { + float: left; + width: 30%; + } + + &.number { + float: left; + width: 70%; + + .credit-card-types { + + .item { + &._hidden { + &:extend(.abs-visually-hidden all); + } + + &._active { + line-height: 2; + } + + img { + -webkit-filter: unset; // For Webkit browsers + -webkit-transition: all .6s ease; // Fade to color for Chrome and Safari + filter: unset; + margin-right: 10px; + transition: all .6s ease; + width: 32px; + } + } + } + } + + &.cvv { + float: right; + padding-left: 10px; + width: 30%; + + input { + padding-right: 20px; + } + } + + &.date { + margin-bottom: 0; + + .group-2 { + display: inline-flex; + width: 100%; + + .month { + padding-left: 0; + } + + .year { + padding-left: 10px; + padding-right: 0; + } + } + } + + &.first-payment-amount { + .ui-slider-horizontal { + border-radius: 0; + } + } + } + } + + .details-payment-amount { + align-items: center; + display: flex; + flex-direction: row; + justify-content: space-between; + padding-left: @indent__s; + padding-right: @indent__s; + + h4 { + margin-top: 0; + } + } + + .first-payment-amount { + margin-top: @indent__base; + } + } + + .checkout-onepage-success { + .mercadopago-payment-success-details { + text-align: left; + margin-top: 20px; + } + + .mercadopago-input-group { + position: relative; + } + + .field .control._with-tooltip { + input { + margin-right: 0; + padding-right: @indent__xl; + width: 100%; + } + + button { + margin-top: -1px; + } + } + + a { + margin-top: 5px; + } + + .field { + &.mercadopago-input-group { + max-width: 500px; + } + } + + .mercadopago-payment-success-details-two-cc { + padding-top: 15px; + + span { + padding-left: 5px; + padding-right: 5px; + } + + .title { + width: 330px; + height: 66px; + + font-family: 'Open Sans'; + font-style: normal; + font-weight: 400; + font-size: 24px; + line-height: 33px; + + color: #333333; + } + } + + .mercadopago-payment-logo { + flex-basis: 15%; + background: url('../images/core/logo.svg') no-repeat center center; + -webkit-background-size: contain; + -moz-background-size: contain; + -o-background-size: contain; + background-size: contain; + width: 96.89px; + height: 24.46px; + padding-bottom: 15px; + } + } + + .mercadopago-instruction { + .instruction-information { + margin-bottom: @indent__s; + } + } + + .full-checkout { + .checkout-payment-method { + .payment-method-content { + + /** + * @codingStandardsIgnoreStart + */ + .fieldset:not(:last-child) { + &.fieldset-ajust-margin-bottom { + margin-bottom: @indent__base; + } + } + + // @codingStandardsIgnoreEnd + } + } + } + +} + +// +// Desktop +// _____________________________________________ + +.media-width(@extremum, @break) when (@extremum ='min') and (@break =@screen__m) { + + .form-mercadopago { + .legend { + .credit-card-types { + .item { + img { + width: 32px; + } + } + } + } + } +} diff --git a/view/frontend/web/css/source/twocc.less b/view/frontend/web/css/source/twocc.less new file mode 100644 index 0000000..44db362 --- /dev/null +++ b/view/frontend/web/css/source/twocc.less @@ -0,0 +1,256 @@ +.payment-method-content .payment-method-title.mercadopago-header-twocc { + box-sizing: border-box; + padding-left: 16px; + border-radius: 4px; + background: #F5F5F5; +} + +.mp-display-form { + visibility: hidden; + height: 0; +} + +.mp-twocc-card-header { + display: inline-flex; + width: 100%; + padding: 20px 16px; + box-sizing: border-box; + border-top: 1px solid #BFBFBF; + border-left: 1px solid #BFBFBF; + border-right: 1px solid #BFBFBF; + border-bottom: 1px solid #BFBFBF; + border-radius: 4px; + background: #F5F5F5; +} + +.open { + border-bottom: 0; + border-radius: 4px 4px 0 0; +} + +.mp-twocc-legend { + align-items: center; + display: flex; + flex-direction: row; + justify-content: space-between; + border-top-left-radius: 4px; + border-top-right-radius: 4px; + background-color: #FFFFFF; + padding: 10px 10px; + box-sizing: border-box; + width: 100%; + + .credit-card-types { + .item { + display: inline-flex; + list-style: none; + margin: 0; + text-align: right; + vertical-align: top; + + img { + -webkit-filter: grayscale(0%); + filter: grayscale(0%); + width: 32px; + } + } + } +} + +.mp-twocc-form { + border-left: 1px solid #BFBFBF; + border-right: 1px solid #BFBFBF; + border-bottom: 1px solid #BFBFBF; + border-radius: 0px 0px 4px 4px; +} + +.mp-twocc-badge-info { + width: 100%; + box-sizing: border-box; + display: inline-flex; + flex-direction: row; + justify-content: start; + padding: 0px; + height: 70px; + padding: 15px 16px; + border-radius: 4px; + border: 1px solid #BFBFBF; + margin-bottom: 16px; +} + +.payment-method-content { + .mp-twocc-badge-info { + .mp-twocc-badge-circle { + width: 40px; + height: 40px; + box-sizing: border-box; + background: #FFFFFF; + border: 1px solid rgba(0, 0, 0, 0.07); + border-radius: 50%; + + display: flex; + justify-content: center; + align-items: center; + overflow: hidden; + + img { + width: 23px; + margin: 0 auto; + } + } + } +} + +.mp-twocc-badge-info { + .mp-twocc-badge-card-installments { + display: inline-flex; + flex-direction: column; + align-items: flex-start; + font-family: 'Open Sans'; + font-style: normal; + font-weight: 400; + padding-left: 16px; + } + +} + +.mp-twocc-badge-info { + .mp-twocc-badge-card-installments { + .mp-twocc-badge-card { + font-size: 16px; + line-height: 20px; + color: rgba(0, 0, 0, 0.9); + display: flex; + align-items: center; + + } + + .mp-twocc-badge-installments { + font-weight: 400; + font-size: 12px; + line-height: 20px; + display: flex; + align-items: center; + color: rgba(0, 0, 0, 0.55); + + } + + } +} + +.mp-twocc-badge-info { + .mp-twocc-badge-adjustment { + width: 100%; + display: flex; + flex-direction: row; + justify-content: space-between; + } +} + +.mp-twocc-badge-info { + .mp-twocc-badge-adjustment { + .mp-twocc-badge-edit { + display: flex; + flex-direction: row; + align-items: center; + justify-content: flex-start; + cursor: pointer; + } + + .mp-twocc-edit-img { + margin: 4px; + } + + } +} + +.mp-twocc-form { + .fieldset:last-child { + margin-bottom: 0; + } +} + +.form-mercadopago { + .mp-twocc-form { + .fieldset.mp-twocc { + padding-bottom: 0; + border: 1px solid; + border-color: #bbb; + background-color: #fff; + border-radius: 3px; + padding-bottom: 10px; + } + } +} + +.payment-method-label-subtitle-amount { + display: block; + font-size: 12px; + color: rgba(0, 0, 0, 0.55); +} + +.mp-twocc-amount-selector { + display: flex; + border: 1px solid rgba(0, 0, 0, 0.25); + border-radius: 6px; + margin-bottom: 10px; + padding: 0; + width: 324px; + box-sizing: border-box; + + >div { + padding: 15px 0 15px 15px; + } + + input { + border: none !important; + padding: 15px !important; + margin: 0 !important; + height: auto !important; + background: transparent; + + &:focus { + outline: none; + border-color: inherit; + -webkit-box-shadow: none; + box-shadow: none; + } + } +} + +.payment-method { + .payment-method-label { + .payment-method-label-icon.mp-icon-background { + display: flex; + align-items: center; + justify-content: center; + background: #FFFFFF; + height: 40px; + width: 40px; + border-radius: 100px; + box-sizing: border-box; + margin-left: 11px; + margin-right: 6px; + + .mp-icon-twocc { + display: flex; + margin: 4px; + } + } + } +} + +.payment-method { + .payment-method-content { + .actions-toolbar { + .mp-flex-baseline { + display: flex; + align-items: baseline; + + .mp-mr-20 { + margin-right: 20px; + } + } + } + } +} diff --git a/view/frontend/web/js/action/checkout/set-finance-cost.js b/view/frontend/web/js/action/checkout/set-finance-cost.js new file mode 100644 index 0000000..ecc49df --- /dev/null +++ b/view/frontend/web/js/action/checkout/set-finance-cost.js @@ -0,0 +1,124 @@ +/* eslint-disable max-len */ +/** + * Copyright © MercadoPago. All rights reserved. + * + * @author Mercado Pago + * @license See LICENSE for license details. + */ + + define([ + 'underscore', + 'jquery', + 'Magento_Checkout/js/action/get-totals', + 'Magento_Checkout/js/model/error-processor', + 'Magento_Checkout/js/model/quote', + 'Magento_Checkout/js/model/totals', + 'Magento_Checkout/js/model/url-builder', + 'Magento_Customer/js/model/customer', + 'mage/url' +], function ( + _, + $, + getTotalsAction, + errorProcessor, + quote, + totals, + urlBuilder, + customer, + urlFormatter +) { + 'use strict'; + + return { + + /** + * Add Finance Cost in totals + * @param {String} selectInstallment + * @param {Object} rulesForFinanceCost + * @returns {void} + */ + financeCost( + selectInstallment, + rulesForFinanceCost, + cardIndex, + paymentMethod, + onFinanceCostDefined, + ) { + var serviceUrl, + payload, + financeCostAmount = 0, + quoteId = quote.getQuoteId(), + sendRulesForFinanceCost = { + installments: 0, + installment_rate: 0, + discount_rate: 0, + reimbursement_rate: false, + total_amount: 0, + card_amount: 0, + card_index: 0, + payment_method: paymentMethod + }; + + if (totals && totals.getSegment('finance_cost_amount')) { + financeCostAmount = totals.getSegment('finance_cost_amount').value; + } + + if (!financeCostAmount && !selectInstallment) { + return; + } + + _.map(rulesForFinanceCost, (keys) => { + if (keys.installments === selectInstallment) { + sendRulesForFinanceCost = { + installments: keys.installments, + installment_rate: keys.installment_rate, + discount_rate: keys.discount_rate, + reimbursement_rate: keys.reimbursement_rate, + total_amount: keys.total_amount, + card_amount: rulesForFinanceCost[0].total_amount, + card_index: cardIndex, + payment_method: paymentMethod + }; + } + }); + + if (!customer.isLoggedIn()) { + serviceUrl = urlBuilder.createUrl('/guest-carts/:cartId/mp-set-finance-cost', { + cartId: quoteId + }); + } else { + serviceUrl = urlBuilder.createUrl('/carts/mine/mp-set-finance-cost', {}); + } + + payload = { + cartId: quoteId, + userSelect: { + selected_installment: selectInstallment + }, + rules: sendRulesForFinanceCost + }; + + if (payload.rules.card_amount != payload.rules.total_amount && typeof onFinanceCostDefined === 'function') { + onFinanceCostDefined(payload.rules.total_amount - payload.rules.card_amount); + } + + $.ajax({ + url: urlFormatter.build(serviceUrl), + data: JSON.stringify(payload), + global: false, + contentType: 'application/json', + type: 'POST', + async: true + }).done( + () => { + var deferred = $.Deferred(); + getTotalsAction([], deferred); + } + ).fail( + (response) => { + errorProcessor.process(response); + } + ); + } + }; +}); diff --git a/view/frontend/web/js/view/cart/summary/finance_cost.js b/view/frontend/web/js/view/cart/summary/finance_cost.js new file mode 100644 index 0000000..b77314b --- /dev/null +++ b/view/frontend/web/js/view/cart/summary/finance_cost.js @@ -0,0 +1,79 @@ +/** + * Copyright © MercadoPago. All rights reserved. + * + * @author Mercado Pago + * @license See LICENSE for license details. + */ + + define( + [ + 'Magento_Checkout/js/view/summary/abstract-total', + 'Magento_Checkout/js/model/quote', + 'Magento_Catalog/js/price-utils', + 'Magento_Checkout/js/model/totals', + 'mage/translate' + ], + function (Component, quote, priceUtils, totals, $t) { + 'use strict'; + + return Component.extend({ + defaults: { + template: 'MercadoPago_AdbPayment/cart/summary/finance_cost', + active: false + }, + totals: quote.getTotals(), + + /** + * Init observable variables + * + * @return {Object} + */ + initObservable() { + this._super().observe(['active']); + return this; + }, + + /** + * Is Active + * @return {*|Boolean} + */ + isActive() { + return this.getPureValue() !== 0; + }, + + /** + * Get Pure Value + * @return {*} + */ + getPureValue() { + var financeCost = 0; + + if (this.totals() && totals.getSegment('finance_cost_amount')) { + financeCost = totals.getSegment('finance_cost_amount').value; + return financeCost; + } + + return financeCost; + }, + + /** + * Custon Title + * @return {*|String} + */ + customTitle() { + if (this.getPureValue() > 0) { + return $t('Finance Cost'); + } + return $t('Discount for payment at sight'); + }, + + /** + * Get Value + * @return {*|String} + */ + getValue() { + return this.getFormattedPrice(this.getPureValue()); + } + }); + } +); diff --git a/view/frontend/web/js/view/cart/totals/finance_cost.js b/view/frontend/web/js/view/cart/totals/finance_cost.js new file mode 100644 index 0000000..4c027a5 --- /dev/null +++ b/view/frontend/web/js/view/cart/totals/finance_cost.js @@ -0,0 +1,26 @@ +/** + * Copyright © MercadoPago. All rights reserved. + * + * @author Mercado Pago + * @license See LICENSE for license details. + */ + +define( + [ + 'MercadoPago_AdbPayment/js/view/cart/summary/finance_cost' + ], + function (Component) { + 'use strict'; + + return Component.extend({ + /** + * @override + * + * @returns {boolean} + */ + isDisplayed() { + return this.getPureValue() !== 0; + } + }); + } +); diff --git a/view/frontend/web/js/view/checkout/cart/summary/finance_cost.js b/view/frontend/web/js/view/checkout/cart/summary/finance_cost.js new file mode 100644 index 0000000..3a998a1 --- /dev/null +++ b/view/frontend/web/js/view/checkout/cart/summary/finance_cost.js @@ -0,0 +1,79 @@ +/** + * Copyright © MercadoPago. All rights reserved. + * + * @author Mercado Pago + * @license See LICENSE for license details. + */ + + define( + [ + 'Magento_Checkout/js/view/summary/abstract-total', + 'Magento_Checkout/js/model/quote', + 'Magento_Catalog/js/price-utils', + 'Magento_Checkout/js/model/totals', + 'mage/translate' + ], + function (Component, quote, priceUtils, totals, $t) { + 'use strict'; + + return Component.extend({ + defaults: { + template: 'MercadoPago_AdbPayment/checkout/cart/summary/finance_cost', + active: false + }, + totals: quote.getTotals(), + + /** + * Init observable variables + * + * @return {Object} + */ + initObservable() { + this._super().observe(['active']); + return this; + }, + + /** + * Is Displayed + * @return {*|Boolean} + */ + isDisplayed() { + return this.getPureValue() !== 0; + }, + + /** + * Get Pure Value + * @return {*} + */ + getPureValue() { + var financeCost = 0; + + if (this.totals() && totals.getSegment('finance_cost_amount')) { + financeCost = totals.getSegment('finance_cost_amount').value; + return financeCost; + } + + return financeCost; + }, + + /** + * Custon Title + * @return {*|String} + */ + customTitle() { + if (this.getPureValue() > 0) { + return $t('Finance Cost'); + } + return $t('Discount for payment at sight'); + }, + + /** + * Get Value + * @return {*|String} + */ + getValue() { + return this.getFormattedPrice(this.getPureValue()); + } + }); + } +); diff --git a/view/frontend/web/js/view/checkout/cart/totals/finance_cost.js b/view/frontend/web/js/view/checkout/cart/totals/finance_cost.js new file mode 100644 index 0000000..7bbd7d3 --- /dev/null +++ b/view/frontend/web/js/view/checkout/cart/totals/finance_cost.js @@ -0,0 +1,26 @@ +/** + * Copyright © MercadoPago. All rights reserved. + * + * @author Mercado Pago + * @license See LICENSE for license details. + */ + +define( + [ + 'MercadoPago_AdbPayment/js/view/checkout/cart/summary/finance_cost' + ], + function (Component) { + 'use strict'; + + return Component.extend({ + /** + * @override + * + * @returns {boolean} + */ + isDisplayed() { + return this.getPureValue() !== 0; + } + }); + } +); diff --git a/view/frontend/web/js/view/checkout/sumary/finance_cost.js b/view/frontend/web/js/view/checkout/sumary/finance_cost.js new file mode 100644 index 0000000..bb4d5ec --- /dev/null +++ b/view/frontend/web/js/view/checkout/sumary/finance_cost.js @@ -0,0 +1,26 @@ +/** + * Copyright © MercadoPago. All rights reserved. + * + * @author Mercado Pago + * @license See LICENSE for license details. + */ + +define( + [ + 'MercadoPago_AdbPayment/checkout/summary/finance_cost' + ], + function (Component) { + 'use strict'; + + return Component.extend({ + /** + * @override + * + * @returns {boolean} + */ + isDisplayed() { + return this.getPureValue() !== 0; + } + }); + } +); diff --git a/view/frontend/web/js/view/payment/default.js b/view/frontend/web/js/view/payment/default.js new file mode 100644 index 0000000..e88aff6 --- /dev/null +++ b/view/frontend/web/js/view/payment/default.js @@ -0,0 +1,157 @@ +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ + +/* @api */ +define([ + 'underscore', + 'Magento_Checkout/js/view/payment/default', + 'Magento_Checkout/js/model/quote', +], function ( + _, + Component, + quote, +) { + 'use strict'; + + return Component.extend({ + defaults: { + mpPayerOptionsTypes: '', + mpPayerDocument: '', + mpPayerType: '', + }, + + /** @inheritdoc */ + initObservable: function () { + this._super() + .observe([ + 'mpPayerOptionsTypes', + 'mpPayerDocument', + 'mpPayerType', + ]); + return this; + }, + + initialize: function () { + const self = this; + + this._super(); + + self.active.subscribe((value) => { + if (value === true) { + self.getSelectDocumentTypes(); + } + }); + + self.mpPayerDocument.subscribe((value) => { + if (self.getMpSiteId() === 'MLB' && value) { + self.mpPayerType(value.replace(/\D/g, '').length <= 11 ? 'CPF' : 'CNPJ'); + } + }); + }, + + /** + * Get Select Document Types + * @returns {void} + */ + async getSelectDocumentTypes() { + const self = this; + + self.mpPayerOptionsTypes(await window.mp.getIdentificationTypes()); + + if (quote.billingAddress()) { + const vatId = quote.billingAddress().vatId; + if (vatId) { + self.mpPayerDocument(vatId); + } + } + }, + + /** + * Get logo + * @returns {String} + */ + getLogo() { + return window.checkoutConfig.payment[this.getCode()].logo; + }, + + /** + * Get title + * @returns {String} + */ + getTitle() { + return window.checkoutConfig.payment[this.getCode()].title; + }, + + /** + * Get Payment Id Method + * @returns {String} + */ + getPaymentIdMethod() { + return window.checkoutConfig.payment[this.getCode()].payment_method_id; + }, + + /** + * Get Expiration + * @returns {String} + */ + getExpiration() { + return window.checkoutConfig.payment[this.getCode()].expiration; + }, + + /** + * Get Mp Site Id + * @returns {String} + */ + getMpSiteId() { + return window.checkoutConfig.payment['mercadopago_adbpayment'].mp_site_id; + }, + + /** + * Is document identification capture + * @returns {Boolean} + */ + DocumentIdentificationCapture() { + + if (this.getMpSiteId() === 'MLM') { + return false; + } + + if (this.getMpSiteId() !== 'MLB') { + return true; + } + + if (!quote.billingAddress()) { + return window.checkoutConfig.payment[this.getCode()].document_identification_capture; + } + + if (!quote.billingAddress().vatId) { + return true; + } + + return window.checkoutConfig.payment[this.getCode()].document_identification_capture; + }, + + /** + * Get Validation For Document. + * @returns {Array} + */ + getValidationForDocument() { + let self = this, + mpSiteId = self.getMpSiteId(); + + if (mpSiteId === 'MLB') { + return { + 'required': true, + 'mp-validate-document-identification': '#' + self.getCode() + '_document_identification' + }; + } + return {'required': true}; + }, + + formatPrice(amount) { + return Number(Math.round(Math.abs(+amount || 0) + 'e+' + 2) + ('e-' + 2)); + }, + }); +}); diff --git a/view/frontend/web/js/view/payment/initMPCheckout.js b/view/frontend/web/js/view/payment/initMPCheckout.js new file mode 100644 index 0000000..25b08c2 --- /dev/null +++ b/view/frontend/web/js/view/payment/initMPCheckout.js @@ -0,0 +1,16 @@ +/** + * Copyright © MercadoPago. All rights reserved. + * + * @author Mercado Pago + * @license See LICENSE for license details. + */ + +define([ + 'MercadoPagoSDKJs' +], function () { + 'use strict'; + // eslint-disable-next-line no-undef + window.mp = new MercadoPago(window.checkoutConfig.payment['mercadopago_adbpayment'].public_key, { + locale: window.checkoutConfig.payment['mercadopago_adbpayment'].locale + }); +}); diff --git a/view/frontend/web/js/view/payment/mercadopago.js b/view/frontend/web/js/view/payment/mercadopago.js new file mode 100644 index 0000000..417603f --- /dev/null +++ b/view/frontend/web/js/view/payment/mercadopago.js @@ -0,0 +1,104 @@ +/** + * Copyright © MercadoPago. All rights reserved. + * + * @author Mercado Pago + * @license See LICENSE for license details. + */ +define( + [ + 'initMPCheckout', + 'uiComponent', + 'Magento_Checkout/js/model/payment/renderer-list' + ], + function ( + _initMPCheckout, + Component, + rendererList + ) { + 'use strict'; + var config = window.checkoutConfig.payment, + methodCheckoutPro = 'mercadopago_adbpayment_checkout_pro', + methodCc = 'mercadopago_adbpayment_cc', + methodPec = 'mercadopago_adbpayment_pec', + methodPix = 'mercadopago_adbpayment_pix', + methodPse = 'mercadopago_adbpayment_pse', + methodWebpay = 'mercadopago_adbpayment_webpay', + methodsOff = 'mercadopago_adbpayment_payment_methods_off', + methodTwoCc = 'mercadopago_adbpayment_twocc'; + + + if (methodsOff in config) { + rendererList.push( + { + type: methodsOff, + component: 'MercadoPago_AdbPayment/js/view/payment/method-renderer/payment_methods_off' + } + ); + } + + if (methodCheckoutPro in config) { + rendererList.push( + { + type: methodCheckoutPro, + component: 'MercadoPago_AdbPayment/js/view/payment/method-renderer/checkout_pro' + } + ); + } + + if (methodCc in config) { + rendererList.push( + { + type: methodCc, + component: 'MercadoPago_AdbPayment/js/view/payment/method-renderer/cc' + } + ); + } + + if (methodPec in config) { + rendererList.push( + { + type: methodPec, + component: 'MercadoPago_AdbPayment/js/view/payment/method-renderer/pec' + } + ); + } + + if (methodPix in config) { + rendererList.push( + { + type: methodPix, + component: 'MercadoPago_AdbPayment/js/view/payment/method-renderer/pix' + } + ); + } + + if (methodPse in config) { + rendererList.push( + { + type: methodPse, + component: 'MercadoPago_AdbPayment/js/view/payment/method-renderer/pse' + } + ); + } + + if (methodWebpay in config) { + rendererList.push( + { + type: methodWebpay, + component: 'MercadoPago_AdbPayment/js/view/payment/method-renderer/webpay' + } + ); + } + + if (methodTwoCc in config) { + rendererList.push( + { + type: methodTwoCc, + component: 'MercadoPago_AdbPayment/js/view/payment/method-renderer/twocc' + } + ); + } + + return Component.extend({}); + } +); diff --git a/view/frontend/web/js/view/payment/method-renderer/cc.js b/view/frontend/web/js/view/payment/method-renderer/cc.js new file mode 100644 index 0000000..8a4f7c0 --- /dev/null +++ b/view/frontend/web/js/view/payment/method-renderer/cc.js @@ -0,0 +1,235 @@ +/* eslint-disable max-len */ +/** + * Copyright © MercadoPago. All rights reserved. + * + * @author Mercado Pago + * @license See LICENSE for license details. + */ + +define([ + 'underscore', + 'jquery', + 'Magento_Checkout/js/model/full-screen-loader', + 'Magento_Checkout/js/model/quote', + 'Magento_Checkout/js/model/totals', + 'Magento_Checkout/js/model/url-builder', + 'MercadoPago_AdbPayment/js/view/payment/mp-sdk', + 'Magento_Vault/js/view/payment/vault-enabler', +], function ( + _, + $, + fullScreenLoader, + quote, + totals, + urlBuilder, + Component, + VaultEnabler, + ) { + 'use strict'; + return Component.extend({ + + totals: quote.getTotals(), + + defaults: { + active: false, + template: 'MercadoPago_AdbPayment/payment/cc', + ccForm: 'MercadoPago_AdbPayment/payment/cc-form', + securityField: 'MercadoPago_AdbPayment/payment/security-field', + amount: '', + installmentTextInfo: false, + installmentTextTEA: null, + installmentTextCFT: null, + isLoading: true, + fieldCcNumber: 'mercadopago_adbpayment_cc_number', + fieldSecurityCode: 'mercadopago_adbpayment_cc_cid', + fieldExpMonth: 'mercadopago_adbpayment_cc_expiration_month', + fieldExpYear: 'mercadopago_adbpayment_cc_expiration_yr', + }, + + /** + * Get code + * @returns {String} + */ + getCode() { + return 'mercadopago_adbpayment_cc'; + }, + + /** + * Initializes model instance observable. + * + * @returns {Object} + */ + initObservable() { + this._super().observe([ + 'active', + 'amount', + 'isLoading', + 'installmentTextInfo', + 'installmentTextTEA', + 'installmentTextCFT' + ]); + return this; + }, + + /** + * Init component + */ + initialize() { + let self = this; + + this._super(); + + this.vaultEnabler = new VaultEnabler(); + + this.vaultEnabler.setPaymentCode(this.getVaultCode()); + + if (quote.billingAddress()) { + self.mpPayerDocument(quote.billingAddress().vatId); + } + + self.amount(quote.totals().base_grand_total); + + self.active.subscribe((value) => { + if (value === true) { + self.getSelectDocumentTypes(); + self.getInstallments(); + + setTimeout(() => { + self.mountCardForm({ + fieldCcNumber: self.fieldCcNumber, + fieldSecurityCode: self.fieldSecurityCode, + fieldExpMonth: self.fieldExpMonth, + fieldExpYear: self.fieldExpYear, + }); + self.isLoading(false); + }, 3000); + } + + if (value === false) { + self.isLoading(true); + } + }); + + quote.totals.subscribe((value) => { + var financeCostAmount = 0; + + if (this.totals() && totals.getSegment('finance_cost_amount')) { + financeCostAmount = totals.getSegment('finance_cost_amount').value; + } + + self.amount(self.formatPrice(value.base_grand_total - financeCostAmount)); + }); + + self.amount.subscribe((value) => { + self.getInstallments(); + }); + }, + + /** + * Is Active + * @returns {Boolean} + */ + isActive() { + var self = this, + active = self.getCode() === self.isChecked(); + + self.active(active); + + return active; + }, + + /** + * Init Form Element + * @returns {void} + */ + initFormElement(element) { + this.formElement = element; + $(this.formElement).validation(); + }, + + /** + * Before Place Order + * @returns {void} + */ + async beforePlaceOrder() { + if (!$(this.formElement).valid()) { + return; + } + if (await this.generateToken(0)) { + this.placeOrder(); + } + }, + + /** + * Get data + * @returns {Object} + */ + getData() { + var self = this, + data; + + data = { + 'method': this.getCode(), + 'additional_data': { + 'payer_document_type': self.generatedCards[0]?.documentType, + 'payer_document_identification': self.generatedCards[0]?.documentValue, + 'card_number_token': self.generatedCards[0]?.token.id, + 'card_holder_name': self.generatedCards[0]?.holderName, + 'card_number': self.generatedCards[0]?.cardNumber, + 'card_exp_month': self.generatedCards[0]?.cardExpirationMonth, + 'card_exp_year': self.generatedCards[0]?.cardExpirationYear, + 'card_type': self.generatedCards[0]?.cardType, + 'card_installments': self.generatedCards[0]?.cardInstallment, + 'card_finance_cost': self.generatedCards[0]?.cardFinanceCost, + 'card_public_id': self.generatedCards[0]?.cardPublicId, + 'mp_user_id': self.generatedCards[0]?.mpUserId, + } + }; + + data['additional_data'] = _.extend(data['additional_data'], this.additionalData); + this.vaultEnabler.visitAdditionalData(data); + + return data; + }, + + /** + * Is show legend + * @returns {Boolean} + */ + isShowLegend() { + return true; + }, + + /** + * Get Cc Type + * @returns {Object} + */ + getCcType() { + return window.checkoutConfig.payment[this.getCode()].ccTypesMapper; + }, + + /** + * Get Unsupported Pre Auth + * @returns {Object} + */ + getUnsupportedPreAuth() { + return window.checkoutConfig.payment[this.getCode()].unsupported_pre_auth; + }, + + /** + * Get Vault Code + * @returns {Boolean} + */ + getVaultCode() { + return window.checkoutConfig.payment[this.getCode()].ccVaultCode; + }, + + /** + * Is Vault enabled + * @returns {Boolean} + */ + isVaultEnabled: function () { + return this.vaultEnabler.isVaultEnabled(); + } + }); +}); diff --git a/view/frontend/web/js/view/payment/method-renderer/checkout_pro.js b/view/frontend/web/js/view/payment/method-renderer/checkout_pro.js new file mode 100644 index 0000000..d284bc7 --- /dev/null +++ b/view/frontend/web/js/view/payment/method-renderer/checkout_pro.js @@ -0,0 +1,180 @@ +/** + * Copyright © MercadoPago. All rights reserved. + * + * @author Mercado Pago + * @license See LICENSE for license details. + */ + +define([ + 'underscore', + 'jquery', + 'Magento_Checkout/js/model/url-builder', + 'MercadoPago_AdbPayment/js/view/payment/default', + 'mage/storage', + 'observerCheckoutPro' +], function ( + _, + $, + urlBuilder, + Component, + storage +) { + 'use strict'; + + return Component.extend({ + redirectAfterPlaceOrder: true, + defaults: { + active: false, + template: 'MercadoPago_AdbPayment/payment/checkout-pro', + checkoutProForm: 'MercadoPago_AdbPayment/payment/checkout-pro-form' + }, + + /** + * Initializes model instance. + * + * @returns {Object} + */ + initObservable() { + this._super().observe(['active']); + return this; + }, + + /** + * Get code + * @returns {String} + */ + getCode() { + return 'mercadopago_adbpayment_checkout_pro'; + }, + + /** + * Init component + */ + initialize() { + this._super(); + }, + + /** + * Is Active + * @returns {Boolean} + */ + isActive() { + var active = this.getCode() === this.isChecked(); + + this.active(active); + return active; + }, + + /** + * Init Form Element + * @returns {void} + */ + initFormElement(element) { + this.formElement = element; + $(this.formElement).validation(); + }, + + /** + * Before Place Order + * @returns {void} + */ + beforePlaceOrder() { + if (!$(this.formElement).valid()) { + return; + } + this.placeOrder(); + }, + + /** + * Place order. + */ + placeOrder: function (data, event) { + var self = this, + serviceUrl; + + if (event) { + event.preventDefault(); + } + + if ( + this.isPlaceOrderActionAllowed() === true + ) { + this.isPlaceOrderActionAllowed(false); + + this.getPlaceOrderDeferredObject() + .done( + function (res) { + serviceUrl = urlBuilder.createUrl('/orders/:orderId/mp-payment-information', { + orderId: res + }); + + storage.get( + serviceUrl, false + ).done(function (response) { + if (self.getTypeRedirect() === 'modal') { + window.mp.checkout({ + 'preference': { + 'id': response[0].id + }, + 'theme': self.getTheme(), + 'autoOpen': true + }); + } + if (self.getTypeRedirect() === 'redirect') { + window.location.href = response[0].init_point; + } + }); + + self.afterPlaceOrder(); + } + ); + + return true; + } + + return false; + }, + + /** + * Get data + * @returns {Object} + */ + getData() { + return { + method: this.getCode() + }; + }, + + /** + * Get Type Redirect + * @returns {string} + */ + getTypeRedirect() { + return window.checkoutConfig.payment[this.getCode()].type_redirect; + }, + + /** + * Get Theme + * @returns {string} + */ + getTheme() { + return window.checkoutConfig.payment[this.getCode()].theme; + }, + + /** + * Get instruction checkout + * @returns {string} + */ + getInstructionCheckout() { + return window.checkoutConfig.payment[this.getCode()].instruction_checkout; + }, + + /** + * Adds terms and conditions link to checkout + * @returns {string} + */ + getFingerprint() { + return window.checkoutConfig.payment[this.getCode()].fingerprint; + }, + }); +}); diff --git a/view/frontend/web/js/view/payment/method-renderer/payment_methods_off.js b/view/frontend/web/js/view/payment/method-renderer/payment_methods_off.js new file mode 100644 index 0000000..71018b7 --- /dev/null +++ b/view/frontend/web/js/view/payment/method-renderer/payment_methods_off.js @@ -0,0 +1,162 @@ + +define([ + 'underscore', + 'jquery', + 'MercadoPago_AdbPayment/js/view/payment/default' +], function ( + _, + $, + Component +) { + 'use strict'; + + return Component.extend({ + defaults: { + active: false, + template: 'MercadoPago_AdbPayment/payment/payment-methods-off', + paymentMethodsOffForm: 'MercadoPago_AdbPayment/payment/payment-methods-off-form', + payerFirstName: '', + payerLastName: '', + paymentMethodsOff: [] + }, + + /** + * Initializes model instance. + * + * @returns {Object} + */ + initObservable() { + this._super().observe([ + 'active', + 'payerFirstName', + 'payerLastName' + ]); + return this; + }, + + /** + * Get code + * @returns {String} + */ + getCode() { + return 'mercadopago_adbpayment_payment_methods_off'; + }, + + /** + * Init component + */ + initialize() { + this._super(); + + this.loadPaymentMethodsOffActive(); + }, + + /** + * Is Active + * @returns {Boolean} + */ + isActive() { + var active = this.getCode() === this.isChecked(); + + this.active(active); + return active; + }, + + /** + * Init Form Element + * @returns {void} + */ + initFormElement(element) { + this.formElement = element; + $(this.formElement).validation(); + }, + + /** + * Before Place Order + * @returns {void} + */ + beforePlaceOrder() { + if (!$(this.formElement).valid()) { + return; + } + this.placeOrder(); + }, + + getPaymentSelected: function () { + if ( this.getCountPaymentMethodsOffActive() === 1) { + var input = document.getElementsByName("payment[payment_methods_off]")[0]; + return { + "payment_method_id": input.getAttribute("payment_method_id"), + "payment_type_id": input.getAttribute("payment_type_id"), + "payment_option_id": input.getAttribute("payment_option_id") + }; + } + + var element = document.querySelector('input[name="payment[payment_methods_off]"]:checked'); + + if (this.getCountPaymentMethodsOffActive() > 1 && element) { + return { + "payment_method_id": element.getAttribute("payment_method_id"), + "payment_type_id": element.getAttribute("payment_type_id"), + "payment_option_id": element.getAttribute("payment_option_id") + }; + } else { + return false; + } + }, + + /** + * Get data + * @returns {Object} + */ + getData() { + let self = this; + + var payment_method_data = this.getPaymentSelected(); + + return { + method: self.getCode(), + 'additional_data': { + 'payment_method_id': payment_method_data.payment_method_id, + 'payment_type_id': payment_method_data.payment_type_id, + 'payment_option_id': payment_method_data.payment_option_id, + 'payer_first_name': self.payerFirstName(), + 'payer_last_name': self.payerLastName(), + 'payer_document_type': self.mpPayerType(), + 'payer_document_identification': self.mpPayerDocument() + } + }; + }, + + /** + * Is name capture + * @returns {boolean} + */ + NameCapture() { + return window.checkoutConfig.payment[this.getCode()].name_capture; + }, + + /** + * Load Payment Methods Off Active + */ + loadPaymentMethodsOffActive() { + this.paymentMethodsOff = window.checkoutConfig.payment[this.getCode()].payment_methods_off_active; + }, + + getCountPaymentMethodsOffActive() { + return this.paymentMethodsOff.length; + }, + + getPaymentMethodsOff() { + return this.paymentMethodsOff; + }, + + /** + * Adds terms and conditions link to checkout + * @returns {string} + */ + getFingerprint() { + return window.checkoutConfig.payment[this.getCode()].fingerprint; + }, + }); +}); diff --git a/view/frontend/web/js/view/payment/method-renderer/pix.js b/view/frontend/web/js/view/payment/method-renderer/pix.js new file mode 100644 index 0000000..37af1e2 --- /dev/null +++ b/view/frontend/web/js/view/payment/method-renderer/pix.js @@ -0,0 +1,120 @@ +/** + * Copyright © MercadoPago. All rights reserved. + * + * @author Mercado Pago + * @license See LICENSE for license details. + */ + +define([ + 'underscore', + 'jquery', + 'MercadoPago_AdbPayment/js/view/payment/default', +], function ( + _, + $, + Component +) { + 'use strict'; + + return Component.extend({ + defaults: { + active: false, + template: 'MercadoPago_AdbPayment/payment/pix', + pixForm: 'MercadoPago_AdbPayment/payment/pix-form', + pixData: null, + payerDocumentType: '', + pixDocumentTypes: '', + payerDocumentIdentification: null + }, + + /** + * Initializes model instance. + * + * @returns {Object} + */ + initObservable() { + this._super().observe([ + 'active' + ]); + return this; + }, + + /** + * Get code + * @returns {String} + */ + getCode() { + return 'mercadopago_adbpayment_pix'; + }, + + /** + * Init component + */ + initialize() { + this._super(); + }, + + /** + * Is Active + * @returns {Boolean} + */ + isActive() { + var active = this.getCode() === this.isChecked(); + + this.active(active); + return active; + }, + + /** + * Init Form Element + * @returns {void} + */ + initFormElement(element) { + this.formElement = element; + $(this.formElement).validation(); + }, + + /** + * Before Place Order + * @returns {void} + */ + beforePlaceOrder() { + if (!$(this.formElement).valid()) { + return; + } + this.placeOrder(); + }, + + /** + * Get data + * @returns {Object} + */ + getData() { + let self = this; + + return { + method: self.getCode(), + 'additional_data': { + 'payer_document_type': self.mpPayerType(), + 'payer_document_identification': self.mpPayerDocument() + } + }; + }, + + /** + * Get instruction checkout + * @returns {string} + */ + getInstructionCheckout() { + return window.checkoutConfig.payment[this.getCode()].instruction_checkout; + }, + + /** + * Adds terms and conditions link to checkout + * @returns {string} + */ + getFingerprint() { + return window.checkoutConfig.payment[this.getCode()].fingerprint; + }, + }); +}); diff --git a/view/frontend/web/js/view/payment/method-renderer/pse.js b/view/frontend/web/js/view/payment/method-renderer/pse.js new file mode 100644 index 0000000..3c635c5 --- /dev/null +++ b/view/frontend/web/js/view/payment/method-renderer/pse.js @@ -0,0 +1,143 @@ +/** + * Copyright © MercadoPago. All rights reserved. + * + * @author Mercado Pago + * @license See LICENSE for license details. + */ + +define([ + 'underscore', + 'jquery', + 'MercadoPago_AdbPayment/js/view/payment/default', +], function ( + _, + $, + Component, +) { + 'use strict'; + + return Component.extend({ + defaults: { + active: false, + template: 'MercadoPago_AdbPayment/payment/pse', + pseForm: 'MercadoPago_AdbPayment/payment/pse-form', + payerEntityType: '', + financialInstitution: '' + }, + + /** + * Initializes model instance. + * + * @returns {Object} + */ + initObservable() { + this._super().observe([ + 'active', + 'payerEntityType', + 'financialInstitution' + ]); + return this; + }, + + /** + * Get code + * @returns {String} + */ + getCode() { + return 'mercadopago_adbpayment_pse'; + }, + + /** + * Init component + */ + initialize() { + var self = this; + + this._super(); + + self.getSelectDocumentTypes(); + }, + + /** + * Get Select Entity Types + * @returns {Array} + */ + getSelectEntityTypes() { + return window.checkoutConfig.payment[this.getCode()].payer_entity_types; + }, + + /** + * Get Select Financial Institutions + * @returns {Array} + */ + getSelectFinancialInstitutions() { + return window.checkoutConfig.payment[this.getCode()].finance_inst_options; + }, + + /** + * Is Active + * @returns {Boolean} + */ + isActive() { + var active = this.getCode() === this.isChecked(); + + this.active(active); + return active; + }, + + /** + * Init Form Element + * @returns {void} + */ + initFormElement(element) { + this.formElement = element; + $(this.formElement).validation(); + }, + + /** + * Before Place Order + * @returns {void} + */ + beforePlaceOrder() { + if (!$(this.formElement).valid()) { + return; + } + this.placeOrder(); + }, + + /** + * Get data + * @returns {Object} + */ + getData() { + let self = this; + + return { + method: self.getCode(), + 'additional_data': { + 'payment_method_id': self.getPaymentIdMethod(), + 'payer_document_type': self.mpPayerType(), + 'payer_document_identification': self.mpPayerDocument(), + 'payer_entity_type': self.payerEntityType(), + 'financial_institution': self.financialInstitution() + } + }; + }, + + /** + * Get instruction checkout for Pse + * @returns {String} + */ + getInstructionCheckoutPse() { + return window.checkoutConfig.payment[this.getCode()].instruction_checkout_pse; + }, + + /** + * Adds terms and conditions link to checkout + * @returns {string} + */ + getFingerprint() { + return window.checkoutConfig.payment[this.getCode()].fingerprint; + }, + }); +}); diff --git a/view/frontend/web/js/view/payment/method-renderer/twocc.js b/view/frontend/web/js/view/payment/method-renderer/twocc.js new file mode 100644 index 0000000..9030702 --- /dev/null +++ b/view/frontend/web/js/view/payment/method-renderer/twocc.js @@ -0,0 +1,408 @@ +/* eslint-disable max-len */ +/** + * Copyright © MercadoPago. All rights reserved. + * + * @license See LICENSE for license details. + */ + +define([ + 'underscore', + 'jquery', + 'Magento_Checkout/js/model/quote', + 'Magento_Checkout/js/model/totals', + 'MercadoPago_AdbPayment/js/view/payment/mp-sdk', + 'Magento_Catalog/js/price-utils', + 'Magento_Checkout/js/model/payment/additional-validators', + 'MercadoPago_AdbPayment/js/view/payment/method-renderer/validate-form-security', + 'Magento_Checkout/js/action/redirect-on-success' +], function ( + _, + $, + quote, + totals, + Component, + priceUtils, + additionalValidators, + validateFormSecurity, + redirectOnSuccessAction, + ) { + 'use strict'; + return Component.extend({ + + totals: quote.getTotals(), + + defaults: { + active: false, + template: 'MercadoPago_AdbPayment/payment/twocc', + twoCcForm: 'MercadoPago_AdbPayment/payment/twocc-form', + securityField: 'MercadoPago_AdbPayment/payment/security-field', + installmentTextInfo: false, + installmentTextTEA: null, + installmentTextCFT: null, + isLoading: true, + inputValueProgress:'', + fieldCcNumber: 'mercadopago_adbpayment_twocc_number', + fieldSecurityCode: 'mercadopago_adbpayment_twocc_cid', + fieldExpMonth: 'mercadopago_adbpayment_twocc_expiration_month', + fieldExpYear: 'mercadopago_adbpayment_twocc_expiration_yr', + }, + + /** + * Get code + * @returns {String} + */ + getCode() { + return 'mercadopago_adbpayment_twocc'; + }, + + /** + * Initializes model instance observable. + * + * @returns {Object} + */ + initObservable() { + this._super().observe([ + 'active', + 'isLoading', + 'installmentTextInfo', + 'installmentTextTEA', + 'installmentTextCFT', + 'inputValueProgress', + ]); + return this; + }, + + /** + * Init component + */ + initialize() { + let self = this; + quote.paymentMethod.subscribe(function(method){self.resetFirstCard()}, null, 'change'); + this._super(); + + if (quote.billingAddress()) { + self.mpPayerDocument(quote.billingAddress().vatId); + } + + self.active.subscribe((value) => { + if (value === true) { + self.initForm(); + } + + if (value === false) { + self.isLoading(true); + } + }); + + quote.totals.subscribe((value) => { + var financeCostAmount = 0; + + if (this.totals() && totals.getSegment('finance_cost_amount')) { + financeCostAmount = totals.getSegment('finance_cost_amount').value; + } + + self.amount(this.FormattedCurrencyToInstallments(value.base_grand_total - financeCostAmount)); + }); + + self.inputValueProgress.subscribe((value) => { + self.installmentsAmount(value); + self.validateMinValue(value); + if (self.isSiteIdMCOorMLC() && value){ + var amount = parseFloat(value.toString().replace(/\D/g, '')); + self.installmentsAmount(amount); + self.inputValueProgress(amount); + } + }); + + self.installmentsAmount.subscribe((value) => { + self.getInstallments(); + }); + + const am = Math.floor(self.amount() / 2); + self.inputValueProgress(am); + }, + + initForm() { + const self = this; + + self.isLoading(true); + self.getSelectDocumentTypes(); + self.getInstallments(); + + setTimeout(() => { + self.mountCardForm({ + fieldCcNumber: self.fieldCcNumber, + fieldSecurityCode: self.fieldSecurityCode, + fieldExpMonth: self.fieldExpMonth, + fieldExpYear: self.fieldExpYear, + }); + self.isLoading(false); + }, 3000); + }, + + /** + * Is Active + * @returns {Boolean} + */ + isActive() { + var self = this, + active = self.getCode() === self.isChecked(); + + self.active(active); + + return active; + }, + + /** + * Init Form Element + * @returns {void} + */ + initFormElement(element) { + this.formElement = element; + $(this.formElement).validation(); + }, + + /** + * Before Place Order + * @returns {void} + */ + async beforePlaceOrder() { + const self = this; + + if (!$(this.formElement).valid()) { + return; + } + + const tokenResponse = await this.generateToken(this.cardIndex()); + + if (tokenResponse === false) { + return; + } + + if (this.cardIndex() === 0) { + this.cardIndex(1); + return; + } + + this.placeOrder(); + }, + + placeOrder: function (data, event) { + var self = this; + + if (event) { + event.preventDefault(); + } + + if (this.validate() && + additionalValidators.validate() && + this.isPlaceOrderActionAllowed() === true + ) { + this.isPlaceOrderActionAllowed(false); + + this.getPlaceOrderDeferredObject() + .done( + function () { + self.afterPlaceOrder(); + + if (self.redirectAfterPlaceOrder) { + redirectOnSuccessAction.execute(); + } + } + ).always( + function () { + self.isPlaceOrderActionAllowed(true); + } + ).fail( + function () { + self.resetFirstCard(); + } + ) + + return true; + } + + return false; + }, + + /** + * Get data + * @returns {Object} + */ + getData() { + var self = this, + data; + + data = { + 'method': this.getCode(), + 'additional_data': {} + }; + + for (let i = 0; i < self.generatedCards.length; i ++) { + data.additional_data[`payer_${i}_document_type`] = self.generatedCards[i]?.documentType; + data.additional_data[`payer_${i}_document_identification`] = self.generatedCards[i]?.documentValue; + data.additional_data[`card_${i}_number_token`] = self.generatedCards[i]?.token.id; + data.additional_data[`card_${i}_holder_name`] = self.generatedCards[i]?.holderName; + data.additional_data[`card_${i}_number`] = self.generatedCards[i]?.cardNumber; + data.additional_data[`card_${i}_exp_month`] = self.generatedCards[i]?.cardExpirationMonth; + data.additional_data[`card_${i}_exp_year`] = self.generatedCards[i]?.cardExpirationYear; + data.additional_data[`card_${i}_type`] = self.generatedCards[i]?.cardType; + data.additional_data[`card_${i}_installments`] = self.generatedCards[i]?.cardInstallment; + data.additional_data[`card_${i}_finance_cost`] = self.generatedCards[i]?.cardFinanceCost; + data.additional_data[`card_${i}_public_id`] = self.generatedCards[i]?.cardPublicId; + data.additional_data[`card_${i}_amount`] = self.generatedCards[i]?.amount; + data.additional_data[`mp_${i}_user_id`] = self.generatedCards[i]?.mpUserId; + } + + data['additional_data'] = _.extend(data['additional_data'], this.additionalData); + + return data; + }, + + /** + * Is show legend + * @returns {Boolean} + */ + isShowLegend() { + return true; + }, + + /** + * Get Cc Type + * @returns {Object} + */ + getCcType() { + return window.checkoutConfig.payment[this.getCode()].ccTypesMapper; + }, + + /** + * Get Unsupported Pre Auth + * @returns {Object} + */ + getUnsupportedPreAuth() { + return window.checkoutConfig.payment[this.getCode()].unsupported_pre_auth; + }, + + isVaultEnabled() { + return false; + }, + + editFirstCard() { + if (!this.generatedCards[0]) { + return; + } + + if (0 === this.cardIndex()) { + return; + } + + delete this.generatedCards[1]; + + this.installmentsAmount(this.generatedCards[0].amount); + this.cardIndex(0); + this.mpSelectedCardType(''); + this.mpCardListInstallments('') + this.resetCardForm(); + this.initForm(); + }, + + async finishFirstCard() { + if (!$(this.formElement).valid() || this.progressHasError()) { + return; + } + + const tokenGenerated = await this.generateToken(); + + if (tokenGenerated === false) { + return; + } + + this.cardIndex(1); + this.installmentsAmount(this.amount() - this.installmentsAmount()); + this.mpSelectedCardType(''); + this.mpCardListInstallments(''); + this.installmentWasCalculated(false), + this.resetCardForm(); + this.initForm(); + }, + + getProgressBarWidth() { + const w = (this.inputValueProgress() / this.amount()) * 100; + + if (w <= 0 || w > 100) { + return '100%'; + } + + return `${w}%`; + }, + + progressHasError() { + if (this.inputValueProgress() == '') { + return true; + } + + const v = parseFloat(this.inputValueProgress()); + return v > this.amount() - 1 || v < 1; + }, + + isSiteIdMCOorMLC() { + if (this.getMpSiteId() === 'MCO' || this.getMpSiteId() === 'MLC') { + return true; + } + + return false; + }, + + /** + * Remaining value label update + */ + updateRemainingAmount() { + var amount = this.amount(); + var inputValueProgress = this.inputValueProgress(); + + if(inputValueProgress < amount){ + amount = amount - inputValueProgress; + } + + return this.formatedAmountWithSymbol(this.FormattedCurrencyToInstallments(amount)); + }, + + formatedInstallmentAmount() { + return this.formatedAmountWithSymbol(this.FormattedCurrencyToInstallments(this.installmentsAmount())); + }, + + showFirstCardBlock() { + if (this.cardIndex() === 0) { + return 'first-card-opened-form'; + } + + return 'first-card-edit-button'; + }, + + showSecondCardBlock() { + if (this.cardIndex() === 0) { + return 'second-card-radio-selector'; + } + + return 'second-card-opened-form'; + }, + + resetFirstCard() { + this.editFirstCard(); + this.mpPayerDocument(''); + this.mpPayerType(''); + }, + + /** + * Get payment images + * @param {String} type + * @returns {Boolean} + */ + getImages: function (type) { + + return window.checkoutConfig.payment[this.getCode()].images.hasOwnProperty(type) ? + window.checkoutConfig.payment[this.getCode()].images[type] + : false; + }, + }); +}); diff --git a/view/frontend/web/js/view/payment/method-renderer/validate-form-security.js b/view/frontend/web/js/view/payment/method-renderer/validate-form-security.js new file mode 100644 index 0000000..dbcff31 --- /dev/null +++ b/view/frontend/web/js/view/payment/method-renderer/validate-form-security.js @@ -0,0 +1,97 @@ +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ + +/* @api */ +define([ + 'underscore', + 'jquery', + 'mage/translate' +], function ( + _, + $, + $t +) { + 'use strict'; + + return { + + /** + * Remove Classes if Empyt + * @param {String} element + * @returns {void} + */ + removeClassesIfEmpyt(element) { + let hasError = $('#' + element).closest('.control-mp-iframe.has-error').length, + isValid = $('#' + element).closest('.control-mp-iframe.is-valid').length; + + if (!hasError) { + if (!isValid) { + $('#' + element).closest('.control-mp-iframe').removeClass('in-focus'); + } + } + }, + + /** + * Toogle Focus Style + * @param {String} element + * @returns {void} + */ + toogleFocusStyle(element) { + $('#' + element).closest('.control-mp-iframe').addClass('in-focus'); + }, + + /** + * Single Toogle Validity State + * @param {String} element + * @param {String} errorMessages + * @returns {Jquery} + */ + singleToogleValidityState(element, errorMessages) { + var target = $('#' + element).closest('.mercadopago-input-group'); + + if (errorMessages.length) + { + target.append('
' + $t(errorMessages) + '
'); + return $('#' + element).closest('.control-mp-iframe').addClass('has-error').removeClass('is-valid'); + } + return $('#' + element).closest('.control-mp-iframe').addClass('is-valid').removeClass('has-error'); + }, + + /** + * Toogle Validity State + * @param {String} element + * @param {String} errorMessages + * @returns {Jquery} + */ + toogleValidityState(element, errorMessages) { + var target = $('#' + element).closest('.mercadopago-input-group'), + infoErro = $('#' + element).closest('.mercadopago-input-group').find('.field-error'), + msg; + + if (infoErro.length) { + infoErro.remove(); + } + + if (errorMessages.length) + { + _.map(errorMessages, (error) => { + msg = error.message; + }); + + target.append('
' + $t(msg) + '
'); + return $('#' + element).closest('.control-mp-iframe').addClass('has-error').removeClass('is-valid'); + } + return $('#' + element).closest('.control-mp-iframe').addClass('is-valid').removeClass('has-error'); + }, + + /** + * Clear Errors in Field + * @return {void} + */ + clearSecureFieldsErrors(){ + return $('#form-secure-fields div.field-error').remove() + }, + }; +}); diff --git a/view/frontend/web/js/view/payment/method-renderer/vault.js b/view/frontend/web/js/view/payment/method-renderer/vault.js new file mode 100644 index 0000000..34fb3c3 --- /dev/null +++ b/view/frontend/web/js/view/payment/method-renderer/vault.js @@ -0,0 +1,485 @@ +/** + * Copyright © MercadoPago. All rights reserved. + * + * @author Mercado Pago + * @license See LICENSE for license details. + */ +define([ + 'underscore', + 'jquery', + 'ko', + 'Magento_Checkout/js/model/full-screen-loader', + 'Magento_Checkout/js/model/quote', + 'Magento_Payment/js/model/credit-card-validation/credit-card-data', + 'Magento_Vault/js/view/payment/method-renderer/vault', + 'mage/translate', + 'MercadoPago_AdbPayment/js/action/checkout/set-finance-cost', + 'Magento_Ui/js/model/messageList', + 'MercadoPago_AdbPayment/js/view/payment/method-renderer/validate-form-security' +], function ( + _, + $, + _ko, + fullScreenLoader, + quote, + creditCardData, + VaultComponent, + $t, + setFinanceCost, + messageList, + validateFormSF +) { + 'use strict'; + + return VaultComponent.extend({ + defaults: { + active: false, + template: 'MercadoPago_AdbPayment/payment/vault', + vaultForm: 'MercadoPago_AdbPayment/payment/vault-form', + amount: quote.totals().base_grand_total, + creditCardListInstallments: '', + creditCardVerificationNumber: '', + creditCardInstallment: '', + creditCardFinanceCost: '', + creditCardNumberToken: '', + creditCardType: '', + installmentTextInfo: false, + installmentTextTEA: null, + installmentTextCFT: null, + isLoading: true + }, + + /** + * Initializes model instance. + * + * @returns {Object} + */ + initObservable() { + this._super().observe([ + 'amount', + 'active', + 'creditCardListInstallments', + 'creditCardVerificationNumber', + 'creditCardInstallment', + 'creditCardFinanceCost', + 'creditCardNumberToken', + 'creditCardType', + 'installmentTextInfo', + 'installmentTextTEA', + 'installmentTextCFT', + 'isLoading' + ]); + return this; + }, + + /** + * Get auxiliary code + * @returns {String} + */ + getAuxiliaryCode() { + return 'mercadopago_adbpayment_cc'; + }, + + /** + * Get code + * @returns {String} + */ + getCode() { + return 'mercadopago_adbpayment_cc_vault'; + }, + + /** + * Init component + */ + initialize() { + var self = this; + + this._super(); + + self.active.subscribe((value) => { + if (value === true) { + this.getListOptionsToInstallmentsVault(); + creditCardData.creditCardInstallment = null; + + setTimeout(() => { + self.mountCardForm(); + }, 3000); + } + + if (value === false) { + self.isLoading(true); + self.resetCardForm(); + creditCardData.creditCardInstallment = null; + self.creditCardInstallment(null); + } + }); + + self.creditCardInstallment.subscribe((value) => { + self.addFinanceCost(); + creditCardData.creditCardInstallment = value; + }); + + self.creditCardVerificationNumber.subscribe((value) => { + self.getCardIdDetails(); + creditCardData.creditCardVerificationNumber = value; + }); + + self.creditCardNumberToken.subscribe((value) => { + creditCardData.creditCardNumberToken = value; + }); + + self.creditCardType.subscribe((value) => { + creditCardData.creditCardType = value; + }); + + self.creditCardListInstallments.subscribe((value) => { + creditCardData.creditCardListInstallments = value; + }); + + quote.totals.subscribe((value) => { + var financeCostAmount = 0; + + _.map(quote.totals()['total_segments'], (segment) => { + if (segment['code'] === 'finance_cost_amount') { + financeCostAmount = segment['value']; + } + }); + self.amount(value.base_grand_total - financeCostAmount); + }); + + self.amount.subscribe((value) => { + creditCardData.amount = value; + self.getListOptionsToInstallmentsVault(); + }); + }, + + /** + * Un Mount Cart Form + * @return {void} + */ + resetCardForm() { + window.mpCardForm?.cardNumber?.unmount(); + window.mpCardForm?.securityCode?.unmount(); + window.mpCardForm?.expirationMonth?.unmount(); + window.mpCardForm?.expirationYear?.unmount(); + window.mpCardForm = {}; + }, + + /** + * Mount Cart Form + * @return {void} + */ + mountCardForm() { + let self = this, + vaultId = self.getId(), + fieldSecurityCode = vaultId + '_cc_id', + styleField = { + height: '100%', + padding: '30px 15px' + }; + + self.resetCardForm(); + + window.mpCardForm.securityCode = window.mp.fields.create('securityCode', { style: styleField }); + window.mpCardForm.securityCode + .mount(fieldSecurityCode) + .on('error', () => { self.mountCardForm(); }) + .on('blur', () => { validateFormSF.removeClassesIfEmpyt(fieldSecurityCode); }) + .on('focus', () => { validateFormSF.toogleFocusStyle(fieldSecurityCode); }) + .on('validityChange', (event) => { + validateFormSF.toogleValidityState(fieldSecurityCode, event.errorMessages); + }) + .on('ready', () => { self.isLoading(false); }); + }, + + /** + * Display Error in Field + * @param {Array} error + * @return {void} + */ + displayErrorInField(error) { + let self = this, + field = error.field, + msg = error.message, + vaultId = self.getId(), + fieldSecurityCode = vaultId + '_cc_id', + fieldsMage = { + securityCode: fieldSecurityCode + }; + + validateFormSF.singleToogleValidityState(fieldsMage[field], msg); + }, + + /** + * Is Active + * @returns {Boolean} + */ + isActive() { + var active = this.getId() === this.isChecked(); + + this.active(active); + return active; + }, + + /** + * Init Form Element + * @returns {void} + */ + initFormElement(element) { + this.formElement = element; + $(this.formElement).validation(); + }, + + /** + * Before Place Order + * @returns {void} + */ + beforePlaceOrder() { + if (!$(this.formElement).valid()) { + return; + } + this.getCardIdDetails(); + }, + + /** + * Add Text for Installments + * @param {Array} labels + * @return {void} + */ + addTextForInstallment(labels) { + var self = this, + texts; + + self.installmentTextInfo(true); + + _.map(labels, (label) => { + texts = label.split('|'); + _.map(texts, (text) => { + if (text.includes('TEA')) { + self.installmentTextTEA(text.replace('_', ' ')); + } + if (text.includes('CFT')) { + self.installmentTextCFT(text.replace('_', ' ')); + } + }); + }); + }, + + /** + * Get card id details + * @returns {void} + */ + getCardIdDetails() { + var self = this, + payload; + + fullScreenLoader.startLoader(); + + payload = { + cardId: this.getMpPublicId() + }; + + window.mp.fields.createCardToken(payload) + .then((token) => { + self.creditCardNumberToken(token.id); + this.placeOrder(); + fullScreenLoader.stopLoader(); + }).catch((errors) => { + + _.map(errors, (error) => { + self.displayErrorInField(error); + }); + + messageList.addErrorMessage({ + message: $t('Unable to make payment, check card details.') + }); + fullScreenLoader.stopLoader(); + }); + }, + + /** + * Add Finance Cost in totals + * @returns {void} + */ + addFinanceCost() { + var self = this, + selectInstallment = self.creditCardInstallment(), + rulesForFinanceCost = self.creditCardListInstallments(); + + if (self.getMpSiteId() === 'MLA') { + _.map(rulesForFinanceCost, (keys) => { + if (keys.installments === selectInstallment) { + self.addTextForInstallment(keys.labels); + } + }); + } + + setFinanceCost.financeCost(selectInstallment, rulesForFinanceCost, null, null, (financeCostAmount) => { + self.creditCardFinanceCost(financeCostAmount); + }); + }, + + /** + * Get data + * @returns {Object} + */ + getData() { + var self = this, + data; + + data = { + 'method': self.getCode(), + 'additional_data': { + 'payer_document_type': self.getPayerDocumentType(), + 'payer_document_identification': self.getPayerDocumentNumber(), + 'card_installments': self.creditCardInstallment(), + 'card_finance_cost': self.creditCardFinanceCost(), + 'card_number_token': self.creditCardNumberToken(), + 'card_holder_name': self.getMpHolderName(), + 'card_number': self.getMaskedCard(), + 'card_type': self.getCardType(), + 'public_hash': self.getToken(), + 'mp_user_id': self.getMpUserId() + } + }; + + return data; + }, + + /** + * Get Code Cc Type + * @returns {String} + */ + getCodeCcType() { + return this.creditCardType(); + }, + + /** + * Is show legend + * @returns {Boolean} + */ + isShowLegend() { + return true; + }, + + /** + * Get Token + * @returns {String} + */ + getToken() { + return this.publicHash; + }, + + /** + * Get Payer Document Type + * @returns {String} + */ + getPayerDocumentType() { + return this.details['payer_document_type']; + }, + + /** + * Get Payer Document Type + * @returns {String} + */ + getPayerDocumentNumber() { + return this.details['payer_document_number']; + }, + + /** + * Get Mp Public Id + * @returns {String} + */ + getMpPublicId() { + return this.details['mp_public_id']; + }, + + /** + * Get Mp User Id + * @returns {String} + */ + getMpUserId() { + return this.details['mp_user_id']; + }, + + /** + * Get Mp Holder Name + * @returns {String} + */ + getMpHolderName() { + return this.details['card_holder_name']; + }, + + /** + * Get masked card + * @returns {String} + */ + getMaskedCard() { + return this.getCardFirstSix() + 'xxxxxx' + this.getCardLastFour(); + }, + + /** + * Get card type + * @returns {String} + */ + getCardType() { + return this.details['card_type']; + }, + + /** + * Get Card Last Four + * @returns {String} + */ + getCardLastFour() { + return this.details['card_last4']; + }, + + /** + * Get Card First Six + * @returns {String} + */ + getCardFirstSix() { + return this.details['card_first6']; + }, + + /** + * Get Mp Site Id + * @returns {String} + */ + getMpSiteId() { + return window.checkoutConfig.payment['mercadopago_adbpayment'].mp_site_id; + }, + + /** + * Get payment icons + * @param {String} type + * @returns {Boolean} + */ + getIcons(type) { + return window.checkoutConfig.payment[this.getCode()].icons.hasOwnProperty(type) ? + window.checkoutConfig.payment[this.getCode()].icons[type] + : false; + }, + + /** + * Get List Options to Instalments + * @returns {Array} + */ + getListOptionsToInstallmentsVault() { + var self = this, + installments = {}, + bin = this.getCardFirstSix(), + amount = self.amount(); + + window.mp.getInstallments({ + amount: String(amount), + bin: bin + }).then((result) => { + self.creditCardListInstallments(result[0].payer_costs); + }); + + return installments; + } + + }); +}); diff --git a/view/frontend/web/js/view/payment/method-renderer/webpay.js b/view/frontend/web/js/view/payment/method-renderer/webpay.js new file mode 100644 index 0000000..e646bf1 --- /dev/null +++ b/view/frontend/web/js/view/payment/method-renderer/webpay.js @@ -0,0 +1,133 @@ +/** + * Copyright © MercadoPago. All rights reserved. + * + * @author Mercado Pago + * @license See LICENSE for license details. + */ + +define([ + 'underscore', + 'jquery', + 'MercadoPago_AdbPayment/js/view/payment/default', +], function ( + _, + $, + Component, +) { + 'use strict'; + + return Component.extend({ + defaults: { + active: false, + template: 'MercadoPago_AdbPayment/payment/webpay', + webpayForm: 'MercadoPago_AdbPayment/payment/webpay-form', + financialInstitution: '' + }, + + /** + * Initializes model instance. + * + * @returns {Object} + */ + initObservable() { + this._super().observe([ + 'active', + 'financialInstitution' + ]); + return this; + }, + + /** + * Get code + * @returns {String} + */ + getCode() { + return 'mercadopago_adbpayment_webpay'; + }, + + /** + * Init component + */ + initialize() { + var self = this; + + this._super(); + + self.getSelectDocumentTypes(); + }, + + + /** + * Get Select Financial Institutions + * @returns {Array} + */ + getSelectFinancialInstitutions() { + return window.checkoutConfig.payment[this.getCode()].finance_inst_options; + }, + + /** + * Is Active + * @returns {Boolean} + */ + isActive() { + var active = this.getCode() === this.isChecked(); + + this.active(active); + return active; + }, + + /** + * Init Form Element + * @returns {void} + */ + initFormElement(element) { + this.formElement = element; + $(this.formElement).validation(); + }, + + /** + * Before Place Order + * @returns {void} + */ + beforePlaceOrder() { + if (!$(this.formElement).valid()) { + return; + } + this.placeOrder(); + }, + + /** + * Get data + * @returns {Object} + */ + getData() { + let self = this; + + return { + method: self.getCode(), + 'additional_data': { + 'payment_method_id': self.getPaymentIdMethod(), + 'payer_document_type': self.mpPayerType(), + 'payer_document_identification': self.mpPayerDocument(), + 'financial_institution': self.financialInstitution() + } + }; + }, + + /** + * Get instruction checkout for Webpay + * @returns {String} + */ + getInstructionCheckoutWebpay() { + return window.checkoutConfig.payment[this.getCode()].instruction_checkout_webpay; + }, + + /** + * Adds terms and conditions link to checkout + * @returns {string} + */ + getFingerprint() { + return window.checkoutConfig.payment[this.getCode()].fingerprint; + }, + }); +}); diff --git a/view/frontend/web/js/view/payment/mp-sdk.js b/view/frontend/web/js/view/payment/mp-sdk.js new file mode 100644 index 0000000..aee6a08 --- /dev/null +++ b/view/frontend/web/js/view/payment/mp-sdk.js @@ -0,0 +1,720 @@ +// noinspection DuplicatedCode + +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ + +/* @api */ +define([ + 'underscore', + 'jquery', + 'MercadoPago_AdbPayment/js/view/payment/default', + 'Magento_Checkout/js/model/quote', + 'MercadoPago_AdbPayment/js/view/payment/method-renderer/validate-form-security', + 'mage/url', + 'Magento_Checkout/js/model/full-screen-loader', + 'Magento_Checkout/js/model/url-builder', + 'MercadoPago_AdbPayment/js/action/checkout/set-finance-cost', + 'Magento_Ui/js/model/messageList', + 'mage/translate', + 'Magento_Catalog/js/price-utils', + 'Magento_Checkout/js/model/totals', +], function ( + _, + $, + Component, + quote, + validateFormSF, + urlFormatter, + fullScreenLoader, + urlBuilder, + setFinanceCost, + messageList, + $t, + priceUtils, + totals, +) { + 'use strict'; + + return Component.extend({ + + defaults: { + mpCardForm: {}, + fields: {}, + installmentWasCalculated: false, + generatedCards: [], + // html fields + mpCardHolderName: '', + mpCardListInstallments: '', + mpCardInstallment: '', + mpCardFinanceCost: '', + mpSelectedCardType: '', + mpCardType: '', + mpCardBin: '', + mpCardPublicId: '', + mpUserId: '', + cardIndex: 0, + installmentsAmount: 0, + amount: 0, + installmentsResponse: {}, + minAllowedAmount: 0, + }, + + /** @inheritdoc */ + initObservable: function () { + this._super() + .observe([ + 'mpCardHolderName', + 'mpCardListInstallments', + 'mpCardInstallment', + 'mpCardFinanceCost', + 'mpSelectedCardType', + 'mpCardType', + 'mpCardBin', + 'installmentWasCalculated', + 'mpCardPublicId', + 'mpUserId', + 'cardIndex', + 'amount', + 'installmentsAmount', + 'installmentsResponse', + ]); + return this; + }, + + /** + * Init component + */ + initialize: function () { + + let self = this; + + this._super(); + + self.amount(self.FormattedCurrencyToInstallments(quote.totals().base_grand_total)); + + self.installmentsAmount(self.FormattedCurrencyToInstallments(quote.totals().base_grand_total)); + + self.mpCardInstallment.subscribe((value) => { + self.addFinanceCost(); + }); + + self.iniTranslateErrorsFromSDK(); + + quote.paymentMethod.subscribe(function(method){self.resetCardAmount()}, null, 'change'); + }, + + /** + * Un Mount Cart Form + * @return {void} + */ + resetCardForm() { + try { + window.mpCardForm?.cardNumber?.unmount(); + } catch (e) { + // + } + + try { + window.mpCardForm?.securityCode?.unmount(); + } catch (e) { + // + } + + window.mpCardForm?.expirationMonth?.unmount(); + window.mpCardForm?.expirationYear?.unmount(); + window.mpCardForm = {}; + this.fields = {}; + this.installmentWasCalculated(false); + this.mpSelectedCardType(''); + this.mpCardBin(''); + this.mpCardHolderName(''); + this.mpCardInstallment(null); + this.mpCardFinanceCost(null); + }, + + /** + * Mount Cart Form + * @return {void} + */ + mountCardForm({fieldCcNumber, fieldSecurityCode, fieldExpMonth, fieldExpYear}) { + let self = this, + styleField = { + height: '100%', + padding: '30px 15px' + }, + codeCardtype; + + self.resetCardForm(); + + self.fields = {fieldCcNumber, fieldSecurityCode, fieldExpMonth, fieldExpYear}; + + if (fieldCcNumber) { + window.mpCardForm.cardNumber = window.mp.fields.create('cardNumber', {style: styleField}); + window.mpCardForm.cardNumber + .mount(fieldCcNumber) + .on('error', () => { + self.mountCardForm({fieldCcNumber, fieldSecurityCode, fieldExpMonth, fieldExpYear}); + this.installmentWasCalculated(false); + }) + .on('binChange', (event) => { + this.mpSelectedCardType(''); + this.installmentWasCalculated(false); + this.clearMinValueError(); + if (event.bin) { + if (event.bin.length === 8) { + self.mpCardBin(event.bin); + self.getInstallments(); + window.mp.getPaymentMethods({bin: event.bin}).then((binDetails) => { + codeCardtype = self.getCodeCardType(binDetails.results[0].id); + self.minAllowedAmount = binDetails.results[0].payer_costs[0].min_allowed_amount; + self.mpSelectedCardType(codeCardtype); + self.mpCardType(codeCardtype); + self.validateMinValue(self.installmentsAmount()); + }); + } + } + }) + .on('blur', () => { + validateFormSF.removeClassesIfEmpyt(fieldCcNumber); + }) + .on('focus', () => { + validateFormSF.toogleFocusStyle(fieldCcNumber); + }) + .on('validityChange', (event) => { + validateFormSF.toogleValidityState(fieldCcNumber, event.errorMessages); + }); + } + + if (fieldSecurityCode) { + window.mpCardForm.securityCode = window.mp.fields.create('securityCode', {style: styleField}); + window.mpCardForm.securityCode + .mount(fieldSecurityCode) + .on('error', () => { + self.mountCardForm({fieldCcNumber, fieldSecurityCode, fieldExpMonth, fieldExpYear}); + }) + .on('blur', () => { + validateFormSF.removeClassesIfEmpyt(fieldSecurityCode); + }) + .on('focus', () => { + validateFormSF.toogleFocusStyle(fieldSecurityCode); + }) + .on('validityChange', (event) => { + validateFormSF.toogleValidityState(fieldSecurityCode, event.errorMessages); + }); + } + + if (fieldExpMonth) { + window.mpCardForm.expirationMonth = window.mp.fields.create('expirationMonth', {style: styleField}); + window.mpCardForm.expirationMonth + .mount(fieldExpMonth) + .on('error', () => { + self.mountCardForm({fieldCcNumber, fieldSecurityCode, fieldExpMonth, fieldExpYear}); + }) + .on('blur', () => { + validateFormSF.removeClassesIfEmpyt(fieldExpMonth); + }) + .on('focus', () => { + validateFormSF.toogleFocusStyle(fieldExpMonth); + }) + .on('validityChange', (event) => { + if (event.errorMessages.length) + { + _.map(event.errorMessages, (error) => { + error.message = this.getMessageError(error.message); + }); + } + validateFormSF.toogleValidityState(fieldExpMonth, event.errorMessages); + }); + } + + if (fieldExpYear) { + window.mpCardForm.expirationYear = window.mp.fields.create('expirationYear', {style: styleField}); + window.mpCardForm.expirationYear + .mount(fieldExpYear) + .on('error', () => { + self.mountCardForm({fieldCcNumber, fieldSecurityCode, fieldExpMonth, fieldExpYear}); + }) + .on('blur', () => { + validateFormSF.removeClassesIfEmpyt(fieldExpYear); + }) + .on('focus', () => { + validateFormSF.toogleFocusStyle(fieldExpYear); + }) + .on('validityChange', (event) => { + if (event.errorMessages.length) + { + _.map(event.errorMessages, (error) => { + error.message = this.getMessageError(error.message); + }); + } + validateFormSF.toogleValidityState(fieldExpYear, event.errorMessages); + }) + .on('ready', () => { + self.isLoading(false); + }); + } + }, + + async generateToken() { + var self = this, + isVaultEnabled = this.vaultEnabler?.isVaultEnabled() ?? false, + saveCard = this.vaultEnabler?.isActivePaymentTokenEnabler() ?? false, + quoteId = quote.getQuoteId(), + unsupportedPreAuth = self.getUnsupportedPreAuth(), + mpSiteId = self.getMpSiteId(); + + if (unsupportedPreAuth[mpSiteId].includes(self.mpCardType())) { + isVaultEnabled = false; + saveCard = false; + } + + if (self.mpPayerDocument()) { + self.mpPayerDocument(self.mpPayerDocument().replace(/\D/g, '')); + } + + fullScreenLoader.startLoader(); + + const payload = { + cardholderName: self.mpCardHolderName(), + identificationType: self.mpPayerType(), + identificationNumber: self.mpPayerDocument(), + }; + + try { + const token = await window.mp.fields.createCardToken(payload); + + fullScreenLoader.stopLoader(); + + if (saveCard && isVaultEnabled) { + fullScreenLoader.startLoader(); + + const serviceUrl = urlBuilder.createUrl('/carts/mine/mp-create-vault', {}); + + const payloadCreateVault = { + cartId: quoteId, + vaultData: { + token: token.id, + identificationNumber: self.mpPayerDocument(), + identificationType: self.mpPayerType(), + } + }; + + try { + const response = await $.ajax({ + url: urlFormatter.build(serviceUrl), + data: JSON.stringify(payloadCreateVault), + global: true, + contentType: 'application/json', + type: 'POST', + async: false + }); + + self.mpCardPublicId(response[0].card_id); + self.mpUserId(response[0].mp_user_id); + + fullScreenLoader.stopLoader(); + + } catch (e) { + fullScreenLoader.stopLoader(); + return false; + } + } + + const selectedPayerCost = self.mpCardListInstallments().filter(obj => obj.installments === self.mpCardInstallment())[0]; + + if (!selectedPayerCost) { + return false; + } + + self.generatedCards[self.cardIndex()] = { + token, + cardNumber: token.first_six_digits + 'xxxxxx' + token.last_four_digits, + cardExpirationYear: token.expiration_year, + cardExpirationMonth: token.expiration_month, + cardPublicId: self.mpCardPublicId(), + cardType: self.mpCardType(), + documentType: self.mpPayerType(), + documentValue: self.mpPayerDocument(), + mpUserId: self.mpUserId(), + holderName: self.mpCardHolderName(), + cardInstallment: self.mpCardInstallment(), + cardFinanceCost: self.mpCardFinanceCost(), + amount: self.installmentsAmount(), + sdkInformation: { + installmentLabel: selectedPayerCost.recommended_message, + installmentSelected: selectedPayerCost, + issuerLogo: self.installmentsResponse().issuer.secure_thumbnail + }, + }; + + return true; + } catch(e) { + + validateFormSF.clearSecureFieldsErrors(); + + self.displayErrorInField(e); + + messageList.addErrorMessage({ + message: $t('Unable to make payment, check card details.') + }); + fullScreenLoader.stopLoader(); + return false; + } + }, + + /** + * Display Error in Field + * @param {Array} error + * @return {void} + */ + displayErrorInField(error) { + + var previousField = undefined; + + let msg = error.message || error[0].message; + + let field = error.field || error[0]?.field; + + if (error.length >= 1) { + + error.forEach((error) => { + if (error.field && previousField !== error.field) { + + field = error.field; + + msg = this.getMessageError(error.message); + let fieldsMage = { + cardNumber: this.fields.fieldCcNumber, + securityCode: this.fields.fieldSecurityCode, + expirationMonth: this.fields.fieldExpMonth, + expirationYear: this.fields.fieldExpYear, + }; + + validateFormSF.singleToogleValidityState(fieldsMage[field], msg); + + } + previousField = error.field; + }); + } + }, + + /** + * Returns error message and handles month and year validation + * @param {String} message + * @returns {String} + */ + getMessageError(message) { + let currentDate = new Date(); + currentDate.setDate(- 1); + if(message.toLowerCase() === "expirationYear value should be greater or equal than %1.".replace('%1', currentDate.getFullYear()).toLowerCase()) { + message = "expirationYear value should be greater or equal than %1."; + } else if (message.toLowerCase() === "expirationMonth value should be greater than '%1' or expirationYear value should be greater than '%2'." + .replace('%1', currentDate.toLocaleString('default', { month: '2-digit' })) + .replace('%2', currentDate.getFullYear()) + .toLowerCase()) { + message = "expirationMonth value should be greater than '%1' or expirationYear value should be greater than '%2'."; + } + return message; + }, + + /** + * Get List Options to Instalments + * @returns {Array} + */ + async getInstallments() { + var self = this, + installments = {}, + ccNumber = self.mpCardBin(), + bin = ccNumber; + + self.installmentWasCalculated(false); + + if (self.installmentsAmount() == '' || self.installmentsAmount() > self.FormattedCurrencyToInstallments(self.amount())) { + self.installmentSelected = null; + self.mpCardInstallment(null); + return; + } + + if (bin.length === 8) { + const result = await window.mp.getInstallments({ + amount: String(self.FormattedCurrencyToInstallments(self.installmentsAmount())), + bin: bin + }); + + if (result[0] && result[0].payer_costs) { + self.installmentWasCalculated(true); + self.installmentsResponse(result[0]); + var listInstallments = result[0].payer_costs; + + if (self.getMpSiteId() === 'MCO' || self.getMpSiteId() === 'MPE' || self.getMpSiteId() === 'MLC') { + self.addTextInterestForInstallment(listInstallments); + } + + self.mpCardListInstallments(listInstallments); + } + } + + return installments; + }, + + /** + * Add Text for Installments + * @param {Array} labels + * @return {void} + */ + addTextForInstallment(labels) { + var self = this, + texts; + + self.installmentTextInfo(true); + + _.map(labels, (label) => { + texts = label.split('|'); + _.map(texts, (text) => { + if (text.includes('TEA')) { + self.installmentTextTEA(text.replace('_', ' ')); + } + if (text.includes('CFT')) { + self.installmentTextCFT(text.replace('_', ' ')); + } + }); + }); + }, + + formatedAmountWithSymbol(amount) { + return this.currencySymbol() + ' ' + amount; + }, + + currencySymbol() { + return priceUtils.formatPrice().replaceAll(/[0-9\s\.\,]/g, ''); + }, + + /** + * Get Code Card Type. + * @param {String} cardTypeName + * @returns {String} + */ + getCodeCardType(cardTypeName) { + return cardTypeName; + }, + + /** + * Get list of available credit card types + * @returns {Object} + */ + getCcAvailableTypes: function () { + return window.checkoutConfig.payment.ccform.availableTypes[this.getCode()]; + }, + + /** + * Get payment icons + * @param {String} type + * @returns {Boolean} + */ + getIcons: function (type) { + + return window.checkoutConfig.payment[this.getCode()].icons.hasOwnProperty(type) ? + window.checkoutConfig.payment[this.getCode()].icons[type] + : false; + }, + + /** + * Get terms and conditions + * @returns {String} + */ + getFingerprint: function () { + return window.checkoutConfig.payment[this.getCode()].fingerprint; + }, + + /** + * Get list of months + * @returns {Object} + */ + getCcMonths: function () { + return window.checkoutConfig.payment.ccform.months[this.getCode()]; + }, + + /** + * Get list of years + * @returns {Object} + */ + getCcYears: function () { + return window.checkoutConfig.payment.ccform.years[this.getCode()]; + }, + + /** + * Get list of available credit card types values + * @returns {Object} + */ + getCcAvailableTypesValues: function () { + return _.map(this.getCcAvailableTypes(), function (value, key) { + return { + 'value': key, + 'type': value + }; + }); + }, + + /** + * Get list of available month values + * @returns {Object} + */ + getCcMonthsValues: function () { + return _.map(this.getCcMonths(), function (value, key) { + return { + 'value': key, + 'month': value + }; + }); + }, + + /** + * Get list of available year values + * @returns {Object} + */ + getCcYearsValues: function () { + return _.map(this.getCcYears(), function (value, key) { + return { + 'value': key, + 'year': value + }; + }); + }, + + /** + * Get available credit card type by code + * @param {String} code + * @returns {String} + */ + getCcTypeTitleByCode: function (code) { + var title = '', + keyValue = 'value', + keyType = 'type'; + + _.each(this.getCcAvailableTypesValues(), function (value) { + if (value[keyValue] === code) { + title = value[keyType]; + } + }); + + return title; + }, + + /** + * Get credit card details + * @returns {Array} + */ + getInfo: function () { + return [ + { + 'name': 'Credit Card Type', value: this.getCcTypeTitleByCode(this.mpCardType()) + }, + { + 'name': 'Credit Card Number', value: this.mpCardNumber() + } + ]; + }, + + addFinanceCost() { + var self = this, + selectInstallment = self.mpCardInstallment(), + rulesForFinanceCost = self.mpCardListInstallments(); + + if (self.getMpSiteId() === 'MLA') { + _.map(rulesForFinanceCost, (keys) => { + if (keys.installments === selectInstallment) { + self.addTextForInstallment(keys.labels); + } + }); + } + + setFinanceCost.financeCost(selectInstallment, rulesForFinanceCost, self.cardIndex(), self.item.method, (financeCostAmount) => { + self.mpCardFinanceCost(financeCostAmount); + }); + }, + + iniTranslateErrorsFromSDK() { + $t("cardNumber should be a number."); + $t("cardNumber is empty."); + $t("cardNumber should be of length between '8' and '19'."); + $t("securityCode should be a number."); + $t("securityCode should be of length '3' or '4'."); + $t("securityCode is empty."); + $t("expirationMonth should be a number."); + $t("expirationMonth is empty."); + $t("expirationYear should be of length '2' or '4'."); + $t("expirationYear should be a number."); + $t("expirationYear is empty."); + $t("expirationMonth should be a value from 1 to 12."); + $t("expirationYear value should be greater or equal than %1."); + $t("expirationMonth value should be greater than '%1' or expirationYear value should be greater than '%2'."); + $t("cardNumber should be of length '16'."); + }, + + /** + * Formatted Currency to Installments + * @param {Float} amount + * @return {Float} + */ + FormattedCurrencyToInstallments(amount) { + if (this.getMpSiteId() === 'MCO' || this.getMpSiteId() === 'MLC') { + return parseFloat(amount ? amount : 0).toFixed(0); + } + return amount; + }, + + /** + * Add interest text for installments + * @param {Array} + * @return {Array} + */ + addTextInterestForInstallment(listInstallments) { + _.map(listInstallments, (installment) => { + var installmentRate = installment.installment_rate; + var installmentRateCollector = installment.installment_rate_collector; + + if (installmentRate === 0 && installmentRateCollector[0] === 'MERCADOPAGO') { + installment.recommended_message = installment.recommended_message + ' ' + $t("Interest-free"); + } + + if (installmentRate === 0 && installmentRateCollector[0] === 'THIRD_PARTY') { + installment.recommended_message = installment.recommended_message + ' ' + $t("Your Bank will apply Interest"); + } + + return installment; + }); + }, + + resetCardAmount() { + this.installmentSelected = null; + this.mpCardInstallment(null); + this.addFinanceCost(); + }, + + /** + * Minimum value validate + * @param {String} amount + * @returns {Jquery} + */ + validateMinValue(amount) { + var message = $t('Minimum transaction amount not allowed for the chosen brand. Please choose another flag or make a purchase over %1.').replace('%1', this.formatedAmountWithSymbol(this.minAllowedAmount)); + + $('.mp-message-error').remove(); + + if (amount < this.minAllowedAmount) { + + return $('.mp-iframe-card').append('
' + message + '
'); + } + }, + + /** + * Clear Error Min Value + * @return {Jquery} + */ + clearMinValueError(){ + return $('.mp-message-error').remove(); + } + }); +}); diff --git a/view/frontend/web/js/view/payment/observerCheckoutPro.js b/view/frontend/web/js/view/payment/observerCheckoutPro.js new file mode 100644 index 0000000..df174db --- /dev/null +++ b/view/frontend/web/js/view/payment/observerCheckoutPro.js @@ -0,0 +1,22 @@ +/** + * Copyright © MercadoPago. All rights reserved. + * + * @author Mercado Pago + * @license See LICENSE for license details. + */ +window.addEventListener('message', (event) => { + 'use strict'; + + var dataExit; + + if (typeof event.data === 'string') { + try { + dataExit = JSON.parse(event.data); + + if (dataExit.action === 'finalize') { + document.location.reload(true); + } + } + catch (e) { } + } +}); diff --git a/view/frontend/web/template/cart/summary/finance_cost.html b/view/frontend/web/template/cart/summary/finance_cost.html new file mode 100644 index 0000000..f21a7d0 --- /dev/null +++ b/view/frontend/web/template/cart/summary/finance_cost.html @@ -0,0 +1,18 @@ + + + + + + + + + + + diff --git a/view/frontend/web/template/cart/totals/finance_cost.html b/view/frontend/web/template/cart/totals/finance_cost.html new file mode 100644 index 0000000..51073c3 --- /dev/null +++ b/view/frontend/web/template/cart/totals/finance_cost.html @@ -0,0 +1,14 @@ + + + + + + + diff --git a/view/frontend/web/template/checkout/cart/totals/finance_cost.html b/view/frontend/web/template/checkout/cart/totals/finance_cost.html new file mode 100644 index 0000000..30aca6c --- /dev/null +++ b/view/frontend/web/template/checkout/cart/totals/finance_cost.html @@ -0,0 +1,16 @@ + + + + + + + + + diff --git a/view/frontend/web/template/checkout/summary/finance_cost.html b/view/frontend/web/template/checkout/summary/finance_cost.html new file mode 100644 index 0000000..927b4eb --- /dev/null +++ b/view/frontend/web/template/checkout/summary/finance_cost.html @@ -0,0 +1,17 @@ + + + + + + + + + + diff --git a/view/frontend/web/template/payment/cc-form.html b/view/frontend/web/template/payment/cc-form.html new file mode 100644 index 0000000..37d1b88 --- /dev/null +++ b/view/frontend/web/template/payment/cc-form.html @@ -0,0 +1,222 @@ + + +
+
+
+ + +
+
+
+
+ + +
+
+
+ +
+ + + + +
    + + +
  • + +
  • + + +
+
+
+ +
+
+
+
+
+ + +
+
+
+
+ +
+
+ +
    + +
  • + + + +
  • + +
+
+
+
+
+
+ +
+
+
+ + + +
+ +
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+ + + +
+
+ +
+
+ + +
+ +

+

+ +
+ +
+ +
+ + +
+ +
+
+
diff --git a/view/frontend/web/template/payment/cc.html b/view/frontend/web/template/payment/cc.html new file mode 100644 index 0000000..35768bc --- /dev/null +++ b/view/frontend/web/template/payment/cc.html @@ -0,0 +1,64 @@ + +
+
+ + +
+
+ +
+ +
+
+ + + +
+
+ +
+
+
+

+ + + + +

+ +
+
+
+
diff --git a/view/frontend/web/template/payment/checkout-pro-form.html b/view/frontend/web/template/payment/checkout-pro-form.html new file mode 100644 index 0000000..d386952 --- /dev/null +++ b/view/frontend/web/template/payment/checkout-pro-form.html @@ -0,0 +1,29 @@ + +
+
+

+
+
+ +
+ +
+
+
+
+ +
+
+
+
+
+ +
+
diff --git a/view/frontend/web/template/payment/checkout-pro.html b/view/frontend/web/template/payment/checkout-pro.html new file mode 100644 index 0000000..20c3d44 --- /dev/null +++ b/view/frontend/web/template/payment/checkout-pro.html @@ -0,0 +1,64 @@ + +
+
+ + +
+
+ +
+ +
+
+ + + +
+
+ +
+
+
+

+ + + + +

+ +
+
+
+
diff --git a/view/frontend/web/template/payment/payment-methods-off-form.html b/view/frontend/web/template/payment/payment-methods-off-form.html new file mode 100644 index 0000000..54f29b7 --- /dev/null +++ b/view/frontend/web/template/payment/payment-methods-off-form.html @@ -0,0 +1,135 @@ + + +
+ +
+ + + + +
+ +
+
+ + +
+
+
+
+ + +
+
+ + + +
+
+ + +
+
+
+
+ + +
+
+ +
+ + +
+
+

+
+ +
+
+
    + +
  • + + +
  • + +
+
+ + +
+
+
+
+
+
+ +
+
+ diff --git a/view/frontend/web/template/payment/payment-methods-off.html b/view/frontend/web/template/payment/payment-methods-off.html new file mode 100644 index 0000000..b026f0a --- /dev/null +++ b/view/frontend/web/template/payment/payment-methods-off.html @@ -0,0 +1,55 @@ +
+
+ + +
+
+ +
+ +
+
+ + + +
+
+ +
+
+
+

+ + + + +

+ +
+
+
+
diff --git a/view/frontend/web/template/payment/pix-form.html b/view/frontend/web/template/payment/pix-form.html new file mode 100644 index 0000000..918c07a --- /dev/null +++ b/view/frontend/web/template/payment/pix-form.html @@ -0,0 +1,70 @@ + + +
+
+
+ + +
+
+
+
+ + +
+
+
+ +
+
+

+
+
+ +
+ +
+
+
+
+ +
+ +
+
diff --git a/view/frontend/web/template/payment/pix.html b/view/frontend/web/template/payment/pix.html new file mode 100644 index 0000000..f4afb8a --- /dev/null +++ b/view/frontend/web/template/payment/pix.html @@ -0,0 +1,64 @@ + +
+
+ + +
+
+ +
+ +
+
+ + + +
+
+ +
+
+
+

+ + + + +

+ +
+
+
+
diff --git a/view/frontend/web/template/payment/pse-form.html b/view/frontend/web/template/payment/pse-form.html new file mode 100644 index 0000000..d7472da --- /dev/null +++ b/view/frontend/web/template/payment/pse-form.html @@ -0,0 +1,118 @@ + + +
+
+
+ + +
+
+
+
+ + +
+
+
+ +
+
+

+
+
+
+
+ + +
+
+
+
+ + +
+
+ +
+ +
+
+
+
+ +
+
+
+
+
+ +
+
diff --git a/view/frontend/web/template/payment/pse.html b/view/frontend/web/template/payment/pse.html new file mode 100644 index 0000000..6105435 --- /dev/null +++ b/view/frontend/web/template/payment/pse.html @@ -0,0 +1,64 @@ + +
+
+ + +
+
+ +
+ +
+
+ + + +
+
+ +
+
+
+

+ + + + +

+ +
+
+
+
diff --git a/view/frontend/web/template/payment/twocc-form.html b/view/frontend/web/template/payment/twocc-form.html new file mode 100644 index 0000000..2f9eca6 --- /dev/null +++ b/view/frontend/web/template/payment/twocc-form.html @@ -0,0 +1,231 @@ + +
+ +
+ + + + +
    + + +
  • + +
  • + + +
+
+
+ +
+
+

+
+
+
+
+
+ + +
+
+
+
+ +
+
+ +
    + +
  • + + + +
  • + +
+
+
+
+
+
+ +
+
+
+ + + +
+ +
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+ + + +
+
+ +
+
+
+ + +
+
+
+
+ + +
+
+
+ + +
+
+ + +
+ +

+

+ +
+ +
+ +
+ + +
+ +
+
+
+ +
diff --git a/view/frontend/web/template/payment/twocc.html b/view/frontend/web/template/payment/twocc.html new file mode 100644 index 0000000..1d2a0c5 --- /dev/null +++ b/view/frontend/web/template/payment/twocc.html @@ -0,0 +1,210 @@ + +
+
+ + +
+
+ + +
+

+
+ + +
+

+
+
+ + + + + + + + +
+
+
+
+ +
+ +
+ +
+
+
+ + +
+ +
+
+ +
+
+ + + +
+
+ +
+
+
+
+
+
+
+
+ +
+ +
+ Editar +
+
+
+
+ + +

+ + +
+ + +
+ + + +
+ + +
+ +
+
+ +
+
+ + + +
+
+ + + +
+ +
+ +
+
+
+

+ + + + +

+ +
+
+
+
diff --git a/view/frontend/web/template/payment/vault-form.html b/view/frontend/web/template/payment/vault-form.html new file mode 100644 index 0000000..32bb60a --- /dev/null +++ b/view/frontend/web/template/payment/vault-form.html @@ -0,0 +1,74 @@ + +
+ + + + +
    +
  • + +
  • +
+
+
+ +
+

+
+
+
+
+
+ +
+
+
+ + + +
+ +
+
+
+
+
+
+ + +
+ +

+

+ +
+
+
+
diff --git a/view/frontend/web/template/payment/vault.html b/view/frontend/web/template/payment/vault.html new file mode 100644 index 0000000..6d10a6e --- /dev/null +++ b/view/frontend/web/template/payment/vault.html @@ -0,0 +1,60 @@ + +
+
+ + +
+ +
+ + +
+ +
+
+ + + +
+
+ + + +
+
+
+ +
+
+
+
diff --git a/view/frontend/web/template/payment/webpay-form.html b/view/frontend/web/template/payment/webpay-form.html new file mode 100644 index 0000000..1cebe62 --- /dev/null +++ b/view/frontend/web/template/payment/webpay-form.html @@ -0,0 +1,96 @@ + + +
+
+
+ + +
+
+
+
+ + +
+
+
+ +
+
+

+
+
+
+
+ + +
+
+ +
+ +
+
+
+
+ +
+
+
+
+
+ +
+
diff --git a/view/frontend/web/template/payment/webpay.html b/view/frontend/web/template/payment/webpay.html new file mode 100644 index 0000000..805b2f1 --- /dev/null +++ b/view/frontend/web/template/payment/webpay.html @@ -0,0 +1,64 @@ + +
+
+ + +
+
+ +
+ +
+
+ + + +
+
+ +
+
+
+

+ + + + +

+ +
+
+
+