Securetrading_Stpp - Version 3.1.0.8

Version Notes

The official SecureTrading STPP Magento integration.

Download this release

Release Info

Developer PeteST
Extension Securetrading_Stpp
Version 3.1.0.8
Comparing to
See all releases


Code changes from version 3.0.1.2 to 3.1.0.8

Files changed (22) hide show
  1. app/code/local/Securetrading/Stpp/{controllers/Redirect/PostController.php → Controller/Redirect/Post/Abstract.php} +6 -19
  2. app/code/local/Securetrading/Stpp/Model/Actions/Redirect.php +78 -9
  3. app/code/local/Securetrading/Stpp/Model/Integration.php +1 -0
  4. app/code/local/Securetrading/Stpp/Model/Observer.php +54 -28
  5. app/code/local/Securetrading/Stpp/Model/Payment/Abstract.php +15 -5
  6. app/code/local/Securetrading/Stpp/Model/Payment/Direct.php +3 -3
  7. app/code/local/Securetrading/Stpp/Model/Payment/Redirect.php +58 -11
  8. app/code/local/Securetrading/Stpp/controllers/Direct/PostController.php +1 -1
  9. app/code/local/Securetrading/Stpp/controllers/MultishippingController.php +88 -0
  10. app/code/local/Securetrading/Stpp/controllers/Redirect/Post/MultishippingController.php +7 -0
  11. app/code/local/Securetrading/Stpp/controllers/Redirect/Post/OnepageController.php +7 -0
  12. app/code/local/Securetrading/Stpp/controllers/RedirectController.php +16 -3
  13. app/code/local/Securetrading/Stpp/controllers/Sales/Order/Create/SecuretradingController.php +15 -22
  14. app/code/local/Securetrading/Stpp/controllers/Sales/Order/CreateController.php +1 -7
  15. app/code/local/Securetrading/Stpp/etc/config.xml +18 -3
  16. app/code/local/Securetrading/Stpp/lib/code/core/Stpp/Data/Request.php +4 -2
  17. app/code/local/Securetrading/Stpp/lib/code/core/Stpp/PaymentPages/Base.php +1 -1
  18. app/code/local/Securetrading/Stpp/readme.txt +21 -9
  19. app/code/local/Securetrading/Stpp/sql/securetrading_stpp/upgrade-3.0.0-3.1.0.php +22 -0
  20. app/design/frontend/base/default/layout/securetrading.xml +45 -20
  21. app/etc/modules/{Securetrading_Stpp.xml → SecureTrading_Stpp.xml} +0 -0
  22. package.xml +5 -6
app/code/local/Securetrading/Stpp/{controllers/Redirect/PostController.php → Controller/Redirect/Post/Abstract.php} RENAMED
@@ -1,29 +1,16 @@
1
  <?php
2
 
3
- class Securetrading_Stpp_Redirect_PostController extends Mage_Core_Controller_Front_Action {
4
  protected $_methodInstance;
5
 
 
 
6
  public function preDispatch() {
7
  parent::preDispatch();
8
 
9
  try {
10
- $orderIncrementId = Mage::getModel('checkout/session')->getLastRealOrderId();
11
-
12
- if ($orderIncrementId === null) {
13
- throw new Exception(Mage::helper('securetrading_stpp')->__('No order ID.'));
14
- }
15
-
16
- $order = Mage::getModel('sales/order')->loadByIncrementId($orderIncrementId);
17
-
18
- $this->_methodInstance = $order->getPayment()->getMethodInstance();
19
-
20
- if ($this->_methodInstance->getCode() !== Mage::getModel('securetrading_stpp/payment_redirect')->getCode()) {
21
- throw new Exception(Mage::helper('securetrading_stpp')->__('Cannot access payment method.'));
22
- }
23
-
24
- if ($order->getStatus() !== Securetrading_Stpp_Model_Payment_Abstract::STATUS_PENDING_PPAGES) {
25
- throw new Exception(Mage::helper('securetrading_stpp')->__('Order not pending payment pages.'));
26
- }
27
  } catch (Exception $e) {
28
  Mage::logException($e);
29
  $this->_redirect(null);
@@ -32,7 +19,7 @@ class Securetrading_Stpp_Redirect_PostController extends Mage_Core_Controller_Fr
32
  }
33
 
34
  protected function _prepareResult() {
35
- $transport = $this->_methodInstance->prepareData();
36
  Mage::register(Securetrading_Stpp_Block_Payment_Redirect_Post::REGISTRY_TRANSPORT_KEY, $transport);
37
  }
38
 
1
  <?php
2
 
3
+ abstract class Securetrading_Stpp_Controller_Redirect_Post_Abstract extends Mage_Core_Controller_Front_Action {
4
  protected $_methodInstance;
5
 
6
+ abstract protected function _getOrderIncrementIds();
7
+
8
  public function preDispatch() {
9
  parent::preDispatch();
10
 
11
  try {
12
+ Mage::getModel('securetrading_stpp/payment_redirect')->validateOrders($this->_getOrderIncrementIds());
13
+ $this->_methodInstance = Mage::getModel('securetrading_stpp/payment_redirect')->getFirstMethodInstance($this->_getOrderIncrementIds());
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14
  } catch (Exception $e) {
15
  Mage::logException($e);
16
  $this->_redirect(null);
19
  }
20
 
21
  protected function _prepareResult() {
22
+ $transport = $this->_methodInstance->prepareData(false, $this->_getOrderIncrementIds());
23
  Mage::register(Securetrading_Stpp_Block_Payment_Redirect_Post::REGISTRY_TRANSPORT_KEY, $transport);
24
  }
25
 
app/code/local/Securetrading/Stpp/Model/Actions/Redirect.php CHANGED
@@ -3,10 +3,76 @@
3
  class Securetrading_Stpp_Model_Actions_Redirect extends Securetrading_Stpp_Model_Actions_Abstract implements Stpp_PaymentPages_ActionsInterface {
4
  protected $_updates = array();
5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6
  public function processAuth(Stpp_Data_Response $response) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7
  parent::processAuth($response);
8
  if ($response->get('errorcode') === '0') {
9
- Mage::getModel('securetrading_stpp/payment_redirect')->registerSuccessfulOrderAfterExternalRedirect();
 
10
  }
11
 
12
  $order = Mage::getModel('sales/order')->loadByIncrementId($response->get('orderreference'));
@@ -16,16 +82,19 @@ class Securetrading_Stpp_Model_Actions_Redirect extends Securetrading_Stpp_Model
16
  $payment->setCcLast4($payment->getMethodInstance()->getIntegration()->getCcLast4($response->get('maskedpan')));
17
  $payment->save();
18
 
19
- $this->_updateOrder($response, $order);
20
-
21
- return $this->_isErrorCodeZero($response);
22
  }
23
 
24
- protected function _updateOrder(Stpp_Data_Response $response, Mage_Sales_Model_Order $order) {
25
- $addresses = array(
26
- 'billing' => $order->getBillingAddress(),
27
- 'customer' => $order->getShippingAddress(),
28
- );
 
 
 
 
 
29
 
30
  foreach($addresses as $stKeyPrefix => $address) {
31
  $this->_updateOneToOneMapping($response, $stKeyPrefix, $address);
3
  class Securetrading_Stpp_Model_Actions_Redirect extends Securetrading_Stpp_Model_Actions_Abstract implements Stpp_PaymentPages_ActionsInterface {
4
  protected $_updates = array();
5
 
6
+ protected function _getOrderIncrementIds(Stpp_Data_response $response) {
7
+ $orderIncrementIdString = $response->get('order_increment_ids', '');
8
+
9
+ if (!is_string($orderIncrementIdString)) {
10
+ throw new Stpp_Exception(Mage::helper('securetrading_stpp')->__('The order increment IDs are not a string.'));
11
+ }
12
+
13
+ $orderIncrementIds = @unserialize($orderIncrementIdString);
14
+
15
+ if (!is_array($orderIncrementIds) || empty($orderIncrementIds)) {
16
+ throw new Stpp_Exception(Mage::helper('securetrading_stpp')->__('Invalid order increment IDs.'));
17
+ }
18
+ return $orderIncrementIds;
19
+ }
20
+
21
  public function processAuth(Stpp_Data_Response $response) {
22
+ $firstOrder = true;
23
+ foreach($this->_getOrderIncrementIds($response) as $orderIncrementId) {
24
+ $response->set('orderreference', $orderIncrementId);
25
+ $this->_processAuth($response, $firstOrder);
26
+ $firstOrder = false;
27
+ }
28
+ return $this->_isErrorCodeZero($response);
29
+ }
30
+
31
+ public function process3dQuery(Stpp_Data_Response $response) {
32
+ foreach($this->_getOrderIncrementIds($response) as $orderIncrementId) {
33
+ $response->set('orderreference', $orderIncrementId);
34
+ parent::process3dQuery($response);
35
+ }
36
+ return $this->_isErrorCodeZero($response);
37
+ }
38
+
39
+ public function processRiskDecision(Stpp_Data_Response $response) {
40
+ foreach($this->_getOrderIncrementIds($response) as $orderIncrementId) {
41
+ $response->set('orderreference', $orderIncrementId);
42
+ parent::processRiskDecision($response);
43
+ }
44
+ return $this->_isErrorCodeZero($response);
45
+ }
46
+
47
+ public function processTransactionUpdate(Stpp_Data_Response $response) {
48
+ foreach($this->_getOrderIncrementIds($response) as $orderIncrementId) {
49
+ $response->set('orderreference', $orderIncrementId);
50
+ parent::processTransactionUpdate($response);
51
+ }
52
+ return $this->_isErrorCodeZero($response);
53
+ }
54
+
55
+ public function processRefund(Stpp_Data_Response $response) {
56
+ foreach($this->_getOrderIncrementIds($response) as $orderIncrementId) {
57
+ $response->set('orderreference', $orderIncrementId);
58
+ parent::processRefund($response);
59
+ }
60
+ return $this->_isErrorCodeZero($response);
61
+ }
62
+
63
+ public function processAccountCheck(Stpp_Data_Response $response) {
64
+ foreach($this->_getOrderIncrementIds($response) as $orderIncrementId) {
65
+ $response->set('orderreference', $orderIncrementId);
66
+ parent::processAccountCheck($response);
67
+ }
68
+ return $this->_isErrorCodeZero($response);
69
+ }
70
+
71
+ public function _processAuth(Stpp_Data_Response $response, $firstOrder) {
72
  parent::processAuth($response);
73
  if ($response->get('errorcode') === '0') {
74
+ $emailConfirmation = $response->getRequest()->get('accounttypedescription') === 'MOTO' ? false : true;
75
+ Mage::getModel('securetrading_stpp/payment_redirect')->registerSuccessfulOrderAfterExternalRedirect($emailConfirmation);
76
  }
77
 
78
  $order = Mage::getModel('sales/order')->loadByIncrementId($response->get('orderreference'));
82
  $payment->setCcLast4($payment->getMethodInstance()->getIntegration()->getCcLast4($response->get('maskedpan')));
83
  $payment->save();
84
 
85
+ $this->_updateOrder($response, $order, $firstOrder);
 
 
86
  }
87
 
88
+ protected function _updateOrder(Stpp_Data_Response $response, Mage_Sales_Model_Order $order, $firstOrder) {
89
+ if ($firstOrder) {
90
+ $addresses = array(
91
+ 'billing' => $order->getBillingAddress(),
92
+ 'customer' => $order->getShippingAddress(),
93
+ );
94
+ }
95
+ else {
96
+ $addresses = array('billing' => $order->getBillingAddress());
97
+ }
98
 
99
  foreach($addresses as $stKeyPrefix => $address) {
100
  $this->_updateOneToOneMapping($response, $stKeyPrefix, $address);
app/code/local/Securetrading/Stpp/Model/Integration.php CHANGED
@@ -54,6 +54,7 @@ class Securetrading_Stpp_Model_Integration extends Mage_Core_Model_Abstract {
54
  'password' => $paymentMethod->getConfigData('site_security_password'),
55
  'algorithm' => 'sha256',
56
  'use' => $paymentMethod->getConfigData('use_site_security'),
 
57
  ),
58
  'use_authenticated_moto' => false,
59
  'use_http_post' => true,
54
  'password' => $paymentMethod->getConfigData('site_security_password'),
55
  'algorithm' => 'sha256',
56
  'use' => $paymentMethod->getConfigData('use_site_security'),
57
+ 'fields' => array('order_increment_ids'),
58
  ),
59
  'use_authenticated_moto' => false,
60
  'use_http_post' => true,
app/code/local/Securetrading/Stpp/Model/Observer.php CHANGED
@@ -1,34 +1,53 @@
1
  <?php
2
 
3
  class Securetrading_Stpp_Model_Observer {
4
- public function onCheckoutSubmitAllAfter(Varien_Event_Observer $observer) {
5
- $quote = $observer->getEvent()->getQuote();
6
- $methodInstance = $quote->getPayment()->getMethodInstance();
7
-
8
- if ($methodInstance->getIsSecuretradingPaymentMethod()) {
9
- $methodInstance->log(sprintf('In %s.', __METHOD__));
10
-
11
- $order = $observer->getEvent()->getOrder();
12
-
13
- $collection = $order->getStatusHistoryCollection(true);
14
- foreach($collection as $c) {
15
- $c->delete();
16
- }
17
-
18
- $orderIncomplete = (bool) $quote->getPayment()->getOrderPlaceRedirectUrl();
19
- $methodInstance->log(sprintf('In %s. Order incomplete: %s.', __METHOD__, $orderIncomplete));
20
-
21
- if ($orderIncomplete) {
22
- $stateObject = Mage::getSingleton('securetrading_stpp/transport');
23
- $order->setState($stateObject->getState(), $stateObject->getStatus(), $stateObject->getMessage());
24
- $order->save();
25
-
26
- $quote->setIsActive(true);//note - quote saved after this observer called (in onepagecontroller)
27
- }
28
- else {
29
- Mage::getModel('securetrading_stpp/payment_direct')->handleSuccessfulPayment($order);
30
- }
31
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
32
  }
33
 
34
  public function onPaymentInfoBlockPrepareSpecificInformation(Varien_Event_Observer $observer) {
@@ -62,4 +81,11 @@ class Securetrading_Stpp_Model_Observer {
62
  $transport->setData('issue_number', $payment->getCcSsIssue());
63
  $transport->setData('transaction_reference', $payment->getCcTransId());
64
  }
 
 
 
 
 
 
 
65
  }
1
  <?php
2
 
3
  class Securetrading_Stpp_Model_Observer {
4
+ public function onCheckoutSubmitAllAfter(Varien_Event_Observer $observer) {
5
+ $quote = $observer->getEvent()->getQuote();
6
+ $methodInstance = $quote->getPayment()->getMethodInstance();
7
+
8
+ if ($methodInstance->getIsSecuretradingPaymentMethod()) {
9
+ $methodInstance->log(sprintf('In %s.', __METHOD__));
10
+
11
+ $orders = $observer->getEvent()->getOrders();
12
+
13
+ if ($orders) {
14
+ $methodInstance->log('Multishipping checkout.');
15
+ $this->_onCheckoutSubmitAllAfter_Multishipping($orders, $quote);
16
+ }
17
+ else {
18
+ $orderIncomplete = (bool) $quote->getPayment()->getOrderPlaceRedirectUrl();
19
+ $methodInstance->log(sprintf('One page checkout. Order incomplete: %s.', __METHOD__, $orderIncomplete));
20
+ $this->_onCheckoutSubmitAllAfter_Onepage($observer->getEvent()->getOrder(), $quote, $orderIncomplete);
21
+ }
22
+ }
23
+ }
24
+
25
+ protected function _onCheckoutSubmitAllAfter_orderLoop(Mage_Sales_Model_Order $order, Mage_Sales_Model_Quote $quote, $orderIncomplete = false) {
26
+ $collection = $order->getStatusHistoryCollection(true);
27
+ foreach($collection as $c) {
28
+ $c->delete();
29
+ }
30
+
31
+ if ($orderIncomplete) {
32
+ $stateObject = Mage::getSingleton('securetrading_stpp/transport');
33
+ $order->setState($stateObject->getState(), $stateObject->getStatus(), $stateObject->getMessage());
34
+ $order->save();
35
+
36
+ $quote->setIsActive(true)->save();
37
+ }
38
+ else {
39
+ Mage::getModel('securetrading_stpp/payment_direct')->handleSuccessfulPayment($order);
40
+ }
41
+ }
42
+
43
+ protected function _onCheckoutSubmitAllAfter_Multishipping($orders, Mage_Sales_Model_Quote $quote) {
44
+ foreach($orders as $order) {
45
+ $this->_onCheckoutSubmitAllAfter_orderLoop($order, $quote, true);
46
+ }
47
+ }
48
+
49
+ protected function _onCheckoutSubmitAllAfter_Onepage(Mage_Sales_Model_Order $order, Mage_Sales_Model_Quote $quote, $orderIncomplete) {
50
+ $this->_onCheckoutSubmitAllAfter_orderLoop($order, $quote, $orderIncomplete);
51
  }
52
 
53
  public function onPaymentInfoBlockPrepareSpecificInformation(Varien_Event_Observer $observer) {
81
  $transport->setData('issue_number', $payment->getCcSsIssue());
82
  $transport->setData('transaction_reference', $payment->getCcTransId());
83
  }
84
+
85
+ public function onCheckoutTypeMultishippingCreateOrdersSingle(Varien_Event_Observer $observer) {
86
+ if (!$observer->getEvent()->getOrder()->getPayment()->getMethodInstance()->getIsSecuretradingPaymentMethod()) {
87
+ return;
88
+ }
89
+ $observer->getEvent()->getOrder()->setCanSendNewEmailFlag(false)->save();
90
+ }
91
  }
app/code/local/Securetrading/Stpp/Model/Payment/Abstract.php CHANGED
@@ -28,7 +28,7 @@ abstract class Securetrading_Stpp_Model_Payment_Abstract extends Mage_Payment_Mo
28
  return $this;
29
  }
30
 
31
- public function prepareOrderData(Mage_Sales_Model_Order_Payment $payment) {
32
  $order = $payment->getOrder();
33
  $billingAddress = $order->getBillingAddress();
34
  $billingCounty = $billingAddress->getCountry() == 'US' ? $billingAddress->getRegionCode() : $billingAddress->getRegion();
@@ -38,10 +38,16 @@ abstract class Securetrading_Stpp_Model_Payment_Abstract extends Mage_Payment_Mo
38
  $customerDobArray = explode(' ', $customerDobFull);
39
  $customerDob = $customerDobArray[0];
40
 
 
 
 
 
 
 
41
  $data = array(
42
  'sitereference' => $this->getConfigData("site_reference"),
43
  'currencyiso3a' => $order->getBaseCurrencyCode(),
44
- 'mainamount' => $order->getBaseTotalDue(),
45
 
46
  'billingprefixname' => $billingAddress->getPrefix(),
47
  'billingfirstname' => $billingAddress->getFirstname(),
@@ -90,14 +96,14 @@ abstract class Securetrading_Stpp_Model_Payment_Abstract extends Mage_Payment_Mo
90
  return $data;
91
  }
92
 
93
- public function registerSuccessfulOrderAfterExternalRedirect() {
94
  $this->log(sprintf('In %s.', __METHOD__));
95
  $stateObject = Mage::getSingleton('securetrading_stpp/transport');
96
  $order = Mage::getModel('sales/order')->loadByIncrementId($stateObject->getOrderReference());
97
- $this->handleSuccessfulPayment($order);
98
  }
99
 
100
- public function handleSuccessfulPayment(Mage_Sales_Model_Order $order) {
101
  $this->log(sprintf('In %s.', __METHOD__));
102
  $quote = Mage::getModel('sales/quote')->loadByIdWithoutStore($order->getQuoteId());
103
  $stateObject = Mage::getSingleton('securetrading_stpp/transport');
@@ -118,5 +124,9 @@ abstract class Securetrading_Stpp_Model_Payment_Abstract extends Mage_Payment_Mo
118
  ->setCcLast4($this->getIntegration()->getCcLast4($stateObject->getMaskedPan()))
119
  ->save()
120
  ;
 
 
 
 
121
  }
122
  }
28
  return $this;
29
  }
30
 
31
+ public function prepareOrderData(Mage_Sales_Model_Order_Payment $payment, array $orderIncrementIds) {
32
  $order = $payment->getOrder();
33
  $billingAddress = $order->getBillingAddress();
34
  $billingCounty = $billingAddress->getCountry() == 'US' ? $billingAddress->getRegionCode() : $billingAddress->getRegion();
38
  $customerDobArray = explode(' ', $customerDobFull);
39
  $customerDob = $customerDobArray[0];
40
 
41
+ $baseTotalDue = 0;
42
+
43
+ foreach($orderIncrementIds as $orderIncrementId) {
44
+ $baseTotalDue += Mage::getModel('sales/order')->loadByIncrementId($orderIncrementId)->getBaseTotalDue();
45
+ }
46
+
47
  $data = array(
48
  'sitereference' => $this->getConfigData("site_reference"),
49
  'currencyiso3a' => $order->getBaseCurrencyCode(),
50
+ 'mainamount' => $baseTotalDue,
51
 
52
  'billingprefixname' => $billingAddress->getPrefix(),
53
  'billingfirstname' => $billingAddress->getFirstname(),
96
  return $data;
97
  }
98
 
99
+ public function registerSuccessfulOrderAfterExternalRedirect($emailConfirmation = true) {
100
  $this->log(sprintf('In %s.', __METHOD__));
101
  $stateObject = Mage::getSingleton('securetrading_stpp/transport');
102
  $order = Mage::getModel('sales/order')->loadByIncrementId($stateObject->getOrderReference());
103
+ $this->handleSuccessfulPayment($order, $emailConfirmation);
104
  }
105
 
106
+ public function handleSuccessfulPayment(Mage_Sales_Model_Order $order, $emailConfirmation = true) {
107
  $this->log(sprintf('In %s.', __METHOD__));
108
  $quote = Mage::getModel('sales/quote')->loadByIdWithoutStore($order->getQuoteId());
109
  $stateObject = Mage::getSingleton('securetrading_stpp/transport');
124
  ->setCcLast4($this->getIntegration()->getCcLast4($stateObject->getMaskedPan()))
125
  ->save()
126
  ;
127
+
128
+ if ($emailConfirmation) {
129
+ $order->sendNewOrderEmail()->save(); // Send last - even if notif times out order status updated etc. and payment information updated.
130
+ }
131
  }
132
  }
app/code/local/Securetrading/Stpp/Model/Payment/Direct.php CHANGED
@@ -84,8 +84,8 @@ class Securetrading_Stpp_Model_Payment_Direct extends Securetrading_Stpp_Model_P
84
  return $this;
85
  }
86
 
87
- public function prepareOrderData(Mage_Sales_Model_Order_Payment $payment) {
88
- $data = parent::prepareOrderData($payment);
89
  $payment = $this->getInfoInstance();
90
 
91
  return $data += array(
@@ -130,7 +130,7 @@ class Securetrading_Stpp_Model_Payment_Direct extends Securetrading_Stpp_Model_P
130
  return false;
131
  }
132
 
133
- public function handleSuccessfulPayment(Mage_Sales_Model_Order $order) {
134
  parent::handleSuccessfulPayment($order);
135
  Mage::getSingleton('securetrading_stpp/payment_direct_session')->clear();
136
  }
84
  return $this;
85
  }
86
 
87
+ public function prepareOrderData(Mage_Sales_Model_Order_Payment $payment, array $orderIncrementIds) {//TODO - the api module must pass this new 2nd param through
88
+ $data = parent::prepareOrderData($payment, $orderIncrementIds);
89
  $payment = $this->getInfoInstance();
90
 
91
  return $data += array(
130
  return false;
131
  }
132
 
133
+ public function handleSuccessfulPayment(Mage_Sales_Model_Order $order, $emailConfirmation = true) {
134
  parent::handleSuccessfulPayment($order);
135
  Mage::getSingleton('securetrading_stpp/payment_direct_session')->clear();
136
  }
app/code/local/Securetrading/Stpp/Model/Payment/Redirect.php CHANGED
@@ -15,7 +15,7 @@ class Securetrading_Stpp_Model_Payment_Redirect extends Securetrading_Stpp_Model
15
  protected $_canVoid = false;
16
  protected $_canUseInternal = true;
17
  protected $_canUseCheckout = true;
18
- protected $_canUseForMultishipping = false;
19
  protected $_isInitializeNeeded = true;
20
  protected $_canFetchTransactionInfo = false;
21
  protected $_canReviewPayment = true;
@@ -42,17 +42,35 @@ class Securetrading_Stpp_Model_Payment_Redirect extends Securetrading_Stpp_Model
42
  return true;
43
  }
44
 
 
 
 
 
 
 
 
45
  public function getOrderPlaceRedirectUrl() {
46
- $this->log(sprintf('In %s.', __METHOD__));
47
- if ($this->getConfigData('ppg_use_iframe')) {
48
- return Mage::getUrl('securetrading/redirect_post/iframe');
49
- }
50
- return Mage::getUrl('securetrading/redirect_post/container');
 
 
 
 
 
51
  }
52
 
53
- public function prepareOrderData(Mage_Sales_Model_Order_Payment $payment) {
 
 
 
 
 
54
  $this->log(sprintf('In %s.', __METHOD__));
55
- $data = parent::prepareOrderData($payment);
 
56
  return $data += array(
57
  'storeid' => $payment->getOrder()->getStoreId(),
58
  'parentcss' => $this->getConfigData('parent_css'),
@@ -60,17 +78,46 @@ class Securetrading_Stpp_Model_Payment_Redirect extends Securetrading_Stpp_Model
60
  'parentjs' => $this->getConfigData('parent_js'),
61
  'childjs' => $this->getConfigData('child_js'),
62
  '_charset_' => Mage::getStoreConfig('design/head/default_charset'),
 
63
  );
64
  }
65
 
66
- public function prepareData($isMoto = false) {
67
  $this->log(sprintf('In %s.', __METHOD__));
68
- $payment = $this->getInfoInstance();
69
- $data = $this->prepareOrderData($payment);
70
  $transport = $this->getIntegration()->runPaymentPages($data, $isMoto);
71
  return $transport;
72
  }
73
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
74
  public function runRedirect() {
75
  $this->log(sprintf('In %s.', __METHOD__));
76
  return $this->getIntegration()->runRedirect();
15
  protected $_canVoid = false;
16
  protected $_canUseInternal = true;
17
  protected $_canUseCheckout = true;
18
+ protected $_canUseForMultishipping = true;
19
  protected $_isInitializeNeeded = true;
20
  protected $_canFetchTransactionInfo = false;
21
  protected $_canReviewPayment = true;
42
  return true;
43
  }
44
 
45
+ protected function _useFirstPathIfIframe($path1, $path2) {
46
+ if ($this->getConfigData('ppg_use_iframe')) {
47
+ return $path1;
48
+ }
49
+ return $path2;
50
+ }
51
+
52
  public function getOrderPlaceRedirectUrl() {
53
+ $this->log(sprintf('In %s.', __METHOD__));
54
+ return Mage::getUrl($this->getOrderPlaceRedirectPath());
55
+ }
56
+ public function getOrderPlaceRedirectPath() {
57
+ $this->log(sprintf('In %s.', __METHOD__));
58
+ return $this->_useFirstPathIfIframe('securetrading/redirect_post_onepage/iframe', 'securetrading/redirect_post_onepage/container');
59
+ }
60
+ public function getMultishippingRedirectPath() {
61
+ $this->log(sprintf('In %s.', __METHOD__));
62
+ return $this->_useFirstPathIfIframe('securetrading/redirect_post_multishipping/iframe', 'securetrading/redirect_post_multishipping/container');
63
  }
64
 
65
+ public function getMotoOrderRedirectPath() {
66
+ $this->log(sprintf('In %s.', __METHOD__));
67
+ return $this->_useFirstPathIfIframe('*/sales_order_create_securetrading/iframe', '*/sales_order_create_securetrading/post');
68
+ }
69
+
70
+ public function prepareOrderData(Mage_Sales_Model_Order_Payment $payment, array $orderIncrementIds) {
71
  $this->log(sprintf('In %s.', __METHOD__));
72
+ $data = parent::prepareOrderData($payment, $orderIncrementIds);
73
+
74
  return $data += array(
75
  'storeid' => $payment->getOrder()->getStoreId(),
76
  'parentcss' => $this->getConfigData('parent_css'),
78
  'parentjs' => $this->getConfigData('parent_js'),
79
  'childjs' => $this->getConfigData('child_js'),
80
  '_charset_' => Mage::getStoreConfig('design/head/default_charset'),
81
+ 'order_increment_ids' => serialize($orderIncrementIds),
82
  );
83
  }
84
 
85
+ public function prepareData($isMoto = false, array $orderIncrementIds) {
86
  $this->log(sprintf('In %s.', __METHOD__));
87
+ $data = $this->prepareOrderData($this->getInfoInstance(), $orderIncrementIds);
 
88
  $transport = $this->getIntegration()->runPaymentPages($data, $isMoto);
89
  return $transport;
90
  }
91
 
92
+ public function validateOrders(array $orderIncrementIds) {
93
+ if (empty($orderIncrementIds)) {
94
+ throw new Exception(Mage::helper('securetrading_stpp')->__('No order increment IDs.'));
95
+ }
96
+
97
+ foreach($orderIncrementIds as $orderIncrementId) {
98
+ if ($orderIncrementId === null) {
99
+ throw new Exception(Mage::helper('securetrading_stpp')->__('No order ID.'));
100
+ }
101
+
102
+ $order = Mage::getModel('sales/order')->loadByIncrementId($orderIncrementId);
103
+
104
+ if ($order->getPayment()->getMethodInstance()->getCode() !== Mage::getModel('securetrading_stpp/payment_redirect')->getCode()) {
105
+ throw new Exception(Mage::helper('securetrading_stpp')->__('Cannot access payment method.'));
106
+ }
107
+
108
+ if ($order->getStatus() !== Securetrading_Stpp_Model_Payment_Abstract::STATUS_PENDING_PPAGES) {
109
+ throw new Exception(Mage::helper('securetrading_stpp')->__('Order not pending payment pages.'));
110
+ }
111
+ }
112
+ return $this;
113
+ }
114
+
115
+ public function getFirstMethodInstance(array $orderIncrementIds) {
116
+ $firstOrderIncrementId = array_shift($orderIncrementIds);
117
+ $order = Mage::getModel('sales/order')->loadByIncrementId($firstOrderIncrementId);
118
+ return $order->getPayment()->getMethodInstance();
119
+ }
120
+
121
  public function runRedirect() {
122
  $this->log(sprintf('In %s.', __METHOD__));
123
  return $this->getIntegration()->runRedirect();
app/code/local/Securetrading/Stpp/controllers/Direct/PostController.php CHANGED
@@ -15,7 +15,7 @@ class Securetrading_Stpp_Direct_PostController extends Mage_Core_Controller_Fron
15
  }
16
 
17
  public function rawAction() {
18
- $this->loadLayout();;
19
  $this->renderLayout();
20
  }
21
 
15
  }
16
 
17
  public function rawAction() {
18
+ $this->loadLayout();
19
  $this->renderLayout();
20
  }
21
 
app/code/local/Securetrading/Stpp/controllers/MultishippingController.php ADDED
@@ -0,0 +1,88 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ require_once(Mage::getModuleDir('controllers', 'Mage_Checkout') . DS . 'MultishippingController.php');
4
+
5
+ class Securetrading_Stpp_MultishippingController extends Mage_Checkout_MultishippingController {
6
+ public function overviewPostAction()
7
+ {
8
+ // start st added
9
+ if ($this->_getCheckout()->getQuote()->getPayment()->getMethodInstance()->getCode() !== 'securetrading_stpp_redirect') {
10
+ return parent::overviewPostAction();
11
+ }
12
+
13
+ $versionInfo = Mage::getVersionInfo();
14
+ $validateFormKey = false;
15
+
16
+ if ($versionInfo['minor'] == 8 && $versionInfo['revision'] >= 1) {
17
+ $validateFormKey = true;
18
+ }
19
+ elseif($versionInfo['minor'] > 8) {
20
+ $validateFormKey = true;
21
+ }
22
+ // end st added
23
+
24
+ if ($validateFormKey) { // conditional st added
25
+ if (!$this->_validateFormKey()) {
26
+ $this->_forward('backToAddresses');
27
+ return;
28
+ }
29
+ } // conditional st added
30
+
31
+ if (!$this->_validateMinimumAmount()) {
32
+ return;
33
+ }
34
+
35
+ try {
36
+ if ($requiredAgreements = Mage::helper('checkout')->getRequiredAgreementIds()) {
37
+ $postedAgreements = array_keys($this->getRequest()->getPost('agreement', array()));
38
+ if ($diff = array_diff($requiredAgreements, $postedAgreements)) {
39
+ $this->_getCheckoutSession()->addError($this->__('Please agree to all Terms and Conditions before placing the order.'));
40
+ $this->_redirect('*/*/billing');
41
+ return;
42
+ }
43
+ }
44
+
45
+ $payment = $this->getRequest()->getPost('payment');
46
+ $paymentInstance = $this->_getCheckout()->getQuote()->getPayment();
47
+ if (isset($payment['cc_number'])) {
48
+ $paymentInstance->setCcNumber($payment['cc_number']);
49
+ }
50
+ if (isset($payment['cc_cid'])) {
51
+ $paymentInstance->setCcCid($payment['cc_cid']);
52
+ }
53
+ $this->_getCheckout()->createOrders();
54
+
55
+ // start st added
56
+ $this->_getCheckout()->getQuote()
57
+ ->setIsActive(true)
58
+ ->save();
59
+ $path = Mage::getModel('securetrading_stpp/payment_redirect')->getMultishippingRedirectPath();
60
+ $this->_redirect($path);
61
+ // end st added
62
+ } catch (Mage_Payment_Model_Info_Exception $e) {
63
+ $message = $e->getMessage();
64
+ if ( !empty($message) ) {
65
+ $this->_getCheckoutSession()->addError($message);
66
+ }
67
+ $this->_redirect('*/*/billing');
68
+ } catch (Mage_Checkout_Exception $e) {
69
+ Mage::helper('checkout')
70
+ ->sendPaymentFailedEmail($this->_getCheckout()->getQuote(), $e->getMessage(), 'multi-shipping');
71
+ $this->_getCheckout()->getCheckoutSession()->clear();
72
+ $this->_getCheckoutSession()->addError($e->getMessage());
73
+ $this->_redirect('*/cart');
74
+ }
75
+ catch (Mage_Core_Exception $e) {
76
+ Mage::helper('checkout')
77
+ ->sendPaymentFailedEmail($this->_getCheckout()->getQuote(), $e->getMessage(), 'multi-shipping');
78
+ $this->_getCheckoutSession()->addError($e->getMessage());
79
+ $this->_redirect('*/*/billing');
80
+ } catch (Exception $e) {
81
+ Mage::logException($e);
82
+ Mage::helper('checkout')
83
+ ->sendPaymentFailedEmail($this->_getCheckout()->getQuote(), $e->getMessage(), 'multi-shipping');
84
+ $this->_getCheckoutSession()->addError($this->__('Order place error.'));
85
+ $this->_redirect('*/*/billing');
86
+ }
87
+ }
88
+ }
app/code/local/Securetrading/Stpp/controllers/Redirect/Post/MultishippingController.php ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Securetrading_Stpp_Redirect_Post_MultishippingController extends Securetrading_Stpp_Controller_Redirect_Post_Abstract {
4
+ protected function _getOrderIncrementIds() {
5
+ return Mage::getSingleton('core/session')->getOrderIds();
6
+ }
7
+ }
app/code/local/Securetrading/Stpp/controllers/Redirect/Post/OnepageController.php ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Securetrading_Stpp_Redirect_Post_OnepageController extends Securetrading_Stpp_Controller_Redirect_Post_Abstract {
4
+ protected function _getOrderIncrementIds() {
5
+ return array(Mage::getModel('checkout/session')->getLastRealOrderId());
6
+ }
7
+ }
app/code/local/Securetrading/Stpp/controllers/RedirectController.php CHANGED
@@ -5,12 +5,25 @@ class Securetrading_Stpp_RedirectController extends Mage_Core_Controller_Front_A
5
  Mage::getModel('securetrading_stpp/payment_redirect')
6
  ->log(sprintf('In %s.', __METHOD__))
7
  ->runRedirect();
8
-
9
- $path = 'checkout/onepage/success';
10
- $arguments = array('_nosid' => true);
 
 
 
 
 
 
 
 
 
 
 
 
11
 
12
  $storeId = $this->getRequest()->get('storeid');
13
  $queryArgs = array('url' => Mage::getModel('core/url')->setStore($storeId)->getUrl($path, $arguments));
 
14
  $this->_redirect('securetrading/payment/location', array('_query' => $queryArgs));
15
  }
16
 
5
  Mage::getModel('securetrading_stpp/payment_redirect')
6
  ->log(sprintf('In %s.', __METHOD__))
7
  ->runRedirect();
8
+
9
+ if (Mage::getSingleton('checkout/session')->setLoadInactive(true)->getQuote()->getIsMultiShipping()) {
10
+ $path = 'checkout/multishipping/success';
11
+ $arguments = array('_nosid' => true);
12
+
13
+ Mage::getSingleton('checkout/session')->clear();
14
+ Mage::getSingleton('checkout/session')->setDisplaySuccess(true);
15
+
16
+ Mage::getSingleton('checkout/type_multishipping_state')->setCompleteStep(Mage_Checkout_Model_Type_Multishipping_State::STEP_OVERVIEW);
17
+ Mage::getSingleton('checkout/type_multishipping_state')->setActiveStep(Mage_Checkout_Model_Type_Multishipping_State::STEP_SUCCESS);
18
+ }
19
+ else {
20
+ $path = 'checkout/onepage/success';
21
+ $arguments = array('_nosid' => true);
22
+ }
23
 
24
  $storeId = $this->getRequest()->get('storeid');
25
  $queryArgs = array('url' => Mage::getModel('core/url')->setStore($storeId)->getUrl($path, $arguments));
26
+
27
  $this->_redirect('securetrading/payment/location', array('_query' => $queryArgs));
28
  }
29
 
app/code/local/Securetrading/Stpp/controllers/Sales/Order/Create/SecuretradingController.php CHANGED
@@ -9,39 +9,32 @@ class Securetrading_Stpp_Sales_Order_Create_SecuretradingController extends Mage
9
  return Mage::getSingleton('admin/session')->isAllowed('sales/order/actions/create');
10
  }
11
 
 
 
 
 
12
  public function preDispatch() {
13
  parent::preDispatch();
14
 
15
  if ($this->getRequest()->getRequestedActionName() !== 'redirect') {
16
- $orderIncrementId = $this->getRequest()->get('order_increment_id');
17
-
18
- if (!$orderIncrementId) {
19
- throw new Exception(Mage::helper('securetrading_stpp')->__('No order ID.'));
20
- }
21
-
22
- $order = Mage::getModel('sales/order')->loadByIncrementId($orderIncrementId);
23
- $this->_methodInstance = $order->getPayment()->getMethodInstance();
24
-
25
- if ($this->_methodInstance->getCode() !== Mage::getModel('securetrading_stpp/payment_redirect')->getCode()) {
26
- throw new Exception(Mage::helper('securetrading_stpp')->__('Cannot access payment method.'));
27
- }
28
-
29
- if ($order->getStatus() !== Securetrading_Stpp_Model_Payment_Abstract::STATUS_PENDING_PPAGES) {
30
- throw new Exception(Mage::helper('securetrading_stpp')->__('Order not pending payment pages.'));
31
- }
32
  }
33
  }
34
 
 
 
 
 
 
35
  public function postAction() {
36
- $transport = $this->_methodInstance->prepareData(true);
37
- Mage::register(Securetrading_Stpp_Block_Payment_Redirect_Post::REGISTRY_TRANSPORT_KEY, $transport);
38
  $this->loadLayout();
39
  $this->renderLayout();
40
  }
41
 
42
  public function rawAction() {
43
- $transport = $this->_methodInstance->prepareData(true);
44
- Mage::register(Securetrading_Stpp_Block_Payment_Redirect_Post::REGISTRY_TRANSPORT_KEY, $transport);
45
  $this->loadLayout();
46
  $this->renderLayout();
47
  }
@@ -67,8 +60,8 @@ class Securetrading_Stpp_Sales_Order_Create_SecuretradingController extends Mage
67
  $path = '*/sales_order/view';
68
  $arguments = array('order_id' => $order->getId());
69
  $queryArgs = array('url' => Mage::getUrl($path, $arguments));
70
- $this->_redirect('securetrading/payment/location', array('_query' => $queryArgs));
71
-
72
  Mage::getSingleton('adminhtml/session')->clear();
73
  Mage::getSingleton('adminhtml/session')->addSuccess($this->__('The order has been created.'));
74
  }
9
  return Mage::getSingleton('admin/session')->isAllowed('sales/order/actions/create');
10
  }
11
 
12
+ protected function _getOrderIncrementids() {
13
+ return array($this->getRequest()->get('order_increment_id'));
14
+ }
15
+
16
  public function preDispatch() {
17
  parent::preDispatch();
18
 
19
  if ($this->getRequest()->getRequestedActionName() !== 'redirect') {
20
+ Mage::getModel('securetrading_stpp/payment_redirect')->validateOrders($this->_getOrderIncrementIds());
21
+ $this->_methodInstance = Mage::getModel('securetrading_stpp/payment_redirect')->getFirstMethodInstance($this->_getOrderIncrementIds());
 
 
 
 
 
 
 
 
 
 
 
 
 
 
22
  }
23
  }
24
 
25
+ protected function _prepareResult() {
26
+ $transport = $this->_methodInstance->prepareData(true, $this->_getOrderIncrementIds());
27
+ Mage::register(Securetrading_Stpp_Block_Payment_Redirect_Post::REGISTRY_TRANSPORT_KEY, $transport);
28
+ }
29
+
30
  public function postAction() {
31
+ $this->_prepareResult();
 
32
  $this->loadLayout();
33
  $this->renderLayout();
34
  }
35
 
36
  public function rawAction() {
37
+ $this->_prepareResult();
 
38
  $this->loadLayout();
39
  $this->renderLayout();
40
  }
60
  $path = '*/sales_order/view';
61
  $arguments = array('order_id' => $order->getId());
62
  $queryArgs = array('url' => Mage::getUrl($path, $arguments));
63
+ $this->_redirect('securetrading/payment/location', array('_query' => $queryArgs, '_store' => 1)); // So frontend store URL used instead of admin
64
+
65
  Mage::getSingleton('adminhtml/session')->clear();
66
  Mage::getSingleton('adminhtml/session')->addSuccess($this->__('The order has been created.'));
67
  }
app/code/local/Securetrading/Stpp/controllers/Sales/Order/CreateController.php CHANGED
@@ -25,13 +25,7 @@ class Securetrading_Stpp_Sales_Order_CreateController extends Mage_Adminhtml_Sal
25
 
26
  // Start ST added.
27
  $this->_getSession()->setLastOrderIncrementId($order->getIncrementId());
28
-
29
- if (Mage::getModel('securetrading_stpp/payment_redirect')->getConfigData('ppg_use_iframe')) {
30
- $path = '*/sales_order_create_securetrading/iframe';
31
- }
32
- else {
33
- $path = '*/sales_order_create_securetrading/post';
34
- }
35
  $this->_redirect($path, array('order_increment_id' => $order->getIncrementId()));
36
  return;
37
  // end ST added.
25
 
26
  // Start ST added.
27
  $this->_getSession()->setLastOrderIncrementId($order->getIncrementId());
28
+ $path = Mage::getModel('securetrading_stpp/payment_redirect')->getMotoOrderRedirectPath();
 
 
 
 
 
 
29
  $this->_redirect($path, array('order_increment_id' => $order->getIncrementId()));
30
  return;
31
  // end ST added.
app/code/local/Securetrading/Stpp/etc/config.xml CHANGED
@@ -3,7 +3,7 @@
3
  <config>
4
  <modules>
5
  <Securetrading_Stpp>
6
- <version>3.0.0</version>
7
  </Securetrading_Stpp>
8
  </modules>
9
 
@@ -24,6 +24,13 @@
24
  <frontName>securetrading</frontName>
25
  </args>
26
  </securetrading_stpp>
 
 
 
 
 
 
 
27
  </routers>
28
  </frontend>
29
 
@@ -107,9 +114,17 @@
107
  </securetrading_stpp>
108
  </observers>
109
  </payment_info_block_prepare_specific_information>
 
 
 
 
 
 
 
 
110
  </events>
111
  </global>
112
-
113
  <crontab>
114
  <jobs>
115
  <securetrading_stpp_abandoned_order_cleanup>
@@ -130,7 +145,7 @@
130
  </securetrading_Stpp_Data_Request_table_cleanup>
131
  </jobs>
132
  </crontab>
133
-
134
  <default>
135
  <payment>
136
  <securetrading_stpp_direct>
3
  <config>
4
  <modules>
5
  <Securetrading_Stpp>
6
+ <version>3.1.0</version>
7
  </Securetrading_Stpp>
8
  </modules>
9
 
24
  <frontName>securetrading</frontName>
25
  </args>
26
  </securetrading_stpp>
27
+ <checkout>
28
+ <args>
29
+ <modules>
30
+ <Securetrading_Stpp before="Mage_Checkout">Securetrading_Stpp</Securetrading_Stpp>
31
+ </modules>
32
+ </args>
33
+ </checkout>
34
  </routers>
35
  </frontend>
36
 
114
  </securetrading_stpp>
115
  </observers>
116
  </payment_info_block_prepare_specific_information>
117
+ <checkout_type_multishipping_create_orders_single>
118
+ <observers>
119
+ <securetrading_stpp>
120
+ <class>Securetrading_Stpp_Model_Observer</class>
121
+ <method>onCheckoutTypeMultishippingCreateOrdersSingle</method>
122
+ </securetrading_stpp>
123
+ </observers>
124
+ </checkout_type_multishipping_create_orders_single>
125
  </events>
126
  </global>
127
+ <!--
128
  <crontab>
129
  <jobs>
130
  <securetrading_stpp_abandoned_order_cleanup>
145
  </securetrading_Stpp_Data_Request_table_cleanup>
146
  </jobs>
147
  </crontab>
148
+ -->
149
  <default>
150
  <payment>
151
  <securetrading_stpp_direct>
app/code/local/Securetrading/Stpp/lib/code/core/Stpp/Data/Request.php CHANGED
@@ -92,14 +92,16 @@ class Stpp_Data_Request extends Stpp_Data_Abstract {
92
  }
93
 
94
  protected function _setBillingtelephonetype($type) {
95
- if ($this->has('billingtelephone')) {
 
96
  $this->_validateTelType($type);
97
  }
98
  $this->_set('billingtelephonetype', $type);
99
  }
100
 
101
  protected function _setCustomertelephonetype($type) {
102
- if ($this->has('customertelephone')) {
 
103
  $this->_validateTelType($type);
104
  }
105
  $this->_set('customertelephonetype', $type);
92
  }
93
 
94
  protected function _setBillingtelephonetype($type) {
95
+ $billingTelephone = $this->get('billingtelephone', '');
96
+ if (!empty($billingTelephone)) {
97
  $this->_validateTelType($type);
98
  }
99
  $this->_set('billingtelephonetype', $type);
100
  }
101
 
102
  protected function _setCustomertelephonetype($type) {
103
+ $customerTelephone = $this->get('customertelephone', '');
104
+ if (!empty($customerTelephone)) {
105
  $this->_validateTelType($type);
106
  }
107
  $this->_set('customertelephonetype', $type);
app/code/local/Securetrading/Stpp/lib/code/core/Stpp/PaymentPages/Base.php CHANGED
@@ -223,7 +223,7 @@ class Stpp_PaymentPages_Base extends Stpp_Component_Abstract implements Stpp_Pay
223
  $notificationHash = $this->_createNotificationHash();
224
 
225
  if($_POST['responsesitesecurity'] !== $notificationHash) {
226
- throw new Stpp_Exception(sprintf($this->__("The notification hashes did not match: %s !== %s."), $_POST['responsesitesecurity'], $notificationHash));
227
  }
228
  }
229
 
223
  $notificationHash = $this->_createNotificationHash();
224
 
225
  if($_POST['responsesitesecurity'] !== $notificationHash) {
226
+ throw new Stpp_Exception(sprintf($this->__("The notification hashes did not match: %s !== %s."), $_POST['responsesitesecurity'], $notificationHash));
227
  }
228
  }
229
 
app/code/local/Securetrading/Stpp/readme.txt CHANGED
@@ -145,8 +145,8 @@ DESTINATIONS
145
  customeremail
146
  enrolled
147
  errorcode
148
- orderreference
149
  maskedpan
 
150
  parenttransactionreference
151
  paymenttypedescription
152
  requesttypedescription
@@ -160,6 +160,7 @@ DESTINATIONS
160
  Custom Fields: (include the following custom fields)
161
  errordata
162
  errormessage
 
163
 
164
  5 - Click 'Save'.
165
  6 - Back on the main Notifications screen, in the first row of the existing notifications table select the newly created filter and destination from the two blank drop-down boxes.
@@ -189,6 +190,7 @@ Redirect Form 1:
189
 
190
  Custom Fields:
191
  storeid
 
192
 
193
  Accounttypedescription:
194
  ECOM
@@ -241,6 +243,7 @@ This feature can be enabled by following these steps:
241
  settleduedate
242
  orderreference
243
  accounttypedescription
 
244
  PASSWORD *
245
 
246
  * The last field, 'PASSWORD', is to be the combination of characters you entered into the 'Site Security Password'.
@@ -292,19 +295,28 @@ Incorrect notification configuration is recognised as an exception and also inse
292
 
293
  Log files should be monitored regularly.
294
 
295
- Cron
296
- ----
297
- Two crons have been provided with the Secure Trading extension:
298
- * The first cron updates all orders that have been set to the 'Payment Pages' order status for more than 24 hours by setting them to 'Canceled'.
299
- * The second cron performs maintenance by deleting unneeded records from the securetrading_stpp_requests database table.
300
-
301
- In order to run the crons you must have set up a cron job according to http://www.magentocommerce.com/wiki/1_-_installation_and_configuration/how_to_setup_a_cron_job.
302
-
303
  Notification
304
  ------------
305
 
306
  If the customer changes any address fields on the Payment Pages the notification will update the address used for the order within Magento.
307
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
308
  ------------
309
  3.1. Support
310
  ------------
145
  customeremail
146
  enrolled
147
  errorcode
 
148
  maskedpan
149
+ orderreference
150
  parenttransactionreference
151
  paymenttypedescription
152
  requesttypedescription
160
  Custom Fields: (include the following custom fields)
161
  errordata
162
  errormessage
163
+ order_increment_ids
164
 
165
  5 - Click 'Save'.
166
  6 - Back on the main Notifications screen, in the first row of the existing notifications table select the newly created filter and destination from the two blank drop-down boxes.
190
 
191
  Custom Fields:
192
  storeid
193
+ order_increment_ids
194
 
195
  Accounttypedescription:
196
  ECOM
243
  settleduedate
244
  orderreference
245
  accounttypedescription
246
+ order_increment_ids
247
  PASSWORD *
248
 
249
  * The last field, 'PASSWORD', is to be the combination of characters you entered into the 'Site Security Password'.
295
 
296
  Log files should be monitored regularly.
297
 
 
 
 
 
 
 
 
 
298
  Notification
299
  ------------
300
 
301
  If the customer changes any address fields on the Payment Pages the notification will update the address used for the order within Magento.
302
 
303
+ Order Cancellation
304
+ ------------------
305
+
306
+ Orders must be cancelled manually when they have been abandoned in the Payment Pages. To determine which orders have been abandoned:
307
+
308
+ 1 - Head to the 'Sales' screen of the admin area.
309
+ 2 - Set the 'Status' filter to 'Payment Pages'.
310
+ 3 - Set the 'Purchased On' filter to two days ago.
311
+ 4 - Click 'Search'.
312
+
313
+ The filtered orders can then be cancelled by doing the following:
314
+
315
+ 1 - Click 'Select Visible'.
316
+ 2 - Set 'Actions' to 'Cancel'.
317
+ 3 - Click 'Submit'.
318
+ 4 - Repeat until there are no filtered orders. Set 'View' to '200' if you have a large number of orders.
319
+
320
  ------------
321
  3.1. Support
322
  ------------
app/code/local/Securetrading/Stpp/sql/securetrading_stpp/upgrade-3.0.0-3.1.0.php ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ $installer = $this;
4
+ $this->startSetup();
5
+
6
+ $installer->getConnection()->dropIndex(
7
+ $installer->getTable('securetrading_stpp/transactions'),
8
+ $installer->getIdxName('securetrading_stpp/transactions', array('transaction_reference'), Varien_Db_Adapter_Interface::INDEX_TYPE_UNIQUE)
9
+ );
10
+
11
+ $installer->getConnection()->addIndex(
12
+ $installer->getTable('securetrading_stpp/transactions'),
13
+ $installer->getIdxName(
14
+ 'securetrading_stpp/transactions',
15
+ array('transaction_reference', 'order_id'),
16
+ Varien_Db_Adapter_Interface::INDEX_TYPE_UNIQUE
17
+ ),
18
+ array('transaction_reference', 'order_id'),
19
+ Varien_Db_Adapter_Interface::INDEX_TYPE_UNIQUE
20
+ );
21
+
22
+ $installer->endSetup();
app/design/frontend/base/default/layout/securetrading.xml CHANGED
@@ -8,41 +8,59 @@
8
  </reference>
9
  </securetrading_stpp_payment>
10
 
11
-
12
- <securetrading_stpp_redirect_post_raw>
13
  <remove name="root" />
14
  <block type="securetrading_stpp/payment_redirect_post" name="securetrading_stpp.payment.redirect.post" template="securetrading/stpp/payment/redirect/post.phtml" output="toHtml" />
15
- </securetrading_stpp_redirect_post_raw>
16
-
17
- <securetrading_stpp_direct_post_raw>
18
- <remove name="root" />
19
- <block type="securetrading_stpp/payment_direct_post" name="securetrading_stpp.payment.direct.post" template="securetrading/stpp/payment/direct/post.phtml" output="toHtml" />
20
- </securetrading_stpp_direct_post_raw>
21
 
22
-
23
- <securetrading_stpp_redirect_post_container>
24
  <update handle="securetrading_stpp_payment" />
25
  <reference name="content">
26
- <block type="securetrading_stpp/payment_redirect_post" name="securetrading_stpp.payment.redirect.post" template="securetrading/stpp/payment/redirect/post.phtml" />
 
 
27
  </reference>
28
- </securetrading_stpp_redirect_post_container>
29
 
30
- <securetrading_stpp_direct_post_container>
31
  <update handle="securetrading_stpp_payment" />
32
- <reference name="content"><!--TODO - does below block exist!? -->
33
- <block type="securetrading_stpp/payment_direct_acs" name="securetrading_stpp.payment.direct.acs" template="securetrading/stpp/payment/direct/acs.phtml" />
34
  </reference>
35
- </securetrading_stpp_direct_post_container>
36
 
37
 
38
- <securetrading_stpp_redirect_post_iframe>
39
- <update handle="securetrading_stpp_payment" />
 
 
 
 
 
 
 
40
  <reference name="content">
41
  <block type="securetrading_stpp/payment_iframe" name="securetrading_stpp.payment.iframe" as="iframe" template="securetrading/stpp/payment/iframe.phtml">
42
- <action method="setSrcByRoute"><route>securetrading_stpp/redirect_post/raw</route></action>
43
  </block>
44
  </reference>
45
- </securetrading_stpp_redirect_post_iframe>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
46
 
47
  <securetrading_stpp_direct_post_iframe>
48
  <update handle="securetrading_stpp_payment" />
@@ -53,6 +71,13 @@
53
  </reference>
54
  </securetrading_stpp_direct_post_iframe>
55
 
 
 
 
 
 
 
 
56
 
57
 
58
  <securetrading_stpp_payment_location>
8
  </reference>
9
  </securetrading_stpp_payment>
10
 
11
+ <securetrading_stpp_redirect_post_onepage_raw>
 
12
  <remove name="root" />
13
  <block type="securetrading_stpp/payment_redirect_post" name="securetrading_stpp.payment.redirect.post" template="securetrading/stpp/payment/redirect/post.phtml" output="toHtml" />
14
+ </securetrading_stpp_redirect_post_onepage_raw>
 
 
 
 
 
15
 
16
+ <securetrading_stpp_redirect_post_onepage_iframe>
 
17
  <update handle="securetrading_stpp_payment" />
18
  <reference name="content">
19
+ <block type="securetrading_stpp/payment_iframe" name="securetrading_stpp.payment.iframe" as="iframe" template="securetrading/stpp/payment/iframe.phtml">
20
+ <action method="setSrcByRoute"><route>securetrading_stpp/redirect_post_onepage/raw</route></action>
21
+ </block>
22
  </reference>
23
+ </securetrading_stpp_redirect_post_onepage_iframe>
24
 
25
+ <securetrading_stpp_redirect_post_onepage_container>
26
  <update handle="securetrading_stpp_payment" />
27
+ <reference name="content">
28
+ <block type="securetrading_stpp/payment_redirect_post" name="securetrading_stpp.payment.redirect.post" template="securetrading/stpp/payment/redirect/post.phtml" />
29
  </reference>
30
+ </securetrading_stpp_redirect_post_onepage_container>
31
 
32
 
33
+
34
+
35
+ <securetrading_stpp_redirect_post_multishipping_raw>
36
+ <remove name="root" />
37
+ <block type="securetrading_stpp/payment_redirect_post" name="securetrading_stpp.payment.redirect.post" template="securetrading/stpp/payment/redirect/post.phtml" output="toHtml" />
38
+ </securetrading_stpp_redirect_post_multishipping_raw>
39
+
40
+ <securetrading_stpp_redirect_post_multishipping_iframe>
41
+ <update handle="checkout_multishipping" />
42
  <reference name="content">
43
  <block type="securetrading_stpp/payment_iframe" name="securetrading_stpp.payment.iframe" as="iframe" template="securetrading/stpp/payment/iframe.phtml">
44
+ <action method="setSrcByRoute"><route>securetrading_stpp/redirect_post_multishipping/raw</route></action>
45
  </block>
46
  </reference>
47
+ </securetrading_stpp_redirect_post_multishipping_iframe>
48
+
49
+ <securetrading_stpp_redirect_post_multishipping_container>
50
+ <update handle="checkout_multishipping" />
51
+ <reference name="content">
52
+ <block type="securetrading_stpp/payment_redirect_post" name="securetrading_stpp.payment.redirect.post" template="securetrading/stpp/payment/redirect/post.phtml" />
53
+ </reference>
54
+ </securetrading_stpp_redirect_post_multishipping_container>
55
+
56
+
57
+
58
+
59
+
60
+ <securetrading_stpp_direct_post_raw>
61
+ <remove name="root" />
62
+ <block type="securetrading_stpp/payment_direct_post" name="securetrading_stpp.payment.direct.post" template="securetrading/stpp/payment/direct/post.phtml" output="toHtml" />
63
+ </securetrading_stpp_direct_post_raw>
64
 
65
  <securetrading_stpp_direct_post_iframe>
66
  <update handle="securetrading_stpp_payment" />
71
  </reference>
72
  </securetrading_stpp_direct_post_iframe>
73
 
74
+ <securetrading_stpp_direct_post_container>
75
+ <update handle="securetrading_stpp_payment" />
76
+ <reference name="content"><!--TODO - does below block exist!? -->
77
+ <block type="securetrading_stpp/payment_direct_acs" name="securetrading_stpp.payment.direct.acs" template="securetrading/stpp/payment/direct/acs.phtml" />
78
+ </reference>
79
+ </securetrading_stpp_direct_post_container>
80
+
81
 
82
 
83
  <securetrading_stpp_payment_location>
app/etc/modules/{Securetrading_Stpp.xml → SecureTrading_Stpp.xml} RENAMED
File without changes
package.xml CHANGED
@@ -1,19 +1,18 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Securetrading_Stpp</name>
4
- <version>3.0.1.2</version>
5
  <stability>stable</stability>
6
  <license>GPL</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Integrates Magento with the SecureTrading STPP payment gateway.</summary>
10
  <description>Integrates Magento with the SecureTrading STPP payment gateway.</description>
11
- <notes>1 - 'ST Transactions' page: pagination and the view x orders select dropdown now functions correctly.&#xD;
12
- 2 - Form data now escaped using Mage_Core_Helper_Data::escapeHtml().</notes>
13
  <authors><author><name>PeteST</name><user>PeteST</user><email>peter.barrow@securetrading.com</email></author></authors>
14
- <date>2014-02-13</date>
15
- <time>12:46:31</time>
16
- <contents><target name="magelocal"><dir name="Securetrading"><dir name="Stpp"><dir name="Block"><dir name="Adminhtml"><dir name="Sales"><dir name="Order"><dir name="View"><dir name="Tab"><file name="Modifier.php" hash="23617edc4641c7e3525faae08e11e818"/><file name="Transactions.php" hash="fe4007125601a39b75047f974d25b58e"/></dir></dir></dir><dir name="Transactions"><file name="Children.php" hash="0b35ac5e3a5640ef299797f2cc2928cb"/><dir name="Data"><file name="Abstract.php" hash="d742570fd2d000e7ea5ef57471e194db"/><file name="Request.php" hash="277498a5a058aec448bd32b9433fc5b8"/><file name="Response.php" hash="50afef623df120b8895769528b0174d9"/></dir><file name="Grid.php" hash="733fd8f8c7c6a9d7e78549946929d751"/><file name="Single.php" hash="579c91c55d0bda1a557d30eb6c03eb9c"/></dir><file name="Transactions.php" hash="ef8d946452081c50ea50a2f56d9ff168"/></dir><dir name="System"><dir name="Config"><dir name="Fieldset"><file name="Fields.php" hash="0310bae31c21c3d4df46107fbce3cdfa"/></dir><file name="Group.php" hash="7f36f8de6918d4d75a1ba059194a31df"/></dir></dir><dir name="Widget"><dir name="Grid"><dir name="Column"><dir name="Renderer"><file name="Parenttransactionreference.php" hash="2d1ef69a9554457d150e0064f24a02b2"/></dir></dir></dir></dir></dir><dir name="Payment"><dir name="Direct"><file name="Form.php" hash="7ac72932a0af03d8ee0f039238325e1e"/><file name="Info.php" hash="96b45fd3a2530d32ad5b762d30adb349"/><file name="Post.php" hash="5e76814c5156accd9fc45c6f8925e553"/></dir><file name="Iframe.php" hash="1bf66cdd951253928cce893d7235ccf2"/><dir name="Info"><file name="Abstract.php" hash="d3b57a1f6bb7353aa066ea669c5179c7"/></dir><file name="Location.php" hash="95461da6e144559bb26b56fcb5733c29"/><dir name="Redirect"><file name="Form.php" hash="4a5c80135121a495a94e193b0d7f1982"/><file name="Info.php" hash="5172a488856a167205abab64819062d5"/><file name="Post.php" hash="00d05d0064ecbc5bdc75b615bdfc4894"/></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="7a5e840b55cd85810bbb5670d884913d"/></dir><dir name="Model"><dir name="Actions"><file name="Abstract.php" hash="800051473f2baac8a390d10e094c8127"/><file name="Direct.php" hash="1806c9720199162fb939c7e2f4260074"/><file name="Redirect.php" hash="ba3d60de3e26cab69362b8d0df533d51"/></dir><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Backend"><file name="Multiselect.php" hash="65ca6dd7b6b597aada4978b7c6e803c2"/></dir></dir></dir></dir><file name="Cron.php" hash="57c166a645f9b0309c9be7c9e0e2ecb0"/><file name="Integration.php" hash="af1ba57e77a428a83b1f0b8fdc482e1e"/><file name="Observer.php" hash="826e0a27df06795ad6394b4dff50d8b1"/><dir name="Payment"><file name="Abstract.php" hash="aba3d37a15f3d7bf90412272624be633"/><dir name="Direct"><file name="Session.php" hash="981654031f061f1e04efc80b4a57b428"/></dir><file name="Direct.php" hash="8568304cbe5a5e37a140b100257ae475"/><dir name="Redirect"><file name="Notification.php" hash="22e2a3366aa294f83aabe94decdbc47f"/><file name="Request.php" hash="cb3b90d9bb7a31bec42ae94ae83770cb"/></dir><file name="Redirect.php" hash="ecb52964f07b36453600dce048bfffc3"/></dir><dir name="Resource"><dir name="Payment"><dir name="Redirect"><file name="Notification.php" hash="251daf3860785e6aab8b5a6594bf397a"/><dir name="Request"><file name="Collection.php" hash="ce960dbcdf4c40f08782750b3e7ec4d4"/></dir><file name="Request.php" hash="9a51ce8b5aa2bf188e39afcd099225d1"/></dir></dir><dir name="Transaction"><file name="Collection.php" hash="c48174c935a30b1df2e545ff3ad71adc"/><dir name="Types"><file name="Collection.php" hash="efc344d22f5b19ad8a239ec3acb20e77"/></dir><file name="Types.php" hash="abbde61e4d29e19bb3a67ad1959b388f"/></dir><file name="Transaction.php" hash="a864a129f03751920262b847a1711f4d"/></dir><dir name="Source"><file name="Cardtypes.php" hash="bdac2842ee54f15d4deab2cd1e0caea6"/><file name="Connection.php" hash="b281807c740f8a79f591789a3d8792d7"/><file name="Paymentaction.php" hash="0f05df5d7e5248808c96700e102a2b11"/><file name="Settleduedate.php" hash="b5acc4d4eae0a22d4bf25e5fd5f2cda0"/><file name="Settlestatus.php" hash="c65d0810ffa5e4cfe7d086a489303eda"/></dir><dir name="Transaction"><file name="Types.php" hash="d704d79ee9cf90d6c678fdbbb5d66b6d"/></dir><file name="Transaction.php" hash="4d0ef347983194e026b5746f7a6ddd41"/><file name="Transport.php" hash="c0694f56126c89de202c6adb0108082c"/></dir><dir name="controllers"><dir name="Direct"><file name="PostController.php" hash="fdaf2cacc8bbbc123948686b7616b5c2"/></dir><file name="DirectController.php" hash="b10baf3ed1a40d6f80e2f639370d8be3"/><file name="PaymentController.php" hash="a1fb4d11fa71c75180af3ca6bea99f25"/><dir name="Redirect"><file name="PostController.php" hash="1be20f0d44ff8b0bfd77a1800b82c6e7"/></dir><file name="RedirectController.php" hash="3702fdd15ca5d877b4aa8edc7d554d3d"/><dir name="Sales"><dir name="Order"><dir name="Create"><file name="SecuretradingController.php" hash="118b8988a25dde196a847ae6fb54e6f6"/></dir><file name="CreateController.php" hash="7114c81e80708db56f8a87a86ebbda72"/><file name="EditController.php" hash="8d516942c3c10e3f4120e7a10e98c81d"/></dir></dir><dir name="Securetrading"><file name="TransactionsController.php" hash="f99b8dd9081ab99f00b8fc083d9d9ae3"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="4893ab9fecad1a67037bdabd7bb5aa96"/><file name="config.xml" hash="be0444c37b3c673aaa0126416eb13594"/><file name="system.xml" hash="87f5905707756d1f875567ead9728054"/></dir><dir name="lib"><file name="Securetrading.php" hash="740260870e77fd6fffa597ec11fbd540"/><dir name="code"><dir name="core"><dir name="Stpp"><dir name="Actions"><file name="Abstract.php" hash="fce4b439f195bb866983180fe57e3bf7"/><file name="BaseInterface.php" hash="cd3004a4734c99499b41f9442d8406f4"/></dir><dir name="Api"><file name="ActionsInterface.php" hash="20feaa9eaefa912efb02d3cd33212fa2"/><file name="Base.php" hash="4d21e40c7af399c15521ff122c7b0d67"/><file name="BaseInterface.php" hash="252e16b85c0e7e230934b02c3e16728d"/><dir name="Connection"><file name="BaseInterface.php" hash="8638cb072cf263abd8687e87cdc81fb5"/><file name="Stapi.php" hash="107a6a41d31b021ddbd84739499b1830"/><file name="Store.php" hash="3909b4aa2b618816c4380d4b41d2d375"/><file name="StoreInterface.php" hash="6e8bfff449b86b145ae5b138dde91d50"/><file name="Webservices.php" hash="6eb6f7d1a29de997b957eb72ba5de59c"/></dir><file name="Context.php" hash="4b4471af376dbb0023f9836a9e8557fc"/><file name="ContextInterface.php" hash="b3e9edfa4fe8776140eafce41da98709"/><file name="Facade.php" hash="d5b1f579af75a6ad07dbae25e0f23dd2"/><file name="Helper.php" hash="1fa61f567d149594e02bb4e5ee9c23ed"/><file name="HelperInterface.php" hash="aa6f9747d5c2f242455d5c11be51b66b"/><file name="Log.php" hash="8f9df624ea7e440f7d074be07a98e511"/><file name="LogInterface.php" hash="fce5c3d966eaf5885f3575bd800c6d46"/><file name="Process.php" hash="7db529c5ebb80b21ad6e2b8fe07b8089"/><file name="ProcessInterface.php" hash="76117fc893006c7a927eda90596261f3"/><file name="Result.php" hash="8146ff3cd41bc1c23eb9cad8192d8cec"/><file name="ResultInterface.php" hash="eb062e7e941172e6258eb3fe6eb25c71"/><file name="Send.php" hash="ec79e21c81a6521a7813267cad1d9103"/><file name="SendInterface.php" hash="0a13ea22e3d2f556be7f02d5b8568e43"/><dir name="Xml"><file name="Reader.php" hash="36baf335da8050798ccf3eda63b78606"/><file name="ReaderInterface.php" hash="3a148a5b88af125d766877f33dd882b7"/><file name="Writer.php" hash="3832c9b19967873aa7683bc86e0595dd"/><file name="WriterInterface.php" hash="1700903ae09c5dec1a8b6c215a6f0a97"/></dir></dir><dir name="Component"><file name="Abstract.php" hash="ab8f75478d9b11383d2e4cf39f99f92d"/><file name="BaseInterface.php" hash="a7a21448d576cba4921a17e3c4c63e26"/><file name="Store.php" hash="8afe5baa023a117085dfca51d8d6d0c4"/></dir><file name="Config.php" hash="e62fcc26e717a67051abd0873998c3d7"/><dir name="Data"><file name="Abstract.php" hash="20a4f4c90e1b0536a53bb47dd02f7013"/><file name="AbstractInterface.php" hash="511f49db6045b20b299ac27a123b0ee1"/><file name="Request.php" hash="d0e94006d1057c529bbe96f934cb4e00"/><file name="Response.php" hash="61ad719240e67b23e5cec2083c83d4ae"/></dir><file name="Exception.php" hash="ddef67bc724764d3fa455b3f246e670d"/><file name="Facade.php" hash="b044ddd9a1c2e0097bea099efa1f6bd5"/><dir name="Fields"><file name="Admin.php" hash="dad214c2f8b8c9300316abe10073dc3d"/><file name="AdminInterface.php" hash="d60603c6fe6ac4393edc3e699d11cfa2"/><file name="Facade.php" hash="4f00cf6fb606175bb8c1a98988504cb7"/><file name="Frontend.php" hash="e558224f8c3adf54733c1df71e14a8f1"/><file name="FrontendInterface.php" hash="9e7e760b58d9b1aea5169199f85055b8"/></dir><file name="Helper.php" hash="1b9e5cda59cab32904f41a1137732889"/><file name="HelperInterface.php" hash="e74c27a61169ac2dbad549178635b652"/><dir name="PaymentPages"><file name="ActionsInterface.php" hash="477836396b30505fd77e2edab9228eb9"/><file name="Base.php" hash="e681b4552d4d7a21235cd3e7b75a700c"/><file name="BaseInterface.php" hash="8e88b88ea80bbc678275b545f5a0ca0e"/><file name="Facade.php" hash="6592fe506f9b11f2bc5d59290c2089ac"/><file name="Helper.php" hash="0f299510045851097ddb2f5e5999130b"/><file name="HelperInterface.php" hash="92cb7856303a054852856f84fce59ab8"/><file name="Result.php" hash="516d99ad6325d3688cb6cf9d96611bad"/><file name="ResultInterface.php" hash="6331633ee01a8f801e6aa92bc4b21a79"/></dir><dir name="Result"><file name="Abstract.php" hash="e101a37e53b02217d9f71896724fc464"/><file name="AbstractInterface.php" hash="67f281eeb616125a6730c9d0bdcdefbf"/></dir><file name="Types.php" hash="f6623d4ecc2cf85f1e9b90bdcded3bbe"/><file name="TypesInterface.php" hash="01535df4e4e7bb7075a06050841594f0"/><dir name="Utility"><file name="Facade.php" hash="a87ccac18a334e151e109cf07b5338f0"/><dir name="Log"><file name="Base.php" hash="6d4a4ac38eeb8747199ae932caab713b"/><file name="BaseInterface.php" hash="8df2532e217b93725ab15e5a76dfd6e7"/><dir name="User"><file name="Abstract.php" hash="622318fca2ae84a50f50f65153036528"/></dir><file name="UserInterface.php" hash="f88f34cb0338ab4d98c3f5ebcbb22f7d"/><dir name="Writer"><file name="File.php" hash="ac8301a7c10222459cdd0f789783a2bc"/></dir><file name="WriterInterface.php" hash="0e4e743dd4c8da74fea389c8f728b0b4"/></dir><dir name="Translator"><file name="Base.php" hash="4ff1233235a2b58886da2a3b07247d9a"/><file name="BaseInterface.php" hash="f76d5808b75e190bb6499da9608c9efb"/></dir></dir><dir name="Xml"><file name="Writer.php" hash="97a246a7642179bd346cfce33f523c87"/></dir></dir><file name="Stpp.php" hash="2b593e5ee83d4272bb4efac0fb09c88b"/></dir><dir name="overrides"><dir name="Magento"><dir name="Utility"><file name="Facade.php" hash="efbd45016fa27108d3b8dbeb4f085b25"/><dir name="Log"><file name="Writer.php" hash="ac55bea5883c26734f7fcd71d0a63445"/></dir></dir></dir></dir></dir><file name="magento_child_css.css" hash="e9b6ad79401514f21b6497a9ea14f1b3"/><dir name="stpp_logs"><file name="api.txt" hash="d41d8cd98f00b204e9800998ecf8427e"/><file name="exception.txt" hash="d41d8cd98f00b204e9800998ecf8427e"/></dir><dir name="stpp_translations"><file name="core.php" hash="8de46a7cce58eadbff4ae9b294e20aec"/></dir></dir><file name="readme.txt" hash="c2ce48e400a27e0c544db12a9b948df4"/><dir name="sql"><dir name="securetrading_stpp"><file name="install-3.0.0.php" hash="c5e0924c2e113343856d35c25d85fa26"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="securetrading"><dir><dir name="stpp"><dir name="payment"><dir name="direct"><file name="form.phtml" hash="1ebafc1b8fe9b5534c79e838187ca93a"/><file name="info.phtml" hash="e6537fa0b3ff758b694f40d5f6437da8"/></dir><file name="iframe.phtml" hash="550f6904467d71a368b03b2ba6852841"/><dir name="redirect"><file name="form.phtml" hash="d41d8cd98f00b204e9800998ecf8427e"/><file name="info.phtml" hash="e6537fa0b3ff758b694f40d5f6437da8"/><file name="post.phtml" hash="8b0b70df44ce27b54c57c7369dd59655"/></dir></dir><dir name="sales"><dir name="transactions"><file name="single.phtml" hash="42f46e7ce305f376b38a33374088f62e"/></dir></dir><dir name="system"><dir name="config"><dir name="fieldset"><file name="fields.phtml" hash="0c0aff08f256a5cfd2c644e7f629c9d7"/></dir></dir></dir></dir></dir></dir></dir><dir name="layout"><file name="securetrading.xml" hash="702c1f0992e6bd9404839e328f656788"/></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="securetrading"><dir><dir name="stpp"><dir name="payment"><dir name="direct"><file name="form.phtml" hash="84793faa4856fa0a5f1d31777507f257"/><file name="info.phtml" hash="990e48a8f00f86691a64f5f9cf371b05"/><file name="post.phtml" hash="d8643b7e67de32c311c30b531b0c6392"/></dir><file name="iframe.phtml" hash="550f6904467d71a368b03b2ba6852841"/><file name="location.phtml" hash="e790bf7d7f7c453f98cd9e03e0b74ab1"/><dir name="redirect"><file name="form.phtml" hash="7590b97c94ac8a7058606c82a2bd3766"/><file name="info.phtml" hash="4eaf8674c2de27618920fdcd65d61ade"/><file name="post.phtml" hash="c4edc4e15986cfc9dd010fe4eb915ccc"/></dir></dir></dir></dir></dir></dir><dir name="layout"><file name="securetrading.xml" hash="f7a0c78bf59b2631cf4d52710665e04a"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Securetrading_Stpp.xml" hash="92a8948ac28f1ca221b1743e710a97d1"/></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="images"><dir name="securetrading"><dir name="stpp"><file name="st_logo_strapline_200_63.png" hash="bca24f2696fca0d2bca54681a635e8e3"/></dir></dir></dir></dir></dir></dir></target><target name="mage"><dir name="app"><dir name="code"><dir name="local"><dir name="Securetrading"><dir name="Stpp"><file name="readme.txt" hash="c2ce48e400a27e0c544db12a9b948df4"/></dir></dir></dir></dir></dir></target></contents>
17
  <compatible/>
18
  <dependencies><required><php><min>5.3.0</min><max>5.5.8</max></php></required></dependencies>
19
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Securetrading_Stpp</name>
4
+ <version>3.1.0.8</version>
5
  <stability>stable</stability>
6
  <license>GPL</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Integrates Magento with the SecureTrading STPP payment gateway.</summary>
10
  <description>Integrates Magento with the SecureTrading STPP payment gateway.</description>
11
+ <notes>The official SecureTrading STPP Magento integration.</notes>
 
12
  <authors><author><name>PeteST</name><user>PeteST</user><email>peter.barrow@securetrading.com</email></author></authors>
13
+ <date>2014-03-10</date>
14
+ <time>17:07:12</time>
15
+ <contents><target name="magelocal"><dir name="Securetrading"><dir name="Stpp"><dir name="Block"><dir name="Adminhtml"><dir name="Sales"><dir name="Order"><dir name="View"><dir name="Tab"><file name="Modifier.php" hash="23617edc4641c7e3525faae08e11e818"/><file name="Transactions.php" hash="fe4007125601a39b75047f974d25b58e"/></dir></dir></dir><dir name="Transactions"><file name="Children.php" hash="0b35ac5e3a5640ef299797f2cc2928cb"/><dir name="Data"><file name="Abstract.php" hash="d742570fd2d000e7ea5ef57471e194db"/><file name="Request.php" hash="277498a5a058aec448bd32b9433fc5b8"/><file name="Response.php" hash="50afef623df120b8895769528b0174d9"/></dir><file name="Grid.php" hash="733fd8f8c7c6a9d7e78549946929d751"/><file name="Single.php" hash="579c91c55d0bda1a557d30eb6c03eb9c"/></dir><file name="Transactions.php" hash="ef8d946452081c50ea50a2f56d9ff168"/></dir><dir name="System"><dir name="Config"><dir name="Fieldset"><file name="Fields.php" hash="0310bae31c21c3d4df46107fbce3cdfa"/></dir><file name="Group.php" hash="7f36f8de6918d4d75a1ba059194a31df"/></dir></dir><dir name="Widget"><dir name="Grid"><dir name="Column"><dir name="Renderer"><file name="Parenttransactionreference.php" hash="2d1ef69a9554457d150e0064f24a02b2"/></dir></dir></dir></dir></dir><dir name="Payment"><dir name="Direct"><file name="Form.php" hash="7ac72932a0af03d8ee0f039238325e1e"/><file name="Info.php" hash="96b45fd3a2530d32ad5b762d30adb349"/><file name="Post.php" hash="5e76814c5156accd9fc45c6f8925e553"/></dir><file name="Iframe.php" hash="1bf66cdd951253928cce893d7235ccf2"/><dir name="Info"><file name="Abstract.php" hash="d3b57a1f6bb7353aa066ea669c5179c7"/></dir><file name="Location.php" hash="95461da6e144559bb26b56fcb5733c29"/><dir name="Redirect"><file name="Form.php" hash="4a5c80135121a495a94e193b0d7f1982"/><file name="Info.php" hash="5172a488856a167205abab64819062d5"/><file name="Post.php" hash="00d05d0064ecbc5bdc75b615bdfc4894"/></dir></dir></dir><dir name="Controller"><dir name="Redirect"><dir name="Post"><file name="Abstract.php" hash="f26396762758c1fe090460751d7c50e8"/></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="7a5e840b55cd85810bbb5670d884913d"/></dir><dir name="Model"><dir name="Actions"><file name="Abstract.php" hash="800051473f2baac8a390d10e094c8127"/><file name="Direct.php" hash="1806c9720199162fb939c7e2f4260074"/><file name="Redirect.php" hash="58f970dc6f7cf3fc18b93b9e7776d74a"/></dir><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Backend"><file name="Multiselect.php" hash="65ca6dd7b6b597aada4978b7c6e803c2"/></dir></dir></dir></dir><file name="Cron.php" hash="57c166a645f9b0309c9be7c9e0e2ecb0"/><file name="Integration.php" hash="e005353995be9cf79a7e5251c6193491"/><file name="Observer.php" hash="650fec98e19d9bb448e7953397c12499"/><dir name="Payment"><file name="Abstract.php" hash="9db804ea16f016c48a6be9d4205e97c5"/><dir name="Direct"><file name="Session.php" hash="981654031f061f1e04efc80b4a57b428"/></dir><file name="Direct.php" hash="09d2607b2447d16d6a53fe3c532f4556"/><dir name="Redirect"><file name="Notification.php" hash="22e2a3366aa294f83aabe94decdbc47f"/><file name="Request.php" hash="cb3b90d9bb7a31bec42ae94ae83770cb"/></dir><file name="Redirect.php" hash="bac0262e0d2b5dba5d78834d769f3bc8"/></dir><dir name="Resource"><dir name="Payment"><dir name="Redirect"><file name="Notification.php" hash="251daf3860785e6aab8b5a6594bf397a"/><dir name="Request"><file name="Collection.php" hash="ce960dbcdf4c40f08782750b3e7ec4d4"/></dir><file name="Request.php" hash="9a51ce8b5aa2bf188e39afcd099225d1"/></dir></dir><dir name="Transaction"><file name="Collection.php" hash="c48174c935a30b1df2e545ff3ad71adc"/><dir name="Types"><file name="Collection.php" hash="efc344d22f5b19ad8a239ec3acb20e77"/></dir><file name="Types.php" hash="abbde61e4d29e19bb3a67ad1959b388f"/></dir><file name="Transaction.php" hash="a864a129f03751920262b847a1711f4d"/></dir><dir name="Source"><file name="Cardtypes.php" hash="bdac2842ee54f15d4deab2cd1e0caea6"/><file name="Connection.php" hash="b281807c740f8a79f591789a3d8792d7"/><file name="Paymentaction.php" hash="0f05df5d7e5248808c96700e102a2b11"/><file name="Settleduedate.php" hash="b5acc4d4eae0a22d4bf25e5fd5f2cda0"/><file name="Settlestatus.php" hash="c65d0810ffa5e4cfe7d086a489303eda"/></dir><dir name="Transaction"><file name="Types.php" hash="d704d79ee9cf90d6c678fdbbb5d66b6d"/></dir><file name="Transaction.php" hash="4d0ef347983194e026b5746f7a6ddd41"/><file name="Transport.php" hash="c0694f56126c89de202c6adb0108082c"/></dir><dir name="controllers"><dir name="Direct"><file name="PostController.php" hash="8961fb743e3fd0124c0e642ff74a6810"/></dir><file name="DirectController.php" hash="b10baf3ed1a40d6f80e2f639370d8be3"/><file name="MultishippingController.php" hash="29eba3273479799bca3ec36c32d0f86a"/><file name="PaymentController.php" hash="a1fb4d11fa71c75180af3ca6bea99f25"/><dir name="Redirect"><dir name="Post"><file name="MultishippingController.php" hash="77bad529935b43b48e16269572498b8d"/><file name="OnepageController.php" hash="0d9a9aa74f70f2995eb417123ed5242d"/></dir></dir><file name="RedirectController.php" hash="0913375e46743bca606c222409875440"/><dir name="Sales"><dir name="Order"><dir name="Create"><file name="SecuretradingController.php" hash="9865f9994c16f24353b39526d4b02a3c"/></dir><file name="CreateController.php" hash="0e61ccd7c3e08971db36b1f2e04af9ce"/><file name="EditController.php" hash="8d516942c3c10e3f4120e7a10e98c81d"/></dir></dir><dir name="Securetrading"><file name="TransactionsController.php" hash="f99b8dd9081ab99f00b8fc083d9d9ae3"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="4893ab9fecad1a67037bdabd7bb5aa96"/><file name="config.xml" hash="98241aaaf4af2732c41c47d461dc06cc"/><file name="system.xml" hash="87f5905707756d1f875567ead9728054"/></dir><dir name="lib"><file name="Securetrading.php" hash="740260870e77fd6fffa597ec11fbd540"/><dir name="code"><dir name="core"><dir name="Stpp"><dir name="Actions"><file name="Abstract.php" hash="fce4b439f195bb866983180fe57e3bf7"/><file name="BaseInterface.php" hash="cd3004a4734c99499b41f9442d8406f4"/></dir><dir name="Api"><file name="ActionsInterface.php" hash="20feaa9eaefa912efb02d3cd33212fa2"/><file name="Base.php" hash="4d21e40c7af399c15521ff122c7b0d67"/><file name="BaseInterface.php" hash="252e16b85c0e7e230934b02c3e16728d"/><dir name="Connection"><file name="BaseInterface.php" hash="8638cb072cf263abd8687e87cdc81fb5"/><file name="Stapi.php" hash="107a6a41d31b021ddbd84739499b1830"/><file name="Store.php" hash="3909b4aa2b618816c4380d4b41d2d375"/><file name="StoreInterface.php" hash="6e8bfff449b86b145ae5b138dde91d50"/><file name="Webservices.php" hash="6eb6f7d1a29de997b957eb72ba5de59c"/></dir><file name="Context.php" hash="4b4471af376dbb0023f9836a9e8557fc"/><file name="ContextInterface.php" hash="b3e9edfa4fe8776140eafce41da98709"/><file name="Facade.php" hash="d5b1f579af75a6ad07dbae25e0f23dd2"/><file name="Helper.php" hash="1fa61f567d149594e02bb4e5ee9c23ed"/><file name="HelperInterface.php" hash="aa6f9747d5c2f242455d5c11be51b66b"/><file name="Log.php" hash="8f9df624ea7e440f7d074be07a98e511"/><file name="LogInterface.php" hash="fce5c3d966eaf5885f3575bd800c6d46"/><file name="Process.php" hash="7db529c5ebb80b21ad6e2b8fe07b8089"/><file name="ProcessInterface.php" hash="76117fc893006c7a927eda90596261f3"/><file name="Result.php" hash="8146ff3cd41bc1c23eb9cad8192d8cec"/><file name="ResultInterface.php" hash="eb062e7e941172e6258eb3fe6eb25c71"/><file name="Send.php" hash="ec79e21c81a6521a7813267cad1d9103"/><file name="SendInterface.php" hash="0a13ea22e3d2f556be7f02d5b8568e43"/><dir name="Xml"><file name="Reader.php" hash="36baf335da8050798ccf3eda63b78606"/><file name="ReaderInterface.php" hash="3a148a5b88af125d766877f33dd882b7"/><file name="Writer.php" hash="3832c9b19967873aa7683bc86e0595dd"/><file name="WriterInterface.php" hash="1700903ae09c5dec1a8b6c215a6f0a97"/></dir></dir><dir name="Component"><file name="Abstract.php" hash="ab8f75478d9b11383d2e4cf39f99f92d"/><file name="BaseInterface.php" hash="a7a21448d576cba4921a17e3c4c63e26"/><file name="Store.php" hash="8afe5baa023a117085dfca51d8d6d0c4"/></dir><file name="Config.php" hash="e62fcc26e717a67051abd0873998c3d7"/><dir name="Data"><file name="Abstract.php" hash="20a4f4c90e1b0536a53bb47dd02f7013"/><file name="AbstractInterface.php" hash="511f49db6045b20b299ac27a123b0ee1"/><file name="Request.php" hash="e7b17b29918177be85c1b2ec29c02a2c"/><file name="Response.php" hash="61ad719240e67b23e5cec2083c83d4ae"/></dir><file name="Exception.php" hash="ddef67bc724764d3fa455b3f246e670d"/><file name="Facade.php" hash="b044ddd9a1c2e0097bea099efa1f6bd5"/><dir name="Fields"><file name="Admin.php" hash="dad214c2f8b8c9300316abe10073dc3d"/><file name="AdminInterface.php" hash="d60603c6fe6ac4393edc3e699d11cfa2"/><file name="Facade.php" hash="4f00cf6fb606175bb8c1a98988504cb7"/><file name="Frontend.php" hash="e558224f8c3adf54733c1df71e14a8f1"/><file name="FrontendInterface.php" hash="9e7e760b58d9b1aea5169199f85055b8"/></dir><file name="Helper.php" hash="1b9e5cda59cab32904f41a1137732889"/><file name="HelperInterface.php" hash="e74c27a61169ac2dbad549178635b652"/><dir name="PaymentPages"><file name="ActionsInterface.php" hash="477836396b30505fd77e2edab9228eb9"/><file name="Base.php" hash="86e1829a428e28334f5a280636066216"/><file name="BaseInterface.php" hash="8e88b88ea80bbc678275b545f5a0ca0e"/><file name="Facade.php" hash="6592fe506f9b11f2bc5d59290c2089ac"/><file name="Helper.php" hash="0f299510045851097ddb2f5e5999130b"/><file name="HelperInterface.php" hash="92cb7856303a054852856f84fce59ab8"/><file name="Result.php" hash="516d99ad6325d3688cb6cf9d96611bad"/><file name="ResultInterface.php" hash="6331633ee01a8f801e6aa92bc4b21a79"/></dir><dir name="Result"><file name="Abstract.php" hash="e101a37e53b02217d9f71896724fc464"/><file name="AbstractInterface.php" hash="67f281eeb616125a6730c9d0bdcdefbf"/></dir><file name="Types.php" hash="f6623d4ecc2cf85f1e9b90bdcded3bbe"/><file name="TypesInterface.php" hash="01535df4e4e7bb7075a06050841594f0"/><dir name="Utility"><file name="Facade.php" hash="a87ccac18a334e151e109cf07b5338f0"/><dir name="Log"><file name="Base.php" hash="6d4a4ac38eeb8747199ae932caab713b"/><file name="BaseInterface.php" hash="8df2532e217b93725ab15e5a76dfd6e7"/><dir name="User"><file name="Abstract.php" hash="622318fca2ae84a50f50f65153036528"/></dir><file name="UserInterface.php" hash="f88f34cb0338ab4d98c3f5ebcbb22f7d"/><dir name="Writer"><file name="File.php" hash="ac8301a7c10222459cdd0f789783a2bc"/></dir><file name="WriterInterface.php" hash="0e4e743dd4c8da74fea389c8f728b0b4"/></dir><dir name="Translator"><file name="Base.php" hash="4ff1233235a2b58886da2a3b07247d9a"/><file name="BaseInterface.php" hash="f76d5808b75e190bb6499da9608c9efb"/></dir></dir><dir name="Xml"><file name="Writer.php" hash="97a246a7642179bd346cfce33f523c87"/></dir></dir><file name="Stpp.php" hash="2b593e5ee83d4272bb4efac0fb09c88b"/></dir><dir name="overrides"><dir name="Magento"><dir name="Utility"><file name="Facade.php" hash="efbd45016fa27108d3b8dbeb4f085b25"/><dir name="Log"><file name="Writer.php" hash="ac55bea5883c26734f7fcd71d0a63445"/></dir></dir></dir></dir></dir><file name="magento_child_css.css" hash="e9b6ad79401514f21b6497a9ea14f1b3"/><dir name="stpp_logs"><file name="api.txt" hash="d41d8cd98f00b204e9800998ecf8427e"/><file name="exception.txt" hash="d41d8cd98f00b204e9800998ecf8427e"/></dir><dir name="stpp_translations"><file name="core.php" hash="8de46a7cce58eadbff4ae9b294e20aec"/></dir></dir><file name="readme.txt" hash="386fbb213e971a81846ced3d0cb16aaa"/><dir name="sql"><dir name="securetrading_stpp"><file name="install-3.0.0.php" hash="c5e0924c2e113343856d35c25d85fa26"/><file name="upgrade-3.0.0-3.1.0.php" hash="779de6f21f30913707d67573434c5827"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="securetrading"><dir><dir name="stpp"><dir name="payment"><dir name="direct"><file name="form.phtml" hash="1ebafc1b8fe9b5534c79e838187ca93a"/><file name="info.phtml" hash="e6537fa0b3ff758b694f40d5f6437da8"/></dir><file name="iframe.phtml" hash="550f6904467d71a368b03b2ba6852841"/><dir name="redirect"><file name="form.phtml" hash="d41d8cd98f00b204e9800998ecf8427e"/><file name="info.phtml" hash="e6537fa0b3ff758b694f40d5f6437da8"/><file name="post.phtml" hash="8b0b70df44ce27b54c57c7369dd59655"/></dir></dir><dir name="sales"><dir name="transactions"><file name="single.phtml" hash="42f46e7ce305f376b38a33374088f62e"/></dir></dir><dir name="system"><dir name="config"><dir name="fieldset"><file name="fields.phtml" hash="0c0aff08f256a5cfd2c644e7f629c9d7"/></dir></dir></dir></dir></dir></dir></dir><dir name="layout"><file name="securetrading.xml" hash="702c1f0992e6bd9404839e328f656788"/></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="securetrading"><dir><dir name="stpp"><dir name="payment"><dir name="direct"><file name="form.phtml" hash="84793faa4856fa0a5f1d31777507f257"/><file name="info.phtml" hash="990e48a8f00f86691a64f5f9cf371b05"/><file name="post.phtml" hash="d8643b7e67de32c311c30b531b0c6392"/></dir><file name="iframe.phtml" hash="550f6904467d71a368b03b2ba6852841"/><file name="location.phtml" hash="e790bf7d7f7c453f98cd9e03e0b74ab1"/><dir name="redirect"><file name="form.phtml" hash="7590b97c94ac8a7058606c82a2bd3766"/><file name="info.phtml" hash="4eaf8674c2de27618920fdcd65d61ade"/><file name="post.phtml" hash="c4edc4e15986cfc9dd010fe4eb915ccc"/></dir></dir></dir></dir></dir></dir><dir name="layout"><file name="securetrading.xml" hash="c5071fac015dbd017e0e8dde65ecf5d5"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="SecureTrading_Stpp.xml" hash="92a8948ac28f1ca221b1743e710a97d1"/></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="images"><dir name="securetrading"><dir name="stpp"><file name="st_logo_strapline_200_63.png" hash="bca24f2696fca0d2bca54681a635e8e3"/></dir></dir></dir></dir></dir></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.3.0</min><max>5.5.8</max></php></required></dependencies>
18
  </package>