Version Notes
- Remove the payment methods for 3,4 and 5 credit cards
- Refact in 2 credit cards payment method
- Add integration error 400/500 reason in Magento admin (order data screen).
- Fix no cancelation order when error 400 occurs.
Download this release
Release Info
Developer | MundiPagg |
Extension | Mundipagg_Integracao |
Version | 2.9.6 |
Comparing to | |
See all releases |
Code changes from version 2.9.5 to 2.9.6
- app/code/community/Uecommerce/Mundipagg/Block/Info.php +79 -35
- app/code/community/Uecommerce/Mundipagg/Block/Standard/Form.php +13 -0
- app/code/community/Uecommerce/Mundipagg/Helper/CheckoutSession.php +28 -0
- app/code/community/Uecommerce/Mundipagg/Helper/Log.php +2 -0
- app/code/community/Uecommerce/Mundipagg/Model/Api.php +38 -139
- app/code/community/Uecommerce/Mundipagg/Model/Observer.php +5 -5
- app/code/community/Uecommerce/Mundipagg/Model/Order/Payment.php +27 -0
- app/code/community/Uecommerce/Mundipagg/Model/Standard.php +246 -45
- app/code/community/Uecommerce/Mundipagg/controllers/StandardController.php +29 -140
- app/code/community/Uecommerce/Mundipagg/etc/config.xml +1 -1
- app/code/community/Uecommerce/Mundipagg/etc/system.xml +0 -243
- app/code/community/Uecommerce/Mundipagg/sql/mundipagg_setup/mysql4-upgrade-2.9.4-2.9.5.php +18 -0
- app/design/adminhtml/default/default/template/mundipagg/payment/info/mundipagg.phtml +41 -135
- app/design/frontend/base/default/template/mundipagg/form.phtml +4 -3
- app/design/frontend/rwd/default/template/mundipagg/form.phtml +381 -306
- app/locale/pt_BR/Uecommerce_Mundipagg.csv +8 -1
- package.xml +11 -6
app/code/community/Uecommerce/Mundipagg/Block/Info.php
CHANGED
@@ -27,50 +27,94 @@
|
|
27 |
* @package Uecommerce_Mundipagg
|
28 |
* @author Uecommerce Dev Team
|
29 |
*/
|
|
|
30 |
|
31 |
-
|
32 |
-
{
|
33 |
-
protected function _construct()
|
34 |
-
{
|
35 |
parent::_construct();
|
36 |
$this->setTemplate('mundipagg/payment/info/mundipagg.phtml');
|
37 |
}
|
38 |
-
|
39 |
/**
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
public function getOrder()
|
45 |
-
{
|
46 |
return Mage::registry('current_order');
|
47 |
}
|
48 |
-
|
49 |
/**
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
public function getInvoice()
|
55 |
-
{
|
56 |
return Mage::registry('current_invoice');
|
57 |
}
|
58 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
59 |
/**
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
76 |
}
|
27 |
* @package Uecommerce_Mundipagg
|
28 |
* @author Uecommerce Dev Team
|
29 |
*/
|
30 |
+
class Uecommerce_Mundipagg_Block_Info extends Mage_Payment_Block_Info {
|
31 |
|
32 |
+
protected function _construct() {
|
|
|
|
|
|
|
33 |
parent::_construct();
|
34 |
$this->setTemplate('mundipagg/payment/info/mundipagg.phtml');
|
35 |
}
|
36 |
+
|
37 |
/**
|
38 |
+
* Retrieve order model instance
|
39 |
+
*
|
40 |
+
* @return Mage_Sales_Model_Order
|
41 |
+
*/
|
42 |
+
public function getOrder() {
|
|
|
43 |
return Mage::registry('current_order');
|
44 |
}
|
45 |
+
|
46 |
/**
|
47 |
+
* Retrieve invoice model instance
|
48 |
+
*
|
49 |
+
* @return Mage_Sales_Model_Order_Invoice
|
50 |
+
*/
|
51 |
+
public function getInvoice() {
|
|
|
52 |
return Mage::registry('current_invoice');
|
53 |
}
|
54 |
+
|
55 |
+
/**
|
56 |
+
* Retrieve shipment model instance
|
57 |
+
*
|
58 |
+
* @return Mage_Sales_Model_Order_Shipment
|
59 |
+
*/
|
60 |
+
public function getShipment() {
|
61 |
+
return Mage::registry('current_shipment');
|
62 |
+
}
|
63 |
+
|
64 |
+
/**
|
65 |
+
* Retrieve payment method
|
66 |
+
*/
|
67 |
+
public function getFormaPagamento() {
|
68 |
+
return $this->getInfo()->getAdditionalInformation('PaymentMethod');
|
69 |
+
}
|
70 |
+
|
71 |
/**
|
72 |
+
* @param $ccQty credit card quantity
|
73 |
+
* @param $ccPos credit card position
|
74 |
+
* @return array|mixed|null
|
75 |
+
*/
|
76 |
+
public function getCcBrand($ccPos) {
|
77 |
+
return $this->getInfo()->getAdditionalInformation("{$ccPos}_CreditCardBrand");
|
78 |
+
}
|
79 |
+
|
80 |
+
public function getCcValue($ccPos) {
|
81 |
+
$value = $this->getInfo()->getAdditionalInformation("{$ccPos}_AmountInCents") * 0.01;
|
82 |
+
|
83 |
+
return Mage::helper('core')->currency($value, true, false);
|
84 |
+
}
|
85 |
+
|
86 |
+
public function getInstallmentsNumber($ccQty, $ccPos) {
|
87 |
+
if ($ccQty == 1) {
|
88 |
+
$installments = $this->getInfo()->getAdditionalInformation("mundipagg_creditcard_credito_parcelamento_1_1");
|
89 |
+
} else {
|
90 |
+
$installments = $this->getInfo()
|
91 |
+
->getAdditionalInformation("mundipagg_twocreditcards_credito_parcelamento_{$ccQty}_{$ccPos}");
|
92 |
+
}
|
93 |
+
|
94 |
+
|
95 |
+
$installments .= "x";
|
96 |
+
|
97 |
+
return $installments;
|
98 |
+
}
|
99 |
+
|
100 |
+
public function getAuthorizationCode($ccPos) {
|
101 |
+
$authCode = $this->getInfo()->getAdditionalInformation("{$ccPos}_AuthorizationCode");
|
102 |
+
|
103 |
+
if (empty($authCode)) {
|
104 |
+
$authCode = "N/A";
|
105 |
+
}
|
106 |
+
|
107 |
+
return $authCode;
|
108 |
+
}
|
109 |
+
|
110 |
+
public function getTransactionId($ccPos) {
|
111 |
+
$txnId = $this->getInfo()->getAdditionalInformation("{$ccPos}_TransactionIdentifier");
|
112 |
+
|
113 |
+
if (empty($txnId)) {
|
114 |
+
$txnId = "N/A";
|
115 |
+
}
|
116 |
+
|
117 |
+
return $txnId;
|
118 |
+
}
|
119 |
+
|
120 |
}
|
app/code/community/Uecommerce/Mundipagg/Block/Standard/Form.php
CHANGED
@@ -87,4 +87,17 @@ class Uecommerce_Mundipagg_Block_Standard_Form extends Mage_Payment_Block_Form
|
|
87 |
return Mage::helper('mundipagg/installments')->getInstallmentForCreditCardType($ccType);
|
88 |
|
89 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
90 |
}
|
87 |
return Mage::helper('mundipagg/installments')->getInstallmentForCreditCardType($ccType);
|
88 |
|
89 |
}
|
90 |
+
|
91 |
+
/**
|
92 |
+
* @return Mage_Sales_Model_Order
|
93 |
+
*/
|
94 |
+
public function loadOrder(){
|
95 |
+
/** @var Mage_Sales_Model_Quote $quote */
|
96 |
+
$quote = Mage::getSingleton('checkout/session')->getQuote();
|
97 |
+
|
98 |
+
/** @var Mage_Sales_Model_Order $order */
|
99 |
+
$order = Mage::getModel('sales/order')->loadByIncrementId($quote->getReservedOrderId());
|
100 |
+
|
101 |
+
return $order;
|
102 |
+
}
|
103 |
}
|
app/code/community/Uecommerce/Mundipagg/Helper/CheckoutSession.php
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Helper methods to checkout session
|
5 |
+
*/
|
6 |
+
class Uecommerce_Mundipagg_Helper_CheckoutSession extends Mage_Core_Helper_Abstract {
|
7 |
+
|
8 |
+
public function getInstance() {
|
9 |
+
return Mage::getSingleton('checkout/session');
|
10 |
+
}
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Get approval_request_success flag from checkout session
|
14 |
+
* @return null|string
|
15 |
+
*/
|
16 |
+
public function getApprovalRequest() {
|
17 |
+
return $this->getInstance()->getApprovalRequestSuccess();
|
18 |
+
}
|
19 |
+
|
20 |
+
/**
|
21 |
+
* Set approval_request_success flag into checkout session
|
22 |
+
* @param string $flag
|
23 |
+
*/
|
24 |
+
public function setApprovalRequest($flag) {
|
25 |
+
$this->getInstance()->setApprovalRequestSuccess($flag);
|
26 |
+
}
|
27 |
+
|
28 |
+
}
|
app/code/community/Uecommerce/Mundipagg/Helper/Log.php
CHANGED
@@ -14,10 +14,12 @@ class Uecommerce_Mundipagg_Helper_Log extends Mage_Core_Helper_Abstract {
|
|
14 |
|
15 |
public function setMethod($method) {
|
16 |
$this->method = $method;
|
|
|
17 |
}
|
18 |
|
19 |
public function setLogLabel($logLabel) {
|
20 |
$this->logLabel = $logLabel;
|
|
|
21 |
}
|
22 |
|
23 |
public function getLogLabel() {
|
14 |
|
15 |
public function setMethod($method) {
|
16 |
$this->method = $method;
|
17 |
+
return $this;
|
18 |
}
|
19 |
|
20 |
public function setLogLabel($logLabel) {
|
21 |
$this->logLabel = $logLabel;
|
22 |
+
return $this;
|
23 |
}
|
24 |
|
25 |
public function getLogLabel() {
|
app/code/community/Uecommerce/Mundipagg/Model/Api.php
CHANGED
@@ -88,7 +88,9 @@ class Uecommerce_Mundipagg_Model_Api extends Uecommerce_Mundipagg_Model_Standard
|
|
88 |
$num = $helper->getCreditCardsNumber($data['payment_method']);
|
89 |
$installmentCount = 1;
|
90 |
|
91 |
-
|
|
|
|
|
92 |
$creditCardOperationEnum = 'AuthOnly';
|
93 |
} else {
|
94 |
$creditCardOperationEnum = $standard->getCreditCardOperationEnum();
|
@@ -106,8 +108,8 @@ class Uecommerce_Mundipagg_Model_Api extends Uecommerce_Mundipagg_Model_Standard
|
|
106 |
if ($token->getId() && $token->getEntityId() == $order->getCustomerId()) {
|
107 |
$creditcardTransactionData->CreditCard->InstantBuyKey = $token->getToken();
|
108 |
$creditcardTransactionData->CreditCard->CreditCardBrand = $token->getCcType();
|
109 |
-
$creditcardTransactionData->CreditCardOperation = $creditCardOperationEnum;
|
110 |
/** Tipo de operação: AuthOnly | AuthAndCapture | AuthAndCaptureWithDelay */
|
|
|
111 |
$creditcardTransactionData->AmountInCents = intval(strval(($paymentData['AmountInCents']))); // Valor da transação
|
112 |
$creditcardTransactionData->InstallmentCount = $paymentData['InstallmentCount']; // Nº de parcelas
|
113 |
$creditcardTransactionData->Options->CurrencyIso = "BRL"; //Moeda do pedido
|
@@ -286,10 +288,6 @@ class Uecommerce_Mundipagg_Model_Api extends Uecommerce_Mundipagg_Model_Standard
|
|
286 |
$result['CreateDate'] = $createDate;
|
287 |
}
|
288 |
|
289 |
-
/**
|
290 |
-
* @TODO precisa refatorar isto, pois deste jeito esta gravando offlineretry pra que qualquer pedido
|
291 |
-
* com mais de 1 cartao
|
292 |
-
*/
|
293 |
// save offline retry statements if this feature is enabled
|
294 |
$this->saveOfflineRetryStatements($orderReference, new DateTime($createDate));
|
295 |
|
@@ -352,7 +350,6 @@ class Uecommerce_Mundipagg_Model_Api extends Uecommerce_Mundipagg_Model_Standard
|
|
352 |
}
|
353 |
} catch (Exception $e) {
|
354 |
//Redirect to Cancel page
|
355 |
-
|
356 |
Mage::getSingleton('checkout/session')->setApprovalRequestSuccess('cancel');
|
357 |
|
358 |
//Log error
|
@@ -441,15 +438,10 @@ class Uecommerce_Mundipagg_Model_Api extends Uecommerce_Mundipagg_Model_Standard
|
|
441 |
$helper = Mage::helper('mundipagg');
|
442 |
|
443 |
// Set Data
|
444 |
-
$_request =
|
445 |
-
$_request["Order"] =
|
446 |
$_request["Order"]["OrderReference"] = $order->getIncrementId();
|
447 |
-
|
448 |
-
// if ($standard->getEnvironment() != 'production') {
|
449 |
-
// $_request["Order"]["OrderReference"] = md5(date('Y-m-d H:i:s')); // Identificação do pedido na loja
|
450 |
-
// }
|
451 |
-
|
452 |
-
$_request["BoletoTransactionCollection"] = array();
|
453 |
|
454 |
$boletoTransactionCollection = new stdclass();
|
455 |
|
@@ -1395,6 +1387,13 @@ class Uecommerce_Mundipagg_Model_Api extends Uecommerce_Mundipagg_Model_Standard
|
|
1395 |
return $returnMessage;
|
1396 |
}
|
1397 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1398 |
// cannot capture transaction
|
1399 |
$returnMessage = "KO | #{$orderReference} | {$transactionKey} | Transaction can't be captured: ";
|
1400 |
$returnMessage .= $return;
|
@@ -1720,65 +1719,43 @@ class Uecommerce_Mundipagg_Model_Api extends Uecommerce_Mundipagg_Model_Standard
|
|
1720 |
|
1721 |
$totalPaid += $amountToCapture;
|
1722 |
|
|
|
1723 |
$transactions = Mage::getModel('sales/order_payment_transaction')
|
1724 |
->getCollection()
|
1725 |
-
->addAttributeToFilter('order_id',
|
1726 |
-
|
1727 |
-
foreach ($transactions as $i) {
|
1728 |
-
$orderTransactionKey = $i->getAdditionalInformation('TransactionKey');
|
1729 |
|
1730 |
-
|
1731 |
-
|
1732 |
-
$transaction = $i;
|
1733 |
-
break;
|
1734 |
-
}
|
1735 |
-
}
|
1736 |
|
1737 |
-
if (is_null($
|
1738 |
Mage::throwException(self::TRANSACTION_NOT_FOUND);
|
|
|
|
|
1739 |
}
|
1740 |
|
1741 |
if ($transaction->getIsClosed() == true) {
|
1742 |
Mage::throwException(self::TRANSACTION_ALREADY_CAPTURED);
|
1743 |
}
|
1744 |
|
|
|
|
|
|
|
|
|
1745 |
$accTotalPaid = sprintf($totalPaid);
|
1746 |
$accGrandTotal = sprintf($grandTotal);
|
1747 |
|
1748 |
switch (true) {
|
1749 |
-
|
1750 |
// total paid equal grand_total, create invoice
|
1751 |
case $accTotalPaid == $accGrandTotal:
|
1752 |
-
$invoice = null;
|
1753 |
-
|
1754 |
try {
|
1755 |
-
$
|
1756 |
-
->setTotalPaid(null)
|
1757 |
-
->save();
|
1758 |
|
1759 |
-
$invoice
|
1760 |
|
1761 |
} catch (Exception $e) {
|
1762 |
Mage::throwException($e->getMessage());
|
1763 |
}
|
1764 |
-
|
1765 |
-
// close transaction
|
1766 |
-
$transactionToClose = $this->getOrderTxnByTransactionKey($order->getId(), $transactionKey);
|
1767 |
-
|
1768 |
-
if (is_null($transactionToClose)) {
|
1769 |
-
$log->warning("Transaction not found");
|
1770 |
-
} else {
|
1771 |
-
$payment = $order->getPayment();
|
1772 |
-
|
1773 |
-
$transactionToClose->setOrderPaymentObject($payment)
|
1774 |
-
->setIsClosed(true)
|
1775 |
-
->save();
|
1776 |
-
}
|
1777 |
-
|
1778 |
-
$this->equalizeInvoiceTotals($invoice);
|
1779 |
-
|
1780 |
-
return $invoice;
|
1781 |
-
|
1782 |
break;
|
1783 |
|
1784 |
// order overpaid
|
@@ -1800,7 +1777,14 @@ class Uecommerce_Mundipagg_Model_Api extends Uecommerce_Mundipagg_Model_Standard
|
|
1800 |
Mage::throwException("Cannot set order to underpaid: {$e->getMessage()}");
|
1801 |
}
|
1802 |
|
1803 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1804 |
break;
|
1805 |
|
1806 |
// unexpected situation
|
@@ -1808,11 +1792,11 @@ class Uecommerce_Mundipagg_Model_Api extends Uecommerce_Mundipagg_Model_Standard
|
|
1808 |
Mage::throwException(self::UNEXPECTED_ERROR);
|
1809 |
break;
|
1810 |
}
|
1811 |
-
|
1812 |
}
|
1813 |
|
1814 |
/**
|
1815 |
* Create invoice
|
|
|
1816 |
* @return string OK|KO
|
1817 |
*/
|
1818 |
private function createInvoice($order, $data, $totalPaid, $status) {
|
@@ -1938,91 +1922,6 @@ class Uecommerce_Mundipagg_Model_Api extends Uecommerce_Mundipagg_Model_Standard
|
|
1938 |
return array('result' => simplexml_load_string($_response));
|
1939 |
}
|
1940 |
|
1941 |
-
/**
|
1942 |
-
* Status reference:
|
1943 |
-
* http://docs.mundipagg.com/docs/enumera%C3%A7%C3%B5es
|
1944 |
-
*
|
1945 |
-
* @param array $postData
|
1946 |
-
* @TODO refatorar o tratamento das transacoes com este metodo
|
1947 |
-
*/
|
1948 |
-
private function processCreditCardTransactionNotification($postData) {
|
1949 |
-
$status = $postData['CreditCardTransaction']['CreditCardTransactionStatus'];
|
1950 |
-
$transactionKey = $postData['CreditCardTransaction']['TransactionKey'];
|
1951 |
-
$capturedAmountInCents = $postData['CreditCardTransaction']['CapturedAmountInCents'];
|
1952 |
-
$ccTransactionEnum = new Uecommerce_Mundipagg_Model_Enum_CreditCardTransactionStatusEnum();
|
1953 |
-
$helperLog = new Uecommerce_Mundipagg_Helper_Log(__METHOD__);
|
1954 |
-
|
1955 |
-
switch ($status) {
|
1956 |
-
case $ccTransactionEnum::AUTHORIZED_PENDING_CAPTURE:
|
1957 |
-
break;
|
1958 |
-
|
1959 |
-
case $ccTransactionEnum::CAPTURED:
|
1960 |
-
break;
|
1961 |
-
|
1962 |
-
case $ccTransactionEnum::PARTIAL_CAPTURE:
|
1963 |
-
break;
|
1964 |
-
|
1965 |
-
case $ccTransactionEnum::NOT_AUTHORIZED:
|
1966 |
-
break;
|
1967 |
-
|
1968 |
-
case $ccTransactionEnum::VOIDED:
|
1969 |
-
break;
|
1970 |
-
|
1971 |
-
case $ccTransactionEnum::PENDING_VOID:
|
1972 |
-
break;
|
1973 |
-
|
1974 |
-
case $ccTransactionEnum::PARTIAL_VOID:
|
1975 |
-
break;
|
1976 |
-
|
1977 |
-
case $ccTransactionEnum::REFUNDED:
|
1978 |
-
break;
|
1979 |
-
|
1980 |
-
case $ccTransactionEnum::PENDING_REFUND:
|
1981 |
-
break;
|
1982 |
-
|
1983 |
-
case $ccTransactionEnum::PARTIAL_REFUNDED:
|
1984 |
-
break;
|
1985 |
-
|
1986 |
-
case $ccTransactionEnum::WITH_ERROR:
|
1987 |
-
break;
|
1988 |
-
|
1989 |
-
case $ccTransactionEnum::NOT_FOUND_ACQUIRER:
|
1990 |
-
break;
|
1991 |
-
|
1992 |
-
case $ccTransactionEnum::PENDING_AUTHORIZE:
|
1993 |
-
break;
|
1994 |
-
|
1995 |
-
case $ccTransactionEnum::INVALID:
|
1996 |
-
break;
|
1997 |
-
}
|
1998 |
-
}
|
1999 |
-
|
2000 |
-
/**
|
2001 |
-
* @author Ruan Azevedo
|
2002 |
-
* @since 2016-07-20
|
2003 |
-
* Status reference:
|
2004 |
-
* http://docs.mundipagg.com/docs/enumera%C3%A7%C3%B5es
|
2005 |
-
* @TODO refatorar o tratamento das transacoes de boleto com este metodo
|
2006 |
-
*/
|
2007 |
-
private function processBoletoTransactionNotification() {
|
2008 |
-
$status = '';
|
2009 |
-
$boletoTransactionEnum = new Uecommerce_Mundipagg_Model_Enum_BoletoTransactionStatusEnum();
|
2010 |
-
|
2011 |
-
switch ($status) {
|
2012 |
-
case $boletoTransactionEnum::GENERATED:
|
2013 |
-
break;
|
2014 |
-
|
2015 |
-
case $boletoTransactionEnum::PAID:
|
2016 |
-
break;
|
2017 |
-
|
2018 |
-
case $boletoTransactionEnum::UNDERPAID:
|
2019 |
-
break;
|
2020 |
-
|
2021 |
-
case $boletoTransactionEnum::OVERPAID:
|
2022 |
-
break;
|
2023 |
-
}
|
2024 |
-
}
|
2025 |
-
|
2026 |
/**
|
2027 |
* Mail error to Mage::getStoreConfig('trans_email/ident_custom1/email')
|
2028 |
*
|
@@ -2107,7 +2006,6 @@ class Uecommerce_Mundipagg_Model_Api extends Uecommerce_Mundipagg_Model_Standard
|
|
2107 |
|
2108 |
if ($error) {
|
2109 |
$helperLog->error($outputMsg, true);
|
2110 |
-
// Mage::throwException($outputMsg);
|
2111 |
}
|
2112 |
|
2113 |
if (is_null($sessionId)) {
|
@@ -2128,6 +2026,7 @@ class Uecommerce_Mundipagg_Model_Api extends Uecommerce_Mundipagg_Model_Standard
|
|
2128 |
|
2129 |
/**
|
2130 |
* Method to unify the transactions requests and his logs
|
|
|
2131 |
*
|
2132 |
* @since 05-24-2016
|
2133 |
* @param array $dataToPost
|
88 |
$num = $helper->getCreditCardsNumber($data['payment_method']);
|
89 |
$installmentCount = 1;
|
90 |
|
91 |
+
$approvalRequest = Mage::getSingleton('checkout/session')->getApprovalRequestSuccess();
|
92 |
+
|
93 |
+
if ($num > 1 || $approvalRequest === 'partial') {
|
94 |
$creditCardOperationEnum = 'AuthOnly';
|
95 |
} else {
|
96 |
$creditCardOperationEnum = $standard->getCreditCardOperationEnum();
|
108 |
if ($token->getId() && $token->getEntityId() == $order->getCustomerId()) {
|
109 |
$creditcardTransactionData->CreditCard->InstantBuyKey = $token->getToken();
|
110 |
$creditcardTransactionData->CreditCard->CreditCardBrand = $token->getCcType();
|
|
|
111 |
/** Tipo de operação: AuthOnly | AuthAndCapture | AuthAndCaptureWithDelay */
|
112 |
+
$creditcardTransactionData->CreditCardOperation = $creditCardOperationEnum;
|
113 |
$creditcardTransactionData->AmountInCents = intval(strval(($paymentData['AmountInCents']))); // Valor da transação
|
114 |
$creditcardTransactionData->InstallmentCount = $paymentData['InstallmentCount']; // Nº de parcelas
|
115 |
$creditcardTransactionData->Options->CurrencyIso = "BRL"; //Moeda do pedido
|
288 |
$result['CreateDate'] = $createDate;
|
289 |
}
|
290 |
|
|
|
|
|
|
|
|
|
291 |
// save offline retry statements if this feature is enabled
|
292 |
$this->saveOfflineRetryStatements($orderReference, new DateTime($createDate));
|
293 |
|
350 |
}
|
351 |
} catch (Exception $e) {
|
352 |
//Redirect to Cancel page
|
|
|
353 |
Mage::getSingleton('checkout/session')->setApprovalRequestSuccess('cancel');
|
354 |
|
355 |
//Log error
|
438 |
$helper = Mage::helper('mundipagg');
|
439 |
|
440 |
// Set Data
|
441 |
+
$_request = [];
|
442 |
+
$_request["Order"] = [];
|
443 |
$_request["Order"]["OrderReference"] = $order->getIncrementId();
|
444 |
+
$_request["BoletoTransactionCollection"] = [];
|
|
|
|
|
|
|
|
|
|
|
445 |
|
446 |
$boletoTransactionCollection = new stdclass();
|
447 |
|
1387 |
return $returnMessage;
|
1388 |
}
|
1389 |
|
1390 |
+
if ($return === self::TRANSACTION_CAPTURED) {
|
1391 |
+
$returnMessage = "OK | #{$orderReference} | {$transactionKey} | Transaction captured.";
|
1392 |
+
$helperLog->info($returnMessage);
|
1393 |
+
|
1394 |
+
return $returnMessage;
|
1395 |
+
}
|
1396 |
+
|
1397 |
// cannot capture transaction
|
1398 |
$returnMessage = "KO | #{$orderReference} | {$transactionKey} | Transaction can't be captured: ";
|
1399 |
$returnMessage .= $return;
|
1719 |
|
1720 |
$totalPaid += $amountToCapture;
|
1721 |
|
1722 |
+
/** @var Mage_Sales_Model_Resource_Order_Payment_Transaction_Collection $transactions */
|
1723 |
$transactions = Mage::getModel('sales/order_payment_transaction')
|
1724 |
->getCollection()
|
1725 |
+
->addAttributeToFilter('order_id', ['eq' => $order->getEntityId()])
|
1726 |
+
->addAttributeToFilter('txn_id', ['eq' => "{$transactionKey}-authorization"]);
|
|
|
|
|
1727 |
|
1728 |
+
$transaction = $transactions->getFirstItem();
|
1729 |
+
$txnsFound = count($transactions);
|
|
|
|
|
|
|
|
|
1730 |
|
1731 |
+
if (is_null($transactions) || $txnsFound <= 0) {
|
1732 |
Mage::throwException(self::TRANSACTION_NOT_FOUND);
|
1733 |
+
} else if ($txnsFound > 1) {
|
1734 |
+
Mage::throwException("More than one transaction for the TransactionKey in the database");
|
1735 |
}
|
1736 |
|
1737 |
if ($transaction->getIsClosed() == true) {
|
1738 |
Mage::throwException(self::TRANSACTION_ALREADY_CAPTURED);
|
1739 |
}
|
1740 |
|
1741 |
+
$order->setBaseTotalPaid($totalPaid)
|
1742 |
+
->setTotalPaid($totalPaid)
|
1743 |
+
->save();
|
1744 |
+
|
1745 |
$accTotalPaid = sprintf($totalPaid);
|
1746 |
$accGrandTotal = sprintf($grandTotal);
|
1747 |
|
1748 |
switch (true) {
|
|
|
1749 |
// total paid equal grand_total, create invoice
|
1750 |
case $accTotalPaid == $accGrandTotal:
|
|
|
|
|
1751 |
try {
|
1752 |
+
$invoice = $orderPayment->orderPaid($order, $this);
|
|
|
|
|
1753 |
|
1754 |
+
return $invoice;
|
1755 |
|
1756 |
} catch (Exception $e) {
|
1757 |
Mage::throwException($e->getMessage());
|
1758 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1759 |
break;
|
1760 |
|
1761 |
// order overpaid
|
1777 |
Mage::throwException("Cannot set order to underpaid: {$e->getMessage()}");
|
1778 |
}
|
1779 |
|
1780 |
+
$transaction->setOrderPaymentObject($order->getPayment());
|
1781 |
+
$transaction->setIsClosed(true)->save();
|
1782 |
+
|
1783 |
+
if ($order->getPayment()->getMethod() === 'mundipagg_twocreditcards') {
|
1784 |
+
return self::TRANSACTION_CAPTURED;
|
1785 |
+
} else {
|
1786 |
+
return self::ORDER_UNDERPAID;
|
1787 |
+
}
|
1788 |
break;
|
1789 |
|
1790 |
// unexpected situation
|
1792 |
Mage::throwException(self::UNEXPECTED_ERROR);
|
1793 |
break;
|
1794 |
}
|
|
|
1795 |
}
|
1796 |
|
1797 |
/**
|
1798 |
* Create invoice
|
1799 |
+
* @todo must be deprecated use Uecommerce_Mundipagg_Model_Order_Payment createInvoice
|
1800 |
* @return string OK|KO
|
1801 |
*/
|
1802 |
private function createInvoice($order, $data, $totalPaid, $status) {
|
1922 |
return array('result' => simplexml_load_string($_response));
|
1923 |
}
|
1924 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1925 |
/**
|
1926 |
* Mail error to Mage::getStoreConfig('trans_email/ident_custom1/email')
|
1927 |
*
|
2006 |
|
2007 |
if ($error) {
|
2008 |
$helperLog->error($outputMsg, true);
|
|
|
2009 |
}
|
2010 |
|
2011 |
if (is_null($sessionId)) {
|
2026 |
|
2027 |
/**
|
2028 |
* Method to unify the transactions requests and his logs
|
2029 |
+
* @todo must be deprecated, use Uecommerce_Mundipagg_Model_Api::sendJSON method
|
2030 |
*
|
2031 |
* @since 05-24-2016
|
2032 |
* @param array $dataToPost
|
app/code/community/Uecommerce/Mundipagg/Model/Observer.php
CHANGED
@@ -165,14 +165,14 @@ class Uecommerce_Mundipagg_Model_Observer extends Uecommerce_Mundipagg_Model_Sta
|
|
165 |
$result = $event->getResult();
|
166 |
$isPartial = Mage::getSingleton('checkout/session')->getApprovalRequestSuccess();
|
167 |
|
168 |
-
if ($isPartial
|
169 |
switch ($method->getCode()) {
|
170 |
case 'mundipagg_creditcardoneinstallment':
|
171 |
case 'mundipagg_creditcard':
|
172 |
-
case 'mundipagg_twocreditcards':
|
173 |
-
case 'mundipagg_threecreditcards':
|
174 |
-
case 'mundipagg_fourcreditcards':
|
175 |
-
case 'mundipagg_fivecreditcards':
|
176 |
$active = Mage::getStoreConfig('payment/' . $method->getCode() . '/active');
|
177 |
|
178 |
if ($active == '1') {
|
165 |
$result = $event->getResult();
|
166 |
$isPartial = Mage::getSingleton('checkout/session')->getApprovalRequestSuccess();
|
167 |
|
168 |
+
if ($isPartial === 'partial') {
|
169 |
switch ($method->getCode()) {
|
170 |
case 'mundipagg_creditcardoneinstallment':
|
171 |
case 'mundipagg_creditcard':
|
172 |
+
// case 'mundipagg_twocreditcards':
|
173 |
+
// case 'mundipagg_threecreditcards':
|
174 |
+
// case 'mundipagg_fourcreditcards':
|
175 |
+
// case 'mundipagg_fivecreditcards':
|
176 |
$active = Mage::getStoreConfig('payment/' . $method->getCode() . '/active');
|
177 |
|
178 |
if ($active == '1') {
|
app/code/community/Uecommerce/Mundipagg/Model/Order/Payment.php
CHANGED
@@ -17,6 +17,11 @@ class Uecommerce_Mundipagg_Model_Order_Payment {
|
|
17 |
Mage::throwException(self::ERR_CANNOT_CREATE_INVOICE);
|
18 |
}
|
19 |
|
|
|
|
|
|
|
|
|
|
|
20 |
$invoice = Mage::getModel('sales/service_order', $order)->prepareInvoice();
|
21 |
|
22 |
if (!$invoice->getTotalQty()) {
|
@@ -47,6 +52,28 @@ class Uecommerce_Mundipagg_Model_Order_Payment {
|
|
47 |
return $invoice;
|
48 |
}
|
49 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
public function orderOverpaid(Mage_Sales_Model_Order $order) {
|
51 |
try {
|
52 |
$order->setStatus('overpaid')
|
17 |
Mage::throwException(self::ERR_CANNOT_CREATE_INVOICE);
|
18 |
}
|
19 |
|
20 |
+
// reset total paid because invoice generation set order total_paid also
|
21 |
+
$order->setBaseTotalPaid(null)
|
22 |
+
->setTotalPaid(null)
|
23 |
+
->save();
|
24 |
+
|
25 |
$invoice = Mage::getModel('sales/service_order', $order)->prepareInvoice();
|
26 |
|
27 |
if (!$invoice->getTotalQty()) {
|
52 |
return $invoice;
|
53 |
}
|
54 |
|
55 |
+
/**
|
56 |
+
* @param Mage_Sales_Model_Order $order
|
57 |
+
* @param Uecommerce_Mundipagg_Model_Standard $standard
|
58 |
+
* @return Mage_Sales_Model_Order_Invoice
|
59 |
+
*/
|
60 |
+
public function orderPaid(Mage_Sales_Model_Order $order, Uecommerce_Mundipagg_Model_Standard $standard) {
|
61 |
+
try {
|
62 |
+
$invoice = $this->createInvoice($order, $standard);
|
63 |
+
|
64 |
+
$log = new Uecommerce_Mundipagg_Helper_Log(__METHOD__);
|
65 |
+
$log->setLogLabel("#{$order->getIncrementId()}");
|
66 |
+
|
67 |
+
$standard->closeAuthorizationTxns($order);
|
68 |
+
$log->info("Authorization transactions closed");
|
69 |
+
|
70 |
+
return $invoice;
|
71 |
+
|
72 |
+
} catch (Exception $e) {
|
73 |
+
Mage::throwException($e);
|
74 |
+
}
|
75 |
+
}
|
76 |
+
|
77 |
public function orderOverpaid(Mage_Sales_Model_Order $order) {
|
78 |
try {
|
79 |
$order->setStatus('overpaid')
|
app/code/community/Uecommerce/Mundipagg/Model/Standard.php
CHANGED
@@ -362,16 +362,6 @@ class Uecommerce_Mundipagg_Model_Standard extends Mage_Payment_Model_Method_Abst
|
|
362 |
}
|
363 |
|
364 |
$epsilon = 0.00001;
|
365 |
-
|
366 |
-
// $helperLog = new Uecommerce_Mundipagg_Helper_Log(__METHOD__);
|
367 |
-
// $helperLog->info("totalInstallments: {$totalInstallments}");
|
368 |
-
// $helperLog->info("grandTotal: {$grandTotal}");
|
369 |
-
// $helperLog->info("getPaymentInterest: {$info->getPaymentInterest()}");
|
370 |
-
// $helperLog->info("epsilon: {$epsilon}");
|
371 |
-
|
372 |
-
// if ($totalInstallments > 0 && ($grandTotal - $totalInstallments - $info->getPaymentInterest())) {
|
373 |
-
// Mage::throwException(Mage::helper('payment')->__('Installments does not match with quote.'));
|
374 |
-
// }
|
375 |
}
|
376 |
} else {
|
377 |
if (isset($mundipagg['method'])) {
|
@@ -582,14 +572,15 @@ class Uecommerce_Mundipagg_Model_Standard extends Mage_Payment_Model_Method_Abst
|
|
582 |
$result = $helper->issetOr($resultPayment['result'], false);
|
583 |
$ccResultCollection = $helper->issetOr($result['CreditCardTransactionResultCollection']);
|
584 |
|
585 |
-
|
586 |
-
* @todo: Refact this. Integration time out message must be setted only if the API response is false
|
587 |
-
* 'CreditCardTransactionResultCollection' null or empty is not a timeout
|
588 |
-
*/
|
589 |
-
if (is_null($ccResultCollection)) {
|
590 |
return $this->integrationTimeOut($order, $payment);
|
591 |
}
|
592 |
|
|
|
|
|
|
|
|
|
|
|
593 |
if (is_null($ccResultCollection) === false) {
|
594 |
// We record transaction(s)
|
595 |
if (count($ccResultCollection) == 1) {
|
@@ -708,7 +699,7 @@ class Uecommerce_Mundipagg_Model_Standard extends Mage_Payment_Model_Method_Abst
|
|
708 |
}
|
709 |
|
710 |
// Save transactions
|
711 |
-
foreach ($ccTxnResultCollection as $txn){
|
712 |
$this->_addTransaction(
|
713 |
$payment,
|
714 |
$txn['TransactionKey'],
|
@@ -841,6 +832,7 @@ class Uecommerce_Mundipagg_Model_Standard extends Mage_Payment_Model_Method_Abst
|
|
841 |
// Error
|
842 |
if (!$capture) {
|
843 |
Mage::getSingleton('checkout/session')->setApprovalRequestSuccess('cancel');
|
|
|
844 |
return $this;
|
845 |
}
|
846 |
|
@@ -899,7 +891,7 @@ class Uecommerce_Mundipagg_Model_Standard extends Mage_Payment_Model_Method_Abst
|
|
899 |
|
900 |
// Return error
|
901 |
if (isset($resultPayment['error'])) {
|
902 |
-
return $this->paymentError($
|
903 |
}
|
904 |
|
905 |
if (isset($resultPayment['message'])) {
|
@@ -1207,6 +1199,9 @@ class Uecommerce_Mundipagg_Model_Standard extends Mage_Payment_Model_Method_Abst
|
|
1207 |
case $type:
|
1208 |
$approvalRequest = $api->creditCardTransaction($order, $data, $this);
|
1209 |
break;
|
|
|
|
|
|
|
1210 |
}
|
1211 |
|
1212 |
if ($approvalRequest === false) {
|
@@ -1380,10 +1375,6 @@ class Uecommerce_Mundipagg_Model_Standard extends Mage_Payment_Model_Method_Abst
|
|
1380 |
}
|
1381 |
}
|
1382 |
|
1383 |
-
// Transaction
|
1384 |
-
// $transactionKey = isset($dataR['CreditCardTransactionResultCollection']['CreditCardTransactionResult']['TransactionKey']) ? $dataR['CreditCardTransactionResultCollection']['CreditCardTransactionResult']['TransactionKey'] : null;
|
1385 |
-
// $creditCardTransactionStatusEnum = isset($dataR['CreditCardTransactionResultCollection']['CreditCardTransactionResult']['CreditCardTransactionStatus']) ? $dataR['CreditCardTransactionResultCollection']['CreditCardTransactionResult']['CreditCardTransactionStatus'] : null;
|
1386 |
-
|
1387 |
$transactionKey = $transaction['TransactionKey'];
|
1388 |
$creditCardTransactionStatusEnum = $transaction['CreditCardTransactionStatus'];
|
1389 |
|
@@ -1415,7 +1406,7 @@ class Uecommerce_Mundipagg_Model_Standard extends Mage_Payment_Model_Method_Abst
|
|
1415 |
$orderKeys = (array)$orderPayment->getAdditionalInformation('OrderKey');
|
1416 |
|
1417 |
if (is_null($orderKeys) || !is_array($orderKeys)) {
|
1418 |
-
$orderKeys =
|
1419 |
}
|
1420 |
|
1421 |
if (!in_array($newOrderKey, $orderKeys)) {
|
@@ -1551,18 +1542,9 @@ class Uecommerce_Mundipagg_Model_Standard extends Mage_Payment_Model_Method_Abst
|
|
1551 |
$TransactionReference = $transaction->getAdditionalInformation('TransactionReference');
|
1552 |
}
|
1553 |
|
1554 |
-
// $data['CreditCardTransactionCollection']['AmountInCents'] = $payment->getOrder()->getBaseGrandTotal() * 100;
|
1555 |
-
// $data['CreditCardTransactionCollection']['TransactionKey'] = $TransactionKey;
|
1556 |
-
// $data['CreditCardTransactionCollection']['TransactionReference'] = $TransactionReference;
|
1557 |
-
// $data['OrderKey'] = $payment->getAdditionalInformation('OrderKey');
|
1558 |
$orderkeys = $payment->getAdditionalInformation('OrderKey');
|
1559 |
|
1560 |
if (!is_array($orderkeys)) {
|
1561 |
-
// $errMsg = "Impossible to capture: orderkeys must be an array";
|
1562 |
-
// $helperLog = new Uecommerce_Mundipagg_Helper_Log(__METHOD__);
|
1563 |
-
//
|
1564 |
-
// $helperLog->error($errMsg);
|
1565 |
-
// Mage::throwException($errMsg);
|
1566 |
$orderkeys = array($orderkeys);
|
1567 |
}
|
1568 |
|
@@ -2025,11 +2007,7 @@ class Uecommerce_Mundipagg_Model_Standard extends Mage_Payment_Model_Method_Abst
|
|
2025 |
|
2026 |
$helperLog->info($message);
|
2027 |
Mage::getSingleton('checkout/session')->setApprovalRequestSuccess('success');
|
2028 |
-
|
2029 |
-
}/* else {
|
2030 |
-
$helperLog->info("{$logLabel} | Payment not authorized and order is not on offline retry.");
|
2031 |
-
Mage::getSingleton('checkout/session')->setApprovalRequestSuccess('cancel');
|
2032 |
-
}*/
|
2033 |
}
|
2034 |
|
2035 |
/**
|
@@ -2059,15 +2037,13 @@ class Uecommerce_Mundipagg_Model_Standard extends Mage_Payment_Model_Method_Abst
|
|
2059 |
}
|
2060 |
|
2061 |
/**
|
2062 |
-
* @param
|
2063 |
-
* @param
|
2064 |
* @return $this
|
2065 |
*/
|
2066 |
-
private function paymentError(
|
2067 |
try {
|
2068 |
-
$payment = $order->getPayment();
|
2069 |
$transactionType = Mage_Sales_Model_Order_Payment_Transaction::TYPE_ORDER;
|
2070 |
-
|
2071 |
$helper = Mage::helper('mundipagg');
|
2072 |
$result = $helper->issetOr($resultPayment['result']);
|
2073 |
$ccTxnCollection = $helper->issetOr($result['CreditCardTransactionResultCollection']);
|
@@ -2102,13 +2078,12 @@ class Uecommerce_Mundipagg_Model_Standard extends Mage_Payment_Model_Method_Abst
|
|
2102 |
$payment->setSkipOrderProcessing(true)->save();
|
2103 |
|
2104 |
if (isset($resultPayment['ErrorDescription'])) {
|
2105 |
-
$order->addStatusHistoryComment(Mage::helper('mundipagg')->__(htmlspecialchars_decode($resultPayment['ErrorDescription'])));
|
2106 |
-
$order->save();
|
2107 |
-
|
2108 |
Mage::throwException(Mage::helper('mundipagg')->__($resultPayment['ErrorDescription']));
|
|
|
2109 |
} else {
|
2110 |
-
Mage::throwException(Mage::helper('mundipagg')->__('
|
2111 |
}
|
|
|
2112 |
} catch (Exception $e) {
|
2113 |
return $this;
|
2114 |
}
|
@@ -2239,4 +2214,230 @@ class Uecommerce_Mundipagg_Model_Standard extends Mage_Payment_Model_Method_Abst
|
|
2239 |
->save();
|
2240 |
}
|
2241 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2242 |
}
|
362 |
}
|
363 |
|
364 |
$epsilon = 0.00001;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
365 |
}
|
366 |
} else {
|
367 |
if (isset($mundipagg['method'])) {
|
572 |
$result = $helper->issetOr($resultPayment['result'], false);
|
573 |
$ccResultCollection = $helper->issetOr($result['CreditCardTransactionResultCollection']);
|
574 |
|
575 |
+
if ($result === false) {
|
|
|
|
|
|
|
|
|
576 |
return $this->integrationTimeOut($order, $payment);
|
577 |
}
|
578 |
|
579 |
+
// Return error
|
580 |
+
if (isset($resultPayment['error'])) {
|
581 |
+
return $this->paymentError($payment, $resultPayment);
|
582 |
+
}
|
583 |
+
|
584 |
if (is_null($ccResultCollection) === false) {
|
585 |
// We record transaction(s)
|
586 |
if (count($ccResultCollection) == 1) {
|
699 |
}
|
700 |
|
701 |
// Save transactions
|
702 |
+
foreach ($ccTxnResultCollection as $txn) {
|
703 |
$this->_addTransaction(
|
704 |
$payment,
|
705 |
$txn['TransactionKey'],
|
832 |
// Error
|
833 |
if (!$capture) {
|
834 |
Mage::getSingleton('checkout/session')->setApprovalRequestSuccess('cancel');
|
835 |
+
|
836 |
return $this;
|
837 |
}
|
838 |
|
891 |
|
892 |
// Return error
|
893 |
if (isset($resultPayment['error'])) {
|
894 |
+
return $this->paymentError($payment, $resultPayment);
|
895 |
}
|
896 |
|
897 |
if (isset($resultPayment['message'])) {
|
1199 |
case $type:
|
1200 |
$approvalRequest = $api->creditCardTransaction($order, $data, $this);
|
1201 |
break;
|
1202 |
+
|
1203 |
+
default:
|
1204 |
+
$approvalRequest = false;
|
1205 |
}
|
1206 |
|
1207 |
if ($approvalRequest === false) {
|
1375 |
}
|
1376 |
}
|
1377 |
|
|
|
|
|
|
|
|
|
1378 |
$transactionKey = $transaction['TransactionKey'];
|
1379 |
$creditCardTransactionStatusEnum = $transaction['CreditCardTransactionStatus'];
|
1380 |
|
1406 |
$orderKeys = (array)$orderPayment->getAdditionalInformation('OrderKey');
|
1407 |
|
1408 |
if (is_null($orderKeys) || !is_array($orderKeys)) {
|
1409 |
+
$orderKeys = [];
|
1410 |
}
|
1411 |
|
1412 |
if (!in_array($newOrderKey, $orderKeys)) {
|
1542 |
$TransactionReference = $transaction->getAdditionalInformation('TransactionReference');
|
1543 |
}
|
1544 |
|
|
|
|
|
|
|
|
|
1545 |
$orderkeys = $payment->getAdditionalInformation('OrderKey');
|
1546 |
|
1547 |
if (!is_array($orderkeys)) {
|
|
|
|
|
|
|
|
|
|
|
1548 |
$orderkeys = array($orderkeys);
|
1549 |
}
|
1550 |
|
2007 |
|
2008 |
$helperLog->info($message);
|
2009 |
Mage::getSingleton('checkout/session')->setApprovalRequestSuccess('success');
|
2010 |
+
}
|
|
|
|
|
|
|
|
|
2011 |
}
|
2012 |
|
2013 |
/**
|
2037 |
}
|
2038 |
|
2039 |
/**
|
2040 |
+
* @param Mage_Sales_Model_Order_Payment $payment
|
2041 |
+
* @param $resultPayment
|
2042 |
* @return $this
|
2043 |
*/
|
2044 |
+
private function paymentError(Mage_Sales_Model_Order_Payment $payment, $resultPayment) {
|
2045 |
try {
|
|
|
2046 |
$transactionType = Mage_Sales_Model_Order_Payment_Transaction::TYPE_ORDER;
|
|
|
2047 |
$helper = Mage::helper('mundipagg');
|
2048 |
$result = $helper->issetOr($resultPayment['result']);
|
2049 |
$ccTxnCollection = $helper->issetOr($result['CreditCardTransactionResultCollection']);
|
2078 |
$payment->setSkipOrderProcessing(true)->save();
|
2079 |
|
2080 |
if (isset($resultPayment['ErrorDescription'])) {
|
|
|
|
|
|
|
2081 |
Mage::throwException(Mage::helper('mundipagg')->__($resultPayment['ErrorDescription']));
|
2082 |
+
|
2083 |
} else {
|
2084 |
+
Mage::throwException(Mage::helper('mundipagg')->__('Error'));
|
2085 |
}
|
2086 |
+
|
2087 |
} catch (Exception $e) {
|
2088 |
return $this;
|
2089 |
}
|
2214 |
->save();
|
2215 |
}
|
2216 |
|
2217 |
+
/**
|
2218 |
+
* @param Mage_Checkout_Model_Type_Onepage $onepage
|
2219 |
+
* @param array $postData
|
2220 |
+
* @return null|string $redirectRoute
|
2221 |
+
* @throws Exception
|
2222 |
+
*/
|
2223 |
+
public function retryAuthorization(Mage_Checkout_Model_Type_Onepage &$onepage, $postData) {
|
2224 |
+
$redirectRoute = null;
|
2225 |
+
|
2226 |
+
/* @var Uecommerce_Mundipagg_Helper_CheckoutSession $session */
|
2227 |
+
$session = Mage::helper('mundipagg/checkoutSession');
|
2228 |
+
$lastQuoteId = $session->getInstance()->getLastSuccessQuoteId();
|
2229 |
+
$session->getInstance()->setQuoteId($lastQuoteId);
|
2230 |
+
|
2231 |
+
/* @var Mage_Sales_Model_Quote $quote */
|
2232 |
+
$quote = Mage::getModel('sales/quote')->load($lastQuoteId);
|
2233 |
+
$quote->setIsActive(true);
|
2234 |
+
|
2235 |
+
$onepage->setQuote($quote);
|
2236 |
+
|
2237 |
+
// Get Reserved Order Id
|
2238 |
+
$reservedOrderId = $quote->getReservedOrderId();
|
2239 |
+
|
2240 |
+
if ($reservedOrderId == false) {
|
2241 |
+
return $redirectRoute;
|
2242 |
+
}
|
2243 |
+
|
2244 |
+
$session->setApprovalRequest('partial');
|
2245 |
+
|
2246 |
+
$order = Mage::getModel('sales/order')->loadByIncrementId($reservedOrderId);
|
2247 |
+
|
2248 |
+
//
|
2249 |
+
$additionalInfo = $order->getPayment()->getAdditionalInformation();
|
2250 |
+
$num = 1;
|
2251 |
+
|
2252 |
+
if ($additionalInfo['2_Success']) {
|
2253 |
+
$num++;
|
2254 |
+
}
|
2255 |
+
|
2256 |
+
$idxToken = "mundipagg_twocreditcards_token_2_{$num}";
|
2257 |
+
|
2258 |
+
switch (true) {
|
2259 |
+
case isset($additionalInfo[$idxToken]) :
|
2260 |
+
$order->getPayment()->setAdditionalInformation();
|
2261 |
+
break;
|
2262 |
+
}
|
2263 |
+
|
2264 |
+
/* @var Uecommerce_Mundipagg_Helper_Data $helper */
|
2265 |
+
$helper = Mage::helper('mundipagg');
|
2266 |
+
|
2267 |
+
if ($order->getStatus() === 'pending' || $order->getStatus() === 'payment_review') {
|
2268 |
+
if (empty($postData)) {
|
2269 |
+
throw new Exception($helper->__('Invalid data'));
|
2270 |
+
// Mage::throwException($helper->__('Invalid data'));
|
2271 |
+
// return array('error' => -1, 'message' => Mage::helper('checkout')->__('Invalid data'));
|
2272 |
+
}
|
2273 |
+
|
2274 |
+
$paymentMethod = $helper->issetOr($postData['method']);
|
2275 |
+
|
2276 |
+
if ($quote->isVirtual()) {
|
2277 |
+
$quote->getBillingAddress()->setPaymentMethod($paymentMethod);
|
2278 |
+
} else {
|
2279 |
+
$quote->getShippingAddress()->setPaymentMethod($paymentMethod);
|
2280 |
+
}
|
2281 |
+
|
2282 |
+
$payment = $quote->getPayment();
|
2283 |
+
$payment->importData($postData);
|
2284 |
+
|
2285 |
+
$quote->save();
|
2286 |
+
|
2287 |
+
switch ($paymentMethod) {
|
2288 |
+
case 'mundipagg_creditcardoneinstallment':
|
2289 |
+
$standard = Mage::getModel('mundipagg/creditcardoneinstallment');
|
2290 |
+
break;
|
2291 |
+
case 'mundipagg_creditcard':
|
2292 |
+
$standard = Mage::getModel('mundipagg/creditcard');
|
2293 |
+
break;
|
2294 |
+
|
2295 |
+
case 'mundipagg_twocreditcards':
|
2296 |
+
$standard = Mage::getModel('mundipagg/twocreditcards');
|
2297 |
+
break;
|
2298 |
+
|
2299 |
+
case 'mundipagg_threecreditcards':
|
2300 |
+
$standard = Mage::getModel('mundipagg/threecreditcards');
|
2301 |
+
break;
|
2302 |
+
|
2303 |
+
case 'mundipagg_fourcreditcards':
|
2304 |
+
$standard = Mage::getModel('mundipagg/fourcreditcards');
|
2305 |
+
break;
|
2306 |
+
|
2307 |
+
case 'mundipagg_fivecreditcards':
|
2308 |
+
$standard = Mage::getModel('mundipagg/fivecreditcards');
|
2309 |
+
break;
|
2310 |
+
|
2311 |
+
default:
|
2312 |
+
return 'mundipagg/standard/partial';
|
2313 |
+
break;
|
2314 |
+
}
|
2315 |
+
|
2316 |
+
/* @var Uecommerce_Mundipagg_Model_Standard $standard */
|
2317 |
+
$resultPayment = $standard->doPayment($payment, $order);
|
2318 |
+
$txns = $helper->issetOr($resultPayment['result']['CreditCardTransactionResultCollection']);
|
2319 |
+
|
2320 |
+
foreach ($txns as $txn) {
|
2321 |
+
$standard->_addTransaction(
|
2322 |
+
$order->getPayment(),
|
2323 |
+
$helper->issetOr($txn['TransactionKey']),
|
2324 |
+
Mage_Sales_Model_Order_Payment_Transaction::TYPE_AUTH,
|
2325 |
+
$txn,
|
2326 |
+
$num - 1
|
2327 |
+
);
|
2328 |
+
}
|
2329 |
+
|
2330 |
+
$teste = $order->getPayment();
|
2331 |
+
$order->getPayment()->save();
|
2332 |
+
|
2333 |
+
// $this->replaceNotAuthorizedCcInfo($txns[0], $order->getPayment());
|
2334 |
+
|
2335 |
+
$accAuthorizedAmount = sprintf($order->getData('payment_authorization_amount'));
|
2336 |
+
$accGrandTotal = sprintf($order->getData('grand_total'));
|
2337 |
+
|
2338 |
+
if ($standard->getAntiFraud() == 0 &&
|
2339 |
+
$standard->getPaymentAction() === 'order' &&
|
2340 |
+
$accAuthorizedAmount == $accGrandTotal
|
2341 |
+
) {
|
2342 |
+
$standard->captureAndcreateInvoice($order->getPayment());
|
2343 |
+
}
|
2344 |
+
|
2345 |
+
switch ($session->getApprovalRequest()) {
|
2346 |
+
case 'success':
|
2347 |
+
// Send new order email when not in admin and payment is success
|
2348 |
+
if (Mage::app()->getStore()->getCode() !== 'admin') {
|
2349 |
+
$order->sendNewOrderEmail();
|
2350 |
+
}
|
2351 |
+
$redirectRoute = 'mundipagg/standard/success';
|
2352 |
+
break;
|
2353 |
+
|
2354 |
+
case 'partial':
|
2355 |
+
$redirectRoute = 'mundipagg/standard/partial';
|
2356 |
+
break;
|
2357 |
+
|
2358 |
+
case 'cancel':
|
2359 |
+
$redirectRoute = 'mundipagg/standard/cancel';
|
2360 |
+
break;
|
2361 |
+
|
2362 |
+
default:
|
2363 |
+
throw new Exception("Unexpected approvalRequestSuccess: {$session->getApprovalRequest()}");
|
2364 |
+
}
|
2365 |
+
}
|
2366 |
+
|
2367 |
+
return $redirectRoute;
|
2368 |
+
}
|
2369 |
+
|
2370 |
+
/**
|
2371 |
+
* Replace the not authorized payment additional information
|
2372 |
+
*/
|
2373 |
+
public function replaceNotAuthorizedCcInfo($mundiResponse, Mage_Sales_Model_Order_Payment &$payment) {
|
2374 |
+
$info = $payment->getAdditionalInformation();
|
2375 |
+
$ccQty = $info['mundipagg_type'][0];
|
2376 |
+
$keys = array_keys($info);
|
2377 |
+
$ccsData = [];
|
2378 |
+
$otherData = [];
|
2379 |
+
|
2380 |
+
// separate credit cards payment additional information
|
2381 |
+
foreach ($keys as $key) {
|
2382 |
+
$idxTwoInitialLetters = $key[0] . $key[1];
|
2383 |
+
$value = $info[$key];
|
2384 |
+
|
2385 |
+
if ($idxTwoInitialLetters === '1_') {
|
2386 |
+
$ccsData[1][$key] = $value;
|
2387 |
+
} elseif ($idxTwoInitialLetters === '2_') {
|
2388 |
+
$ccsData[2][$key] = $value;
|
2389 |
+
} else {
|
2390 |
+
$otherData[$key] = $value;
|
2391 |
+
}
|
2392 |
+
}
|
2393 |
+
|
2394 |
+
$notAuthorizedCc = null;
|
2395 |
+
|
2396 |
+
// get just the not authorized credit card data
|
2397 |
+
for ($i = 1; $i <= $ccQty; $i++) {
|
2398 |
+
$idx = "{$i}_Success";
|
2399 |
+
$success = $ccsData[$i][$idx];
|
2400 |
+
|
2401 |
+
if ($success) {
|
2402 |
+
// $notAuthorizedCc = $i === 1 ? 1 : 2;
|
2403 |
+
if ($i === 1) {
|
2404 |
+
$notAuthorizedCc = 1;
|
2405 |
+
} else {
|
2406 |
+
$notAuthorizedCc = 2;
|
2407 |
+
}
|
2408 |
+
break;
|
2409 |
+
}
|
2410 |
+
}
|
2411 |
+
|
2412 |
+
$responseKeys = $this->extractTxnKeys($mundiResponse);
|
2413 |
+
$key = null;
|
2414 |
+
|
2415 |
+
foreach ($responseKeys as $key => $val) {
|
2416 |
+
$idx = "{$notAuthorizedCc}_{$val}";
|
2417 |
+
$ccsData[$idx] = isset($ccsData[$idx]) ? $ccsData[$idx] : null;
|
2418 |
+
}
|
2419 |
+
|
2420 |
+
$data = $otherData + $ccsData[1] + $ccsData[2];
|
2421 |
+
|
2422 |
+
$payment->setAdditionalInformation($data)->save();
|
2423 |
+
}
|
2424 |
+
|
2425 |
+
public function extractTxnKeys($txn) {
|
2426 |
+
$keys = [];
|
2427 |
+
|
2428 |
+
foreach ($txn as $key => $val) {
|
2429 |
+
if (is_array($txn[$key]) && !empty($txn[$key])) {
|
2430 |
+
|
2431 |
+
foreach ($txn[$key] as $subKey => $subVal) {
|
2432 |
+
$keys[] = $subKey;
|
2433 |
+
}
|
2434 |
+
|
2435 |
+
} else {
|
2436 |
+
$keys[] = $key;
|
2437 |
+
}
|
2438 |
+
}
|
2439 |
+
|
2440 |
+
return $keys;
|
2441 |
+
}
|
2442 |
+
|
2443 |
}
|
app/code/community/Uecommerce/Mundipagg/controllers/StandardController.php
CHANGED
@@ -70,10 +70,7 @@ class Uecommerce_Mundipagg_StandardController extends Mage_Core_Controller_Front
|
|
70 |
* Partial payment
|
71 |
*/
|
72 |
public function partialAction() {
|
73 |
-
$paymentMethod = Mage::helper('payment')->getMethodInstance('mundipagg_creditcard');
|
74 |
-
|
75 |
$session = Mage::getSingleton('checkout/session');
|
76 |
-
|
77 |
$approvalRequestSuccess = $session->getApprovalRequestSuccess();
|
78 |
|
79 |
if (!$session->getLastSuccessQuoteId() && $approvalRequestSuccess != 'partial') {
|
@@ -83,11 +80,9 @@ class Uecommerce_Mundipagg_StandardController extends Mage_Core_Controller_Front
|
|
83 |
}
|
84 |
|
85 |
$lastQuoteId = $session->getLastSuccessQuoteId();
|
86 |
-
|
87 |
$session->setQuoteId($lastQuoteId);
|
88 |
|
89 |
$quote = Mage::getModel('sales/quote')->load($lastQuoteId);
|
90 |
-
|
91 |
$this->getOnepage()->setQuote($quote);
|
92 |
$this->getOnepage()->getQuote()->setIsActive(true);
|
93 |
$this->getOnepage()->getQuote()->save();
|
@@ -114,145 +109,29 @@ class Uecommerce_Mundipagg_StandardController extends Mage_Core_Controller_Front
|
|
114 |
* Partial payment Post
|
115 |
*/
|
116 |
public function partialPostAction() {
|
117 |
-
$
|
118 |
-
|
119 |
-
// Post
|
120 |
-
if ($data = $this->getRequest()->getPost('payment', array())) {
|
121 |
-
try {
|
122 |
-
$lastQuoteId = $session->getLastSuccessQuoteId();
|
123 |
-
|
124 |
-
$session->setQuoteId($lastQuoteId);
|
125 |
-
|
126 |
-
$quote = Mage::getModel('sales/quote')->load($lastQuoteId);
|
127 |
-
|
128 |
-
$this->getOnepage()->setQuote($quote);
|
129 |
-
$this->getOnepage()->getQuote()->setIsActive(true);
|
130 |
-
|
131 |
-
// Get Reserved Order Id
|
132 |
-
if ($reservedOrderId = $this->getOnepage()->getQuote()->getReservedOrderId()) {
|
133 |
-
$session->setApprovalRequestSuccess('partial');
|
134 |
-
|
135 |
-
$order = Mage::getModel('sales/order')->loadByIncrementId($reservedOrderId);
|
136 |
-
|
137 |
-
if ($order->getStatus() == 'pending' OR $order->getStatus() == 'payment_review') {
|
138 |
-
if (empty($data)) {
|
139 |
-
return array('error' => -1, 'message' => Mage::helper('checkout')->__('Invalid data'));
|
140 |
-
}
|
141 |
-
|
142 |
-
if ($this->getOnepage()->getQuote()->isVirtual()) {
|
143 |
-
$quote->getBillingAddress()->setPaymentMethod(isset($data['method']) ? $data['method'] : null);
|
144 |
-
} else {
|
145 |
-
$quote->getShippingAddress()->setPaymentMethod(isset($data['method']) ? $data['method'] : null);
|
146 |
-
}
|
147 |
-
|
148 |
-
$payment = $quote->getPayment();
|
149 |
-
$payment->importData($data);
|
150 |
-
|
151 |
-
$quote->save();
|
152 |
-
|
153 |
-
switch ($data['method']):
|
154 |
-
case 'mundipagg_creditcardoneinstallment':
|
155 |
-
$onepage = Mage::getModel('mundipagg/creditcardoneinstallment');
|
156 |
-
break;
|
157 |
-
case 'mundipagg_creditcard':
|
158 |
-
$onepage = Mage::getModel('mundipagg/creditcard');
|
159 |
-
break;
|
160 |
-
|
161 |
-
case 'mundipagg_twocreditcards':
|
162 |
-
$onepage = Mage::getModel('mundipagg/twocreditcards');
|
163 |
-
break;
|
164 |
-
|
165 |
-
case 'mundipagg_threecreditcards':
|
166 |
-
$onepage = Mage::getModel('mundipagg/threecreditcards');
|
167 |
-
break;
|
168 |
-
|
169 |
-
case 'mundipagg_fourcreditcards':
|
170 |
-
$onepage = Mage::getModel('mundipagg/fourcreditcards');
|
171 |
-
break;
|
172 |
-
|
173 |
-
case 'mundipagg_fivecreditcards':
|
174 |
-
$onepage = Mage::getModel('mundipagg/fivecreditcards');
|
175 |
-
break;
|
176 |
-
|
177 |
-
default:
|
178 |
-
$this->_redirect('mundipagg/standard/partial');
|
179 |
-
break;
|
180 |
-
endswitch;
|
181 |
-
|
182 |
-
$resultPayment = $onepage->doPayment($payment, $order);
|
183 |
-
$approvalRequestSuccess = Mage::getSingleton('checkout/session')->getApprovalRequestSuccess();
|
184 |
-
|
185 |
-
// Send new order email when not in admin and payment is success
|
186 |
-
if ($approvalRequestSuccess == 'success') {
|
187 |
-
if (Mage::app()->getStore()->getCode() != 'admin') {
|
188 |
-
$order->sendNewOrderEmail();
|
189 |
-
}
|
190 |
-
}
|
191 |
|
192 |
-
|
193 |
-
|
194 |
-
// We record transaction(s)
|
195 |
-
$json = json_encode($resultPayment['result']);
|
196 |
-
$dataR = array();
|
197 |
-
$dataR = json_decode($json, true);
|
198 |
-
|
199 |
-
$transactions = $resultPayment['result']['CreditCardTransactionResultCollection'];
|
200 |
-
|
201 |
-
if (count($transactions) == 1) {
|
202 |
-
$trans = $dataR['CreditCardTransactionResultCollection'][0];
|
203 |
-
|
204 |
-
$onepage->_addTransaction($order->getPayment(), $trans['TransactionKey'], Mage_Sales_Model_Order_Payment_Transaction::TYPE_AUTH, $trans);
|
205 |
-
|
206 |
-
} else {
|
207 |
-
$transactions = $dataR['CreditCardTransactionResultCollection'];
|
208 |
-
|
209 |
-
foreach ($transactions as $key => $trans) {
|
210 |
-
$onepage->_addTransaction($order->getPayment(), $trans['TransactionKey'], Mage_Sales_Model_Order_Payment_Transaction::TYPE_AUTH, $trans);
|
211 |
-
}
|
212 |
-
|
213 |
-
// We can capture only if anti fraud is disabled and payment action is "AuthorizeAndCapture"
|
214 |
-
$creditCardTransactionResultCollection = $transactions;
|
215 |
-
|
216 |
-
if (
|
217 |
-
count($creditCardTransactionResultCollection) > 1 &&
|
218 |
-
$onepage->getAntiFraud() == 0 &&
|
219 |
-
$onepage->getPaymentAction() == 'order'
|
220 |
-
) {
|
221 |
-
$resultCapture = $onepage->captureAndcreateInvoice($info);
|
222 |
-
}
|
223 |
-
}
|
224 |
|
225 |
-
|
226 |
-
|
227 |
-
$this->_redirect('mundipagg/standard/success');
|
228 |
-
break;
|
229 |
|
230 |
-
|
231 |
-
|
232 |
-
break;
|
233 |
|
234 |
-
|
235 |
-
|
236 |
-
|
|
|
|
|
|
|
|
|
237 |
|
238 |
-
|
239 |
-
|
240 |
-
}
|
241 |
|
242 |
-
|
243 |
-
// if ($approvalRequestSuccess == 'success') {
|
244 |
-
// $this->_redirect('mundipagg/standard/success');
|
245 |
-
// } else {
|
246 |
-
// $this->_redirect('mundipagg/standard/partial');
|
247 |
-
// }
|
248 |
-
}
|
249 |
-
}
|
250 |
-
} catch (Exception $e) {
|
251 |
-
//Log error
|
252 |
-
Mage::logException($e);
|
253 |
-
}
|
254 |
-
} else {
|
255 |
-
$this->_redirect();
|
256 |
}
|
257 |
}
|
258 |
|
@@ -324,10 +203,10 @@ class Uecommerce_Mundipagg_StandardController extends Mage_Core_Controller_Front
|
|
324 |
$lastOrderId = Mage::getSingleton('checkout/session')->getLastOrderId();
|
325 |
$order = Mage::getModel('sales/order')->load($lastOrderId);
|
326 |
|
327 |
-
try{
|
328 |
Uecommerce_Mundipagg_Model_Standard::transactionWithError($order);
|
329 |
|
330 |
-
} catch (Exception $e){
|
331 |
$log = new Uecommerce_Mundipagg_Helper_Log(__METHOD__);
|
332 |
$log->error($e->getMessage());
|
333 |
}
|
@@ -472,4 +351,14 @@ class Uecommerce_Mundipagg_StandardController extends Mage_Core_Controller_Front
|
|
472 |
$this->getResponse()->setBody(Mage::helper('core')->jsonEncode($result));
|
473 |
}
|
474 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
475 |
}
|
70 |
* Partial payment
|
71 |
*/
|
72 |
public function partialAction() {
|
|
|
|
|
73 |
$session = Mage::getSingleton('checkout/session');
|
|
|
74 |
$approvalRequestSuccess = $session->getApprovalRequestSuccess();
|
75 |
|
76 |
if (!$session->getLastSuccessQuoteId() && $approvalRequestSuccess != 'partial') {
|
80 |
}
|
81 |
|
82 |
$lastQuoteId = $session->getLastSuccessQuoteId();
|
|
|
83 |
$session->setQuoteId($lastQuoteId);
|
84 |
|
85 |
$quote = Mage::getModel('sales/quote')->load($lastQuoteId);
|
|
|
86 |
$this->getOnepage()->setQuote($quote);
|
87 |
$this->getOnepage()->getQuote()->setIsActive(true);
|
88 |
$this->getOnepage()->getQuote()->save();
|
109 |
* Partial payment Post
|
110 |
*/
|
111 |
public function partialPostAction() {
|
112 |
+
$postData = $this->getRequest()->getPost('payment', []);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
113 |
|
114 |
+
if ($postData == false) {
|
115 |
+
$this->_redirect();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
116 |
|
117 |
+
return;
|
118 |
+
}
|
|
|
|
|
119 |
|
120 |
+
/* @var Uecommerce_Mundipagg_Model_Standard $standard */
|
121 |
+
$standard = Mage::getModel('mundipagg/standard');
|
|
|
122 |
|
123 |
+
try {
|
124 |
+
$route = $standard->retryAuthorization($this->getOnepage(), $postData);
|
125 |
+
$this->_redirect($route);
|
126 |
+
} catch (Exception $e) {
|
127 |
+
/* @var Uecommerce_Mundipagg_Helper_CheckoutSession $session */
|
128 |
+
$sessionHelper = Mage::helper('mundipagg/checkoutSession');
|
129 |
+
$sessionHelper->getInstance()->addError($sessionHelper->__('Unable to authorize'));
|
130 |
|
131 |
+
$log = new Uecommerce_Mundipagg_Helper_Log(__METHOD__);
|
132 |
+
$log->debug($e->getMessage());
|
|
|
133 |
|
134 |
+
$this->_redirect('/checkout/onepage/');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
135 |
}
|
136 |
}
|
137 |
|
203 |
$lastOrderId = Mage::getSingleton('checkout/session')->getLastOrderId();
|
204 |
$order = Mage::getModel('sales/order')->load($lastOrderId);
|
205 |
|
206 |
+
try {
|
207 |
Uecommerce_Mundipagg_Model_Standard::transactionWithError($order);
|
208 |
|
209 |
+
} catch (Exception $e) {
|
210 |
$log = new Uecommerce_Mundipagg_Helper_Log(__METHOD__);
|
211 |
$log->error($e->getMessage());
|
212 |
}
|
351 |
$this->getResponse()->setBody(Mage::helper('core')->jsonEncode($result));
|
352 |
}
|
353 |
}
|
354 |
+
|
355 |
+
public function indexAction(){
|
356 |
+
$order = Mage::getModel('sales/order')->loadByIncrementId($this->getRequest()->getParam('order'));
|
357 |
+
$payment = $order->getPayment();
|
358 |
+
$info = $payment->getAdditionalInformation();
|
359 |
+
|
360 |
+
var_dump($info);
|
361 |
+
|
362 |
+
}
|
363 |
+
|
364 |
}
|
app/code/community/Uecommerce/Mundipagg/etc/config.xml
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
<config>
|
3 |
<modules>
|
4 |
<Uecommerce_Mundipagg>
|
5 |
-
<version>2.9.
|
6 |
</Uecommerce_Mundipagg>
|
7 |
</modules>
|
8 |
|
2 |
<config>
|
3 |
<modules>
|
4 |
<Uecommerce_Mundipagg>
|
5 |
+
<version>2.9.6</version>
|
6 |
</Uecommerce_Mundipagg>
|
7 |
</modules>
|
8 |
|
app/code/community/Uecommerce/Mundipagg/etc/system.xml
CHANGED
@@ -709,249 +709,6 @@
|
|
709 |
</sort_order>
|
710 |
</fields>
|
711 |
</mundipagg_twocreditcards>
|
712 |
-
<mundipagg_threecreditcards type="group" translate="label">
|
713 |
-
<label><![CDATA[MundiPagg - 3 Cartões de Crédito]]></label>
|
714 |
-
<sort_order>450</sort_order>
|
715 |
-
<show_in_default>1</show_in_default>
|
716 |
-
<show_in_website>1</show_in_website>
|
717 |
-
<show_in_store>1</show_in_store>
|
718 |
-
<comment>
|
719 |
-
<![CDATA[<br><a href="http://www.mundipagg.com.br" target="_blank"><img title="MundiPagg" alt="MundiPagg" src="/skin/adminhtml/default/default/images/mundipagg/mundi-magento-admin-banner.png"/></a><br><br><br>]]></comment>
|
720 |
-
<fields>
|
721 |
-
<active translate="label">
|
722 |
-
<label>Enabled</label>
|
723 |
-
<frontend_type>select</frontend_type>
|
724 |
-
<source_model>adminhtml/system_config_source_yesno</source_model>
|
725 |
-
<sort_order>1</sort_order>
|
726 |
-
<show_in_default>1</show_in_default>
|
727 |
-
<show_in_website>1</show_in_website>
|
728 |
-
<show_in_store>1</show_in_store>
|
729 |
-
</active>
|
730 |
-
|
731 |
-
<title translate="label">
|
732 |
-
<label>Title</label>
|
733 |
-
<frontend_type>text</frontend_type>
|
734 |
-
<sort_order>2</sort_order>
|
735 |
-
<show_in_default>1</show_in_default>
|
736 |
-
<show_in_website>1</show_in_website>
|
737 |
-
<show_in_store>1</show_in_store>
|
738 |
-
<comment>
|
739 |
-
<![CDATA[Frase que irá aparecer no seu checkout para descrever a forma de pagamento.]]></comment>
|
740 |
-
</title>
|
741 |
-
|
742 |
-
<allowspecific translate="label">
|
743 |
-
<label>Payment from Applicable Countries</label>
|
744 |
-
<frontend_type>allowspecific</frontend_type>
|
745 |
-
<sort_order>60</sort_order>
|
746 |
-
<source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
|
747 |
-
<show_in_default>1</show_in_default>
|
748 |
-
<show_in_website>1</show_in_website>
|
749 |
-
<show_in_store>1</show_in_store>
|
750 |
-
</allowspecific>
|
751 |
-
|
752 |
-
<specificcountry translate="label">
|
753 |
-
<label>Payment from Specific Countries</label>
|
754 |
-
<frontend_type>multiselect</frontend_type>
|
755 |
-
<sort_order>61</sort_order>
|
756 |
-
<source_model>adminhtml/system_config_source_country</source_model>
|
757 |
-
<show_in_default>1</show_in_default>
|
758 |
-
<show_in_website>1</show_in_website>
|
759 |
-
<show_in_store>1</show_in_store>
|
760 |
-
</specificcountry>
|
761 |
-
|
762 |
-
<min_order_total translate="label">
|
763 |
-
<label>Min Order Total</label>
|
764 |
-
<frontend_type>text</frontend_type>
|
765 |
-
<sort_order>70</sort_order>
|
766 |
-
<show_in_default>1</show_in_default>
|
767 |
-
<show_in_website>1</show_in_website>
|
768 |
-
<show_in_store>1</show_in_store>
|
769 |
-
<frontend_class>validate-number</frontend_class>
|
770 |
-
</min_order_total>
|
771 |
-
|
772 |
-
<max_order_total translate="label">
|
773 |
-
<label>Max Order Total</label>
|
774 |
-
<frontend_type>text</frontend_type>
|
775 |
-
<sort_order>80</sort_order>
|
776 |
-
<show_in_default>1</show_in_default>
|
777 |
-
<show_in_website>1</show_in_website>
|
778 |
-
<show_in_store>1</show_in_store>
|
779 |
-
<frontend_class>validate-number</frontend_class>
|
780 |
-
</max_order_total>
|
781 |
-
|
782 |
-
<sort_order translate="label">
|
783 |
-
<label>Sort Order</label>
|
784 |
-
<frontend_type>text</frontend_type>
|
785 |
-
<sort_order>100</sort_order>
|
786 |
-
<show_in_default>1</show_in_default>
|
787 |
-
<show_in_website>1</show_in_website>
|
788 |
-
<show_in_store>1</show_in_store>
|
789 |
-
<frontend_class>validate-number</frontend_class>
|
790 |
-
</sort_order>
|
791 |
-
</fields>
|
792 |
-
</mundipagg_threecreditcards>
|
793 |
-
<mundipagg_fourcreditcards type="group" translate="label">
|
794 |
-
<label><![CDATA[MundiPagg - 4 Cartões de Crédito]]></label>
|
795 |
-
<sort_order>460</sort_order>
|
796 |
-
<show_in_default>1</show_in_default>
|
797 |
-
<show_in_website>1</show_in_website>
|
798 |
-
<show_in_store>1</show_in_store>
|
799 |
-
<comment>
|
800 |
-
<![CDATA[<br><a href="http://www.mundipagg.com.br" target="_blank"><img title="MundiPagg" alt="MundiPagg" src="/skin/adminhtml/default/default/images/mundipagg/mundi-magento-admin-banner.png"/></a><br><br><br>]]></comment>
|
801 |
-
<fields>
|
802 |
-
<active translate="label">
|
803 |
-
<label>Enabled</label>
|
804 |
-
<frontend_type>select</frontend_type>
|
805 |
-
<source_model>adminhtml/system_config_source_yesno</source_model>
|
806 |
-
<sort_order>1</sort_order>
|
807 |
-
<show_in_default>1</show_in_default>
|
808 |
-
<show_in_website>1</show_in_website>
|
809 |
-
<show_in_store>1</show_in_store>
|
810 |
-
</active>
|
811 |
-
|
812 |
-
<title translate="label">
|
813 |
-
<label>Title</label>
|
814 |
-
<frontend_type>text</frontend_type>
|
815 |
-
<sort_order>2</sort_order>
|
816 |
-
<show_in_default>1</show_in_default>
|
817 |
-
<show_in_website>1</show_in_website>
|
818 |
-
<show_in_store>1</show_in_store>
|
819 |
-
<comment>
|
820 |
-
<![CDATA[Frase que irá aparecer no seu checkout para descrever a forma de pagamento.]]></comment>
|
821 |
-
</title>
|
822 |
-
|
823 |
-
<allowspecific translate="label">
|
824 |
-
<label>Payment from Applicable Countries</label>
|
825 |
-
<frontend_type>allowspecific</frontend_type>
|
826 |
-
<sort_order>60</sort_order>
|
827 |
-
<source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
|
828 |
-
<show_in_default>1</show_in_default>
|
829 |
-
<show_in_website>1</show_in_website>
|
830 |
-
<show_in_store>1</show_in_store>
|
831 |
-
</allowspecific>
|
832 |
-
|
833 |
-
<specificcountry translate="label">
|
834 |
-
<label>Payment from Specific Countries</label>
|
835 |
-
<frontend_type>multiselect</frontend_type>
|
836 |
-
<sort_order>61</sort_order>
|
837 |
-
<source_model>adminhtml/system_config_source_country</source_model>
|
838 |
-
<show_in_default>1</show_in_default>
|
839 |
-
<show_in_website>1</show_in_website>
|
840 |
-
<show_in_store>1</show_in_store>
|
841 |
-
</specificcountry>
|
842 |
-
|
843 |
-
<min_order_total translate="label">
|
844 |
-
<label>Min Order Total</label>
|
845 |
-
<frontend_type>text</frontend_type>
|
846 |
-
<sort_order>70</sort_order>
|
847 |
-
<show_in_default>1</show_in_default>
|
848 |
-
<show_in_website>1</show_in_website>
|
849 |
-
<show_in_store>1</show_in_store>
|
850 |
-
<frontend_class>validate-number</frontend_class>
|
851 |
-
</min_order_total>
|
852 |
-
|
853 |
-
<max_order_total translate="label">
|
854 |
-
<label>Max Order Total</label>
|
855 |
-
<frontend_type>text</frontend_type>
|
856 |
-
<sort_order>80</sort_order>
|
857 |
-
<show_in_default>1</show_in_default>
|
858 |
-
<show_in_website>1</show_in_website>
|
859 |
-
<show_in_store>1</show_in_store>
|
860 |
-
<frontend_class>validate-number</frontend_class>
|
861 |
-
</max_order_total>
|
862 |
-
|
863 |
-
<sort_order translate="label">
|
864 |
-
<label>Sort Order</label>
|
865 |
-
<frontend_type>text</frontend_type>
|
866 |
-
<sort_order>100</sort_order>
|
867 |
-
<show_in_default>1</show_in_default>
|
868 |
-
<show_in_website>1</show_in_website>
|
869 |
-
<show_in_store>1</show_in_store>
|
870 |
-
<frontend_class>validate-number</frontend_class>
|
871 |
-
</sort_order>
|
872 |
-
</fields>
|
873 |
-
</mundipagg_fourcreditcards>
|
874 |
-
<mundipagg_fivecreditcards type="group" translate="label">
|
875 |
-
<label><![CDATA[MundiPagg - 5 Cartões de Crédito]]></label>
|
876 |
-
<sort_order>470</sort_order>
|
877 |
-
<show_in_default>1</show_in_default>
|
878 |
-
<show_in_website>1</show_in_website>
|
879 |
-
<show_in_store>1</show_in_store>
|
880 |
-
<comment>
|
881 |
-
<![CDATA[<br><a href="http://www.mundipagg.com.br" target="_blank"><img title="MundiPagg" alt="MundiPagg" src="/skin/adminhtml/default/default/images/mundipagg/mundi-magento-admin-banner.png"/></a><br><br><br>]]></comment>
|
882 |
-
<fields>
|
883 |
-
<active translate="label">
|
884 |
-
<label>Enabled</label>
|
885 |
-
<frontend_type>select</frontend_type>
|
886 |
-
<source_model>adminhtml/system_config_source_yesno</source_model>
|
887 |
-
<sort_order>1</sort_order>
|
888 |
-
<show_in_default>1</show_in_default>
|
889 |
-
<show_in_website>1</show_in_website>
|
890 |
-
<show_in_store>1</show_in_store>
|
891 |
-
</active>
|
892 |
-
|
893 |
-
<title translate="label">
|
894 |
-
<label>Title</label>
|
895 |
-
<frontend_type>text</frontend_type>
|
896 |
-
<sort_order>2</sort_order>
|
897 |
-
<show_in_default>1</show_in_default>
|
898 |
-
<show_in_website>1</show_in_website>
|
899 |
-
<show_in_store>1</show_in_store>
|
900 |
-
<comment>
|
901 |
-
<![CDATA[Frase que irá aparecer no seu checkout para descrever a forma de pagamento.]]></comment>
|
902 |
-
</title>
|
903 |
-
|
904 |
-
<allowspecific translate="label">
|
905 |
-
<label>Payment from Applicable Countries</label>
|
906 |
-
<frontend_type>allowspecific</frontend_type>
|
907 |
-
<sort_order>60</sort_order>
|
908 |
-
<source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
|
909 |
-
<show_in_default>1</show_in_default>
|
910 |
-
<show_in_website>1</show_in_website>
|
911 |
-
<show_in_store>1</show_in_store>
|
912 |
-
</allowspecific>
|
913 |
-
|
914 |
-
<specificcountry translate="label">
|
915 |
-
<label>Payment from Specific Countries</label>
|
916 |
-
<frontend_type>multiselect</frontend_type>
|
917 |
-
<sort_order>61</sort_order>
|
918 |
-
<source_model>adminhtml/system_config_source_country</source_model>
|
919 |
-
<show_in_default>1</show_in_default>
|
920 |
-
<show_in_website>1</show_in_website>
|
921 |
-
<show_in_store>1</show_in_store>
|
922 |
-
</specificcountry>
|
923 |
-
|
924 |
-
<min_order_total translate="label">
|
925 |
-
<label>Min Order Total</label>
|
926 |
-
<frontend_type>text</frontend_type>
|
927 |
-
<sort_order>70</sort_order>
|
928 |
-
<show_in_default>1</show_in_default>
|
929 |
-
<show_in_website>1</show_in_website>
|
930 |
-
<show_in_store>1</show_in_store>
|
931 |
-
<frontend_class>validate-number</frontend_class>
|
932 |
-
</min_order_total>
|
933 |
-
|
934 |
-
<max_order_total translate="label">
|
935 |
-
<label>Max Order Total</label>
|
936 |
-
<frontend_type>text</frontend_type>
|
937 |
-
<sort_order>80</sort_order>
|
938 |
-
<show_in_default>1</show_in_default>
|
939 |
-
<show_in_website>1</show_in_website>
|
940 |
-
<show_in_store>1</show_in_store>
|
941 |
-
<frontend_class>validate-number</frontend_class>
|
942 |
-
</max_order_total>
|
943 |
-
|
944 |
-
<sort_order translate="label">
|
945 |
-
<label>Sort Order</label>
|
946 |
-
<frontend_type>text</frontend_type>
|
947 |
-
<sort_order>100</sort_order>
|
948 |
-
<show_in_default>1</show_in_default>
|
949 |
-
<show_in_website>1</show_in_website>
|
950 |
-
<show_in_store>1</show_in_store>
|
951 |
-
<frontend_class>validate-number</frontend_class>
|
952 |
-
</sort_order>
|
953 |
-
</fields>
|
954 |
-
</mundipagg_fivecreditcards>
|
955 |
<mundipagg_boleto type="group" translate="label">
|
956 |
<label><![CDATA[MundiPagg - Boleto]]></label>
|
957 |
<sort_order>480</sort_order>
|
709 |
</sort_order>
|
710 |
</fields>
|
711 |
</mundipagg_twocreditcards>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
712 |
<mundipagg_boleto type="group" translate="label">
|
713 |
<label><![CDATA[MundiPagg - Boleto]]></label>
|
714 |
<sort_order>480</sort_order>
|
app/code/community/Uecommerce/Mundipagg/sql/mundipagg_setup/mysql4-upgrade-2.9.4-2.9.5.php
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
$installer = $this;
|
4 |
+
$prefix = Mage::getConfig()->getTablePrefix();
|
5 |
+
|
6 |
+
$installer->startSetup();
|
7 |
+
|
8 |
+
$sql = "
|
9 |
+
UPDATE {$prefix}core_config_data
|
10 |
+
SET VALUE = 0
|
11 |
+
WHERE path IN (
|
12 |
+
'payment/mundipagg_threecreditcards/active',
|
13 |
+
'payment/mundipagg_fourcreditcards/active',
|
14 |
+
'payment/mundipagg_fivecreditcards/active'
|
15 |
+
);";
|
16 |
+
|
17 |
+
$installer->run($sql);
|
18 |
+
$installer->endSetup();
|
app/design/adminhtml/default/default/template/mundipagg/payment/info/mundipagg.phtml
CHANGED
@@ -28,6 +28,7 @@
|
|
28 |
* @author Uecommerce Dev Team
|
29 |
*/
|
30 |
|
|
|
31 |
$helper = Mage::helper('mundipagg');
|
32 |
|
33 |
if (Mage::registry('current_order')):
|
@@ -50,20 +51,26 @@ endif;
|
|
50 |
|
51 |
$standard = Mage::getModel('mundipagg/standard');
|
52 |
|
53 |
-
$paymentAction = $standard->getPaymentAction();
|
54 |
-
|
55 |
-
if ($paymentAction == 'authorize') {
|
56 |
-
$paymentAction = 'authorization';
|
57 |
-
}
|
58 |
?>
|
59 |
<div>
|
60 |
-
|
61 |
<?php
|
62 |
$info = $this->getInfo();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
63 |
$PaymentMethod = $info->getAdditionalInformation('PaymentMethod');
|
64 |
$integrationError = $info->getAdditionalInformation('IntegrationError');
|
65 |
|
66 |
-
echo $helper->__('Method')
|
67 |
|
68 |
$orderKeys = (array)$orderKeys = $_order->getPayment()->getAdditionalInformation('OrderKey');
|
69 |
$orderKeysQty = count($orderKeys);
|
@@ -81,122 +88,28 @@ if ($paymentAction == 'authorize') {
|
|
81 |
endif;
|
82 |
|
83 |
if ($OrderReference = $_order->getPayment()->getAdditionalInformation('OrderReference')):
|
84 |
-
echo $helper->__('OrderReference')
|
85 |
endif;
|
86 |
endif;
|
87 |
|
88 |
-
|
89 |
-
$
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
$
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
if (isset($txDetail['CreditCardNumber'])) {
|
108 |
-
$ccNumber = $txDetail['CreditCardNumber'];
|
109 |
-
}
|
110 |
-
|
111 |
-
$message = isset($txDetail['AcquirerMessage']) ? $txDetail['AcquirerMessage'] : null;
|
112 |
-
endif;
|
113 |
-
endforeach;
|
114 |
-
|
115 |
-
if ($PaymentMethod == '1CreditCards' || $PaymentMethod == 'mundipagg_creditcard'):
|
116 |
-
// Token
|
117 |
-
$token = $this->getInfo()->getAdditionalInformation('mundipagg_creditcard_token_1_1');
|
118 |
-
|
119 |
-
if ($token && $token != 'new'):
|
120 |
-
echo $helper->__('Credit Card Issuer') . ': ';
|
121 |
-
echo $this->getInfo()->getAdditionalInformation('CreditCardBrandEnum_mundipagg_creditcard_token_1_1');
|
122 |
-
echo '<br/>';
|
123 |
-
if ($ccNumber) echo 'Numeração: ' . $ccNumber . '<br>';
|
124 |
-
|
125 |
-
if ($this->getInfo()->getAdditionalInformation('mundipagg_creditcard_credito_parcelamento_1_1')):
|
126 |
-
echo $helper->__('InstallmentsCount') . ': ';
|
127 |
-
echo $this->getInfo()->getAdditionalInformation('mundipagg_creditcard_credito_parcelamento_1_1');
|
128 |
-
echo 'x<br/>';
|
129 |
-
endif;
|
130 |
-
else:
|
131 |
-
echo $helper->__('Credit Card Issuer') . ': ';
|
132 |
-
echo $this->getInfo()->getAdditionalInformation('mundipagg_creditcard_1_1_cc_type');
|
133 |
-
echo '<br/>';
|
134 |
-
if ($ccNumber) echo 'Numeração: ' . $ccNumber . '<br>';
|
135 |
-
|
136 |
-
if ($this->getInfo()->getAdditionalInformation('mundipagg_creditcard_new_credito_parcelamento_1_1')):
|
137 |
-
echo $helper->__('InstallmentsCount') . ': ';
|
138 |
-
echo $this->getInfo()->getAdditionalInformation('mundipagg_creditcard_new_credito_parcelamento_1_1');
|
139 |
-
echo 'x<br/>';
|
140 |
-
endif;
|
141 |
-
endif;
|
142 |
-
|
143 |
-
if ($authCode):
|
144 |
-
echo 'Autorização: <b>' . $authCode . '</b><br/>';
|
145 |
-
endif;
|
146 |
-
|
147 |
-
if ($tid):
|
148 |
-
echo 'ID da Transação: ' . $tid . '<br/>';
|
149 |
-
endif;
|
150 |
-
|
151 |
-
if ($message):
|
152 |
-
echo 'Retorno adquirente: ' . $message . '<br/>';
|
153 |
-
endif;
|
154 |
-
|
155 |
-
if ($CreditCardTransactionStatusEnum = $_order->getPayment()->getAdditionalInformation('1_CreditCardTransactionStatusEnum')):
|
156 |
-
echo $helper->__('Transaction Status') . ': ' . $CreditCardTransactionStatusEnum . '<br/>';
|
157 |
-
else:
|
158 |
-
if ($CreditCardTransactionStatusEnum = $_order->getPayment()->getAdditionalInformation('CreditCardTransactionStatusEnum')):
|
159 |
-
echo $helper->__('Transaction Status') . ': ' . $CreditCardTransactionStatusEnum . '<br/>';
|
160 |
-
endif;
|
161 |
-
endif;
|
162 |
-
|
163 |
-
endif;
|
164 |
-
|
165 |
-
if ($PaymentMethod == 'mundipagg_creditcardoneinstallment'):
|
166 |
-
// Token
|
167 |
-
$token = $this->getInfo()->getAdditionalInformation('mundipagg_creditcardoneinstallment_token_1_1');
|
168 |
-
|
169 |
-
if ($token && $token != 'new'):
|
170 |
-
echo $helper->__('Credit Card Issuer') . ': ';
|
171 |
-
echo $this->getInfo()->getAdditionalInformation('CreditCardBrandEnum_mundipagg_creditcardoneinstallment_token_1_1');
|
172 |
-
echo '<br/>';
|
173 |
-
?>
|
174 |
-
<?php
|
175 |
-
else:
|
176 |
-
echo $helper->__('Credit Card Issuer') . ': ';
|
177 |
-
echo $this->getInfo()->getAdditionalInformation('mundipagg_creditcardoneinstallment_1_1_cc_type');
|
178 |
-
echo '<br/>';
|
179 |
-
endif;
|
180 |
-
|
181 |
-
if ($authCode):
|
182 |
-
echo $helper->__('Autorização') . ': ' . $authCode . '<br/>';
|
183 |
-
endif;
|
184 |
-
|
185 |
-
if ($tid):
|
186 |
-
echo $helper->__('Nosso Número') . ': ' . $tid . '<br/>';
|
187 |
-
endif;
|
188 |
-
|
189 |
-
if ($message):
|
190 |
-
echo 'Retorno adquirente: ' . $message . '<br/>';
|
191 |
-
endif;
|
192 |
-
|
193 |
-
if ($CreditCardTransactionStatusEnum = $_order->getPayment()->getAdditionalInformation('1_CreditCardTransactionStatusEnum')):
|
194 |
-
echo $helper->__('Transaction Status') . ': ' . $CreditCardTransactionStatusEnum . '<br/>';
|
195 |
-
else:
|
196 |
-
if ($CreditCardTransactionStatusEnum = $_order->getPayment()->getAdditionalInformation('CreditCardTransactionStatusEnum')):
|
197 |
-
echo $helper->__('Transaction Status') . ': ' . $CreditCardTransactionStatusEnum . '<br/>';
|
198 |
-
endif;
|
199 |
-
endif;
|
200 |
endif;
|
201 |
|
202 |
if (($PaymentMethod == 'BoletoBancario' || $PaymentMethod == 'mundipagg_boleto') && $boletoUrl = $_order->getPayment()->getAdditionalInformation('BoletoUrl')):
|
@@ -225,15 +138,15 @@ if ($paymentAction == 'authorize') {
|
|
225 |
endif;
|
226 |
endforeach;
|
227 |
?>
|
228 |
-
|
229 |
<?php echo $helper->__('Nosso Número'); ?>: <b><?php echo $nossoNumero; ?></b>
|
230 |
-
|
231 |
-
|
232 |
<?php echo $helper->__('Código de Barras'); ?>: <?php echo $barcode; ?>
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
<?php
|
238 |
endif;
|
239 |
|
@@ -246,13 +159,6 @@ if ($paymentAction == 'authorize') {
|
|
246 |
<?php
|
247 |
endif;
|
248 |
?>
|
249 |
-
|
250 |
-
|
251 |
-
<?php
|
252 |
-
// Integration Error
|
253 |
-
if ($info->getAdditionalInformation('IntegrationError')):
|
254 |
-
echo "<p class='error'>{$helper->__('Integration error')}: {$info->getAdditionalInformation('IntegrationError')}</p>";
|
255 |
-
endif;
|
256 |
-
?>
|
257 |
|
258 |
</div>
|
28 |
* @author Uecommerce Dev Team
|
29 |
*/
|
30 |
|
31 |
+
/* @var Uecommerce_Mundipagg_Helper_Data $helper */
|
32 |
$helper = Mage::helper('mundipagg');
|
33 |
|
34 |
if (Mage::registry('current_order')):
|
51 |
|
52 |
$standard = Mage::getModel('mundipagg/standard');
|
53 |
|
|
|
|
|
|
|
|
|
|
|
54 |
?>
|
55 |
<div>
|
56 |
+
<p>
|
57 |
<?php
|
58 |
$info = $this->getInfo();
|
59 |
+
|
60 |
+
$errorCode = $info->getAdditionalInformation('ErrorCode');
|
61 |
+
$errorDescription = $info->getAdditionalInformation('ErrorDescription');
|
62 |
+
|
63 |
+
if ($errorCode >= 400 && $errorDescription) {
|
64 |
+
echo "<b>[{$helper->__('Integration error')}]</b><br/>";
|
65 |
+
echo "{$helper->__('Error code')}: {$errorCode}<br/>";
|
66 |
+
echo "{$helper->__('Error description')}: {$errorDescription}<br/><br/>";
|
67 |
+
return;
|
68 |
+
}
|
69 |
+
|
70 |
$PaymentMethod = $info->getAdditionalInformation('PaymentMethod');
|
71 |
$integrationError = $info->getAdditionalInformation('IntegrationError');
|
72 |
|
73 |
+
echo "{$helper->__('Method')}: {$helper->__($PaymentMethod)}<br/>";
|
74 |
|
75 |
$orderKeys = (array)$orderKeys = $_order->getPayment()->getAdditionalInformation('OrderKey');
|
76 |
$orderKeysQty = count($orderKeys);
|
88 |
endif;
|
89 |
|
90 |
if ($OrderReference = $_order->getPayment()->getAdditionalInformation('OrderReference')):
|
91 |
+
echo "{$helper->__('OrderReference')}: {$OrderReference}<br/>";
|
92 |
endif;
|
93 |
endif;
|
94 |
|
95 |
+
$ccQty = $info->getAdditionalInformation('mundipagg_type');
|
96 |
+
$ccQty = str_replace('CreditCards', '', $ccQty);
|
97 |
+
|
98 |
+
if ($ccQty > 0):
|
99 |
+
for ($i = 1; $i <= $ccQty; $i++) {
|
100 |
+
$authorizationCode = $this->getAuthorizationCode($i);
|
101 |
+
$txnId = $this->getTransactionId($i);
|
102 |
+
|
103 |
+
echo "<p>";
|
104 |
+
echo "{$helper->__('Credit card issuer')}: {$this->getCcBrand($i)}<br/>";
|
105 |
+
echo "{$helper->__('Masked number')}: {$info->getAdditionalInformation("{$i}_MaskedCreditCardNumber")}<br/>";
|
106 |
+
echo "{$helper->__('Amount')}: {$this->getCcValue($i)}<br/>";
|
107 |
+
echo "{$helper->__('Installments')}: {$this->getInstallmentsNumber($ccQty, $i)}<br/>";
|
108 |
+
echo "{$helper->__('Authorization code')}: {$authorizationCode}<br/>";
|
109 |
+
echo "{$helper->__('Transaction ID')}: {$txnId}<br/>";
|
110 |
+
echo "{$helper->__('Acquirer message')}: {$info->getAdditionalInformation("{$i}_AcquirerMessage")}<br/>";
|
111 |
+
echo "</p>";
|
112 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
113 |
endif;
|
114 |
|
115 |
if (($PaymentMethod == 'BoletoBancario' || $PaymentMethod == 'mundipagg_boleto') && $boletoUrl = $_order->getPayment()->getAdditionalInformation('BoletoUrl')):
|
138 |
endif;
|
139 |
endforeach;
|
140 |
?>
|
141 |
+
<p>
|
142 |
<?php echo $helper->__('Nosso Número'); ?>: <b><?php echo $nossoNumero; ?></b>
|
143 |
+
</p>
|
144 |
+
<p>
|
145 |
<?php echo $helper->__('Código de Barras'); ?>: <?php echo $barcode; ?>
|
146 |
+
</p>
|
147 |
+
<p>
|
148 |
+
<a href="<?php echo $boletoUrl; ?>" target="_blank"><?php echo $helper->__('Print boleto'); ?></a>
|
149 |
+
</p>
|
150 |
<?php
|
151 |
endif;
|
152 |
|
159 |
<?php
|
160 |
endif;
|
161 |
?>
|
162 |
+
</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
163 |
|
164 |
</div>
|
app/design/frontend/base/default/template/mundipagg/form.phtml
CHANGED
@@ -47,9 +47,10 @@ $orderGrandTotal = $standard->getQuote()->getBaseGrandTotal();
|
|
47 |
// Partial payment?
|
48 |
$isPartial = Mage::getSingleton('checkout/session')->getApprovalRequestSuccess();
|
49 |
|
50 |
-
if($isPartial == 'partial'):
|
51 |
-
$
|
52 |
-
|
|
|
53 |
$baseGrandTotal = $orderGrandTotal - $authorizedAmount;
|
54 |
else :
|
55 |
$baseGrandTotal = $orderGrandTotal;
|
47 |
// Partial payment?
|
48 |
$isPartial = Mage::getSingleton('checkout/session')->getApprovalRequestSuccess();
|
49 |
|
50 |
+
if($isPartial == 'partial'):
|
51 |
+
$order = $this->loadOrder();
|
52 |
+
$authorizedAmount = $order->getPaymentAuthorizationAmount();
|
53 |
+
$orderGrandTotal = $order->getBaseGrandTotal();
|
54 |
$baseGrandTotal = $orderGrandTotal - $authorizedAmount;
|
55 |
else :
|
56 |
$baseGrandTotal = $orderGrandTotal;
|
app/design/frontend/rwd/default/template/mundipagg/form.phtml
CHANGED
@@ -27,16 +27,17 @@
|
|
27 |
* @package Uecommerce_Mundipagg
|
28 |
* @author Uecommerce Dev Team
|
29 |
*/
|
30 |
-
|
31 |
//Return Standard model
|
|
|
32 |
$standard = $this->getStandard();
|
33 |
|
34 |
// Get Quote
|
|
|
35 |
$quote = $standard->getQuote();
|
36 |
|
37 |
$installmentsHelper = Mage::helper('mundipagg/installments');
|
38 |
|
39 |
-
if($quote->isVirtual()) {
|
40 |
$data = $quote->getBillingAddress();
|
41 |
} else {
|
42 |
$data = $quote->getShippingAddress();
|
@@ -47,16 +48,17 @@ $orderGrandTotal = $standard->getQuote()->getBaseGrandTotal();
|
|
47 |
// Partial payment?
|
48 |
$isPartial = Mage::getSingleton('checkout/session')->getApprovalRequestSuccess();
|
49 |
|
50 |
-
if($isPartial
|
51 |
-
$
|
52 |
-
|
|
|
53 |
$baseGrandTotal = $orderGrandTotal - $authorizedAmount;
|
54 |
else :
|
55 |
$baseGrandTotal = $orderGrandTotal;
|
56 |
endif;
|
57 |
|
58 |
-
if($data->getMundipaggInterest()) {
|
59 |
-
|
60 |
}
|
61 |
|
62 |
// We check if taxvat is enabled
|
@@ -75,307 +77,380 @@ $_code = $this->getMethodCode();
|
|
75 |
?>
|
76 |
|
77 |
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
?>
|
212 |
-
<?php foreach($ccards as $ccard): ?>
|
213 |
-
<li class="cc_brands">
|
214 |
-
<div class="cc_brand_types <?php echo strtolower($ccard); ?>"> </div>
|
215 |
-
<!--<img src="<?php //echo $this->getSkinUrl('images/mundipagg/'.$ccard.'.png');?>" alt="<?php //echo $ccard ?>" border="0" class="cursor_hand" onclick="setCcType(this, '<?php //echo $_code; ?>', '<?php //echo $num; ?>', '<?php //echo $c;?>', '<?php //echo $ccard; ?>');">-->
|
216 |
-
<input type="radio" name="payment[<?php echo $_code; ?>_<?php echo $num; ?>_<?php echo $c;?>_credito_instituicao]" id="<?php echo $_code; ?>_<?php echo $num; ?>_<?php echo $c;?>_credito_instituicao_<?php echo $ccard; ?>" value="<?php echo $ccard ?>" class="<?php if ($_i == 1): ?>validate-one-required-by-name<?php endif; ?>" onclick="setCcType(this, '<?php echo $_code; ?>', '<?php echo $num; ?>', '<?php echo $c;?>', '<?php echo $ccard; ?>');">
|
217 |
-
</li>
|
218 |
-
<?php
|
219 |
-
$_i++;
|
220 |
-
endforeach
|
221 |
-
?>
|
222 |
-
</ul>
|
223 |
-
<p class="info-payment"><i><small><?php echo $this->__('The flag is automatically selected after entering the credit card number below.'); ?></small></i></p>
|
224 |
-
<input type="hidden" name="payment[<?php echo $_code; ?>_<?php echo $num; ?>_<?php echo $c;?>_cc_type]" id="<?php echo $_code; ?>_<?php echo $num; ?>_<?php echo $c;?>_cc_type" value="" class="validate-cc-type-select"/>
|
225 |
-
</div>
|
226 |
-
</div>
|
227 |
-
</li>
|
228 |
-
<li style="margin-bottom: 5px;">
|
229 |
-
<div class="field">
|
230 |
-
<label class="required"><?php echo $this->__('Credit Card Number') ?> <span class="required">*</span></label>
|
231 |
-
<div class="input-box">
|
232 |
-
<input type="text" id="<?php echo $_code; ?>_<?php echo $num; ?>_<?php echo $c;?>_cc_number" name="payment[<?php echo $_code; ?>_<?php echo $num; ?>_<?php echo $c;?>_cc_number]" title="<?php echo $this->__('Credit Card Number') ?>" class="input-text required-entry validate-cc-number" onkeydown="remove_characters(event);" value=""/>
|
233 |
-
</div>
|
234 |
-
</div>
|
235 |
-
</li>
|
236 |
-
<li style="margin-bottom: 5px;">
|
237 |
-
<div class="field">
|
238 |
-
<label class="required"><?php echo $this->__('Credit Card Holder name') ?> <span class="required">*</span></label>
|
239 |
-
<div class="input-box">
|
240 |
-
<input type="text" id="<?php echo $_code; ?>_cc_holder_name_<?php echo $num; ?>_<?php echo $c;?>" name="payment[<?php echo $_code; ?>_cc_holder_name_<?php echo $num; ?>_<?php echo $c;?>]" class="required-entry input-text" />
|
241 |
-
</div>
|
242 |
-
</div>
|
243 |
-
</li>
|
244 |
-
<li style="margin-bottom: 5px;">
|
245 |
-
<div class="field">
|
246 |
-
<label class="required"><?php echo $this->__('Expiration date') ?> <span class="required">*</span></label>
|
247 |
-
<div class="input-box">
|
248 |
-
<div class="v-fix">
|
249 |
-
<select id="<?php echo $_code; ?>_expirationMonth_<?php echo $num; ?>_<?php echo $c;?>" name="payment[<?php echo $_code; ?>_expirationMonth_<?php echo $num; ?>_<?php echo $c;?>]" class="month required-entry validate-cc-exp-new">
|
250 |
-
<option value=""><?php echo $this->__('Month') ?></option>
|
251 |
-
<option value="1">01 - <?php echo $this->__('January') ?></option>
|
252 |
-
<option value="2">02 - <?php echo $this->__('February') ?></option>
|
253 |
-
<option value="3">03 - <?php echo $this->__('March') ?></option>
|
254 |
-
<option value="4">04 - <?php echo $this->__('April') ?></option>
|
255 |
-
<option value="5">05 - <?php echo $this->__('May') ?></option>
|
256 |
-
<option value="6">06 - <?php echo $this->__('June') ?></option>
|
257 |
-
<option value="7">07 - <?php echo $this->__('July') ?></option>
|
258 |
-
<option value="8">08 - <?php echo $this->__('August') ?></option>
|
259 |
-
<option value="9">09 - <?php echo $this->__('September') ?></option>
|
260 |
-
<option value="10">10 - <?php echo $this->__('October') ?></option>
|
261 |
-
<option value="11">11 - <?php echo $this->__('November') ?></option>
|
262 |
-
<option value="12">12 - <?php echo $this->__('December') ?></option>
|
263 |
-
</select>
|
264 |
-
</div>
|
265 |
-
<div class="v-fix" style="padding-left:6px;">
|
266 |
-
<select id="<?php echo $_code; ?>_expirationYear_<?php echo $num; ?>_<?php echo $c;?>" name="payment[<?php echo $_code; ?>_expirationYear_<?php echo $num; ?>_<?php echo $c;?>]" class="year required-entry">
|
267 |
-
<option value=""><?php echo $this->__('Year') ?></option>
|
268 |
-
<?php
|
269 |
-
$i = date('Y');
|
270 |
-
$year = date('Y');
|
271 |
-
$year10 = $year + 10;
|
272 |
-
for( $i = $year; $i <= $year10; $i++ ):
|
273 |
-
?>
|
274 |
-
<option value="<?php echo substr($i, -2);?>"><?php echo $i;?></option>
|
275 |
-
<?php endfor; ?>
|
276 |
-
</select>
|
277 |
-
</div>
|
278 |
-
</div>
|
279 |
-
</div>
|
280 |
-
</li>
|
281 |
-
<li style="margin-bottom: 5px;">
|
282 |
-
<div class="field">
|
283 |
-
<label class="required"><?php echo $this->__('Card Verification Number') ?> <span class="required">*</span></label>
|
284 |
-
<div class="input-box">
|
285 |
-
<div class="v-fix">
|
286 |
-
<input type="text" id="<?php echo $_code; ?>_cc_cid_<?php echo $num; ?>_<?php echo $c;?>" name="payment[<?php echo $_code; ?>_cc_cid_<?php echo $num; ?>_<?php echo $c;?>]" style="width: 55px" class="required-entry input-text validate-cc-cvn validate-length" maxlength="4" onkeydown="remove_characters(event);"/>
|
287 |
-
</div>
|
288 |
-
<div class="v-fix" style="padding-left:6px;">
|
289 |
-
<a href="#" class="cvv-what-is-this"><?php echo $this->__('What is this?') ?></a>
|
290 |
-
</div>
|
291 |
-
</div>
|
292 |
-
</div>
|
293 |
-
</li>
|
294 |
-
<?php if($num != 1): ?>
|
295 |
-
<li style="margin-bottom: 5px;">
|
296 |
-
<div class="field">
|
297 |
-
<label class="required"><?php echo $this->__('Value (Ex: 100,50)') ?> <span class="required">*</span></label>
|
298 |
-
<div class="input-box">
|
299 |
-
<input type="text" id="<?php echo $_code; ?>_new_value_<?php echo $num; ?>_<?php echo $c;?>" name="payment[<?php echo $_code; ?>_new_value_<?php echo $num; ?>_<?php echo $c;?>]" title="<?php echo $this->__('Value (Ex: 100,50)') ?>" class="required-entry input-text validate-greater-than-zero check_values" onchange="calculateInstallmentValue(this, <?php echo $num;?>, <?php echo $c;?>, '<?php echo Mage::getUrl('',array('_secure'=>true)); ?>');" onkeydown="remove_special_characters(event);" value=""/>
|
300 |
-
</div>
|
301 |
-
</div>
|
302 |
-
</li>
|
303 |
-
<?php endif; ?>
|
304 |
-
<?php if ($installmentsHelper->isInstallmentsEnabled() && $_code != 'mundipagg_creditcardoneinstallment'): ?>
|
305 |
-
<li style="margin-bottom: 5px;">
|
306 |
-
<div class="field">
|
307 |
-
<label class="required"><?php echo $this->__('Credit options') ?> <?php if($num ==2): ?><!--<a href="javascript:void(0);" onclick="javascript:void(0);">(<?php /*echo $this->__('click to update') */?>)</a>--><?php endif ?></label>
|
308 |
-
<div class="input-box">
|
309 |
-
<select id="<?php echo $_code; ?>_new_credito_parcelamento_<?php echo $num; ?>_<?php echo $c;?>" name="payment[<?php echo $_code; ?>_new_credito_parcelamento_<?php echo $num; ?>_<?php echo $c;?>]" onchange="checkInstallments(this, '<?php echo Mage::getUrl('',array('_secure'=>true)); ?>');">
|
310 |
-
<?php foreach($this->getInstallments() as $key => $parcel): ?>
|
311 |
-
<option value="<?php echo $key ?>"><?php echo $parcel ?></option>
|
312 |
<?php endforeach ?>
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
350 |
|
351 |
|
352 |
<script type="text/javascript">
|
353 |
-
//<![CDATA[
|
354 |
-
Validation.addAllThese([
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
]);
|
368 |
-
|
369 |
-
window.baseUrl = '<?php echo Mage::getUrl('',array('_secure'=>true)); ?>';
|
370 |
-
window.installmentsandinterestUrl = '<?php echo Mage::getUrl('mundipagg/standard/installmentsandinterest',array('_secure'=>true)); ?>';
|
371 |
-
window.ajaxLoaderGif = '<?php echo $this->getSkinUrl('images/mundipagg/ajax-loader.gif'); ?>';
|
372 |
-
window.isInstallmentsEnabled = '<?php echo Mage::helper('mundipagg/installments')->isInstallmentsEnabled(); ?>';
|
373 |
-
|
374 |
-
$$('.validate-cc-number').invoke('observe','keyup',function(){
|
375 |
-
|
376 |
-
});
|
377 |
-
$$('.validate-cc-number').invoke('observe','blur',function(){
|
378 |
-
|
379 |
-
});
|
380 |
-
//]]>
|
381 |
</script>
|
27 |
* @package Uecommerce_Mundipagg
|
28 |
* @author Uecommerce Dev Team
|
29 |
*/
|
|
|
30 |
//Return Standard model
|
31 |
+
/* @var Uecommerce_Mundipagg_Block_Standard_Form $standard */
|
32 |
$standard = $this->getStandard();
|
33 |
|
34 |
// Get Quote
|
35 |
+
/* @var Mage_Sales_Model_Quote $quote */
|
36 |
$quote = $standard->getQuote();
|
37 |
|
38 |
$installmentsHelper = Mage::helper('mundipagg/installments');
|
39 |
|
40 |
+
if ($quote->isVirtual()) {
|
41 |
$data = $quote->getBillingAddress();
|
42 |
} else {
|
43 |
$data = $quote->getShippingAddress();
|
48 |
// Partial payment?
|
49 |
$isPartial = Mage::getSingleton('checkout/session')->getApprovalRequestSuccess();
|
50 |
|
51 |
+
if ($isPartial === 'partial'):
|
52 |
+
$order = $this->loadOrder();
|
53 |
+
$authorizedAmount = $order->getPaymentAuthorizationAmount();
|
54 |
+
$orderGrandTotal = $order->getBaseGrandTotal();
|
55 |
$baseGrandTotal = $orderGrandTotal - $authorizedAmount;
|
56 |
else :
|
57 |
$baseGrandTotal = $orderGrandTotal;
|
58 |
endif;
|
59 |
|
60 |
+
if ($data->getMundipaggInterest()) {
|
61 |
+
$baseGrandTotal = $baseGrandTotal - $data->getMundipaggInterest();
|
62 |
}
|
63 |
|
64 |
// We check if taxvat is enabled
|
77 |
?>
|
78 |
|
79 |
|
80 |
+
<ul id="payment_form_<?php echo $_code ?>" style="display:none;">
|
81 |
+
<div>
|
82 |
+
<input type="hidden" id="baseGrandTotal" name="baseGrandTotal"
|
83 |
+
value="<?php echo number_format($baseGrandTotal, "2", ",", ""); ?>"/>
|
84 |
+
<?php if ($isPartial == 'partial'): ?>
|
85 |
+
<input type="hidden" name="partial" id="partial" value="1"/>
|
86 |
+
<input type="hidden" name="payment[multi]" id="multi" value="1"/>
|
87 |
+
<?php endif; ?>
|
88 |
+
</div>
|
89 |
+
<?php
|
90 |
+
// START CREDIT CARD PAYMENT METHOD
|
91 |
+
$num = 1;
|
92 |
+
|
93 |
+
switch ($_code):
|
94 |
+
case 'mundipagg_creditcardoneinstallment':
|
95 |
+
$num = 1;
|
96 |
+
$paymentMethod = '1CreditCardsOneInstallment';
|
97 |
+
$paymentMethodLabel = $this->__('Credit Card');
|
98 |
+
break;
|
99 |
+
|
100 |
+
case 'mundipagg_creditcard':
|
101 |
+
$num = 1;
|
102 |
+
$paymentMethod = '1CreditCards';
|
103 |
+
$paymentMethodLabel = $this->__('Credit Card');
|
104 |
+
break;
|
105 |
+
|
106 |
+
case 'mundipagg_twocreditcards':
|
107 |
+
$num = 2;
|
108 |
+
$paymentMethod = '2CreditCards';
|
109 |
+
$paymentMethodLabel = $this->__('Pay with 2 Credit Cards');
|
110 |
+
break;
|
111 |
+
|
112 |
+
case 'mundipagg_threecreditcards':
|
113 |
+
$num = 3;
|
114 |
+
$paymentMethod = '3CreditCards';
|
115 |
+
$paymentMethodLabel = $this->__('Pay with 3 Credit Cards');
|
116 |
+
break;
|
117 |
+
|
118 |
+
case 'mundipagg_fourcreditcards':
|
119 |
+
$num = 4;
|
120 |
+
$paymentMethod = '4CreditCards';
|
121 |
+
$paymentMethodLabel = $this->__('Pay with 4 Credit Cards');
|
122 |
+
break;
|
123 |
+
|
124 |
+
case 'mundipagg_fivecreditcards':
|
125 |
+
$num = 5;
|
126 |
+
$paymentMethod = '5CreditCards';
|
127 |
+
$paymentMethodLabel = $this->__('Pay with 5 Credit Cards');
|
128 |
+
break;
|
129 |
+
endswitch;
|
130 |
+
?>
|
131 |
+
<li>
|
132 |
+
<div id="<?php echo $_code; ?>">
|
133 |
+
<?php if ($num != 1 && $isPartial != 'partial'): ?>
|
134 |
+
<p></p>
|
135 |
+
<div>
|
136 |
+
<b><?php echo $this->__('Grand Total') ?>
|
137 |
+
:</b> <?php echo $currencySymbol . number_format($baseGrandTotal, "2", ",", "."); ?>
|
138 |
+
</div>
|
139 |
+
<p></p>
|
140 |
+
<?php endif ?>
|
141 |
+
<?php if ($_code == 'mundipagg_creditcardoneinstallment' || $_code == 'mundipagg_creditcard' || $_code == 'mundipagg_twocreditcards' || $_code == 'mundipagg_threecreditcards' || $_code == 'mundipagg_fourcreditcards' || $_code == 'mundipagg_fivecreditcards'): ?>
|
142 |
+
<ul>
|
143 |
+
<?php for ($c = 1; $c <= $num; $c++): ?>
|
144 |
+
<input type="hidden" id="mundipagg_type" name="payment[mundipagg_type]"
|
145 |
+
value="<?php echo $paymentMethod; ?>"/>
|
146 |
+
<?php $currentSelectedToken = null; ?>
|
147 |
+
<?php if ($countCcs > 0): ?>
|
148 |
+
<li class="fields" style="margin-bottom: 5px;">
|
149 |
+
<div class="field">
|
150 |
+
<label class="required"><?php echo $this->__('Select a Credit Card or add a new one') ?>
|
151 |
+
<span class="required">*</span></label>
|
152 |
+
<div class="input-box">
|
153 |
+
|
154 |
+
<select id="<?php echo $_code; ?>_token_<?php echo $num; ?>_<?php echo $c; ?>"
|
155 |
+
data="group_<?php echo $num; ?>_<?php echo $c; ?>"
|
156 |
+
name="payment[<?php echo $_code; ?>_token_<?php echo $num; ?>_<?php echo $c; ?>]"
|
157 |
+
class="required-entry tokens group_<?php echo $num; ?>_<?php echo $c; ?>"
|
158 |
+
onchange="token_or_not(<?php echo $num; ?>,<?php echo $c; ?>,this)">
|
159 |
+
<option value="">...</option>
|
160 |
+
<?php
|
161 |
+
$selected = '';
|
162 |
+
|
163 |
+
if ($countCcs == 1):
|
164 |
+
$selected = 'selected="selected"';
|
165 |
+
endif;
|
166 |
+
|
167 |
+
foreach ($ccs as $id => $cc):
|
168 |
+
|
169 |
+
if ($countCcs == 1) {
|
170 |
+
$currentSelectedToken = Mage::getSingleton('mundipagg/source_cctypes')->getCcTypeForLabel($cc->getCcType());
|
171 |
+
}
|
172 |
+
$dataType = $currentSelectedToken ? $currentSelectedToken : Mage::getSingleton('mundipagg/source_cctypes')->getCcTypeForLabel($cc->getCcType());
|
173 |
+
echo '<option value="' . $cc->getId() . '" ' . $selected . ' data="' . $dataType . '">' . $cc->getCcType() . ' ' . $cc->getCreditCardMask() . '</option>';
|
174 |
+
endforeach;
|
175 |
+
?>
|
176 |
+
<option value="new"><?php echo $this->__('New Credit Card') ?></option>
|
177 |
+
</select>
|
178 |
+
</div>
|
179 |
+
</div>
|
180 |
+
</li>
|
181 |
+
<?php if ($num != 1): ?>
|
182 |
+
<div id="value_<?php echo $num; ?>_<?php echo $c; ?>">
|
183 |
+
<li class="fields" style="margin-bottom: 5px;">
|
184 |
+
<div class="field">
|
185 |
+
<label class="required"><?php echo $this->__('Value (Ex: 100,50)') ?> <span
|
186 |
+
class="required">*</span></label>
|
187 |
+
<div class="input-box">
|
188 |
+
<input type="text"
|
189 |
+
id="<?php echo $_code; ?>_value_<?php echo $num; ?>_<?php echo $c; ?>"
|
190 |
+
name="payment[<?php echo $_code; ?>_value_<?php echo $num; ?>_<?php echo $c; ?>]"
|
191 |
+
title="<?php echo $this->__('Value (Ex: 100,50)') ?>"
|
192 |
+
class="required-entry validate-greater-than-zero input-text check_values group_<?php echo $num; ?>_<?php echo $c; ?>"
|
193 |
+
onchange="calculateInstallmentValue(this, <?php echo $num; ?>, <?php echo $c; ?>, '<?php echo Mage::getUrl('', array('_secure' => true)); ?>');"
|
194 |
+
onkeydown="remove_special_characters(event);" value=""/>
|
195 |
+
</div>
|
196 |
+
</div>
|
197 |
+
</li>
|
198 |
+
</div>
|
199 |
+
<?php endif; ?>
|
200 |
+
<?php if ($installmentsHelper->isInstallmentsEnabled() && $_code != 'mundipagg_creditcardoneinstallment'): ?>
|
201 |
+
<div id="parcelamento_<?php echo $num; ?>_<?php echo $c; ?>"
|
202 |
+
<?php if ($countCcs > 1): ?>style="display:none"<?php endif ?>>
|
203 |
+
<li class="fields" style="margin-bottom: 5px;">
|
204 |
+
<div class="field">
|
205 |
+
<label class="required"><?php echo $this->__('Credit options') ?>
|
206 |
+
<?php if ($num == 2): ?><!--<a href="javascript:void(0);" onclick="javascript:void(0);">(<?php /*echo $this->__('click to update') */ ?>)</a>--><?php endif ?></label>
|
207 |
+
<div class="input-box">
|
208 |
+
<select id="<?php echo $_code; ?>_credito_parcelamento_<?php echo $num; ?>_<?php echo $c; ?>"
|
209 |
+
name="payment[<?php echo $_code; ?>_credito_parcelamento_<?php echo $num; ?>_<?php echo $c; ?>]"
|
210 |
+
class="required-entry installment-token group_<?php echo $num; ?>_<?php echo $c; ?>">
|
211 |
+
<?php foreach ($this->getInstallments($currentSelectedToken) as $key => $parcel): ?>
|
212 |
+
<option value="<?php echo $key ?>"><?php echo $parcel ?></option>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
213 |
<?php endforeach ?>
|
214 |
+
</select>
|
215 |
+
</div>
|
216 |
+
</div>
|
217 |
+
</li>
|
218 |
+
</div>
|
219 |
+
<?php endif; ?>
|
220 |
+
<?php endif; ?>
|
221 |
+
<div class="division"></div>
|
222 |
+
<div id="<?php echo $_code; ?>_new_credit_card_<?php echo $num; ?>_<?php echo $c; ?>"
|
223 |
+
<?php if ($countCcs > 0) { ?>style="display:none"<?php } ?>>
|
224 |
+
|
225 |
+
<li style="margin-bottom: 5px;">
|
226 |
+
<div class="field">
|
227 |
+
<label class="required"><?php echo $this->__('Credit Card Issuer') ?> <span
|
228 |
+
class="required">*</span></label>
|
229 |
+
<div class="input-box">
|
230 |
+
<ul class="inline input-radio">
|
231 |
+
<?php
|
232 |
+
$ccards = $standard->getCcTypes();
|
233 |
+
$_i = 1;
|
234 |
+
?>
|
235 |
+
<?php foreach ($ccards as $ccard): ?>
|
236 |
+
<li class="cc_brands">
|
237 |
+
<div class="cc_brand_types <?php echo strtolower($ccard); ?>">
|
238 |
+
</div>
|
239 |
+
<!--<img src="<?php //echo $this->getSkinUrl('images/mundipagg/'.$ccard.'.png');?>" alt="<?php //echo $ccard ?>" border="0" class="cursor_hand" onclick="setCcType(this, '<?php //echo $_code; ?>', '<?php //echo $num; ?>', '<?php //echo $c;?>', '<?php //echo $ccard; ?>');">-->
|
240 |
+
<input type="radio"
|
241 |
+
name="payment[<?php echo $_code; ?>_<?php echo $num; ?>_<?php echo $c; ?>_credito_instituicao]"
|
242 |
+
id="<?php echo $_code; ?>_<?php echo $num; ?>_<?php echo $c; ?>_credito_instituicao_<?php echo $ccard; ?>"
|
243 |
+
value="<?php echo $ccard ?>"
|
244 |
+
class="<?php if ($_i == 1): ?>validate-one-required-by-name<?php endif; ?>"
|
245 |
+
onclick="setCcType(this, '<?php echo $_code; ?>', '<?php echo $num; ?>', '<?php echo $c; ?>', '<?php echo $ccard; ?>');">
|
246 |
+
</li>
|
247 |
+
<?php
|
248 |
+
$_i++;
|
249 |
+
endforeach
|
250 |
+
?>
|
251 |
+
</ul>
|
252 |
+
<p class="info-payment"><i>
|
253 |
+
<small><?php echo $this->__('The flag is automatically selected after entering the credit card number below.'); ?></small>
|
254 |
+
</i></p>
|
255 |
+
<input type="hidden"
|
256 |
+
name="payment[<?php echo $_code; ?>_<?php echo $num; ?>_<?php echo $c; ?>_cc_type]"
|
257 |
+
id="<?php echo $_code; ?>_<?php echo $num; ?>_<?php echo $c; ?>_cc_type"
|
258 |
+
value="" class="validate-cc-type-select"/>
|
259 |
+
</div>
|
260 |
+
</div>
|
261 |
+
</li>
|
262 |
+
<li style="margin-bottom: 5px;">
|
263 |
+
<div class="field">
|
264 |
+
<label class="required"><?php echo $this->__('Credit Card Number') ?> <span
|
265 |
+
class="required">*</span></label>
|
266 |
+
<div class="input-box">
|
267 |
+
<input type="text"
|
268 |
+
id="<?php echo $_code; ?>_<?php echo $num; ?>_<?php echo $c; ?>_cc_number"
|
269 |
+
name="payment[<?php echo $_code; ?>_<?php echo $num; ?>_<?php echo $c; ?>_cc_number]"
|
270 |
+
title="<?php echo $this->__('Credit Card Number') ?>"
|
271 |
+
class="input-text required-entry validate-cc-number"
|
272 |
+
onkeydown="remove_characters(event);" value=""/>
|
273 |
+
</div>
|
274 |
+
</div>
|
275 |
+
</li>
|
276 |
+
<li style="margin-bottom: 5px;">
|
277 |
+
<div class="field">
|
278 |
+
<label class="required"><?php echo $this->__('Credit Card Holder name') ?> <span
|
279 |
+
class="required">*</span></label>
|
280 |
+
<div class="input-box">
|
281 |
+
<input type="text"
|
282 |
+
id="<?php echo $_code; ?>_cc_holder_name_<?php echo $num; ?>_<?php echo $c; ?>"
|
283 |
+
name="payment[<?php echo $_code; ?>_cc_holder_name_<?php echo $num; ?>_<?php echo $c; ?>]"
|
284 |
+
class="required-entry input-text"/>
|
285 |
+
</div>
|
286 |
+
</div>
|
287 |
+
</li>
|
288 |
+
<li style="margin-bottom: 5px;">
|
289 |
+
<div class="field">
|
290 |
+
<label class="required"><?php echo $this->__('Expiration date') ?> <span
|
291 |
+
class="required">*</span></label>
|
292 |
+
<div class="input-box">
|
293 |
+
<div class="v-fix">
|
294 |
+
<select id="<?php echo $_code; ?>_expirationMonth_<?php echo $num; ?>_<?php echo $c; ?>"
|
295 |
+
name="payment[<?php echo $_code; ?>_expirationMonth_<?php echo $num; ?>_<?php echo $c; ?>]"
|
296 |
+
class="month required-entry validate-cc-exp-new">
|
297 |
+
<option value=""><?php echo $this->__('Month') ?></option>
|
298 |
+
<option value="1">01 - <?php echo $this->__('January') ?></option>
|
299 |
+
<option value="2">02 - <?php echo $this->__('February') ?></option>
|
300 |
+
<option value="3">03 - <?php echo $this->__('March') ?></option>
|
301 |
+
<option value="4">04 - <?php echo $this->__('April') ?></option>
|
302 |
+
<option value="5">05 - <?php echo $this->__('May') ?></option>
|
303 |
+
<option value="6">06 - <?php echo $this->__('June') ?></option>
|
304 |
+
<option value="7">07 - <?php echo $this->__('July') ?></option>
|
305 |
+
<option value="8">08 - <?php echo $this->__('August') ?></option>
|
306 |
+
<option value="9">09 - <?php echo $this->__('September') ?></option>
|
307 |
+
<option value="10">10 - <?php echo $this->__('October') ?></option>
|
308 |
+
<option value="11">11 - <?php echo $this->__('November') ?></option>
|
309 |
+
<option value="12">12 - <?php echo $this->__('December') ?></option>
|
310 |
+
</select>
|
311 |
+
</div>
|
312 |
+
<div class="v-fix" style="padding-left:6px;">
|
313 |
+
<select id="<?php echo $_code; ?>_expirationYear_<?php echo $num; ?>_<?php echo $c; ?>"
|
314 |
+
name="payment[<?php echo $_code; ?>_expirationYear_<?php echo $num; ?>_<?php echo $c; ?>]"
|
315 |
+
class="year required-entry">
|
316 |
+
<option value=""><?php echo $this->__('Year') ?></option>
|
317 |
+
<?php
|
318 |
+
$i = date('Y');
|
319 |
+
$year = date('Y');
|
320 |
+
$year10 = $year + 10;
|
321 |
+
for ($i = $year; $i <= $year10; $i++):
|
322 |
+
?>
|
323 |
+
<option value="<?php echo substr($i, -2); ?>"><?php echo $i; ?></option>
|
324 |
+
<?php endfor; ?>
|
325 |
+
</select>
|
326 |
+
</div>
|
327 |
+
</div>
|
328 |
+
</div>
|
329 |
+
</li>
|
330 |
+
<li style="margin-bottom: 5px;">
|
331 |
+
<div class="field">
|
332 |
+
<label class="required"><?php echo $this->__('Card Verification Number') ?> <span
|
333 |
+
class="required">*</span></label>
|
334 |
+
<div class="input-box">
|
335 |
+
<div class="v-fix">
|
336 |
+
<input type="text"
|
337 |
+
id="<?php echo $_code; ?>_cc_cid_<?php echo $num; ?>_<?php echo $c; ?>"
|
338 |
+
name="payment[<?php echo $_code; ?>_cc_cid_<?php echo $num; ?>_<?php echo $c; ?>]"
|
339 |
+
style="width: 55px"
|
340 |
+
class="required-entry input-text validate-cc-cvn validate-length"
|
341 |
+
maxlength="4" onkeydown="remove_characters(event);"/>
|
342 |
+
</div>
|
343 |
+
<div class="v-fix" style="padding-left:6px;">
|
344 |
+
<a href="#"
|
345 |
+
class="cvv-what-is-this"><?php echo $this->__('What is this?') ?></a>
|
346 |
+
</div>
|
347 |
+
</div>
|
348 |
+
</div>
|
349 |
+
</li>
|
350 |
+
<?php if ($num != 1): ?>
|
351 |
+
<li style="margin-bottom: 5px;">
|
352 |
+
<div class="field">
|
353 |
+
<label class="required"><?php echo $this->__('Value (Ex: 100,50)') ?> <span
|
354 |
+
class="required">*</span></label>
|
355 |
+
<div class="input-box">
|
356 |
+
<input type="text"
|
357 |
+
id="<?php echo $_code; ?>_new_value_<?php echo $num; ?>_<?php echo $c; ?>"
|
358 |
+
name="payment[<?php echo $_code; ?>_new_value_<?php echo $num; ?>_<?php echo $c; ?>]"
|
359 |
+
title="<?php echo $this->__('Value (Ex: 100,50)') ?>"
|
360 |
+
class="required-entry input-text validate-greater-than-zero check_values"
|
361 |
+
onchange="calculateInstallmentValue(this, <?php echo $num; ?>, <?php echo $c; ?>, '<?php echo Mage::getUrl('', array('_secure' => true)); ?>');"
|
362 |
+
onkeydown="remove_special_characters(event);" value=""/>
|
363 |
+
</div>
|
364 |
+
</div>
|
365 |
+
</li>
|
366 |
+
<?php endif; ?>
|
367 |
+
<?php if ($installmentsHelper->isInstallmentsEnabled() && $_code != 'mundipagg_creditcardoneinstallment'): ?>
|
368 |
+
<li style="margin-bottom: 5px;">
|
369 |
+
<div class="field">
|
370 |
+
<label class="required"><?php echo $this->__('Credit options') ?>
|
371 |
+
<?php if ($num == 2): ?><!--<a href="javascript:void(0);" onclick="javascript:void(0);">(<?php /*echo $this->__('click to update') */ ?>)</a>--><?php endif ?></label>
|
372 |
+
<div class="input-box">
|
373 |
+
<select id="<?php echo $_code; ?>_new_credito_parcelamento_<?php echo $num; ?>_<?php echo $c; ?>"
|
374 |
+
name="payment[<?php echo $_code; ?>_new_credito_parcelamento_<?php echo $num; ?>_<?php echo $c; ?>]"
|
375 |
+
onchange="checkInstallments(this, '<?php echo Mage::getUrl('', array('_secure' => true)); ?>');">
|
376 |
+
<?php foreach ($this->getInstallments() as $key => $parcel): ?>
|
377 |
+
<option value="<?php echo $key ?>"><?php echo $parcel ?></option>
|
378 |
+
<?php endforeach ?>
|
379 |
+
</select>
|
380 |
+
</div>
|
381 |
+
</div>
|
382 |
+
</li>
|
383 |
+
<?php endif; ?>
|
384 |
+
<?php if ($standard->getConfigData('clearsale') && !$_taxvat->isEnabled() && Mage::getSingleton('customer/session')->getCustomer()->getTaxvat() == ''): ?>
|
385 |
+
<li style="margin-bottom: 5px;">
|
386 |
+
<div class="field">
|
387 |
+
<label class="required"><?php echo $this->__('CPF ou CNPJ') ?> <span
|
388 |
+
class="required">*</span></label>
|
389 |
+
<div class="input-box">
|
390 |
+
<input type="text"
|
391 |
+
id="<?php echo $_code; ?>_cc_taxvat_<?php echo $num; ?>_<?php echo $c; ?>"
|
392 |
+
name="payment[<?php echo $_code; ?>_cc_taxvat_<?php echo $num; ?>_<?php echo $c; ?>]"
|
393 |
+
title="<?php echo $this->__('CPF ou CNPJ') ?>"
|
394 |
+
class="validar_cpf required-entry"
|
395 |
+
onkeydown="remove_characters(event);"/>
|
396 |
+
</div>
|
397 |
+
</div>
|
398 |
+
</li>
|
399 |
+
<?php endif; ?>
|
400 |
+
<?php if ($standard->getQuote()->getCheckoutMethod() != 'guest'): ?>
|
401 |
+
<?php if (Mage::getStoreConfig('payment/mundipagg_standard/save_cardonfile')): ?>
|
402 |
+
<li>
|
403 |
+
|
404 |
+
<div class="input-box" style="padding-top: 10px">
|
405 |
+
<div class="field">
|
406 |
+
<label class="required"><?php echo $this->__('Save Card On File') ?></label>
|
407 |
+
<input type="checkbox"
|
408 |
+
id="<?php echo $_code; ?>_save_token_<?php echo $num; ?>_<?php echo $c; ?>"
|
409 |
+
name="payment[<?php echo $_code; ?>_save_token_<?php echo $num; ?>_<?php echo $c; ?>]"
|
410 |
+
value="new"/>
|
411 |
+
</div>
|
412 |
+
|
413 |
+
</div>
|
414 |
+
</li>
|
415 |
+
<?php endif; ?>
|
416 |
+
<?php endif; ?>
|
417 |
+
</div>
|
418 |
+
<?php endfor; ?>
|
419 |
+
</ul>
|
420 |
+
<?php endif ?>
|
421 |
+
</div>
|
422 |
+
</li>
|
423 |
+
<?php // END CREDIT CARD PAYMENT METHOD ?>
|
424 |
+
</ul>
|
425 |
|
426 |
|
427 |
<script type="text/javascript">
|
428 |
+
//<![CDATA[
|
429 |
+
Validation.addAllThese([
|
430 |
+
['validate-cc-exp-new', '<?php echo $this->jsQuoteEscape(Mage::helper('mundipagg')->__('Incorrect credit card expiration date.'))?>', function (v, elm) {
|
431 |
+
var ccExpMonth = v;
|
432 |
+
var ccExpYear = $(elm.id.replace("_expirationMonth", "_expirationYear")).value;
|
433 |
+
|
434 |
+
var currentTime = new Date();
|
435 |
+
var currentMonth = currentTime.getMonth() + 1;
|
436 |
+
var currentYear = currentTime.getFullYear().toString().substr(2, 2);
|
437 |
+
if (ccExpMonth < currentMonth && ccExpYear == currentYear) {
|
438 |
+
return false;
|
439 |
+
}
|
440 |
+
return true;
|
441 |
+
}]
|
442 |
+
]);
|
443 |
+
|
444 |
+
window.baseUrl = '<?php echo Mage::getUrl('', array('_secure' => true)); ?>';
|
445 |
+
window.installmentsandinterestUrl = '<?php echo Mage::getUrl('mundipagg/standard/installmentsandinterest', array('_secure' => true)); ?>';
|
446 |
+
window.ajaxLoaderGif = '<?php echo $this->getSkinUrl('images/mundipagg/ajax-loader.gif'); ?>';
|
447 |
+
window.isInstallmentsEnabled = '<?php echo Mage::helper('mundipagg/installments')->isInstallmentsEnabled(); ?>';
|
448 |
+
|
449 |
+
$$('.validate-cc-number').invoke('observe', 'keyup', function () {
|
450 |
+
selectCredcard(this);
|
451 |
+
});
|
452 |
+
$$('.validate-cc-number').invoke('observe', 'blur', function () {
|
453 |
+
selectCredcard(this);
|
454 |
+
});
|
455 |
+
//]]>
|
456 |
</script>
|
app/locale/pt_BR/Uecommerce_Mundipagg.csv
CHANGED
@@ -91,6 +91,7 @@
|
|
91 |
"OrderKey","Chave do pedido"
|
92 |
"OrderKeys","Chaves do pedido"
|
93 |
"Credit Card Issuer","Bandeira"
|
|
|
94 |
"Transaction Status","Status da transação"
|
95 |
"AuthorizedPendingCapture","AuthorizedPendingCapture"
|
96 |
"NotAuthorized","NotAuthorized"
|
@@ -119,6 +120,7 @@
|
|
119 |
"Waiting for Boleto Bancário payment","Aguardando pagamento do Boleto Bancário"
|
120 |
"InstallmentCount","Parcela"
|
121 |
"InstallmentsCount","Parcelas"
|
|
|
122 |
"Print your boleto after you have placed your order.","Imprima o boleto bancário após a finalização do pedido."
|
123 |
"<a href=""%s"" target=""_blank"">Click here to print</a> a copy of your order confirmation.","<a href=""%s"" target=""_blank"">Clique aqui para imprimir</a> a confirmação do pedido."
|
124 |
"Your order has not been paid yet. <a href=""%s"" target=""_blank"">Click here to print</a> your Boleto Bancário.","<a href=""%s"" target=""_blank"">Clique aqui para imprimir</a> seu Boleto Bancário."
|
@@ -221,4 +223,9 @@
|
|
221 |
"Integration timeout limit must be an numeric value","Limite para timeout na integração precisa ser numérico"
|
222 |
"In seconds","Em segundos"
|
223 |
"Capture was not authorized in MundiPagg","Captura não foi autorizada na MundiPagg"
|
224 |
-
"Transactions already captured","Transações já foram capturadas"
|
|
|
|
|
|
|
|
|
|
91 |
"OrderKey","Chave do pedido"
|
92 |
"OrderKeys","Chaves do pedido"
|
93 |
"Credit Card Issuer","Bandeira"
|
94 |
+
"Credit card issuer","Bandeira"
|
95 |
"Transaction Status","Status da transação"
|
96 |
"AuthorizedPendingCapture","AuthorizedPendingCapture"
|
97 |
"NotAuthorized","NotAuthorized"
|
120 |
"Waiting for Boleto Bancário payment","Aguardando pagamento do Boleto Bancário"
|
121 |
"InstallmentCount","Parcela"
|
122 |
"InstallmentsCount","Parcelas"
|
123 |
+
"Installments","Parcelas"
|
124 |
"Print your boleto after you have placed your order.","Imprima o boleto bancário após a finalização do pedido."
|
125 |
"<a href=""%s"" target=""_blank"">Click here to print</a> a copy of your order confirmation.","<a href=""%s"" target=""_blank"">Clique aqui para imprimir</a> a confirmação do pedido."
|
126 |
"Your order has not been paid yet. <a href=""%s"" target=""_blank"">Click here to print</a> your Boleto Bancário.","<a href=""%s"" target=""_blank"">Clique aqui para imprimir</a> seu Boleto Bancário."
|
223 |
"Integration timeout limit must be an numeric value","Limite para timeout na integração precisa ser numérico"
|
224 |
"In seconds","Em segundos"
|
225 |
"Capture was not authorized in MundiPagg","Captura não foi autorizada na MundiPagg"
|
226 |
+
"Transactions already captured","Transações já foram capturadas"
|
227 |
+
"Masked number","Número mascarado"
|
228 |
+
"Amount","Valor"
|
229 |
+
"Authorization code","Código da autorização"
|
230 |
+
"Transaction ID","ID da transação"
|
231 |
+
"Acquirer message","Retorno da adquirente"
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Mundipagg_Integracao</name>
|
4 |
-
<version>2.9.
|
5 |
<stability>stable</stability>
|
6 |
<license>MIT</license>
|
7 |
<channel>community</channel>
|
@@ -12,12 +12,17 @@ Mundipagg payment gateway integration.</summary>
|
|
12 |
<description>Com esta extensão você poderá integrar sua loja Magento com o gateway de pagamentos MundiPagg.
|
13 |

|
14 |
With this extension you can process payments through brazilian payment gateway Mundipagg</description>
|
15 |
-
<notes
|
16 |
-
|
|
|
|
|
|
|
|
|
|
|
17 |
<authors><author><name>MundiPagg</name><user>MundiPagg</user><email>mundi@mundipagg.com</email></author></authors>
|
18 |
-
<date>2017-
|
19 |
-
<time>
|
20 |
-
<contents><target name="magecommunity"><dir name="Uecommerce"><dir name="Mundipagg"><dir name="Block"><dir name="Adminhtml"><dir name="Form"><dir name="Field"><file name="Installments.php" hash="ec8343e197cb194d978400bbdf64d446"/></dir></dir><dir name="Sales"><dir name="Order"><dir name="Creditmemo"><file name="Totals.php" hash="2140a7836eaa57e03727433ccddf93d6"/></dir><dir name="Invoice"><file name="Totals.php" hash="ee304d9034ae0763e5db464f933b8c27"/><file name="View.php" hash="b0e3c170cd0184a5dfbe4fa7a486b471"/></dir><file name="Totals.php" hash="71b20a4c0022c14a5f7f8d008aabe1da"/></dir><dir name="Transactions"><dir name="Detail"><file name="Grid.php" hash="d67911c431587e4327eec95540cf548a"/></dir></dir></dir><dir name="System"><dir name="Config"><dir name="Form"><file name="Button.php" hash="aa40a974b89c92ea9652c42e093d16f9"/></dir></dir></dir><file name="Version.php" hash="e3a89823e48e7a526a3afe8ce8c0d0ee"/></dir><dir name="Checkout"><dir name="Onepage"><dir name="Payment"><file name="Methods.php" hash="c903e413c47e3dea87ec09d609543a27"/></dir></dir></dir><file name="Info.php" hash="c5743b8887caffc12ee2b502d7256101"/><file name="Parcelamento.php" hash="bbfad3557dd7c29e2a21a213cf915e0c"/><dir name="Sales"><dir name="Order"><dir name="Creditmemo"><file name="Totals.php" hash="be3e89b0e2f008fcc0293286d44df7da"/></dir><dir name="Invoice"><file name="Totals.php" hash="a39c41f45ef44b72d15cfd12fea4e9c6"/></dir><file name="Totals.php" hash="6f56aa360f48c715b30afd4e5cd4ddfa"/></dir></dir><dir name="Standard"><file name="Boleto.php" hash="4471015b8a82311f84e52e774460bf38"/><file name="Cancel.php" hash="095eaf31c6567fad440279aeb2994caa"/><file name="Debit.php" hash="c707d9572b6079457b9265cc09c920c6"/><file name="Fcancel.php" hash="4bc5b0fb68fb7fd11159788eafe958af"/><file name="Form.php" hash="0f7f97654c5e819ac178e5d888fae6ee"/><file name="Partial.php" hash="fb5877a8f6c56ac1d6fc48eb864d8e60"/><file name="Redirect.php" hash="70f576c8d64c25e3ce627f6c36b2ff41"/><file name="Success.php" hash="b1b0bef88ed350d703da0e314ffad565"/></dir></dir><dir name="Controller"><file name="Abstract.php" hash="91d5069c18069fcb2a0a436fb768a194"/></dir><dir name="Helper"><file name="Data.php" hash="eb9b6b62dcfa8ff71232de1f224a7d05"/><file name="Installments.php" hash="d0589866ed24ba418a4d1aaea503689e"/><file name="Log.php" hash="3417e640be10aac6c3936a56364eb692"/><file name="UnserializeArray.php" hash="83f968a1a32e0b974bb5607dd2f00463"/><file name="Util.php" hash="cab074ca10096c04e80950062de9bf28"/><file name="Version.php" hash="00066d5bf31a7c49db004f2bd0d5c462"/></dir><dir name="Model"><dir name="Adminvalidators"><dir name="Antifraud"><file name="Minval.php" hash="40a49fef644e180b50c896e9dab34c76"/></dir><file name="Debug.php" hash="80bedd2d18fc0ad3888208d7255048cf"/><file name="Offlineretry.php" hash="b869cce6f6cca51cb5d928776a9122c1"/><file name="Timeout.php" hash="d770cbef860e43d62e2bcbdff8b6fb35"/></dir><file name="Api.php" hash="26d865a0b2d5173d562b62adabe09124"/><file name="Boleto.php" hash="a7da1d58eb0fccb53eae51ba97d93dc5"/><file name="Cardonfile.php" hash="98395928a16313f8b4127e4e210cf953"/><file name="Creditcard.php" hash="007a43e7530ea5471b6a9aaa5405ce21"/><file name="Creditcardoneinstallment.php" hash="2e4222fd04dbc4f5ee116d4d7f4eae04"/><dir name="Customer"><file name="Session.php" hash="7f15498648de23cf4feb5143071ec260"/></dir><file name="Customers.php" hash="a779e96a969b83d1b38df351eb4670d0"/><file name="Debit.php" hash="8a3387bf74b1f03b9614fbdb64ab9dd5"/><dir name="Enum"><file name="BoletoTransactionStatusEnum.php" hash="3fed0a36bb76497b85c50016af34d47a"/><file name="CreditCardTransactionStatusEnum.php" hash="4546716f63e6df57061b222002157ccd"/><file name="OrderStatusEnum.php" hash="fd42020aab9d5507b5e0c26957cd1abb"/><file name="TransactionTypeEnum.php" hash="52fc4049a9f2b120ad3ed99e296268f9"/></dir><file name="Fivecreditcards.php" hash="6975e6170345bb3f20fde79ae40b81fe"/><file name="Fourcreditcards.php" hash="2da3d901173c19e53a96adb197b1533a"/><file name="Observer.php" hash="ab17af822de40cd46d2f4c2f68044546"/><file name="Offlineretry.php" hash="394849df4873908dd43d3c15f75dc9d0"/><dir name="Order"><dir name="Invoice"><file name="Interest.php" hash="6bba5e87bae1a7ee94a827819b2ea4ce"/></dir><file name="Payment.php" hash="2fab1d277409e1699c4fb59993a5c5c8"/></dir><file name="Payment.php" hash="6efc3b0ad9bab589934115387caf0fce"/><file name="Providervalidation.php" hash="4906944bae20e3f683d6e5c4ba5304e3"/><dir name="Quote"><dir name="Address"><file name="Interest.php" hash="93aa0189a8556597697dbb239dbf3be7"/></dir></dir><file name="Recurrency.php" hash="a15c756fbd5295301991679d6d256655"/><dir name="Resource"><dir name="Cardonfile"><file name="Collection.php" hash="7b7d13bc6d7be8e5e1c5f945d59117f6"/></dir><file name="Cardonfile.php" hash="47d0107a9b1c3415aaf8784298361e84"/><dir name="Customers"><file name="Collection.php" hash="6caadd817abbcda527ba6d102585f2ff"/></dir><file name="Customers.php" hash="f50289a4c8362ddf7a79e4aa7c8a6387"/><dir name="Offlineretry"><file name="Collection.php" hash="ece14459f92f4751c70b4dede0364b40"/></dir><file name="Offlineretry.php" hash="f18698d68581de1e756e956afb19106b"/><file name="Setup.php" hash="42bda31d8497e1b0983775e17f7325a5"/></dir><dir name="Source"><file name="Antifraud.php" hash="8362e0bb2209bbf904a7f9b2edd59cee"/><file name="Banks.php" hash="b5d456a807cdf750a6458144e955cf2c"/><file name="CctypeProductInstallments.php" hash="7837f6865c905ba8f5393d080ebc1b3d"/><file name="Cctypes.php" hash="b55eb988a6a09f24b1088f15644961d0"/><file name="Debit.php" hash="9366bc3b900cf96ad5d2bce7e8d93ba7"/><file name="Environment.php" hash="f22bf02692c02d3f8859601ccf9cf90c"/><file name="FControlEnvironment.php" hash="5159f6e4d86ee9d280285b7198fa01e9"/><file name="Frequency.php" hash="9752c73679dee78efc83f468fe45a946"/><file name="Installments.php" hash="b04c05b92f7b8b5c025f23aad4457917"/><file name="PaymentAction.php" hash="c16639be23fd85c285f474922fd528a7"/><file name="PaymentMethods.php" hash="e12514ad00bf3fe3fb4e569b11da2c10"/></dir><file name="Standard.php" hash="3152bf5485a1afc9342fdf24fcfcea3f"/><dir name="System"><dir name="Config"><dir name="Backend"><file name="Installments.php" hash="f0901bf05acd0b2c3fda41965f949583"/></dir></dir></dir><file name="Threecreditcards.php" hash="73fcdc4ef1dd38128b60454f90184ff5"/><file name="Twocreditcards.php" hash="c010f631d556a08d2d1aa65dc6b60703"/><file name="Urlvalidation.php" hash="e3ccd751eea54e282d30624192537cd8"/></dir><dir name="Test"><dir name="Selenium"><file name="Abstract.php" hash="caf0cd5ca47b13fb00be4230d1bb9132"/><file name="BoletoTest.php" hash="0718dc551376686dc6daaa3b57ddd1f9"/><dir name="CcTypes"><file name="CreditcardTest.php" hash="fde35369e57eb70f29f8defe1d7f06af"/><file name="CreditcardoneinstallmentTest.php" hash="cabcf9a3f56497e32679c1d2d063a6d7"/><file name="FivecreditcardsTest.php" hash="a903b89e20b9e754df7ed22dc9e8eecf"/><file name="FourcheditcardsTest.php" hash="3619a03b24af1a768cbc87be430b4323"/><file name="ThreecreditcardsTest.php" hash="d59c7b8a7de6320cff170e435fbe6e9e"/><file name="TwocreditcardsTest.php" hash="58db59f790aa7c65a324e6a552c2e05c"/></dir><file name="CcTypes.php" hash="fdb1cb980444a4cd35ace6543b9f335e"/><file name="DebitTest.php" hash="1409a8f2de15e13792dcba2099a887cc"/></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="IndexController.php" hash="e5a51c9660f704bcbfb302d34493a5a6"/></dir><file name="ClearsaleController.php" hash="bc06365f0d577d66228d9f0c3e471089"/><file name="FcontrolController.php" hash="1af534f1cdadbfdbe702aed12c7a2e1d"/><file name="StandardController.php" hash="16acc0dfc804107603f50239a86b37b2"/><file name="StoneController.php" hash="80c6f59a868ac82fc22bcf586bbecfdd"/></dir><dir name="data"><dir name="mundipagg_setup"><file name="data-upgrade-2.9.1-2.9.2.php" hash="6c8f542f7f04755cf8d2e3e8cb517b51"/></dir></dir><dir name="etc"><file name="config.xml" hash="99647e0904a445571c58e18a3eb17bcd"/><file name="jstranslator.xml" hash="8b1ea10d9b3072a795567dba6dae938c"/><file name="system.xml" hash="31839e346d622a8947eda7360281e238"/><file name="wsdl.xml" hash="a59b87019a8bdb03d97191e2d06be325"/><file name="xtest.xml" hash="b34ee3b6e37a890b73374b5ea3a1c40f"/></dir><dir name="sql"><dir name="mundipagg_setup"><file name="install-0.3.0.php" hash="ede73bb07d71fec55340c4249ff4a258"/><file name="mysql4-upgrade-0.3.0-0.3.5.php" hash="d3c200cce4a814feaa0858c0c8abd928"/><file name="mysql4-upgrade-0.3.5-0.4.0.php" hash="297f1b37b7703f7a0d621d227c8cbeb9"/><file name="mysql4-upgrade-0.3.5-1.0.1.php" hash="d22a0a81e392885433ca58dc196c2a86"/><file name="mysql4-upgrade-0.4.0-1.0.1.php" hash="297f1b37b7703f7a0d621d227c8cbeb9"/><file name="mysql4-upgrade-0.4.1-0.4.2.php" hash="4a2962a1eb974c75e153f48cc77f00d4"/><file name="mysql4-upgrade-0.4.1-1.0.1.php" hash="d22a0a81e392885433ca58dc196c2a86"/><file name="mysql4-upgrade-1.0.0-1.0.1.php" hash="297f1b37b7703f7a0d621d227c8cbeb9"/><file name="mysql4-upgrade-1.0.1-1.0.2.php" hash="4c18b9eb1e0a08d858dde48280eed2c0"/><file name="mysql4-upgrade-1.0.10-1.0.11.php" hash="4c18b9eb1e0a08d858dde48280eed2c0"/><file name="mysql4-upgrade-1.0.11-2.0.0.php" hash="83c95c6060bb8678be3b8944a6823fd9"/><file name="mysql4-upgrade-1.0.2-1.0.3.php" hash="4c18b9eb1e0a08d858dde48280eed2c0"/><file name="mysql4-upgrade-1.0.3-1.0.4.php" hash="4c18b9eb1e0a08d858dde48280eed2c0"/><file name="mysql4-upgrade-1.0.4-1.0.5.php" hash="4c18b9eb1e0a08d858dde48280eed2c0"/><file name="mysql4-upgrade-1.0.5-1.0.6.php" hash="4c18b9eb1e0a08d858dde48280eed2c0"/><file name="mysql4-upgrade-1.0.6-1.0.7.php" hash="4c18b9eb1e0a08d858dde48280eed2c0"/><file name="mysql4-upgrade-1.0.7-1.0.8.php" hash="4c18b9eb1e0a08d858dde48280eed2c0"/><file name="mysql4-upgrade-1.0.8-1.0.9.php" hash="4c18b9eb1e0a08d858dde48280eed2c0"/><file name="mysql4-upgrade-1.0.9-1.0.10.php" hash="4c18b9eb1e0a08d858dde48280eed2c0"/><file name="mysql4-upgrade-2.0.0-2.0.1.php" hash="a437df63647a52381ed5e056ccbb0cff"/><file name="mysql4-upgrade-2.0.0-2.1.0.php" hash="30dc2c3c763893d3bac6b9fde0c56477"/><file name="mysql4-upgrade-2.0.1-2.0.2.php" hash="4959ae51e69913d8ac642bc2ab848464"/><file name="mysql4-upgrade-2.0.2-2.0.3.php" hash="4c18b9eb1e0a08d858dde48280eed2c0"/><file name="mysql4-upgrade-2.0.3-2.0.4.php" hash="4c18b9eb1e0a08d858dde48280eed2c0"/><file name="mysql4-upgrade-2.0.4-2.0.5.php" hash="4c18b9eb1e0a08d858dde48280eed2c0"/><file name="mysql4-upgrade-2.0.5-2.0.6.php" hash="4c18b9eb1e0a08d858dde48280eed2c0"/><file name="mysql4-upgrade-2.0.6-2.0.7.php" hash="4c18b9eb1e0a08d858dde48280eed2c0"/><file name="mysql4-upgrade-2.0.7-2.0.8.php" hash="4c18b9eb1e0a08d858dde48280eed2c0"/><file name="mysql4-upgrade-2.0.8-2.0.9.php" hash="4c18b9eb1e0a08d858dde48280eed2c0"/><file name="mysql4-upgrade-2.0.9-2.1.0.php" hash="3488f42f3d9e6a57ce4176c0a7954171"/><file name="mysql4-upgrade-2.1.2-2.1.3.php" hash="7d7823cb555a32295d179a96e2bf987a"/><file name="mysql4-upgrade-2.5.7-2.5.8.php" hash="45c4f1fd5336b7ce578c672e8f1d57b0"/><file name="mysql4-upgrade-2.5.8-2.6.0.php" hash="bf06e3d6ab5fa0c89629385db4231006"/><file name="mysql4-upgrade-2.7.4-2.8.0.php" hash="c53fbd135b7735b7bbe90e5c4c11e5b2"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="mundipagg.xml" hash="035fd61eb33327a613e5b3b91ddbc389"/></dir><dir name="template"><dir name="mundipagg"><file name="boleto.phtml" hash="11cc5b254644727d6bdded8a834965c7"/><file name="form.phtml" hash="566e1838cab471ce41a1f74156e3b3bf"/><dir name="payment"><dir name="info"><file name="mundipagg.phtml" hash="ced44379b7a3f15e027e91ba8b7ddd4a"/></dir></dir><dir name="system"><dir name="config"><file name="button.phtml" hash="6a7f6c88cf156d31d34a818ac37bd158"/></dir></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="mundipagg.xml" hash="0dc6cc39164b57626ccf7a429bbbf3d7"/></dir><dir name="template"><dir name="mundipagg"><dir name="antifraud"><file name="clearsale.phtml" hash="088a189dd94401f39c90ad0a1471994f"/><file name="fcontrol.phtml" hash="8fe2da3913bd18a20f35235533080ab8"/><file name="stone.phtml" hash="681ddf22694c725bb6e84e79681936fa"/></dir><file name="boleto.phtml" hash="dc31735a2753812d36e3080bf5b01ac2"/><file name="cancel.phtml" hash="540639b1ccd698397286f668bbf23746"/><file name="debit.phtml" hash="78f60f0227e99ff0c1d7dbf6bd5aa202"/><file name="extras.phtml" hash="f3eba84e971e890922141d90f6bdd53f"/><file name="fcancel.phtml" hash="9ce1d7634acf519669e21978b41aa277"/><file name="form.phtml" hash="faff82dad9768f016f81648aa8b9b800"/><file name="parcelamento.phtml" hash="56a89503637e5ad753b0d410f2f5c7ad"/><file name="partial.phtml" hash="65b07a14ff67c7413405117a6f95c2be"/><dir name="payment"><dir name="info"><file name="mundipagg.phtml" hash="c110a21db08013d38add1b79977350e4"/></dir></dir><file name="redirect.phtml" hash="a8a1123eab776934c64f57b4f9cfd517"/><file name="success.phtml" hash="7afd82f246fdf50f9a72ebb15086a2b6"/><file name="totals.phtml" hash="5a78aa3fe60d4b13bf8451f23bb9edd9"/></dir></dir></dir></dir><dir name="rwd"><dir name="default"><dir name="template"><dir name="mundipagg"><file name="debit.phtml" hash="4d2ae58447d3893499556ae068f800f8"/><file name="form.phtml" hash="dd83f04f33982e17fdea1713a3eb1b3a"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Uecommerce_Mundipagg.xml" hash="b292eeabde8e2cd06db0c31aff54fd98"/></dir></target><target name="mage"><dir name="js"><dir name="uecommerce"><dir name="fcontrol"><file name="fingerprint-fcontrol.js" hash="33409e94c34847788fabbb3a5b038fd0"/><file name="hmlg-fcontrol-ed.min.js" hash="b8b6c945111b6edd7a90df2f5d3ff5cd"/></dir><file name="jquery-3.1.0.min.js" hash="05e51b1db558320f1939f9789ccf5c8f"/><file name="mundipagg.js" hash="1bbf52070bdd06b7b0687f6cced1886f"/><file name="recurrency.js" hash="6c0db9f70fea794eb55f1db3bd09b4aa"/></dir></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="images"><dir name="mundipagg"><file name="ajax-loader.gif" hash="7b9776076d5fceef4993b55c9383dedd"/><file name="boleto.jpg" hash="237570c55c811b4b13f73ab92f28e599"/><file name="mundi-magento-admin-banner.png" hash="70ed79656a42a2b4c0291d0a6285fb6d"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><file name="mundipagg.css" hash="90c32001f3a9b858c9506f5135c04972"/></dir><dir name="images"><dir name="mundipagg"><file name="001.png" hash="25d10d6fee7fc3e5dc48021a15de8fb0"/><file name="237.png" hash="cbea9caff342edd9b9b9509bbbbae6fb"/><file name="341.png" hash="3645161fc56322ec34ebfcc006390e5d"/><file name="AE.png" hash="40ea216476033961d50f452bf4bca4df"/><file name="DI.png" hash="0f4264379e7b8ba6b1a30a3d69240ae2"/><file name="EL.png" hash="ad180c308d285f73fc044121cb6aeac0"/><file name="HI.png" hash="c25430ddd8e441cc2fc3ef68219e7668"/><file name="MC.png" hash="836466c092121163320e9e6279f11f8b"/><file name="VBV.jpg" hash="1a7db765956829e80715a299b799f580"/><file name="VBV.png" hash="d6fb7de65fda842f03e2b9fc89d5e6aa"/><file name="VI.png" hash="cc0709d50773fa2815f7bfeb741a4219"/><file name="ajax-loader.gif" hash="7b9776076d5fceef4993b55c9383dedd"/><file name="boleto.jpg" hash="237570c55c811b4b13f73ab92f28e599"/><file name="cc_types.png" hash="fdae60f96ee668354161b5a865b8e7ef"/><file name="cielo_mastercard.png" hash="e2c2af12ea24f1b82490fdcc62fbb871"/><file name="cielo_visa.png" hash="d2f0c660714dc319b73c0dac9c9108d0"/></dir></dir></dir></dir><dir name="default"><dir name="default"><dir name="images"><dir name="mundipagg"><file name="EL.png" hash="ad180c308d285f73fc044121cb6aeac0"/><file name="HI.png" hash="c25430ddd8e441cc2fc3ef68219e7668"/><file name="ae.png" hash="40ea216476033961d50f452bf4bca4df"/><file name="boleto.jpg" hash="237570c55c811b4b13f73ab92f28e599"/><file name="cielo_mastercard.png" hash="e2c2af12ea24f1b82490fdcc62fbb871"/><file name="cielo_visa.png" hash="d2f0c660714dc319b73c0dac9c9108d0"/><file name="di.png" hash="0f4264379e7b8ba6b1a30a3d69240ae2"/><file name="mc.png" hash="836466c092121163320e9e6279f11f8b"/><file name="vi.png" hash="cc0709d50773fa2815f7bfeb741a4219"/></dir></dir></dir></dir></dir></target><target name="magelocale"><dir name="en_US"><file name="Uecommerce_Mundipagg.csv" hash="ae581dc54ea4ada4a9a3c9f4c51f09c7"/></dir><dir name="pt_BR"><file name="Uecommerce_Mundipagg.csv" hash="f07f30314d88c0310895377a0ce581fb"/></dir></target></contents>
|
21 |
<compatible/>
|
22 |
<dependencies><required><php><min>5.4.0</min><max>7.0.9</max></php></required></dependencies>
|
23 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Mundipagg_Integracao</name>
|
4 |
+
<version>2.9.6</version>
|
5 |
<stability>stable</stability>
|
6 |
<license>MIT</license>
|
7 |
<channel>community</channel>
|
12 |
<description>Com esta extensão você poderá integrar sua loja Magento com o gateway de pagamentos MundiPagg.
|
13 |

|
14 |
With this extension you can process payments through brazilian payment gateway Mundipagg</description>
|
15 |
+
<notes>- Remove the payment methods for 3,4 and 5 credit cards
|
16 |
+

|
17 |
+
- Refact in 2 credit cards payment method
|
18 |
+

|
19 |
+
- Add integration error 400/500 reason in Magento admin (order data screen).
|
20 |
+

|
21 |
+
- Fix no cancelation order when error 400 occurs.</notes>
|
22 |
<authors><author><name>MundiPagg</name><user>MundiPagg</user><email>mundi@mundipagg.com</email></author></authors>
|
23 |
+
<date>2017-02-02</date>
|
24 |
+
<time>18:32:44</time>
|
25 |
+
<contents><target name="magecommunity"><dir name="Uecommerce"><dir name="Mundipagg"><dir name="Block"><dir name="Adminhtml"><dir name="Form"><dir name="Field"><file name="Installments.php" hash="ec8343e197cb194d978400bbdf64d446"/></dir></dir><dir name="Sales"><dir name="Order"><dir name="Creditmemo"><file name="Totals.php" hash="2140a7836eaa57e03727433ccddf93d6"/></dir><dir name="Invoice"><file name="Totals.php" hash="ee304d9034ae0763e5db464f933b8c27"/><file name="View.php" hash="b0e3c170cd0184a5dfbe4fa7a486b471"/></dir><file name="Totals.php" hash="71b20a4c0022c14a5f7f8d008aabe1da"/></dir><dir name="Transactions"><dir name="Detail"><file name="Grid.php" hash="d67911c431587e4327eec95540cf548a"/></dir></dir></dir><dir name="System"><dir name="Config"><dir name="Form"><file name="Button.php" hash="aa40a974b89c92ea9652c42e093d16f9"/></dir></dir></dir><file name="Version.php" hash="e3a89823e48e7a526a3afe8ce8c0d0ee"/></dir><dir name="Checkout"><dir name="Onepage"><dir name="Payment"><file name="Methods.php" hash="c903e413c47e3dea87ec09d609543a27"/></dir></dir></dir><file name="Info.php" hash="9c5ff9cc6cc4be97045aca3bab72d0d9"/><file name="Parcelamento.php" hash="bbfad3557dd7c29e2a21a213cf915e0c"/><dir name="Sales"><dir name="Order"><dir name="Creditmemo"><file name="Totals.php" hash="be3e89b0e2f008fcc0293286d44df7da"/></dir><dir name="Invoice"><file name="Totals.php" hash="a39c41f45ef44b72d15cfd12fea4e9c6"/></dir><file name="Totals.php" hash="6f56aa360f48c715b30afd4e5cd4ddfa"/></dir></dir><dir name="Standard"><file name="Boleto.php" hash="4471015b8a82311f84e52e774460bf38"/><file name="Cancel.php" hash="095eaf31c6567fad440279aeb2994caa"/><file name="Debit.php" hash="c707d9572b6079457b9265cc09c920c6"/><file name="Fcancel.php" hash="4bc5b0fb68fb7fd11159788eafe958af"/><file name="Form.php" hash="ba77e55ea6a18b4bd34c6e272721a3ba"/><file name="Partial.php" hash="fb5877a8f6c56ac1d6fc48eb864d8e60"/><file name="Redirect.php" hash="70f576c8d64c25e3ce627f6c36b2ff41"/><file name="Success.php" hash="b1b0bef88ed350d703da0e314ffad565"/></dir></dir><dir name="Controller"><file name="Abstract.php" hash="91d5069c18069fcb2a0a436fb768a194"/></dir><dir name="Helper"><file name="CheckoutSession.php" hash="21170a98bef7a3d6fc87044218251193"/><file name="Data.php" hash="eb9b6b62dcfa8ff71232de1f224a7d05"/><file name="Installments.php" hash="d0589866ed24ba418a4d1aaea503689e"/><file name="Log.php" hash="024416e493e894624f137b380e1c6d4b"/><file name="UnserializeArray.php" hash="83f968a1a32e0b974bb5607dd2f00463"/><file name="Util.php" hash="cab074ca10096c04e80950062de9bf28"/><file name="Version.php" hash="00066d5bf31a7c49db004f2bd0d5c462"/></dir><dir name="Model"><dir name="Adminvalidators"><dir name="Antifraud"><file name="Minval.php" hash="40a49fef644e180b50c896e9dab34c76"/></dir><file name="Debug.php" hash="80bedd2d18fc0ad3888208d7255048cf"/><file name="Offlineretry.php" hash="b869cce6f6cca51cb5d928776a9122c1"/><file name="Timeout.php" hash="d770cbef860e43d62e2bcbdff8b6fb35"/></dir><file name="Api.php" hash="23bafc1367616edf20f6be11884c2dc8"/><file name="Boleto.php" hash="a7da1d58eb0fccb53eae51ba97d93dc5"/><file name="Cardonfile.php" hash="98395928a16313f8b4127e4e210cf953"/><file name="Creditcard.php" hash="007a43e7530ea5471b6a9aaa5405ce21"/><file name="Creditcardoneinstallment.php" hash="2e4222fd04dbc4f5ee116d4d7f4eae04"/><dir name="Customer"><file name="Session.php" hash="7f15498648de23cf4feb5143071ec260"/></dir><file name="Customers.php" hash="a779e96a969b83d1b38df351eb4670d0"/><file name="Debit.php" hash="8a3387bf74b1f03b9614fbdb64ab9dd5"/><dir name="Enum"><file name="BoletoTransactionStatusEnum.php" hash="3fed0a36bb76497b85c50016af34d47a"/><file name="CreditCardTransactionStatusEnum.php" hash="4546716f63e6df57061b222002157ccd"/><file name="OrderStatusEnum.php" hash="fd42020aab9d5507b5e0c26957cd1abb"/><file name="TransactionTypeEnum.php" hash="52fc4049a9f2b120ad3ed99e296268f9"/></dir><file name="Fivecreditcards.php" hash="6975e6170345bb3f20fde79ae40b81fe"/><file name="Fourcreditcards.php" hash="2da3d901173c19e53a96adb197b1533a"/><file name="Observer.php" hash="06f19e9b9e2e8478904d20b2b0139280"/><file name="Offlineretry.php" hash="394849df4873908dd43d3c15f75dc9d0"/><dir name="Order"><dir name="Invoice"><file name="Interest.php" hash="6bba5e87bae1a7ee94a827819b2ea4ce"/></dir><file name="Payment.php" hash="3cd8879acffafa87ffa85f04acc4e671"/></dir><file name="Payment.php" hash="6efc3b0ad9bab589934115387caf0fce"/><file name="Providervalidation.php" hash="4906944bae20e3f683d6e5c4ba5304e3"/><dir name="Quote"><dir name="Address"><file name="Interest.php" hash="93aa0189a8556597697dbb239dbf3be7"/></dir></dir><file name="Recurrency.php" hash="a15c756fbd5295301991679d6d256655"/><dir name="Resource"><dir name="Cardonfile"><file name="Collection.php" hash="7b7d13bc6d7be8e5e1c5f945d59117f6"/></dir><file name="Cardonfile.php" hash="47d0107a9b1c3415aaf8784298361e84"/><dir name="Customers"><file name="Collection.php" hash="6caadd817abbcda527ba6d102585f2ff"/></dir><file name="Customers.php" hash="f50289a4c8362ddf7a79e4aa7c8a6387"/><dir name="Offlineretry"><file name="Collection.php" hash="ece14459f92f4751c70b4dede0364b40"/></dir><file name="Offlineretry.php" hash="f18698d68581de1e756e956afb19106b"/><file name="Setup.php" hash="42bda31d8497e1b0983775e17f7325a5"/></dir><dir name="Source"><file name="Antifraud.php" hash="8362e0bb2209bbf904a7f9b2edd59cee"/><file name="Banks.php" hash="b5d456a807cdf750a6458144e955cf2c"/><file name="CctypeProductInstallments.php" hash="7837f6865c905ba8f5393d080ebc1b3d"/><file name="Cctypes.php" hash="b55eb988a6a09f24b1088f15644961d0"/><file name="Debit.php" hash="9366bc3b900cf96ad5d2bce7e8d93ba7"/><file name="Environment.php" hash="f22bf02692c02d3f8859601ccf9cf90c"/><file name="FControlEnvironment.php" hash="5159f6e4d86ee9d280285b7198fa01e9"/><file name="Frequency.php" hash="9752c73679dee78efc83f468fe45a946"/><file name="Installments.php" hash="b04c05b92f7b8b5c025f23aad4457917"/><file name="PaymentAction.php" hash="c16639be23fd85c285f474922fd528a7"/><file name="PaymentMethods.php" hash="e12514ad00bf3fe3fb4e569b11da2c10"/></dir><file name="Standard.php" hash="357ef7a3c0a2dac83f753859b70fd71f"/><dir name="System"><dir name="Config"><dir name="Backend"><file name="Installments.php" hash="f0901bf05acd0b2c3fda41965f949583"/></dir></dir></dir><file name="Threecreditcards.php" hash="73fcdc4ef1dd38128b60454f90184ff5"/><file name="Twocreditcards.php" hash="c010f631d556a08d2d1aa65dc6b60703"/><file name="Urlvalidation.php" hash="e3ccd751eea54e282d30624192537cd8"/></dir><dir name="Test"><dir name="Selenium"><file name="Abstract.php" hash="caf0cd5ca47b13fb00be4230d1bb9132"/><file name="BoletoTest.php" hash="0718dc551376686dc6daaa3b57ddd1f9"/><dir name="CcTypes"><file name="CreditcardTest.php" hash="fde35369e57eb70f29f8defe1d7f06af"/><file name="CreditcardoneinstallmentTest.php" hash="cabcf9a3f56497e32679c1d2d063a6d7"/><file name="FivecreditcardsTest.php" hash="a903b89e20b9e754df7ed22dc9e8eecf"/><file name="FourcheditcardsTest.php" hash="3619a03b24af1a768cbc87be430b4323"/><file name="ThreecreditcardsTest.php" hash="d59c7b8a7de6320cff170e435fbe6e9e"/><file name="TwocreditcardsTest.php" hash="58db59f790aa7c65a324e6a552c2e05c"/></dir><file name="CcTypes.php" hash="fdb1cb980444a4cd35ace6543b9f335e"/><file name="DebitTest.php" hash="1409a8f2de15e13792dcba2099a887cc"/></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="IndexController.php" hash="e5a51c9660f704bcbfb302d34493a5a6"/></dir><file name="ClearsaleController.php" hash="bc06365f0d577d66228d9f0c3e471089"/><file name="FcontrolController.php" hash="1af534f1cdadbfdbe702aed12c7a2e1d"/><file name="StandardController.php" hash="5f30d515d5084e89c2793557aa159df9"/><file name="StoneController.php" hash="80c6f59a868ac82fc22bcf586bbecfdd"/></dir><dir name="data"><dir name="mundipagg_setup"><file name="data-upgrade-2.9.1-2.9.2.php" hash="6c8f542f7f04755cf8d2e3e8cb517b51"/></dir></dir><dir name="etc"><file name="config.xml" hash="159bf4df48a7fd780caa3996e1f0172b"/><file name="jstranslator.xml" hash="8b1ea10d9b3072a795567dba6dae938c"/><file name="system.xml" hash="57b558edfed7fe96a414ddfeed6681b7"/><file name="wsdl.xml" hash="a59b87019a8bdb03d97191e2d06be325"/><file name="xtest.xml" hash="b34ee3b6e37a890b73374b5ea3a1c40f"/></dir><dir name="sql"><dir name="mundipagg_setup"><file name="install-0.3.0.php" hash="ede73bb07d71fec55340c4249ff4a258"/><file name="mysql4-upgrade-0.3.0-0.3.5.php" hash="d3c200cce4a814feaa0858c0c8abd928"/><file name="mysql4-upgrade-0.3.5-0.4.0.php" hash="297f1b37b7703f7a0d621d227c8cbeb9"/><file name="mysql4-upgrade-0.3.5-1.0.1.php" hash="d22a0a81e392885433ca58dc196c2a86"/><file name="mysql4-upgrade-0.4.0-1.0.1.php" hash="297f1b37b7703f7a0d621d227c8cbeb9"/><file name="mysql4-upgrade-0.4.1-0.4.2.php" hash="4a2962a1eb974c75e153f48cc77f00d4"/><file name="mysql4-upgrade-0.4.1-1.0.1.php" hash="d22a0a81e392885433ca58dc196c2a86"/><file name="mysql4-upgrade-1.0.0-1.0.1.php" hash="297f1b37b7703f7a0d621d227c8cbeb9"/><file name="mysql4-upgrade-1.0.1-1.0.2.php" hash="4c18b9eb1e0a08d858dde48280eed2c0"/><file name="mysql4-upgrade-1.0.10-1.0.11.php" hash="4c18b9eb1e0a08d858dde48280eed2c0"/><file name="mysql4-upgrade-1.0.11-2.0.0.php" hash="83c95c6060bb8678be3b8944a6823fd9"/><file name="mysql4-upgrade-1.0.2-1.0.3.php" hash="4c18b9eb1e0a08d858dde48280eed2c0"/><file name="mysql4-upgrade-1.0.3-1.0.4.php" hash="4c18b9eb1e0a08d858dde48280eed2c0"/><file name="mysql4-upgrade-1.0.4-1.0.5.php" hash="4c18b9eb1e0a08d858dde48280eed2c0"/><file name="mysql4-upgrade-1.0.5-1.0.6.php" hash="4c18b9eb1e0a08d858dde48280eed2c0"/><file name="mysql4-upgrade-1.0.6-1.0.7.php" hash="4c18b9eb1e0a08d858dde48280eed2c0"/><file name="mysql4-upgrade-1.0.7-1.0.8.php" hash="4c18b9eb1e0a08d858dde48280eed2c0"/><file name="mysql4-upgrade-1.0.8-1.0.9.php" hash="4c18b9eb1e0a08d858dde48280eed2c0"/><file name="mysql4-upgrade-1.0.9-1.0.10.php" hash="4c18b9eb1e0a08d858dde48280eed2c0"/><file name="mysql4-upgrade-2.0.0-2.0.1.php" hash="a437df63647a52381ed5e056ccbb0cff"/><file name="mysql4-upgrade-2.0.0-2.1.0.php" hash="30dc2c3c763893d3bac6b9fde0c56477"/><file name="mysql4-upgrade-2.0.1-2.0.2.php" hash="4959ae51e69913d8ac642bc2ab848464"/><file name="mysql4-upgrade-2.0.2-2.0.3.php" hash="4c18b9eb1e0a08d858dde48280eed2c0"/><file name="mysql4-upgrade-2.0.3-2.0.4.php" hash="4c18b9eb1e0a08d858dde48280eed2c0"/><file name="mysql4-upgrade-2.0.4-2.0.5.php" hash="4c18b9eb1e0a08d858dde48280eed2c0"/><file name="mysql4-upgrade-2.0.5-2.0.6.php" hash="4c18b9eb1e0a08d858dde48280eed2c0"/><file name="mysql4-upgrade-2.0.6-2.0.7.php" hash="4c18b9eb1e0a08d858dde48280eed2c0"/><file name="mysql4-upgrade-2.0.7-2.0.8.php" hash="4c18b9eb1e0a08d858dde48280eed2c0"/><file name="mysql4-upgrade-2.0.8-2.0.9.php" hash="4c18b9eb1e0a08d858dde48280eed2c0"/><file name="mysql4-upgrade-2.0.9-2.1.0.php" hash="3488f42f3d9e6a57ce4176c0a7954171"/><file name="mysql4-upgrade-2.1.2-2.1.3.php" hash="7d7823cb555a32295d179a96e2bf987a"/><file name="mysql4-upgrade-2.5.7-2.5.8.php" hash="45c4f1fd5336b7ce578c672e8f1d57b0"/><file name="mysql4-upgrade-2.5.8-2.6.0.php" hash="bf06e3d6ab5fa0c89629385db4231006"/><file name="mysql4-upgrade-2.7.4-2.8.0.php" hash="c53fbd135b7735b7bbe90e5c4c11e5b2"/><file name="mysql4-upgrade-2.9.4-2.9.5.php" hash="29f3b305a7e44f66f2fc9841b668048c"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="mundipagg.xml" hash="035fd61eb33327a613e5b3b91ddbc389"/></dir><dir name="template"><dir name="mundipagg"><file name="boleto.phtml" hash="11cc5b254644727d6bdded8a834965c7"/><file name="form.phtml" hash="566e1838cab471ce41a1f74156e3b3bf"/><dir name="payment"><dir name="info"><file name="mundipagg.phtml" hash="3b1d4412c62780275114e37b63615a65"/></dir></dir><dir name="system"><dir name="config"><file name="button.phtml" hash="6a7f6c88cf156d31d34a818ac37bd158"/></dir></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="mundipagg.xml" hash="0dc6cc39164b57626ccf7a429bbbf3d7"/></dir><dir name="template"><dir name="mundipagg"><dir name="antifraud"><file name="clearsale.phtml" hash="088a189dd94401f39c90ad0a1471994f"/><file name="fcontrol.phtml" hash="8fe2da3913bd18a20f35235533080ab8"/><file name="stone.phtml" hash="681ddf22694c725bb6e84e79681936fa"/></dir><file name="boleto.phtml" hash="dc31735a2753812d36e3080bf5b01ac2"/><file name="cancel.phtml" hash="540639b1ccd698397286f668bbf23746"/><file name="debit.phtml" hash="78f60f0227e99ff0c1d7dbf6bd5aa202"/><file name="extras.phtml" hash="f3eba84e971e890922141d90f6bdd53f"/><file name="fcancel.phtml" hash="9ce1d7634acf519669e21978b41aa277"/><file name="form.phtml" hash="46d83199636924d8e5757643bca9344f"/><file name="parcelamento.phtml" hash="56a89503637e5ad753b0d410f2f5c7ad"/><file name="partial.phtml" hash="65b07a14ff67c7413405117a6f95c2be"/><dir name="payment"><dir name="info"><file name="mundipagg.phtml" hash="c110a21db08013d38add1b79977350e4"/></dir></dir><file name="redirect.phtml" hash="a8a1123eab776934c64f57b4f9cfd517"/><file name="success.phtml" hash="7afd82f246fdf50f9a72ebb15086a2b6"/><file name="totals.phtml" hash="5a78aa3fe60d4b13bf8451f23bb9edd9"/></dir></dir></dir></dir><dir name="rwd"><dir name="default"><dir name="template"><dir name="mundipagg"><file name="debit.phtml" hash="4d2ae58447d3893499556ae068f800f8"/><file name="form.phtml" hash="f61c734a25ad37d381f9882d05b22683"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Uecommerce_Mundipagg.xml" hash="b292eeabde8e2cd06db0c31aff54fd98"/></dir></target><target name="mage"><dir name="js"><dir name="uecommerce"><dir name="fcontrol"><file name="fingerprint-fcontrol.js" hash="33409e94c34847788fabbb3a5b038fd0"/><file name="hmlg-fcontrol-ed.min.js" hash="b8b6c945111b6edd7a90df2f5d3ff5cd"/></dir><file name="jquery-3.1.0.min.js" hash="05e51b1db558320f1939f9789ccf5c8f"/><file name="mundipagg.js" hash="1bbf52070bdd06b7b0687f6cced1886f"/><file name="recurrency.js" hash="6c0db9f70fea794eb55f1db3bd09b4aa"/></dir></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="images"><dir name="mundipagg"><file name="ajax-loader.gif" hash="7b9776076d5fceef4993b55c9383dedd"/><file name="boleto.jpg" hash="237570c55c811b4b13f73ab92f28e599"/><file name="mundi-magento-admin-banner.png" hash="70ed79656a42a2b4c0291d0a6285fb6d"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><file name="mundipagg.css" hash="90c32001f3a9b858c9506f5135c04972"/></dir><dir name="images"><dir name="mundipagg"><file name="001.png" hash="25d10d6fee7fc3e5dc48021a15de8fb0"/><file name="237.png" hash="cbea9caff342edd9b9b9509bbbbae6fb"/><file name="341.png" hash="3645161fc56322ec34ebfcc006390e5d"/><file name="AE.png" hash="40ea216476033961d50f452bf4bca4df"/><file name="DI.png" hash="0f4264379e7b8ba6b1a30a3d69240ae2"/><file name="EL.png" hash="ad180c308d285f73fc044121cb6aeac0"/><file name="HI.png" hash="c25430ddd8e441cc2fc3ef68219e7668"/><file name="MC.png" hash="836466c092121163320e9e6279f11f8b"/><file name="VBV.jpg" hash="1a7db765956829e80715a299b799f580"/><file name="VBV.png" hash="d6fb7de65fda842f03e2b9fc89d5e6aa"/><file name="VI.png" hash="cc0709d50773fa2815f7bfeb741a4219"/><file name="ajax-loader.gif" hash="7b9776076d5fceef4993b55c9383dedd"/><file name="boleto.jpg" hash="237570c55c811b4b13f73ab92f28e599"/><file name="cc_types.png" hash="fdae60f96ee668354161b5a865b8e7ef"/><file name="cielo_mastercard.png" hash="e2c2af12ea24f1b82490fdcc62fbb871"/><file name="cielo_visa.png" hash="d2f0c660714dc319b73c0dac9c9108d0"/></dir></dir></dir></dir><dir name="default"><dir name="default"><dir name="images"><dir name="mundipagg"><file name="EL.png" hash="ad180c308d285f73fc044121cb6aeac0"/><file name="HI.png" hash="c25430ddd8e441cc2fc3ef68219e7668"/><file name="ae.png" hash="40ea216476033961d50f452bf4bca4df"/><file name="boleto.jpg" hash="237570c55c811b4b13f73ab92f28e599"/><file name="cielo_mastercard.png" hash="e2c2af12ea24f1b82490fdcc62fbb871"/><file name="cielo_visa.png" hash="d2f0c660714dc319b73c0dac9c9108d0"/><file name="di.png" hash="0f4264379e7b8ba6b1a30a3d69240ae2"/><file name="mc.png" hash="836466c092121163320e9e6279f11f8b"/><file name="vi.png" hash="cc0709d50773fa2815f7bfeb741a4219"/></dir></dir></dir></dir></dir></target><target name="magelocale"><dir name="en_US"><file name="Uecommerce_Mundipagg.csv" hash="ae581dc54ea4ada4a9a3c9f4c51f09c7"/></dir><dir name="pt_BR"><file name="Uecommerce_Mundipagg.csv" hash="1ec2723fbc9d62699403d545c67a35bc"/></dir></target></contents>
|
26 |
<compatible/>
|
27 |
<dependencies><required><php><min>5.4.0</min><max>7.0.9</max></php></required></dependencies>
|
28 |
</package>
|