Craig_Tco - Version 2.1.0

Version Notes

Added Purchase Routine Selection
Added offline live refunds through 2Checkout
Added ability to instant invoice
Added ability to invoice after fraud review
Added more fraud handling
Added invoicing observer for marking sales as shipped
Added order comments for 2Checkout sale status messages
Added Pass though Products parameters

Download this release

Release Info

Developer Craig Christenson
Extension Craig_Tco
Version 2.1.0
Comparing to
See all releases


Code changes from version 2.0.1 to 2.1.0

app/code/local/Craig/Tco/Block/Info.php CHANGED
@@ -20,11 +20,17 @@
20
  */
21
 
22
  class Craig_Tco_Block_Info extends Mage_Payment_Block_Info {
23
-
24
  protected function _construct() {
25
  parent::_construct();
26
  $this->setTemplate('tco/info.phtml');
27
  }
 
 
 
 
 
 
28
  }
29
 
30
  ?>
20
  */
21
 
22
  class Craig_Tco_Block_Info extends Mage_Payment_Block_Info {
23
+
24
  protected function _construct() {
25
  parent::_construct();
26
  $this->setTemplate('tco/info.phtml');
27
  }
28
+
29
+ public function getMethodCode()
30
+ {
31
+ return $this->getInfo()->getMethodInstance()->getCode();
32
+ }
33
+
34
  }
35
 
36
  ?>
app/code/local/Craig/Tco/Block/Redirect.php CHANGED
@@ -44,7 +44,7 @@ class Craig_Tco_Block_Redirect extends Mage_Core_Block_Abstract
44
  $html.= '<br>';
45
  $html.= '<script type="text/javascript">document.getElementById("pay").submit();</script>';
46
  $html.= '</body></html>';
47
-
48
 
49
  return $html;
50
  }
44
  $html.= '<br>';
45
  $html.= '<script type="text/javascript">document.getElementById("pay").submit();</script>';
46
  $html.= '</body></html>';
47
+
48
 
49
  return $html;
50
  }
app/code/local/Craig/Tco/Model/Checkout.php CHANGED
@@ -22,8 +22,8 @@
22
  class Craig_Tco_Model_Checkout extends Mage_Payment_Model_Method_Abstract {
23
 
24
  protected $_code = 'tco';
25
- protected $_formBlockType = 'tco/form';
26
- protected $_infoBlockType = 'tco/info';
27
 
28
  public function getCheckout() {
29
  return Mage::getSingleton('checkout/session');
@@ -38,31 +38,35 @@ class Craig_Tco_Model_Checkout extends Mage_Payment_Model_Method_Abstract {
38
  $sid = $this->getConfigData('sid');
39
  return $sid;
40
  }
41
-
42
  //get Demo Setting
43
  public function getDemo() {
44
- if ($this->getConfigData('demo') == '1') {
45
- $demo = 'Y';
46
- } else {
47
- $demo = 'N';
48
- }
49
  return $demo;
50
  }
51
 
52
- //get purchase routine URL
53
  public function getUrl() {
54
- $url = $this->getConfigData('submit_url');
 
 
 
 
55
  return $url;
56
  }
57
 
58
- //get order
59
  public function getQuote() {
60
  $orderIncrementId = $this->getCheckout()->getLastRealOrderId();
61
- $order = Mage::getModel('sales/order')->loadByIncrementId($orderIncrementId);
62
  return $order;
63
- }
64
 
65
- //get product data
66
  public function getProductData() {
67
  $products = array();
68
  $items = $this->getQuote()->getAllItems();
@@ -80,45 +84,95 @@ class Craig_Tco_Model_Checkout extends Mage_Payment_Model_Method_Abstract {
80
  }
81
  }
82
  return $products;
83
- }
84
 
85
- //get tax data
86
- public function getTaxData() {
87
- $order_id = $this->getCheckout()->getLastRealOrderId();
 
 
88
  $order = Mage::getModel('sales/order')->loadByIncrementId($order_id);
89
- $taxes = array();
90
- $taxFull = $order->getFullTaxInfo();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
91
  if ($taxFull) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
92
  $i = 1;
93
  foreach($taxFull as $rate){
94
  $taxes['tax_id_'.$i] = $rate['rates']['0'][code];
95
  $taxes['tax_amount_'.$i] = round($rate['amount'], 2);
96
  $i++;
97
  }
98
- }
99
  return $taxes;
100
- }
101
 
102
- //get HTML form data
103
  public function getFormFields() {
104
  $order_id = $this->getCheckout()->getLastRealOrderId();
105
  $order = Mage::getModel('sales/order')->loadByIncrementId($order_id);
106
  $amount = round($order->getGrandTotal(), 2);
107
  $a = $this->getQuote()->getShippingAddress();
108
- $b = $this->getQuote()->getBillingAddress();
109
- $currency_code = $this->getQuote()->getCurrencyCode();
110
- $shipping = round($order->getShippingAmount(), 2);
111
- $weight = round($order->getWeight(), 2);
112
- $ship_method = $order->getShipping_description();
113
  $tax = trim(round($order->getTaxAmount(), 2));
114
- $productData = $this->getProductData();
115
- $taxData = $this->getTaxData();
 
 
116
 
117
-
118
  $tcoFields = array();
119
  $tcoFields['sid'] = $this->getSid();
120
- $tcoFields['total'] = $amount;
121
- $tcoFields['cart_order_id'] = $order_id;
122
  $tcoFields['merchant_order_id'] = $order_id;
123
  $tcoFields['email'] = $order->getData('customer_email');
124
  $tcoFields['first_name'] = $b->getFirstname();
@@ -130,7 +184,7 @@ class Craig_Tco_Model_Checkout extends Mage_Payment_Model_Method_Abstract {
130
  $tcoFields['city'] = $b->getCity();
131
  $tcoFields['state'] = $b->getRegion();
132
  $tcoFields['zip'] = $b->getPostcode();
133
-
134
  if ($a) {
135
  $tcoFields['ship_name'] = $a->getFirstname() . ' ' . $a->getLastname();
136
  $tcoFields['ship_country'] = $a->getCountry();
@@ -149,15 +203,23 @@ class Craig_Tco_Model_Checkout extends Mage_Payment_Model_Method_Abstract {
149
  $tcoFields['ship_zip'] = $b->getPostcode();
150
  }
151
  $tcoFields['2co_tax'] = $tax;
152
- $tcoFields['id_type'] = '1';
153
  $tcoFields['sh_cost'] = $shipping;
154
  $tcoFields['sh_weight'] = $weight;
155
- $tcoFields['ship_method'] = $ship_method;
156
  $tcoFields['2co_cart_type'] = 'magento';
157
  $tcoFields['x_Receipt_Link_URL'] = Mage::getUrl('tco/redirect/success', array('_secure' => true));
158
- $tcoFields['demo'] = $this->getDemo();
159
 
160
- $result = $productData + $taxData + $tcoFields;
 
 
 
 
 
 
 
 
 
161
  return $result;
162
  }
163
 
22
  class Craig_Tco_Model_Checkout extends Mage_Payment_Model_Method_Abstract {
23
 
24
  protected $_code = 'tco';
25
+ protected $_formBlockType = 'tco/form';
26
+ protected $_paymentMethod = 'shared';
27
 
28
  public function getCheckout() {
29
  return Mage::getSingleton('checkout/session');
38
  $sid = $this->getConfigData('sid');
39
  return $sid;
40
  }
41
+
42
  //get Demo Setting
43
  public function getDemo() {
44
+ if ($this->getConfigData('demo') == '1') {
45
+ $demo = 'Y';
46
+ } else {
47
+ $demo = 'N';
48
+ }
49
  return $demo;
50
  }
51
 
52
+ //get purchase routine URL
53
  public function getUrl() {
54
+ if ($this->getConfigData('submit_url') == '1') {
55
+ $url = "https://www.2checkout.com/checkout/spurchase";
56
+ } else {
57
+ $url = "https://www.2checkout.com/checkout/purchase";
58
+ }
59
  return $url;
60
  }
61
 
62
+ //get order
63
  public function getQuote() {
64
  $orderIncrementId = $this->getCheckout()->getLastRealOrderId();
65
+ $order = Mage::getModel('sales/order')->loadByIncrementId($orderIncrementId);
66
  return $order;
67
+ }
68
 
69
+ //get product data
70
  public function getProductData() {
71
  $products = array();
72
  $items = $this->getQuote()->getAllItems();
84
  }
85
  }
86
  return $products;
87
+ }
88
 
89
+ //get lineitem data
90
+ public function getLineitemData() {
91
+ $lineitems = array();
92
+ $items = $this->getQuote()->getAllItems();
93
+ $order_id = $this->getCheckout()->getLastRealOrderId();
94
  $order = Mage::getModel('sales/order')->loadByIncrementId($order_id);
95
+ $taxFull = $order->getFullTaxInfo();
96
+ $ship_method = $order->getShipping_description();
97
+ $coupon = $order->getCoupon_code();
98
+ $i = 1;
99
+ //get products
100
+ if ($items) {
101
+ foreach($items as $item){
102
+ if ($item->getParentItem()) {
103
+ continue;
104
+ }
105
+ $lineitems['li_'.$i.'_type'] = 'product';
106
+ $lineitems['li_'.$i.'_product_id'] = $item->getSku();
107
+ $lineitems['li_'.$i.'_quantity'] = $item->getQtyToInvoice();
108
+ $lineitems['li_'.$i.'_name'] = $item->getName();
109
+ $lineitems['li_'.$i.'_description'] = $item->getDescription();
110
+ $lineitems['li_'.$i.'_price'] = number_format($item->getPrice(), 2, '.', '');
111
+ $i++;
112
+ }
113
+ }
114
+ //get taxes
115
  if ($taxFull) {
116
+ foreach($taxFull as $rate){
117
+ $lineitems['li_'.$i.'_type'] = 'tax';
118
+ $lineitems['li_'.$i.'_name'] = $rate['rates']['0'][code];
119
+ $lineitems['li_'.$i.'_price'] = round($rate['amount'], 2);
120
+ $i++;
121
+ }
122
+ }
123
+ //get shipping
124
+ if ($ship_method) {
125
+ $lineitems['li_'.$i.'_type'] = 'shipping';
126
+ $lineitems['li_'.$i.'_name'] = $order->getShipping_description();
127
+ $lineitems['li_'.$i.'_price'] = round($order->getShippingAmount(), 2);
128
+ $i++;
129
+ }
130
+ //get coupons
131
+ if ($coupon) {
132
+ $lineitems['li_'.$i.'_type'] = 'coupon';
133
+ $lineitems['li_'.$i.'_name'] = $order->getCoupon_code();
134
+ $lineitems['li_'.$i.'_price'] = trim(round($order->getBase_discount_amount(), 2), '-');
135
+ $i++;
136
+ }
137
+ return $lineitems;
138
+ }
139
+
140
+ //get tax data
141
+ public function getTaxData() {
142
+ $order_id = $this->getCheckout()->getLastRealOrderId();
143
+ $order = Mage::getModel('sales/order')->loadByIncrementId($order_id);
144
+ $taxes = array();
145
+ $taxFull = $order->getFullTaxInfo();
146
+ if ($taxFull) {
147
  $i = 1;
148
  foreach($taxFull as $rate){
149
  $taxes['tax_id_'.$i] = $rate['rates']['0'][code];
150
  $taxes['tax_amount_'.$i] = round($rate['amount'], 2);
151
  $i++;
152
  }
153
+ }
154
  return $taxes;
155
+ }
156
 
157
+ //get HTML form data
158
  public function getFormFields() {
159
  $order_id = $this->getCheckout()->getLastRealOrderId();
160
  $order = Mage::getModel('sales/order')->loadByIncrementId($order_id);
161
  $amount = round($order->getGrandTotal(), 2);
162
  $a = $this->getQuote()->getShippingAddress();
163
+ $b = $this->getQuote()->getBillingAddress();
164
+ $currency_code = $this->getQuote()->getCurrencyCode();
165
+ $shipping = round($order->getShippingAmount(), 2);
166
+ $weight = round($order->getWeight(), 2);
167
+ $ship_method = $order->getShipping_description();
168
  $tax = trim(round($order->getTaxAmount(), 2));
169
+ $productData = $this->getProductData();
170
+ $taxData = $this->getTaxData();
171
+ $cart_order_id = $order_id;
172
+ $lineitemData = $this->getLineitemData();
173
 
 
174
  $tcoFields = array();
175
  $tcoFields['sid'] = $this->getSid();
 
 
176
  $tcoFields['merchant_order_id'] = $order_id;
177
  $tcoFields['email'] = $order->getData('customer_email');
178
  $tcoFields['first_name'] = $b->getFirstname();
184
  $tcoFields['city'] = $b->getCity();
185
  $tcoFields['state'] = $b->getRegion();
186
  $tcoFields['zip'] = $b->getPostcode();
187
+
188
  if ($a) {
189
  $tcoFields['ship_name'] = $a->getFirstname() . ' ' . $a->getLastname();
190
  $tcoFields['ship_country'] = $a->getCountry();
203
  $tcoFields['ship_zip'] = $b->getPostcode();
204
  }
205
  $tcoFields['2co_tax'] = $tax;
 
206
  $tcoFields['sh_cost'] = $shipping;
207
  $tcoFields['sh_weight'] = $weight;
208
+ $tcoFields['ship_method'] = $ship_method;
209
  $tcoFields['2co_cart_type'] = 'magento';
210
  $tcoFields['x_Receipt_Link_URL'] = Mage::getUrl('tco/redirect/success', array('_secure' => true));
211
+ $tcoFields['demo'] = $this->getDemo();
212
 
213
+ //Check Integration mode
214
+ if ($this->getConfigData('integration') == '0') {
215
+ $tcoFields['id_type'] = '1';
216
+ $tcoFields['total'] = $amount;
217
+ $tcoFields['cart_order_id'] = $order_id;
218
+ $result = $productData + $taxData + $tcoFields;
219
+ } else {
220
+ $tcoFields['mode'] = '2CO';
221
+ $result = $tcoFields + $lineitemData;
222
+ }
223
  return $result;
224
  }
225
 
app/code/local/Craig/Tco/Model/Observer.php ADDED
@@ -0,0 +1,84 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Craig_Tco_Model_Observer {
4
+
5
+ public function issue_creditmemo_refund(Varien_Object $payment) {
6
+
7
+ $refund = Mage::getStoreConfig('payment/tco/refund');
8
+
9
+ if ($refund == '1') {
10
+
11
+ $creditmemo = $payment->getCreditmemo()->getOrder()->getData();
12
+ $creditmemo_amount = $payment->getCreditmemo()->getData();
13
+ $creditmemo_comment = $payment->getCreditmemo()->getCommentsCollection()->toArray();
14
+
15
+ if(isset($creditmemo_comment['items'][0]['comment'])){
16
+ $comment = $creditmemo_comment['items'][0]['comment'];
17
+ } else {
18
+ $comment = 'Refund issued by seller';
19
+ }
20
+
21
+
22
+ $username = Mage::getStoreConfig('payment/tco/username');
23
+ $password = Mage::getStoreConfig('payment/tco/password');
24
+ $auth = 'Basic ' . base64_encode($username . ':' . $password);
25
+
26
+ $data = array();
27
+ $data['sale_id'] = $creditmemo['ext_order_id'];
28
+ $data['comment'] = $comment;
29
+ $data['category'] = '5';
30
+ $data['amount'] = $creditmemo_amount['grand_total'];
31
+ $data['currency'] = 'vendor';
32
+
33
+ $headers = array(
34
+ 'Authorization: ' . $auth,
35
+ 'Accept: application/xml'
36
+ );
37
+
38
+ $url = 'https://www.2checkout.com/api/sales/refund_invoice';
39
+
40
+ $http = new Varien_Http_Adapter_Curl();
41
+ $http->write('POST', $url, '1.1', $headers, $data);
42
+ $response = $http->read();
43
+ }
44
+ }
45
+
46
+ public function mark_order_as_shipped(Varien_Object $payment) {
47
+
48
+ $integration = Mage::getStoreConfig('payment/tco/integration');
49
+
50
+ if ($integration == '1') {
51
+
52
+ $order = $payment->getInvoice()->getOrder()->getData();
53
+ $invoice_comment = $payment->getInvoice()->getCommentsCollection()->toArray();
54
+
55
+ if(isset($invoice_comment['items'][0]['comment'])){
56
+ $comment = $invoice_comment['items'][0]['comment'];
57
+ } else {
58
+ $comment = 'Order shipped by seller.';
59
+ }
60
+
61
+ $username = Mage::getStoreConfig('payment/tco/username');
62
+ $password = Mage::getStoreConfig('payment/tco/password');
63
+ $auth = 'Basic ' . base64_encode($username . ':' . $password);
64
+
65
+ $data = array();
66
+ $data['sale_id'] = $order['ext_order_id'];
67
+ $data['comment'] = $comment;
68
+ $data['tracking_number'] = 'See shipping comments.';
69
+ $data['reauthorize'] = '1';
70
+
71
+ $headers = array(
72
+ 'Authorization: ' . $auth,
73
+ 'Accept: application/xml'
74
+ );
75
+
76
+ $url = 'https://www.2checkout.com/api/sales/mark_shipped';
77
+
78
+ $http = new Varien_Http_Adapter_Curl();
79
+ $http->write('POST', $url, '1.1', $headers, $data);
80
+ $response = $http->read();
81
+ }
82
+ }
83
+ }
84
+ ?>
app/code/local/Craig/Tco/controllers/NotificationController.php CHANGED
@@ -21,16 +21,15 @@
21
 
22
  class Craig_Tco_NotificationController extends Mage_Core_Controller_Front_Action {
23
 
24
- public function indexAction() {
25
  if (!$this->getRequest()->isPost()) {
26
  return;
27
  $insMessage = $this->getRequest()->getPost();
28
  }
29
- }
30
 
31
 
32
- public function insAction()
33
- {
34
  $insMessage = $this->getRequest()->getPost();
35
  foreach ($_REQUEST as $k => $v) {
36
  $v = htmlspecialchars($v);
@@ -38,37 +37,84 @@ class Craig_Tco_NotificationController extends Mage_Core_Controller_Front_Action
38
  $insMessage[$k] = $v;
39
  }
40
 
41
- if (empty($insMessage)) {
42
- echo "No Parameters";
43
- } else
44
- echo "Parameters Found";
45
-
46
-
47
  $order = Mage::getModel('sales/order');
48
  $order->loadByIncrementId($insMessage['vendor_order_id']);
 
 
49
  $hashSecretWord = Mage::getStoreConfig('payment/tco/secret_word');
50
  $hashSid = $insMessage['vendor_id'];
51
  $hashOrder = $insMessage['sale_id'];
52
  $hashInvoice = $insMessage['invoice_id'];
53
  $StringToHash = strtoupper(md5($hashOrder . $hashSid . $hashInvoice . $hashSecretWord));
54
 
55
- if ($StringToHash != $insMessage['md5_hash']) {
56
- die('Hash Incorrect');
57
- }
58
 
 
59
  if ($insMessage['fraud_status'] == 'fail') {
60
- $order->setState(Mage_Sales_Model_Order::STATE_CANCELED, true)->save(); }
61
- else {
62
- echo "Order did not fail fraud review"; }
 
 
 
 
 
 
 
 
 
 
 
 
 
63
 
64
- if ($insMessage['fraud_status'] == 'pass') {
65
- $order->setState(Mage_Sales_Model_Order::STATE_PROCESSING, true)->save(); }
66
- else {
67
- echo "Order did not pass fraud review"; }
 
68
 
69
- }
 
 
 
 
70
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
71
 
 
 
 
 
 
72
 
 
 
 
 
 
 
 
73
  }
 
74
  ?>
21
 
22
  class Craig_Tco_NotificationController extends Mage_Core_Controller_Front_Action {
23
 
24
+ public function indexAction() {
25
  if (!$this->getRequest()->isPost()) {
26
  return;
27
  $insMessage = $this->getRequest()->getPost();
28
  }
29
+ }
30
 
31
 
32
+ public function insAction() {
 
33
  $insMessage = $this->getRequest()->getPost();
34
  foreach ($_REQUEST as $k => $v) {
35
  $v = htmlspecialchars($v);
37
  $insMessage[$k] = $v;
38
  }
39
 
 
 
 
 
 
 
40
  $order = Mage::getModel('sales/order');
41
  $order->loadByIncrementId($insMessage['vendor_order_id']);
42
+ $invoice_on_fraud = Mage::getStoreConfig('payment/tco/invoice_on_fraud');
43
+ $invoice_on_order = Mage::getStoreConfig('payment/tco/invoice_on_order');
44
  $hashSecretWord = Mage::getStoreConfig('payment/tco/secret_word');
45
  $hashSid = $insMessage['vendor_id'];
46
  $hashOrder = $insMessage['sale_id'];
47
  $hashInvoice = $insMessage['invoice_id'];
48
  $StringToHash = strtoupper(md5($hashOrder . $hashSid . $hashInvoice . $hashSecretWord));
49
 
50
+ if ($StringToHash != $insMessage['md5_hash']) {
51
+ die('Hash Incorrect');
52
+ }
53
 
54
+ if ($insMessage['message_type'] == 'FRAUD_STATUS_CHANGED') {
55
  if ($insMessage['fraud_status'] == 'fail') {
56
+ $order->setState(Mage_Sales_Model_Order::STATE_CANCELED, true)->addStatusHistoryComment('Order failed fraud review.')->save();
57
+
58
+ } else if ($insMessage['fraud_status'] == 'pass') {
59
+ $order->setState(Mage_Sales_Model_Order::STATE_PROCESSING, true)->addStatusHistoryComment('Order passed fraud review.')->save();
60
+ //Invoice
61
+ if ($invoice_on_fraud == '1') {
62
+ try {
63
+ if(!$order->canInvoice())
64
+ {
65
+ Mage::throwException(Mage::helper('core')->__('Cannot create an invoice.'));
66
+ }
67
+
68
+ $invoice = Mage::getModel('sales/service_order', $order)->prepareInvoice();
69
+ if (!$invoice->getTotalQty()) {
70
+ Mage::throwException(Mage::helper('core')->__('Cannot create an invoice without products.'));
71
+ }
72
 
73
+ $invoice->setRequestedCaptureCase(Mage_Sales_Model_Order_Invoice::CAPTURE_OFFLINE);
74
+ $invoice->register();
75
+ $transactionSave = Mage::getModel('core/resource_transaction')
76
+ ->addObject($invoice)
77
+ ->addObject($invoice->getOrder());
78
 
79
+ $transactionSave->save();
80
+ }
81
+ catch (Mage_Core_Exception $e) {
82
+ }
83
+ }
84
 
85
+ } else if ($insMessage['fraud_status'] == 'wait') {
86
+ $order->addStatusHistoryComment('Order undergoing additional fraud investigation.');
87
+ $order->save();
88
+ }
89
+ }
90
+
91
+ if ($insMessage['message_type'] == 'ORDER_CREATED') {
92
+ //Invoice
93
+ if ($invoice_on_order == '1') {
94
+ try {
95
+ if(!$order->canInvoice())
96
+ {
97
+ Mage::throwException(Mage::helper('core')->__('Cannot create an invoice.'));
98
+ }
99
+
100
+ $invoice = Mage::getModel('sales/service_order', $order)->prepareInvoice();
101
+ if (!$invoice->getTotalQty()) {
102
+ Mage::throwException(Mage::helper('core')->__('Cannot create an invoice without products.'));
103
+ }
104
 
105
+ $invoice->setRequestedCaptureCase(Mage_Sales_Model_Order_Invoice::CAPTURE_OFFLINE);
106
+ $invoice->register();
107
+ $transactionSave = Mage::getModel('core/resource_transaction')
108
+ ->addObject($invoice)
109
+ ->addObject($invoice->getOrder());
110
 
111
+ $transactionSave->save();
112
+ }
113
+ catch (Mage_Core_Exception $e) {
114
+ }
115
+ }
116
+ }
117
+ }
118
  }
119
+
120
  ?>
app/code/local/Craig/Tco/controllers/RedirectController.php CHANGED
@@ -44,47 +44,42 @@ class Craig_Tco_RedirectController extends Mage_Core_Controller_Front_Action {
44
  }
45
 
46
  public function successAction() {
47
- $post = $this->getRequest()->getPost();
48
-
49
-
50
- $insMessage = $this->getRequest()->getPost();
51
  foreach ($_REQUEST as $k => $v) {
52
  $v = htmlspecialchars($v);
53
  $v = stripslashes($v);
54
-
55
  $post[$k] = $v;
56
  }
57
 
58
- $session = Mage::getSingleton('checkout/session');
59
- $session->setQuoteId($post['cart_order_id']);
60
- Mage::getSingleton('checkout/session')->getQuote()->setIsActive(false)->save();
61
- $this->_redirect('checkout/onepage/success');
62
-
63
- $order = Mage::getModel('sales/order');
64
- $order->loadByIncrementId($session->getLastRealOrderId());
65
-
66
- $hashSecretWord = Mage::getStoreConfig('payment/tco/secret_word');
67
- $hashSid = Mage::getStoreConfig('payment/tco/sid');
68
- if (Mage::getStoreConfig('payment/tco/demo') == '1') {
69
- $hashOrder = '1';
70
- }
71
- else {
72
- $hashOrder = $post['order_number'];
73
- }
74
- $hashTotal = $post['total'];
75
-
76
- $StringToHash = strtoupper(md5($hashSecretWord . $hashSid . $hashOrder . $hashTotal));
77
-
78
- if ($StringToHash == $post['key']) {
79
- $this->_redirect('checkout/onepage/success');
80
- $order->sendNewOrderEmail();
81
- $order->setState(Mage_Sales_Model_Order::STATE_PROCESSING, true)->save();
82
- }
83
- else {
84
- $this->_redirect('checkout/onepage/success');
85
 
86
- }
87
 
 
 
 
 
 
 
 
 
 
 
 
88
  }
89
 
90
  }
44
  }
45
 
46
  public function successAction() {
47
+ $post = $this->getRequest()->getPost();
48
+ $insMessage = $this->getRequest()->getPost();
 
 
49
  foreach ($_REQUEST as $k => $v) {
50
  $v = htmlspecialchars($v);
51
  $v = stripslashes($v);
 
52
  $post[$k] = $v;
53
  }
54
 
55
+ $session = Mage::getSingleton('checkout/session');
56
+ $session->setQuoteId($post['merchant_order_id']);
57
+ Mage::getSingleton('checkout/session')->getQuote()->setIsActive(false)->save();
58
+ $order = Mage::getModel('sales/order');
59
+ $order->loadByIncrementId($session->getLastRealOrderId());
60
+ $hashSecretWord = Mage::getStoreConfig('payment/tco/secret_word');
61
+ $hashSid = Mage::getStoreConfig('payment/tco/sid');
62
+ $hashTotal = $post['total'];
63
+
64
+ if (Mage::getStoreConfig('payment/tco/demo') == '1') {
65
+ $hashOrder = '1';
66
+ } else {
67
+ $hashOrder = $post['order_number'];
68
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
69
 
70
+ $StringToHash = strtoupper(md5($hashSecretWord . $hashSid . $hashOrder . $hashTotal));
71
 
72
+ if ($StringToHash == $post['key']) {
73
+ $this->_redirect('checkout/onepage/success');
74
+ $order->sendNewOrderEmail();
75
+ $order->setState(Mage_Sales_Model_Order::STATE_PROCESSING, true)->save();
76
+ $order->setData('ext_order_id',$post['order_number'] );
77
+ $order->save();
78
+ } else {
79
+ $this->_redirect('checkout/onepage/success');
80
+ $order->addStatusHistoryComment('Hash did not match, check secret word.');
81
+ $order->save();
82
+ }
83
  }
84
 
85
  }
app/code/local/Craig/Tco/etc/config.xml CHANGED
@@ -1,95 +1,119 @@
1
- <?xml version="1.0"?>
2
-
3
- <!--
4
- /*
5
- * Magento
6
- *
7
- * NOTICE OF LICENSE
8
- *
9
- * This source file is subject to the Open Software License (OSL 3.0)
10
- * that is bundled with this package in the file LICENSE.txt.
11
- * It is also available through the world-wide-web at this URL:
12
- * http://opensource.org/licenses/osl-3.0.php
13
- * If you did not receive a copy of the license and are unable to
14
- * obtain it through the world-wide-web, please send an email
15
- * to license@magentocommerce.com so we can send you a copy immediately.
16
- *
17
- * @category Craig Christenson
18
- * @package Tco (2Checkout.com)
19
- * @copyright Copyright (c) 2010 Craig Christenson
20
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
21
- */
22
- -->
23
-
24
- <config>
25
- <modules>
26
- <Craig_Tco>
27
- <version>2.0.1</version>
28
- </Craig_Tco>
29
- </modules>
30
- <global>
31
- <models>
32
- <tco>
33
- <class>Craig_Tco_Model</class>
34
- </tco>
35
- </models>
36
- <helpers>
37
- <tco>
38
- <class>Craig_Tco_Helper</class>
39
- </tco>
40
- </helpers>
41
- <blocks>
42
- <tco>
43
- <class>Craig_Tco_Block</class>
44
- </tco>
45
- </blocks>
46
- <resources>
47
- <tco_setup>
48
- <setup>
49
- <module>Craig_Tco</module>
50
- </setup>
51
- <connection>
52
- <use>directory_setup</use>
53
- </connection>
54
- </tco_setup>
55
- <tco_write>
56
- <connection>
57
- <use>local_write</use>
58
- </connection>
59
- </tco_write>
60
- <tco_read>
61
- <connection>
62
- <use>local_read</use>
63
- </connection>
64
- </tco_read>
65
- </resources>
66
- </global>
67
- <frontend>
68
- <routers>
69
- <tco>
70
- <use>standard</use>
71
- <args>
72
- <module>Craig_Tco</module>
73
- <frontName>tco</frontName>
74
- </args>
75
- </tco>
76
- </routers>
77
- <secure_url>
78
- <tco_redirect>/tco/redirect/</tco_redirect>
79
- </secure_url>
80
- </frontend>
81
- <default>
82
- <payment>
83
- <tco>
84
- <active>1</active>
85
- <submit_url>https://www.2checkout.com/checkout/spurchase</submit_url>
86
- <model>tco/checkout</model>
87
- <title>2Checkout (Visa, MasterCard, Amex, Discover, JCB, Diners Club, Debit Card, PayPal)</title>
88
- <sid>Enter USD 2Checkout Account Number</sid>
89
- <secret_word>Enter your Secret Word</secret_word>
90
- <demo>0</demo>
91
- <sort_order>1</sort_order>
92
- </tco>
93
- </payment>
94
- </default>
95
- </config>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+
3
+ <!--
4
+ /*
5
+ * Magento
6
+ *
7
+ * NOTICE OF LICENSE
8
+ *
9
+ * This source file is subject to the Open Software License (OSL 3.0)
10
+ * that is bundled with this package in the file LICENSE.txt.
11
+ * It is also available through the world-wide-web at this URL:
12
+ * http://opensource.org/licenses/osl-3.0.php
13
+ * If you did not receive a copy of the license and are unable to
14
+ * obtain it through the world-wide-web, please send an email
15
+ * to license@magentocommerce.com so we can send you a copy immediately.
16
+ *
17
+ * @category Craig Christenson
18
+ * @package Tco (2Checkout.com)
19
+ * @copyright Copyright (c) 2010 Craig Christenson
20
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
21
+ */
22
+ -->
23
+
24
+ <config>
25
+ <modules>
26
+ <Craig_Tco>
27
+ <version>2.1.0</version>
28
+ </Craig_Tco>
29
+ </modules>
30
+ <global>
31
+ <models>
32
+ <tco>
33
+ <class>Craig_Tco_Model</class>
34
+ </tco>
35
+ </models>
36
+ <helpers>
37
+ <tco>
38
+ <class>Craig_Tco_Helper</class>
39
+ </tco>
40
+ </helpers>
41
+ <blocks>
42
+ <tco>
43
+ <class>Craig_Tco_Block</class>
44
+ </tco>
45
+ </blocks>
46
+ <resources>
47
+ <tco_setup>
48
+ <setup>
49
+ <module>Craig_Tco</module>
50
+ </setup>
51
+ <connection>
52
+ <use>directory_setup</use>
53
+ </connection>
54
+ </tco_setup>
55
+ <tco_write>
56
+ <connection>
57
+ <use>local_write</use>
58
+ </connection>
59
+ </tco_write>
60
+ <tco_read>
61
+ <connection>
62
+ <use>local_read</use>
63
+ </connection>
64
+ </tco_read>
65
+ </resources>
66
+ <events>
67
+ <!-- **** This is the event that it will execute on => sales_order_creditmemo_refund*** -->
68
+ <sales_order_creditmemo_refund>
69
+ <observers>
70
+ <issue_creditmemo_refund>
71
+ <type>singleton</type>
72
+ <class>Craig_Tco_Model_Observer</class>
73
+ <method>issue_creditmemo_refund</method>
74
+ </issue_creditmemo_refund>
75
+ </observers>
76
+ </sales_order_creditmemo_refund>
77
+
78
+ <!-- **** This is the event that it will execute on => sales_order_invoice_pay*** -->
79
+ <sales_order_invoice_pay>
80
+ <observers>
81
+ <mark_order_as_shipped>
82
+ <type>singleton</type>
83
+ <class>Craig_Tco_Model_Observer</class>
84
+ <method>mark_order_as_shipped</method>
85
+ </mark_order_as_shipped>
86
+ </observers>
87
+ </sales_order_invoice_pay>
88
+ </events>
89
+ </global>
90
+ <frontend>
91
+ <routers>
92
+ <tco>
93
+ <use>standard</use>
94
+ <args>
95
+ <module>Craig_Tco</module>
96
+ <frontName>tco</frontName>
97
+ </args>
98
+ </tco>
99
+ </routers>
100
+ <secure_url>
101
+ <tco_redirect>/tco/redirect/</tco_redirect>
102
+ </secure_url>
103
+ </frontend>
104
+ <default>
105
+ <payment>
106
+ <tco>
107
+ <active>1</active>
108
+ <submit_url>1</submit_url>
109
+ <model>tco/checkout</model>
110
+ <title>2Checkout (Visa, MasterCard, Amex, Discover, JCB, Diners Club, Debit Card, PayPal)</title>
111
+ <sid>Enter USD 2Checkout Account Number</sid>
112
+ <secret_word>Enter your Secret Word</secret_word>
113
+ <submit_url>1</submit_url>
114
+ <demo>0</demo>
115
+ <sort_order>1</sort_order>
116
+ </tco>
117
+ </payment>
118
+ </default>
119
+ </config>
app/code/local/Craig/Tco/etc/system.xml CHANGED
@@ -25,7 +25,7 @@
25
  <sections>
26
  <payment>
27
  <groups>
28
- <tco translate="label" module="paypal">
29
  <label>2Checkout</label>
30
  <frontend_type>text</frontend_type>
31
  <sort_order>0</sort_order>
@@ -33,7 +33,7 @@
33
  <show_in_website>1</show_in_website>
34
  <show_in_store>1</show_in_store>
35
  <fields>
36
- <title translate="label">
37
  <label>Title</label>
38
  <frontend_type>text</frontend_type>
39
  <sort_order>1</sort_order>
@@ -50,66 +50,139 @@
50
  <show_in_website>1</show_in_website>
51
  <show_in_store>0</show_in_store>
52
  </active>
53
- <sid translate="label">
54
- <label>SID</label>
55
- <frontend_type>text</frontend_type>
56
- <sort_order>3</sort_order>
57
- <show_in_default>1</show_in_default>
58
- <show_in_website>1</show_in_website>
59
- <show_in_store>0</show_in_store>
60
- </sid>
61
- <secret_word translate="label">
62
- <label>Secret Word</label>
63
- <comment>Please enter the same value that you set on your 2Checkout Site Management page.</comment>
64
- <frontend_type>text</frontend_type>
65
- <sort_order>5</sort_order>
66
- <show_in_default>1</show_in_default>
67
- <show_in_website>1</show_in_website>
68
- <show_in_store>0</show_in_store>
69
- </secret_word>
70
- <submit_url translate="label">
71
- <label>Gateway URL</label>
72
- <frontend_type>text</frontend_type>
73
- <sort_order>6</sort_order>
74
- <show_in_default>1</show_in_default>
75
- <show_in_website>1</show_in_website>
76
- <show_in_store>0</show_in_store>
77
- </submit_url>
78
- <demo translate="label">
79
- <label>2Checkout Demo Mode</label>
80
- <frontend_type>select</frontend_type>
81
- <sort_order>7</sort_order>
82
- <source_model>adminhtml/system_config_source_yesno</source_model>
83
- <show_in_default>1</show_in_default>
84
- <show_in_website>1</show_in_website>
85
- <show_in_store>0</show_in_store>
86
- </demo>
87
- <allowspecific translate="label">
88
- <label>Payment Applicable From</label>
89
- <frontend_type>select</frontend_type>
90
- <sort_order>8</sort_order>
91
- <source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
92
- <show_in_default>1</show_in_default>
93
- <show_in_website>1</show_in_website>
94
- <show_in_store>0</show_in_store>
95
- </allowspecific>
96
- <specificcountry translate="label">
97
- <label>Countries Payment Applicable From</label>
98
- <frontend_type>multiselect</frontend_type>
99
- <sort_order>9</sort_order>
100
- <source_model>adminhtml/system_config_source_country</source_model>
101
- <show_in_default>1</show_in_default>
102
- <show_in_website>1</show_in_website>
103
- <show_in_store>0</show_in_store>
104
- </specificcountry>
105
- <sort_order translate="label">
106
- <label>Sort order</label>
107
- <frontend_type>text</frontend_type>
108
- <sort_order>10</sort_order>
109
- <show_in_default>1</show_in_default>
110
- <show_in_website>1</show_in_website>
111
- <show_in_store>0</show_in_store>
112
- </sort_order>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
113
  </fields>
114
  </tco>
115
  </groups>
25
  <sections>
26
  <payment>
27
  <groups>
28
+ <tco translate="label">
29
  <label>2Checkout</label>
30
  <frontend_type>text</frontend_type>
31
  <sort_order>0</sort_order>
33
  <show_in_website>1</show_in_website>
34
  <show_in_store>1</show_in_store>
35
  <fields>
36
+ <title translate="label">
37
  <label>Title</label>
38
  <frontend_type>text</frontend_type>
39
  <sort_order>1</sort_order>
50
  <show_in_website>1</show_in_website>
51
  <show_in_store>0</show_in_store>
52
  </active>
53
+ <sid translate="label">
54
+ <label>2Checkout Account Number</label>
55
+ <comment>**Required**</comment>
56
+ <frontend_type>text</frontend_type>
57
+ <sort_order>3</sort_order>
58
+ <show_in_default>1</show_in_default>
59
+ <show_in_website>1</show_in_website>
60
+ <show_in_store>0</show_in_store>
61
+ </sid>
62
+ <username translate="label">
63
+ <label>API Username</label>
64
+ <comment>Required if "Use Pass Through Products" is set to 'Yes' and required if 'Live Refunds' is set to 'Yes'.</comment>
65
+ <frontend_type>text</frontend_type>
66
+ <sort_order>4</sort_order>
67
+ <show_in_default>1</show_in_default>
68
+ <show_in_website>1</show_in_website>
69
+ <show_in_store>0</show_in_store>
70
+ </username>
71
+ <password translate="label">
72
+ <label>API Password</label>
73
+ <comment>Required if "Use Pass Through Products" is set to 'Yes' and required if 'Live Refunds' is set to 'Yes'.</comment>
74
+ <frontend_type>text</frontend_type>
75
+ <sort_order>5</sort_order>
76
+ <show_in_default>1</show_in_default>
77
+ <show_in_website>1</show_in_website>
78
+ <show_in_store>0</show_in_store>
79
+ </password>
80
+ <secret_word translate="label">
81
+ <label>Secret Word</label>
82
+ <comment>**Required** Please enter the same value that you set on your 2Checkout Site Management page.</comment>
83
+ <frontend_type>text</frontend_type>
84
+ <sort_order>6</sort_order>
85
+ <show_in_default>1</show_in_default>
86
+ <show_in_website>1</show_in_website>
87
+ <show_in_store>0</show_in_store>
88
+ </secret_word>
89
+ <submit_url translate="label">
90
+ <label>Use Single Page Checkout</label>
91
+ <comment>Select "Yes" for 2Checkout single page checkout or select "No" for 2Checkout standard checkout. Please note that 2Checkout will revert to the standard checkout routine if Pass Through Products are enabled.</comment>
92
+ <frontend_type>select</frontend_type>
93
+ <source_model>adminhtml/system_config_source_yesno</source_model>
94
+ <sort_order>7</sort_order>
95
+ <show_in_default>1</show_in_default>
96
+ <show_in_website>1</show_in_website>
97
+ <show_in_store>0</show_in_store>
98
+ </submit_url>
99
+ <integration translate="label">
100
+ <label>Use Pass Through Products</label>
101
+ <comment>**IMPORTANT** Requires API Username and Password. Select 'Yes' for cleaner 2Checkout lineitem listings (Does not support non-coupon Shopping Cart Price Rules and orders containing tangible items must be invoiced through Magento with in 7 days of being placed to bill the customers card.</comment>
102
+ <frontend_type>select</frontend_type>
103
+ <sort_order>8</sort_order>
104
+ <source_model>adminhtml/system_config_source_yesno</source_model>
105
+ <show_in_default>1</show_in_default>
106
+ <show_in_website>1</show_in_website>
107
+ <show_in_store>0</show_in_store>
108
+ </integration>
109
+ <refund translate="label">
110
+ <label>Live Refunds</label>
111
+ <comment>**IMPORTANT** Requires API Username and Password. Select 'Yes' to enable live refunds through 2Checkout when sending credit memos in Magento. This will actually issue refunds for the credit memo amount.</comment>
112
+ <frontend_type>select</frontend_type>
113
+ <sort_order>9</sort_order>
114
+ <source_model>adminhtml/system_config_source_yesno</source_model>
115
+ <show_in_default>1</show_in_default>
116
+ <show_in_website>1</show_in_website>
117
+ <show_in_store>0</show_in_store>
118
+ </refund>
119
+ <demo translate="label">
120
+ <label>2Checkout Demo Mode</label>
121
+ <frontend_type>select</frontend_type>
122
+ <sort_order>10</sort_order>
123
+ <source_model>adminhtml/system_config_source_yesno</source_model>
124
+ <show_in_default>1</show_in_default>
125
+ <show_in_website>1</show_in_website>
126
+ <show_in_store>0</show_in_store>
127
+ </demo>
128
+ <invoice_on_fraud translate="label">
129
+ <label>Invoice Automatically After 2Checkout Fraud
130
+ Review</label>
131
+ <comment>Automatically issues magento invoice after
132
+ 2Checkout fraud review passes. If you are
133
+ offering downloadable products this would
134
+ enable downloads or if you are using Pass
135
+ Through Products this would mark the sale as
136
+ shipped at 2Checkout.</comment>
137
+ <frontend_type>select</frontend_type>
138
+ <sort_order>11</sort_order>
139
+ <source_model>adminhtml/system_config_source_yesno</source_model>
140
+ <show_in_default>1</show_in_default>
141
+ <show_in_website>1</show_in_website>
142
+ <show_in_store>0</show_in_store>
143
+ </invoice_on_fraud>
144
+ <invoice_on_order translate="label">
145
+ <label>Invoice Automatically Before 2Checkout
146
+ Fraud Review</label>
147
+ <comment>Automatically issues magento invoice
148
+ when sale is processed by 2Checkout. If you are
149
+ offering downloadable products this would
150
+ enable downloads or if you are using Pass
151
+ Through Products this would mark the sale as
152
+ shipped at 2Checkout.</comment>
153
+ <frontend_type>select</frontend_type>
154
+ <sort_order>12</sort_order>
155
+ <source_model>adminhtml/system_config_source_yesno</source_model>
156
+ <show_in_default>1</show_in_default>
157
+ <show_in_website>1</show_in_website>
158
+ <show_in_store>0</show_in_store>
159
+ </invoice_on_order>
160
+ <allowspecific translate="label">
161
+ <label>Payment Applicable From</label>
162
+ <frontend_type>select</frontend_type>
163
+ <sort_order>13</sort_order>
164
+ <source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
165
+ <show_in_default>1</show_in_default>
166
+ <show_in_website>1</show_in_website>
167
+ <show_in_store>0</show_in_store>
168
+ </allowspecific>
169
+ <specificcountry translate="label">
170
+ <label>Countries Payment Applicable From</label>
171
+ <frontend_type>multiselect</frontend_type>
172
+ <sort_order>14</sort_order>
173
+ <source_model>adminhtml/system_config_source_country</source_model>
174
+ <show_in_default>1</show_in_default>
175
+ <show_in_website>1</show_in_website>
176
+ <show_in_store>0</show_in_store>
177
+ </specificcountry>
178
+ <sort_order translate="label">
179
+ <label>Sort order</label>
180
+ <frontend_type>text</frontend_type>
181
+ <sort_order>15</sort_order>
182
+ <show_in_default>1</show_in_default>
183
+ <show_in_website>1</show_in_website>
184
+ <show_in_store>0</show_in_store>
185
+ </sort_order>
186
  </fields>
187
  </tco>
188
  </groups>
app/design/frontend/base/default/template/tco/info.phtml CHANGED
@@ -19,8 +19,7 @@
19
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
20
  */
21
 
22
- //echo $this->__('2Checkout (Credit Card, Debit Card, PayPal)');
23
  ?>
24
- 2Checkout (Credit Card, Debit Card, PayPal)
25
 
26
 
19
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
20
  */
21
 
22
+ echo $this->__('2Checkout (Credit Card, Debit Card, PayPal)');
23
  ?>
 
24
 
25
 
package.xml CHANGED
@@ -1,19 +1,25 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Craig_Tco</name>
4
- <version>2.0.1</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.opensource.org/licenses/osl-3.0.php">OSL-3.0</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>2Checkout Payment Extension</summary>
10
  <description>2Checkout Payment Extension</description>
11
- <notes>Add additional data sanitation&#xD;
12
- Updated to work with 1.6.0.0</notes>
13
- <authors><author><name>Craig Christenson</name><user>auto-converted</user><email>christensoncraig@gmail.com</email></author></authors>
14
- <date>2011-07-20</date>
15
- <time>20:22:56</time>
16
- <contents><target name="magelocal"><dir name="Craig"><dir name="Tco"><dir name="Block"><file name="Form.php" hash="b552018543f57090c42784d939004dd4"/><file name="Info.php" hash="2e42f56143a93944240faa7dfca3e183"/><file name="Redirect.php" hash="d3766dbf0c0a206c8630cd1e8de4927f"/></dir><dir name="controllers"><file name="NotificationController.php" hash="ed3053c683eeb64f71d675564e30e5bb"/><file name="RedirectController.php" hash="6db70f5247fc921a07de2767cc8a5750"/></dir><dir name="Model"><file name="Checkout.php" hash="f38834dd1a3025d0ee1e85dbaf6ea1dc"/></dir><dir name="Helper"><file name="Data.php" hash="de7680011db7d6821c1f68d70a8fa684"/></dir><dir name="etc"><file name="config.xml" hash="8795e0e9dd00d519a4495b7ac350d25e"/><file name="system.xml" hash="d76189971008c4ba88e7a45864b7d60c"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="tco"><file name="form.phtml" hash="08ae585e158550d0a5dccbed3d37758d"/><file name="info.phtml" hash="9064c9a14c49105f6ef69222d50dc675"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Craig_Tco.xml" hash="4a6e92678d9b2a310af880d35a4c355f"/></dir></target></contents>
 
 
 
 
 
 
17
  <compatible/>
18
- <dependencies/>
19
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Craig_Tco</name>
4
+ <version>2.1.0</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.opensource.org/licenses/osl-3.0.php">OSL-3.0</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>2Checkout Payment Extension</summary>
10
  <description>2Checkout Payment Extension</description>
11
+ <notes>Added Purchase Routine Selection&#xD;
12
+ Added offline live refunds through 2Checkout&#xD;
13
+ Added ability to instant invoice&#xD;
14
+ Added ability to invoice after fraud review&#xD;
15
+ Added more fraud handling&#xD;
16
+ Added invoicing observer for marking sales as shipped&#xD;
17
+ Added order comments for 2Checkout sale status messages&#xD;
18
+ Added Pass though Products parameters</notes>
19
+ <authors><author><name>Craig Christenson</name><user>undeadzed</user><email>christensoncraig@gmail.com</email></author></authors>
20
+ <date>2011-08-27</date>
21
+ <time>19:43:33</time>
22
+ <contents><target name="magelocal"><dir name="Craig"><dir name="Tco"><dir name="Block"><file name="Form.php" hash="b552018543f57090c42784d939004dd4"/><file name="Info.php" hash="ceb4ec03e4de3e4f1dafaf5d7da9b982"/><file name="Redirect.php" hash="e2809d56d51bdc74367dad8da77ac563"/></dir><dir name="controllers"><file name="NotificationController.php" hash="2bbb8caf512b8bcdea2855842a56539b"/><file name="RedirectController.php" hash="8691223ed4038ee2ca013a6cd54febae"/></dir><dir name="etc"><file name="config.xml" hash="82a0f26f2c34fb0eb05bd6c91b52ba38"/><file name="system.xml" hash="4bf8199f530281ba446d9c943fcb6932"/></dir><dir name="Helper"><file name="Data.php" hash="de7680011db7d6821c1f68d70a8fa684"/></dir><dir name="Model"><file name="Checkout.php" hash="f76baa1c39c87bc9ee470d4014fea794"/><file name="Observer.php" hash="727312c017289346a6c9a4aedb5fcc4f"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Craig_Tco.xml" hash="4a6e92678d9b2a310af880d35a4c355f"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="tco"><file name="form.phtml" hash="08ae585e158550d0a5dccbed3d37758d"/><file name="info.phtml" hash="b714a7398773adc71ea086024dfc96b1"/></dir></dir></dir></dir></dir></target></contents>
23
  <compatible/>
24
+ <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
25
  </package>