taply - Version 1.1.3

Version Notes

bug fix

Download this release

Release Info

Developer taply
Extension taply
Version 1.1.3
Comparing to
See all releases


Code changes from version 1.1.2 to 1.1.3

app/code/local/Taply/Paybutton/controllers/.GetshippingController.php.swp ADDED
Binary file
app/code/local/Taply/Paybutton/controllers/GetshippingController.php CHANGED
@@ -17,23 +17,44 @@ class Taply_Paybutton_GetshippingController extends Mage_Core_Controller_Front_A
17
 
18
  try{
19
  foreach ($items as $item){
 
20
  $product = Mage::getModel('catalog/product')->load($item['item_prod_id']);
21
  $product->setPrice($item['item_price']);
22
- $product->addCustomOption('attributes', serialize($item['item_prod_attr']));
23
  $request = new Varien_Object();
24
  $request->setQty($item['item_qty']);
25
- $request->setSuperAttribute($item['item_prod_attr']);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
26
  if ($product->getId()) {
27
  // Add product to card
28
  $result = $objCart->addProduct($product, $request);
29
  if (is_string($result)) {
30
  // Error of adding product to card
31
  // @todo Log exception into DB and skip
32
- throw new Exception("{error: '$result'}");
 
33
  }
34
  } else {
35
  // Error of load product by id
36
- throw new Exception("{error: 'Cant load product'}");
37
  // @todo Log exception into DB and skip
38
  }
39
  }
@@ -46,7 +67,6 @@ class Taply_Paybutton_GetshippingController extends Mage_Core_Controller_Front_A
46
  ->setRegionId($regionId)
47
  ->setRegion($region)
48
  ->setCollectShippingRates(TRUE)->save();
49
- // var_dump($sa->toArray());
50
  } catch (Exception $e){
51
  die($e->getMessage());
52
  }
@@ -75,3 +95,4 @@ class Taply_Paybutton_GetshippingController extends Mage_Core_Controller_Front_A
75
  }
76
 
77
  }
 
17
 
18
  try{
19
  foreach ($items as $item){
20
+
21
  $product = Mage::getModel('catalog/product')->load($item['item_prod_id']);
22
  $product->setPrice($item['item_price']);
 
23
  $request = new Varien_Object();
24
  $request->setQty($item['item_qty']);
25
+ if($item['item_prod_attr']){
26
+ $product->addCustomOption('attributes', serialize($item['item_prod_attr']));
27
+ $request->setSuperAttribute($item['item_prod_attr']);
28
+ }
29
+ $links = Mage::getModel('downloadable/product_type')->getLinks( $product );
30
+
31
+ if ($product->getTypeId() == 'downloadable') {
32
+ $params = array();
33
+ $links = Mage::getModel('downloadable/product_type')->getLinks( $product );
34
+ $linkId = 0;
35
+ foreach ($links as $link) {
36
+ $linkId = $link->getId();
37
+ }
38
+ $params['product'] = $item['item_prod_id'];
39
+ $params['qty'] = $item['item_qty'];
40
+ $params['links'] = array($linkId);
41
+ $request = new Varien_Object();
42
+ $request->setData($params);
43
+ $product->processBuyRequest($product , $request);
44
+ }
45
+
46
  if ($product->getId()) {
47
  // Add product to card
48
  $result = $objCart->addProduct($product, $request);
49
  if (is_string($result)) {
50
  // Error of adding product to card
51
  // @todo Log exception into DB and skip
52
+ file_put_contents('/tmp/taply.log', print_r($result, true), 8);
53
+ throw new Exception($result);
54
  }
55
  } else {
56
  // Error of load product by id
57
+ throw new Exception("Cant load product");
58
  // @todo Log exception into DB and skip
59
  }
60
  }
67
  ->setRegionId($regionId)
68
  ->setRegion($region)
69
  ->setCollectShippingRates(TRUE)->save();
 
70
  } catch (Exception $e){
71
  die($e->getMessage());
72
  }
95
  }
96
 
97
  }
98
+
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>taply</name>
4
- <version>1.1.2</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">Open Software License (OSL)</license>
7
  <channel>community</channel>
@@ -9,11 +9,11 @@
9
  <summary>Securely checkout using Apple Pay</summary>
10
  <description>Securely checkout using Apple Pay with only a tap of your finger and never enter your billing or shipping information again.&#xD;
11
  taply allows you to use Apple Pay for an incredibly fast, secure, and seamless online checkout. Go anywhere online that has the taply button, enter your mobile number, then use the taply app to complete the purchase using Touch ID.</description>
12
- <notes>change api </notes>
13
  <authors><author><name>taply</name><user>taply</user><email>admin@paybytaply.com</email></author></authors>
14
- <date>2016-01-27</date>
15
- <time>15:31:09</time>
16
- <contents><target name="magelocal"><dir><dir name="Taply"><dir name="Order"><dir name="controllers"><dir name="Taply"><file name="OrderController.php" hash="00eedb8b49cfe8ae1aecba1c40e3f17a"/></dir></dir><dir name="etc"><file name="config.xml" hash="80129765898cac5c81f83739352317e1"/><file name="system_.xml" hash="520313dbaf29da8a44325f1a2880d30a"/></dir></dir><dir name="Paybutton"><dir name="Block"><dir name="Adminhtml"><dir name="Sales"><dir name="Order"><file name="View.php" hash="31dc5ad3ff90929a5adff81f6286d6cf"/></dir></dir></dir><dir name="Button"><file name="Pay.php" hash="7c751e6a0aa7e1e015e5dd58e4c8f7da"/></dir></dir><dir name="Helper"><file name="Data.php" hash="c8404ec959ddf4bf9fbee31fc2314d34"/></dir><dir name="Model"><file name="Payment.php" hash="f630057cc99ec86c542592a904055002"/><file name="Viewtype.php" hash="c39cf7f525e11ab1de3f10a939caf494"/></dir><dir name="controllers"><dir name="Adminhtml"><dir name="Taply"><file name="OrderController.php" hash="5593f8a36002649d34f0c8e6b07ab4b6"/></dir></dir><file name="GetshippingController.php" hash="eddc9190345dffefbfcfcd59035af51d"/><file name="OrderController.php" hash="be686c5550ed8bc92340f3e9e5d7017b"/><file name="SuccessController.php" hash="db0ce352d1d7bce814b4024eeba88357"/></dir><dir name="etc"><file name="adminhtml.xml" hash="7001550ad892cd8ca7a0917a0f9bd0bd"/><file name="config.xml" hash="f5880f339e17e42056f842ce1c42e876"/><file name="system.xml" hash="520313dbaf29da8a44325f1a2880d30a"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Taply_Paybutton.xml" hash="2c4c33fa727a3fe1d863353583e1dfa0"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="taply.xml" hash="bc7a785448a0e2b2754e46fa786a5b3d"/></dir><dir name="template"><dir name="taply"><file name="button.phtml" hash="b6541c278d428eea006a782e11abe2e3"/></dir></dir></dir></dir></dir></target><target name="mage"><dir name="js"><dir name="taply"><file name="taply.1.1.js" hash="84cbe3c8924bb5d3e0dfa947894a75e1"/></dir></dir></target></contents>
17
  <compatible/>
18
  <dependencies><required><php><min>5.4.0</min><max>5.6.999</max></php></required></dependencies>
19
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>taply</name>
4
+ <version>1.1.3</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">Open Software License (OSL)</license>
7
  <channel>community</channel>
9
  <summary>Securely checkout using Apple Pay</summary>
10
  <description>Securely checkout using Apple Pay with only a tap of your finger and never enter your billing or shipping information again.&#xD;
11
  taply allows you to use Apple Pay for an incredibly fast, secure, and seamless online checkout. Go anywhere online that has the taply button, enter your mobile number, then use the taply app to complete the purchase using Touch ID.</description>
12
+ <notes>bug fix </notes>
13
  <authors><author><name>taply</name><user>taply</user><email>admin@paybytaply.com</email></author></authors>
14
+ <date>2016-01-28</date>
15
+ <time>10:17:34</time>
16
+ <contents><target name="magelocal"><dir><dir name="Taply"><dir name="Order"><dir name="controllers"><dir name="Taply"><file name="OrderController.php" hash="00eedb8b49cfe8ae1aecba1c40e3f17a"/></dir></dir><dir name="etc"><file name="config.xml" hash="80129765898cac5c81f83739352317e1"/><file name="system_.xml" hash="520313dbaf29da8a44325f1a2880d30a"/></dir></dir><dir name="Paybutton"><dir name="Block"><dir name="Adminhtml"><dir name="Sales"><dir name="Order"><file name="View.php" hash="31dc5ad3ff90929a5adff81f6286d6cf"/></dir></dir></dir><dir name="Button"><file name="Pay.php" hash="7c751e6a0aa7e1e015e5dd58e4c8f7da"/></dir></dir><dir name="Helper"><file name="Data.php" hash="c8404ec959ddf4bf9fbee31fc2314d34"/></dir><dir name="Model"><file name="Payment.php" hash="f630057cc99ec86c542592a904055002"/><file name="Viewtype.php" hash="c39cf7f525e11ab1de3f10a939caf494"/></dir><dir name="controllers"><dir name="Adminhtml"><dir name="Taply"><file name="OrderController.php" hash="5593f8a36002649d34f0c8e6b07ab4b6"/></dir></dir><file name="GetshippingController.php" hash="b9e020fe0cde148b6bf88a4d7f52c71d"/><file name="OrderController.php" hash="be686c5550ed8bc92340f3e9e5d7017b"/><file name="SuccessController.php" hash="db0ce352d1d7bce814b4024eeba88357"/><file name=".GetshippingController.php.swp" hash="cdbd76ebdda15141750aa078d25cd826"/></dir><dir name="etc"><file name="adminhtml.xml" hash="7001550ad892cd8ca7a0917a0f9bd0bd"/><file name="config.xml" hash="f5880f339e17e42056f842ce1c42e876"/><file name="system.xml" hash="520313dbaf29da8a44325f1a2880d30a"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Taply_Paybutton.xml" hash="2c4c33fa727a3fe1d863353583e1dfa0"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="taply.xml" hash="bc7a785448a0e2b2754e46fa786a5b3d"/></dir><dir name="template"><dir name="taply"><file name="button.phtml" hash="b6541c278d428eea006a782e11abe2e3"/></dir></dir></dir></dir></dir></target><target name="mage"><dir name="js"><dir name="taply"><file name="taply.1.1.js" hash="84cbe3c8924bb5d3e0dfa947894a75e1"/></dir></dir></target></contents>
17
  <compatible/>
18
  <dependencies><required><php><min>5.4.0</min><max>5.6.999</max></php></required></dependencies>
19
  </package>