Skip to content

Commit

Permalink
Release 4.6.0 (#259)
Browse files Browse the repository at this point in the history
  • Loading branch information
lira authored Nov 27, 2020
1 parent 8b455a0 commit d248ec1
Show file tree
Hide file tree
Showing 45 changed files with 1,058 additions and 329 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,16 @@ 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).

## [4.6.0] - 2020-12-01

### Added
- Add review rating banner
- Improve security on checkouts, xss javascript sanitizer
- Support section block added in checkout settings

### Changed
- Fixed error that prevents configuring the Mercado Pago plugin

## [4.5.0] - 2020-10-26

### Added
Expand Down
86 changes: 84 additions & 2 deletions assets/css/admin_notice_mercadopago.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,91 @@
}

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

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

.mp-rating-notice {
border: 1px solid #ccc !important;
}

.mp-rating-frame {
display: flex;
justify-content: space-between;
align-items: center;
padding-left: 8px;
}

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

.mp-left-rating img {
max-width: 50px;
min-width: 50px;
padding-right: 16px;
padding-top: 0.4em;
}

.mp-right-rating {
padding-top: 0px;
display: flex;
}

.mp-rating-title {
font-weight: 600;
font-size: 14px;
margin-bottom: 0 !important;
}

.mp-rating-subtitle {
font-size: 12px;
margin-top: 0 !important;
}

.mp-rating-link {
background-color: #009ee3;
color: #fff;
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;
width: 110px;
}

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

@media (max-width: 767.98px) {
.mp-rating-frame {
justify-content: baseline;
}
.mp-left-rating-text {
display: none;
}
.mp-left-rating img {
padding-right: 8px;
padding-top: 0.5em;
}
.mp-right-rating {
width: 100%;
}
.mp-rating-link {
width: 100%;
padding: 2px 28px 0;
}
}
2 changes: 1 addition & 1 deletion assets/css/admin_notice_mercadopago.min.css

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

15 changes: 13 additions & 2 deletions assets/css/config_mercadopago.css
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,17 @@
color: #555555;
}

.mp-text-support {
font-family: sans-serif;
font-size: 12px !important;
font-weight: normal;
font-style: normal !important;
font-stretch: normal;
line-height: 16px !important;
letter-spacing: normal;
color: #555555;
}

.mp_homolog_text {
font-family: sans-serif;
font-size: 14px !important;
Expand Down Expand Up @@ -326,7 +337,7 @@

.mp-hidden-field {
display: none;
}
}

.mp_title_header {
font-family: sans-serif;
Expand All @@ -351,4 +362,4 @@

.mp_subtitle_mt {
margin-top: 0px !important;
}
}
2 changes: 1 addition & 1 deletion assets/css/config_mercadopago.min.css

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

Binary file modified assets/images/minilogo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
38 changes: 20 additions & 18 deletions assets/js/credit-card.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
showPaymentsLink();
});

$('body').on('keyup', '#mp-card-number', guessingPaymentMethod);
$('body').on('change', '#mp-card-number', guessingPaymentMethod);

/**
Expand Down Expand Up @@ -84,7 +83,7 @@
*
* @param {object} event
*/
function guessingPaymentMethod(event) {
function guessingPaymentMethod() {
hideErrors();
clearHolderName();
clearExpirationDate();
Expand All @@ -101,20 +100,10 @@
return;
}

if (event.type === 'keyup') {
if (bin.length >= 6) {
Mercadopago.getPaymentMethod({
'bin': bin
}, paymentMethodHandler);
}
} else {
setTimeout(function () {
if (bin.length >= 6) {
Mercadopago.getPaymentMethod({
'bin': bin
}, paymentMethodHandler);
}
}, 100);
if (bin.length >= 6) {
Mercadopago.getPaymentMethod({
'bin': bin
}, paymentMethodHandler);
}
}

Expand Down Expand Up @@ -191,7 +180,7 @@
document.getElementById('mp-issuer-div').style.display = 'block';
document.getElementById('installments-div').classList.remove('mp-col-md-12');
document.getElementById('installments-div').classList.add('mp-col-md-8');
Mercadopago.getIssuers(objPaymentMethod.id, issuersHandler);
Mercadopago.getIssuers(objPaymentMethod.id, getBin(), issuersHandler);
} else {
clearIssuer();
setInstallments();
Expand Down Expand Up @@ -341,24 +330,37 @@
document.getElementById('mp-issuer').innerHTML = '';
}

/**
* Clear input and change to default layout
*/
function clearDoc() {
document.getElementById('mp-doc-div').style.display = 'none';
document.getElementById('mp-doc-type-div').style.display = 'none';
document.getElementById('docType').innerHTML = '';
document.getElementById('docNumber').value = '';
}

/**
* Clear input
*/
function clearHolderName() {
document.getElementById('mp-card-holder-name').value = '';
}

/**
* Clear input
*/
function clearExpirationDate() {
document.getElementById('mp-card-expiration-date').value = '';
}

/**
* Clear input
*/
function clearSecurityCode() {
document.getElementById('mp-security-code').value = '';
}

/**
* Call insttalments with issuer ou not, depends on additionalInfoHandler()
*/
Expand Down Expand Up @@ -609,7 +611,7 @@
/**
*
* @param { obje } response
*/
*/
function showErrors(response) {
var form = getForm();
for (var x = 0; x < response.cause.length; x++) {
Expand Down
Loading

0 comments on commit d248ec1

Please sign in to comment.