Skip to content

Commit

Permalink
Merge pull request #285 from PluginAndPartners/master
Browse files Browse the repository at this point in the history
Release 5.2.0
  • Loading branch information
lira authored Jul 26, 2021
2 parents c4b9ad6 + 1b27c91 commit 2b12ac2
Show file tree
Hide file tree
Showing 73 changed files with 10,190 additions and 11,655 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/phpcs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.1'
php-version: '7.4'
coverage: none
tools: composer, cs2pr

Expand Down
51 changes: 51 additions & 0 deletions .github/workflows/phpunit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: PHPUnit

on: [push]

jobs:
wordpress-tests:
runs-on: ubuntu-latest
services:
mysql:
image: mysql:latest
env:
MYSQL_DATABASE: wordpress_test
MYSQL_HOST: 127.0.0.1
MYSQL_USER: wordpress
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: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
coverage: none
tools: composer, cs2pr

- 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
with:
path: ${{ steps.composer-cache.outputs.dir }}
# Use the hash of composer.json as the key for your cache if you do not commit composer.lock.
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-

- name: Install dependencies
run: composer install --prefer-dist --no-suggest --no-progress

- name: Install Database
run: bash bin/install-wp-tests.sh wordpress_test root p@ssw0rd1 127.0.0.1 latest true

- name: Running Unit Test
run: vendor/bin/phpunit
11 changes: 11 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npm run php:lint
npm run lint
npm run build:js
npm run build:css
npm run pot
git add *.min.js
git add *.min.css
git add *.pot
3 changes: 3 additions & 0 deletions .jshintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules
vendor
**/*.min.js
9 changes: 5 additions & 4 deletions .jshintrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"curly": true,
"eqeqeq": true,
"eqnull": true,
"es3": true,
"expr": true,
"immed": true,
"noarg": true,
Expand All @@ -12,13 +11,15 @@
"trailing": true,
"undef": true,
"unused": true,

"esversion": 6,
"browser": true,

"globals": {
"_": false,
"Backbone": false,
"jQuery": false,
"wp": false
"wp": false,
"require": false,
"console": false,
"module": false
}
}
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v14
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,18 @@ 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).

## [5.2.0] - 2021-07-26

### Added
- New payment method Wallet Button (wallet purchase)
- Added support to PHP 8
- Added support to PHPUnit
- Added support to source_news in notification
### Changed
- Changed pix e-mail template
- Removed gulp dependency
- New pre-commit hooks

## [5.1.1] - 2021-04-22

### Added
Expand Down
83 changes: 83 additions & 0 deletions assets/css/basic_checkout_mercadopago.css
Original file line number Diff line number Diff line change
Expand Up @@ -840,39 +840,122 @@

}

.mp-wallet-button {
background: #FFFFFF;
border: 1px solid #DCDCDC;
box-sizing: border-box;
box-shadow: 0px 7px 12px rgba(0, 0, 0, 0.110659);
border-radius: 10px;
padding: 1em 3em 1em 1em;
margin-bottom: 20px;
max-width: 362px;
}

.mp-wallet-button-header {
margin-bottom: 30px;
display: flex;
}

.mp-wallet-button-circle {
width: 48px;
height: 48px;
border-radius: 50%;
position: absolute;
background-color: rgba(71, 154, 209, 0.1);
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
}

.mp-wallet-button-logo {
width: 35%;
position: relative;
}

.mp-wallet-button-logo img {
float: inherit !important;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}

.mp-wallet-button-info {
width: 65%
}

.mp-wallet-button-info-header {
font-size: 0.9em;
}

.mp-wallet-button-info-description {
font-size: 0.8em;
}

.mp-wallet-button-pay {
width: 100%x;
padding-left: 35%;
}

.mp-wallet-button-pay button {
padding: 0.5em 0.7em;
background-color: #009EE3;
border-radius: 5px;
color: #fff;
width: 100%;
font-size: 0.9em;
}

@media (max-width: 767.98px) {
.mp-col-md-4 {
width: 100%;
flex: none;
}

.mp-col-md-8 {
width: 100%;
flex: none;
}

.mp-pix-right {
border-right: none;
border-top: solid 1px #e5e5e5;
margin-bottom: 32px;
}

.mp-qr-code {
width: 100%;
margin: 0 0 24px 0;
}

.mp-details-pix-button {
width: 100%;
height: auto;
display: inline-block;
}

.mp-row-checkout-pix-container {
display: block;
}

.mp-details-pix-img {
margin: 64px auto 0;
padding: 0;
}

.mp-details-pix-title {
margin: 40px auto 0;
text-align: center;
padding: 0;
}
}
@media (max-width: 1040px) {
.mp-wallet-button {
padding: 1em;
}

.mp-wallet-button-pay {
width: 100%x;
padding-left: 0;
}
}
2 changes: 1 addition & 1 deletion assets/css/basic_checkout_mercadopago.min.css

Large diffs are not rendered by default.

104 changes: 104 additions & 0 deletions assets/css/saved_cards_notice_mercadopago.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
.mp-alert-frame {
align-items: center;
display: inline-flex;
justify-content: center;
justify-items: center;
}

.mp-left-alert {
padding-top: 5px;
}

.mp-left-alert img {
max-width: 30px;
min-width: 30px;
padding-right: 8px;
}

.mp-right-alert {
padding-top: 0px;
}

.mp-saved-cards-notice {
border: 1px solid #ccc !important;
background-color: #449DDD;
display: flex;
justify-content: space-between;
align-items: center;
}

.mp-left-saved-cards {
display: flex;
justify-content: center;
align-items: center;
padding-right: 10px;
}

.mp-left-saved-cards img {
max-width: 67px;
min-width: 67px;
padding: 10px 16px 10px 0;
}

.mp-right-saved-cards {
padding-top: 0px;
display: flex;
border-radius: 5px;
}

.mp-saved-cards-title {
font-weight: 600;
font-size: 14px;
margin-bottom: 0 !important;
color: #fff;
}

.mp-saved-cards-subtitle {
font-size: 12px;
margin-top: 0 !important;
color: #fff;
max-width: 65%;
}

.mp-saved-cards-link {
background-color: #fff;
color: #449DDD;;
border-radius: 4px;
font-weight: 600;
display: inline-block;
padding: 2px 36px 0;
text-align: center;
line-height: 34px;
font-size: 14px;
text-decoration: none;
min-width: 150px;
}

.mp-saved-cards-link:hover, .mp-saved-cards-link:focus {
background-color: #007eb5;
color: #fff;
}

@media (max-width: 767.98px) {
.mp-saved-cards-frame {
justify-content: baseline;
}
.mp-left-saved-cards-text {
display: none;
}
.mp-left-saved-cards img {
padding-right: 8px;
padding-top: 0.5em;
}
.mp-right-saved-cards {
width: 100%;
}
.mp-saved-cards-link {
width: 100%;
padding: 2px 28px 0;
}
}

#saved-cards-notice > button.notice-dismiss::before {
color: white;
}
1 change: 1 addition & 0 deletions assets/css/saved_cards_notice_mercadopago.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added assets/images/generics/icone-cartao-mp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 2b12ac2

Please sign in to comment.