Skip to content

Commit

Permalink
v0.4.0 - Release commit
Browse files Browse the repository at this point in the history
  • Loading branch information
FilipeMata committed Sep 21, 2018
1 parent 97bdf3d commit 191ed34
Show file tree
Hide file tree
Showing 14 changed files with 30 additions and 47 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# v0.4.0
- Delete: Bandeiras jcb, aura e discover do checkout da Gerencianet.
- Add: Bandeira hipertcard no checkout da Gerencianet.

# v0.3.0
- Add: Metodo de pagamento por boleto no painel administrativo.

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Módulo Oficial da Gerencianet para o Magento - Versão 0.3.0
# Módulo Oficial da Gerencianet para o Magento - Versão 0.4.0

**Em caso de dúvidas, você pode verificar a [Documentação](https://docs.gerencianet.com.br) da API na Gerencianet e, necessitando de mais detalhes ou informações, entre em contato com nossa consultoria técnica, via nossos [Canais de Comunicação](https://gerencianet.com.br/central-de-ajuda).**

Expand Down
4 changes: 1 addition & 3 deletions app/code/local/Gerencianet/Transparent/Model/Source/Cards.php
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,9 @@ class Gerencianet_Transparent_Model_Source_Cards extends Mage_Payment_Model_Sour
'visa' => 'Visa',
'mastercard' => 'Mastercard',
'amex' => 'American Express',
'jcb' => 'JCB',
'elo' => 'Elo',
'diners' => 'Diners',
'discover' => 'Discover',
'aura' => 'Aura'
'hipercard' => 'Hipercard'
);

/**
Expand Down
2 changes: 1 addition & 1 deletion app/code/local/Gerencianet/Transparent/etc/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<config>
<modules>
<Gerencianet_Transparent>
<version>0.3.0</version>
<version>0.4.0</version>
</Gerencianet_Transparent>
</modules>

Expand Down
2 changes: 1 addition & 1 deletion app/code/local/Gerencianet/Transparent/etc/system.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<show_in_store>1</show_in_store>
<fields>
<title_page translate="label">
<label>Versão do Módulo: v0.3.0</label>
<label>Versão do Módulo: v0.4.0</label>
<frontend_model>adminhtml/system_config_form_field_heading</frontend_model>
<sort_order>1</sort_order>
<show_in_default>1</show_in_default>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
$_code = $this->getMethodCode();
$isSandbox = Mage::helper('gerencianet_transparent')->isSandbox();
?>
<!-- v0.3.0 -->
<div class="gn-osc-payment-box">
<!-- v0.4.0 -->
<div class="gn-osc-billet-payment-box">
<ul class="form-list billet-payment" id="payment_form_<?php echo $_code ?>" style="display:none;">
<?php if ($this->order_total<5): ?>
<div class="alert-development">
Expand Down Expand Up @@ -86,11 +86,12 @@ $isSandbox = Mage::helper('gerencianet_transparent')->isSandbox();
</ul>
</div>
<style type="text/css">
.gn-osc-payment-box {
.gn-osc-billet-payment-box {
margin: 3px;
width: 100%;
display: table;
}
.gn-osc-payment-box input[type=text], .gn-osc-payment-box select {
.gn-osc-billet-payment-box input[type=text], .gn-osc-billet-payment-box select {
width: 100%;
}
.gn-billet-info-row {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
$_code = $this->getMethodCode();
$isSandbox = Mage::helper('gerencianet_transparent')->isSandbox();
?>
<!-- v0.3.0 -->
<div class="gn-osc-payment-box">

<div class="gn-osc-billet-payment-box">
<ul class="form-list billet-payment" id="payment_form_<?php echo $_code ?>" style="display:none;">
<?php if ($this->order_total<5): ?>
<div class="alert-development">
Expand Down Expand Up @@ -86,11 +86,12 @@ $isSandbox = Mage::helper('gerencianet_transparent')->isSandbox();
</ul>
</div>
<style type="text/css">
.gn-osc-payment-box {
.gn-osc-billet-payment-box {
margin: 3px;
width: 100%;
display: table;
}
.gn-osc-payment-box input[type=text], .gn-osc-payment-box select {
.gn-osc-billet-payment-box input[type=text], .gn-osc-billet-payment-box select {
width: 100%;
}
.gn-billet-info-row {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
$_code = $this->getMethodCode();
$isSandbox = Mage::helper('gerencianet_transparent')->isSandbox();
?>
<!-- v0.3.0 -->
<div class="gn-osc-payment-box">

<div class="gn-osc-card-payment-box">
<ul class="form-list" id="payment_form_<?php echo $_code ?>" style="display:none;">
<?php if ($this->order_total<5): ?>
<div class="alert-development">
Expand Down Expand Up @@ -322,11 +322,12 @@ Validation.defaultOptions.immediate = true;
</script>

<style type="text/css">
.gn-osc-payment-box {
.gn-osc-card-payment-box {
margin: 3px;
width: 100%;
display: table;
}
.gn-osc-payment-box input[type=text], .gn-osc-payment-box select {
.gn-osc-card-payment-box input[type=text], .gn-osc-card-payment-box select {
width: 100%;
}

Expand Down Expand Up @@ -508,13 +509,6 @@ if (jQuery!=undefined)
GerencianetTransparent.cardPaymentValidate();
});

jQuery( "#brand_jcb" ).click(function() {
jQuery('input[name="payment[cc_type]"][value="jcb"]').prop("checked", true);
saveBrandInFE('jcb');
GerencianetTransparent.calculateInstallments();
GerencianetTransparent.cardPaymentValidate();
});

jQuery( "#brand_elo" ).click(function() {
jQuery('input[name="payment[cc_type]"][value="elo"]').prop("checked", true);
saveBrandInFE('elo');
Expand All @@ -529,26 +523,13 @@ if (jQuery!=undefined)
GerencianetTransparent.cardPaymentValidate();
});

jQuery( "#brand_discover" ).click(function() {
jQuery('input[name="payment[cc_type]"][value="discover"]').prop("checked", true);
saveBrandInFE('discover');
jQuery( "#brand_hipercard" ).click(function() {
jQuery('input[name="payment[cc_type]"][value="hipercard"]').prop("checked", true);
saveBrandInFE('hipercard');
GerencianetTransparent.calculateInstallments();
GerencianetTransparent.cardPaymentValidate();
});

jQuery( "#brand_aura" ).click(function() {
jQuery('input[name="payment[cc_type]"][value="aura"]').prop("checked", true);
saveBrandInFE('aura');
GerencianetTransparent.calculateInstallments();
GerencianetTransparent.cardPaymentValidate();
});

/*if (verifyCPF(jQuery("#gerencianet_card_cc_data_cpf_cnpj").val()) || verifyCNPJ(jQuery("#gerencianet_card_cc_data_cpf_cnpj").val())) {
jQuery('#gerencianet_cc_cpf_cnpj_row').addClass("gn-hide");
} else {
jQuery('#gerencianet_cc_cpf_cnpj_row').removeClass("gn-hide");
}*/

if (verifyEmail(jQuery("#gerencianet_card_cc_data_email").val())) {
jQuery('#gerencianet_cc_email_row').addClass("gn-hide");
} else {
Expand All @@ -558,11 +539,9 @@ if (jQuery!=undefined)
if (brand=="visa" ||
brand=="mastercard" ||
brand=="amex" ||
brand=="jcb" ||
brand=="elo" ||
brand=="diners" ||
brand=="discover" ||
brand=="aura") {
brand=="hipercard") {
brand = null;
var $radios = jQuery("input:radio[name='payment[cc_type]']");
if($radios.is(':checked') === false && jQuery("#brandSave").val()!="") {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ public function send($method, $route, $body)

try {
return $this->request->send($method, $route, ['json' => $body,
'headers' => ['Authorization' => 'Bearer '.$this->auth->accessToken, 'api-sdk' => 'magento-0.3.0', 'partner-token' => $partner_token]]);
'headers' => ['Authorization' => 'Bearer '.$this->auth->accessToken, 'api-sdk' => 'magento-0.4.0', 'partner-token' => $partner_token]]);
} catch (AuthorizationException $e) {
$this->auth->authorize();

return $this->request->send($method, $route, ['json' => $body,
'headers' => ['Authorization' => 'Bearer '.$this->auth->accessToken, 'api-sdk' => 'magento-0.3.0', 'partner-token' => $partner_token]]);
'headers' => ['Authorization' => 'Bearer '.$this->auth->accessToken, 'api-sdk' => 'magento-0.4.0', 'partner-token' => $partner_token]]);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public function __construct(array $options = null)
'base_url' => $this->config['baseUri'],
'headers' => [
'Content-Type' => 'application/json',
'api-sdk' => 'magento-0.3.0',
'api-sdk' => 'magento-0.4.0',
'partner-token' => $partner_token
],
]);
Expand Down
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.

0 comments on commit 191ed34

Please sign in to comment.