+
+ getSideMenu(); ?>
+
+
__('Lista de Transações'); ?>
+
+ conciliação de suas transações para obter os status mais atuais.";
+ echo $helper->__($string);
+ ?>
+
+
+
+
+ __("Transação cancelada com sucesso!");
+ $canceledError = $helper->__("Não foi possível executar esta ação.
Utilize a conciliação de transações primeiro ou tente novamente mais tarde.");
+ ?>
+
+
+
__('Somente transações geradas a partir da versão 2.3 do módulo serão listadas.'); ?>
+
+
+
+
+
+
+
Transação
+
+
+
Pagamento
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lib/PagseguroPhpSdk/source/Domains/CreditorFees.php b/lib/PagseguroPhpSdk/source/Domains/CreditorFees.php
index 26cdcda..d34f516 100644
--- a/lib/PagseguroPhpSdk/source/Domains/CreditorFees.php
+++ b/lib/PagseguroPhpSdk/source/Domains/CreditorFees.php
@@ -38,6 +38,18 @@ class CreditorFees
* @var
*/
private $intermediationFeeAmount;
+ /**
+ * @var
+ */
+ private $installmentFeeAmount;
+ /**
+ * @var
+ */
+ private $operationalFeeAmount;
+ /**
+ * @var
+ */
+ private $commissionFeeAmount;
/**
* @return mixed
@@ -74,4 +86,57 @@ public function setIntermediationRateAmount($intermediationRateAmount)
$this->intermediationRateAmount = $intermediationRateAmount;
return $this;
}
+
+ /**
+ * @return mixed
+ */
+ public function getInstallmentFeeAmount()
+ {
+ return $this->installmentFeeAmount;
+ }
+
+ /**
+ * @param mixed $installmentFeeAmount
+ * @return CreditorFees
+ */
+ public function setInstallmentFeeAmount($installmentFeeAmount)
+ {
+ $this->installmentFeeAmount = $installmentFeeAmount;
+ return $this;
+ }
+
+ /**
+ * @return mixed
+ */
+ public function getOperationalFeeAmount()
+ {
+ return $this->operationalFeeAmount;
+ }
+
+ /**
+ * @param mixed $operationalFeeAmount
+ * @return CreditorFees
+ */
+ public function setOperationalFeeAmount($operationalFeeAmount)
+ {
+ $this->operationalFeeAmount = $operationalFeeAmount;
+ return $this;
+ }
+
+ /**
+ * @return mixed
+ */
+ public function getCommissionFeeAmount()
+ {
+ return $this->commissionFeeAmount;
+ }
+ /**
+ * @param mixed $commissionFeeAmount
+ * @return CreditorFees
+ */
+ public function setCommissionFeeAmount($commissionFeeAmount)
+ {
+ $this->commissionFeeAmount = $commissionFeeAmount;
+ return $this;
+ }
}
diff --git a/lib/PagseguroPhpSdk/source/Parsers/Response/CreditorFees.php b/lib/PagseguroPhpSdk/source/Parsers/Response/CreditorFees.php
index a3bfe39..0651bd1 100644
--- a/lib/PagseguroPhpSdk/source/Parsers/Response/CreditorFees.php
+++ b/lib/PagseguroPhpSdk/source/Parsers/Response/CreditorFees.php
@@ -61,6 +61,18 @@ public function setCreditorFees($creditorFees)
$creditor->setIntermediationFeeAmount(current($creditorFees->intermediationFeeAmount));
}
+ if (!is_null($creditorFees->installmentFeeAmount)) {
+ $creditor->setInstallmentFeeAmount(current($creditorFees->installmentFeeAmount));
+ }
+
+ if (!is_null($creditorFees->operationalFeeAmount)) {
+ $creditor->setOperationalFeeAmount(current($creditorFees->operationalFeeAmount));
+ }
+
+ if (!is_null($creditorFees->commissionFeeAmount)) {
+ $creditor->setCommissionFeeAmount(current($creditorFees->commissionFeeAmount));
+ }
+
$this->creditorFees = $creditor;
return $this;
}
diff --git a/lib/PagseguroPhpSdk/source/Parsers/Transaction/Response.php b/lib/PagseguroPhpSdk/source/Parsers/Transaction/Response.php
index d98fd67..ae3e977 100644
--- a/lib/PagseguroPhpSdk/source/Parsers/Transaction/Response.php
+++ b/lib/PagseguroPhpSdk/source/Parsers/Transaction/Response.php
@@ -79,6 +79,11 @@ class Response
*/
private $cancelationSource;
+ /**
+ * @var
+ */
+ private $promoCode;
+
public function getCancelationSource()
{
return $this->cancelationSource;
@@ -216,4 +221,22 @@ public function setType($type)
$this->type = $type;
return $this;
}
+
+ /**
+ * @return mixed
+ */
+ public function getPromoCode()
+ {
+ return $this->promoCode;
+ }
+
+ /**
+ * @param mixed $installmentCount
+ * @return Response
+ */
+ public function setPromoCode($promoCode)
+ {
+ $this->promoCode = $promoCode;
+ return $this;
+ }
}
diff --git a/lib/PagseguroPhpSdk/source/Parsers/Transaction/Search/Code/Request.php b/lib/PagseguroPhpSdk/source/Parsers/Transaction/Search/Code/Request.php
index 4cfd8ed..469b49f 100644
--- a/lib/PagseguroPhpSdk/source/Parsers/Transaction/Search/Code/Request.php
+++ b/lib/PagseguroPhpSdk/source/Parsers/Transaction/Search/Code/Request.php
@@ -78,7 +78,8 @@ public static function success(Http $http)
->setItemCount(current($xml->itemCount))
->setItems($xml->items)
->setSender($xml->sender)
- ->setShipping($xml->shipping);
+ ->setShipping($xml->shipping)
+ ->setPromoCode(current($xml->promoCode));
return $response;
}
diff --git a/skin/adminhtml/default/default/uol/pagseguro/css/pagseguro-module.css b/skin/adminhtml/default/default/uol/pagseguro/css/pagseguro-module.css
index 5d708ee..61e4339 100644
--- a/skin/adminhtml/default/default/uol/pagseguro/css/pagseguro-module.css
+++ b/skin/adminhtml/default/default/uol/pagseguro/css/pagseguro-module.css
@@ -70,6 +70,8 @@ limitations under the License.
#pagseguro-module label { color:inherit; margin:0; padding: 0.2em 0.5em 0 0; width: auto; font-weight: bold; float:none; line-height: 1em; font-size:1em; }
#pagseguro-module .config-area label { text-align: left; text-transform: uppercase; clear: both; display: block; }
#pagseguro-module .pagseguro-field { font-size: 1.2em; padding: 8px 4px; width: auto; border-radius: 3px; box-shadow: 0 2px 2px #DDDDDD inset; color: #4F4F4F; border: none; margin: 0; border: 1px solid #BCC6D0; background-color: #FFF; }
+#pagseguro-module .pagseguro-field-error { border-color: #dc3545 !important; }
+#pagseguro-module .pagseguro-field-error:focus {border-color: #843534; -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 6px #ce8483; box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 6px #ce8483; background-color: #FFF !important; }
#pagseguro-module select.pagseguro-field { padding-right: 1em; }
#pagseguro-module .pagseguro-field:focus { background-color: #F2F4F8; outline: none; border-color: #7E9DB9; }
#pagseguro-module .pagseguro-field:disabled { background-color: #DDD; }
@@ -81,6 +83,8 @@ limitations under the License.
#pagseguro-module .config-area select.pagseguro-field option { padding: 0.3em; }
#pagseguro-module .pagseguro-select-hint { float: left; margin: 0 1em 0 0; max-width: 20%; }
#pagseguro-module .pagseguro-option-hint { margin: 2.5em 0 4em 0; max-width: 100%; }
+#pagseguro-module .money { font-size: 16px; font-weight: 700; color: #333; display: inline-block; vertical-align: middle;
+}
/* Tables */
.pagseguro-table { border: 1px solid #e5e5e5; border-bottom-width: 3px; border-collapse: collapse; color: #444; width: 100%; }
@@ -100,6 +104,9 @@ limitations under the License.
.pagseguro-table tbody tr.unread td { color: #000; font-weight: bold; }
.pagseguro-table tbody td .link { display:block; padding: 0.5em 0.5em 0 0.5em; }
.pagseguro-table tbody td i { margin: 0 0.4em; font-size: 0.9em; }
+.pagseguro-table thead .input-search { vertical-align: middle; }
+.pagseguro-table thead tr th .input-date { margin-top: 5px !important; }
+#transaction-table thead tr:nth-child(2) th:nth-child(3) input { width: 255px; }
/* DataTable Sorting */
.dataTable .sorting { background-image: url("../images/dataTable/sort_both.png"); cursor:pointer; }
@@ -140,6 +147,38 @@ limitations under the License.
.pagseguro-button.theme-gray:hover,
.pagseguro-button.gray-theme:hover { background-color: #F9F9F9; }
.pagseguro-button[disabled] { background-color: #CCC !important; color: #FFF !important; }
+.pagseguro-button.align-right { float: right; }
+
+/*List Details*/
+.list-datails .group { border-bottom: solid 1px #DEDEDE; margin: 0 40px; padding: 10px 0; overflow: hidden; }
+.list-datails .group > div:not(:last-child) { display: flex; justify-content: flex-start; margin-bottom: 8px;}
+.list-datails .group h4 { margin-bottom: 0; }
+.list-datails > div:nth-child(3) { margin-top: 25px; }
+.list-datails .group > div > dl:not(:last-child) { margin-right: 40px; }
+.list-datails .group div dl:first-child { width: 112px; }
+.list-datails .group dl dd{ font-weight: 700; }
+.list-datails .table { background-color: #e9e9e9; padding: 10px 25px; margin-top: 5px; max-height: 92px; overflow: auto; }
+.list-datails .group-title { font-weight: 700; display: flex; flex-direction: row; justify-content: flex-start; margin-top: 7px; }
+.list-datails .group-title > div:not(:first-child), .itens-line > div:not(:first-child) { margin-right: 50px; }
+.list-datails .itens-cell { width: 70px; }
+.list-datails .description-cell { width: 200px; margin-right: 0 !important; }
+.list-datails .itens-line { display:flex; flex-flow: row wrap; justify-content: flex-start; }
+.list-datails .group .table .rate { display: flex; justify-content: flex-start; }
+.list-datails .group .table .rate dl { width: 140px; margin-top: 7px; margin-right: 45px; }
+
+/*Modal Details*/
+.modal { display: none; position: fixed; z-index: 101; padding-top: 100px; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; background-color: rgb(0,0,0); background-color: rgba(0,0,0,0.4); }
+.modal .modal-content { background-color: #fefefe; margin: auto; padding: 20px; border: 1px solid #888; width: 60%; border-radius: 10px; max-height: 500px; }
+.modal .modal-content-refund { background-color: #fefefe; margin: auto; padding: 20px; padding-bottom: 50px; border: 1px solid #888; width: 20%; border-radius: 10px; }
+.modal .modal-content-refund form div input{ width: 90px !important; }
+.modal .modal-content-refund form div label{ font-size: 16px !important; font-weight: 700 !important; color: #333 !important; display: inline-block; vertical-align: middle; }
+.modal .close { color: #aaaaaa; float: right; font-size: 28px; font-weight: bold; }
+.modal .close:hover, .close:focus { color: #000; text-decoration: none; cursor: pointer; }
+#modal-close { padding: 12px; cursor: pointer; border: 0; border-radius: 50%; z-index: 10; background: center no-repeat #FFF url(data:image/gif;base64,R0lGODlhCgAKALMAANXV1dTU1O/v7/Dw8Ovr6+zs7Lu7u8DAwPX19QAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAAAAAAALAAAAAAKAAoAAAQqEKEhJZXgFFkOQMJhaN0oIIR4qESVGmNblePGqeo2sO9BBQdZKlC5WCQRADs=); box-shadow: -1px 1px 13px rgba(0, 0, 0, 0.4); float: right; margin-top: -30px; margin-right: -30px; }
+.group-side { float: left; width: 48%; padding: 0 2% 0 0; }
+.group-full { float: none; width: auto; clear: both; }
+.hidden-groups { display: none; }
+.hidden-itens { text-align: right; width: auto; float: right; margin-right: 90px; margin-inline-start: auto; margin-top: -18px; }
/* Messages */
.pagseguro-msg h3 > a { color:#035EC7!important }
@@ -215,6 +254,7 @@ i.icon-pagseguro-msg.large,
#pagseguro-module-contents #refund-info { margin-top: 40px; }
#pagseguro-module-contents #canceled-info { margin-top: 40px; }
#pagseguro-module-contents #abandoned-info { margin-top: 40px; }
+#pagseguro-module-contents #list-info { margin-top: 40px; }
#pagseguro-loading-message { width: 65px; }
#pagseguro-module-menu ul ul li { display: none; }
#pagseguro-module-menu ul li.open ul li,
diff --git a/skin/adminhtml/default/default/uol/pagseguro/js/pagseguro-module.js b/skin/adminhtml/default/default/uol/pagseguro/js/pagseguro-module.js
index 8ff1dae..7467afa 100644
--- a/skin/adminhtml/default/default/uol/pagseguro/js/pagseguro-module.js
+++ b/skin/adminhtml/default/default/uol/pagseguro/js/pagseguro-module.js
@@ -448,3 +448,110 @@ jQuery(document).ready(function () {
}
})
})
+
+/* ************************************* */
+/* *************** DATE **************** */
+/* ************************************* */
+
+function dateMask (date, fieldName) {
+ var mydate = '';
+ var field = document.getElementById(fieldName);
+ mydate = mydate + date;
+ if (mydate.length == 2 && event.keyCode != 8){
+ mydate = mydate + '/';
+ field.value = mydate;
+ }
+ if (mydate.length == 5 && event.keyCode != 8){
+ mydate = mydate + '/';
+ field.value = mydate;
+ }
+ if (mydate.length == 10){
+ dateVerify(field);
+ }
+
+ if (field.value == "") {
+ field.classList.remove('pagseguro-field-error');
+ }
+}
+
+function dateVerifyOnLosesFocus(fieldName){
+ var mydate = '';
+ mydate = mydate + fieldName.value;
+
+ if(mydate.length > 0 && mydate.length < 10){
+ fieldName.classList.add('pagseguro-field-error');
+ }else{
+ dateVerify(fieldName);
+ }
+}
+
+function dateVerify (field) {
+
+ day = (field.value.substring(0,2));
+ month = (field.value.substring(3,5));
+ year = (field.value.substring(6,10));
+
+ situacao = "";
+
+ if ( isNaN(day) || ((day < 01)||(day < 01 || day > 30) && ( month == 04 || month == 06 || month == 09 || month == 11 ) || day > 31)) {
+ situacao = "false";
+ }
+
+ if ( isNaN(month) || month < 01 || month > 12 ) {
+ situacao = "false";
+ }
+
+ if ( isNaN(year) || month == 2 && ( day < 01 || day > 29 || ( day > 28 && (parseInt(year / 4) != year / 4)))) {
+ situacao = "false";
+ }
+
+ if (situacao == "false") {
+ field.classList.add('pagseguro-field-error');
+ }else{
+ field.classList.remove('pagseguro-field-error');
+ }
+ return;
+}
+
+function validateSearchByDate() {
+ var fieldDateFromValue = document.getElementById('date_begin').value;
+ var fieldDateToValue = document.getElementById('date_end').value;
+
+ if ((fieldDateFromValue.length > 0 && fieldDateToValue.length == 0) || (fieldDateFromValue.length == 0 && fieldDateToValue.length > 0)) {
+ Modal.message('alert', 'Data de início e fim devem ser informadas!');
+ return false;
+ }
+
+ dayFrom = (fieldDateFromValue.substring(0,2));
+ monthFrom = (fieldDateFromValue.substring(3,5));
+ yearFrom = (fieldDateFromValue.substring(6,10));
+
+ dayTo = (fieldDateToValue.substring(0,2));
+ monthTo = (fieldDateToValue.substring(3,5));
+ yearTo = (fieldDateToValue.substring(6,10));
+
+ var dateFrom = new Date(yearFrom, monthFrom, dayFrom);
+ var dateTo = new Date(yearTo, monthTo, dayTo);
+
+ if (dateFrom > dateTo) {
+ Modal.message('alert', 'Data de início maior que a data de fim!');
+ return false;
+ }
+
+ return true;
+}
+
+/* ************************************* */
+/* *************** MONEY *************** */
+/* ************************************* */
+
+function formatReal( int )
+{
+ var tmp = int+'';
+ tmp = tmp.replace(".", "");
+ tmp = tmp.replace(/([0-9]{2})$/g, ",$1");
+ if( tmp.length > 6 )
+ tmp = tmp.replace(/([0-9]{3}),([0-9]{2}$)/g, ".$1,$2");
+
+ return tmp;
+}
\ No newline at end of file