SFC_Autoship - Version 1.3.2.10

Version Notes

Subscribe Pro Extension Release

Download this release

Release Info

Developer StoreFront Consulting
Extension SFC_Autoship
Version 1.3.2.10
Comparing to
See all releases


Code changes from version 1.3.2.6 to 1.3.2.10

Files changed (143) hide show
  1. app/code/local/SFC/Autoship.php +56 -0
  2. app/code/local/SFC/Autoship/Block/Adminhtml/Customer/Paymentprofiles/Edit.php +1 -1
  3. app/code/local/SFC/Autoship/Block/Adminhtml/Customer/Paymentprofiles/Edit/Form.php +1 -1
  4. app/code/local/SFC/Autoship/Block/Adminhtml/Customer/Paymentprofiles/Edit/Tab/Form.php +1 -1
  5. app/code/local/SFC/Autoship/Block/Adminhtml/Customer/Paymentprofiles/Edit/Tabs.php +1 -1
  6. app/code/local/SFC/Autoship/Block/Adminhtml/Customer/Paymentprofiles/Paymentprofile.php +1 -1
  7. app/code/local/SFC/Autoship/Block/Adminhtml/Sales/Order/Create/Jsonp.php +1 -1
  8. app/code/local/SFC/Autoship/Block/Adminhtml/System/Config/Form/Fielddisabled.php +37 -0
  9. app/code/local/SFC/Autoship/Block/Adminhtml/System/Config/Form/TestConnectionButton.php +1 -1
  10. app/code/local/SFC/Autoship/Block/Cart/Product/Subscription.php +1 -1
  11. app/code/local/SFC/Autoship/Block/Checkout/Jsonp.php +1 -1
  12. app/code/local/SFC/Autoship/Block/Checkout/Onepage/Payment/Methods.php +3 -3
  13. app/code/local/SFC/Autoship/Block/Mysubscriptions.php +1 -1
  14. app/code/local/SFC/Autoship/Block/Mysubscriptions/Subscription.php +1 -1
  15. app/code/local/SFC/Autoship/Block/Mysubscriptions/Subscription/Form/Billing.php +1 -1
  16. app/code/local/SFC/Autoship/Block/Mysubscriptions/Subscription/Form/Payment.php +1 -1
  17. app/code/local/SFC/Autoship/Block/Mysubscriptions/Subscription/Form/Shipping.php +1 -1
  18. app/code/local/SFC/Autoship/Block/Newsubscription.php +3 -3
  19. app/code/local/SFC/Autoship/Block/Newsubscription/Form/Billing.php +1 -1
  20. app/code/local/SFC/Autoship/Block/Newsubscription/Form/Payment.php +1 -1
  21. app/code/local/SFC/Autoship/Block/Newsubscription/Form/Shipping.php +1 -1
  22. app/code/local/SFC/Autoship/Block/Payment/Form/Cc.php +1 -1
  23. app/code/local/SFC/Autoship/Block/Payment/Form/Cc/Saved.php +1 -1
  24. app/code/local/SFC/Autoship/Block/Payment/Info/Cc.php +1 -1
  25. app/code/local/SFC/Autoship/Block/Payment/Profile/Edit.php +1 -1
  26. app/code/local/SFC/Autoship/Block/Payment/Profile/Grid.php +1 -1
  27. app/code/local/SFC/Autoship/Block/Product/Subscribe.php +1 -1
  28. app/code/local/SFC/Autoship/Block/Product/View.php +1 -1
  29. app/code/local/SFC/Autoship/Block/Product/View/Type/Grouped/Subscribe.php +1 -1
  30. app/code/local/SFC/Autoship/Block/Subscription/Abstract.php +1 -1
  31. app/code/local/SFC/Autoship/Block/Subscription/Form/Address.php +1 -1
  32. app/code/local/SFC/Autoship/Block/Subscription/Form/Payment.php +1 -1
  33. app/code/local/SFC/Autoship/Helper/Adminorder.php +16 -16
  34. app/code/local/SFC/Autoship/Helper/Api.php +16 -19
  35. app/code/local/SFC/Autoship/Helper/Data.php +4 -11
  36. app/code/local/SFC/Autoship/Helper/Payment.php +73 -7
  37. app/code/local/SFC/Autoship/Helper/PaymentError.php +1 -1
  38. app/code/local/SFC/Autoship/Helper/PaymentError/Exception.php +1 -1
  39. app/code/local/SFC/Autoship/Helper/Platform.php +53 -28
  40. app/code/local/SFC/Autoship/Helper/Product.php +2 -2
  41. app/code/local/SFC/Autoship/Helper/Quote.php +1 -1
  42. app/code/local/SFC/Autoship/Helper/Schedule.php +1 -1
  43. app/code/local/SFC/Autoship/Helper/Subscription.php +1 -1
  44. app/code/local/SFC/Autoship/Helper/Vault.php +1 -1
  45. app/code/local/SFC/Autoship/Model/Adminhtml/Observer.php +51 -0
  46. app/code/local/SFC/Autoship/Model/Api/Cart/Api.php +27 -0
  47. app/code/local/SFC/Autoship/Model/Checkout/Cart/Api.php +1 -1
  48. app/code/local/SFC/Autoship/Model/Checkout/Cart/Product/Api.php +7 -7
  49. app/code/local/SFC/Autoship/Model/Mysql4/Subscription.php +1 -1
  50. app/code/local/SFC/Autoship/Model/Mysql4/Subscription/Collection.php +1 -1
  51. app/code/local/SFC/Autoship/Model/Observer.php +16 -16
  52. app/code/local/SFC/Autoship/Model/Payment/Method.php +363 -163
  53. app/code/local/SFC/Autoship/Model/Payment/Profile.php +1 -1
  54. app/code/local/SFC/Autoship/Model/Payment/Profile/Address.php +1 -1
  55. app/code/local/SFC/Autoship/Model/Payment/Profile/Collection.php +1 -1
  56. app/code/local/SFC/Autoship/Model/Paypal/Express.php +1 -1
  57. app/code/local/SFC/Autoship/Model/Platform/Product.php +1 -1
  58. app/code/local/SFC/Autoship/Model/Quote/Address.php +1 -1
  59. app/code/local/SFC/Autoship/Model/SalesRule/Rule/Condition/Product.php +1 -1
  60. app/code/local/SFC/Autoship/Model/SalesRule/Validator.php +1 -1
  61. app/code/local/SFC/Autoship/Model/Shipping/Carrier.php +165 -0
  62. app/code/local/SFC/Autoship/Model/Subscription.php +1 -1
  63. app/code/local/SFC/Autoship/Model/System/Config/Source/Cartrulediscountcombinetype.php +1 -1
  64. app/code/local/SFC/Autoship/Model/System/Config/Source/Cctype.php +1 -1
  65. app/code/local/SFC/Autoship/Model/System/Config/Source/Loglevel.php +77 -0
  66. app/code/local/SFC/Autoship/Model/System/Config/Source/Month.php +1 -1
  67. app/code/local/SFC/Autoship/Model/System/Config/Source/Nextorderdatemode.php +1 -1
  68. app/code/local/SFC/Autoship/Model/System/Config/Source/Shippingmethods.php +1 -1
  69. app/code/local/SFC/Autoship/Model/System/Config/Source/Year.php +7 -43
  70. app/code/local/SFC/Autoship/controllers/Adminhtml/Sales/Order/InvoiceController.php +53 -0
  71. app/code/local/SFC/Autoship/controllers/Adminhtml/SporderpaymentController.php +63 -0
  72. app/code/local/SFC/Autoship/controllers/Adminhtml/SppaymentprofileController.php +1 -1
  73. app/code/local/SFC/Autoship/controllers/Adminhtml/SptestconnectionbuttonController.php +5 -5
  74. app/code/local/SFC/Autoship/controllers/MycreditcardsController.php +4 -4
  75. app/code/local/SFC/Autoship/controllers/MysubscriptionsController.php +4 -3
  76. app/code/local/SFC/Autoship/controllers/NewsubscriptionController.php +11 -10
  77. app/code/local/SFC/Autoship/etc/adminhtml.xml +1 -1
  78. app/code/local/SFC/Autoship/etc/config.xml +36 -3
  79. app/code/local/SFC/Autoship/etc/system.xml +151 -2
  80. app/code/local/SFC/Autoship/sql/sfc_autoship_setup/{mysql4-install-1.3.1.8.php → mysql4-install-1.3.2.10.php} +11 -1
  81. app/code/local/SFC/Autoship/sql/sfc_autoship_setup/mysql4-uninstall-1.3.1.4.php +1 -1
  82. app/code/local/SFC/Autoship/sql/sfc_autoship_setup/mysql4-upgrade-1.1.0-1.1.1.php +1 -1
  83. app/code/local/SFC/Autoship/sql/sfc_autoship_setup/mysql4-upgrade-1.1.2-1.2.0.php +1 -1
  84. app/code/local/SFC/Autoship/sql/sfc_autoship_setup/mysql4-upgrade-1.2.2.1-1.2.2.2.php +1 -1
  85. app/code/local/SFC/Autoship/sql/sfc_autoship_setup/mysql4-upgrade-1.2.3-1.2.4.php +1 -1
  86. app/code/local/SFC/Autoship/sql/sfc_autoship_setup/mysql4-upgrade-1.2.4.6-1.2.4.7.php +1 -1
  87. app/code/local/SFC/Autoship/sql/sfc_autoship_setup/mysql4-upgrade-1.3.0.1-1.3.0.2.php +1 -1
  88. app/code/local/SFC/Autoship/sql/sfc_autoship_setup/mysql4-upgrade-1.3.0.5-1.3.1.0.php +1 -1
  89. app/code/local/SFC/Autoship/sql/sfc_autoship_setup/mysql4-upgrade-1.3.1.15-1.3.1.16.php +1 -1
  90. app/code/local/SFC/Autoship/sql/sfc_autoship_setup/mysql4-upgrade-1.3.1.3-1.3.1.4.php +1 -1
  91. app/code/local/SFC/Autoship/sql/sfc_autoship_setup/mysql4-upgrade-1.3.1.4-1.3.1.5.php +1 -1
  92. app/code/local/SFC/Autoship/sql/sfc_autoship_setup/mysql4-upgrade-1.3.1.7-1.3.1.8.php +1 -1
  93. app/code/local/SFC/Autoship/sql/sfc_autoship_setup/mysql4-upgrade-1.3.2.9-1.3.2.10.php +36 -0
  94. app/design/adminhtml/default/default/layout/autoship.xml +4 -4
  95. app/design/adminhtml/default/default/template/autoship/payment/form/cc.phtml +1 -1
  96. app/design/adminhtml/default/default/template/autoship/payment/form/cc_saved.phtml +1 -1
  97. app/design/adminhtml/default/default/template/autoship/sales/create_order/jsonp.phtml +1 -1
  98. app/design/adminhtml/default/default/template/autoship/sales/create_order/product/subscription.phtml +1 -1
  99. app/design/frontend/base/default/layout/autoship.xml +1 -1
  100. app/design/frontend/base/default/template/autoship/cart/product/subscription.phtml +1 -1
  101. app/design/frontend/base/default/template/autoship/checkout/jsonp.phtml +1 -1
  102. app/design/frontend/base/default/template/autoship/checkout/serversideapi.phtml +1 -1
  103. app/design/frontend/base/default/template/autoship/checkout/success.phtml +1 -1
  104. app/design/frontend/base/default/template/autoship/mysubscriptions.phtml +1 -1
  105. app/design/frontend/base/default/template/autoship/mysubscriptions/subscription.phtml +1 -1
  106. app/design/frontend/base/default/template/autoship/mysubscriptions/subscription/actions.phtml +1 -1
  107. app/design/frontend/base/default/template/autoship/mysubscriptions/subscription/billing_address.phtml +1 -1
  108. app/design/frontend/base/default/template/autoship/mysubscriptions/subscription/payment.phtml +1 -1
  109. app/design/frontend/base/default/template/autoship/mysubscriptions/subscription/product_info.phtml +1 -1
  110. app/design/frontend/base/default/template/autoship/mysubscriptions/subscription/shipping_address.phtml +1 -1
  111. app/design/frontend/base/default/template/autoship/mysubscriptions/subscription/subscription_info.phtml +1 -1
  112. app/design/frontend/base/default/template/autoship/newsubscription.phtml +1 -1
  113. app/design/frontend/base/default/template/autoship/newsubscription/ajax_update.phtml +1 -1
  114. app/design/frontend/base/default/template/autoship/newsubscription/billing_address.phtml +1 -1
  115. app/design/frontend/base/default/template/autoship/newsubscription/delivery_date.phtml +1 -1
  116. app/design/frontend/base/default/template/autoship/newsubscription/delivery_frequency.phtml +1 -1
  117. app/design/frontend/base/default/template/autoship/newsubscription/payment.phtml +1 -1
  118. app/design/frontend/base/default/template/autoship/newsubscription/product_info.phtml +1 -1
  119. app/design/frontend/base/default/template/autoship/newsubscription/shipping_address.phtml +1 -1
  120. app/design/frontend/base/default/template/autoship/newsubscription/summary.phtml +1 -1
  121. app/design/frontend/base/default/template/autoship/payment/form/cc.phtml +1 -1
  122. app/design/frontend/base/default/template/autoship/payment/form/cc_saved.phtml +1 -1
  123. app/design/frontend/base/default/template/autoship/payment/profile/edit.phtml +1 -1
  124. app/design/frontend/base/default/template/autoship/payment/profile/grid.phtml +1 -1
  125. app/design/frontend/base/default/template/autoship/payment/profile/new.phtml +1 -1
  126. app/design/frontend/base/default/template/autoship/product/subscribe.phtml +1 -1
  127. app/design/frontend/base/default/template/autoship/product/view/addtocart.phtml +1 -1
  128. app/design/frontend/base/default/template/autoship/product/view/type/grouped/subscribe.phtml +1 -1
  129. app/design/frontend/base/default/template/autoship/subscription/form/billing.phtml +1 -1
  130. app/design/frontend/base/default/template/autoship/subscription/form/payment.phtml +1 -1
  131. app/design/frontend/base/default/template/autoship/subscription/form/shipping.phtml +1 -1
  132. app/design/frontend/enterprise/default/layout/autoship.xml +1 -1
  133. package.xml +4 -4
  134. shell/autoship_customer_sync.php +1 -1
  135. shell/autoship_prod_sync.php +1 -1
  136. shell/autoship_report_dl.php +1 -1
  137. skin/adminhtml/default/default/js/autoship/jquery/noconflict.js +1 -1
  138. skin/adminhtml/default/default/js/autoship/sales_create_order.js +1 -1
  139. skin/frontend/base/default/css/autoship.css +1 -1
  140. skin/frontend/base/default/js/autoship/checkout.js +1 -1
  141. skin/frontend/base/default/js/autoship/jquery/noconflict.js +1 -1
  142. skin/frontend/base/default/js/autoship/mysubscription.js +1 -1
  143. skin/frontend/base/default/js/autoship/newsubscription.js +1 -1
app/code/local/SFC/Autoship.php ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Subscribe Pro - Subscriptions Management Extension
4
+ *
5
+ * PHP version 5
6
+ *
7
+ * LICENSE: This source file is subject to commercial source code license of SUBSCRIBE PRO INC.
8
+ *
9
+ * @category SFC
10
+ * @package SFC_Autoship
11
+ * @author Garth Brantley <garth@subscribepro.com>
12
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
13
+ * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
+ * @link http://www.subscribepro.com/
15
+ *
16
+ */
17
+
18
+ /**
19
+ * Class SFC_Autoship
20
+ * Static methods for logging, used throughout the module.
21
+ */
22
+ class SFC_Autoship
23
+ {
24
+
25
+ public static function log($message, $level = Zend_Log::INFO, $file = SFC_Autoship_Helper_Data::LOG_FILE, $forceLog = false)
26
+ {
27
+ if ($level <= Mage::getStoreConfig('autoship_general/platform_api/log_level')) {
28
+ Mage::log($message, $level, $file, $forceLog);
29
+ }
30
+ }
31
+
32
+ public static function logException(Exception $e)
33
+ {
34
+ Mage::logException($e);
35
+ }
36
+
37
+ /**
38
+ * Output the current call stack as string to module log file
39
+ */
40
+ public static function logCallStack()
41
+ {
42
+ $exception = new Exception;
43
+ self::logGeneral("Current call stack:\n" . $exception->getTraceAsString(), Zend_Log::DEBUG);
44
+ }
45
+
46
+ public static function logApi($message, $level = null)
47
+ {
48
+ self::log($message, $level, SFC_Autoship_Helper_Data::API_LOG_FILE);
49
+ }
50
+
51
+ public static function logGeneral($message, $level = null)
52
+ {
53
+ self::log($message, $level, SFC_Autoship_Helper_Data::LOG_FILE);
54
+ }
55
+
56
+ }
app/code/local/SFC/Autoship/Block/Adminhtml/Customer/Paymentprofiles/Edit.php CHANGED
@@ -9,7 +9,7 @@
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
app/code/local/SFC/Autoship/Block/Adminhtml/Customer/Paymentprofiles/Edit/Form.php CHANGED
@@ -9,7 +9,7 @@
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
app/code/local/SFC/Autoship/Block/Adminhtml/Customer/Paymentprofiles/Edit/Tab/Form.php CHANGED
@@ -10,7 +10,7 @@
10
  * @category SFC
11
  * @package SFC_Autoship
12
  * @author Garth Brantley <garth@subscribepro.com>
13
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
14
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
15
  * @link http://www.subscribepro.com/
16
  *
10
  * @category SFC
11
  * @package SFC_Autoship
12
  * @author Garth Brantley <garth@subscribepro.com>
13
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
14
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
15
  * @link http://www.subscribepro.com/
16
  *
app/code/local/SFC/Autoship/Block/Adminhtml/Customer/Paymentprofiles/Edit/Tabs.php CHANGED
@@ -9,7 +9,7 @@
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
app/code/local/SFC/Autoship/Block/Adminhtml/Customer/Paymentprofiles/Paymentprofile.php CHANGED
@@ -9,7 +9,7 @@
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
app/code/local/SFC/Autoship/Block/Adminhtml/Sales/Order/Create/Jsonp.php CHANGED
@@ -9,7 +9,7 @@
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
app/code/local/SFC/Autoship/Block/Adminhtml/System/Config/Form/Fielddisabled.php ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Subscribe Pro - Subscriptions Management Extension
4
+ *
5
+ * PHP version 5
6
+ *
7
+ * LICENSE: This source file is subject to commercial source code license of SUBSCRIBE PRO INC.
8
+ *
9
+ * @category SFC
10
+ * @package SFC_Autoship
11
+ * @author Garth Brantley <garth@subscribepro.com>
12
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
13
+ * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
+ * @link http://www.subscribepro.com/
15
+ *
16
+ */
17
+
18
+
19
+ /**
20
+ * Abstract config form element renderer
21
+ *
22
+ * @category Mage
23
+ * @package Mage_Adminhtml
24
+ * @author Magento Core Team <core@magentocommerce.com>
25
+ */
26
+ class SFC_Autoship_Block_Adminhtml_System_Config_Form_Fielddisabled
27
+ extends Mage_Adminhtml_Block_System_Config_Form_Field
28
+ {
29
+
30
+ protected function _getElementHtml($element)
31
+ {
32
+ $element->setDisabled('disabled');
33
+
34
+ return parent::_getElementHtml($element);
35
+ }
36
+
37
+ }
app/code/local/SFC/Autoship/Block/Adminhtml/System/Config/Form/TestConnectionButton.php CHANGED
@@ -10,7 +10,7 @@
10
  * @category SFC
11
  * @package SFC_Autoship
12
  * @author Garth Brantley <garth@subscribepro.com>
13
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
14
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
15
  * @link http://www.subscribepro.com/
16
  *
10
  * @category SFC
11
  * @package SFC_Autoship
12
  * @author Garth Brantley <garth@subscribepro.com>
13
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
14
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
15
  * @link http://www.subscribepro.com/
16
  *
app/code/local/SFC/Autoship/Block/Cart/Product/Subscription.php CHANGED
@@ -9,7 +9,7 @@
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
app/code/local/SFC/Autoship/Block/Checkout/Jsonp.php CHANGED
@@ -9,7 +9,7 @@
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
app/code/local/SFC/Autoship/Block/Checkout/Onepage/Payment/Methods.php CHANGED
@@ -9,7 +9,7 @@
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
@@ -37,13 +37,13 @@ class SFC_Autoship_Block_Checkout_Onepage_Payment_Methods extends SFC_Autoship_B
37
 
38
  protected function _canUseMethod($method)
39
  {
40
- Mage::log('SFC_Autoship_Block_Checkout_Onepage_Payment_Methods::_canUseMethod', Zend_Log::INFO, SFC_Autoship_Helper_Data::LOG_FILE);
41
  // Get cart, quote and quote item
42
  /** @var Mage_Checkout_Model_Cart $cart */
43
  $cart = Mage::getSingleton('checkout/cart');
44
  // Get quote
45
  $quote = $cart->getQuote();
46
- Mage::log('Quote store: ' . $quote->getStore()->getCode() . ' id: ' . $quote->getStore()->getId(), Zend_Log::INFO, SFC_Autoship_Helper_Data::LOG_FILE);
47
 
48
  // Check config to see if extension functionality is enabled
49
  if (Mage::getStoreConfig('autoship_general/general/enabled', $quote->getStore()) != '1') {
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
37
 
38
  protected function _canUseMethod($method)
39
  {
40
+ SFC_Autoship::log('SFC_Autoship_Block_Checkout_Onepage_Payment_Methods::_canUseMethod', Zend_Log::INFO);
41
  // Get cart, quote and quote item
42
  /** @var Mage_Checkout_Model_Cart $cart */
43
  $cart = Mage::getSingleton('checkout/cart');
44
  // Get quote
45
  $quote = $cart->getQuote();
46
+ SFC_Autoship::log('Quote store: ' . $quote->getStore()->getCode() . ' id: ' . $quote->getStore()->getId(), Zend_Log::INFO);
47
 
48
  // Check config to see if extension functionality is enabled
49
  if (Mage::getStoreConfig('autoship_general/general/enabled', $quote->getStore()) != '1') {
app/code/local/SFC/Autoship/Block/Mysubscriptions.php CHANGED
@@ -9,7 +9,7 @@
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
app/code/local/SFC/Autoship/Block/Mysubscriptions/Subscription.php CHANGED
@@ -9,7 +9,7 @@
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
app/code/local/SFC/Autoship/Block/Mysubscriptions/Subscription/Form/Billing.php CHANGED
@@ -9,7 +9,7 @@
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
app/code/local/SFC/Autoship/Block/Mysubscriptions/Subscription/Form/Payment.php CHANGED
@@ -9,7 +9,7 @@
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
app/code/local/SFC/Autoship/Block/Mysubscriptions/Subscription/Form/Shipping.php CHANGED
@@ -9,7 +9,7 @@
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
app/code/local/SFC/Autoship/Block/Newsubscription.php CHANGED
@@ -9,7 +9,7 @@
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
@@ -40,8 +40,8 @@ class SFC_Autoship_Block_Newsubscription extends SFC_Autoship_Block_Subscription
40
  return $summary;
41
  }
42
  catch (Exception $e) {
43
- Mage::log('Error calculating estimated order summary: ' . $e->getMessage());
44
- Mage::logException($e);
45
 
46
  return 'Error estimating tax and shipping!';
47
  }
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
40
  return $summary;
41
  }
42
  catch (Exception $e) {
43
+ SFC_Autoship::log('Error calculating estimated order summary: ' . $e->getMessage(), Zend_Log::ERR);
44
+ SFC_Autoship::logException($e);
45
 
46
  return 'Error estimating tax and shipping!';
47
  }
app/code/local/SFC/Autoship/Block/Newsubscription/Form/Billing.php CHANGED
@@ -9,7 +9,7 @@
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
app/code/local/SFC/Autoship/Block/Newsubscription/Form/Payment.php CHANGED
@@ -9,7 +9,7 @@
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
app/code/local/SFC/Autoship/Block/Newsubscription/Form/Shipping.php CHANGED
@@ -9,7 +9,7 @@
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
app/code/local/SFC/Autoship/Block/Payment/Form/Cc.php CHANGED
@@ -9,7 +9,7 @@
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
app/code/local/SFC/Autoship/Block/Payment/Form/Cc/Saved.php CHANGED
@@ -9,7 +9,7 @@
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
app/code/local/SFC/Autoship/Block/Payment/Info/Cc.php CHANGED
@@ -9,7 +9,7 @@
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
app/code/local/SFC/Autoship/Block/Payment/Profile/Edit.php CHANGED
@@ -9,7 +9,7 @@
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
app/code/local/SFC/Autoship/Block/Payment/Profile/Grid.php CHANGED
@@ -9,7 +9,7 @@
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
app/code/local/SFC/Autoship/Block/Product/Subscribe.php CHANGED
@@ -9,7 +9,7 @@
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
app/code/local/SFC/Autoship/Block/Product/View.php CHANGED
@@ -9,7 +9,7 @@
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
app/code/local/SFC/Autoship/Block/Product/View/Type/Grouped/Subscribe.php CHANGED
@@ -9,7 +9,7 @@
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
app/code/local/SFC/Autoship/Block/Subscription/Abstract.php CHANGED
@@ -9,7 +9,7 @@
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
app/code/local/SFC/Autoship/Block/Subscription/Form/Address.php CHANGED
@@ -9,7 +9,7 @@
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
app/code/local/SFC/Autoship/Block/Subscription/Form/Payment.php CHANGED
@@ -9,7 +9,7 @@
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
app/code/local/SFC/Autoship/Helper/Adminorder.php CHANGED
@@ -9,7 +9,7 @@
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
@@ -120,15 +120,15 @@ class SFC_Autoship_Helper_Adminorder extends Mage_Core_Helper_Abstract
120
  {
121
  try {
122
  // Log
123
- Mage::log('Initing quote session...', Zend_Log::INFO, SFC_Autoship_Helper_Data::LOG_FILE);
124
  // Init session (Mage_Adminhtml_Model_Session_Quote)
125
  $this->_initSession($this->_customer->getId(), $this->_storeId);
126
  // Log
127
- Mage::log('Creating quote...', Zend_Log::INFO, SFC_Autoship_Helper_Data::LOG_FILE);
128
  // Create quote
129
  $this->createQuote();
130
  // Log
131
- Mage::log('Setting payment method data...', Zend_Log::INFO, SFC_Autoship_Helper_Data::LOG_FILE);
132
  // Set payment data on quote
133
  $this->_getOrderCreateModel()->setPaymentData($this->_paymentData);
134
  $this->_getOrderCreateModel()->getQuote()->getPayment()->addData($this->_paymentData);
@@ -152,7 +152,7 @@ class SFC_Autoship_Helper_Adminorder extends Mage_Core_Helper_Abstract
152
  ));
153
  */
154
  // Log
155
- Mage::log('Placing order...', Zend_Log::INFO, SFC_Autoship_Helper_Data::LOG_FILE);
156
  // Adjust Mage config
157
  Mage::app()->getStore()->setConfig(Mage_Sales_Model_Order::XML_PATH_EMAIL_ENABLED, '0');
158
  $order = $this->_getOrderCreateModel()->createOrder();
@@ -162,7 +162,7 @@ class SFC_Autoship_Helper_Adminorder extends Mage_Core_Helper_Abstract
162
  // TO DO: Why do we need to do this manually?
163
  Mage::unregister('rule_data');
164
  // Log
165
- Mage::log('New order created: ' . $order->getIncrementId(), Zend_Log::INFO, SFC_Autoship_Helper_Data::LOG_FILE);
166
 
167
  // Return newly created order
168
  return $order;
@@ -172,8 +172,8 @@ class SFC_Autoship_Helper_Adminorder extends Mage_Core_Helper_Abstract
172
  // TO DO: Why do we need to do this manually?
173
  Mage::unregister('rule_data');
174
  // Log
175
- Mage::log('Error placing order!', Zend_Log::ERR, SFC_Autoship_Helper_Data::LOG_FILE);
176
- Mage::log('Error message: ' . $e->getMessage(), Zend_Log::ERR, SFC_Autoship_Helper_Data::LOG_FILE);
177
  // Rethrow exception
178
  throw $e;
179
  }
@@ -185,11 +185,11 @@ class SFC_Autoship_Helper_Adminorder extends Mage_Core_Helper_Abstract
185
  protected function createQuote()
186
  {
187
  // Log
188
- Mage::log('Setting quote data...', Zend_Log::INFO, SFC_Autoship_Helper_Data::LOG_FILE);
189
  $this->_getOrderCreateModel()->importPostData($this->_orderData);
190
 
191
  // Log
192
- Mage::log('Setting billing address...', Zend_Log::INFO, SFC_Autoship_Helper_Data::LOG_FILE);
193
  // Create and set billing address
194
  $customerAddress = Mage::getModel('customer/address')->load($this->_billingAddressId);
195
  $billingAddress = Mage::getModel('sales/quote_address');
@@ -202,7 +202,7 @@ class SFC_Autoship_Helper_Adminorder extends Mage_Core_Helper_Abstract
202
  $this->_getOrderCreateModel()->getQuote()->setBillingAddress($billingAddress);
203
 
204
  // Log
205
- Mage::log('Setting shipping address...', Zend_Log::INFO, SFC_Autoship_Helper_Data::LOG_FILE);
206
  $customerAddress = Mage::getModel('customer/address')->load($this->_shippingAddressId);
207
  $shippingAddress = Mage::getModel('sales/quote_address');
208
  $shippingAddress
@@ -213,26 +213,26 @@ class SFC_Autoship_Helper_Adminorder extends Mage_Core_Helper_Abstract
213
  $this->_getOrderCreateModel()->setShippingAddress($shippingAddress);
214
 
215
  // Log
216
- Mage::log('Adding products...', Zend_Log::INFO, SFC_Autoship_Helper_Data::LOG_FILE);
217
  // Just like adding products from Magento admin grid
218
  $this->_getOrderCreateModel()->addProducts($this->_productQtys);
219
  // Log
220
- Mage::log('Collecting shipping rates...', Zend_Log::INFO, SFC_Autoship_Helper_Data::LOG_FILE);
221
  $this->_getOrderCreateModel()->collectShippingRates();
222
  // Log
223
- Mage::log('Setting payment data...', Zend_Log::INFO, SFC_Autoship_Helper_Data::LOG_FILE);
224
  // Setting payment data
225
  $this->_getOrderCreateModel()->getQuote()->getPayment()->addData($this->_paymentData);
226
 
227
  // Log
228
- Mage::log('Saving quote...', Zend_Log::INFO, SFC_Autoship_Helper_Data::LOG_FILE);
229
  // Init rule data and save quote
230
  $this->_getOrderCreateModel()
231
  ->initRuleData()
232
  ->saveQuote();
233
 
234
  // Log
235
- Mage::log('Setting payment data...', Zend_Log::INFO, SFC_Autoship_Helper_Data::LOG_FILE);
236
  // Setting payment data (again)
237
  $this->_getOrderCreateModel()->getQuote()->getPayment()->addData($this->_paymentData);
238
 
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
120
  {
121
  try {
122
  // Log
123
+ SFC_Autoship::log('Initing quote session...', Zend_Log::INFO);
124
  // Init session (Mage_Adminhtml_Model_Session_Quote)
125
  $this->_initSession($this->_customer->getId(), $this->_storeId);
126
  // Log
127
+ SFC_Autoship::log('Creating quote...', Zend_Log::INFO);
128
  // Create quote
129
  $this->createQuote();
130
  // Log
131
+ SFC_Autoship::log('Setting payment method data...', Zend_Log::INFO);
132
  // Set payment data on quote
133
  $this->_getOrderCreateModel()->setPaymentData($this->_paymentData);
134
  $this->_getOrderCreateModel()->getQuote()->getPayment()->addData($this->_paymentData);
152
  ));
153
  */
154
  // Log
155
+ SFC_Autoship::log('Placing order...', Zend_Log::INFO);
156
  // Adjust Mage config
157
  Mage::app()->getStore()->setConfig(Mage_Sales_Model_Order::XML_PATH_EMAIL_ENABLED, '0');
158
  $order = $this->_getOrderCreateModel()->createOrder();
162
  // TO DO: Why do we need to do this manually?
163
  Mage::unregister('rule_data');
164
  // Log
165
+ SFC_Autoship::log('New order created: ' . $order->getIncrementId(), Zend_Log::INFO);
166
 
167
  // Return newly created order
168
  return $order;
172
  // TO DO: Why do we need to do this manually?
173
  Mage::unregister('rule_data');
174
  // Log
175
+ SFC_Autoship::log('Error placing order!', Zend_Log::ERR);
176
+ SFC_Autoship::log('Error message: ' . $e->getMessage(), Zend_Log::ERR);
177
  // Rethrow exception
178
  throw $e;
179
  }
185
  protected function createQuote()
186
  {
187
  // Log
188
+ SFC_Autoship::log('Setting quote data...', Zend_Log::INFO);
189
  $this->_getOrderCreateModel()->importPostData($this->_orderData);
190
 
191
  // Log
192
+ SFC_Autoship::log('Setting billing address...', Zend_Log::INFO);
193
  // Create and set billing address
194
  $customerAddress = Mage::getModel('customer/address')->load($this->_billingAddressId);
195
  $billingAddress = Mage::getModel('sales/quote_address');
202
  $this->_getOrderCreateModel()->getQuote()->setBillingAddress($billingAddress);
203
 
204
  // Log
205
+ SFC_Autoship::log('Setting shipping address...', Zend_Log::INFO);
206
  $customerAddress = Mage::getModel('customer/address')->load($this->_shippingAddressId);
207
  $shippingAddress = Mage::getModel('sales/quote_address');
208
  $shippingAddress
213
  $this->_getOrderCreateModel()->setShippingAddress($shippingAddress);
214
 
215
  // Log
216
+ SFC_Autoship::log('Adding products...', Zend_Log::INFO);
217
  // Just like adding products from Magento admin grid
218
  $this->_getOrderCreateModel()->addProducts($this->_productQtys);
219
  // Log
220
+ SFC_Autoship::log('Collecting shipping rates...', Zend_Log::INFO);
221
  $this->_getOrderCreateModel()->collectShippingRates();
222
  // Log
223
+ SFC_Autoship::log('Setting payment data...', Zend_Log::INFO);
224
  // Setting payment data
225
  $this->_getOrderCreateModel()->getQuote()->getPayment()->addData($this->_paymentData);
226
 
227
  // Log
228
+ SFC_Autoship::log('Saving quote...', Zend_Log::INFO);
229
  // Init rule data and save quote
230
  $this->_getOrderCreateModel()
231
  ->initRuleData()
232
  ->saveQuote();
233
 
234
  // Log
235
+ SFC_Autoship::log('Setting payment data...', Zend_Log::INFO);
236
  // Setting payment data (again)
237
  $this->_getOrderCreateModel()->getQuote()->getPayment()->addData($this->_paymentData);
238
 
app/code/local/SFC/Autoship/Helper/Api.php CHANGED
@@ -9,7 +9,7 @@
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
@@ -507,13 +507,13 @@ class SFC_Autoship_Helper_Api extends Mage_Core_Helper_Abstract
507
  protected function makeSingleRequestImpl($url, $parameters = array(), $httpMethod)
508
  {
509
  // Log
510
- Mage::log('Platform API | Making request.', Zend_Log::INFO, SFC_Autoship_Helper_Data::API_LOG_FILE);
511
- Mage::log('Request URL: ' . $url, Zend_Log::INFO, SFC_Autoship_Helper_Data::API_LOG_FILE);
512
- Mage::log('Request Method: ' . $httpMethod, Zend_Log::INFO, SFC_Autoship_Helper_Data::API_LOG_FILE);
513
  // Get config setting re: logging request
514
  $bLogRequest = Mage::getStoreConfig('autoship_general/platform_api/log_request', $this->getConfigStore()) == '1';
515
  if($bLogRequest) {
516
- Mage::log($this->json_format($parameters), Zend_Log::INFO, SFC_Autoship_Helper_Data::API_LOG_FILE);
517
  }
518
  // Create client
519
  $client = new OAuth2\Client(null, null);
@@ -531,29 +531,27 @@ class SFC_Autoship_Helper_Api extends Mage_Core_Helper_Abstract
531
  $response = $client->fetch($url, $parameters, $httpMethod, array('Accept' => 'application/json'),
532
  OAuth2\Client::HTTP_FORM_CONTENT_JSON);
533
  // Log response
534
- Mage::log('Platform API | Response: ', Zend_Log::DEBUG, SFC_Autoship_Helper_Data::API_LOG_FILE);
535
- Mage::log($response, Zend_Log::DEBUG, SFC_Autoship_Helper_Data::API_LOG_FILE);
536
  // Check that we can parse response
537
  if (!is_array($response) || !isset($response['result']) || !isset($response['code']) || !isset($response['content_type'])) {
538
- Mage::log('Platform API | Parse error reading HTTP response!', Zend_Log::ERR, SFC_Autoship_Helper_Data::API_LOG_FILE);
539
  Mage::throwException('Parse error reading HTTP response!');
540
  }
541
  $result = $response['result'];
542
  // Check that we have contents of result, except for code 204
543
  if (!is_array($result) && $response['code'] != 204 && (!isset($parameters['allow_result_string']) || !$parameters['allow_result_string'])) {
544
- Mage::log('Platform API | Parse error reading HTTP response!', Zend_Log::ERR, SFC_Autoship_Helper_Data::API_LOG_FILE);
545
  Mage::throwException('Parse error reading HTTP response!');
546
  }
547
  // Parse response
548
  if ($response['code'] >= 400) {
549
  // Some type of error response, lets log details
550
- Mage::log('Platform API | Error response received, HTTP response code: ' . $response['code'], Zend_Log::ERR,
551
- SFC_Autoship_Helper_Data::API_LOG_FILE);
552
  }
553
  else {
554
  // Lets log all responses at DEBUG level
555
- Mage::log('Platform API | Response received, HTTP response code: ' . $response['code'], Zend_Log::INFO,
556
- SFC_Autoship_Helper_Data::API_LOG_FILE);
557
  }
558
 
559
  // Return response
@@ -578,7 +576,7 @@ class SFC_Autoship_Helper_Api extends Mage_Core_Helper_Abstract
578
  // If token not found in cache, lets get a new one from server
579
  if ($token === false) {
580
  // Log
581
- Mage::log('Platform API | Requesting new access token from platform.', Zend_Log::INFO, SFC_Autoship_Helper_Data::API_LOG_FILE);
582
  // Get config setting re: logging request
583
  $bLogRequest = Mage::getStoreConfig('autoship_general/platform_api/log_request', $this->getConfigStore()) == '1';
584
  // Lookup credentials
@@ -602,18 +600,17 @@ class SFC_Autoship_Helper_Api extends Mage_Core_Helper_Abstract
602
  OAuth2\Client::GRANT_TYPE_CLIENT_CREDENTIALS,
603
  $params);
604
  // Log response
605
- Mage::log('Platform API | Response to getAccessToken: ', Zend_Log::DEBUG, SFC_Autoship_Helper_Data::API_LOG_FILE);
606
- Mage::log($response, Zend_Log::DEBUG, SFC_Autoship_Helper_Data::API_LOG_FILE);
607
  // Check that we can parse response
608
  if (!is_array($response) || !isset($response['result']) || !isset($response['code']) || !isset($response['content_type'])) {
609
- Mage::log('Platform API | Parse error reading HTTP response!', Zend_Log::ERR, SFC_Autoship_Helper_Data::API_LOG_FILE);
610
  Mage::throwException($this->__('Parse error reading HTTP response!'));
611
  }
612
  $result = $response['result'];
613
  // Check that we can parse response for token and lifetime
614
  if (!is_array($result) || !isset($result['access_token']) || !isset($result['expires_in'])) {
615
- Mage::log('Platform API | Parse error reading getAccessToken HTTP response!', Zend_Log::ERR,
616
- SFC_Autoship_Helper_Data::API_LOG_FILE);
617
  Mage::throwException($this->__('Parse error reading getAccessToken HTTP response!'));
618
  }
619
  // Get access token and lifetime
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
507
  protected function makeSingleRequestImpl($url, $parameters = array(), $httpMethod)
508
  {
509
  // Log
510
+ SFC_Autoship::logApi('Platform API | Making request.', Zend_Log::INFO);
511
+ SFC_Autoship::logApi('Request URL: ' . $url, Zend_Log::INFO);
512
+ SFC_Autoship::logApi('Request Method: ' . $httpMethod, Zend_Log::INFO);
513
  // Get config setting re: logging request
514
  $bLogRequest = Mage::getStoreConfig('autoship_general/platform_api/log_request', $this->getConfigStore()) == '1';
515
  if($bLogRequest) {
516
+ SFC_Autoship::logApi($this->json_format($parameters), Zend_Log::INFO);
517
  }
518
  // Create client
519
  $client = new OAuth2\Client(null, null);
531
  $response = $client->fetch($url, $parameters, $httpMethod, array('Accept' => 'application/json'),
532
  OAuth2\Client::HTTP_FORM_CONTENT_JSON);
533
  // Log response
534
+ SFC_Autoship::logApi('Platform API | Response: ', Zend_Log::DEBUG);
535
+ SFC_Autoship::logApi($response, Zend_Log::DEBUG);
536
  // Check that we can parse response
537
  if (!is_array($response) || !isset($response['result']) || !isset($response['code']) || !isset($response['content_type'])) {
538
+ SFC_Autoship::logApi('Platform API | Parse error reading HTTP response!', Zend_Log::ERR);
539
  Mage::throwException('Parse error reading HTTP response!');
540
  }
541
  $result = $response['result'];
542
  // Check that we have contents of result, except for code 204
543
  if (!is_array($result) && $response['code'] != 204 && (!isset($parameters['allow_result_string']) || !$parameters['allow_result_string'])) {
544
+ SFC_Autoship::logApi('Platform API | Parse error reading HTTP response!', Zend_Log::ERR);
545
  Mage::throwException('Parse error reading HTTP response!');
546
  }
547
  // Parse response
548
  if ($response['code'] >= 400) {
549
  // Some type of error response, lets log details
550
+ SFC_Autoship::logApi('Platform API | Error response received, HTTP response code: ' . $response['code'], Zend_Log::ERR);
 
551
  }
552
  else {
553
  // Lets log all responses at DEBUG level
554
+ SFC_Autoship::logApi('Platform API | Response received, HTTP response code: ' . $response['code'], Zend_Log::INFO);
 
555
  }
556
 
557
  // Return response
576
  // If token not found in cache, lets get a new one from server
577
  if ($token === false) {
578
  // Log
579
+ SFC_Autoship::logApi('Platform API | Requesting new access token from platform.', Zend_Log::INFO);
580
  // Get config setting re: logging request
581
  $bLogRequest = Mage::getStoreConfig('autoship_general/platform_api/log_request', $this->getConfigStore()) == '1';
582
  // Lookup credentials
600
  OAuth2\Client::GRANT_TYPE_CLIENT_CREDENTIALS,
601
  $params);
602
  // Log response
603
+ SFC_Autoship::logApi('Platform API | Response to getAccessToken: ', Zend_Log::DEBUG);
604
+ SFC_Autoship::logApi($response, Zend_Log::DEBUG);
605
  // Check that we can parse response
606
  if (!is_array($response) || !isset($response['result']) || !isset($response['code']) || !isset($response['content_type'])) {
607
+ SFC_Autoship::logApi('Platform API | Parse error reading HTTP response!', Zend_Log::ERR);
608
  Mage::throwException($this->__('Parse error reading HTTP response!'));
609
  }
610
  $result = $response['result'];
611
  // Check that we can parse response for token and lifetime
612
  if (!is_array($result) || !isset($result['access_token']) || !isset($result['expires_in'])) {
613
+ SFC_Autoship::logApi('Platform API | Parse error reading getAccessToken HTTP response!', Zend_Log::ERR);
 
614
  Mage::throwException($this->__('Parse error reading getAccessToken HTTP response!'));
615
  }
616
  // Get access token and lifetime
app/code/local/SFC/Autoship/Helper/Data.php CHANGED
@@ -9,7 +9,7 @@
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
@@ -27,16 +27,9 @@ class SFC_Autoship_Helper_Data extends Mage_Core_Helper_Abstract
27
 
28
  /**
29
  * Example of how logging should be done in this extension:
30
- * Mage::log($message, Zend_Log::ERR, SFC_Autoship_Helper_Data::LOG_FILE);
 
 
31
  */
32
 
33
- /**
34
- * Output the current call stack to module log file
35
- */
36
- public function logCallStack()
37
- {
38
- $exception = new Exception;
39
- Mage::log("Current call stack:\n" . $exception->getTraceAsString(), Zend_Log::INFO, self::LOG_FILE);
40
- }
41
-
42
  }
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
27
 
28
  /**
29
  * Example of how logging should be done in this extension:
30
+ * SFC_Autoship::log($message, Zend_Log::ERR);
31
+ * SFC_Autoship::logApi($message, Zend_Log::ERR);
32
+ * SFC_Autoship::logGeneral($message, Zend_Log::ERR);
33
  */
34
 
 
 
 
 
 
 
 
 
 
35
  }
app/code/local/SFC/Autoship/Helper/Payment.php CHANGED
@@ -9,7 +9,7 @@
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
@@ -60,7 +60,7 @@ class SFC_Autoship_Helper_Payment extends SFC_Autoship_Helper_Payment_Base
60
  public function getMethodInstance($code)
61
  {
62
  // Log
63
- Mage::log('SFC_Autoship_Helper_Payment::getMethodInstance', Zend_Log::INFO, SFC_Autoship_Helper_Data::LOG_FILE);
64
 
65
  // Check if code includes key
66
  $key = SFC_Autoship_Model_Payment_Method::METHOD_CODE . SFC_Autoship_Model_Payment_Method::METHOD_CODE_KEY_TOKEN;
@@ -86,18 +86,18 @@ class SFC_Autoship_Helper_Payment extends SFC_Autoship_Helper_Payment_Base
86
  public function getStoreMethods($store = null, $quote = null)
87
  {
88
  // Log
89
- Mage::log('SFC_Autoship_Helper_Payment::getStoreMethods', Zend_Log::INFO, SFC_Autoship_Helper_Data::LOG_FILE);
90
  if(is_numeric($store)) {
91
- Mage::log('Store Id: ' . $store, Zend_Log::INFO, SFC_Autoship_Helper_Data::LOG_FILE);
92
  }
93
  if($store != null && is_object($store)) {
94
- Mage::log('Store Id: ' . $store->getId(), Zend_Log::INFO, SFC_Autoship_Helper_Data::LOG_FILE);
95
  }
96
  if(is_numeric($quote)) {
97
- Mage::log('Quote Id: ' . $quote, Zend_Log::INFO, SFC_Autoship_Helper_Data::LOG_FILE);
98
  }
99
  if($quote != null && is_object($quote)) {
100
- Mage::log('Quote Id: ' . $quote->getId(), Zend_Log::INFO, SFC_Autoship_Helper_Data::LOG_FILE);
101
  }
102
 
103
  /** @var SFC_Autoship_Helper_Vault $vaultHelper */
@@ -139,6 +139,56 @@ class SFC_Autoship_Helper_Payment extends SFC_Autoship_Helper_Payment_Base
139
  return $methods;
140
  }
141
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
142
  /**
143
  * @return Mage_Core_Model_Store
144
  */
@@ -176,4 +226,20 @@ class SFC_Autoship_Helper_Payment extends SFC_Autoship_Helper_Payment_Base
176
  }
177
  }
178
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
179
  }
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
60
  public function getMethodInstance($code)
61
  {
62
  // Log
63
+ SFC_Autoship::log('SFC_Autoship_Helper_Payment::getMethodInstance', Zend_Log::INFO);
64
 
65
  // Check if code includes key
66
  $key = SFC_Autoship_Model_Payment_Method::METHOD_CODE . SFC_Autoship_Model_Payment_Method::METHOD_CODE_KEY_TOKEN;
86
  public function getStoreMethods($store = null, $quote = null)
87
  {
88
  // Log
89
+ SFC_Autoship::log('SFC_Autoship_Helper_Payment::getStoreMethods', Zend_Log::INFO);
90
  if(is_numeric($store)) {
91
+ SFC_Autoship::log('Store Id: ' . $store, Zend_Log::INFO);
92
  }
93
  if($store != null && is_object($store)) {
94
+ SFC_Autoship::log('Store Id: ' . $store->getId(), Zend_Log::INFO);
95
  }
96
  if(is_numeric($quote)) {
97
+ SFC_Autoship::log('Quote Id: ' . $quote, Zend_Log::INFO);
98
  }
99
  if($quote != null && is_object($quote)) {
100
+ SFC_Autoship::log('Quote Id: ' . $quote->getId(), Zend_Log::INFO);
101
  }
102
 
103
  /** @var SFC_Autoship_Helper_Vault $vaultHelper */
139
  return $methods;
140
  }
141
 
142
+ /**
143
+ * Reauthorize the authorization transaction on an order that used Subscribe Pro Vault payment method in
144
+ * Authorize-Only mode.
145
+ *
146
+ * @param Mage_Sales_Model_Order $order
147
+ */
148
+ public function reauthorizeOrder(Mage_Sales_Model_Order $order)
149
+ {
150
+ // Check for SP pay method
151
+ if (0 !== strpos($order->getPayment()->getMethod(), SFC_Autoship_Helper_Platform::PAY_METHOD_CODE_SUBSCRIBE_PRO_VAULT)) {
152
+ Mage::throwException("Reauthorize only applicable to orders which were paid with Subscribe Pro Vault payment method!");
153
+ }
154
+
155
+ // Get payment method instance
156
+ /** @var SFC_Autoship_Model_Payment_Method $methodInstance */
157
+ $methodInstance = $order->getPayment()->getMethodInstance();
158
+ $methodInstance->setStore($order->getStoreId());
159
+
160
+ // Check this was an authorize only transaction
161
+ if (!$methodInstance->canReauthorize($order->getPayment())) {
162
+ Mage::throwException("Reauthorize only applicable to orders which were ordered in authorize-only mode, where credit card was stored and other criteria were met!");
163
+ }
164
+
165
+ // Get amount
166
+ $amount = $order->getPayment()->getData('amount_authorized') - $order->getPayment()->getData('amount_paid');
167
+
168
+ try {
169
+ // Void
170
+ $order->getPayment()->void(
171
+ new Varien_Object() // workaround for backwards compatibility
172
+ );
173
+ $order->save();
174
+ }
175
+ catch (Exception $e) {
176
+ // Void failed, but lets ignore that an reauthorize anyway
177
+ SFC_Autoship::log('Void failed, continuing to reauthorize!', Zend_Log::ERR);
178
+ }
179
+ // Reload order after void
180
+ $order = Mage::getModel('sales/order')->load($order->getId());
181
+
182
+ // Reauthorize
183
+ $methodInstance->reauthorize($order->getPayment(), $amount);
184
+ // Add transaction message to order history
185
+ $message = Mage::helper('autoship')->__('Reauthorized amount of ' . $this->formatPrice($order, $amount) . '. Transaction ID: "' . $order->getPayment()->getTransactionId() . '"');
186
+ $order->setState(Mage_Sales_Model_Order::STATE_PROCESSING, true, $message);
187
+ // Save order
188
+ $order->save();
189
+
190
+ }
191
+
192
  /**
193
  * @return Mage_Core_Model_Store
194
  */
226
  }
227
  }
228
 
229
+
230
+ /**
231
+ * Format price with currency sign
232
+ * @param Mage_Sales_Model_Order $order
233
+ * @param float $amount
234
+ * @param null|string $currency
235
+ * @return string
236
+ */
237
+ protected function formatPrice(Mage_Sales_Model_Order $order, $amount, $currency = null)
238
+ {
239
+ return $order->getBaseCurrency()->formatTxt(
240
+ $amount,
241
+ $currency ? array('currency' => $currency) : array()
242
+ );
243
+ }
244
+
245
  }
app/code/local/SFC/Autoship/Helper/PaymentError.php CHANGED
@@ -9,7 +9,7 @@
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
app/code/local/SFC/Autoship/Helper/PaymentError/Exception.php CHANGED
@@ -9,7 +9,7 @@
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
app/code/local/SFC/Autoship/Helper/Platform.php CHANGED
@@ -9,7 +9,7 @@
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
@@ -97,8 +97,8 @@ class SFC_Autoship_Helper_Platform extends Mage_Core_Helper_Abstract
97
  */
98
  public function handleOnSaveProduct(Mage_Catalog_Model_Product $product)
99
  {
100
- Mage::log('SFC_Autoship_Helper_Platform::handleOnSaveProduct', Zend_Log::INFO, SFC_Autoship_Helper_Data::LOG_FILE);
101
- Mage::log('Product SKU: ' . $product->getSku(), Zend_Log::INFO, SFC_Autoship_Helper_Data::LOG_FILE);
102
 
103
  /** @var SFC_Autoship_Helper_Product $productHelper */
104
  $productHelper = Mage::helper('autoship/product');
@@ -110,24 +110,24 @@ class SFC_Autoship_Helper_Platform extends Mage_Core_Helper_Abstract
110
  $websites = Mage::app()->getWebsites(false);
111
  /** @var Mage_Core_Model_Website $website */
112
  foreach ($websites as $website) {
113
- Mage::log('Website ID: ' . $website->getId() . ' code: ' . $website->getCode(), Zend_Log::INFO, SFC_Autoship_Helper_Data::LOG_FILE);
114
  $store = $website->getDefaultStore();
115
  if (!$store instanceof Mage_Core_Model_Store) {
116
- Mage::log('No default store for website!', Zend_Log::ERR, SFC_Autoship_Helper_Data::LOG_FILE);
117
  continue;
118
  }
119
- Mage::log('Website default store code: ' . $store->getCode(), Zend_Log::INFO, SFC_Autoship_Helper_Data::LOG_FILE);
120
- Mage::log('Subscription features enabled: ' . Mage::getStoreConfig('autoship_general/general/enabled', $store),
121
- Zend_Log::INFO, SFC_Autoship_Helper_Data::LOG_FILE);
122
  // Check configuration for this store
123
  if (Mage::getStoreConfig('autoship_general/general/enabled', $store) == '1') {
124
  // Check if product is assigned to website
125
  $productAssignedToWebsite = in_array($website->getId(), $productWebsites);
126
- Mage::log('Product is assigned to website: ' . $productAssignedToWebsite, Zend_Log::INFO, SFC_Autoship_Helper_Data::LOG_FILE);
127
  if ($productAssignedToWebsite) {
128
  // Lookup whether product enabled / disabled
129
  $isProductEnabled = $productHelper->isAvailableForSubscription($product, $store, false);
130
- Mage::log('Is product enabled for subscription: ' . $isProductEnabled, Zend_Log::INFO, SFC_Autoship_Helper_Data::LOG_FILE);
131
  // If enabled, update product on platform
132
  if ($isProductEnabled) {
133
  // Create / update product on platform
@@ -146,7 +146,7 @@ class SFC_Autoship_Helper_Platform extends Mage_Core_Helper_Abstract
146
  */
147
  protected function updateProductOnPlatform(Mage_Core_Model_Store $store, Mage_Catalog_Model_Product $product)
148
  {
149
- Mage::log('SFC_Autoship_Helper_Platform::updateProductOnPlatform', Zend_Log::INFO, SFC_Autoship_Helper_Data::LOG_FILE);
150
 
151
  // Get ref to core session object
152
  /** @var Mage_Core_Model_Session $coreSession */
@@ -169,7 +169,7 @@ class SFC_Autoship_Helper_Platform extends Mage_Core_Helper_Abstract
169
  $this->createOrUpdateProductImpl($product, array(), $store);
170
  }
171
  catch (Exception $e) {
172
- Mage::log('Failed to update product on platform with error: ' . $e->getMessage());
173
  $coreSession->addError($this->__('Failed to update product on platform!'));
174
  }
175
  }
@@ -400,7 +400,7 @@ class SFC_Autoship_Helper_Platform extends Mage_Core_Helper_Abstract
400
  ));
401
  // Check response for HTTP status code
402
  if ($response['code'] != 200) {
403
- Mage::log('SFC_Autoship_Helper_Platform::getCustomer Customer does not exist on platform with email: ' . $email, Zend_Log::INFO, SFC_Autoship_Helper_Data::LOG_FILE);
404
  return false;
405
  }
406
  // Parse customer id out of response
@@ -414,7 +414,7 @@ class SFC_Autoship_Helper_Platform extends Mage_Core_Helper_Abstract
414
  Mage::throwException($this->__('Found more than 1 matching customer on platform!'));
415
  }
416
  if (count($platformCustomers) == 1) {
417
- Mage::log('SFC_Autoship_Helper_Platform::getCustomer Customer exists on platform with email: ' . $email, Zend_Log::INFO, SFC_Autoship_Helper_Data::LOG_FILE);
418
  // Found customer, now lets update him
419
  // Get id of found customer
420
  $platformCustomer = $platformCustomers[0];
@@ -721,6 +721,11 @@ class SFC_Autoship_Helper_Platform extends Mage_Core_Helper_Abstract
721
  $platformSubscription['subscription_products'][0]['magento_additional_options'] = $additionalOptions;
722
  }
723
 
 
 
 
 
 
724
  // Add payment details
725
  // New, multi-gateway aware method
726
  $platformSubscription['payment_profile'] = array(
@@ -890,11 +895,11 @@ class SFC_Autoship_Helper_Platform extends Mage_Core_Helper_Abstract
890
  /** @var SFC_Autoship_Model_Subscription $subscription */
891
  $subscription = Mage::getModel('autoship/subscription');
892
 
893
- //First set the subscription id
894
  $subscription->setData('subscription_id', $platformSubscription['id']);
895
 
896
- //Iterate over all scalar (top-level) values returned by the platform helper, and set them on the subscription
897
- //Exclude values where the subscription key is not the magento model key
898
  $_mappedFields = array('id', 'customer_id', 'magento_shipping_address_id', 'magento_shipping_method_code');
899
  foreach($platformSubscription as $k => $v) {
900
  if (is_scalar($v) && !in_array($k, $_mappedFields)) {
@@ -921,23 +926,43 @@ class SFC_Autoship_Helper_Platform extends Mage_Core_Helper_Abstract
921
  $subscription->setData('customer_id', $customer->getId());
922
  }
923
 
924
- if (isset($platformSubscription['payment_profile']['billing_address']['magento_address_id'])) {
925
- $subscription->setData('billing_address_id', $platformSubscription['payment_profile']['billing_address']['magento_address_id']);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
926
  }
927
- $subscription->setData('billing_first_name', $platformSubscription['payment_profile']['billing_address']['first_name']);
928
- $subscription->setData('billing_last_name', $platformSubscription['payment_profile']['billing_address']['last_name']);
929
  if (isset($platformSubscription['magento_shipping_address_id'])) {
930
  $subscription->setData('shipping_address_id', $platformSubscription['magento_shipping_address_id']);
931
  }
 
 
 
932
  $subscription->setData('shipping_method', $platformSubscription['magento_shipping_method_code']);
933
 
934
- // Save generic pay profile
935
- $subscription->setData('payment_profile', $platformSubscription['payment_profile']);
936
  // Handle payment gateway specific setting
937
  $subscription->setData('payment_method_code', $this->getConfiguredPaymentMethodCode());
938
- $subscription->setData('payment_token', $platformSubscription['payment_profile']['payment_token']);
939
- $subscription->setData('creditcard_last_digits', $platformSubscription['payment_profile']['creditcard_last_digits']);
940
- $subscription->setData('customer_cardnumber', $platformSubscription['payment_profile']['creditcard_last_digits']);
 
941
 
942
  return $subscription;
943
  }
@@ -954,13 +979,13 @@ class SFC_Autoship_Helper_Platform extends Mage_Core_Helper_Abstract
954
  $response = $apiHelper->fetchReport($code);
955
 
956
  if ($response['code'] !== 200) {
957
- Mage::log('SFC_Autoship_Helper_Platform::getReport Report does not exist on platform with code: ' . $code, Zend_Log::INFO, SFC_Autoship_Helper_Data::LOG_FILE);
958
  }
959
 
960
  $result = $response['result'];
961
 
962
  if (!$result) {
963
- Mage::log('SFC_Autoship_Helper_Platform::getReport Report has no result, with code: ' . $code, Zend_Log::INFO, SFC_Autoship_Helper_Data::LOG_FILE);
964
  Mage::throwException($this->__('Failed to read result for report with code %s', $code));
965
  }
966
 
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
97
  */
98
  public function handleOnSaveProduct(Mage_Catalog_Model_Product $product)
99
  {
100
+ SFC_Autoship::log('SFC_Autoship_Helper_Platform::handleOnSaveProduct', Zend_Log::INFO);
101
+ SFC_Autoship::log('Product SKU: ' . $product->getSku(), Zend_Log::INFO);
102
 
103
  /** @var SFC_Autoship_Helper_Product $productHelper */
104
  $productHelper = Mage::helper('autoship/product');
110
  $websites = Mage::app()->getWebsites(false);
111
  /** @var Mage_Core_Model_Website $website */
112
  foreach ($websites as $website) {
113
+ SFC_Autoship::log('Website ID: ' . $website->getId() . ' code: ' . $website->getCode(), Zend_Log::INFO);
114
  $store = $website->getDefaultStore();
115
  if (!$store instanceof Mage_Core_Model_Store) {
116
+ SFC_Autoship::log('No default store for website!', Zend_Log::ERR);
117
  continue;
118
  }
119
+ SFC_Autoship::log('Website default store code: ' . $store->getCode(), Zend_Log::INFO);
120
+ SFC_Autoship::log('Subscription features enabled: ' . Mage::getStoreConfig('autoship_general/general/enabled', $store),
121
+ Zend_Log::INFO);
122
  // Check configuration for this store
123
  if (Mage::getStoreConfig('autoship_general/general/enabled', $store) == '1') {
124
  // Check if product is assigned to website
125
  $productAssignedToWebsite = in_array($website->getId(), $productWebsites);
126
+ SFC_Autoship::log('Product is assigned to website: ' . $productAssignedToWebsite, Zend_Log::INFO);
127
  if ($productAssignedToWebsite) {
128
  // Lookup whether product enabled / disabled
129
  $isProductEnabled = $productHelper->isAvailableForSubscription($product, $store, false);
130
+ SFC_Autoship::log('Is product enabled for subscription: ' . $isProductEnabled, Zend_Log::INFO);
131
  // If enabled, update product on platform
132
  if ($isProductEnabled) {
133
  // Create / update product on platform
146
  */
147
  protected function updateProductOnPlatform(Mage_Core_Model_Store $store, Mage_Catalog_Model_Product $product)
148
  {
149
+ SFC_Autoship::log('SFC_Autoship_Helper_Platform::updateProductOnPlatform', Zend_Log::INFO);
150
 
151
  // Get ref to core session object
152
  /** @var Mage_Core_Model_Session $coreSession */
169
  $this->createOrUpdateProductImpl($product, array(), $store);
170
  }
171
  catch (Exception $e) {
172
+ SFC_Autoship::log('Failed to update product on platform with error: ' . $e->getMessage(), Zend_Log::ERR);
173
  $coreSession->addError($this->__('Failed to update product on platform!'));
174
  }
175
  }
400
  ));
401
  // Check response for HTTP status code
402
  if ($response['code'] != 200) {
403
+ SFC_Autoship::log('SFC_Autoship_Helper_Platform::getCustomer Customer does not exist on platform with email: ' . $email, Zend_Log::INFO);
404
  return false;
405
  }
406
  // Parse customer id out of response
414
  Mage::throwException($this->__('Found more than 1 matching customer on platform!'));
415
  }
416
  if (count($platformCustomers) == 1) {
417
+ SFC_Autoship::log('SFC_Autoship_Helper_Platform::getCustomer Customer exists on platform with email: ' . $email, Zend_Log::INFO);
418
  // Found customer, now lets update him
419
  // Get id of found customer
420
  $platformCustomer = $platformCustomers[0];
721
  $platformSubscription['subscription_products'][0]['magento_additional_options'] = $additionalOptions;
722
  }
723
 
724
+ // If user defined fields are set, set on platform
725
+ if ($subscription->hasData('user_defined_fields')) {
726
+ $platformSubscription['user_defined_fields'] = $subscription->getData('user_defined_fields');
727
+ }
728
+
729
  // Add payment details
730
  // New, multi-gateway aware method
731
  $platformSubscription['payment_profile'] = array(
895
  /** @var SFC_Autoship_Model_Subscription $subscription */
896
  $subscription = Mage::getModel('autoship/subscription');
897
 
898
+ // First set the subscription id
899
  $subscription->setData('subscription_id', $platformSubscription['id']);
900
 
901
+ // Iterate over all scalar (top-level) values returned by the platform helper, and set them on the subscription
902
+ // Exclude values where the subscription key is not the magento model key
903
  $_mappedFields = array('id', 'customer_id', 'magento_shipping_address_id', 'magento_shipping_method_code');
904
  foreach($platformSubscription as $k => $v) {
905
  if (is_scalar($v) && !in_array($k, $_mappedFields)) {
926
  $subscription->setData('customer_id', $customer->getId());
927
  }
928
 
929
+ // Payment profile
930
+ if (isset($platformSubscription['payment_profile'])) {
931
+ // Save generic pay profile
932
+ $subscription->setData('payment_profile', $platformSubscription['payment_profile']);
933
+ // Payment profile fields
934
+ $subscription->setData('payment_token', $platformSubscription['payment_profile']['payment_token']);
935
+ $subscription->setData('creditcard_last_digits', $platformSubscription['payment_profile']['creditcard_last_digits']);
936
+ $subscription->setData('customer_cardnumber', $platformSubscription['payment_profile']['creditcard_last_digits']);
937
+ // Billing address
938
+ if (isset($platformSubscription['payment_profile']['billing_address'])) {
939
+ if (isset($platformSubscription['payment_profile']['billing_address']['magento_address_id'])) {
940
+ $subscription->setData('billing_address_id', $platformSubscription['payment_profile']['billing_address']['magento_address_id']);
941
+ }
942
+ if (isset($platformSubscription['payment_profile']['billing_address']['first_name'])) {
943
+ $subscription->setData('billing_first_name', $platformSubscription['payment_profile']['billing_address']['first_name']);
944
+ }
945
+ if (isset($platformSubscription['payment_profile']['billing_address']['last_name'])) {
946
+ $subscription->setData('billing_last_name', $platformSubscription['payment_profile']['billing_address']['last_name']);
947
+ }
948
+ }
949
  }
950
+
951
+ // Shipping address
952
  if (isset($platformSubscription['magento_shipping_address_id'])) {
953
  $subscription->setData('shipping_address_id', $platformSubscription['magento_shipping_address_id']);
954
  }
955
+ if (isset($platformSubscription['shipping_address'])) {
956
+ $subscription->setData('shipping_address', $platformSubscription['shipping_address']);
957
+ }
958
  $subscription->setData('shipping_method', $platformSubscription['magento_shipping_method_code']);
959
 
 
 
960
  // Handle payment gateway specific setting
961
  $subscription->setData('payment_method_code', $this->getConfiguredPaymentMethodCode());
962
+
963
+ // Set user-defined fields
964
+ $user_defined_fields = isset($platformSubscription['user_defined_fields']) ? $platformSubscription['user_defined_fields'] : array();
965
+ $subscription->setData('user_defined_fields', $user_defined_fields);
966
 
967
  return $subscription;
968
  }
979
  $response = $apiHelper->fetchReport($code);
980
 
981
  if ($response['code'] !== 200) {
982
+ SFC_Autoship::log('SFC_Autoship_Helper_Platform::getReport Report does not exist on platform with code: ' . $code, Zend_Log::INFO);
983
  }
984
 
985
  $result = $response['result'];
986
 
987
  if (!$result) {
988
+ SFC_Autoship::log('SFC_Autoship_Helper_Platform::getReport Report has no result, with code: ' . $code, Zend_Log::INFO);
989
  Mage::throwException($this->__('Failed to read result for report with code %s', $code));
990
  }
991
 
app/code/local/SFC/Autoship/Helper/Product.php CHANGED
@@ -9,7 +9,7 @@
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
@@ -107,7 +107,7 @@ class SFC_Autoship_Helper_Product extends Mage_Core_Helper_Abstract
107
  // Set flag
108
  $this->platformConnectionVerified = false;
109
  // Log
110
- Mage::log('Failed to verify connection to Subscribe Pro platform!', Zend_Log::ERR, SFC_Autoship_Helper_Data::API_LOG_FILE);
111
 
112
  return false;
113
  }
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
107
  // Set flag
108
  $this->platformConnectionVerified = false;
109
  // Log
110
+ SFC_Autoship::logApi('Failed to verify connection to Subscribe Pro platform!', Zend_Log::ERR);
111
 
112
  return false;
113
  }
app/code/local/SFC/Autoship/Helper/Quote.php CHANGED
@@ -9,7 +9,7 @@
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
app/code/local/SFC/Autoship/Helper/Schedule.php CHANGED
@@ -9,7 +9,7 @@
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
app/code/local/SFC/Autoship/Helper/Subscription.php CHANGED
@@ -9,7 +9,7 @@
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
app/code/local/SFC/Autoship/Helper/Vault.php CHANGED
@@ -9,7 +9,7 @@
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
app/code/local/SFC/Autoship/Model/Adminhtml/Observer.php ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Subscribe Pro - Subscriptions Management Extension
4
+ *
5
+ * PHP version 5
6
+ *
7
+ * LICENSE: This source file is subject to commercial source code license of SUBSCRIBE PRO INC.
8
+ *
9
+ * @category SFC
10
+ * @package SFC_Autoship
11
+ * @author Garth Brantley <garth@subscribepro.com>
12
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
13
+ * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
+ * @link http://www.subscribepro.com/
15
+ *
16
+ */
17
+
18
+ /**
19
+ * Observer class to handle all event observers for subscriptions module Adminhtml area
20
+ */
21
+ class SFC_Autoship_Model_Adminhtml_Observer
22
+ {
23
+
24
+ public function adminhtmlWidgetContainerHtmlBefore($event)
25
+ {
26
+ $block = $event->getBlock();
27
+
28
+ // Add Reauthorize button to View Order
29
+ if ($block instanceof Mage_Adminhtml_Block_Sales_Order_View) {
30
+ // Cur order
31
+ /** @var Mage_Sales_Model_Order $order */
32
+ $order = Mage::registry('current_order');
33
+ // Check for SP pay method
34
+ if (0 === strpos($order->getPayment()->getMethod(), SFC_Autoship_Helper_Platform::PAY_METHOD_CODE_SUBSCRIBE_PRO_VAULT)) {
35
+ // Only show for authorize only orders
36
+ /** @var SFC_Autoship_Model_Payment_Method $methodInstance */
37
+ $methodInstance = $order->getPayment()->getMethodInstance();
38
+ if ($methodInstance->canReauthorize($order->getPayment())) {
39
+ // Only show when the order used a
40
+ $message = Mage::helper('autoship')->__('Are you sure you want to create a new authorization for this order?');
41
+ $block->addButton('reauthorize_order_payment', array(
42
+ 'label' => Mage::helper('autoship')->__('Reauthorize'),
43
+ 'onclick' => "confirmSetLocation('{$message}', '{$block->getUrl('adminhtml/sporderpayment/reauthorize')}')",
44
+ 'class' => 'go'
45
+ ));
46
+ }
47
+ }
48
+ }
49
+ }
50
+
51
+ }
app/code/local/SFC/Autoship/Model/Api/Cart/Api.php CHANGED
@@ -145,6 +145,33 @@ class SFC_Autoship_Model_Api_Cart_Api extends Mage_Checkout_Model_Api_Resource
145
  return true;
146
  }
147
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
148
  /**
149
  * Map one array of address data into a Mage_Sales_Model_Quote_Address
150
  *
145
  return true;
146
  }
147
 
148
+ /**
149
+ * @param $quoteId
150
+ * @param $customShippingPrice
151
+ * @return bool
152
+ */
153
+ public function setShippingPrice($quoteId, $customShippingPrice)
154
+ {
155
+ // Get quote from quote ID
156
+ $quote = $this->_getQuote($quoteId, null);
157
+
158
+ // Save custom shipping price on quote
159
+ $quote->setData('subscribe_pro_custom_shipping_price', $customShippingPrice);
160
+
161
+ // Now save quote
162
+ // This logic is duplicated from Mage_Checkout_Model_Cart_Customer_Api::setAddresses
163
+ try {
164
+ $quote
165
+ ->collectTotals()
166
+ ->save();
167
+ }
168
+ catch (Exception $e) {
169
+ $this->throwApiFault('sp_cart_shipping_price_save', 'Error saving custom shipping price for quote: ' . null, $e->getMessage());
170
+ }
171
+
172
+ return true;
173
+ }
174
+
175
  /**
176
  * Map one array of address data into a Mage_Sales_Model_Quote_Address
177
  *
app/code/local/SFC/Autoship/Model/Checkout/Cart/Api.php CHANGED
@@ -9,7 +9,7 @@
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
app/code/local/SFC/Autoship/Model/Checkout/Cart/Product/Api.php CHANGED
@@ -9,7 +9,7 @@
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
@@ -55,7 +55,7 @@ class SFC_Autoship_Model_Checkout_Cart_Product_Api extends Mage_Checkout_Model_C
55
  }
56
  else {
57
  if (isset($productItem['sku'])) {
58
- /* SFC Changes - Workaround for earlier Magento versions that can't get product by the sku - Starts Here */
59
  // Magento bug is in Mage_Catalog_Helper_Product::getProduct method
60
  $sku = $productItem['sku'];
61
  // Lookup product id by sku
@@ -67,7 +67,7 @@ class SFC_Autoship_Model_Checkout_Cart_Product_Api extends Mage_Checkout_Model_C
67
  if (!$productByItem instanceof Mage_Catalog_Model_Product) {
68
  $this->_fault('add_product_fault', Mage::helper("autoship")->__('Failed to find product with SKU: %s', $sku));
69
  }
70
- /* SFC Changes - Workaround for earlier Magento versions that can't get product by the sku - Ends Here */
71
  }
72
  else {
73
  $errors[] = Mage::helper('checkout')->__('One item of products do not have identifier or sku');
@@ -81,7 +81,7 @@ class SFC_Autoship_Model_Checkout_Cart_Product_Api extends Mage_Checkout_Model_C
81
  if (is_string($result)) {
82
  Mage::throwException($result);
83
  }
84
- /* SFC Changes / Additions - Start Here */
85
  $quoteItem = $result;
86
  // In the case of bundle products, make sure we grab the parent quote item
87
  if($quoteItem->getParentItem() != null && $quoteItem->getParentItem()->getProductType() == 'bundle') {
@@ -105,7 +105,7 @@ class SFC_Autoship_Model_Checkout_Cart_Product_Api extends Mage_Checkout_Model_C
105
  if (isset($productRequest['subscription_interval'])) {
106
  $quoteItem->setData('subscription_interval', $productRequest['subscription_interval']);
107
  }
108
- /* SFC Changes / Additions - End Here */
109
  }
110
  catch (Mage_Core_Exception $e) {
111
  $errors[] = $e->getMessage();
@@ -176,7 +176,7 @@ class SFC_Autoship_Model_Checkout_Cart_Product_Api extends Mage_Checkout_Model_C
176
  $quoteItem->setQty($productItem['qty']);
177
  }
178
 
179
- /* SFC Changes / Additions - Start Here */
180
  $productRequest = $this->_getProductRequest($productItem);
181
  if (isset($productRequest['custom_price'])) {
182
  $quoteItem->setCustomPrice($productRequest['custom_price']);
@@ -198,7 +198,7 @@ class SFC_Autoship_Model_Checkout_Cart_Product_Api extends Mage_Checkout_Model_C
198
  );
199
  }
200
  */
201
- /* SFC Changes / Additions - End Here */
202
  }
203
 
204
  if (!empty($errors)) {
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
55
  }
56
  else {
57
  if (isset($productItem['sku'])) {
58
+ /* Subscribe Pro Changes - Workaround for earlier Magento versions that can't get product by the sku - Starts Here */
59
  // Magento bug is in Mage_Catalog_Helper_Product::getProduct method
60
  $sku = $productItem['sku'];
61
  // Lookup product id by sku
67
  if (!$productByItem instanceof Mage_Catalog_Model_Product) {
68
  $this->_fault('add_product_fault', Mage::helper("autoship")->__('Failed to find product with SKU: %s', $sku));
69
  }
70
+ /* Subscribe Pro Changes - Workaround for earlier Magento versions that can't get product by the sku - Ends Here */
71
  }
72
  else {
73
  $errors[] = Mage::helper('checkout')->__('One item of products do not have identifier or sku');
81
  if (is_string($result)) {
82
  Mage::throwException($result);
83
  }
84
+ /* Subscribe Pro Changes / Additions - Start Here */
85
  $quoteItem = $result;
86
  // In the case of bundle products, make sure we grab the parent quote item
87
  if($quoteItem->getParentItem() != null && $quoteItem->getParentItem()->getProductType() == 'bundle') {
105
  if (isset($productRequest['subscription_interval'])) {
106
  $quoteItem->setData('subscription_interval', $productRequest['subscription_interval']);
107
  }
108
+ /* Subscribe Pro Changes / Additions - End Here */
109
  }
110
  catch (Mage_Core_Exception $e) {
111
  $errors[] = $e->getMessage();
176
  $quoteItem->setQty($productItem['qty']);
177
  }
178
 
179
+ /* Subscribe Pro Changes / Additions - Start Here */
180
  $productRequest = $this->_getProductRequest($productItem);
181
  if (isset($productRequest['custom_price'])) {
182
  $quoteItem->setCustomPrice($productRequest['custom_price']);
198
  );
199
  }
200
  */
201
+ /* Subscribe Pro Changes / Additions - End Here */
202
  }
203
 
204
  if (!empty($errors)) {
app/code/local/SFC/Autoship/Model/Mysql4/Subscription.php CHANGED
@@ -9,7 +9,7 @@
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
app/code/local/SFC/Autoship/Model/Mysql4/Subscription/Collection.php CHANGED
@@ -9,7 +9,7 @@
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
app/code/local/SFC/Autoship/Model/Observer.php CHANGED
@@ -9,7 +9,7 @@
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
@@ -26,7 +26,7 @@ class SFC_Autoship_Model_Observer
26
  */
27
  public function onProductSaveCommitAfter(Varien_Event_Observer $observer)
28
  {
29
- Mage::log('SFC_Autoship_Model_Observer::onProductSaveCommitAfter', Zend_Log::INFO, SFC_Autoship_Helper_Data::LOG_FILE);
30
 
31
  // Get current product
32
  $product = $observer->getEvent()->getProduct();
@@ -48,7 +48,7 @@ class SFC_Autoship_Model_Observer
48
  */
49
  public function onCheckoutCartAddProductComplete(Varien_Event_Observer $observer)
50
  {
51
- Mage::log('SFC_Autoship_Model_Observer::onCheckoutCartAddProductComplete', Zend_Log::INFO, SFC_Autoship_Helper_Data::LOG_FILE);
52
 
53
  // Get store for config checks
54
  $store = Mage::getSingleton('checkout/cart')->getQuote()->getStore();
@@ -87,7 +87,7 @@ class SFC_Autoship_Model_Observer
87
 
88
  public function onCheckoutCartUpdateItemsAfter(Varien_Event_Observer $observer)
89
  {
90
- Mage::log('SFC_Autoship_Model_Observer::onCheckoutCartUpdateItemsAfter', Zend_Log::INFO, SFC_Autoship_Helper_Data::LOG_FILE);
91
 
92
  // Get data from $observer
93
  /** @var Mage_Checkout_Model_Cart $cart */
@@ -114,7 +114,7 @@ class SFC_Autoship_Model_Observer
114
 
115
  public function onSalesConvertQuoteItemToOrderItem(Varien_Event_Observer $observer)
116
  {
117
- Mage::log('SFC_Autoship_Model_Observer::onSalesConvertQuoteItemToOrderItem', Zend_Log::INFO, SFC_Autoship_Helper_Data::LOG_FILE);
118
 
119
  // Get data from $observer
120
  /** @var Mage_Sales_Model_Quote_Item $quoteItem */
@@ -135,7 +135,7 @@ class SFC_Autoship_Model_Observer
135
 
136
  public function onSalesConvertOrderToQuote(Varien_Event_Observer $observer)
137
  {
138
- Mage::log('SFC_Autoship_Model_Observer::onSalesConvertOrderToQuote', Zend_Log::INFO, SFC_Autoship_Helper_Data::LOG_FILE);
139
 
140
  // Get data from $observer
141
  /** @var Mage_Sales_Model_Quote $quote */
@@ -156,7 +156,7 @@ class SFC_Autoship_Model_Observer
156
 
157
  public function onCheckoutSubmitAllAfter(Varien_Event_Observer $observer)
158
  {
159
- Mage::log('SFC_Autoship_Model_Observer::onCheckoutSubmitAllAfter', Zend_Log::INFO, SFC_Autoship_Helper_Data::LOG_FILE);
160
 
161
  // Get data from $observer
162
  /** @var Mage_Sales_Model_Quote $quote */
@@ -179,14 +179,14 @@ class SFC_Autoship_Model_Observer
179
  $quoteHelper->onCheckoutSubmitAllAfter($quote);
180
  }
181
  catch (\Exception $e) {
182
- Mage::log('Failed to create subscription(s)!', Zend_Log::ERR, SFC_Autoship_Helper_Data::LOG_FILE);
183
- Mage::log('Error message: ' . $e->getMessage(), Zend_Log::ERR, SFC_Autoship_Helper_Data::LOG_FILE);
184
  }
185
  }
186
 
187
  public function onCheckoutOnepageControllerSuccessAction(Varien_Event_Observer $observer)
188
  {
189
- Mage::log('SFC_Autoship_Model_Observer::onCheckoutOnepageControllerSuccessAction', Zend_Log::INFO, SFC_Autoship_Helper_Data::LOG_FILE);
190
 
191
  // Check config to see if extension functionality is enabled
192
  if (Mage::getStoreConfig('autoship_general/general/enabled') != '1') {
@@ -217,8 +217,8 @@ class SFC_Autoship_Model_Observer
217
  Mage::getSingleton('checkout/session')->setData('failed_subscription_count', 0);
218
  }
219
  catch (\Exception $e) {
220
- Mage::log('Failed to display subscription created message on one-page checkout success page!', Zend_Log::ERR, SFC_Autoship_Helper_Data::LOG_FILE);
221
- Mage::log('Error message: ' . $e->getMessage(), Zend_Log::ERR, SFC_Autoship_Helper_Data::LOG_FILE);
222
  }
223
  }
224
 
@@ -228,7 +228,7 @@ class SFC_Autoship_Model_Observer
228
  */
229
  public function onSalesQuoteAddressDiscountItem(Varien_Event_Observer $observer)
230
  {
231
- Mage::log('SFC_Autoship_Model_Observer::onSalesQuoteAddressDiscountItem', Zend_Log::INFO, SFC_Autoship_Helper_Data::LOG_FILE);
232
  }
233
 
234
  /**
@@ -239,7 +239,7 @@ class SFC_Autoship_Model_Observer
239
  */
240
  public function isAllowedGuestCheckout(Varien_Event_Observer $observer)
241
  {
242
- Mage::log('SFC_Autoship_Model_Observer::isAllowedGuestCheckout', Zend_Log::INFO, SFC_Autoship_Helper_Data::LOG_FILE);
243
 
244
  // Get data from $observer
245
  /** @var Mage_Sales_Model_Quote $quote */
@@ -359,10 +359,10 @@ class SFC_Autoship_Model_Observer
359
 
360
  $platformCustomer = $platformHelper->getCustomer($customer->getOrigData('email'));
361
  if ($platformCustomer) {
362
- Mage::log('SFC_Autoship_Model_Observer::onCustomerSave Customer with email: ' . $customer->getEmail() . ' was changed, updating platform', Zend_Log::INFO, SFC_Autoship_Helper_Data::LOG_FILE);
363
  $platformHelper->updateCustomer($platformCustomer['id'], $customer);
364
  } else {
365
- Mage::log('SFC_Autoship_Model_Observer::onCustomerSave Customer with email: ' . $customer->getEmail() . ' was changed, but does not exist on platform', Zend_Log::INFO, SFC_Autoship_Helper_Data::LOG_FILE);
366
  }
367
  }
368
  return $this;
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
26
  */
27
  public function onProductSaveCommitAfter(Varien_Event_Observer $observer)
28
  {
29
+ SFC_Autoship::log('SFC_Autoship_Model_Observer::onProductSaveCommitAfter', Zend_Log::INFO);
30
 
31
  // Get current product
32
  $product = $observer->getEvent()->getProduct();
48
  */
49
  public function onCheckoutCartAddProductComplete(Varien_Event_Observer $observer)
50
  {
51
+ SFC_Autoship::log('SFC_Autoship_Model_Observer::onCheckoutCartAddProductComplete', Zend_Log::INFO);
52
 
53
  // Get store for config checks
54
  $store = Mage::getSingleton('checkout/cart')->getQuote()->getStore();
87
 
88
  public function onCheckoutCartUpdateItemsAfter(Varien_Event_Observer $observer)
89
  {
90
+ SFC_Autoship::log('SFC_Autoship_Model_Observer::onCheckoutCartUpdateItemsAfter', Zend_Log::INFO);
91
 
92
  // Get data from $observer
93
  /** @var Mage_Checkout_Model_Cart $cart */
114
 
115
  public function onSalesConvertQuoteItemToOrderItem(Varien_Event_Observer $observer)
116
  {
117
+ SFC_Autoship::log('SFC_Autoship_Model_Observer::onSalesConvertQuoteItemToOrderItem', Zend_Log::INFO);
118
 
119
  // Get data from $observer
120
  /** @var Mage_Sales_Model_Quote_Item $quoteItem */
135
 
136
  public function onSalesConvertOrderToQuote(Varien_Event_Observer $observer)
137
  {
138
+ SFC_Autoship::log('SFC_Autoship_Model_Observer::onSalesConvertOrderToQuote', Zend_Log::INFO);
139
 
140
  // Get data from $observer
141
  /** @var Mage_Sales_Model_Quote $quote */
156
 
157
  public function onCheckoutSubmitAllAfter(Varien_Event_Observer $observer)
158
  {
159
+ SFC_Autoship::log('SFC_Autoship_Model_Observer::onCheckoutSubmitAllAfter', Zend_Log::INFO);
160
 
161
  // Get data from $observer
162
  /** @var Mage_Sales_Model_Quote $quote */
179
  $quoteHelper->onCheckoutSubmitAllAfter($quote);
180
  }
181
  catch (\Exception $e) {
182
+ SFC_Autoship::log('Failed to create subscription(s)!', Zend_Log::ERR);
183
+ SFC_Autoship::log('Error message: ' . $e->getMessage(), Zend_Log::ERR);
184
  }
185
  }
186
 
187
  public function onCheckoutOnepageControllerSuccessAction(Varien_Event_Observer $observer)
188
  {
189
+ SFC_Autoship::log('SFC_Autoship_Model_Observer::onCheckoutOnepageControllerSuccessAction', Zend_Log::INFO);
190
 
191
  // Check config to see if extension functionality is enabled
192
  if (Mage::getStoreConfig('autoship_general/general/enabled') != '1') {
217
  Mage::getSingleton('checkout/session')->setData('failed_subscription_count', 0);
218
  }
219
  catch (\Exception $e) {
220
+ SFC_Autoship::log('Failed to display subscription created message on one-page checkout success page!', Zend_Log::ERR);
221
+ SFC_Autoship::log('Error message: ' . $e->getMessage(), Zend_Log::ERR);
222
  }
223
  }
224
 
228
  */
229
  public function onSalesQuoteAddressDiscountItem(Varien_Event_Observer $observer)
230
  {
231
+ SFC_Autoship::log('SFC_Autoship_Model_Observer::onSalesQuoteAddressDiscountItem', Zend_Log::INFO);
232
  }
233
 
234
  /**
239
  */
240
  public function isAllowedGuestCheckout(Varien_Event_Observer $observer)
241
  {
242
+ SFC_Autoship::log('SFC_Autoship_Model_Observer::isAllowedGuestCheckout', Zend_Log::INFO);
243
 
244
  // Get data from $observer
245
  /** @var Mage_Sales_Model_Quote $quote */
359
 
360
  $platformCustomer = $platformHelper->getCustomer($customer->getOrigData('email'));
361
  if ($platformCustomer) {
362
+ SFC_Autoship::log('SFC_Autoship_Model_Observer::onCustomerSave Customer with email: ' . $customer->getEmail() . ' was changed, updating platform', Zend_Log::INFO);
363
  $platformHelper->updateCustomer($platformCustomer['id'], $customer);
364
  } else {
365
+ SFC_Autoship::log('SFC_Autoship_Model_Observer::onCustomerSave Customer with email: ' . $customer->getEmail() . ' was changed, but does not exist on platform', Zend_Log::INFO);
366
  }
367
  }
368
  return $this;
app/code/local/SFC/Autoship/Model/Payment/Method.php CHANGED
@@ -9,7 +9,7 @@
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
@@ -20,6 +20,7 @@
20
 
21
  class SFC_Autoship_Model_Payment_Method extends Mage_Payment_Model_Method_Cc
22
  {
 
23
  const METHOD_CODE = 'subscribe_pro';
24
  const METHOD_CODE_KEY_TOKEN = '_token_';
25
 
@@ -234,8 +235,8 @@ class SFC_Autoship_Model_Payment_Method extends Mage_Payment_Model_Method_Cc
234
  /** @var SFC_Autoship_Helper_Quote $quoteHelper */
235
  $quoteHelper = Mage::helper('autoship/quote');
236
 
237
- if ($quoteHelper->hasProductsToCreateNewSubscription()) {
238
- //Remove the check for zero dollar checkout on this method, as its code is not 'free' but it does support zero dollar checkout
239
  if ($checksBitMask) {
240
  $checksBitMask = $checksBitMask & ~self::CHECK_ZERO_TOTAL;
241
  }
@@ -247,6 +248,9 @@ class SFC_Autoship_Model_Payment_Method extends Mage_Payment_Model_Method_Cc
247
  return parent::isApplicableToQuote($quote, $checksBitMask);
248
  }
249
 
 
 
 
250
  public function hasVerification()
251
  {
252
  // Always ignore verification code in admin ordering
@@ -267,7 +271,7 @@ class SFC_Autoship_Model_Payment_Method extends Mage_Payment_Model_Method_Cc
267
  */
268
  public function validate()
269
  {
270
- //Don't validate if we're in the API
271
  if (Mage::app()->getFrontController()->getRequest()->getModuleName() == 'api') {
272
  return true;
273
  }
@@ -277,7 +281,8 @@ class SFC_Autoship_Model_Payment_Method extends Mage_Payment_Model_Method_Cc
277
  throw new SFC_Autoship_Helper_PaymentError_Exception(Mage::helper("autoship")->__('Payment form field: \'' . $field . '\' is missing from POST!'));
278
  }
279
  }
280
- //We are letting vault do any additional validation
 
281
  return true;
282
  }
283
 
@@ -289,10 +294,10 @@ class SFC_Autoship_Model_Payment_Method extends Mage_Payment_Model_Method_Cc
289
  protected function _getValidateFields(Mage_Payment_Model_Info $infoInstance)
290
  {
291
  if ($infoInstance->getAdditionalInformation('is_third_party')) {
292
- //If third party we'll only be validating the cc & token
293
  $_required_keys = array('cc_number', 'additional_information/payment_token');
294
  } else {
295
- //Otherwise validate all fields provided
296
  $_required_keys = array('cc_number', 'cc_exp_month', 'cc_exp_year', 'additional_information/payment_token');
297
  if ($this->hasVerification()) {
298
  $_required_keys[] = 'cc_cid';
@@ -327,8 +332,7 @@ class SFC_Autoship_Model_Payment_Method extends Mage_Payment_Model_Method_Cc
327
  public function authorize(Varien_Object $payment, $amount)
328
  {
329
  // Log
330
- Mage::log('====== SFC_Autoship_Model_Payment_Method::authorize called ======', Zend_Log::INFO,
331
- SFC_Autoship_Helper_Data::LOG_FILE);
332
 
333
  /** @var SFC_Autoship_Helper_Vault $vaultHelper */
334
  $vaultHelper = Mage::helper('autoship/vault');
@@ -345,17 +349,20 @@ class SFC_Autoship_Model_Payment_Method extends Mage_Payment_Model_Method_Cc
345
  $store = Mage::app()->getWebsite($customer->getData('website_id'))->getDefaultStore();
346
  $apiHelper->setConfigStore($store);
347
  // Check if we should do profile transaction or one-time transaction
348
- if ($payment->getAdditionalInformation('save_card') == '1' || $payment->getAdditionalInformation('is_new_card') != '1') {
 
 
 
349
  // We are using existing pay profile or storing new one
350
  // Get payment profile
351
- $paymentProfile = $this->_createOrFetchPaymentProfile(
352
  $payment,
353
  $order->getBillingAddress(),
354
  $payment->getData('cc_exp_month'),
355
  $payment->getData('cc_exp_year'));
356
- // Create transaction
357
  if ($amount > 0.00) {
358
- //Authorize if positive amount
359
  $platformTransaction = $vaultHelper->authorize(
360
  $paymentProfile,
361
  $amount,
@@ -367,8 +374,8 @@ class SFC_Autoship_Model_Payment_Method extends Mage_Payment_Model_Method_Cc
367
  )
368
  );
369
  } else {
370
- //Otherwise verify
371
- Mage::log('====== SFC_Autoship_Model_Payment_Method::authorize called, but only verifying due to $0.00! ======', Zend_Log::INFO, SFC_Autoship_Helper_Data::LOG_FILE);
372
  $platformTransaction = $vaultHelper->verify(
373
  $paymentProfile,
374
  $order->getData('base_currency_code'),
@@ -381,8 +388,7 @@ class SFC_Autoship_Model_Payment_Method extends Mage_Payment_Model_Method_Cc
381
  }
382
  }
383
  else {
384
-
385
- //Don't allow $0.00 for a one-time purchase, should use the 'free' method
386
  if ($amount <= 0) {
387
  Mage::throwException(Mage::helper('autoship')->__('Invalid amount for authorization.'));
388
  }
@@ -435,171 +441,311 @@ class SFC_Autoship_Model_Payment_Method extends Mage_Payment_Model_Method_Cc
435
  return $this;
436
  }
437
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
438
  /**
439
- * Send capture request to gateway
440
  *
441
  * @param Mage_Payment_Model_Info|\Varien_Object $payment
442
- * @param float $amount
443
  * @return $this
444
  */
445
- public function capture(Varien_Object $payment, $amount)
446
  {
447
  // Log
448
- Mage::log('====== SFC_Autoship_Model_Payment_Method::capture called ======', Zend_Log::INFO, SFC_Autoship_Helper_Data::LOG_FILE);
449
 
450
  /** @var SFC_Autoship_Helper_Vault $vaultHelper */
451
  $vaultHelper = Mage::helper('autoship/vault');
452
  /** @var SFC_Autoship_Helper_Api $apiHelper */
453
  $apiHelper = Mage::helper('autoship/api');
454
 
455
- // Check if we're doing an auth n capture transaction or if we are just capturing and already auth'd transaction
456
- // Look for a value in cc_trans_id and also that the saved payment_action was 'authorize'
457
- if (strlen($payment->getData('cc_trans_id')) > 0 && $payment->getAdditionalInformation('transaction_type') == 'Authorization') {
 
 
458
 
459
- if ($amount <= 0) {
460
- //Don't allow prior auth capture for $0.00 transaction?
461
- Mage::throwException(Mage::helper('autoship')->__('Invalid amount for capture.'));
462
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
463
 
464
- /*
465
- * We are doing PriorAuthCapture here...
466
- */
467
-
468
- // Get order, etc from $payment
469
- /** @var Mage_Sales_Model_Order $order */
470
- $order = $payment->getOrder();
471
-
472
- // Set website / store for config on API helper
473
- $store = Mage::app()->getStore($payment->getOrder()->getStoreId());
474
- $apiHelper->setConfigStore($store);
475
-
476
- // Use API to create a new prior auth-capture transaction
477
- $platformTransaction = $vaultHelper->capture($payment->getCcTransId(), $amount, $order->getData('base_currency_code'));
478
-
479
- // Save transaction details in $payment
480
- $payment
481
- ->setIsTransactionClosed(0)
482
- ->setParentTransactionId($payment->getData('cc_trans_id'))
483
- ->setTransactionId($platformTransaction['id'])
484
- // ->setParentTransactionId($payment->getData('cc_trans_id'))
485
- // ->setCcTransId($platformTransaction['id'])
486
- // ->setTransactionId($platformTransaction['id'])
487
- // ->setAdditionalInformation('transaction_token', $platformTransaction['token'])
488
- // ->setAdditionalInformation('gateway_transaction_id', $platformTransaction['gateway_transaction_id'])
489
- // ->setAdditionalInformation('transaction_type', $platformTransaction['type'])
490
  ;
491
- // Save AVS and CVV results when available
492
- if ($payment instanceof Mage_Sales_Model_Order_Payment) {
493
- if (isset($platformTransaction['avs_code'])) {
494
- $payment->setCcAvsStatus($platformTransaction['avs_code']);
495
- }
496
- if (isset($platformTransaction['cvv_code'])) {
497
- $payment->setCcCidStatus($platformTransaction['cvv_code']);
498
- }
 
 
 
 
 
 
 
 
 
 
 
 
499
  }
500
- // Create transaction
501
- $payment->addTransaction(Mage_Sales_Model_Order_Payment_Transaction::TYPE_CAPTURE);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
502
  }
503
  else {
504
- /*
505
- * We are doing AuthCapture (also known as purchase) transaction here...
506
- */
507
-
508
- // Get order, etc from $payment
509
- /** @var Mage_Sales_Model_Order $order */
510
- $order = $payment->getOrder();
511
- /** @var Mage_Customer_Model_Customer $customer */
512
- $customer = $order->getCustomer();
513
-
514
- // Set website / store for config on API helper
515
- $store = Mage::app()->getWebsite($customer->getData('website_id'))->getDefaultStore();
516
- $apiHelper->setConfigStore($store);
517
- // Check if we should do profile transaction or one-time transaction
518
- if ($payment->getAdditionalInformation('save_card') == '1' || $payment->getAdditionalInformation('is_new_card') != '1') {
519
- // We are using existing pay profile or storing new one
520
- // Get payment profile
521
- $paymentProfile = $this->_createOrFetchPaymentProfile(
522
- $payment,
523
- $order->getBillingAddress(),
524
- $payment->getData('cc_exp_month'),
525
- $payment->getData('cc_exp_year'));
526
- // Create transaction
527
- if ($amount > 0) {
528
- //Capture if positive amount
529
- $platformTransaction = $vaultHelper->purchase(
530
- $paymentProfile,
531
- $amount,
532
- $order->getData('base_currency_code'),
533
- array(
534
- 'email' => $order->getCustomerEmail(),
535
- 'order_id' => $order->getIncrementId(),
536
- 'ip' => $order->getRemoteIp(),
537
- )
538
- );
539
- } else {
540
- //Otherwise just verify the card
541
- Mage::log('====== SFC_Autoship_Model_Payment_Method::capture called, but only verifying due to $0.00! ======', Zend_Log::INFO, SFC_Autoship_Helper_Data::LOG_FILE);
542
- $platformTransaction = $vaultHelper->verify(
543
- $paymentProfile,
544
- $order->getData('base_currency_code'),
545
- array(
546
- 'email' => $order->getCustomerEmail(),
547
- 'order_id' => $order->getIncrementId(),
548
- 'ip' => $order->getRemoteIp(),
549
- )
550
- );
551
- }
 
 
 
 
 
 
 
552
  }
553
- else {
554
- if ($amount <= 0) {
555
- //Don't allow $0.00 auth for one-time purchase, should use 'free' method
556
- Mage::throwException(Mage::helper('autoship')->__('Invalid amount for capture.'));
557
- }
558
- // Create one-time purchase transaction
559
- $platformTransaction = $vaultHelper->purchaseOneTime(
560
- $payment->getAdditionalInformation('payment_token'),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
561
  $amount,
562
  $order->getData('base_currency_code'),
563
  array(
564
  'email' => $order->getCustomerEmail(),
565
  'order_id' => $order->getIncrementId(),
566
  'ip' => $order->getRemoteIp(),
567
- ),
568
- $order->getBillingAddress(),
569
- $payment->getData('cc_exp_month'),
570
- $payment->getData('cc_exp_year')
 
 
 
 
 
 
 
 
 
571
  );
572
- // Save cc type in $payment
573
- $ccType = $vaultHelper->mapSubscribeProCardTypeToMagento($platformTransaction['creditcard_type'], false);
574
- if (strlen($ccType)) {
575
- $payment->setCcType($ccType);
576
- }
577
  }
578
-
579
- // Save transaction details in $payment
580
- $payment
581
- ->setIsTransactionClosed(0)
582
- ->setCcTransId($platformTransaction['id'])
583
- ->setTransactionId($platformTransaction['id'])
584
- ->setAdditionalInformation('transaction_token', $platformTransaction['token'])
585
- ->setAdditionalInformation('gateway_transaction_id', $platformTransaction['gateway_transaction_id'])
586
- ->setAdditionalInformation('transaction_type', $platformTransaction['type'])
587
- ;
588
- // Save AVS and CVV results when available
589
- if ($payment instanceof Mage_Sales_Model_Order_Payment) {
590
- if (isset($platformTransaction['avs_code'])) {
591
- $payment->setCcAvsStatus($platformTransaction['avs_code']);
592
- }
593
- if (isset($platformTransaction['cvv_code'])) {
594
- $payment->setCcCidStatus($platformTransaction['cvv_code']);
595
- }
 
 
 
 
 
 
596
  }
597
- // Create transaction
598
- $payment->addTransaction(Mage_Sales_Model_Order_Payment_Transaction::TYPE_CAPTURE);
599
-
600
  }
601
 
602
- return $this;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
603
  }
604
 
605
  /**
@@ -611,7 +757,7 @@ class SFC_Autoship_Model_Payment_Method extends Mage_Payment_Model_Method_Cc
611
  public function void(Varien_Object $payment)
612
  {
613
  // Log
614
- Mage::log('====== SFC_Autoship_Model_Payment_Method::void called ======', Zend_Log::INFO, SFC_Autoship_Helper_Data::LOG_FILE);
615
 
616
  /** @var SFC_Autoship_Helper_Vault $vaultHelper */
617
  $vaultHelper = Mage::helper('autoship/vault');
@@ -628,9 +774,12 @@ class SFC_Autoship_Model_Payment_Method extends Mage_Payment_Model_Method_Cc
628
  // Save transaction details in $payment
629
  // Field cc_trans_id in payment should hold the single authorize trans id and then the single capture trans id
630
  // (or just the single auth n capture trans id)
 
 
 
631
  $payment
632
- ->setIsTransactionClosed(1)
633
- ->setShouldCloseParentTransaction(1)
634
  ->setParentTransactionId($payment->getData('cc_trans_id'))
635
  ->setTransactionId($platformTransaction['id']);
636
  // Create transaction
@@ -650,7 +799,7 @@ class SFC_Autoship_Model_Payment_Method extends Mage_Payment_Model_Method_Cc
650
  public function cancel(Varien_Object $payment)
651
  {
652
  // Log
653
- Mage::log('====== SFC_Autoship_Model_Payment_Method::cancel called ======', Zend_Log::INFO, SFC_Autoship_Helper_Data::LOG_FILE);
654
 
655
  return $this->void($payment);
656
  }
@@ -665,7 +814,7 @@ class SFC_Autoship_Model_Payment_Method extends Mage_Payment_Model_Method_Cc
665
  public function refund(Varien_Object $payment, $requestedAmount)
666
  {
667
  // Log
668
- Mage::log('====== SFC_Autoship_Model_Payment_Method::refund called ======', Zend_Log::INFO, SFC_Autoship_Helper_Data::LOG_FILE);
669
 
670
  /** @var SFC_Autoship_Helper_Vault $vaultHelper */
671
  $vaultHelper = Mage::helper('autoship/vault');
@@ -680,21 +829,32 @@ class SFC_Autoship_Model_Payment_Method extends Mage_Payment_Model_Method_Cc
680
  /** @var Mage_Sales_Model_Order $order */
681
  $order = $payment->getOrder();
682
 
 
 
 
 
 
 
 
 
683
  // Use API to create a new prior auth-capture transaction
684
- $platformTransaction = $vaultHelper->credit($payment->getCcTransId(), $requestedAmount, $order->getData('base_currency_code'));
685
 
686
  /**
687
  * Duplicate logic from standard Authorize.net payment method:
688
  * This means that we should close the parent transaction if we have refunded the full amount of original transaction
689
  */
690
  $shouldCloseRefundTransaction = 0;
691
- if ($this->_formatAmount($payment->getAmountPaid() - $payment->getAmountRefunded()) == $this->_formatAmount($requestedAmount)) {
692
  $shouldCloseRefundTransaction = 1;
693
  }
694
 
695
  // Save transaction details in $payment
696
  // Field cc_trans_id in payment should hold the single original (purchase or capture) trans id
697
  // (or just the single auth n capture trans id)
 
 
 
698
  $payment
699
  ->setIsTransactionClosed(1)
700
  ->setShouldCloseParentTransaction($shouldCloseRefundTransaction)
@@ -708,8 +868,11 @@ class SFC_Autoship_Model_Payment_Method extends Mage_Payment_Model_Method_Cc
708
  return $this;
709
  }
710
 
711
-
712
- protected function createNewPaymentToken(Mage_Sales_Model_Quote $quote, $data)
 
 
 
713
  {
714
 
715
  /** @var SFC_Autoship_Helper_Vault $vaultHelper */
@@ -742,10 +905,10 @@ class SFC_Autoship_Model_Payment_Method extends Mage_Payment_Model_Method_Cc
742
  * @throws Mage_Core_Exception
743
  * @throws SFC_Autoship_Helper_PaymentError_Exception
744
  */
745
- protected function _createOrFetchPaymentProfile(Varien_Object $payment, Mage_Customer_Model_Address_Abstract $billingAddress, $expMonth, $expYear)
746
  {
747
  // Log
748
- Mage::log('_createOrFetchPaymentProfile()', Zend_Log::INFO, SFC_Autoship_Helper_Data::LOG_FILE);
749
 
750
  /** @var SFC_Autoship_Helper_Vault $vaultHelper */
751
  $vaultHelper = Mage::helper('autoship/vault');
@@ -758,6 +921,10 @@ class SFC_Autoship_Model_Payment_Method extends Mage_Payment_Model_Method_Cc
758
  /** @var Mage_Customer_Model_Customer $customer */
759
  $customer = $order->getCustomer();
760
 
 
 
 
 
761
  try {
762
  // Get payment token
763
  $paymentToken = $payment->getAdditionalInformation('payment_token');
@@ -824,6 +991,39 @@ class SFC_Autoship_Model_Payment_Method extends Mage_Payment_Model_Method_Cc
824
  }
825
  }
826
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
827
  protected function updatePaymentProfile(SFC_Autoship_Model_Payment_Profile $paymentProfile, Mage_Customer_Model_Address_Abstract $billingAddress, $expMonth, $expYear)
828
  {
829
  /** @var SFC_Autoship_Helper_Vault $vaultHelper */
@@ -845,7 +1045,7 @@ class SFC_Autoship_Model_Payment_Method extends Mage_Payment_Model_Method_Cc
845
  * @param bool $asFloat
846
  * @return string|float
847
  */
848
- protected function _formatAmount($amount, $asFloat = false)
849
  {
850
  $amount = sprintf('%.2F', $amount); // 'f' depends on locale, 'F' doesn't
851
  return $asFloat ? (float)$amount : $amount;
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
20
 
21
  class SFC_Autoship_Model_Payment_Method extends Mage_Payment_Model_Method_Cc
22
  {
23
+
24
  const METHOD_CODE = 'subscribe_pro';
25
  const METHOD_CODE_KEY_TOKEN = '_token_';
26
 
235
  /** @var SFC_Autoship_Helper_Quote $quoteHelper */
236
  $quoteHelper = Mage::helper('autoship/quote');
237
 
238
+ if ($quoteHelper->hasProductsToCreateNewSubscription($quote) || $quoteHelper->hasSubscriptionReorderProduct($quote)) {
239
+ // Remove the check for zero dollar checkout on this method, as its code is not 'free' but it does support zero dollar checkout
240
  if ($checksBitMask) {
241
  $checksBitMask = $checksBitMask & ~self::CHECK_ZERO_TOTAL;
242
  }
248
  return parent::isApplicableToQuote($quote, $checksBitMask);
249
  }
250
 
251
+ /**
252
+ * @return bool
253
+ */
254
  public function hasVerification()
255
  {
256
  // Always ignore verification code in admin ordering
271
  */
272
  public function validate()
273
  {
274
+ // Don't validate if we're in the API
275
  if (Mage::app()->getFrontController()->getRequest()->getModuleName() == 'api') {
276
  return true;
277
  }
281
  throw new SFC_Autoship_Helper_PaymentError_Exception(Mage::helper("autoship")->__('Payment form field: \'' . $field . '\' is missing from POST!'));
282
  }
283
  }
284
+
285
+ // We are letting vault do any additional validation
286
  return true;
287
  }
288
 
294
  protected function _getValidateFields(Mage_Payment_Model_Info $infoInstance)
295
  {
296
  if ($infoInstance->getAdditionalInformation('is_third_party')) {
297
+ // If third party we'll only be validating the cc & token
298
  $_required_keys = array('cc_number', 'additional_information/payment_token');
299
  } else {
300
+ // Otherwise validate all fields provided
301
  $_required_keys = array('cc_number', 'cc_exp_month', 'cc_exp_year', 'additional_information/payment_token');
302
  if ($this->hasVerification()) {
303
  $_required_keys[] = 'cc_cid';
332
  public function authorize(Varien_Object $payment, $amount)
333
  {
334
  // Log
335
+ SFC_Autoship::log('====== SFC_Autoship_Model_Payment_Method::authorize called ======', Zend_Log::INFO);
 
336
 
337
  /** @var SFC_Autoship_Helper_Vault $vaultHelper */
338
  $vaultHelper = Mage::helper('autoship/vault');
349
  $store = Mage::app()->getWebsite($customer->getData('website_id'))->getDefaultStore();
350
  $apiHelper->setConfigStore($store);
351
  // Check if we should do profile transaction or one-time transaction
352
+ if (($this->getConfigData('always_save_card') == 1 && strlen($customer->getId()))
353
+ || $payment->getAdditionalInformation('save_card') == '1'
354
+ || $payment->getAdditionalInformation('is_new_card') != '1')
355
+ {
356
  // We are using existing pay profile or storing new one
357
  // Get payment profile
358
+ $paymentProfile = $this->createOrFetchPaymentProfile(
359
  $payment,
360
  $order->getBillingAddress(),
361
  $payment->getData('cc_exp_month'),
362
  $payment->getData('cc_exp_year'));
363
+ // Create authorization transaction
364
  if ($amount > 0.00) {
365
+ // Authorize if positive amount
366
  $platformTransaction = $vaultHelper->authorize(
367
  $paymentProfile,
368
  $amount,
374
  )
375
  );
376
  } else {
377
+ // Otherwise verify
378
+ SFC_Autoship::log('====== SFC_Autoship_Model_Payment_Method::authorize called, but only verifying due to $0.00! ======', Zend_Log::INFO);
379
  $platformTransaction = $vaultHelper->verify(
380
  $paymentProfile,
381
  $order->getData('base_currency_code'),
388
  }
389
  }
390
  else {
391
+ // Don't allow $0.00 for a one-time purchase, should use the 'free' method
 
392
  if ($amount <= 0) {
393
  Mage::throwException(Mage::helper('autoship')->__('Invalid amount for authorization.'));
394
  }
441
  return $this;
442
  }
443
 
444
+ public function canReauthorize(Varien_Object $payment)
445
+ {
446
+ // Only allow for authorize only payments
447
+ if ($this->paymentWasAuthorizeOnly($payment)) {
448
+ // Only allow when there is still outstanding balance
449
+ if ($payment->getAmountPaid() < $payment->getAmountOrdered()) {
450
+ // Only allow when payment profile was saved
451
+ if (strlen($payment->getAdditionalInformation('payment_profile_id'))) {
452
+ // All checks passed, return true
453
+ return true;
454
+ }
455
+ }
456
+
457
+ }
458
+
459
+ // Otherwise return false
460
+ return false;
461
+ }
462
+
463
  /**
464
+ * Create a new authorization to replace the existing one
465
  *
466
  * @param Mage_Payment_Model_Info|\Varien_Object $payment
 
467
  * @return $this
468
  */
469
+ public function reauthorize(Varien_Object $payment, $amount)
470
  {
471
  // Log
472
+ SFC_Autoship::log('====== SFC_Autoship_Model_Payment_Method::reauthorize called ======', Zend_Log::INFO);
473
 
474
  /** @var SFC_Autoship_Helper_Vault $vaultHelper */
475
  $vaultHelper = Mage::helper('autoship/vault');
476
  /** @var SFC_Autoship_Helper_Api $apiHelper */
477
  $apiHelper = Mage::helper('autoship/api');
478
 
479
+ // Get order, etc from $payment
480
+ /** @var Mage_Sales_Model_Order $order */
481
+ $order = $payment->getOrder();
482
+ /** @var Mage_Customer_Model_Customer $customer */
483
+ $customer = Mage::getModel('customer/customer')->load($order->getData('customer_id'));
484
 
485
+ // Set website / store for config on API helper
486
+ $store = Mage::app()->getWebsite($customer->getData('website_id'))->getDefaultStore();
487
+ $apiHelper->setConfigStore($store);
488
+
489
+ // Check for original authorize transaction, otherwise we can't re-auth
490
+ if (!$this->paymentWasAuthorizeOnly($payment)) {
491
+ Mage::throwException(Mage::helper('autoship')->__('Reauthorize only allowed on authorize-only transactions!'));
492
+ }
493
+
494
+ // Reauthorize is only valid if the original auth was against a transaction with a saved CC / payment profile
495
+ $paymentProfile = $this->fetchExistingPaymentProfile($payment);
496
+ if (!$paymentProfile instanceof SFC_Autoship_Model_Payment_Profile) {
497
+ Mage::throwException(Mage::helper('autoship')->__('Existing payment profile required for re-authorization!'));
498
+ }
499
+
500
+ // Create new authorization transaction
501
+ if ($amount > 0.00) {
502
+ // Authorize if positive amount
503
+ $platformTransaction = $vaultHelper->authorize(
504
+ $paymentProfile,
505
+ $amount,
506
+ $order->getData('base_currency_code'),
507
+ array(
508
+ 'email' => $order->getCustomerEmail(),
509
+ 'order_id' => $order->getIncrementId(),
510
+ 'ip' => $order->getRemoteIp(),
511
+ )
512
+ );
513
+ } else {
514
+ // Otherwise verify
515
+ SFC_Autoship::log('====== SFC_Autoship_Model_Payment_Method::reauthorize called, but only verifying due to $0.00! ======', Zend_Log::INFO);
516
+ $platformTransaction = $vaultHelper->verify(
517
+ $paymentProfile,
518
+ $order->getData('base_currency_code'),
519
+ array(
520
+ 'email' => $order->getCustomerEmail(),
521
+ 'order_id' => $order->getIncrementId(),
522
+ 'ip' => $order->getRemoteIp(),
523
+ )
524
+ );
525
+ }
526
 
527
+ // Save transaction details in $payment
528
+ // Create extra transaction record
529
+ $payment
530
+ ->setIsTransactionClosed(false)
531
+ ->setParentTransactionId($payment->getData('cc_trans_id'))
532
+ ->setTransactionId($platformTransaction['id'])
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
533
  ;
534
+ $payment->addTransaction(Mage_Sales_Model_Order_Payment_Transaction::TYPE_AUTH, null, true);
535
+
536
+ // Replace original transaction so this looks like the original auth, so any future voids or captures are done
537
+ $payment
538
+ ->setCcTransId($platformTransaction['id'])
539
+ ;
540
+ // with this as the reference transaction
541
+ // Save extra SP transaction fields
542
+ $payment
543
+ ->setAdditionalInformation('transaction_token', $platformTransaction['token'])
544
+ ->setAdditionalInformation('gateway_transaction_id', $platformTransaction['gateway_transaction_id'])
545
+ ->setAdditionalInformation('transaction_type', $platformTransaction['type'])
546
+ ;
547
+ // Save AVS and CVV results when available
548
+ if ($payment instanceof Mage_Sales_Model_Order_Payment) {
549
+ if (isset($platformTransaction['avs_code'])) {
550
+ $payment->setCcAvsStatus($platformTransaction['avs_code']);
551
+ }
552
+ if (isset($platformTransaction['cvv_code'])) {
553
+ $payment->setCcCidStatus($platformTransaction['cvv_code']);
554
  }
555
+ }
556
+
557
+ return $this;
558
+ }
559
+
560
+ /**
561
+ * Send capture request to gateway
562
+ *
563
+ * @param Mage_Payment_Model_Info|\Varien_Object $payment
564
+ * @param float $amount
565
+ * @return $this
566
+ */
567
+ public function capture(Varien_Object $payment, $amount)
568
+ {
569
+ // Log
570
+ SFC_Autoship::log('====== SFC_Autoship_Model_Payment_Method::capture called ======', Zend_Log::INFO);
571
+
572
+ // Check if we're doing an auth-and-capture (purchase) transaction or if we are just capturing an already auth'd transaction
573
+ // Look for a value in cc_trans_id and also that the saved transaction_type was 'Authorization'
574
+ if ($this->paymentWasAuthorizeOnly($payment)) {
575
+ // We are doing PriorAuthCapture here...
576
+ $this->priorAuthCapture($payment, $amount);
577
  }
578
  else {
579
+ // We are doing auth-and-capture (purchase) transaction here...
580
+ $this->purchase($payment, $amount);
581
+ }
582
+
583
+ return $this;
584
+ }
585
+
586
+ public function paymentWasAuthorizeOnly(Varien_Object $payment)
587
+ {
588
+ return (strlen($payment->getData('cc_trans_id')) > 0 && $payment->getAdditionalInformation('transaction_type') == 'Authorization');
589
+ }
590
+
591
+ /**
592
+ * Send capture request to gateway for existing authorization
593
+ *
594
+ * @param Mage_Payment_Model_Info|\Varien_Object $payment
595
+ * @param float $amount
596
+ */
597
+ protected function priorAuthCapture(Varien_Object $payment, $amount)
598
+ {
599
+ /** @var SFC_Autoship_Helper_Vault $vaultHelper */
600
+ $vaultHelper = Mage::helper('autoship/vault');
601
+ /** @var SFC_Autoship_Helper_Api $apiHelper */
602
+ $apiHelper = Mage::helper('autoship/api');
603
+
604
+ if ($amount <= 0) {
605
+ // Don't allow prior auth capture for $0.00 transaction
606
+ Mage::throwException(Mage::helper('autoship')->__('Invalid amount for capture.'));
607
+ }
608
+
609
+ // Get order, etc from $payment
610
+ /** @var Mage_Sales_Model_Order $order */
611
+ $order = $payment->getOrder();
612
+
613
+ // Set website / store for config on API helper
614
+ $store = Mage::app()->getStore($order->getStoreId());
615
+ $apiHelper->setConfigStore($store);
616
+
617
+ // Use API to create a new prior auth-capture transaction
618
+ $platformTransaction = $vaultHelper->capture($payment->getData('cc_trans_id'), $amount, $order->getData('base_currency_code'));
619
+
620
+ // Save transaction details in $payment
621
+ // 'cc_trans_id', and additional_information fields 'token', 'gateway_transaction_id' and 'type' will
622
+ // continue to point to the original Auth transaction
623
+ $payment
624
+ ->setIsTransactionClosed(0)
625
+ ->setParentTransactionId($payment->getData('cc_trans_id'))
626
+ ->setTransactionId($platformTransaction['id'])
627
+ ;
628
+ // Create transaction
629
+ $payment->addTransaction(Mage_Sales_Model_Order_Payment_Transaction::TYPE_CAPTURE);
630
+ // Save AVS and CVV results when available
631
+ if ($payment instanceof Mage_Sales_Model_Order_Payment) {
632
+ if (isset($platformTransaction['avs_code'])) {
633
+ $payment->setCcAvsStatus($platformTransaction['avs_code']);
634
  }
635
+ if (isset($platformTransaction['cvv_code'])) {
636
+ $payment->setCcCidStatus($platformTransaction['cvv_code']);
637
+ }
638
+ }
639
+ }
640
+
641
+ /**
642
+ * Send purchase request to gateway or just verify for $0 order.
643
+ * Select between a transaction against a saved card (payment profile) or a "one-time" transaction.
644
+ *
645
+ * @param Mage_Payment_Model_Info|\Varien_Object $payment
646
+ * @param float $amount
647
+ */
648
+ protected function purchase(Varien_Object $payment, $amount)
649
+ {
650
+ /** @var SFC_Autoship_Helper_Vault $vaultHelper */
651
+ $vaultHelper = Mage::helper('autoship/vault');
652
+ /** @var SFC_Autoship_Helper_Api $apiHelper */
653
+ $apiHelper = Mage::helper('autoship/api');
654
+
655
+ // Get order, etc from $payment
656
+ /** @var Mage_Sales_Model_Order $order */
657
+ $order = $payment->getOrder();
658
+ /** @var Mage_Customer_Model_Customer $customer */
659
+ $customer = $order->getCustomer();
660
+
661
+ // Set website / store for config on API helper
662
+ $store = Mage::app()->getWebsite($customer->getData('website_id'))->getDefaultStore();
663
+ $apiHelper->setConfigStore($store);
664
+ // Check if we should do profile transaction or one-time transaction
665
+ if (($this->getConfigData('always_save_card') == 1 && strlen($customer->getId()))
666
+ || $payment->getAdditionalInformation('save_card') == '1'
667
+ || $payment->getAdditionalInformation('is_new_card') != '1')
668
+ {
669
+ // We are using existing pay profile or storing new one
670
+ // Get payment profile
671
+ $paymentProfile = $this->createOrFetchPaymentProfile(
672
+ $payment,
673
+ $order->getBillingAddress(),
674
+ $payment->getData('cc_exp_month'),
675
+ $payment->getData('cc_exp_year'));
676
+ // Create purchase transaction
677
+ if ($amount > 0) {
678
+ // Capture (purchase) if positive amount
679
+ $platformTransaction = $vaultHelper->purchase(
680
+ $paymentProfile,
681
  $amount,
682
  $order->getData('base_currency_code'),
683
  array(
684
  'email' => $order->getCustomerEmail(),
685
  'order_id' => $order->getIncrementId(),
686
  'ip' => $order->getRemoteIp(),
687
+ )
688
+ );
689
+ } else {
690
+ // Otherwise just verify the card
691
+ SFC_Autoship::log('====== SFC_Autoship_Model_Payment_Method::capture called, but only verifying due to $0.00! ======', Zend_Log::INFO);
692
+ $platformTransaction = $vaultHelper->verify(
693
+ $paymentProfile,
694
+ $order->getData('base_currency_code'),
695
+ array(
696
+ 'email' => $order->getCustomerEmail(),
697
+ 'order_id' => $order->getIncrementId(),
698
+ 'ip' => $order->getRemoteIp(),
699
+ )
700
  );
 
 
 
 
 
701
  }
702
+ }
703
+ else {
704
+ if ($amount <= 0) {
705
+ // Don't allow $0.00 auth for one-time purchase, should use 'free' method
706
+ Mage::throwException(Mage::helper('autoship')->__('Invalid amount for capture.'));
707
+ }
708
+ // Create one-time purchase transaction
709
+ $platformTransaction = $vaultHelper->purchaseOneTime(
710
+ $payment->getAdditionalInformation('payment_token'),
711
+ $amount,
712
+ $order->getData('base_currency_code'),
713
+ array(
714
+ 'email' => $order->getCustomerEmail(),
715
+ 'order_id' => $order->getIncrementId(),
716
+ 'ip' => $order->getRemoteIp(),
717
+ ),
718
+ $order->getBillingAddress(),
719
+ $payment->getData('cc_exp_month'),
720
+ $payment->getData('cc_exp_year')
721
+ );
722
+ // Save cc type in $payment
723
+ $ccType = $vaultHelper->mapSubscribeProCardTypeToMagento($platformTransaction['creditcard_type'], false);
724
+ if (strlen($ccType)) {
725
+ $payment->setCcType($ccType);
726
  }
 
 
 
727
  }
728
 
729
+ // Save transaction details in $payment
730
+ $payment
731
+ ->setIsTransactionClosed(0)
732
+ ->setCcTransId($platformTransaction['id'])
733
+ ->setTransactionId($platformTransaction['id'])
734
+ ->setAdditionalInformation('transaction_token', $platformTransaction['token'])
735
+ ->setAdditionalInformation('gateway_transaction_id', $platformTransaction['gateway_transaction_id'])
736
+ ->setAdditionalInformation('transaction_type', $platformTransaction['type'])
737
+ ;
738
+ // Save AVS and CVV results when available
739
+ if ($payment instanceof Mage_Sales_Model_Order_Payment) {
740
+ if (isset($platformTransaction['avs_code'])) {
741
+ $payment->setCcAvsStatus($platformTransaction['avs_code']);
742
+ }
743
+ if (isset($platformTransaction['cvv_code'])) {
744
+ $payment->setCcCidStatus($platformTransaction['cvv_code']);
745
+ }
746
+ }
747
+ // Create transaction record on order / payment
748
+ $payment->addTransaction(Mage_Sales_Model_Order_Payment_Transaction::TYPE_CAPTURE);
749
  }
750
 
751
  /**
757
  public function void(Varien_Object $payment)
758
  {
759
  // Log
760
+ SFC_Autoship::log('====== SFC_Autoship_Model_Payment_Method::void called ======', Zend_Log::INFO);
761
 
762
  /** @var SFC_Autoship_Helper_Vault $vaultHelper */
763
  $vaultHelper = Mage::helper('autoship/vault');
774
  // Save transaction details in $payment
775
  // Field cc_trans_id in payment should hold the single authorize trans id and then the single capture trans id
776
  // (or just the single auth n capture trans id)
777
+ //
778
+ // 'cc_trans_id', and additional_information fields 'token', 'gateway_transaction_id' and 'type' will
779
+ // continue to point to the original Auth transaction
780
  $payment
781
+ ->setIsTransactionClosed(true)
782
+ ->setShouldCloseParentTransaction(true)
783
  ->setParentTransactionId($payment->getData('cc_trans_id'))
784
  ->setTransactionId($platformTransaction['id']);
785
  // Create transaction
799
  public function cancel(Varien_Object $payment)
800
  {
801
  // Log
802
+ SFC_Autoship::log('====== SFC_Autoship_Model_Payment_Method::cancel called ======', Zend_Log::INFO);
803
 
804
  return $this->void($payment);
805
  }
814
  public function refund(Varien_Object $payment, $requestedAmount)
815
  {
816
  // Log
817
+ SFC_Autoship::log('====== SFC_Autoship_Model_Payment_Method::refund called ======', Zend_Log::INFO);
818
 
819
  /** @var SFC_Autoship_Helper_Vault $vaultHelper */
820
  $vaultHelper = Mage::helper('autoship/vault');
829
  /** @var Mage_Sales_Model_Order $order */
830
  $order = $payment->getOrder();
831
 
832
+ // Get reference transaction ID
833
+ // This should be the ID of the "purchase" transaction if auth n capture mode enabled
834
+ // This should be the ID of the "capture" transaction if auth only mode enabled, and if there was a
835
+ // prior-auth-capture run at some point
836
+ // $payment object current has a refund_transaction_id field, but this may be deprecated in future, so use parent_transaction_id
837
+ //$referenceTransactionId = $payment->getRefundTransactionId();
838
+ $referenceTransactionId = $payment->getParentTransactionId();
839
+
840
  // Use API to create a new prior auth-capture transaction
841
+ $platformTransaction = $vaultHelper->credit($referenceTransactionId, $requestedAmount, $order->getData('base_currency_code'));
842
 
843
  /**
844
  * Duplicate logic from standard Authorize.net payment method:
845
  * This means that we should close the parent transaction if we have refunded the full amount of original transaction
846
  */
847
  $shouldCloseRefundTransaction = 0;
848
+ if ($this->formatAmount($payment->getAmountPaid() - $payment->getAmountRefunded()) == $this->formatAmount($requestedAmount)) {
849
  $shouldCloseRefundTransaction = 1;
850
  }
851
 
852
  // Save transaction details in $payment
853
  // Field cc_trans_id in payment should hold the single original (purchase or capture) trans id
854
  // (or just the single auth n capture trans id)
855
+ //
856
+ // 'cc_trans_id', and additional_information fields 'token', 'gateway_transaction_id' and 'type' will
857
+ // continue to point to the original transaction
858
  $payment
859
  ->setIsTransactionClosed(1)
860
  ->setShouldCloseParentTransaction($shouldCloseRefundTransaction)
868
  return $this;
869
  }
870
 
871
+ /**
872
+ * @param Mage_Sales_Model_Quote $quote
873
+ * @param array $data
874
+ */
875
+ protected function createNewPaymentToken(Mage_Sales_Model_Quote $quote, array $data)
876
  {
877
 
878
  /** @var SFC_Autoship_Helper_Vault $vaultHelper */
905
  * @throws Mage_Core_Exception
906
  * @throws SFC_Autoship_Helper_PaymentError_Exception
907
  */
908
+ protected function createOrFetchPaymentProfile(Varien_Object $payment, Mage_Customer_Model_Address_Abstract $billingAddress, $expMonth, $expYear)
909
  {
910
  // Log
911
+ SFC_Autoship::log('createOrFetchPaymentProfile()', Zend_Log::INFO);
912
 
913
  /** @var SFC_Autoship_Helper_Vault $vaultHelper */
914
  $vaultHelper = Mage::helper('autoship/vault');
921
  /** @var Mage_Customer_Model_Customer $customer */
922
  $customer = $order->getCustomer();
923
 
924
+ if ($customer == null || !strlen($customer->getId())) {
925
+ Mage::exception("Can't save credit card because no customer is associated with order! Credit cards can't be saved with guest checkout feature.");
926
+ }
927
+
928
  try {
929
  // Get payment token
930
  $paymentToken = $payment->getAdditionalInformation('payment_token');
991
  }
992
  }
993
 
994
+ protected function fetchExistingPaymentProfile(Varien_Object $payment)
995
+ {
996
+ // Log
997
+ SFC_Autoship::log('fetchExistingPaymentProfile()', Zend_Log::INFO);
998
+
999
+ /** @var SFC_Autoship_Helper_Vault $vaultHelper */
1000
+ $vaultHelper = Mage::helper('autoship/vault');
1001
+ /** @var SFC_Autoship_Helper_Platform $platformHelper */
1002
+ $platformHelper = Mage::helper('autoship/platform');
1003
+
1004
+ // Get order, etc from $payment
1005
+ /** @var Mage_Sales_Model_Order $order */
1006
+ $order = $payment->getOrder();
1007
+ /** @var Mage_Customer_Model_Customer $customer */
1008
+ $customer = $order->getCustomer();
1009
+
1010
+ // Get payment profile id
1011
+ $paymentProfileId = $payment->getAdditionalInformation('payment_profile_id');
1012
+
1013
+ // This is an existing card, just fetch it
1014
+ // Just try to fetch it
1015
+ $paymentProfile = $vaultHelper->getPaymentProfile($paymentProfileId);
1016
+
1017
+ // Finally return the profile
1018
+ return $paymentProfile;
1019
+ }
1020
+
1021
+ /**
1022
+ * @param SFC_Autoship_Model_Payment_Profile $paymentProfile
1023
+ * @param Mage_Customer_Model_Address_Abstract $billingAddress
1024
+ * @param $expMonth
1025
+ * @param $expYear
1026
+ */
1027
  protected function updatePaymentProfile(SFC_Autoship_Model_Payment_Profile $paymentProfile, Mage_Customer_Model_Address_Abstract $billingAddress, $expMonth, $expYear)
1028
  {
1029
  /** @var SFC_Autoship_Helper_Vault $vaultHelper */
1045
  * @param bool $asFloat
1046
  * @return string|float
1047
  */
1048
+ protected function formatAmount($amount, $asFloat = false)
1049
  {
1050
  $amount = sprintf('%.2F', $amount); // 'f' depends on locale, 'F' doesn't
1051
  return $asFloat ? (float)$amount : $amount;
app/code/local/SFC/Autoship/Model/Payment/Profile.php CHANGED
@@ -9,7 +9,7 @@
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
app/code/local/SFC/Autoship/Model/Payment/Profile/Address.php CHANGED
@@ -9,7 +9,7 @@
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
app/code/local/SFC/Autoship/Model/Payment/Profile/Collection.php CHANGED
@@ -9,7 +9,7 @@
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
app/code/local/SFC/Autoship/Model/Paypal/Express.php CHANGED
@@ -9,7 +9,7 @@
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
app/code/local/SFC/Autoship/Model/Platform/Product.php CHANGED
@@ -9,7 +9,7 @@
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
app/code/local/SFC/Autoship/Model/Quote/Address.php CHANGED
@@ -9,7 +9,7 @@
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
app/code/local/SFC/Autoship/Model/SalesRule/Rule/Condition/Product.php CHANGED
@@ -9,7 +9,7 @@
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
app/code/local/SFC/Autoship/Model/SalesRule/Validator.php CHANGED
@@ -9,7 +9,7 @@
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
app/code/local/SFC/Autoship/Model/Shipping/Carrier.php ADDED
@@ -0,0 +1,165 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Subscribe Pro - Subscriptions Management Extension
4
+ *
5
+ * PHP version 5
6
+ *
7
+ * LICENSE: This source file is subject to commercial source code license of SUBSCRIBE PRO INC.
8
+ *
9
+ * @category SFC
10
+ * @package SFC_Autoship
11
+ * @author Garth Brantley <garth@subscribepro.com>
12
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
13
+ * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
+ * @link http://www.subscribepro.com/
15
+ *
16
+ */
17
+
18
+ class SFC_Autoship_Model_Shipping_Carrier
19
+ extends Mage_Shipping_Model_Carrier_Abstract
20
+ implements Mage_Shipping_Model_Carrier_Interface
21
+ {
22
+
23
+ protected $_code = 'subscribepro';
24
+
25
+
26
+ /**
27
+ * Get allowed shipping methods
28
+ *
29
+ * @return array
30
+ */
31
+ public function getAllowedMethods()
32
+ {
33
+ return array(
34
+ 'recurring' => 'Recurring Order Shipping',
35
+ );
36
+ }
37
+
38
+ /**
39
+ * Collect and get rates
40
+ *
41
+ * @abstract
42
+ * @param Mage_Shipping_Model_Rate_Request $request
43
+ * @return Mage_Shipping_Model_Rate_Result|bool|null
44
+ */
45
+ public function collectRates(Mage_Shipping_Model_Rate_Request $request)
46
+ {
47
+ /** @var Mage_Shipping_Model_Rate_Result $result */
48
+ $result = Mage::getModel('shipping/rate_result');
49
+
50
+ // Make sure SP is enabled for this store
51
+ // Check config to see if extension functionality is enabled
52
+ if (Mage::getStoreConfig('autoship_general/general/enabled', $this->getStore()) == '1') {
53
+
54
+ // Only make Subscribe Pro shipping methods available on recurring orders
55
+ // Assume recurring orders can't have multiple shipping addresses
56
+
57
+ // Get quote items from request
58
+ $items = $request->getAllItems();
59
+ // Make sure we have at least 1 item
60
+ if (count($items)) {
61
+ // Get quote from first item
62
+ /** @var Mage_Sales_Model_Quote_Item $quoteItem1 */
63
+ $quoteItem1 = $items[0];
64
+ $quote = $quoteItem1->getQuote();
65
+
66
+ /** @var SFC_Autoship_Helper_Quote $quoteHelper */
67
+ $quoteHelper = Mage::helper('autoship/quote');
68
+
69
+ // Check if quote has recurring subscription items
70
+ if ($quoteHelper->hasSubscriptionReorderProduct($quote)) {
71
+ // Make Subscribe Pro shipping method available
72
+ $result->append($this->getRate($request, $quote));
73
+ }
74
+ }
75
+ }
76
+
77
+ return $result;
78
+ }
79
+
80
+ /**
81
+ * @param Mage_Shipping_Model_Rate_Request $request
82
+ * @param Mage_Sales_Model_Quote $quote
83
+ * @return Mage_Shipping_Model_Rate_Result_Method
84
+ */
85
+ protected function getRate(Mage_Shipping_Model_Rate_Request $request, Mage_Sales_Model_Quote $quote)
86
+ {
87
+ /** @var Mage_Shipping_Model_Rate_Result_Method $rate */
88
+ $rate = Mage::getModel('shipping/rate_result_method');
89
+
90
+ // Set carrier and method codes
91
+ $rate->setCarrier($this->_code);
92
+ $rate->setMethod('recurring');
93
+
94
+ // Set cost to 0 for all Subscribe Pro shipping rate quotes
95
+ $rate->setCost(0.0);
96
+
97
+ // Implement logic to select free, standard or international shipping
98
+ // Check if this order qualifies as international
99
+ $isInternationalShipment = false;
100
+ if ($this->getConfigFlag('enable_international_shipping')) {
101
+ // Now compare request country with Magento origin country
102
+ if ($request->getDestCountryId() != Mage::getStoreConfig('shipping/origin/country_id', $this->getStore())) {
103
+ // Request country is different, this is an international shipment
104
+ $isInternationalShipment = true;
105
+ }
106
+ }
107
+
108
+ // Check if order qualifies for free shipping
109
+ $freeShippingApplies = false;
110
+ if ($this->getConfigFlag('enable_free_shipping')) {
111
+ if ($isInternationalShipment) {
112
+ $freeShippingThreshold = $this->getConfigData('free_shipping_minimum_order_total_international');
113
+ }
114
+ else {
115
+ $freeShippingThreshold = $this->getConfigData('free_shipping_minimum_order_total');
116
+ }
117
+ if ($request->getBaseSubtotalInclTax() >= $freeShippingThreshold) {
118
+ $freeShippingApplies = true;
119
+ }
120
+ }
121
+
122
+ //
123
+ // Set price on the rate quote
124
+ //
125
+ // Lookup custom price from quote and override price we have set otherwise
126
+ if ($quote->getData('subscribe_pro_custom_shipping_price') > 0.0) {
127
+ // Custom rate passed via API into quote
128
+ $shippingPrice = $quote->getData('subscribe_pro_custom_shipping_price');
129
+ }
130
+ else {
131
+ if ($freeShippingApplies) {
132
+ $shippingPrice = 0.0;
133
+ }
134
+ else {
135
+ if ($isInternationalShipment) {
136
+ $shippingPrice = $this->getConfigData('default_international_shipping_price');
137
+ }
138
+ else {
139
+ $shippingPrice = $this->getConfigData('default_standard_shipping_price');
140
+ }
141
+ }
142
+ }
143
+ $rate->setPrice($shippingPrice);
144
+
145
+ //
146
+ // Set title on rate quote
147
+ //
148
+ if ($freeShippingApplies) {
149
+ $title = $this->getConfigData('free_title');
150
+ }
151
+ else {
152
+ if ($isInternationalShipment) {
153
+ $title = $this->getConfigData('international_title');
154
+ }
155
+ else {
156
+ $title = $this->getConfigData('standard_title');
157
+ }
158
+ }
159
+ $rate->setMethodTitle($title);
160
+
161
+ // Now return the rate we built
162
+ return $rate;
163
+ }
164
+
165
+ }
app/code/local/SFC/Autoship/Model/Subscription.php CHANGED
@@ -9,7 +9,7 @@
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
app/code/local/SFC/Autoship/Model/System/Config/Source/Cartrulediscountcombinetype.php CHANGED
@@ -9,7 +9,7 @@
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
app/code/local/SFC/Autoship/Model/System/Config/Source/Cctype.php CHANGED
@@ -9,7 +9,7 @@
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
app/code/local/SFC/Autoship/Model/System/Config/Source/Loglevel.php ADDED
@@ -0,0 +1,77 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Subscribe Pro - Subscriptions Management Extension
4
+ *
5
+ * PHP version 5
6
+ *
7
+ * LICENSE: This source file is subject to commercial source code license of SUBSCRIBE PRO INC.
8
+ *
9
+ * @category SFC
10
+ * @package SFC_Autoship
11
+ * @author Garth Brantley <garth@subscribepro.com>
12
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
13
+ * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
+ * @link http://www.subscribepro.com/
15
+ *
16
+ */
17
+
18
+ class SFC_Autoship_Model_System_Config_Source_Loglevel
19
+ {
20
+
21
+ /**
22
+ * From Zend_Log docs:
23
+ *
24
+ * The Zend_Log class defines the following priorities:
25
+ * EMERG = 0; // Emergency: system is unusable
26
+ * ALERT = 1; // Alert: action must be taken immediately
27
+ * CRIT = 2; // Critical: critical conditions
28
+ * ERR = 3; // Error: error conditions
29
+ * WARN = 4; // Warning: warning conditions
30
+ * NOTICE = 5; // Notice: normal but significant condition
31
+ * INFO = 6; // Informational: informational messages
32
+ * DEBUG = 7; // Debug: debug messages
33
+ *
34
+ */
35
+
36
+ /**
37
+ * @return array
38
+ */
39
+ public function toOptionArray()
40
+ {
41
+ return array(
42
+ array(
43
+ 'value' => Zend_Log::EMERG,
44
+ 'label' => Mage::helper('autoship')->__('EMERG - Emergency'),
45
+ ),
46
+ array(
47
+ 'value' => Zend_Log::ALERT,
48
+ 'label' => Mage::helper('autoship')->__('ALERT - Alert'),
49
+ ),
50
+ array(
51
+ 'value' => Zend_Log::CRIT,
52
+ 'label' => Mage::helper('autoship')->__('CRIT - Critical'),
53
+ ),
54
+ array(
55
+ 'value' => Zend_Log::ERR,
56
+ 'label' => Mage::helper('autoship')->__('ERR - Error'),
57
+ ),
58
+ array(
59
+ 'value' => Zend_Log::WARN,
60
+ 'label' => Mage::helper('autoship')->__('WARN - Warning'),
61
+ ),
62
+ array(
63
+ 'value' => Zend_Log::NOTICE,
64
+ 'label' => Mage::helper('autoship')->__('NOTICE - Notice'),
65
+ ),
66
+ array(
67
+ 'value' => Zend_Log::INFO,
68
+ 'label' => Mage::helper('autoship')->__('INFO - Informational'),
69
+ ),
70
+ array(
71
+ 'value' => Zend_Log::DEBUG,
72
+ 'label' => Mage::helper('autoship')->__('DEBUG - Emergency'),
73
+ ),
74
+ );
75
+ }
76
+
77
+ }
app/code/local/SFC/Autoship/Model/System/Config/Source/Month.php CHANGED
@@ -9,7 +9,7 @@
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
app/code/local/SFC/Autoship/Model/System/Config/Source/Nextorderdatemode.php CHANGED
@@ -9,7 +9,7 @@
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
app/code/local/SFC/Autoship/Model/System/Config/Source/Shippingmethods.php CHANGED
@@ -9,7 +9,7 @@
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
app/code/local/SFC/Autoship/Model/System/Config/Source/Year.php CHANGED
@@ -1,17 +1,17 @@
1
  <?php
2
  /**
3
- * StoreFront CyberSource Tokenized Payment Extension for Magento
4
  *
5
  * PHP version 5
6
  *
7
- * LICENSE: This source file is subject to commercial source code license of StoreFront Consulting, Inc.
8
  *
9
  * @category SFC
10
- * @package SFC_CyberSource
11
- * @author Garth Brantley <garth@storefrontconsulting.com>
12
- * @copyright 2009-2013 StoreFront Consulting, Inc. All Rights Reserved.
13
- * @license http://www.storefrontconsulting.com/media/downloads/ExtensionLicense.pdf StoreFront Consulting Commercial License
14
- * @link http://www.storefrontconsulting.com/cybersource-saved-credit-cards-extension-for-magento/
15
  *
16
  */
17
 
@@ -50,39 +50,3 @@ class SFC_Autoship_Model_System_Config_Source_Year
50
  }
51
 
52
  }
53
-
54
- /**
55
- */
56
- class SFC_CyberSource_Model_Source_Year
57
- {
58
- /**
59
- * Retrieve Option array
60
- *
61
- * @return array
62
- */
63
- public function toOptionArray()
64
- {
65
- $years = $this->_getConfig()->getYears();
66
- $yearOptionArray = array();
67
- foreach ($years as $year) {
68
- $yearOptionArray[] = array(
69
- 'value' => $year,
70
- 'label' => Mage::helper('autoship')->__($year)
71
- );
72
-
73
- }
74
-
75
- return $yearOptionArray;
76
- }
77
-
78
- /**
79
- * Retrieve payment configuration object
80
- *
81
- * @return Mage_Payment_Model_Config
82
- */
83
- protected function _getConfig()
84
- {
85
- return Mage::getSingleton('payment/config');
86
- }
87
-
88
- }
1
  <?php
2
  /**
3
+ * Subscribe Pro - Subscriptions Management Extension
4
  *
5
  * PHP version 5
6
  *
7
+ * LICENSE: This source file is subject to commercial source code license of SUBSCRIBE PRO INC.
8
  *
9
  * @category SFC
10
+ * @package SFC_Autoship
11
+ * @author Garth Brantley <garth@subscribepro.com>
12
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
13
+ * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
+ * @link http://www.subscribepro.com/
15
  *
16
  */
17
 
50
  }
51
 
52
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/local/SFC/Autoship/controllers/Adminhtml/Sales/Order/InvoiceController.php ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Subscribe Pro - Subscriptions Management Extension
4
+ *
5
+ * PHP version 5
6
+ *
7
+ * LICENSE: This source file is subject to commercial source code license of SUBSCRIBE PRO INC.
8
+ *
9
+ * @category SFC
10
+ * @package SFC_Autoship
11
+ * @author Garth Brantley <garth@subscribepro.com>
12
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
13
+ * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
+ * @link http://www.subscribepro.com/
15
+ *
16
+ */
17
+
18
+ require_once "Mage/Adminhtml/controllers/Sales/Order/InvoiceController.php";
19
+
20
+ class SFC_Autoship_Adminhtml_Sales_Order_InvoiceController extends Mage_Adminhtml_Sales_Order_InvoiceController
21
+ {
22
+
23
+ /**
24
+ * Override - Save invoice
25
+ */
26
+ public function saveAction()
27
+ {
28
+ // Call the parent saveAction()
29
+ parent::saveAction();
30
+
31
+ // Lookup order
32
+ $orderId = $this->getRequest()->getParam('order_id');
33
+ /** @var Mage_Sales_Model_Order $order */
34
+ $order = Mage::getModel('sales/order')->load($orderId);
35
+ $payment = $order->getPayment();
36
+
37
+ // Check if automatic reauth of partial capture is turned on?
38
+ if (Mage::getStoreConfig('payment/subscribe_pro/reauthorize_partial_capture', $order->getStore()) == '1') {
39
+ // Check for SP pay method
40
+ if (0 === strpos($payment->getMethod(), SFC_Autoship_Helper_Platform::PAY_METHOD_CODE_SUBSCRIBE_PRO_VAULT)) {
41
+ // Only process for authorize only orders
42
+ /** @var SFC_Autoship_Model_Payment_Method $methodInstance */
43
+ $methodInstance = $payment->getMethodInstance();
44
+ // Check if this order / payment eligible for reauth
45
+ if ($methodInstance->canReauthorize($order->getPayment())) {
46
+ // Now reauthorize this order
47
+ Mage::helper('autoship/payment')->reauthorizeOrder($order);
48
+ }
49
+ }
50
+ }
51
+ }
52
+
53
+ }
app/code/local/SFC/Autoship/controllers/Adminhtml/SporderpaymentController.php ADDED
@@ -0,0 +1,63 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Subscribe Pro - Subscriptions Management Extension
4
+ *
5
+ * PHP version 5
6
+ *
7
+ * LICENSE: This source file is subject to commercial source code license of SUBSCRIBE PRO INC.
8
+ *
9
+ * @category SFC
10
+ * @package SFC_Autoship
11
+ * @author Garth Brantley <garth@subscribepro.com>
12
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
13
+ * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
+ * @link http://www.subscribepro.com/
15
+ *
16
+ */
17
+
18
+ class SFC_Autoship_Adminhtml_SporderpaymentController extends Mage_Adminhtml_Controller_Action
19
+ {
20
+
21
+ /**
22
+ */
23
+ public function reauthorizeAction()
24
+ {
25
+ if (!$order = $this->_initOrder()) {
26
+ return;
27
+ }
28
+
29
+ try {
30
+ Mage::helper('autoship/payment')->reauthorizeOrder($order);
31
+ $this->_getSession()->addSuccess($this->__('The order has been reauthorized.'));
32
+ } catch (Mage_Core_Exception $e) {
33
+ $this->_getSession()->addError($e->getMessage());
34
+ } catch (Exception $e) {
35
+ $this->_getSession()->addError($this->__('Failed to reauthorize the order.'));
36
+ Mage::logException($e);
37
+ }
38
+ $this->_redirect('adminhtml/sales_order/view', array('order_id' => $order->getId()));
39
+ }
40
+
41
+
42
+ /**
43
+ * Initialize order model instance
44
+ *
45
+ * @return Mage_Sales_Model_Order || false
46
+ */
47
+ protected function _initOrder()
48
+ {
49
+ $id = $this->getRequest()->getParam('order_id');
50
+ $order = Mage::getModel('sales/order')->load($id);
51
+
52
+ if (!$order->getId()) {
53
+ $this->_getSession()->addError($this->__('This order no longer exists.'));
54
+ $this->_redirect('*/*/');
55
+ $this->setFlag('', self::FLAG_NO_DISPATCH, true);
56
+ return false;
57
+ }
58
+ Mage::register('sales_order', $order);
59
+ Mage::register('current_order', $order);
60
+ return $order;
61
+ }
62
+
63
+ }
app/code/local/SFC/Autoship/controllers/Adminhtml/SppaymentprofileController.php CHANGED
@@ -9,7 +9,7 @@
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
app/code/local/SFC/Autoship/controllers/Adminhtml/SptestconnectionbuttonController.php CHANGED
@@ -9,7 +9,7 @@
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
@@ -29,7 +29,7 @@ class SFC_Autoship_Adminhtml_SptestconnectionbuttonController extends Mage_Admin
29
  // Set store on api helper
30
  $apiHelper->setConfigStore($store);
31
  // Log
32
- Mage::log('Testing connection for website: ' . $store->getWebsite()->getCode() . ' and store: ' . $store->getCode(), Zend_Log::INFO, SFC_Autoship_Helper_Data::LOG_FILE);
33
  // Clear cache
34
  Mage::app()->cleanCache(array(SFC_Autoship_Helper_Api::CACHE_TYPE_CONFIG, SFC_Autoship_Helper_Api::CACHE_TYPE_PRODUCTS));
35
  // Update configuration
@@ -37,12 +37,12 @@ class SFC_Autoship_Adminhtml_SptestconnectionbuttonController extends Mage_Admin
37
  // Call platform to get Account Configuration, just to test connection
38
  try {
39
  $platformHelper->getAccountConfig();
40
- Mage::log('Connection test successful.', Zend_Log::INFO, SFC_Autoship_Helper_Data::LOG_FILE);
41
  $result = 1;
42
  }
43
  catch(\Exception $e) {
44
- Mage::logException($e);
45
- Mage::log('Connection test failed!', Zend_Log::ERR, SFC_Autoship_Helper_Data::LOG_FILE);
46
  $result = 0;
47
  }
48
  // Return result
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
29
  // Set store on api helper
30
  $apiHelper->setConfigStore($store);
31
  // Log
32
+ SFC_Autoship::log('Testing connection for website: ' . $store->getWebsite()->getCode() . ' and store: ' . $store->getCode(), Zend_Log::INFO);
33
  // Clear cache
34
  Mage::app()->cleanCache(array(SFC_Autoship_Helper_Api::CACHE_TYPE_CONFIG, SFC_Autoship_Helper_Api::CACHE_TYPE_PRODUCTS));
35
  // Update configuration
37
  // Call platform to get Account Configuration, just to test connection
38
  try {
39
  $platformHelper->getAccountConfig();
40
+ SFC_Autoship::log('Connection test successful.', Zend_Log::INFO);
41
  $result = 1;
42
  }
43
  catch(\Exception $e) {
44
+ SFC_Autoship::logException($e);
45
+ SFC_Autoship::log('Connection test failed!', Zend_Log::ERR);
46
  $result = 0;
47
  }
48
  // Return result
app/code/local/SFC/Autoship/controllers/MycreditcardsController.php CHANGED
@@ -9,7 +9,7 @@
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
@@ -138,7 +138,7 @@ class SFC_Autoship_MycreditcardsController extends Mage_Core_Controller_Front_Ac
138
  $this->getLayout()->getBlock('payment_profile_edit')->setData('cim_profile', $paymentProfile);
139
  }
140
  catch (Exception $e) {
141
- Mage::log('Error: ' . $e->getMessage(), Zend_Log::ERR, SFC_Autoship_Helper_Data::LOG_FILE);
142
  $coreSession->addError($this->__('Failed to retrieve credit card for edit!'));
143
  // Send customer back to grid
144
  $this->_redirect('subscriptions/mycreditcards/');
@@ -171,7 +171,7 @@ class SFC_Autoship_MycreditcardsController extends Mage_Core_Controller_Front_Ac
171
  $vaultHelper->storeToken($customerSession->getCustomerId(), $token);
172
  }
173
  catch (Exception $e) {
174
- Mage::log('Error: ' . $e->getMessage(), Zend_Log::ERR, SFC_Autoship_Helper_Data::LOG_FILE);
175
  $coreSession->addError($this->__('Failed to store credit card!'));
176
  }
177
 
@@ -206,7 +206,7 @@ class SFC_Autoship_MycreditcardsController extends Mage_Core_Controller_Front_Ac
206
  $coreSession->addSuccess($this->__('Credit card was successfully updated!'));
207
  }
208
  catch (Exception $e) {
209
- Mage::log('Error: ' . $e->getMessage(), Zend_Log::ERR, SFC_Autoship_Helper_Data::LOG_FILE);
210
  $coreSession->addError($this->__('Failed to save credit card!'));
211
  }
212
 
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
138
  $this->getLayout()->getBlock('payment_profile_edit')->setData('cim_profile', $paymentProfile);
139
  }
140
  catch (Exception $e) {
141
+ SFC_Autoship::log('Error: ' . $e->getMessage(), Zend_Log::ERR);
142
  $coreSession->addError($this->__('Failed to retrieve credit card for edit!'));
143
  // Send customer back to grid
144
  $this->_redirect('subscriptions/mycreditcards/');
171
  $vaultHelper->storeToken($customerSession->getCustomerId(), $token);
172
  }
173
  catch (Exception $e) {
174
+ SFC_Autoship::log('Error: ' . $e->getMessage(), Zend_Log::ERR);
175
  $coreSession->addError($this->__('Failed to store credit card!'));
176
  }
177
 
206
  $coreSession->addSuccess($this->__('Credit card was successfully updated!'));
207
  }
208
  catch (Exception $e) {
209
+ SFC_Autoship::log('Error: ' . $e->getMessage(), Zend_Log::ERR);
210
  $coreSession->addError($this->__('Failed to save credit card!'));
211
  }
212
 
app/code/local/SFC/Autoship/controllers/MysubscriptionsController.php CHANGED
@@ -10,7 +10,7 @@
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
  * @author Dennis Rogers <dennis@storefrontconsulting.com>
13
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
14
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
15
  * @link http://www.subscribepro.com/
16
  *
@@ -704,8 +704,9 @@ class SFC_Autoship_MysubscriptionsController extends Mage_Core_Controller_Front_
704
  protected function handleAjaxException(Exception $e)
705
  {
706
  // Log exception
707
- Mage::log($e->getMessage() . "\n" . $e->getTraceAsString());
708
- Mage::logException($e);
 
709
  // Output error message formatted for display
710
  echo '<li class="error">' . $this->__($e->getMessage()) . '</li>';
711
  }
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
  * @author Dennis Rogers <dennis@storefrontconsulting.com>
13
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
14
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
15
  * @link http://www.subscribepro.com/
16
  *
704
  protected function handleAjaxException(Exception $e)
705
  {
706
  // Log exception
707
+ SFC_Autoship::log('Ajax Exception occurred: ' . $e->getMessage(), Zend_Log::ERR);
708
+ SFC_Autoship::logCallStack();
709
+ SFC_Autoship::logException($e);
710
  // Output error message formatted for display
711
  echo '<li class="error">' . $this->__($e->getMessage()) . '</li>';
712
  }
app/code/local/SFC/Autoship/controllers/NewsubscriptionController.php CHANGED
@@ -10,7 +10,7 @@
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
  * @author Dennis Rogers <dennis@storefrontconsulting.com>
13
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
14
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
15
  * @link http://www.subscribepro.com/
16
  *
@@ -223,8 +223,8 @@ class SFC_Autoship_NewsubscriptionController extends Mage_Core_Controller_Front_
223
  $this->renderLayout();
224
  }
225
  catch (Exception $e) {
226
- Mage::log($e->getMessage());
227
- Mage::logException($e);
228
  echo '<li class="error">' . $this->__($e->getMessage()) . '</li>';
229
 
230
  return;
@@ -341,8 +341,8 @@ class SFC_Autoship_NewsubscriptionController extends Mage_Core_Controller_Front_
341
  }
342
  }
343
  catch (Exception $e) {
344
- Mage::log($e->getMessage());
345
- Mage::logException($e);
346
  echo '<li class="error">' . $this->__($e->getMessage()) . '</li>';
347
 
348
  return;
@@ -397,8 +397,8 @@ class SFC_Autoship_NewsubscriptionController extends Mage_Core_Controller_Front_
397
  }
398
  }
399
  catch (Exception $e) {
400
- Mage::log($e->getMessage());
401
- Mage::logException($e);
402
  echo '<li class="error">' . $this->__($e->getMessage()) . '</li>';
403
 
404
  return;
@@ -424,7 +424,8 @@ class SFC_Autoship_NewsubscriptionController extends Mage_Core_Controller_Front_
424
  Mage::getSingleton('customer/session')->setNewSubscription($subscription);
425
  }
426
  catch (Exception $e) {
427
- Mage::log($e->getMessage() . '\n' . $e->getTraceAsString());
 
428
  echo '<li class="error">' . $this->__($e->getMessage()) . '</li>';
429
  }
430
  // Load and render layout
@@ -472,8 +473,8 @@ class SFC_Autoship_NewsubscriptionController extends Mage_Core_Controller_Front_
472
  echo $successUrl;
473
  }
474
  catch (Exception $e) {
475
- Mage::log($e->getMessage());
476
- Mage::logException($e);
477
  if (strpos($e->getMessage(), '1062 Duplicate entry')) {
478
  echo '<li class="error">' . $this->__("You already have a subscription to this product.") . '</li>';
479
  }
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
  * @author Dennis Rogers <dennis@storefrontconsulting.com>
13
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
14
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
15
  * @link http://www.subscribepro.com/
16
  *
223
  $this->renderLayout();
224
  }
225
  catch (Exception $e) {
226
+ SFC_Autoship::log($e->getMessage(), Zend_Log::ERR);
227
+ SFC_Autoship::logException($e);
228
  echo '<li class="error">' . $this->__($e->getMessage()) . '</li>';
229
 
230
  return;
341
  }
342
  }
343
  catch (Exception $e) {
344
+ SFC_Autoship::log($e->getMessage(), Zend_Log::ERR);
345
+ SFC_Autoship::logException($e);
346
  echo '<li class="error">' . $this->__($e->getMessage()) . '</li>';
347
 
348
  return;
397
  }
398
  }
399
  catch (Exception $e) {
400
+ SFC_Autoship::log($e->getMessage(), Zend_Log::ERR);
401
+ SFC_Autoship::logException($e);
402
  echo '<li class="error">' . $this->__($e->getMessage()) . '</li>';
403
 
404
  return;
424
  Mage::getSingleton('customer/session')->setNewSubscription($subscription);
425
  }
426
  catch (Exception $e) {
427
+ SFC_Autoship::log('Exception occurred: ' . $e->getMessage(), Zend_Log::ERR);
428
+ SFC_Autoship::logCallStack();
429
  echo '<li class="error">' . $this->__($e->getMessage()) . '</li>';
430
  }
431
  // Load and render layout
473
  echo $successUrl;
474
  }
475
  catch (Exception $e) {
476
+ SFC_Autoship::log($e->getMessage());
477
+ SFC_Autoship::logException($e);
478
  if (strpos($e->getMessage(), '1062 Duplicate entry')) {
479
  echo '<li class="error">' . $this->__("You already have a subscription to this product.") . '</li>';
480
  }
app/code/local/SFC/Autoship/etc/adminhtml.xml CHANGED
@@ -10,7 +10,7 @@
10
  * @category SFC
11
  * @package SFC_Autoship
12
  * @author Garth Brantley <garth@subscribepro.com>
13
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
14
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
15
  * @link http://www.subscribepro.com/
16
  *
10
  * @category SFC
11
  * @package SFC_Autoship
12
  * @author Garth Brantley <garth@subscribepro.com>
13
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
14
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
15
  * @link http://www.subscribepro.com/
16
  *
app/code/local/SFC/Autoship/etc/config.xml CHANGED
@@ -10,7 +10,7 @@
10
  * @category SFC
11
  * @package SFC_Autoship
12
  * @author Garth Brantley <garth@subscribepro.com>
13
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
14
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
15
  * @link http://www.subscribepro.com/
16
  *
@@ -19,7 +19,7 @@
19
  <config>
20
  <modules>
21
  <SFC_Autoship>
22
- <version>1.3.2.6</version>
23
  </SFC_Autoship>
24
  </modules>
25
  <global>
@@ -277,7 +277,7 @@
277
  <adminhtml>
278
  <args>
279
  <modules>
280
- <SFC_Autoship after="Mage_Adminhtml">SFC_Autoship_Adminhtml</SFC_Autoship>
281
  </modules>
282
  </args>
283
  </adminhtml>
@@ -294,6 +294,21 @@
294
  </layout>
295
  </adminhtml>
296
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
297
  <!-- Cron job schedules -->
298
  <crontab>
299
  <jobs>
@@ -308,6 +323,7 @@
308
  </general>
309
  <platform_api>
310
  <platform_host>api.subscribepro.com</platform_host>
 
311
  <log_request>0</log_request>
312
  </platform_api>
313
  <advanced>
@@ -342,12 +358,29 @@
342
  <allowspecific>0</allowspecific>
343
  <cctypes>AE,VI,MC,DI</cctypes>
344
  <payment_action>authorize_capture</payment_action>
 
345
  <order_status>processing</order_status>
346
  <currency>USD</currency>
347
  <allow_guest_checkout>1</allow_guest_checkout>
348
  <use_transparent_redirect>0</use_transparent_redirect>
349
  </subscribe_pro>
350
  </payment>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
351
  </default>
352
 
353
  </config>
10
  * @category SFC
11
  * @package SFC_Autoship
12
  * @author Garth Brantley <garth@subscribepro.com>
13
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
14
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
15
  * @link http://www.subscribepro.com/
16
  *
19
  <config>
20
  <modules>
21
  <SFC_Autoship>
22
+ <version>1.3.2.10</version>
23
  </SFC_Autoship>
24
  </modules>
25
  <global>
277
  <adminhtml>
278
  <args>
279
  <modules>
280
+ <SFC_Autoship before="Mage_Adminhtml">SFC_Autoship_Adminhtml</SFC_Autoship>
281
  </modules>
282
  </args>
283
  </adminhtml>
294
  </layout>
295
  </adminhtml>
296
 
297
+ <!-- Admin events -->
298
+ <adminhtml>
299
+ <events>
300
+ <adminhtml_widget_container_html_before>
301
+ <observers>
302
+ <autoship_adminhtml_widget_container_html_before>
303
+ <class>autoship/adminhtml_observer</class>
304
+ <type>singleton</type>
305
+ <method>adminhtmlWidgetContainerHtmlBefore</method>
306
+ </autoship_adminhtml_widget_container_html_before>
307
+ </observers>
308
+ </adminhtml_widget_container_html_before>
309
+ </events>
310
+ </adminhtml>
311
+
312
  <!-- Cron job schedules -->
313
  <crontab>
314
  <jobs>
323
  </general>
324
  <platform_api>
325
  <platform_host>api.subscribepro.com</platform_host>
326
+ <log_level>6</log_level>
327
  <log_request>0</log_request>
328
  </platform_api>
329
  <advanced>
358
  <allowspecific>0</allowspecific>
359
  <cctypes>AE,VI,MC,DI</cctypes>
360
  <payment_action>authorize_capture</payment_action>
361
+ <reauthorize_partial_capture>0</reauthorize_partial_capture>
362
  <order_status>processing</order_status>
363
  <currency>USD</currency>
364
  <allow_guest_checkout>1</allow_guest_checkout>
365
  <use_transparent_redirect>0</use_transparent_redirect>
366
  </subscribe_pro>
367
  </payment>
368
+ <carriers>
369
+ <subscribepro>
370
+ <active>1</active>
371
+ <model>autoship/shipping_carrier</model>
372
+ <title>Recurring Order Shipping</title>
373
+ <standard_title>Standard Shipping</standard_title>
374
+ <default_standard_shipping_price>5.0</default_standard_shipping_price>
375
+ <enable_free_shipping>0</enable_free_shipping>
376
+ <free_title>Free Shipping</free_title>
377
+ <free_shipping_minimum_order_total>100.0</free_shipping_minimum_order_total>
378
+ <free_shipping_minimum_order_total_international>200.0</free_shipping_minimum_order_total_international>
379
+ <enable_international_shipping>0</enable_international_shipping>
380
+ <international_title>International Shipping</international_title>
381
+ <default_international_shipping_price>15.0</default_international_shipping_price>
382
+ </subscribepro>
383
+ </carriers>
384
  </default>
385
 
386
  </config>
app/code/local/SFC/Autoship/etc/system.xml CHANGED
@@ -10,7 +10,7 @@
10
  * @category SFC
11
  * @package SFC_Autoship
12
  * @author Garth Brantley <garth@subscribepro.com>
13
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
14
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
15
  * @link http://www.subscribepro.com/
16
  *
@@ -94,6 +94,16 @@
94
  <show_in_website>1</show_in_website>
95
  <show_in_store>0</show_in_store>
96
  </client_secret>
 
 
 
 
 
 
 
 
 
 
97
  <log_request translate="label">
98
  <label>Log Platform API Requests</label>
99
  <frontend_type>select</frontend_type>
@@ -102,7 +112,7 @@
102
  <show_in_default>1</show_in_default>
103
  <show_in_website>1</show_in_website>
104
  <show_in_store>0</show_in_store>
105
- <comment>When this settings is enabled, you should also enable Magento's general logging under System > Configuration > Developer > Log Settings. NOTE: This should only be enabled on non-production systems. The request data can include sensitive customer data and your account credentials!</comment>
106
  </log_request>
107
  </fields>
108
  </platform_api>
@@ -290,6 +300,16 @@
290
  <show_in_website>1</show_in_website>
291
  <show_in_store>1</show_in_store>
292
  </title>
 
 
 
 
 
 
 
 
 
 
293
  <payment_action translate="label">
294
  <label>Payment Action</label>
295
  <frontend_type>select</frontend_type>
@@ -397,6 +417,16 @@
397
  <show_in_website>1</show_in_website>
398
  <show_in_store>0</show_in_store>
399
  </checkout_save_card_checkbox>
 
 
 
 
 
 
 
 
 
 
400
  <use_transparent_redirect translate="label">
401
  <label>Use Transparent Redirect / JSONP For Checkout</label>
402
  <frontend_type>select</frontend_type>
@@ -411,5 +441,124 @@
411
  </subscribe_pro>
412
  </groups>
413
  </payment>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
414
  </sections>
415
  </config>
10
  * @category SFC
11
  * @package SFC_Autoship
12
  * @author Garth Brantley <garth@subscribepro.com>
13
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
14
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
15
  * @link http://www.subscribepro.com/
16
  *
94
  <show_in_website>1</show_in_website>
95
  <show_in_store>0</show_in_store>
96
  </client_secret>
97
+ <log_level translate="label">
98
+ <label>Log Level</label>
99
+ <frontend_type>select</frontend_type>
100
+ <source_model>autoship/system_config_source_loglevel</source_model>
101
+ <sort_order>50</sort_order>
102
+ <show_in_default>1</show_in_default>
103
+ <show_in_website>1</show_in_website>
104
+ <show_in_store>0</show_in_store>
105
+ <comment>Log messages at and above this priority level. You must also enable Magento's general logging under System > Configuration > Developer > Log Settings.</comment>
106
+ </log_level>
107
  <log_request translate="label">
108
  <label>Log Platform API Requests</label>
109
  <frontend_type>select</frontend_type>
112
  <show_in_default>1</show_in_default>
113
  <show_in_website>1</show_in_website>
114
  <show_in_store>0</show_in_store>
115
+ <comment>You must also enable Magento's general logging under System > Configuration > Developer > Log Settings. NOTE: This should only be enabled on non-production systems. The request data can include sensitive customer data and your account credentials!</comment>
116
  </log_request>
117
  </fields>
118
  </platform_api>
300
  <show_in_website>1</show_in_website>
301
  <show_in_store>1</show_in_store>
302
  </title>
303
+ <reauthorize_partial_capture translate="label">
304
+ <label>Reauthorize After Partial Capture</label>
305
+ <frontend_type>select</frontend_type>
306
+ <source_model>adminhtml/system_config_source_yesno</source_model>
307
+ <sort_order>3</sort_order>
308
+ <show_in_default>1</show_in_default>
309
+ <show_in_website>1</show_in_website>
310
+ <show_in_store>0</show_in_store>
311
+ <comment>Applicable in Authorize Only Mode</comment>
312
+ </reauthorize_partial_capture>
313
  <payment_action translate="label">
314
  <label>Payment Action</label>
315
  <frontend_type>select</frontend_type>
417
  <show_in_website>1</show_in_website>
418
  <show_in_store>0</show_in_store>
419
  </checkout_save_card_checkbox>
420
+ <always_save_card translate="label">
421
+ <label>Always save credit cards for later use</label>
422
+ <frontend_type>select</frontend_type>
423
+ <source_model>adminhtml/system_config_source_yesno</source_model>
424
+ <sort_order>132</sort_order>
425
+ <show_in_default>1</show_in_default>
426
+ <show_in_website>1</show_in_website>
427
+ <show_in_store>0</show_in_store>
428
+ <comment>If this is enabled (set to Yes), then guest checkout must be not allowed and the enable "Save Card" Checkbox setting above should be set to No.</comment>
429
+ </always_save_card>
430
  <use_transparent_redirect translate="label">
431
  <label>Use Transparent Redirect / JSONP For Checkout</label>
432
  <frontend_type>select</frontend_type>
441
  </subscribe_pro>
442
  </groups>
443
  </payment>
444
+ <carriers>
445
+ <groups>
446
+ <subscribepro translate="label" module="autoship">
447
+ <label>Subscribe Pro Shipping</label>
448
+ <frontend_type>text</frontend_type>
449
+ <sort_order>1</sort_order>
450
+ <show_in_default>1</show_in_default>
451
+ <show_in_website>1</show_in_website>
452
+ <show_in_store>1</show_in_store>
453
+ <fields>
454
+ <active translate="label">
455
+ <label>Enabled</label>
456
+ <frontend_type>select</frontend_type>
457
+ <frontend_model>autoship/adminhtml_system_config_form_fielddisabled</frontend_model>
458
+ <source_model>adminhtml/system_config_source_yesno</source_model>
459
+ <sort_order>0</sort_order>
460
+ <show_in_default>1</show_in_default>
461
+ <show_in_website>1</show_in_website>
462
+ <show_in_store>0</show_in_store>
463
+ <comment>NOTE: Subscribe Pro shipping methods will only show up for recurring orders which are placed via the Magento API. These methods will not show up on the frontend of Magento.</comment>
464
+ </active>
465
+ <title translate="label">
466
+ <label>Title</label>
467
+ <frontend_type>text</frontend_type>
468
+ <sort_order>2</sort_order>
469
+ <show_in_default>1</show_in_default>
470
+ <show_in_website>1</show_in_website>
471
+ <show_in_store>1</show_in_store>
472
+ </title>
473
+ <standard_title translate="label">
474
+ <label>Standard Shipping Title</label>
475
+ <frontend_type>text</frontend_type>
476
+ <sort_order>20</sort_order>
477
+ <show_in_default>1</show_in_default>
478
+ <show_in_website>1</show_in_website>
479
+ <show_in_store>1</show_in_store>
480
+ </standard_title>
481
+ <default_standard_shipping_price translate="label">
482
+ <label>Default Price for Standard Shipping</label>
483
+ <frontend_type>text</frontend_type>
484
+ <validate>validate-number validate-zero-or-greater</validate>
485
+ <sort_order>22</sort_order>
486
+ <show_in_default>1</show_in_default>
487
+ <show_in_website>1</show_in_website>
488
+ <show_in_store>0</show_in_store>
489
+ </default_standard_shipping_price>
490
+ <enable_free_shipping translate="label">
491
+ <label>Enable Free Shipping</label>
492
+ <frontend_type>select</frontend_type>
493
+ <source_model>adminhtml/system_config_source_yesno</source_model>
494
+ <sort_order>30</sort_order>
495
+ <show_in_default>1</show_in_default>
496
+ <show_in_website>1</show_in_website>
497
+ <show_in_store>0</show_in_store>
498
+ </enable_free_shipping>
499
+ <free_title translate="label">
500
+ <label>Free Shipping Title</label>
501
+ <frontend_type>text</frontend_type>
502
+ <sort_order>32</sort_order>
503
+ <show_in_default>1</show_in_default>
504
+ <show_in_website>1</show_in_website>
505
+ <show_in_store>1</show_in_store>
506
+ </free_title>
507
+ <free_shipping_minimum_order_total translate="label">
508
+ <label>Minimum Order Total for Free Shipping</label>
509
+ <frontend_type>text</frontend_type>
510
+ <validate>validate-number validate-zero-or-greater</validate>
511
+ <sort_order>34</sort_order>
512
+ <show_in_default>1</show_in_default>
513
+ <show_in_website>1</show_in_website>
514
+ <show_in_store>0</show_in_store>
515
+ </free_shipping_minimum_order_total>
516
+ <free_shipping_minimum_order_total_international translate="label">
517
+ <label>Minimum Order Total for Free International Shipping</label>
518
+ <frontend_type>text</frontend_type>
519
+ <validate>validate-number validate-zero-or-greater</validate>
520
+ <sort_order>34</sort_order>
521
+ <show_in_default>1</show_in_default>
522
+ <show_in_website>1</show_in_website>
523
+ <show_in_store>0</show_in_store>
524
+ </free_shipping_minimum_order_total_international>
525
+ <enable_international_shipping translate="label">
526
+ <label>Enable International Shipping</label>
527
+ <frontend_type>select</frontend_type>
528
+ <source_model>adminhtml/system_config_source_yesno</source_model>
529
+ <sort_order>40</sort_order>
530
+ <show_in_default>1</show_in_default>
531
+ <show_in_website>1</show_in_website>
532
+ <show_in_store>0</show_in_store>
533
+ </enable_international_shipping>
534
+ <international_title translate="label">
535
+ <label>International Shipping Title</label>
536
+ <frontend_type>text</frontend_type>
537
+ <sort_order>42</sort_order>
538
+ <show_in_default>1</show_in_default>
539
+ <show_in_website>1</show_in_website>
540
+ <show_in_store>1</show_in_store>
541
+ </international_title>
542
+ <default_international_shipping_price translate="label">
543
+ <label>Default Price for International Shipping</label>
544
+ <frontend_type>text</frontend_type>
545
+ <validate>validate-number validate-zero-or-greater</validate>
546
+ <sort_order>44</sort_order>
547
+ <show_in_default>1</show_in_default>
548
+ <show_in_website>1</show_in_website>
549
+ <show_in_store>0</show_in_store>
550
+ </default_international_shipping_price>
551
+ <sort_order translate="label">
552
+ <label>Sort Order</label>
553
+ <frontend_type>text</frontend_type>
554
+ <sort_order>100</sort_order>
555
+ <show_in_default>1</show_in_default>
556
+ <show_in_website>1</show_in_website>
557
+ <show_in_store>0</show_in_store>
558
+ </sort_order>
559
+ </fields>
560
+ </subscribepro>
561
+ </groups>
562
+ </carriers>
563
  </sections>
564
  </config>
app/code/local/SFC/Autoship/sql/sfc_autoship_setup/{mysql4-install-1.3.1.8.php → mysql4-install-1.3.2.10.php} RENAMED
@@ -9,7 +9,7 @@
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
@@ -18,6 +18,7 @@
18
  /**
19
  * Installer
20
  */
 
21
  $installer = $this;
22
  $installer->startSetup();
23
 
@@ -49,6 +50,15 @@ if (!$installer->getAttributeId('catalog_product', 'subscription_enabled')) {
49
  ));
50
  }
51
 
 
 
 
 
 
 
 
 
 
52
  /**
53
  * Add attributes to quote and order items
54
  */
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
18
  /**
19
  * Installer
20
  */
21
+ /* @var $installer Mage_Sales_Model_Entity_Setup */
22
  $installer = $this;
23
  $installer->startSetup();
24
 
50
  ));
51
  }
52
 
53
+ /**
54
+ * Add attributes to quote
55
+ */
56
+ $installer->addAttribute('quote', 'subscribe_pro_custom_shipping_price', array(
57
+ 'type' => Varien_Db_Ddl_Table::TYPE_DECIMAL,
58
+ 'visible' => false,
59
+ 'required' => false
60
+ ));
61
+
62
  /**
63
  * Add attributes to quote and order items
64
  */
app/code/local/SFC/Autoship/sql/sfc_autoship_setup/mysql4-uninstall-1.3.1.4.php CHANGED
@@ -10,7 +10,7 @@
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
  * @author Dennis Rogers <dennis@storefrontconsulting.com>
13
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
14
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
15
  * @link http://www.subscribepro.com/
16
  *
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
  * @author Dennis Rogers <dennis@storefrontconsulting.com>
13
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
14
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
15
  * @link http://www.subscribepro.com/
16
  *
app/code/local/SFC/Autoship/sql/sfc_autoship_setup/mysql4-upgrade-1.1.0-1.1.1.php CHANGED
@@ -9,7 +9,7 @@
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
app/code/local/SFC/Autoship/sql/sfc_autoship_setup/mysql4-upgrade-1.1.2-1.2.0.php CHANGED
@@ -9,7 +9,7 @@
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
app/code/local/SFC/Autoship/sql/sfc_autoship_setup/mysql4-upgrade-1.2.2.1-1.2.2.2.php CHANGED
@@ -10,7 +10,7 @@
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
  * @author Dennis Rogers <dennis@storefrontconsulting.com>
13
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
14
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
15
  * @link http://www.subscribepro.com/
16
  *
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
  * @author Dennis Rogers <dennis@storefrontconsulting.com>
13
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
14
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
15
  * @link http://www.subscribepro.com/
16
  *
app/code/local/SFC/Autoship/sql/sfc_autoship_setup/mysql4-upgrade-1.2.3-1.2.4.php CHANGED
@@ -9,7 +9,7 @@
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
app/code/local/SFC/Autoship/sql/sfc_autoship_setup/mysql4-upgrade-1.2.4.6-1.2.4.7.php CHANGED
@@ -10,7 +10,7 @@
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
  * @author Dennis Rogers <dennis@storefrontconsulting.com>
13
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
14
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
15
  * @link http://www.subscribepro.com/
16
  *
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
  * @author Dennis Rogers <dennis@storefrontconsulting.com>
13
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
14
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
15
  * @link http://www.subscribepro.com/
16
  *
app/code/local/SFC/Autoship/sql/sfc_autoship_setup/mysql4-upgrade-1.3.0.1-1.3.0.2.php CHANGED
@@ -9,7 +9,7 @@
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
app/code/local/SFC/Autoship/sql/sfc_autoship_setup/mysql4-upgrade-1.3.0.5-1.3.1.0.php CHANGED
@@ -9,7 +9,7 @@
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
app/code/local/SFC/Autoship/sql/sfc_autoship_setup/mysql4-upgrade-1.3.1.15-1.3.1.16.php CHANGED
@@ -9,7 +9,7 @@
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
app/code/local/SFC/Autoship/sql/sfc_autoship_setup/mysql4-upgrade-1.3.1.3-1.3.1.4.php CHANGED
@@ -9,7 +9,7 @@
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
app/code/local/SFC/Autoship/sql/sfc_autoship_setup/mysql4-upgrade-1.3.1.4-1.3.1.5.php CHANGED
@@ -9,7 +9,7 @@
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
app/code/local/SFC/Autoship/sql/sfc_autoship_setup/mysql4-upgrade-1.3.1.7-1.3.1.8.php CHANGED
@@ -9,7 +9,7 @@
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
app/code/local/SFC/Autoship/sql/sfc_autoship_setup/mysql4-upgrade-1.3.2.9-1.3.2.10.php ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Subscribe Pro - Subscriptions Management Extension
4
+ *
5
+ * PHP version 5
6
+ *
7
+ * LICENSE: This source file is subject to commercial source code license of SUBSCRIBE PRO INC.
8
+ *
9
+ * @category SFC
10
+ * @package SFC_Autoship
11
+ * @author Garth Brantley <garth@subscribepro.com>
12
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
13
+ * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
+ * @link http://www.subscribepro.com/
15
+ *
16
+ */
17
+
18
+ /**
19
+ * Installer
20
+ */
21
+ $installer = $this;
22
+ $installer->startSetup();
23
+
24
+ /**
25
+ * Add new attribute to quote
26
+ */
27
+ $installer->addAttribute('quote', 'subscribe_pro_custom_shipping_price', array(
28
+ 'type' => Varien_Db_Ddl_Table::TYPE_DECIMAL,
29
+ 'visible' => false,
30
+ 'required' => false
31
+ ));
32
+
33
+ /**
34
+ * Clean up installer
35
+ */
36
+ $installer->endSetup();
app/design/adminhtml/default/default/layout/autoship.xml CHANGED
@@ -10,7 +10,7 @@
10
  * @category SFC
11
  * @package SFC_Autoship
12
  * @author Garth Brantley <garth@subscribepro.com>
13
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
14
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
15
  * @link http://www.subscribepro.com/
16
  *
@@ -21,9 +21,9 @@
21
 
22
  <adminhtml_sales_order_create_index>
23
  <reference name="head">
24
- <action method="addItem"><type>skin_js</type><name>js/autoship/jquery/jquery-1.10.1.min.js</name></action>
25
- <action method="addItem"><type>skin_js</type><name>js/autoship/jquery/noconflict.js</name></action>
26
- <action method="addItem"><type>skin_js</type><name>js/autoship/sales_create_order.js</name></action>
27
  </reference>
28
  <reference name="js">
29
  <block type="autoship/adminhtml_sales_order_create_jsonp" name="jsonp" template="autoship/sales/create_order/jsonp.phtml" after="-"/>
10
  * @category SFC
11
  * @package SFC_Autoship
12
  * @author Garth Brantley <garth@subscribepro.com>
13
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
14
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
15
  * @link http://www.subscribepro.com/
16
  *
21
 
22
  <adminhtml_sales_order_create_index>
23
  <reference name="head">
24
+ <action method="addItem"><type>skin_js</type><name>js/autoship/jquery/jquery-1.10.1.min.js</name><group>autoship</group></action>
25
+ <action method="addItem"><type>skin_js</type><name>js/autoship/jquery/noconflict.js</name><group>autoship</group></action>
26
+ <action method="addItem"><type>skin_js</type><name>js/autoship/sales_create_order.js</name><group>autoship</group></action>
27
  </reference>
28
  <reference name="js">
29
  <block type="autoship/adminhtml_sales_order_create_jsonp" name="jsonp" template="autoship/sales/create_order/jsonp.phtml" after="-"/>
app/design/adminhtml/default/default/template/autoship/payment/form/cc.phtml CHANGED
@@ -9,7 +9,7 @@
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
app/design/adminhtml/default/default/template/autoship/payment/form/cc_saved.phtml CHANGED
@@ -9,7 +9,7 @@
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
app/design/adminhtml/default/default/template/autoship/sales/create_order/jsonp.phtml CHANGED
@@ -9,7 +9,7 @@
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
app/design/adminhtml/default/default/template/autoship/sales/create_order/product/subscription.phtml CHANGED
@@ -10,7 +10,7 @@
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
  * @author Dennis Rogers <dennis@storefrontconsulting.com>
13
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
14
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
15
  * @link http://www.subscribepro.com/
16
  *
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
  * @author Dennis Rogers <dennis@storefrontconsulting.com>
13
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
14
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
15
  * @link http://www.subscribepro.com/
16
  *
app/design/frontend/base/default/layout/autoship.xml CHANGED
@@ -10,7 +10,7 @@
10
  * @category SFC
11
  * @package SFC_Autoship
12
  * @author Garth Brantley <garth@subscribepro.com>
13
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
14
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
15
  * @link http://www.subscribepro.com/
16
  *
10
  * @category SFC
11
  * @package SFC_Autoship
12
  * @author Garth Brantley <garth@subscribepro.com>
13
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
14
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
15
  * @link http://www.subscribepro.com/
16
  *
app/design/frontend/base/default/template/autoship/cart/product/subscription.phtml CHANGED
@@ -10,7 +10,7 @@
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
  * @author Dennis Rogers <dennis@storefrontconsulting.com>
13
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
14
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
15
  * @link http://www.subscribepro.com/
16
  *
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
  * @author Dennis Rogers <dennis@storefrontconsulting.com>
13
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
14
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
15
  * @link http://www.subscribepro.com/
16
  *
app/design/frontend/base/default/template/autoship/checkout/jsonp.phtml CHANGED
@@ -9,7 +9,7 @@
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
app/design/frontend/base/default/template/autoship/checkout/serversideapi.phtml CHANGED
@@ -9,7 +9,7 @@
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
app/design/frontend/base/default/template/autoship/checkout/success.phtml CHANGED
@@ -10,7 +10,7 @@
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
  * @author Dennis Rogers <dennis@storefrontconsulting.com>
13
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
14
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
15
  * @link http://www.subscribepro.com/
16
  *
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
  * @author Dennis Rogers <dennis@storefrontconsulting.com>
13
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
14
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
15
  * @link http://www.subscribepro.com/
16
  *
app/design/frontend/base/default/template/autoship/mysubscriptions.phtml CHANGED
@@ -10,7 +10,7 @@
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
  * @author Dennis Rogers <dennis@storefrontconsulting.com>
13
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
14
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
15
  * @link http://www.subscribepro.com/
16
  *
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
  * @author Dennis Rogers <dennis@storefrontconsulting.com>
13
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
14
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
15
  * @link http://www.subscribepro.com/
16
  *
app/design/frontend/base/default/template/autoship/mysubscriptions/subscription.phtml CHANGED
@@ -10,7 +10,7 @@
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
  * @author Dennis Rogers <dennis@storefrontconsulting.com>
13
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
14
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
15
  * @link http://www.subscribepro.com/
16
  *
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
  * @author Dennis Rogers <dennis@storefrontconsulting.com>
13
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
14
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
15
  * @link http://www.subscribepro.com/
16
  *
app/design/frontend/base/default/template/autoship/mysubscriptions/subscription/actions.phtml CHANGED
@@ -10,7 +10,7 @@
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
  * @author Dennis Rogers <dennis@storefrontconsulting.com>
13
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
14
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
15
  * @link http://www.subscribepro.com/
16
  *
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
  * @author Dennis Rogers <dennis@storefrontconsulting.com>
13
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
14
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
15
  * @link http://www.subscribepro.com/
16
  *
app/design/frontend/base/default/template/autoship/mysubscriptions/subscription/billing_address.phtml CHANGED
@@ -9,7 +9,7 @@
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
app/design/frontend/base/default/template/autoship/mysubscriptions/subscription/payment.phtml CHANGED
@@ -10,7 +10,7 @@
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
  * @author Dennis Rogers <dennis@storefrontconsulting.com>
13
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
14
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
15
  * @link http://www.subscribepro.com/
16
  *
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
  * @author Dennis Rogers <dennis@storefrontconsulting.com>
13
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
14
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
15
  * @link http://www.subscribepro.com/
16
  *
app/design/frontend/base/default/template/autoship/mysubscriptions/subscription/product_info.phtml CHANGED
@@ -10,7 +10,7 @@
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
  * @author Dennis Rogers <dennis@storefrontconsulting.com>
13
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
14
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
15
  * @link http://www.subscribepro.com/
16
  *
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
  * @author Dennis Rogers <dennis@storefrontconsulting.com>
13
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
14
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
15
  * @link http://www.subscribepro.com/
16
  *
app/design/frontend/base/default/template/autoship/mysubscriptions/subscription/shipping_address.phtml CHANGED
@@ -9,7 +9,7 @@
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
app/design/frontend/base/default/template/autoship/mysubscriptions/subscription/subscription_info.phtml CHANGED
@@ -10,7 +10,7 @@
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
  * @author Dennis Rogers <dennis@storefrontconsulting.com>
13
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
14
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
15
  * @link http://www.subscribepro.com/
16
  *
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
  * @author Dennis Rogers <dennis@storefrontconsulting.com>
13
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
14
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
15
  * @link http://www.subscribepro.com/
16
  *
app/design/frontend/base/default/template/autoship/newsubscription.phtml CHANGED
@@ -9,7 +9,7 @@
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
app/design/frontend/base/default/template/autoship/newsubscription/ajax_update.phtml CHANGED
@@ -9,7 +9,7 @@
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
app/design/frontend/base/default/template/autoship/newsubscription/billing_address.phtml CHANGED
@@ -9,7 +9,7 @@
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
app/design/frontend/base/default/template/autoship/newsubscription/delivery_date.phtml CHANGED
@@ -9,7 +9,7 @@
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
app/design/frontend/base/default/template/autoship/newsubscription/delivery_frequency.phtml CHANGED
@@ -9,7 +9,7 @@
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
app/design/frontend/base/default/template/autoship/newsubscription/payment.phtml CHANGED
@@ -10,7 +10,7 @@
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
  * @author Dennis Rogers <dennis@storefrontconsulting.com>
13
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
14
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
15
  * @link http://www.subscribepro.com/
16
  *
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
  * @author Dennis Rogers <dennis@storefrontconsulting.com>
13
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
14
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
15
  * @link http://www.subscribepro.com/
16
  *
app/design/frontend/base/default/template/autoship/newsubscription/product_info.phtml CHANGED
@@ -9,7 +9,7 @@
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
app/design/frontend/base/default/template/autoship/newsubscription/shipping_address.phtml CHANGED
@@ -9,7 +9,7 @@
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
app/design/frontend/base/default/template/autoship/newsubscription/summary.phtml CHANGED
@@ -9,7 +9,7 @@
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
app/design/frontend/base/default/template/autoship/payment/form/cc.phtml CHANGED
@@ -9,7 +9,7 @@
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
app/design/frontend/base/default/template/autoship/payment/form/cc_saved.phtml CHANGED
@@ -9,7 +9,7 @@
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
app/design/frontend/base/default/template/autoship/payment/profile/edit.phtml CHANGED
@@ -9,7 +9,7 @@
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
app/design/frontend/base/default/template/autoship/payment/profile/grid.phtml CHANGED
@@ -9,7 +9,7 @@
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
app/design/frontend/base/default/template/autoship/payment/profile/new.phtml CHANGED
@@ -9,7 +9,7 @@
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
app/design/frontend/base/default/template/autoship/product/subscribe.phtml CHANGED
@@ -10,7 +10,7 @@
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
  * @author Dennis Rogers <dennis@storefrontconsulting.com>
13
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
14
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
15
  * @link http://www.subscribepro.com/
16
  *
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
  * @author Dennis Rogers <dennis@storefrontconsulting.com>
13
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
14
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
15
  * @link http://www.subscribepro.com/
16
  *
app/design/frontend/base/default/template/autoship/product/view/addtocart.phtml CHANGED
@@ -9,7 +9,7 @@
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
9
  * @category SFC
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
app/design/frontend/base/default/template/autoship/product/view/type/grouped/subscribe.phtml CHANGED
@@ -10,7 +10,7 @@
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
  * @author Dennis Rogers <dennis@storefrontconsulting.com>
13
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
14
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
15
  * @link http://www.subscribepro.com/
16
  *
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
  * @author Dennis Rogers <dennis@storefrontconsulting.com>
13
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
14
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
15
  * @link http://www.subscribepro.com/
16
  *
app/design/frontend/base/default/template/autoship/subscription/form/billing.phtml CHANGED
@@ -10,7 +10,7 @@
10
  * @package SFC_Autoship
11
  * @author Dennis Rogers <dennis@storefrontconsulting.com>
12
  * @author Garth Brantley <garth@subscribepro.com>
13
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
14
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
15
  * @link http://www.subscribepro.com/
16
  *
10
  * @package SFC_Autoship
11
  * @author Dennis Rogers <dennis@storefrontconsulting.com>
12
  * @author Garth Brantley <garth@subscribepro.com>
13
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
14
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
15
  * @link http://www.subscribepro.com/
16
  *
app/design/frontend/base/default/template/autoship/subscription/form/payment.phtml CHANGED
@@ -10,7 +10,7 @@
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
  * @author Dennis Rogers <dennis@storefrontconsulting.com>
13
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
14
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
15
  * @link http://www.subscribepro.com/
16
  *
10
  * @package SFC_Autoship
11
  * @author Garth Brantley <garth@subscribepro.com>
12
  * @author Dennis Rogers <dennis@storefrontconsulting.com>
13
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
14
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
15
  * @link http://www.subscribepro.com/
16
  *
app/design/frontend/base/default/template/autoship/subscription/form/shipping.phtml CHANGED
@@ -10,7 +10,7 @@
10
  * @package SFC_Autoship
11
  * @author Dennis Rogers <dennis@storefrontconsulting.com>
12
  * @author Garth Brantley <garth@subscribepro.com>
13
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
14
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
15
  * @link http://www.subscribepro.com/
16
  *
10
  * @package SFC_Autoship
11
  * @author Dennis Rogers <dennis@storefrontconsulting.com>
12
  * @author Garth Brantley <garth@subscribepro.com>
13
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
14
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
15
  * @link http://www.subscribepro.com/
16
  *
app/design/frontend/enterprise/default/layout/autoship.xml CHANGED
@@ -10,7 +10,7 @@
10
  * @category SFC
11
  * @package SFC_Autoship
12
  * @author Garth Brantley <garth@subscribepro.com>
13
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
14
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
15
  * @link http://www.subscribepro.com/
16
  *
10
  * @category SFC
11
  * @package SFC_Autoship
12
  * @author Garth Brantley <garth@subscribepro.com>
13
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
14
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
15
  * @link http://www.subscribepro.com/
16
  *
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>SFC_Autoship</name>
4
- <version>1.3.2.6</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.subscribepro.com/terms-of-service/">Subscribe Pro Commercial Software License</license>
7
  <channel>community</channel>
@@ -10,9 +10,9 @@
10
  <description>Manage your auto-ship program, customer subscription payments and recurring billing transactions to optimize customer retention and recurring revenue. The Subscribe Pro Extension for Magento allows you to easily implement subscriptions and recurring billing on your Magento website. Our extension is fully integrated into Magento and allows you to acquire and manage subscription customers directly in the Magento admin panel.</description>
11
  <notes>Subscribe Pro Extension Release</notes>
12
  <authors><author><name>Subscribe Pro</name><user>SF_Consulting</user><email>support@subscribepro.com</email></author></authors>
13
- <date>2015-11-06</date>
14
- <time>16:14:13</time>
15
- <contents><target name="magelocal"><dir name="SFC"><dir name="Autoship"><dir name="Block"><dir name="Adminhtml"><dir name="Customer"><dir name="Edit"><file name="Tabs.php" hash="324faebed3f1933a3dd46ff949257c12"/></dir><dir name="Paymentprofiles"><dir name="Edit"><file name="Form.php" hash="c64c65b46cc2a3d8b11c5632dc3b169c"/><dir name="Tab"><file name="Form.php" hash="808488ab5e15da6d0461b7d61f687a78"/></dir><file name="Tabs.php" hash="e6dd26321da4e4bd5ab3614ed6c21478"/></dir><file name="Edit.php" hash="1b816b790aef0bc0f2190b255fa38036"/><file name="Paymentprofile.php" hash="34a5aade9d3a5e7c8f2488a80842b320"/></dir></dir><dir name="Sales"><dir name="Order"><dir name="Create"><dir name="Billing"><dir name="Method"><file name="Form.php" hash="2cc22fddd456dcc5e6ff9c4ae7ff0bab"/></dir></dir><file name="Jsonp.php" hash="ffe4ba6b40a53fee4a9fafe775d58858"/><dir name="Product"><file name="Subscription.php" hash="13c3d8310779448571fba86109e2a750"/></dir></dir></dir></dir><dir name="System"><dir name="Config"><dir name="Form"><file name="TestConnectionButton.php" hash="be1efaaef2ec91e300d68d1537414863"/></dir></dir></dir></dir><dir name="Cart"><dir name="Product"><file name="Subscription.php" hash="2c63c67560ef4d4f5f512cf82af49aaf"/></dir></dir><dir name="Checkout"><file name="Jsonp.php" hash="9e061e2c21f8cfab1aad9993239d5f8e"/><dir name="Onepage"><dir name="Payment"><file name="Methods.php" hash="78d4a0061b477ba2e7ffdd97341c71f9"/></dir></dir></dir><dir name="Mysubscriptions"><dir name="Subscription"><dir name="Form"><file name="Billing.php" hash="b5a13e45b069412c6b3f17f5fa0b92c0"/><file name="Payment.php" hash="3b04e1aafd85089add3c88ce78687825"/><file name="Shipping.php" hash="0bf4cd339016a265dc33344158d05858"/></dir></dir><file name="Subscription.php" hash="c79ba864e41331a7508b99742c1a8ca1"/></dir><file name="Mysubscriptions.php" hash="14430c0eaa005a77af7baaab6611303f"/><dir name="Newsubscription"><dir name="Form"><file name="Billing.php" hash="5f6215847e07dcf70a72804b4e8d351c"/><file name="Payment.php" hash="dac0b8db0bd401f2a57ba81af7d0150d"/><file name="Shipping.php" hash="6fde0265466e927309a9085239c5f817"/></dir></dir><file name="Newsubscription.php" hash="6377f729e6df8c5485b32e042a2abb5c"/><dir name="Payment"><dir name="Form"><dir name="Cc"><file name="Saved.php" hash="99d9ec0ef623087958a4ed28fea79fcf"/></dir><file name="Cc.php" hash="0a2866b79a4daf1da35d5678b90b2891"/></dir><dir name="Info"><file name="Cc.php" hash="69d3cb6b421e60534797ddde9335d542"/></dir><dir name="Profile"><file name="Edit.php" hash="f0d71e58c22056e5e6f9ab59602ea37e"/><file name="Grid.php" hash="5da491d7db12b5ccbe7a3bbcee33d057"/></dir></dir><dir name="Product"><file name="Subscribe.php" hash="7c1c31a83888ff3598347e1dfcf7e2ce"/><dir name="View"><dir name="Type"><dir name="Grouped"><file name="Subscribe.php" hash="8a2d2308b3f762a2b2921a6d19a413ab"/></dir></dir></dir><file name="View.php" hash="8d1ead602bc46f38cf20de6e75cda7e2"/></dir><dir name="Subscription"><file name="Abstract.php" hash="ed4cd4c14c6acc43eafd265188b080b1"/><dir name="Form"><file name="Address.php" hash="644c0f94434001f8bd228ed0d80bfff9"/><file name="Payment.php" hash="ad817a1ca4eb7a7d96eb095b77fe8843"/></dir></dir></dir><dir name="Helper"><file name="Adminorder.php" hash="db2c3e8e518efd447c79823d7bbfa177"/><file name="Api.php" hash="0fea4f2c707bc990393e57c66290aa5f"/><file name="Data.php" hash="d13d83754c73ce649d4d069218a0e5a8"/><file name="Payment.php" hash="1f950fa0a89f826944466b8448cc850c"/><dir name="PaymentError"><file name="Exception.php" hash="2e180a089c0b515541e5cb474d09287d"/></dir><file name="PaymentError.php" hash="d34ccca09d2fb290205e78c80b665056"/><file name="Platform.php" hash="5a54a9260fa7efce4f067c36896374f8"/><file name="Product.php" hash="f691000a9cdcdf10e170251543bfe792"/><file name="Quote.php" hash="ac16c8f86a594ab5560ee481052bf8cc"/><file name="Schedule.php" hash="ea730420e600385df3c4308f0436f207"/><file name="Subscription.php" hash="cd6b9d8bb2b798ba245ea7813cfea834"/><file name="Vault.php" hash="b560032231392d70bb4bb015bd7a8203"/></dir><dir name="Model"><dir name="Api"><dir name="Cart"><file name="Api.php" hash="c10f821ab839d2d95965046fbffbc127"/></dir></dir><dir name="Checkout"><dir name="Cart"><file name="Api.php" hash="49f30c4ec5c2fc18ac33d40f6be12a41"/><dir name="Product"><file name="Api.php" hash="53552e01afe3b52b6808ab2792f40f2f"/></dir></dir></dir><dir name="Mysql4"><dir name="Subscription"><file name="Collection.php" hash="e566798b4e8e7326709653ff538b8ee7"/></dir><file name="Subscription.php" hash="65e44a52dd1d6aff8b6acd2675f07ec0"/></dir><file name="Observer.php" hash="18c663c2d621d3d6285590a02207c78d"/><dir name="Payment"><file name="Method.php" hash="309f76767974006b2539721cf169c0b2"/><dir name="Profile"><file name="Address.php" hash="916aefe0ad78e4280445d52245c78e73"/><file name="Collection.php" hash="94c6a7079d179f065f8a1f1c450bf20a"/></dir><file name="Profile.php" hash="ee74c488d2acf4bee5b1a474286ab182"/></dir><dir name="Paypal"><file name="Express.php" hash="74e9dae334a36a7742d8f7bcd617c995"/></dir><dir name="Platform"><file name="Product.php" hash="4b5ee034dbdb3c247640902db6a8fd9f"/></dir><dir name="Quote"><file name="Address.php" hash="ff29d531b5cbc80550a8e4652e44d19e"/></dir><dir name="Sales"><dir name="Quote"><file name="Item.php" hash="f4ecd49673b9a8f586977aaf3002158e"/></dir></dir><dir name="SalesRule"><dir name="Rule"><dir name="Condition"><file name="Product.php" hash="e1a2c3e996108b470d1b43cd165b6709"/></dir></dir><file name="Validator.php" hash="d6fd6a6d6b1eac7d286e25f31ceb0a13"/></dir><file name="Subscription.php" hash="666e1faf4a125e591cc67965c8e8fbb3"/><dir name="System"><dir name="Config"><dir name="Source"><file name="Cartrulediscountcombinetype.php" hash="9cb608bce8527a96c84013b93eec08e9"/><file name="Cctype.php" hash="d6a6e9850f528b87a3195d857a101f88"/><file name="Month.php" hash="4e4a684bea68d309ffab906eb48be98b"/><file name="Nextorderdatemode.php" hash="0150cb3b0a67d81ccaf25e8c59aab91e"/><file name="Shippingmethods.php" hash="3db5dc237d86fdca4a81521aec0685d0"/><file name="Year.php" hash="f33a16ad0a463c89e260570b55bec4b5"/></dir></dir></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="SppaymentprofileController.php" hash="e0c8d3419d7a4ae4692062fcca83e8ec"/><file name="SptestconnectionbuttonController.php" hash="fecdd079e1f89acf5d3a2e135d284c85"/></dir><file name="MycreditcardsController.php" hash="f9ea234e349ff859b781143b0bb0e48c"/><file name="MysubscriptionsController.php" hash="342edd6fcfdc93ed6e323123d153ad43"/><file name="NewsubscriptionController.php" hash="62f58c7dd06044a80cca1ff0c0b96e65"/></dir><dir name="etc"><file name="adminhtml.xml" hash="24fb76c426527354a34ec6c9be73c80b"/><file name="api.xml" hash="92dcea5b6884b1dc952b8f719409948d"/><file name="config.xml" hash="2de0963291a226f2328c7def72aa7d95"/><file name="system.xml" hash="cfd18e496c19dcbe16daed14d59c355d"/></dir><dir name="sql"><dir name="sfc_autoship_setup"><file name="mysql4-install-1.3.1.8.php" hash="4a93b674b9b7dcfdaa955878e09e3fc7"/><file name="mysql4-uninstall-1.3.1.4.php" hash="1e00347d1040b76a65f34158bcc17874"/><file name="mysql4-upgrade-1.1.0-1.1.1.php" hash="975d72d3c954cd635e9ed71852eb604c"/><file name="mysql4-upgrade-1.1.2-1.2.0.php" hash="2a9f3c6d8043a7fd230fea8bb6e14f47"/><file name="mysql4-upgrade-1.2.2.1-1.2.2.2.php" hash="f1332f7a473196b790fb6a15b60801cd"/><file name="mysql4-upgrade-1.2.3-1.2.4.php" hash="86ab8f0f0ea4830dcc0c6f20cbece8b7"/><file name="mysql4-upgrade-1.2.4.6-1.2.4.7.php" hash="5ad183dfc8a53b84650e27701b296716"/><file name="mysql4-upgrade-1.3.0.1-1.3.0.2.php" hash="457a5611a2f927a376dfed3a3d5e40be"/><file name="mysql4-upgrade-1.3.0.5-1.3.1.0.php" hash="d21a249dd1986a61bd8198fe3dd9545d"/><file name="mysql4-upgrade-1.3.1.15-1.3.1.16.php" hash="0b52f100fcea31b33b7035d13a44b79b"/><file name="mysql4-upgrade-1.3.1.3-1.3.1.4.php" hash="669964df8638c3cd42bc39849604614f"/><file name="mysql4-upgrade-1.3.1.4-1.3.1.5.php" hash="bd54231d4bff0371503799f1012926f9"/><file name="mysql4-upgrade-1.3.1.7-1.3.1.8.php" hash="d89e730e526d2667d7d18b3b1cb6ca5a"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="SFC_Autoship.xml" hash="35cd3f244a2b3249057c4c1790538f35"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="autoship.xml" hash="b4f25c12857e5cd066167d492d2f9d49"/></dir><dir name="template"><dir name="autoship"><dir name="cart"><dir name="product"><file name="subscription.phtml" hash="f1f3457613fb0f03eaf677f1564af3d9"/></dir></dir><dir name="checkout"><file name="jsonp.phtml" hash="4b4b0bcb1383e6a19079d8ed7b3e5461"/><file name="serversideapi.phtml" hash="ee841b58e10d5bad42f11086df8f1c21"/><file name="success.phtml" hash="d4fdb9ec6e72752f356c98efb889d7da"/></dir><dir name="giftcardaccount"><dir name="onepage"><dir name="payment"><file name="scripts.phtml" hash="2236cb498a9f60c401ce05300397d653"/></dir></dir></dir><dir name="mysubscriptions"><dir name="subscription"><file name="actions.phtml" hash="bde0af6567a53c286769bb248fe161fe"/><file name="billing_address.phtml" hash="ea40cacd90e77d712f3aa635b7f3da0f"/><file name="payment.phtml" hash="77e5644fee717246fa9554a6764d1b56"/><file name="product_info.phtml" hash="ad10c223fbd31fbb90144f501feb9f00"/><file name="shipping_address.phtml" hash="679153e1e6d60a04146f8fa6337c9198"/><file name="subscription_info.phtml" hash="b5333a7583c4b84da2414d560e9ad02a"/></dir><file name="subscription.phtml" hash="fc4379c5da4ed70fae9610cbd9e971c0"/></dir><file name="mysubscriptions.phtml" hash="b480674c647155f170a890f3ab1d3fcf"/><dir name="newsubscription"><file name="ajax_update.phtml" hash="6165fe63bfd32e11319fba40f23fd6cf"/><file name="billing_address.phtml" hash="3902047a5904e7cf6d3a33085a898ddd"/><file name="delivery_date.phtml" hash="a937bb32c4900b9650cc903662ecc5a9"/><file name="delivery_frequency.phtml" hash="318a1a5987a3fb1e397a8f53df3e8936"/><file name="payment.phtml" hash="e87e497b5451a2ee7745728f1ba5c154"/><file name="product_info.phtml" hash="46b2419447f9ec7cc67c110f932e7f8b"/><file name="shipping_address.phtml" hash="7a087557d24e0d79d0291d622a7e9c6b"/><file name="summary.phtml" hash="860a8f068f5c721b56d95db0e689429a"/></dir><file name="newsubscription.phtml" hash="25d7bf862ef9746fe2dd4c9bcea2d744"/><dir name="payment"><dir name="form"><file name="cc.phtml" hash="51f946cc57fa877385d6792fa023407f"/><file name="cc_saved.phtml" hash="e63b2a0188c8eeae918e1ef38afe0da5"/></dir><dir name="profile"><file name="edit.phtml" hash="f5704ec37e6908711d7393b544b0d3e8"/><file name="grid.phtml" hash="963f14a165181036d77a2e814a003838"/><file name="new.phtml" hash="ae585d2c2f0beac4bdc6068221e1310c"/></dir></dir><dir name="product"><file name="subscribe.phtml" hash="7c40d18f160351a3e02eb60a85679197"/><dir name="view"><file name="addtocart.phtml" hash="90cc1bc0fabf84eafd7ee948710139e1"/><dir name="type"><dir name="grouped"><file name="subscribe.phtml" hash="475e9feb164d640109fd053e2c98a92e"/></dir></dir></dir></dir><dir name="subscription"><dir name="form"><file name="billing.phtml" hash="e381ce871a7fb1ee1ad685c780abf5d8"/><file name="payment.phtml" hash="7bff7ba34f6f7747951bc3c217a79209"/><file name="shipping.phtml" hash="e1e2fdaf910cf6228aa5c783e1695596"/></dir></dir></dir></dir></dir></dir><dir name="enterprise"><dir name="default"><dir name="layout"><file name="autoship.xml" hash="de3be9da9f6b76342698a61e9363c50d"/></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="autoship.xml" hash="f5f2d6e16e2adb4bf9a01a8cc3e4db8c"/></dir><dir name="template"><dir name="autoship"><dir name="payment"><dir name="form"><file name="cc.phtml" hash="9c8725873d2ef50748982a3677ba86b4"/><file name="cc_saved.phtml" hash="450b1184ce1968149a5be8896e95e05a"/></dir></dir><dir name="sales"><dir name="create_order"><file name="jsonp.phtml" hash="b507e2f4d74312f7f8a3ea220634f49e"/><dir name="product"><file name="subscription.phtml" hash="0f6fc9663d6846270610c529f00d7e37"/></dir></dir></dir><dir name="system"><dir name="config"><file name="test_connection_button.phtml" hash="1ab886afca2bca69d25f543e28482fc9"/></dir></dir></dir></dir></dir></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><file name="autoship.css" hash="1f3740432347441ec94de69878a1d159"/></dir><dir name="images"><dir name="autoship"><file name="bkg_active-step.gif" hash="01d803ca8f4d7c7fb96c96694d233810"/><file name="bkg_block.gif" hash="df355007ee78db8a33c4e542594fe3f2"/><file name="bkg_btn-co.gif" hash="45547679e3ba34e4fd2a69750bbad05d"/><file name="bkg_thead.gif" hash="9957f9c2b564965d4d1a0ef1edcb1349"/><file name="calendar_icon.png" hash="f7073fc49641344b880a0b3218f2b261"/><file name="white_trans.png" hash="118606bdffc3e99bf15c6544cfdff1c2"/></dir></dir><dir name="js"><dir name="autoship"><file name="checkout.js" hash="cb92f1cc9bac34057843e6dcd5a38290"/><dir name="jquery"><file name="jquery-1.10.1.min.js" hash="33d85132f0154466fc017dd05111873d"/><file name="noconflict.js" hash="d8cc6cf5baad45a3ff03f75649f8ee41"/><dir name="ui"><file name="jquery.ui.core.min.js" hash="739cf68f21c10e04cde3ad13fcff9063"/><file name="jquery.ui.datepicker.min.js" hash="4eac58ed8deb3189c8d05bab9187f1ce"/><dir name="theme"><dir name="images"><file name="animated-overlay.gif" hash="2b912f7c0653008ca28ebacda49025e7"/><file name="ui-bg_flat_0_aaaaaa_40x100.png" hash="2a44fbdb7360c60122bcf6dcef0387d8"/><file name="ui-bg_flat_75_ffffff_40x100.png" hash="8692e6efddf882acbff144c38ea7dfdf"/><file name="ui-bg_glass_55_fbf9ee_1x400.png" hash="f8f4558e0b92ff2cd6136781533902ec"/><file name="ui-bg_glass_65_ffffff_1x400.png" hash="e5a8f32e28fd5c27bf0fed33c8a8b9b5"/><file name="ui-bg_glass_75_dadada_1x400.png" hash="c12c6510dad3ebfa64c8a30e959a2469"/><file name="ui-bg_glass_75_e6e6e6_1x400.png" hash="f4254356c2a8c9a383205ef2c4de22c4"/><file name="ui-bg_glass_95_fef1ec_1x400.png" hash="5a3be2d8fff8324d59aec3df7b0a0c83"/><file name="ui-bg_highlight-soft_75_cccccc_1x100.png" hash="72c593d16e998952cd8d798fee33c6f3"/><file name="ui-icons_222222_256x240.png" hash="9129e086dc488d8bcaf808510bc646ba"/><file name="ui-icons_2e83ff_256x240.png" hash="25162bf857a8eb83ea932a58436e1049"/><file name="ui-icons_454545_256x240.png" hash="771099482bdc1571ece41073b1752596"/><file name="ui-icons_888888_256x240.png" hash="faf6f5dc44e713178784c1fb053990aa"/><file name="ui-icons_cd0a0a_256x240.png" hash="5d8808d43cefca6f6781a5316d176632"/></dir><file name="jquery-ui.css" hash="dfcf2d9b984ec33bc6bb11e755ca0931"/></dir></dir></dir><file name="mysubscription.js" hash="2f1cb810774eb6d42601c579584a4d1b"/><file name="newsubscription.js" hash="12a8a54a2b47408e7268325c095aa271"/></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="js"><dir name="autoship"><dir name="jquery"><file name="jquery-1.10.1.min.js" hash="33d85132f0154466fc017dd05111873d"/><file name="noconflict.js" hash="d8cc6cf5baad45a3ff03f75649f8ee41"/></dir><file name="sales_create_order.js" hash="07f17495a2d1ba171d35798478fe0616"/></dir></dir></dir></dir></dir></target><target name="magelib"><dir name="OAuth2"><file name="Client.php" hash="fa9439393ed6483bd7d07af87df09b7e"/><dir name="GrantType"><file name="AuthorizationCode.php" hash="a1ff324a733fc33dbf938153c4c1667c"/><file name="ClientCredentials.php" hash="21b30fbb06d4b67263499d687316ae8b"/><file name="IGrantType.php" hash="ee03d4c5bc20f518716fc2c616b4d38d"/><file name="Password.php" hash="2e938e60c4af8bad71b5c4f0f1a40969"/><file name="RefreshToken.php" hash="a773f48348ad7aa510955099ba18d3ad"/></dir><file name="README" hash="8ef3bf723c93b6e091b707a546df2804"/></dir></target><target name="mage"><dir name="shell"><file name="autoship_prod_sync.php" hash="631910ac8ed6d0825bbd41f397934572"/><file name="autoship_report_dl.php" hash="99eeb37784720ef5bc5aed2db81da4d0"/><file name="autoship_customer_sync.php" hash="af19184a593d841fd187946952e34c79"/></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.2.0</min><max>6.2.0</max></php></required></dependencies>
18
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>SFC_Autoship</name>
4
+ <version>1.3.2.10</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.subscribepro.com/terms-of-service/">Subscribe Pro Commercial Software License</license>
7
  <channel>community</channel>
10
  <description>Manage your auto-ship program, customer subscription payments and recurring billing transactions to optimize customer retention and recurring revenue. The Subscribe Pro Extension for Magento allows you to easily implement subscriptions and recurring billing on your Magento website. Our extension is fully integrated into Magento and allows you to acquire and manage subscription customers directly in the Magento admin panel.</description>
11
  <notes>Subscribe Pro Extension Release</notes>
12
  <authors><author><name>Subscribe Pro</name><user>SF_Consulting</user><email>support@subscribepro.com</email></author></authors>
13
+ <date>2016-03-09</date>
14
+ <time>15:11:48</time>
15
+ <contents><target name="magelocal"><dir name="SFC"><dir name="Autoship"><dir name="Block"><dir name="Adminhtml"><dir name="Customer"><dir name="Edit"><file name="Tabs.php" hash="324faebed3f1933a3dd46ff949257c12"/></dir><dir name="Paymentprofiles"><dir name="Edit"><file name="Form.php" hash="48dd98caa098dde6e642447f8aca0cd7"/><dir name="Tab"><file name="Form.php" hash="b5789783aac319c7e6e23bbb42cc403c"/></dir><file name="Tabs.php" hash="f86bc9159c34cb846af86bcba7ca09aa"/></dir><file name="Edit.php" hash="eac8c180a3ff1c1673edb61ef0166530"/><file name="Paymentprofile.php" hash="e4fe5d2cfa6d446783750a443584fd79"/></dir></dir><dir name="Sales"><dir name="Order"><dir name="Create"><dir name="Billing"><dir name="Method"><file name="Form.php" hash="2cc22fddd456dcc5e6ff9c4ae7ff0bab"/></dir></dir><file name="Jsonp.php" hash="4eb6d87cceeb063877f2ba86172f3a53"/><dir name="Product"><file name="Subscription.php" hash="13c3d8310779448571fba86109e2a750"/></dir></dir></dir></dir><dir name="System"><dir name="Config"><dir name="Form"><file name="Fielddisabled.php" hash="bc205c4afee290c5bc8e9173cec85fc2"/><file name="TestConnectionButton.php" hash="9af7b9a40f0220a8451360aea45ba5eb"/></dir></dir></dir></dir><dir name="Cart"><dir name="Product"><file name="Subscription.php" hash="174d55a19fb76ab001b43ff47d521c23"/></dir></dir><dir name="Checkout"><file name="Jsonp.php" hash="5df75ab21f0dd29ffe468c85669aadfa"/><dir name="Onepage"><dir name="Payment"><file name="Methods.php" hash="a01fc64048f13f5db109c30ca2301897"/></dir></dir></dir><dir name="Mysubscriptions"><dir name="Subscription"><dir name="Form"><file name="Billing.php" hash="ef440cdafd32896c586b48d8a8a75c8d"/><file name="Payment.php" hash="e8d2117f3e37d067076ffa1c41a73652"/><file name="Shipping.php" hash="01415536b26fefa6d15baf67657f3e53"/></dir></dir><file name="Subscription.php" hash="a04b9d72edb4b5ff2a36d3caac2c9de7"/></dir><file name="Mysubscriptions.php" hash="14ce3b7b0ba963142f71b39c8b04a1c5"/><dir name="Newsubscription"><dir name="Form"><file name="Billing.php" hash="08f8d7b1448ed98ea7a5e387712f0fcf"/><file name="Payment.php" hash="aa64cb7800dd136e118bf4b57bf23c12"/><file name="Shipping.php" hash="581275f5681f6a0a71155d5034491fa5"/></dir></dir><file name="Newsubscription.php" hash="ba9b88e0bce5f4d9fc4df87f0babb6f3"/><dir name="Payment"><dir name="Form"><dir name="Cc"><file name="Saved.php" hash="5637d85bb4ca453ed3ee98e40bcdbdfa"/></dir><file name="Cc.php" hash="2692488f48034b19c7558eda24e315bf"/></dir><dir name="Info"><file name="Cc.php" hash="691ccace128a5f0c9b18e7d193837849"/></dir><dir name="Profile"><file name="Edit.php" hash="a3bf4d6ce88bd9352c77ae21916ae626"/><file name="Grid.php" hash="84918b518f1d2a8a0f4fe3a75339cc5b"/></dir></dir><dir name="Product"><file name="Subscribe.php" hash="ff6c9b609aba08a6e8635a6a24fc45ce"/><dir name="View"><dir name="Type"><dir name="Grouped"><file name="Subscribe.php" hash="acfb3afc1363b5d52aba63c8fbdddc77"/></dir></dir></dir><file name="View.php" hash="f73744f52ab87c51d8a0da3a9b0b2b84"/></dir><dir name="Subscription"><file name="Abstract.php" hash="cf49b0721d8fe929c37cf8764384c5ce"/><dir name="Form"><file name="Address.php" hash="6e25cc712e5496f2fa2757d99cfb176e"/><file name="Payment.php" hash="b1b7b35b3132f638dd0b06896f15db6a"/></dir></dir></dir><dir name="Helper"><file name="Adminorder.php" hash="067c0eeb61a57aec94f264806d681a60"/><file name="Api.php" hash="03a8b41eb9727379c06817276101729d"/><file name="Data.php" hash="f3b0cd8e4a7d2517cd34c42e3d696b2e"/><file name="Payment.php" hash="4bff557ba70be303f284f61cb48fca1b"/><dir name="PaymentError"><file name="Exception.php" hash="b1031006d9ac5f024f3bf8e15bb438df"/></dir><file name="PaymentError.php" hash="bbe642f7c107e4385f91d3d09aaf9275"/><file name="Platform.php" hash="3823db7f4cfd3eb669173901c49206af"/><file name="Product.php" hash="1e4c909d23cbd8176a2de6fe29785892"/><file name="Quote.php" hash="197101fcb18d516758bbca0390a2c49a"/><file name="Schedule.php" hash="2ceda8e716e7505eb25e9ae81fb77584"/><file name="Subscription.php" hash="73265716f3e0ec6f1389198c9e14d1c6"/><file name="Vault.php" hash="e32e1ed2deb2bd4da5ee7ff000426029"/></dir><dir name="Model"><dir name="Adminhtml"><file name="Observer.php" hash="090dbea6ff7c5f799f13c7e806967f24"/></dir><dir name="Api"><dir name="Cart"><file name="Api.php" hash="26f1dcc8ce770fedc5a2ef1c92575454"/></dir></dir><dir name="Checkout"><dir name="Cart"><file name="Api.php" hash="4270cdd675ebd984f7b6f1bd6412d317"/><dir name="Product"><file name="Api.php" hash="f174774195d22f59b30d830ad3d74d99"/></dir></dir></dir><dir name="Mysql4"><dir name="Subscription"><file name="Collection.php" hash="9f7c8d5c0c9794466e4eeb2d8374ccb0"/></dir><file name="Subscription.php" hash="a2efd1f657149ed41fa3891ea35dcf58"/></dir><file name="Observer.php" hash="c76abbbbf7d39cf5d8a117513af18ea8"/><dir name="Payment"><file name="Method.php" hash="530d5edf690660df103ea3b037cea722"/><dir name="Profile"><file name="Address.php" hash="ca74a3797cba026a92ce4831da7221c0"/><file name="Collection.php" hash="d293b0970e0f91bed76c10cd9471e202"/></dir><file name="Profile.php" hash="401bcc5d078476db571fd5f3f53886ff"/></dir><dir name="Paypal"><file name="Express.php" hash="f9d9c2bad8400cd3a18926f40acb8f5b"/></dir><dir name="Platform"><file name="Product.php" hash="082d449e2c87e1c73cf557fe46bd8447"/></dir><dir name="Quote"><file name="Address.php" hash="b767e70f3f1f18ee5aceb129d651e352"/></dir><dir name="Sales"><dir name="Quote"><file name="Item.php" hash="f4ecd49673b9a8f586977aaf3002158e"/></dir></dir><dir name="SalesRule"><dir name="Rule"><dir name="Condition"><file name="Product.php" hash="3bfd24ccb50e2ef77a8b3b39f4c6b8fb"/></dir></dir><file name="Validator.php" hash="8befceb5d19283a58c93a45e6391ab6d"/></dir><dir name="Shipping"><file name="Carrier.php" hash="95e36593f0fb9b671c385bd7090619aa"/></dir><file name="Subscription.php" hash="477709643e4f8d1c5827ee42414616da"/><dir name="System"><dir name="Config"><dir name="Source"><file name="Cartrulediscountcombinetype.php" hash="06e9a101facbc36fea76594a8bad4ecc"/><file name="Cctype.php" hash="d2eac90e00f0da471f1d488ce98088c1"/><file name="Loglevel.php" hash="b43a8061d5ab01a5748edb6527c2b9dd"/><file name="Month.php" hash="547baa422940db4cfd2c8e482955fd29"/><file name="Nextorderdatemode.php" hash="b2253c01aa0c4f7845da16223f729a5d"/><file name="Shippingmethods.php" hash="9400472dcc7b4253b53a2af33bdf00ec"/><file name="Year.php" hash="14d191c257c4e7ba74c209435e993c29"/></dir></dir></dir></dir><dir name="controllers"><dir name="Adminhtml"><dir name="Sales"><dir name="Order"><file name="InvoiceController.php" hash="9fc85857b9e5e8e735419496fe299499"/></dir></dir><file name="SporderpaymentController.php" hash="105387c45ccb1253003f7d8307a77b0c"/><file name="SppaymentprofileController.php" hash="8a8ac37ee740f315b3620071608b0b7f"/><file name="SptestconnectionbuttonController.php" hash="31ae6cdd81d5c005bfc491c349e35d2e"/></dir><file name="MycreditcardsController.php" hash="7c80caefd52487fa883c84a6a9b5069c"/><file name="MysubscriptionsController.php" hash="d3cc7c64558b0845acc609d15a81df22"/><file name="NewsubscriptionController.php" hash="54556039eaf2ac7366f8bb6dba82af9d"/></dir><dir name="etc"><file name="adminhtml.xml" hash="c021e8ada255b1c99322c6c013028cad"/><file name="api.xml" hash="92dcea5b6884b1dc952b8f719409948d"/><file name="config.xml" hash="3d928ac745450a05f94f98c752da8f76"/><file name="system.xml" hash="367fde6744cc22bc4686850a1dcedf26"/></dir><dir name="sql"><dir name="sfc_autoship_setup"><file name="mysql4-install-1.3.2.10.php" hash="865fb75947537b5dac61ffe95c7f14f4"/><file name="mysql4-uninstall-1.3.1.4.php" hash="379f57c646a141605e25d34f1afc3c66"/><file name="mysql4-upgrade-1.1.0-1.1.1.php" hash="b9ce0c199825e7694dc04de73fbc7482"/><file name="mysql4-upgrade-1.1.2-1.2.0.php" hash="30ddfa9461bb9ebca5a21fa10a094273"/><file name="mysql4-upgrade-1.2.2.1-1.2.2.2.php" hash="1e18cb95c4a9e6d08d0a22687f5a76e1"/><file name="mysql4-upgrade-1.2.3-1.2.4.php" hash="3b32836a64d51cfc95434fa24e81a586"/><file name="mysql4-upgrade-1.2.4.6-1.2.4.7.php" hash="6b1eded8927ca927fdeeb7d9f527bd4f"/><file name="mysql4-upgrade-1.3.0.1-1.3.0.2.php" hash="c3042a6975747a0f872e40cc77efa9dc"/><file name="mysql4-upgrade-1.3.0.5-1.3.1.0.php" hash="181ce25b35accb7a8ad9b924f71581a0"/><file name="mysql4-upgrade-1.3.1.15-1.3.1.16.php" hash="27a026e80206c3774ccd2635ef7c3261"/><file name="mysql4-upgrade-1.3.1.3-1.3.1.4.php" hash="e753906c537b4cda88ed5de1c4713974"/><file name="mysql4-upgrade-1.3.1.4-1.3.1.5.php" hash="7bc2103b4c750b94e213e06c0c40eef8"/><file name="mysql4-upgrade-1.3.1.7-1.3.1.8.php" hash="f74fd035d15cb29a269591afcb19828f"/><file name="mysql4-upgrade-1.3.2.9-1.3.2.10.php" hash="3af0fd12e589977b9dc8af3ee4e54d7a"/></dir></dir></dir><file name="Autoship.php" hash="64a92742fce8a1ec9ea2537d14819b1e"/></dir></target><target name="mageetc"><dir name="modules"><file name="SFC_Autoship.xml" hash="35cd3f244a2b3249057c4c1790538f35"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="autoship.xml" hash="12f1b9e9cc47a3b5d4616942f527ab44"/></dir><dir name="template"><dir name="autoship"><dir name="cart"><dir name="product"><file name="subscription.phtml" hash="faa62a1da4a84a8cc5120aa61d343821"/></dir></dir><dir name="checkout"><file name="jsonp.phtml" hash="bd1447621e55dcc33f0853ec5d6c8a5d"/><file name="serversideapi.phtml" hash="63c89a0b18b5376971c42f9a8f7cd459"/><file name="success.phtml" hash="59739a2653933858e0614dc0218ed05e"/></dir><dir name="giftcardaccount"><dir name="onepage"><dir name="payment"><file name="scripts.phtml" hash="2236cb498a9f60c401ce05300397d653"/></dir></dir></dir><dir name="mysubscriptions"><dir name="subscription"><file name="actions.phtml" hash="e1a24c5aacb3b883c78098a29e502f52"/><file name="billing_address.phtml" hash="be8a3ceb1f8c7853c4ef807350587720"/><file name="payment.phtml" hash="09a56e4ae1ff4165fe968918c6b03064"/><file name="product_info.phtml" hash="b3a42c177326e12cd47b424a8f1b1492"/><file name="shipping_address.phtml" hash="5aaf4eaa9aac2efbab96bb3615362e85"/><file name="subscription_info.phtml" hash="6db3d2a99adcf2fb225e7990603972ed"/></dir><file name="subscription.phtml" hash="b29e1d5da54dd53b382cd5dc5a653839"/></dir><file name="mysubscriptions.phtml" hash="01538168d9bcf0c2aae97eccb58545a1"/><dir name="newsubscription"><file name="ajax_update.phtml" hash="b6e2a0d5ae5f573558160ac08686d148"/><file name="billing_address.phtml" hash="07dcf489164decae399d07ff7ee8b216"/><file name="delivery_date.phtml" hash="d6afc8039851b2a1b208bd9569b7a3fb"/><file name="delivery_frequency.phtml" hash="49024afa27ddd5c1c8bd28858e41429f"/><file name="payment.phtml" hash="efe6472d58cabdf1882b44d92ca69c2d"/><file name="product_info.phtml" hash="dd358a19b060582b1e82cda4cef0bdc6"/><file name="shipping_address.phtml" hash="61c7479bf639ae5c459e7e18d9729611"/><file name="summary.phtml" hash="3a176185738cc0f023b20b030ffc4a25"/></dir><file name="newsubscription.phtml" hash="97be1c3d0be360a1949864a6f3d9f35c"/><dir name="payment"><dir name="form"><file name="cc.phtml" hash="c7d67649c87c70683d64b755f2635175"/><file name="cc_saved.phtml" hash="0ba3f3340c0ed62ceda5197b66242f30"/></dir><dir name="profile"><file name="edit.phtml" hash="540df63a35e8b2d5039fbf8f8ff061f3"/><file name="grid.phtml" hash="12aec08dca16e01e3aa5ae6ae46f9e8e"/><file name="new.phtml" hash="6e9848e905479e8ea839e1e370f7582e"/></dir></dir><dir name="product"><file name="subscribe.phtml" hash="0850e6748dfbcd99a4e9a2e095b9cb1c"/><dir name="view"><file name="addtocart.phtml" hash="735377e75b8ddec90f0d75da2c451692"/><dir name="type"><dir name="grouped"><file name="subscribe.phtml" hash="cbeb9d9183a9ae094f127ae0384c2cd3"/></dir></dir></dir></dir><dir name="subscription"><dir name="form"><file name="billing.phtml" hash="5aa0c33a1ae03e63463047a7002b1634"/><file name="payment.phtml" hash="2cf9416fb4d306c978fe6be4c245fd23"/><file name="shipping.phtml" hash="c21cb19339568404c3bc5f4ba54c3601"/></dir></dir></dir></dir></dir></dir><dir name="enterprise"><dir name="default"><dir name="layout"><file name="autoship.xml" hash="e440dffa00c0a15eb8da723e13172b71"/></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="autoship.xml" hash="7ecb20ca381b7f24cf196b75ba480588"/></dir><dir name="template"><dir name="autoship"><dir name="payment"><dir name="form"><file name="cc.phtml" hash="d50530e33a0a2bf97007e3b49d1a9b25"/><file name="cc_saved.phtml" hash="b51bbe49479ddacba6180d83771c6273"/></dir></dir><dir name="sales"><dir name="create_order"><file name="jsonp.phtml" hash="5bed9025547f57ff573a5fa2f11b16d2"/><dir name="product"><file name="subscription.phtml" hash="054d871ae41fa6db19ae1b276ca7bb5f"/></dir></dir></dir><dir name="system"><dir name="config"><file name="test_connection_button.phtml" hash="1ab886afca2bca69d25f543e28482fc9"/></dir></dir></dir></dir></dir></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><file name="autoship.css" hash="b4e2486d260c4ed08029fbe447c408e3"/></dir><dir name="images"><dir name="autoship"><file name="bkg_active-step.gif" hash="01d803ca8f4d7c7fb96c96694d233810"/><file name="bkg_block.gif" hash="df355007ee78db8a33c4e542594fe3f2"/><file name="bkg_btn-co.gif" hash="45547679e3ba34e4fd2a69750bbad05d"/><file name="bkg_thead.gif" hash="9957f9c2b564965d4d1a0ef1edcb1349"/><file name="calendar_icon.png" hash="f7073fc49641344b880a0b3218f2b261"/><file name="white_trans.png" hash="118606bdffc3e99bf15c6544cfdff1c2"/></dir></dir><dir name="js"><dir name="autoship"><file name="checkout.js" hash="aac9dbccd066fd1e614910db86f838a3"/><dir name="jquery"><file name="jquery-1.10.1.min.js" hash="33d85132f0154466fc017dd05111873d"/><file name="noconflict.js" hash="f64a7d5a68b0bf56b691aafd9a6df3e2"/><dir name="ui"><file name="jquery.ui.core.min.js" hash="739cf68f21c10e04cde3ad13fcff9063"/><file name="jquery.ui.datepicker.min.js" hash="4eac58ed8deb3189c8d05bab9187f1ce"/><dir name="theme"><dir name="images"><file name="animated-overlay.gif" hash="2b912f7c0653008ca28ebacda49025e7"/><file name="ui-bg_flat_0_aaaaaa_40x100.png" hash="2a44fbdb7360c60122bcf6dcef0387d8"/><file name="ui-bg_flat_75_ffffff_40x100.png" hash="8692e6efddf882acbff144c38ea7dfdf"/><file name="ui-bg_glass_55_fbf9ee_1x400.png" hash="f8f4558e0b92ff2cd6136781533902ec"/><file name="ui-bg_glass_65_ffffff_1x400.png" hash="e5a8f32e28fd5c27bf0fed33c8a8b9b5"/><file name="ui-bg_glass_75_dadada_1x400.png" hash="c12c6510dad3ebfa64c8a30e959a2469"/><file name="ui-bg_glass_75_e6e6e6_1x400.png" hash="f4254356c2a8c9a383205ef2c4de22c4"/><file name="ui-bg_glass_95_fef1ec_1x400.png" hash="5a3be2d8fff8324d59aec3df7b0a0c83"/><file name="ui-bg_highlight-soft_75_cccccc_1x100.png" hash="72c593d16e998952cd8d798fee33c6f3"/><file name="ui-icons_222222_256x240.png" hash="9129e086dc488d8bcaf808510bc646ba"/><file name="ui-icons_2e83ff_256x240.png" hash="25162bf857a8eb83ea932a58436e1049"/><file name="ui-icons_454545_256x240.png" hash="771099482bdc1571ece41073b1752596"/><file name="ui-icons_888888_256x240.png" hash="faf6f5dc44e713178784c1fb053990aa"/><file name="ui-icons_cd0a0a_256x240.png" hash="5d8808d43cefca6f6781a5316d176632"/></dir><file name="jquery-ui.css" hash="dfcf2d9b984ec33bc6bb11e755ca0931"/></dir></dir></dir><file name="mysubscription.js" hash="99877078a4e14af09598422a35b2e9a8"/><file name="newsubscription.js" hash="08444134c8ccb501bfd08595dff8671a"/></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="js"><dir name="autoship"><dir name="jquery"><file name="jquery-1.10.1.min.js" hash="33d85132f0154466fc017dd05111873d"/><file name="noconflict.js" hash="f64a7d5a68b0bf56b691aafd9a6df3e2"/></dir><file name="sales_create_order.js" hash="8155645f0cdd1d988a46f1c84bd4f88c"/></dir></dir></dir></dir></dir></target><target name="magelib"><dir name="OAuth2"><file name="Client.php" hash="fa9439393ed6483bd7d07af87df09b7e"/><dir name="GrantType"><file name="AuthorizationCode.php" hash="a1ff324a733fc33dbf938153c4c1667c"/><file name="ClientCredentials.php" hash="21b30fbb06d4b67263499d687316ae8b"/><file name="IGrantType.php" hash="ee03d4c5bc20f518716fc2c616b4d38d"/><file name="Password.php" hash="2e938e60c4af8bad71b5c4f0f1a40969"/><file name="RefreshToken.php" hash="a773f48348ad7aa510955099ba18d3ad"/></dir><file name="README" hash="8ef3bf723c93b6e091b707a546df2804"/></dir></target><target name="mage"><dir name="shell"><file name="autoship_prod_sync.php" hash="0d669938bf21b7b7d8e0fe87470d4d12"/><file name="autoship_report_dl.php" hash="996707ddf4a7a8f45e40fc7873354026"/><file name="autoship_customer_sync.php" hash="4a1364a020fec24287d4a6d24ee3d2d8"/></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.2.0</min><max>6.2.0</max></php></required></dependencies>
18
  </package>
shell/autoship_customer_sync.php CHANGED
@@ -10,7 +10,7 @@
10
  * @package SFC_Autoship
11
  * @author Dennis Rogers <dennis@storefrontconsulting.com>
12
  * @author Garth Brantley <garth@subscribepro.com>
13
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
14
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
15
  * @link http://www.subscribepro.com/
16
  *
10
  * @package SFC_Autoship
11
  * @author Dennis Rogers <dennis@storefrontconsulting.com>
12
  * @author Garth Brantley <garth@subscribepro.com>
13
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
14
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
15
  * @link http://www.subscribepro.com/
16
  *
shell/autoship_prod_sync.php CHANGED
@@ -10,7 +10,7 @@
10
  * @package SFC_Autoship
11
  * @author Dennis Rogers <dennis@storefrontconsulting.com>
12
  * @author Garth Brantley <garth@subscribepro.com>
13
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
14
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
15
  * @link http://www.subscribepro.com/
16
  *
10
  * @package SFC_Autoship
11
  * @author Dennis Rogers <dennis@storefrontconsulting.com>
12
  * @author Garth Brantley <garth@subscribepro.com>
13
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
14
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
15
  * @link http://www.subscribepro.com/
16
  *
shell/autoship_report_dl.php CHANGED
@@ -10,7 +10,7 @@
10
  * @package SFC_Autoship
11
  * @author Dennis Rogers <dennis@storefrontconsulting.com>
12
  * @author Garth Brantley <garth@subscribepro.com>
13
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
14
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
15
  * @link http://www.subscribepro.com/
16
  *
10
  * @package SFC_Autoship
11
  * @author Dennis Rogers <dennis@storefrontconsulting.com>
12
  * @author Garth Brantley <garth@subscribepro.com>
13
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
14
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
15
  * @link http://www.subscribepro.com/
16
  *
skin/adminhtml/default/default/js/autoship/jquery/noconflict.js CHANGED
@@ -7,7 +7,7 @@
7
  * @package SFC_Autoship
8
  * @author Garth Brantley <garth@subscribepro.com>
9
  * @author Dennis Rogers <dennis@storefrontconsulting.com>
10
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
11
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
12
  * @link http://www.subscribepro.com/
13
  *
7
  * @package SFC_Autoship
8
  * @author Garth Brantley <garth@subscribepro.com>
9
  * @author Dennis Rogers <dennis@storefrontconsulting.com>
10
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
11
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
12
  * @link http://www.subscribepro.com/
13
  *
skin/adminhtml/default/default/js/autoship/sales_create_order.js CHANGED
@@ -8,7 +8,7 @@
8
  * @category SFC
9
  * @package SFC_Autoship
10
  * @author Garth Brantley <garth@subscribepro.com>
11
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
12
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
13
  * @link http://www.subscribepro.com/
14
  *
8
  * @category SFC
9
  * @package SFC_Autoship
10
  * @author Garth Brantley <garth@subscribepro.com>
11
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
12
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
13
  * @link http://www.subscribepro.com/
14
  *
skin/frontend/base/default/css/autoship.css CHANGED
@@ -8,7 +8,7 @@
8
  * @category SFC
9
  * @package SFC_Autoship
10
  * @author Aaron Boswell <aaron@storefrontconsulting.com>
11
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
12
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
13
  * @link http://www.subscribepro.com/
14
  *
8
  * @category SFC
9
  * @package SFC_Autoship
10
  * @author Aaron Boswell <aaron@storefrontconsulting.com>
11
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
12
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
13
  * @link http://www.subscribepro.com/
14
  *
skin/frontend/base/default/js/autoship/checkout.js CHANGED
@@ -8,7 +8,7 @@
8
  * @category SFC
9
  * @package SFC_Autoship
10
  * @author Garth Brantley <garth@subscribepro.com>
11
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
12
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
13
  * @link http://www.subscribepro.com/
14
  *
8
  * @category SFC
9
  * @package SFC_Autoship
10
  * @author Garth Brantley <garth@subscribepro.com>
11
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
12
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
13
  * @link http://www.subscribepro.com/
14
  *
skin/frontend/base/default/js/autoship/jquery/noconflict.js CHANGED
@@ -7,7 +7,7 @@
7
  * @package SFC_Autoship
8
  * @author Garth Brantley <garth@subscribepro.com>
9
  * @author Dennis Rogers <dennis@storefrontconsulting.com>
10
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
11
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
12
  * @link http://www.subscribepro.com/
13
  *
7
  * @package SFC_Autoship
8
  * @author Garth Brantley <garth@subscribepro.com>
9
  * @author Dennis Rogers <dennis@storefrontconsulting.com>
10
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
11
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
12
  * @link http://www.subscribepro.com/
13
  *
skin/frontend/base/default/js/autoship/mysubscription.js CHANGED
@@ -9,7 +9,7 @@
9
  * @package SFC_Autoship
10
  * @author Garth Brantley <garth@subscribepro.com>
11
  * @author Dennis Rogers <dennis@storefrontconsulting.com>
12
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
9
  * @package SFC_Autoship
10
  * @author Garth Brantley <garth@subscribepro.com>
11
  * @author Dennis Rogers <dennis@storefrontconsulting.com>
12
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
skin/frontend/base/default/js/autoship/newsubscription.js CHANGED
@@ -9,7 +9,7 @@
9
  * @package SFC_Autoship
10
  * @author Garth Brantley <garth@subscribepro.com>
11
  * @author Dennis Rogers <dennis@storefrontconsulting.com>
12
- * @copyright 2009-2014 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *
9
  * @package SFC_Autoship
10
  * @author Garth Brantley <garth@subscribepro.com>
11
  * @author Dennis Rogers <dennis@storefrontconsulting.com>
12
+ * @copyright 2009-2016 SUBSCRIBE PRO INC. All Rights Reserved.
13
  * @license http://www.subscribepro.com/terms-of-service/ Subscribe Pro Terms of Service
14
  * @link http://www.subscribepro.com/
15
  *