ZooZ_payment - Version 2.0.3

Version Notes

Fixed bug in shipping method retrieval and country code parsing

Download this release

Release Info

Developer ZooZ Payments
Extension ZooZ_payment
Version 2.0.3
Comparing to
See all releases


Code changes from version 2.0.2 to 2.0.3

app/code/community/ZooZ/ZoozPayment/Model/Order.php CHANGED
@@ -91,7 +91,7 @@ class ZooZ_ZoozPayment_Model_Order extends Mage_Core_Model_Abstract {
91
  ->setLastname($shipp_address->lastName)
92
  ->setStreet($shipp_address->street)
93
  ->setCity($shipp_address->city)
94
- ->setCountry_id($shipp_address->country)
95
  ->setRegion($shipp_address->state)
96
  ->setPostcode($shipp_address->zipCode)
97
  ->setTelephone($user->phoneNumber);
91
  ->setLastname($shipp_address->lastName)
92
  ->setStreet($shipp_address->street)
93
  ->setCity($shipp_address->city)
94
+ ->setCountry_id($shipp_address->countryCode)
95
  ->setRegion($shipp_address->state)
96
  ->setPostcode($shipp_address->zipCode)
97
  ->setTelephone($user->phoneNumber);
app/code/community/ZooZ/ZoozPayment/Model/Standard.php CHANGED
@@ -333,8 +333,9 @@ class ZooZ_ZoozPayment_Model_Standard extends Mage_Payment_Model_Method_Abstract
333
  else
334
  $carrier_temp = $carrier_temp_1;
335
  }
 
 
336
  if ($carrier_temp != '') {
337
- $postFields.="&isShippingRequired=true";
338
  $postFields.= "&shippingMethods=[" . $carrier_temp . "]";
339
  } else {
340
  $postFields.="&isShippingRequired=false";
333
  else
334
  $carrier_temp = $carrier_temp_1;
335
  }
336
+
337
+ $postFields.="&isShippingRequired=true";
338
  if ($carrier_temp != '') {
 
339
  $postFields.= "&shippingMethods=[" . $carrier_temp . "]";
340
  } else {
341
  $postFields.="&isShippingRequired=false";
app/code/community/ZooZ/ZoozPayment/controllers/EstimateController.php CHANGED
@@ -41,7 +41,7 @@ class ZooZ_ZoozPayment_EstimateController extends Mage_Catalog_ProductController
41
  public function indexAction() {
42
  // $pro = $this->addProduct();
43
 
44
- // $data_json = $this->getRequest()->getPost('data');
45
  // $data_json = $this->getRequest()->getContent();
46
  $data_json = file_get_contents('php://input');
47
  Mage::log($data_json);
@@ -75,7 +75,6 @@ class ZooZ_ZoozPayment_EstimateController extends Mage_Catalog_ProductController
75
  Mage::unregister('product');
76
  }
77
  ///$addressInfo = $arr_addressinfo;
78
-
79
  $addressConvert = array("city"=> $arr_addressinfo["city"],"region_id"=>$arr_addressinfo["stateName"],"postcode"=>$arr_addressinfo["zipCode"],"country_id"=>$arr_addressinfo["countryCode"]);
80
 
81
  $estimate->setAddressInfo((array) $addressConvert);
41
  public function indexAction() {
42
  // $pro = $this->addProduct();
43
 
44
+ // $data_json = $this->getRequest()->getPost('data');
45
  // $data_json = $this->getRequest()->getContent();
46
  $data_json = file_get_contents('php://input');
47
  Mage::log($data_json);
75
  Mage::unregister('product');
76
  }
77
  ///$addressInfo = $arr_addressinfo;
 
78
  $addressConvert = array("city"=> $arr_addressinfo["city"],"region_id"=>$arr_addressinfo["stateName"],"postcode"=>$arr_addressinfo["zipCode"],"country_id"=>$arr_addressinfo["countryCode"]);
79
 
80
  $estimate->setAddressInfo((array) $addressConvert);
app/design/frontend/default/default/template/zoozpayment/result.phtml CHANGED
@@ -13,6 +13,12 @@ if ($this->getResult()) {
13
  }
14
  $response[] = array('carrierName' => $this->getCarrierName($code),'carrierCode' => $code, 'rates' => $arr);
15
  }
16
- echo json_encode($response);
 
 
 
 
 
 
17
  }
18
  ?>
13
  }
14
  $response[] = array('carrierName' => $this->getCarrierName($code),'carrierCode' => $code, 'rates' => $arr);
15
  }
16
+ if(count($arr) == 0)
17
+ {
18
+ $result[] = array('error'=>true,'message'=>'There is no shipping method available for this address.');
19
+ echo json_encode($result);
20
+ }
21
+ else { echo json_encode($response); }
22
+
23
  }
24
  ?>
package.xml CHANGED
@@ -1,18 +1,18 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>ZooZ_payment</name>
4
- <version>2.0.2</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">GNU General Public License</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Checkout module for higher conversions</summary>
10
  <description>Zooz is a complete checkout plugin replaces completely the standard UI and handle payment processing and shipping address.</description>
11
- <notes>Zooz checkout</notes>
12
  <authors><author><name>ZooZ Payments</name><user>Zooz_Payments</user><email>info@zooz.com</email></author></authors>
13
- <date>2014-01-02</date>
14
- <time>14:56:44</time>
15
- <contents><target name="magecommunity"><dir name="ZooZ"><dir name="ZoozPayment"><dir name="Block"><file name="Abstract.php" hash="0ac3cf5751fad5f6fd8d2240adedb197"/><dir name="Estimate"><file name="Abstract.php" hash="822638b4ec0a3d0f1f39b4d9f673de5e"/><file name="Result.php" hash="e26d7b8acaeb5424a608e43127844140"/></dir><file name="Estimate.php" hash="e16de59381c39d89633b7e3e53ee6028"/><file name="Index.php" hash="bea9161ac24756a7cf0c841ad8411da9"/></dir><dir name="Helper"><file name="Carrier.php" hash="a6482b94fcb7e419a3759171d0267df6"/><file name="Data.php" hash="392f1c937865b8bb79b13d513ac20215"/><file name="Sanbox.php" hash="9521c1d925d462d8e7d78a3318ee3ee0"/></dir><dir name="Model"><file name="Estimate.php" hash="cf4d18a7bccb4d5bedc32624a5841989"/><file name="Order.php" hash="49f8d316ef895172e59bb06a08b48771"/><file name="Session.php" hash="f2ae892657034ca2d55205f0703eedde"/><file name="Standard.php" hash="a7b496d96a63fd8e337eaefdcdb31c38"/></dir><dir name="controllers"><file name="CartController.php" hash="6c1c69df795bece32f6565acfef22f6d"/><file name="EstimateController.php" hash="d8f48c964b95ba71d78f558dc774c345"/><file name="IndexController.php" hash="4d7015bb3ac7e1748cde5917bffca1cc"/><file name="StandardController.php" hash="5541c42cb7de2eb4781ace28b15ebb55"/></dir><dir name="etc"><file name="config.xml" hash="43687ff856324ea05a00685062a20e7b"/><file name="system.xml" hash="b6e432e15e121cb067625e1a2876fb1e"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="ZooZ_ZoozPayment.xml" hash="9f836c89a16d4693f96ae141906cc77d"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="zoozpayment.xml" hash="a3eaf1bf8eb27c4e20d0b30814f20d4f"/></dir><dir name="template"><dir name="zoozpayment"><file name="index.phtml" hash="2a9aeeddace7d15b22708b0421a90d5c"/><file name="result.phtml" hash="b307b3fc11f42fc375f640f06d0e1ee4"/><file name="review.phtml" hash="162e8a7f5548d80bfd987bd6ee0877e4"/><file name="shortcut-checkout.phtml" hash="11680817014ac22a1aa57e11e8f5283c"/><file name="shortcut.phtml" hash="11eb2973b1ce3b7c948d8ed233c33bae"/><file name="sidebar.phtml" hash="2a96c03b4100bb88ba3e9e3fcaa8aa8b"/></dir></dir></dir></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="zooz"><dir name="images"><file name="fastcheckout.png" hash="8f53be05b8c4a3903aec32745e9bf263"/><file name="loading.gif" hash="9a8269421303631316be4ab5e34870e1"/></dir><dir name="js"><file name="jquery-1.9.0.min.js" hash="6c4a706b2e324656fb77c0585c1cff55"/><file name="zooz-magento.js" hash="70e716b6bb6c50091d2bdd7bf1fa26b3"/></dir></dir></dir></dir></dir></target><target name="magelib"><dir name="zooz"><file name="address.php" hash="40af42bf39330383e05c57bd6ba71759"/><file name="invoice.item.php" hash="37803cf953ca2dab2583cc34f80f7844"/><file name="invoice.php" hash="2e75b69bf1592243c70fd90ebaeba41a"/><file name="nvps.php" hash="cffaa4eb22d14af1ea3e69a522e21ad0"/><file name="transaction.details.php" hash="9e7fea0feb69e7468922e6fb8323a489"/><file name="user.details.php" hash="1e571f792f5e87187e1c85172a19c99d"/><file name="zooz.exception.php" hash="dc5a70ef56e64b1bc76f0407c2187f79"/><file name="zooz.extended.server.api.php" hash="3dbed68e102e2082ca99db45df7fef8f"/></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
18
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>ZooZ_payment</name>
4
+ <version>2.0.3</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">GNU General Public License</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Checkout module for higher conversions</summary>
10
  <description>Zooz is a complete checkout plugin replaces completely the standard UI and handle payment processing and shipping address.</description>
11
+ <notes>Fixed bug in shipping method retrieval and country code parsing</notes>
12
  <authors><author><name>ZooZ Payments</name><user>Zooz_Payments</user><email>info@zooz.com</email></author></authors>
13
+ <date>2014-01-20</date>
14
+ <time>08:47:26</time>
15
+ <contents><target name="magecommunity"><dir name="ZooZ"><dir name="ZoozPayment"><dir name="Block"><file name="Abstract.php" hash="0ac3cf5751fad5f6fd8d2240adedb197"/><dir name="Estimate"><file name="Abstract.php" hash="822638b4ec0a3d0f1f39b4d9f673de5e"/><file name="Result.php" hash="e26d7b8acaeb5424a608e43127844140"/></dir><file name="Estimate.php" hash="e16de59381c39d89633b7e3e53ee6028"/><file name="Index.php" hash="bea9161ac24756a7cf0c841ad8411da9"/></dir><dir name="Helper"><file name="Carrier.php" hash="a6482b94fcb7e419a3759171d0267df6"/><file name="Data.php" hash="392f1c937865b8bb79b13d513ac20215"/><file name="Sanbox.php" hash="9521c1d925d462d8e7d78a3318ee3ee0"/></dir><dir name="Model"><file name="Estimate.php" hash="cf4d18a7bccb4d5bedc32624a5841989"/><file name="Order.php" hash="84724f4d4ea28ca32abfaed01608f919"/><file name="Session.php" hash="f2ae892657034ca2d55205f0703eedde"/><file name="Standard.php" hash="a22f9d8ea3763f6ca8c7ba2a8482e292"/></dir><dir name="controllers"><file name="CartController.php" hash="6c1c69df795bece32f6565acfef22f6d"/><file name="EstimateController.php" hash="43a0f009469fdb83af10c73166c282a1"/><file name="IndexController.php" hash="4d7015bb3ac7e1748cde5917bffca1cc"/><file name="StandardController.php" hash="5541c42cb7de2eb4781ace28b15ebb55"/></dir><dir name="etc"><file name="config.xml" hash="43687ff856324ea05a00685062a20e7b"/><file name="system.xml" hash="b6e432e15e121cb067625e1a2876fb1e"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="ZooZ_ZoozPayment.xml" hash="9f836c89a16d4693f96ae141906cc77d"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="zoozpayment.xml" hash="a3eaf1bf8eb27c4e20d0b30814f20d4f"/></dir><dir name="template"><dir name="zoozpayment"><file name="index.phtml" hash="2a9aeeddace7d15b22708b0421a90d5c"/><file name="result.phtml" hash="1699ea96ebd51f2abb3a9913b81fbd44"/><file name="review.phtml" hash="162e8a7f5548d80bfd987bd6ee0877e4"/><file name="shortcut-checkout.phtml" hash="11680817014ac22a1aa57e11e8f5283c"/><file name="shortcut.phtml" hash="11eb2973b1ce3b7c948d8ed233c33bae"/><file name="sidebar.phtml" hash="2a96c03b4100bb88ba3e9e3fcaa8aa8b"/></dir></dir></dir></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="zooz"><dir name="images"><file name="fastcheckout.png" hash="8f53be05b8c4a3903aec32745e9bf263"/><file name="loading.gif" hash="9a8269421303631316be4ab5e34870e1"/></dir><dir name="js"><file name="jquery-1.9.0.min.js" hash="6c4a706b2e324656fb77c0585c1cff55"/><file name="zooz-magento.js" hash="70e716b6bb6c50091d2bdd7bf1fa26b3"/></dir></dir></dir></dir></dir></target><target name="magelib"><dir name="zooz"><file name="address.php" hash="40af42bf39330383e05c57bd6ba71759"/><file name="invoice.item.php" hash="37803cf953ca2dab2583cc34f80f7844"/><file name="invoice.php" hash="2e75b69bf1592243c70fd90ebaeba41a"/><file name="nvps.php" hash="cffaa4eb22d14af1ea3e69a522e21ad0"/><file name="transaction.details.php" hash="9e7fea0feb69e7468922e6fb8323a489"/><file name="user.details.php" hash="1e571f792f5e87187e1c85172a19c99d"/><file name="zooz.exception.php" hash="dc5a70ef56e64b1bc76f0407c2187f79"/><file name="zooz.extended.server.api.php" hash="3dbed68e102e2082ca99db45df7fef8f"/></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
18
  </package>