MoipExpress - Version 1.0.0.4

Version Notes

Ajuste de bug de retorno de erro da api do MoIP

Sinta-se a vontade para contatar o suporte

Download this release

Release Info

Developer Raul Sakai
Extension MoipExpress
Version 1.0.0.4
Comparing to
See all releases


Code changes from version 1.0.0.3 to 1.0.0.4

app/code/local/Monstroestudio/Moip/Model/PaymentMethod.php CHANGED
@@ -146,7 +146,7 @@ class Monstroestudio_Moip_Model_PaymentMethod extends Mage_Payment_Model_Method_
146
  }
147
 
148
 
149
- if ($this->_moip->getAnswer()->response || $idAlreadyExists) {
150
  if(!$idAlreadyExists){
151
  $arrayData = array(
152
  'order_id' => (int)$payment->getOrder()->getIncrementId(),
@@ -157,7 +157,10 @@ class Monstroestudio_Moip_Model_PaymentMethod extends Mage_Payment_Model_Method_
157
  $modelResponse = Mage::getModel('moip/transactions')->setData($arrayData)->save();
158
  }
159
  }else {
160
- Mage::throwException($this->_moip->getAnswer()->error);
 
 
 
161
  }
162
 
163
  return $this;
146
  }
147
 
148
 
149
+ if (($this->_moip->getAnswer()->response || $idAlreadyExists) && !is_string($this->_moip->getAnswer())) {
150
  if(!$idAlreadyExists){
151
  $arrayData = array(
152
  'order_id' => (int)$payment->getOrder()->getIncrementId(),
157
  $modelResponse = Mage::getModel('moip/transactions')->setData($arrayData)->save();
158
  }
159
  }else {
160
+ if(is_string($this->_moip->getAnswer())){
161
+ Mage::throwException($this->_moip->getAnswer());
162
+ }
163
+ Mage::throwException('Erro: '.$this->_moip->getAnswer()->error);
164
  }
165
 
166
  return $this;
package.xml CHANGED
@@ -1,20 +1,20 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>MoipExpress</name>
4
- <version>1.0.0.3</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.gnu.org/copyleft/gpl.html">GPL v3</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>A melhor e mais nova integra&#xE7;&#xE3;o para a solu&#xE7;&#xE3;o de pagamentos MoIP.</summary>
10
  <description>A melhor e mais nova integra&#xE7;&#xE3;o para a solu&#xE7;&#xE3;o de pagamentos MoIP.</description>
11
- <notes>Ajustes de bug na instala&#xE7;&#xE3;o&#xD;
12
  &#xD;
13
  Sinta-se a vontade para contatar o suporte</notes>
14
  <authors><author><name>Raul Sakai</name><user>rqsakai</user><email>rqsakai@gmail.com</email></author></authors>
15
- <date>2014-07-03</date>
16
- <time>17:20:47</time>
17
- <contents><target name="magelocal"><dir name="Monstroestudio"><dir name="Moip"><dir name="Block"><file name="Form.php" hash="f2bcb847f4c3421180136add3333fc52"/><file name="Redirect.php" hash="f8fd4f552752b99167c726936db64827"/></dir><dir name="Helper"><file name="Data.php" hash="cc959503224982e903b54c0cd2f4af75"/></dir><dir name="Model"><file name="Abstract.php" hash="057d418e2eb63f65dbe4b72290ce2ac4"/><file name="Observer.php" hash="b48222522efd2004ad2f49a76835d9d0"/><file name="PaymentMethod.php" hash="c44178ea7b5635c2db848bbe663ddbda"/><dir name="Resource"><dir name="Safe"><dir name="Collection"><file name="Abstract.php" hash="1226a0f68556e70a06ded8c36122f775"/></dir><file name="Collection.php" hash="db5d0d3d5360569db7d37b015cdbdee6"/></dir><file name="Safe.php" hash="fff8bc262d55296cac2886b39f043b2d"/><dir name="Transactions"><dir name="Collection"><file name="Abstract.php" hash="579220db5fc7f5f0cede6e978c58eada"/></dir><file name="Collection.php" hash="0efc676bb425f3b60484500a6dab52fd"/></dir><file name="Transactions.php" hash="25b1ba30771a1f32727442f4dfeabcfb"/></dir><file name="Safe.php" hash="e66911ae2b4e875fbedc7c063162adb5"/><dir name="Source"><file name="Ccmaxparcelas.php" hash="6f787154ed5c3e4f3bbcdc4db539c39c"/><file name="Paymentmethods.php" hash="cdbcf39fdf3bc3ceeab4d8e6e80317b6"/><file name="Recebimento.php" hash="b65926935d31cbd3709aee596e5c31c6"/><file name="Tipovencboleto.php" hash="fcb4363c7d842b5c02260d9999c52d66"/></dir><file name="Transactions.php" hash="eddb3201f6ac97ea4ec720e0e4f755a5"/></dir><dir name="controllers"><file name="CheckoutController.php" hash="7edd9f00b87a1d1e4583cee87918631e"/></dir><dir name="etc"><file name="config.xml" hash="4feea71246768b42ebf9e3945707e7c5"/><file name="system.xml" hash="01bcd736ba5453a256768a3d73cc529d"/></dir><dir name="sql"><dir name="moip_setup"><file name="mysql4-install-1.0.0.php" hash="52b9d10a9147c87f68bdce6c63668ba7"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="template"><dir name="monstroestudio"><dir name="moip"><file name="form.phtml" hash="b80b671a96db27bd3bc91f6481b5a192"/><file name="redirect.phtml" hash="3f87c1b3105ba38630b17abddba10227"/></dir></dir></dir><dir name="layout"><dir name="monstroestudio"><file name="moip.xml" hash="6d9c361931c42324171522ca732d76ea"/></dir></dir></dir></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="default"><dir name="default"><dir name="monstroestudio"><dir name="moip"><dir name="css"><file name="styles.css" hash="273222070c4fb5bb16623b2ec1c92654"/></dir><dir name="images"><file name="amex.png" hash="ddae1391e6cc2b9ed02755e1bda42127"/><file name="banrisul.png" hash="4a3feb3468e0b5fb72f096c2762d8806"/><file name="bb.png" hash="066e08f866baf93b77694bf354eec913"/><file name="boleto.png" hash="5670bee3689eef1c39e0d35108205b8d"/><file name="bradesco-boleto.jpg" hash="0a9c5b2544e5a07b76be5f714729a11f"/><file name="bradesco.png" hash="8d8919bf93cc04a512f86e3d20003c01"/><file name="cc.png" hash="9355033ab955d67a5b87feb5a72a3786"/><file name="cvv.jpg" hash="435fa5f044e6201c5c2d12cc7ad518f1"/><file name="diners.png" hash="c0624bfa6bde58d5d6defb4849148d23"/><file name="hiper.png" hash="2785865b79748180647bdc3b470101c0"/><file name="itau.png" hash="9b4206fb76f64a86437c80450ba363be"/><file name="master.png" hash="3794747a6bcefcd3975966501ff44782"/><file name="moip-warning.png" hash="7f532dbf2fc16f6378cdefbe92e458db"/><file name="printer.png" hash="1ab5e87a5eff796f63d8134b48a6d02a"/><file name="transf.png" hash="14eafc26fdca09d2bb8c76702d785867"/><file name="transferencia-icon.png" hash="b11dd5f71eb7c1e04fdf8a4b4112c066"/><file name="visa.png" hash="c0044c9a4d4ebcc2773bd9c13620ffce"/></dir><dir name="js"><file name="creditcard.min.js" hash="364e168e2ebd3269691dcdcdbb0fea5e"/><file name="jquery.js" hash="242361900ae3ebb31f8b9a62a9d549f6"/><file name="moip-form.js" hash="f9b78e60136e83ce1bec6cefe0e03c53"/><file name="prototype.maskedinput.js" hash="23acf0dcd74dc380cf1d9059ff74111b"/><file name="validations.js" hash="1105a40f058db378ad1b059505a35d1f"/></dir></dir></dir></dir></dir></dir></target><target name="magelib"><dir name="Moip"><file name="Moip.php" hash="9a5033f185a7179b4ffbf46911b46acc"/><file name="MoipClient.php" hash="ad0b0c4b005bd36fe7499df75483b1bb"/><file name="MoipEnvironment.php" hash="0f69d07dd42baa5ea70af1df10a03003"/><file name="MoipResponse.php" hash="3fc4b67f28adf2c27b968756e0cdfca5"/><file name="MoipStatus.php" hash="9f61696ffb0819ac9cef7a89736edc9b"/><dir name="phpQuery"><file name="phpQuery.php" hash="5cb41d4d677a5f076c2a1fc26430dfe6"/></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Monstroestudio_Moip.xml" hash="7b44177029a9e702bdd0b44bfe8b4b92"/></dir></target></contents>
18
  <compatible/>
19
  <dependencies><required><php><min>4.0.0.</min><max>7.0.0</max></php><package><name>Mage_Core_Payment</name><channel>connect.magentocommerce.com/core</channel><min/><max/></package></required></dependencies>
20
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>MoipExpress</name>
4
+ <version>1.0.0.4</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.gnu.org/copyleft/gpl.html">GPL v3</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>A melhor e mais nova integra&#xE7;&#xE3;o para a solu&#xE7;&#xE3;o de pagamentos MoIP.</summary>
10
  <description>A melhor e mais nova integra&#xE7;&#xE3;o para a solu&#xE7;&#xE3;o de pagamentos MoIP.</description>
11
+ <notes>Ajuste de bug de retorno de erro da api do MoIP&#xD;
12
  &#xD;
13
  Sinta-se a vontade para contatar o suporte</notes>
14
  <authors><author><name>Raul Sakai</name><user>rqsakai</user><email>rqsakai@gmail.com</email></author></authors>
15
+ <date>2014-07-07</date>
16
+ <time>18:26:31</time>
17
+ <contents><target name="magelocal"><dir name="Monstroestudio"><dir name="Moip"><dir name="Block"><file name="Form.php" hash="f2bcb847f4c3421180136add3333fc52"/><file name="Redirect.php" hash="f8fd4f552752b99167c726936db64827"/></dir><dir name="Helper"><file name="Data.php" hash="cc959503224982e903b54c0cd2f4af75"/></dir><dir name="Model"><file name="Abstract.php" hash="057d418e2eb63f65dbe4b72290ce2ac4"/><file name="Observer.php" hash="b48222522efd2004ad2f49a76835d9d0"/><file name="PaymentMethod.php" hash="52b4af58cae3e280e7faaabe93405fd2"/><dir name="Resource"><dir name="Safe"><dir name="Collection"><file name="Abstract.php" hash="1226a0f68556e70a06ded8c36122f775"/></dir><file name="Collection.php" hash="db5d0d3d5360569db7d37b015cdbdee6"/></dir><file name="Safe.php" hash="fff8bc262d55296cac2886b39f043b2d"/><dir name="Transactions"><dir name="Collection"><file name="Abstract.php" hash="579220db5fc7f5f0cede6e978c58eada"/></dir><file name="Collection.php" hash="0efc676bb425f3b60484500a6dab52fd"/></dir><file name="Transactions.php" hash="25b1ba30771a1f32727442f4dfeabcfb"/></dir><file name="Safe.php" hash="e66911ae2b4e875fbedc7c063162adb5"/><dir name="Source"><file name="Ccmaxparcelas.php" hash="6f787154ed5c3e4f3bbcdc4db539c39c"/><file name="Paymentmethods.php" hash="cdbcf39fdf3bc3ceeab4d8e6e80317b6"/><file name="Recebimento.php" hash="b65926935d31cbd3709aee596e5c31c6"/><file name="Tipovencboleto.php" hash="fcb4363c7d842b5c02260d9999c52d66"/></dir><file name="Transactions.php" hash="eddb3201f6ac97ea4ec720e0e4f755a5"/></dir><dir name="controllers"><file name="CheckoutController.php" hash="7edd9f00b87a1d1e4583cee87918631e"/></dir><dir name="etc"><file name="config.xml" hash="4feea71246768b42ebf9e3945707e7c5"/><file name="system.xml" hash="01bcd736ba5453a256768a3d73cc529d"/></dir><dir name="sql"><dir name="moip_setup"><file name="mysql4-install-1.0.0.php" hash="52b9d10a9147c87f68bdce6c63668ba7"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="template"><dir name="monstroestudio"><dir name="moip"><file name="form.phtml" hash="b80b671a96db27bd3bc91f6481b5a192"/><file name="redirect.phtml" hash="3f87c1b3105ba38630b17abddba10227"/></dir></dir></dir><dir name="layout"><dir name="monstroestudio"><file name="moip.xml" hash="6d9c361931c42324171522ca732d76ea"/></dir></dir></dir></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="default"><dir name="default"><dir name="monstroestudio"><dir name="moip"><dir name="css"><file name="styles.css" hash="273222070c4fb5bb16623b2ec1c92654"/></dir><dir name="images"><file name="amex.png" hash="ddae1391e6cc2b9ed02755e1bda42127"/><file name="banrisul.png" hash="4a3feb3468e0b5fb72f096c2762d8806"/><file name="bb.png" hash="066e08f866baf93b77694bf354eec913"/><file name="boleto.png" hash="5670bee3689eef1c39e0d35108205b8d"/><file name="bradesco-boleto.jpg" hash="0a9c5b2544e5a07b76be5f714729a11f"/><file name="bradesco.png" hash="8d8919bf93cc04a512f86e3d20003c01"/><file name="cc.png" hash="9355033ab955d67a5b87feb5a72a3786"/><file name="cvv.jpg" hash="435fa5f044e6201c5c2d12cc7ad518f1"/><file name="diners.png" hash="c0624bfa6bde58d5d6defb4849148d23"/><file name="hiper.png" hash="2785865b79748180647bdc3b470101c0"/><file name="itau.png" hash="9b4206fb76f64a86437c80450ba363be"/><file name="master.png" hash="3794747a6bcefcd3975966501ff44782"/><file name="moip-warning.png" hash="7f532dbf2fc16f6378cdefbe92e458db"/><file name="printer.png" hash="1ab5e87a5eff796f63d8134b48a6d02a"/><file name="transf.png" hash="14eafc26fdca09d2bb8c76702d785867"/><file name="transferencia-icon.png" hash="b11dd5f71eb7c1e04fdf8a4b4112c066"/><file name="visa.png" hash="c0044c9a4d4ebcc2773bd9c13620ffce"/></dir><dir name="js"><file name="creditcard.min.js" hash="364e168e2ebd3269691dcdcdbb0fea5e"/><file name="jquery.js" hash="242361900ae3ebb31f8b9a62a9d549f6"/><file name="moip-form.js" hash="f9b78e60136e83ce1bec6cefe0e03c53"/><file name="prototype.maskedinput.js" hash="23acf0dcd74dc380cf1d9059ff74111b"/><file name="validations.js" hash="1105a40f058db378ad1b059505a35d1f"/></dir></dir></dir></dir></dir></dir></target><target name="magelib"><dir name="Moip"><file name="Moip.php" hash="9a5033f185a7179b4ffbf46911b46acc"/><file name="MoipClient.php" hash="ad0b0c4b005bd36fe7499df75483b1bb"/><file name="MoipEnvironment.php" hash="0f69d07dd42baa5ea70af1df10a03003"/><file name="MoipResponse.php" hash="3fc4b67f28adf2c27b968756e0cdfca5"/><file name="MoipStatus.php" hash="9f61696ffb0819ac9cef7a89736edc9b"/><dir name="phpQuery"><file name="phpQuery.php" hash="5cb41d4d677a5f076c2a1fc26430dfe6"/></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Monstroestudio_Moip.xml" hash="7b44177029a9e702bdd0b44bfe8b4b92"/></dir></target></contents>
18
  <compatible/>
19
  <dependencies><required><php><min>4.0.0.</min><max>7.0.0</max></php><package><name>Mage_Core_Payment</name><channel>connect.magentocommerce.com/core</channel><min/><max/></package></required></dependencies>
20
  </package>