Securetrading_Stpp - Version 3.3.0

Version Notes

The official SecureTrading STPP Magento integration.

Download this release

Release Info

Developer PeteST
Extension Securetrading_Stpp
Version 3.3.0
Comparing to
See all releases


Code changes from version 3.2.1.1 to 3.3.0

Files changed (62) hide show
  1. app/code/local/Securetrading/Stpp/Block/Adminhtml/Sales/Order/View/Tab/Transactions.php +2 -2
  2. app/code/local/Securetrading/Stpp/Block/Adminhtml/System/Config/Fieldset/Fields.php +44 -3
  3. app/code/local/Securetrading/Stpp/Block/Adminhtml/System/Config/Group.php +1 -1
  4. app/code/local/Securetrading/Stpp/Block/Payment/Direct/Form.php +8 -0
  5. app/code/local/Securetrading/Stpp/Block/Payment/Info/Abstract.php +37 -5
  6. app/code/local/Securetrading/Stpp/Helper/Data.php +112 -1
  7. app/code/local/Securetrading/Stpp/Model/Actions/Abstract.php +104 -44
  8. app/code/local/Securetrading/Stpp/Model/Actions/Direct.php +4 -3
  9. app/code/local/Securetrading/Stpp/Model/Actions/Redirect.php +47 -15
  10. app/code/local/Securetrading/Stpp/Model/Cron.php +6 -0
  11. app/code/local/Securetrading/Stpp/Model/Integration.php +20 -3
  12. app/code/local/Securetrading/Stpp/Model/Observer.php +27 -3
  13. app/code/local/Securetrading/Stpp/Model/Payment/Abstract.php +1 -1
  14. app/code/local/Securetrading/Stpp/Model/Payment/Direct.php +117 -62
  15. app/code/local/Securetrading/Stpp/Model/Payment/Redirect.php +15 -11
  16. app/code/local/Securetrading/Stpp/Model/Source/Settlestatus.php +1 -1
  17. app/code/local/Securetrading/Stpp/Model/Transaction.php +26 -4
  18. app/code/local/Securetrading/Stpp/controllers/DirectController.php +3 -5
  19. app/code/local/Securetrading/Stpp/controllers/RedirectController.php +40 -18
  20. app/code/local/Securetrading/Stpp/controllers/Sales/Order/Create/SecuretradingController.php +8 -1
  21. app/code/local/Securetrading/Stpp/controllers/Securetrading/TransactionsController.php +2 -2
  22. app/code/local/Securetrading/Stpp/etc/adminhtml.xml +11 -0
  23. app/code/local/Securetrading/Stpp/etc/config.xml +39 -9
  24. app/code/local/Securetrading/Stpp/etc/system.xml +841 -544
  25. app/code/local/Securetrading/Stpp/lib/code/core/Stpp/Actions/Abstract.php +0 -61
  26. app/code/local/Securetrading/Stpp/lib/code/core/Stpp/Api/Base.php +1 -1
  27. app/code/local/Securetrading/Stpp/lib/code/core/Stpp/Api/Connection/Webservices.php +35 -166
  28. app/code/local/Securetrading/Stpp/lib/code/core/Stpp/Api/Facade.php +72 -46
  29. app/code/local/Securetrading/Stpp/lib/code/core/Stpp/Api/Helper.php +14 -6
  30. app/code/local/Securetrading/Stpp/lib/code/core/Stpp/Api/Process.php +49 -7
  31. app/code/local/Securetrading/Stpp/lib/code/core/Stpp/Api/Xml/Reader.php +1 -1
  32. app/code/local/Securetrading/Stpp/lib/code/core/Stpp/Component/Abstract.php +6 -0
  33. app/code/local/Securetrading/Stpp/lib/code/core/Stpp/Fields/Admin.php +49 -27
  34. app/code/local/Securetrading/Stpp/lib/code/core/Stpp/Http/Base.php +245 -0
  35. app/code/local/Securetrading/Stpp/lib/code/core/Stpp/Http/BaseInterface.php +23 -0
  36. app/code/local/Securetrading/Stpp/lib/code/core/Stpp/Http/Helper.php +21 -0
  37. app/code/local/Securetrading/Stpp/lib/code/core/Stpp/Http/HelperInterface.php +6 -0
  38. app/code/local/Securetrading/Stpp/lib/code/core/Stpp/PaymentPages/Base.php +34 -15
  39. app/code/local/Securetrading/Stpp/lib/code/core/Stpp/PaymentPages/Facade.php +6 -1
  40. app/code/local/Securetrading/Stpp/lib/code/core/Stpp/Transactionsearch/Base.php +173 -0
  41. app/code/local/Securetrading/Stpp/lib/code/core/Stpp/Transactionsearch/BaseInterface.php +22 -0
  42. app/code/local/Securetrading/Stpp/lib/code/core/Stpp/Types.php +1 -3
  43. app/code/local/Securetrading/Stpp/lib/code/overrides/Magento/Api/Facade.php +9 -0
  44. app/code/local/Securetrading/Stpp/lib/code/overrides/Magento/Log/Writer.php +13 -0
  45. app/code/local/Securetrading/Stpp/lib/code/overrides/Magento/Utility/Facade.php +8 -1
  46. app/code/local/Securetrading/Stpp/lib/code/overrides/Magento/Utility/Log/Writer.php +0 -7
  47. app/code/local/Securetrading/Stpp/lib/stpp_logs/api.txt +0 -0
  48. app/code/local/Securetrading/Stpp/lib/stpp_logs/exception.txt +0 -0
  49. app/code/local/Securetrading/Stpp/readme.txt +2 -347
  50. app/code/local/Securetrading/Stpp/sql/securetrading_stpp/install-3.0.0.php +3 -3
  51. app/code/local/Securetrading/Stpp/sql/securetrading_stpp/upgrade-3.2.0-3.2.1.php +13 -4
  52. app/code/local/Securetrading/Stpp/sql/securetrading_stpp/upgrade-3.2.1-3.3.0.php +28 -0
  53. app/design/adminhtml/default/default/template/securetrading/stpp/payment/direct/form.phtml +6 -1
  54. app/design/adminhtml/default/default/template/securetrading/stpp/payment/direct/info.phtml +28 -5
  55. app/design/adminhtml/default/default/template/securetrading/stpp/payment/redirect/info.phtml +28 -5
  56. app/design/adminhtml/default/default/template/securetrading/stpp/sales/transactions/single.phtml +1 -1
  57. app/design/frontend/base/default/template/securetrading/stpp/payment/direct/form.phtml +6 -1
  58. app/design/frontend/base/default/template/securetrading/stpp/payment/direct/info.phtml +1 -1
  59. app/etc/modules/SecureTrading_Stpp.xml +3 -0
  60. package.xml +6 -6
  61. skin/adminhtml/default/default/images/securetrading/stpp/st_logo_strapline_100_32.png +0 -0
  62. skin/adminhtml/default/default/images/securetrading/stpp/success_16_16.png +0 -0
app/code/local/Securetrading/Stpp/Block/Adminhtml/Sales/Order/View/Tab/Transactions.php CHANGED
@@ -5,11 +5,11 @@ class Securetrading_Stpp_Block_Adminhtml_Sales_Order_View_Tab_Transactions
5
  implements Mage_Adminhtml_Block_Widget_Tab_Interface
6
  {
7
  public function getTabLabel() {
8
- return Mage::helper('securetrading_stpp')->__('SecureTrading Transactions');
9
  }
10
 
11
  public function getTabTitle() {
12
- return Mage::helper('securetrading_stpp')->__('SecureTrading Transactions');
13
  }
14
 
15
  public function isHidden() {
5
  implements Mage_Adminhtml_Block_Widget_Tab_Interface
6
  {
7
  public function getTabLabel() {
8
+ return Mage::helper('securetrading_stpp')->__('Secure Trading Transactions');
9
  }
10
 
11
  public function getTabTitle() {
12
+ return Mage::helper('securetrading_stpp')->__('Secure Trading Transactions');
13
  }
14
 
15
  public function isHidden() {
app/code/local/Securetrading/Stpp/Block/Adminhtml/System/Config/Fieldset/Fields.php CHANGED
@@ -10,17 +10,34 @@ class Securetrading_Stpp_Block_Adminhtml_System_Config_Fieldset_Fields
10
  return false;
11
  }
12
 
 
 
 
 
 
 
 
 
 
 
13
  protected function _getHeaderTitleHtml($element) {
14
  return '
15
  <div class="config-heading" >
 
 
 
 
 
 
 
16
  <div class="heading">
17
  <strong>' . $element->getLegend() . '</strong>
18
  <span class="heading-intro">' . $element->getComment() . '</span>
19
  </div>
20
  <div class="button-container">
21
- <button
22
- type="button"
23
- class="button"
24
  id="' . $element->getHtmlId() . '-head"
25
  onclick="paypalToggleSolution.call(this, \'' . $element->getHtmlId() . '\', \'' . $this->getUrl('*/*/state') . '\'); return false;"
26
  >
@@ -167,6 +184,22 @@ class Securetrading_Stpp_Block_Adminhtml_System_Config_Fieldset_Fields
167
  $label = $fields->getLabel(Stpp_Fields_Admin::FIELD_API_WS_CA_FILE);
168
  $tooltip = $fields->getDescription(Stpp_Fields_Admin::FIELD_API_WS_CA_FILE);
169
  break;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
170
  // The following are not retrieved from the framework but are here so the text is not duplicated across the different interfaces in system.xml.
171
  case 'active':
172
  $label = $this->__('Enabled');
@@ -198,6 +231,14 @@ class Securetrading_Stpp_Block_Adminhtml_System_Config_Fieldset_Fields
198
  $label = $this->__('Iframe Width');
199
  $tooltip = $this->__('The width of the iframe. Enter one or more numbers followed by "px" or "%".');
200
  break;
 
 
 
 
 
 
 
 
201
  default:
202
  $label = $e->getLabel();
203
  $tooltip = $e->getTooltip();
10
  return false;
11
  }
12
 
13
+ protected function _isPaymentEnabled($element) {
14
+ $groupConfig = $this->getGroup($element)->asArray();
15
+ $activityPath = isset($groupConfig['activity_path']) ? $groupConfig['activity_path'] : '';
16
+ if (empty($activityPath)) {
17
+ return false;
18
+ }
19
+ $isPaymentEnabled = (string) Mage::getSingleton('adminhtml/config_data')->getConfigDataValue($activityPath);
20
+ return (bool) $isPaymentEnabled;
21
+ }
22
+
23
  protected function _getHeaderTitleHtml($element) {
24
  return '
25
  <div class="config-heading" >
26
+ <span style="display: inline-block; width: 16px; float: left; position: relative; left: -6px; top: 8px;">
27
+ <img src="' . $this->getSkinUrl('images/securetrading/stpp/success_16_16.png') . '" style="' . ($this->_isPaymentEnabled($element) ? '' : 'visibility: hidden;') . '" />
28
+ </span>
29
+ <span style="display: inline-block; width: 120px; float: left;">' .
30
+ (($filename = (string) $element->getGroup()->image_logo) ? '<img src="' . $this->getSkinUrl('images/securetrading/stpp/' . $filename) . '" />' : '') . '
31
+ </span>
32
+
33
  <div class="heading">
34
  <strong>' . $element->getLegend() . '</strong>
35
  <span class="heading-intro">' . $element->getComment() . '</span>
36
  </div>
37
  <div class="button-container">
38
+ <button
39
+ type="button"
40
+ class="button"
41
  id="' . $element->getHtmlId() . '-head"
42
  onclick="paypalToggleSolution.call(this, \'' . $element->getHtmlId() . '\', \'' . $this->getUrl('*/*/state') . '\'); return false;"
43
  >
184
  $label = $fields->getLabel(Stpp_Fields_Admin::FIELD_API_WS_CA_FILE);
185
  $tooltip = $fields->getDescription(Stpp_Fields_Admin::FIELD_API_WS_CA_FILE);
186
  break;
187
+ case 'transactionsearch_username':
188
+ $label = $fields->getLabel(Stpp_Fields_Admin::FIELD_TRANSACTIONSEARCH_USERNAME);
189
+ $tooltip = $fields->getDescription(Stpp_Fields_Admin::FIELD_TRANSACTIONSEARCH_USERNAME);
190
+ break;
191
+ case 'transactionsearch_password':
192
+ $label = $fields->getLabel(Stpp_Fields_Admin::FIELD_TRANSACTIONSEARCH_PASSWORD);
193
+ $tooltip = $fields->getDescription(Stpp_Fields_Admin::FIELD_TRANSACTIONSEARCH_PASSWORD);
194
+ break;
195
+ case 'transactionsearch_verify_ca':
196
+ $label = $fields->getLabel(Stpp_Fields_Admin::FIELD_TRANSACTIONSEARCH_VERIFY_SSL_CA);
197
+ $tooltip = $fields->getDescription(Stpp_Fields_Admin::FIELD_TRANSACTIONSEARCH_VERIFY_SSL_CA);
198
+ break;
199
+ case 'transactionsearch_ca_file':
200
+ $label = $fields->getLabel(Stpp_Fields_Admin::FIELD_TRANSACTIONSEARCH_CA_FILE);
201
+ $tooltip = $fields->getDescription(Stpp_Fields_Admin::FIELD_TRANSACTIONSEARCH_CA_FILE);
202
+ break;
203
  // The following are not retrieved from the framework but are here so the text is not duplicated across the different interfaces in system.xml.
204
  case 'active':
205
  $label = $this->__('Enabled');
231
  $label = $this->__('Iframe Width');
232
  $tooltip = $this->__('The width of the iframe. Enter one or more numbers followed by "px" or "%".');
233
  break;
234
+ case 'show_start_date':
235
+ $label = $this->__('Show Start Date');
236
+ $tooltip = $this->__('Enable this option to show the start date input field on the payment form.');
237
+ break;
238
+ case 'show_issue_number':
239
+ $label = $this->__('Show Issue Number');
240
+ $tooltip = $this->__('Enable this option to show the issue number input field on the payment form.');
241
+ break;
242
  default:
243
  $label = $e->getLabel();
244
  $tooltip = $e->getTooltip();
app/code/local/Securetrading/Stpp/Block/Adminhtml/System/Config/Group.php CHANGED
@@ -4,7 +4,7 @@ class Securetrading_Stpp_Block_Adminhtml_System_Config_Group extends Mage_Adminh
4
  protected function _getHeaderCommentHtml($element) {
5
  $image = $this->getSkinUrl('images/securetrading/stpp/st_logo_strapline_200_63.png');
6
  $version = (string) Mage::getConfig()->getModuleConfig('Securetrading_Stpp')->version;
7
- $comment = sprintf('<img src="%s" alt="SecureTrading" style="display: block; margin: 0 auto;" /><div class="comment"><b>Module Version:</b> %s</div>', $image, $version);
8
  return $comment .= parent::_getHeaderCommentHtml($element);
9
  }
10
  }
4
  protected function _getHeaderCommentHtml($element) {
5
  $image = $this->getSkinUrl('images/securetrading/stpp/st_logo_strapline_200_63.png');
6
  $version = (string) Mage::getConfig()->getModuleConfig('Securetrading_Stpp')->version;
7
+ $comment = sprintf('<img src="%s" alt="Secure Trading" style="display: block; margin: 0 auto;" /><div class="comment"><b>Module Version:</b> %s</div>', $image, $version);
8
  return $comment .= parent::_getHeaderCommentHtml($element);
9
  }
10
  }
app/code/local/Securetrading/Stpp/Block/Payment/Direct/Form.php CHANGED
@@ -78,4 +78,12 @@ class Securetrading_Stpp_Block_Payment_Direct_Form extends Mage_Payment_Block_Fo
78
  public function getCardIssueNumberDescription() {
79
  return $this->_getIntegration()->getCardIssueNumberDescription();
80
  }
 
 
 
 
 
 
 
 
81
  }
78
  public function getCardIssueNumberDescription() {
79
  return $this->_getIntegration()->getCardIssueNumberDescription();
80
  }
81
+
82
+ public function canShowStartDate() {
83
+ return (bool) $this->getMethod()->getConfigData('show_start_date');
84
+ }
85
+
86
+ public function canShowIssueNumber() {
87
+ return (bool) $this->getMethod()->getConfigData('show_issue_number');
88
+ }
89
  }
app/code/local/Securetrading/Stpp/Block/Payment/Info/Abstract.php CHANGED
@@ -48,6 +48,25 @@ abstract class Securetrading_Stpp_Block_Payment_Info_Abstract extends Mage_Payme
48
  return $this->_getSecurityCodeStyle($this->getSpecific('security_code'));
49
  }
50
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
51
  public function getTitle() {
52
  return $this->getInfo()->getMethodInstance()->getTitle();
53
  }
@@ -62,11 +81,19 @@ abstract class Securetrading_Stpp_Block_Payment_Info_Abstract extends Mage_Payme
62
  }
63
 
64
  public function getEnrolled() {
65
- return $this->getSpecific('enrolled', 'N/A');
 
 
 
 
66
  }
67
 
68
  public function getStatus() {
69
- return $this->getSpecific('status', 'N/A');
 
 
 
 
70
  }
71
 
72
  public function getMystUrl() {
@@ -86,7 +113,7 @@ abstract class Securetrading_Stpp_Block_Payment_Info_Abstract extends Mage_Payme
86
  }
87
 
88
  public function getStartMonth() {
89
- return $this->getSpecific('start_month');
90
  }
91
 
92
  public function getStartYear() {
@@ -94,11 +121,16 @@ abstract class Securetrading_Stpp_Block_Payment_Info_Abstract extends Mage_Payme
94
  }
95
 
96
  public function getStartDate() {
97
- return $this->getStartMonth() . '/' . $this->getStartYear();
 
 
 
 
 
98
  }
99
 
100
  public function getExpiryMonth() {
101
- return $this->getSpecific('expiry_month');
102
  }
103
 
104
  public function getExpiryYear() {
48
  return $this->_getSecurityCodeStyle($this->getSpecific('security_code'));
49
  }
50
 
51
+ public function getFraudControlShieldStatusCode() {
52
+ return $this->getSpecific('shield_status_code');
53
+ }
54
+
55
+ public function getFraudControlShieldStatusCodeStyle() {
56
+ switch ($this->getSpecific('shield_status_code')) {
57
+ case 'ACCEPT':
58
+ $colour = '00AA00';
59
+ break;
60
+ case 'CHALLENGE':
61
+ $colour = 'FF6600';
62
+ break;
63
+ case 'DENY':
64
+ default:
65
+ $colour = 'FF0000';
66
+ }
67
+ return 'color: #' . $colour . ';';
68
+ }
69
+
70
  public function getTitle() {
71
  return $this->getInfo()->getMethodInstance()->getTitle();
72
  }
81
  }
82
 
83
  public function getEnrolled() {
84
+ $enrolled = $this->getSpecific('enrolled');
85
+ if (empty($enrolled)) {
86
+ $enrolled = 'N/A';
87
+ }
88
+ return $enrolled;
89
  }
90
 
91
  public function getStatus() {
92
+ $status = $this->getSpecific('status');
93
+ if (empty($status)) {
94
+ $status = 'N/A';
95
+ }
96
+ return $status;
97
  }
98
 
99
  public function getMystUrl() {
113
  }
114
 
115
  public function getStartMonth() {
116
+ return sprintf("%02s", $this->getSpecific('start_month'));
117
  }
118
 
119
  public function getStartYear() {
121
  }
122
 
123
  public function getStartDate() {
124
+ $startDate = '';
125
+ $startYear = $this->getStartYear();
126
+ if (!empty($startYear)) {
127
+ $startDate = $this->getStartMonth() . '/' . $this->getStartYear();
128
+ }
129
+ return $startDate;
130
  }
131
 
132
  public function getExpiryMonth() {
133
+ return sprintf("%02s", $this->getSpecific('expiry_month'));
134
  }
135
 
136
  public function getExpiryYear() {
app/code/local/Securetrading/Stpp/Helper/Data.php CHANGED
@@ -1,5 +1,116 @@
1
  <?php
2
 
3
  class Securetrading_Stpp_Helper_Data extends Mage_Core_Helper_Abstract {
4
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5
  }
1
  <?php
2
 
3
  class Securetrading_Stpp_Helper_Data extends Mage_Core_Helper_Abstract {
4
+ public function orderIsSuccessful($orderIncrementId) {
5
+ $order = Mage::getModel('sales/order')->loadByIncrementId($orderIncrementId);
6
+ $successful = in_array($order->getState(), array(Mage_Sales_Model_Order::STATE_PROCESSING, Mage_Sales_Model_Order::STATE_PAYMENT_REVIEW), true);
7
+ return $successful;
8
+ }
9
+
10
+ public function ordersAreSuccessful($orderIncrementIds) {
11
+ foreach($orderIncrementIds as $orderIncrementId) {
12
+ if ($this->orderIsSuccessful($orderIncrementId)) {
13
+ continue;
14
+ }
15
+ return false;
16
+ }
17
+ return true;
18
+ }
19
+
20
+ protected function _getCsvData($startDate, $endDate) {
21
+ $csvData = array();
22
+ foreach(Mage::app()->getStores() as $storeId => $store) {
23
+ $models = array(
24
+ Mage::getModel('securetrading_stpp/payment_redirect')->setStore($storeId)->getIntegration(),
25
+ Mage::getModel('securetrading_stpp/payment_direct')->setStore($storeId)->getIntegration(),
26
+ );
27
+ foreach($models as $integration) {
28
+ try {
29
+ $siteReference = $store->getConfig('payment/' . $integration->getPaymentMethod()->getCode() . '/site_reference');
30
+ $csvData[] = $integration->newTransactionSearch()
31
+ ->setStartDate($startDate)
32
+ ->setEndDate($endDate)
33
+ ->setSiteReferences($siteReference)
34
+ ->addFilter('requesttypedescriptions', 'AUTH')
35
+ ->addOptionalField('orderreference')
36
+ ->addOptionalField('settlestatus')
37
+ ->getCsvData()
38
+ ;
39
+ }
40
+ catch (Exception $e) {
41
+ Mage::logException($e);
42
+ continue;
43
+ }
44
+ }
45
+ }
46
+
47
+ $transactionReferences = array();
48
+ $finalCsvData = array();
49
+ foreach($csvData as $postResponse) {
50
+ foreach($postResponse as $oneRecord) {
51
+ if (in_array($oneRecord[0], $transactionReferences)) {
52
+ continue;
53
+ }
54
+ $transactionReferences[] = $oneRecord[0];
55
+ $finalCsvData[] = $oneRecord;
56
+ }
57
+ }
58
+ return $finalCsvData;
59
+ }
60
+
61
+ public function updateOldOrders($startDate, $endDate) {
62
+ $csvData = $this->_getCsvData($startDate, $endDate);
63
+
64
+ foreach($csvData as $transactionArray) {
65
+ $transactionReference = $transactionArray[0];
66
+ $orderIncrementId = $transactionArray[1];
67
+ $settleStatus = $transactionArray[2];
68
+
69
+ $multishippingModel = Mage::getModel('securetrading_multishipping/order_set_factory');
70
+ $orderId = Mage::getModel('sales/order')->loadByIncrementId($orderIncrementId)->getId();
71
+
72
+ if (!$orderId) {
73
+ Mage::getModel('securetrading_stpp/integration')->getDebugLog()->log(sprintf(Mage::helper('securetrading_stpp')->__('Update old orders: The order with ID "%s" and t\
74
+ ransaction reference "%s" could not be loaded.', $orderIncrementId, $transactionReference)));
75
+ continue;
76
+ }
77
+
78
+ if ($multishippingModel->orderBelongsToAnySet($orderId)) {
79
+ $orderIds = $multishippingModel->getOrderIdsInSameSet($orderId, false);
80
+ } else {
81
+ $orderIds = array($orderId);
82
+ }
83
+
84
+ switch($settleStatus) {
85
+ case '2':
86
+ case '3':
87
+ $this->_updateOrders($orderIds, true);
88
+ break;
89
+ case '100':
90
+ $this->_updateOrders($orderIds, false);
91
+ break;
92
+ case '0':
93
+ case '1':
94
+ throw new Exception(sprintf(Mage::helper('securetrading_stpp')->__('Orders "%s" should not still be pending settlement.'), $orderIncrementId));
95
+ break;
96
+ default:
97
+ throw new Exception(sprintf(Mage::helper('securetrading_stpp')->__('Order "%s" has an unhandled settle status: "%s".'), $orderIncrementId, $settleStatus));
98
+ }
99
+ }
100
+ }
101
+
102
+ protected function _updateOrders(array $orderIds, $cancelOrders = false) {
103
+ foreach($orderIds as $orderId) {
104
+ $order = Mage::getModel('sales/order')->load($orderId);
105
+ $transactions = Mage::getResourceModel('sales/order_payment_transaction_collection')->addOrderIdFilter($order->getId())->addPaymentIdFilter($order->getPayment()->getId())->addFieldToFilter('is_closed', array('neq' => '1'));
106
+
107
+ foreach($transactions as $transaction) {
108
+ $transaction->setOrderPaymentObject($order->getPayment())->setIsClosed(true)->save();
109
+ }
110
+ if ($cancelOrders) {
111
+ $order->cancel();
112
+ }
113
+ $order->save();
114
+ }
115
+ }
116
  }
app/code/local/Securetrading/Stpp/Model/Actions/Abstract.php CHANGED
@@ -27,8 +27,7 @@ abstract class Securetrading_Stpp_Model_Actions_Abstract extends Stpp_Actions_Ab
27
 
28
  protected function _getRequestedSettleStatus(Stpp_Data_Response $response) {
29
  $transaction = Mage::getModel('securetrading_stpp/transaction')->loadByTransactionReference($response->get('parenttransactionreference'), true);
30
-
31
- if ($transaction && $transaction->getResponseType() === Securetrading_Stpp_Model_Transaction_Types::TYPE_THREEDQUERY) {
32
  $requestData = $transaction->getRequestData();
33
  $requestedSettleStatus = $requestData['settlestatus'];
34
  }
@@ -38,61 +37,116 @@ abstract class Securetrading_Stpp_Model_Actions_Abstract extends Stpp_Actions_Ab
38
  return (string) $requestedSettleStatus;
39
  }
40
 
41
- public function processAuth(Stpp_Data_Response $response) { // note - this method makes capture transactions closed UNLESS response ss == 2 && request ss !== 2, then they are open.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
42
  $this->_log($response, sprintf('In %s.', __METHOD__));
43
 
44
  $order = $this->_getOrder($response);
45
  $payment = $order->getPayment();
46
- $errorCode = $response->get('errorcode');
47
 
48
- if ($order->getStatus() !== Securetrading_Stpp_Model_Payment_Redirect::STATUS_PENDING_PPAGES) {
49
- throw new Stpp_Exception(sprintf(Mage::helper('securetrading_stpp')->__('The order status for order "%s" was not pending payment pages.'), $order->getIncrementId()));
 
50
  }
51
-
52
- $addCoreTransaction = true;
53
- $coreTransactionClosed = false;
54
-
55
- if ($errorCode === '0') {
56
- if (in_array($response->get('settlestatus'), array('0', '1', '100'), true)) {
57
- $coreTransactionClosed = true;
58
- }
59
- elseif ($response->get('settlestatus') === '2') {
60
- if ($this->_getRequestedSettleStatus($response) !== '2') {
61
- $payment->setIsTransactionPending(true);
62
- }
63
- }
64
- else {
65
- throw new Stpp_Exception(sprintf(Mage::helper('securetrading_stpp')->__('Unhandled settle status: "%s".'), $response->get('settlestatus')));
66
- }
67
  }
68
- elseif($errorCode === '60107') {
69
- $payment->setNotificationResult(true);
70
- $payment->registerPaymentReviewAction(Mage_Sales_Model_Order_Payment::REVIEW_ACTION_DENY, false);
71
  }
72
  else {
73
- $addCoreTransaction = false;
74
- $message = sprintf('Payment failed: %s - %s.', $response->get('errorcode'), $response->get('errormessage'));
75
- $order->addStatusHistoryComment($message, false);
76
- }
77
-
78
- if ($addCoreTransaction) {
79
- $this->_setCoreTransaction($response, $coreTransactionClosed);
80
  }
81
 
82
  $this->_addTransaction(Securetrading_Stpp_Model_Transaction_Types::TYPE_AUTH, $response);
83
 
84
- $additionalInformation = array(
85
- 'account_type_description' => $response->get('accounttypedescription'),
86
- 'security_address' => $response->get('securityresponseaddress'),
87
- 'security_postcode' => $response->get('securityresponsepostcode'),
88
- 'security_code' => $response->get('securityresponsesecuritycode'),
89
- 'enrolled' => $response->get('enrolled'),
90
- 'status' => $response->get('status'),
91
- );
92
-
93
  $payment
94
- ->setAdditionalInformation($additionalInformation)
95
- ->setCcTransId($response->get('transactionreference'))
 
 
 
 
 
96
  ->setCcLast($payment->getMethodInstance()->getIntegration()->getCcLast4($response->get('maskedpan')))
97
  ;
98
 
@@ -109,12 +163,18 @@ abstract class Securetrading_Stpp_Model_Actions_Abstract extends Stpp_Actions_Ab
109
  ->setTermUrl($response->getRequest()->get('termurl'))
110
  ->setMd($response->get('md'))
111
  ;
 
 
 
 
 
112
  return parent::process3dQuery($response);
113
  }
114
 
115
  public function processRiskDecision(Stpp_Data_Response $response) {
116
  $this->_log($response, sprintf('In %s.', __METHOD__));
117
  $this->_addTransaction(Securetrading_Stpp_Model_Transaction_Types::TYPE_RISKDEC, $response);
 
118
  return parent::processRiskDecision($response);
119
  }
120
 
@@ -226,7 +286,7 @@ abstract class Securetrading_Stpp_Model_Actions_Abstract extends Stpp_Actions_Ab
226
  )
227
  )
228
  );
229
-
230
  if($isClosed !== null) {
231
  $payment->setIsTransactionClosed($isClosed);
232
  }
27
 
28
  protected function _getRequestedSettleStatus(Stpp_Data_Response $response) {
29
  $transaction = Mage::getModel('securetrading_stpp/transaction')->loadByTransactionReference($response->get('parenttransactionreference'), true);
30
+ if ($transaction && $transaction->getResponseType() === Securetrading_Stpp_Model_Transaction_Types::TYPE_THREEDQUERY) { // api 3d query used - so auth request didn't have settlestatus so need to get 3dq request.
 
31
  $requestData = $transaction->getRequestData();
32
  $requestedSettleStatus = $requestData['settlestatus'];
33
  }
37
  return (string) $requestedSettleStatus;
38
  }
39
 
40
+ protected function _getRiskdecTransaction($transactionReference) {
41
+ if ($transaction = Mage::getModel('securetrading_stpp/transaction')->loadByTransactionReference($transactionReference, true)) {
42
+ return $transaction->searchAncestorsForRequestType(Securetrading_Stpp_Model_Transaction_Types::TYPE_RISKDEC);
43
+ }
44
+ return false;
45
+ }
46
+
47
+ protected function _riskdecTransactionHasShieldStatusCode($transaction, $shieldStatusCodes) {
48
+ if (!is_array($shieldStatusCodes)) {
49
+ $shieldStatusCodes = array($shieldStatusCodes);
50
+ }
51
+ if ($transaction->getRequestType() !== Securetrading_Stpp_Model_Transaction_Types::TYPE_RISKDEC) {
52
+ throw new Stpp_Exception(sprintf(Mage::helper('securetrading_stpp')->__('Invalid transaction type: %s.'), $transaction->getRequestType()));
53
+ }
54
+ if (!in_array($transaction->getResponseData('fraudcontrolshieldstatuscode'), $shieldStatusCodes)) {
55
+ return false;
56
+ }
57
+ return true;
58
+ }
59
+
60
+ protected function _paymentIsSuccessful(Stpp_Data_Response $response) {
61
+ $result = false;
62
+ if ($response->get('errorcode') === '0') {
63
+ if (in_array($response->get('settlestatus'), array('0', '1', '100'), true)) {
64
+ $result = true;
65
+ }
66
+ else if ($response->get('settlestatus') === '2') {
67
+ if ($this->_getRequestedSettleStatus($response) === '2') {
68
+ $riskdecTransaction = $this->_getRiskdecTransaction($response->get('parenttransactionreference'));
69
+ if (!$riskdecTransaction || $this->_riskdecTransactionHasShieldStatusCode($riskdecTransaction, 'ACCEPT')) {
70
+ $result = true;
71
+ }
72
+ }
73
+ }
74
+ else {
75
+ throw new Exception(sprintf(Mage::helper('securetrading_stpp')->__('Invalid settle status: "%s".'), $response->get('settlestatus')));
76
+ }
77
+ }
78
+ return $result;
79
+ }
80
+
81
+ protected function _authShouldEnterPaymentReview(Stpp_Data_Response $response) {
82
+ $result = false;
83
+ if ($response->get('errorcode') === '0' && $response->get('settlestatus') === '2') {
84
+ if ($this->_getRequestedSettleStatus($response) === '2') {
85
+ $riskdecTransaction = $this->_getRiskdecTransaction($response->get('parenttransactionreference'));
86
+ if ($riskdecTransaction && $this->_riskdecTransactionHasShieldStatusCode($riskdecTransaction, array('CHALLENGE', 'DENY'))) {
87
+ $result = true;
88
+ }
89
+ }
90
+ else {
91
+ $result = true;
92
+ }
93
+ }
94
+ return $result;
95
+ }
96
+
97
+ protected function _authShouldEnterPaymentReviewAndBeDenied(Stpp_Data_Response $response) {
98
+ $result = false;
99
+ if ($response->get('errorcode') === '60107') {
100
+ $result = true;
101
+ }
102
+ return $result;
103
+ }
104
+ //TODO - consistency of auths/captures being open or closed.
105
+ protected function _paymentReviewAndDeny(Stpp_Data_Response $response, Mage_Sales_Model_Order $order) {
106
+ $payment = $order->getPayment();
107
+ $payment->setNotificationResult(true);
108
+ $payment->registerPaymentReviewAction(Mage_Sales_Model_Order_Payment::REVIEW_ACTION_DENY, false);
109
+ $this->_setCoreTransaction($response, false);
110
+ $order->save();
111
+ }
112
+
113
+ protected function _addGenericErrorToOrderStatusHistory(Stpp_Data_Response $response, Mage_Sales_Model_Order $order) {
114
+ $message = sprintf('Payment failed: %s - %s.', $response->get('errorcode'), $response->get('errormessage'));
115
+ $order->addStatusHistoryComment($message, false);
116
+ $order->save();
117
+ }
118
+
119
+ public function processAuth(Stpp_Data_Response $response) {
120
  $this->_log($response, sprintf('In %s.', __METHOD__));
121
 
122
  $order = $this->_getOrder($response);
123
  $payment = $order->getPayment();
 
124
 
125
+ if ($this->_paymentIsSuccessful($response)) {
126
+ $closeCoreTransaction = $response->get('settlestatus') === '0';
127
+ $this->_setCoreTransaction($response, $closeCoreTransaction);
128
  }
129
+ else if ($this->_authShouldEnterPaymentReview($response)) {
130
+ $payment->setIsTransactionPending(true);
131
+ $this->_setCoreTransaction($response, false);
 
 
 
 
 
 
 
 
 
 
 
 
 
132
  }
133
+ else if ($this->_authShouldEnterPaymentReviewAndBeDenied($response)) {
134
+ $this->_paymentReviewAndDeny($response, $order);
 
135
  }
136
  else {
137
+ $this->_addGenericErrorToOrderStatusHistory($response, $order);
 
 
 
 
 
 
138
  }
139
 
140
  $this->_addTransaction(Securetrading_Stpp_Model_Transaction_Types::TYPE_AUTH, $response);
141
 
 
 
 
 
 
 
 
 
 
142
  $payment
143
+ ->setAdditionalInformation('account_type_description', $response->get('accounttypedescription'))
144
+ ->setAdditionalInformation('security_address', $response->get('securityresponseaddress'))
145
+ ->setAdditionalInformation('security_postcode', $response->get('securityresponsepostcode'))
146
+ ->setAdditionalInformation('security_code', $response->get('securityresponsesecuritycode'))
147
+ ->setAdditionalInformation('enrolled', $response->get('enrolled'))
148
+ ->setAdditionalInformation('status', $response->get('status'))
149
+ ->setCcTransId($response->get('transactionreference'))
150
  ->setCcLast($payment->getMethodInstance()->getIntegration()->getCcLast4($response->get('maskedpan')))
151
  ;
152
 
163
  ->setTermUrl($response->getRequest()->get('termurl'))
164
  ->setMd($response->get('md'))
165
  ;
166
+
167
+ if ($this->_authShouldEnterPaymentReviewAndBeDenied($response)) {
168
+ $this->_paymentReviewAndDeny($response, $this->_getOrder($response));
169
+ }
170
+
171
  return parent::process3dQuery($response);
172
  }
173
 
174
  public function processRiskDecision(Stpp_Data_Response $response) {
175
  $this->_log($response, sprintf('In %s.', __METHOD__));
176
  $this->_addTransaction(Securetrading_Stpp_Model_Transaction_Types::TYPE_RISKDEC, $response);
177
+ $this->_getOrder($response)->getPayment()->setAdditionalInformation('shield_status_code', $response->get('fraudcontrolshieldstatuscode'))->save();
178
  return parent::processRiskDecision($response);
179
  }
180
 
286
  )
287
  )
288
  );
289
+
290
  if($isClosed !== null) {
291
  $payment->setIsTransactionClosed($isClosed);
292
  }
app/code/local/Securetrading/Stpp/Model/Actions/Direct.php CHANGED
@@ -3,9 +3,10 @@
3
  class Securetrading_Stpp_Model_Actions_Direct extends Securetrading_Stpp_Model_Actions_Abstract implements Stpp_Api_ActionsInterface {
4
  public function processAuth(Stpp_Data_Response $response) {
5
  parent::processAuth($response);
6
- if ($response->get('errorcode') === '0') {
7
- $order = $this->_getOrder($response);
8
- if ($response->getRequest()->has('md')) {
 
9
  Mage::getModel('securetrading_stpp/payment_direct')->registerSuccessfulOrderAfterExternalRedirect($order, $this->_getRequestedSettleStatus($response));
10
  }
11
  $order->getPayment()->getMethodInstance()->handleSuccessfulPayment($order, true);
3
  class Securetrading_Stpp_Model_Actions_Direct extends Securetrading_Stpp_Model_Actions_Abstract implements Stpp_Api_ActionsInterface {
4
  public function processAuth(Stpp_Data_Response $response) {
5
  parent::processAuth($response);
6
+ $order = $this->_getOrder($response);
7
+
8
+ if ($this->_paymentIsSuccessful($response) || $this->_authShouldEnterPaymentReview($response)) {
9
+ if ($response->getRequest()->has('md')) {//TODO - should we check pending 3ds here too?
10
  Mage::getModel('securetrading_stpp/payment_direct')->registerSuccessfulOrderAfterExternalRedirect($order, $this->_getRequestedSettleStatus($response));
11
  }
12
  $order->getPayment()->getMethodInstance()->handleSuccessfulPayment($order, true);
app/code/local/Securetrading/Stpp/Model/Actions/Redirect.php CHANGED
@@ -3,6 +3,23 @@
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
 
@@ -18,6 +35,10 @@ class Securetrading_Stpp_Model_Actions_Redirect extends Securetrading_Stpp_Model
18
  return $orderIncrementIds;
19
  }
20
 
 
 
 
 
21
  public function processAuth(Stpp_Data_Response $response) {
22
  $firstOrder = true;
23
  foreach($this->_getOrderIncrementIds($response) as $orderIncrementId) {
@@ -69,25 +90,31 @@ class Securetrading_Stpp_Model_Actions_Redirect extends Securetrading_Stpp_Model
69
  }
70
 
71
  public function _processAuth(Stpp_Data_Response $response, $firstOrder) {
72
- parent::processAuth($response);
73
-
74
  $order = $this->_getOrder($response);
75
  $payment = $order->getPayment();
76
 
 
 
 
 
 
 
77
  $payment->setCcType($response->get('paymenttypedescription'));
78
  $payment->setCcLast4($payment->getMethodInstance()->getIntegration()->getCcLast4($response->get('maskedpan')));
79
  $payment->save();
80
 
81
- $this->_updateOrder($response, $order, $firstOrder);
82
 
83
- if ($response->get('errorcode') === '0') {
84
- Mage::getModel('securetrading_stpp/payment_redirect')->registerSuccessfulOrderAfterExternalRedirect($order, $this->_getRequestedSettleStatus($response));
85
- $emailConfirmation = $response->get('accounttypedescription') === 'MOTO' ? (bool) $response->get('send_confirmation') : true;
86
- $payment->getMethodInstance()->handleSuccessfulPayment($order, $emailConfirmation);
 
87
  }
88
  }
89
 
90
- protected function _updateOrder(Stpp_Data_Response $response, Mage_Sales_Model_Order $order, $firstOrder) {
 
91
  if ($firstOrder) {
92
  $addresses = array(
93
  'billing' => $order->getBillingAddress(),
@@ -106,8 +133,8 @@ class Securetrading_Stpp_Model_Actions_Redirect extends Securetrading_Stpp_Model
106
  $address->save();
107
  }
108
 
109
- if (!empty($this->_updates)) {
110
- $message = "Updated the following fields: " . implode(', ', $this->_updates);
111
  $order->addStatusHistoryComment($message);
112
  $order->save();
113
  $this->_log($response, $message);
@@ -130,7 +157,7 @@ class Securetrading_Stpp_Model_Actions_Redirect extends Securetrading_Stpp_Model
130
  $value = $response->get($stKey);
131
  if ($value !== (string) $address->getData($coreKey)) {
132
  $address->setData($coreKey, $value);
133
- $this->_updates[] = $stKey;
134
  }
135
  }
136
  }
@@ -149,7 +176,7 @@ class Securetrading_Stpp_Model_Actions_Redirect extends Securetrading_Stpp_Model
149
  $oldValue = array_key_exists($streetKey, $street) ? $street[$streetKey] : '';
150
  if ($value !== (string) $oldValue) {
151
  $street[$streetKey] = $value;
152
- $this->_updates[] = $stKey;
153
  }
154
  }
155
  $address->setStreet($street);
@@ -166,7 +193,7 @@ class Securetrading_Stpp_Model_Actions_Redirect extends Securetrading_Stpp_Model
166
  }
167
  if ($addressCountryId !== (string) $stCountryId) {
168
  $address->setCountryId($stCountryId);
169
- $this->_updates[] = $stCountryKey;
170
  }
171
  }
172
 
@@ -177,7 +204,7 @@ class Securetrading_Stpp_Model_Actions_Redirect extends Securetrading_Stpp_Model
177
 
178
  if ($response->get($stCountyKey) !== (string) $region) {
179
  $address->setRegionId(null)->setRegion($response->get($stCountyKey));
180
- $this->_updates[] = $stCountyKey;
181
  }
182
  }
183
 
@@ -208,7 +235,6 @@ class Securetrading_Stpp_Model_Actions_Redirect extends Securetrading_Stpp_Model
208
  'customeremail',
209
  'enrolled',
210
  'errorcode',
211
- 'errormessage',
212
  'maskedpan',
213
  'orderreference',
214
  'parenttransactionreference',
@@ -220,6 +246,12 @@ class Securetrading_Stpp_Model_Actions_Redirect extends Securetrading_Stpp_Model
220
  'settlestatus',
221
  'status',
222
  'transactionreference',
 
 
 
 
 
 
223
  );
224
 
225
  foreach($fields as $field) {
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 _addUpdate(Stpp_Data_Response $response, $update) {
7
+ $this->_updates[$this->_getOrder($response)->getId()][] = $update;
8
+ return $this;
9
+ }
10
+
11
+ protected function _hasUpdates(Mage_Sales_Model_Order $order) {
12
+ $orderId = $order->getId();
13
+ return array_key_exists($orderId, $this->_updates) && !empty($this->_updates[$orderId]);
14
+ }
15
+
16
+ protected function _getUpdates(Mage_Sales_Model_Order $order) {
17
+ if ($this->_hasUpdates($order)) {
18
+ return $this->_updates[$order->getId()];
19
+ }
20
+ return array();
21
+ }
22
+
23
  protected function _getOrderIncrementIds(Stpp_Data_response $response) {
24
  $orderIncrementIdString = $response->get('order_increment_ids', '');
25
 
35
  return $orderIncrementIds;
36
  }
37
 
38
+ protected function _authShouldEnterPaymentReviewAndBeDenied(Stpp_Data_Response $response) {
39
+ return parent::_authShouldEnterPaymentReviewAndBeDenied($response) && $this->_getOrder($response)->getPayment()->getMethodInstance()->getConfigData('ppg_cancel_60107');
40
+ }
41
+
42
  public function processAuth(Stpp_Data_Response $response) {
43
  $firstOrder = true;
44
  foreach($this->_getOrderIncrementIds($response) as $orderIncrementId) {
90
  }
91
 
92
  public function _processAuth(Stpp_Data_Response $response, $firstOrder) {
 
 
93
  $order = $this->_getOrder($response);
94
  $payment = $order->getPayment();
95
 
96
+ if ($order->getStatus() !== Securetrading_Stpp_Model_Payment_Redirect::STATUS_PENDING_PPAGES) {
97
+ throw new Stpp_Exception(sprintf(Mage::helper('securetrading_stpp')->__('The order status for order "%s" was not pending payment pages.'), $order->getIncrementId()));
98
+ }
99
+
100
+ parent::processAuth($response);
101
+
102
  $payment->setCcType($response->get('paymenttypedescription'));
103
  $payment->setCcLast4($payment->getMethodInstance()->getIntegration()->getCcLast4($response->get('maskedpan')));
104
  $payment->save();
105
 
106
+ $this->_updateOrder($response, $firstOrder);
107
 
108
+ if ($this->_paymentIsSuccessful($response) || $this->_authShouldEnterPaymentReview($response)) {
109
+ $payment = $order->getPayment();
110
+ Mage::getModel('securetrading_stpp/payment_redirect')->registerSuccessfulOrderAfterExternalRedirect($order, $this->_getRequestedSettleStatus($response));
111
+ $emailConfirmation = $response->get('accounttypedescription') === 'MOTO' ? (bool) $response->get('send_confirmation') : true;
112
+ $payment->getMethodInstance()->handleSuccessfulPayment($order, $emailConfirmation);
113
  }
114
  }
115
 
116
+ protected function _updateOrder(Stpp_Data_Response $response, $firstOrder) {
117
+ $order = $this->_getOrder($response);
118
  if ($firstOrder) {
119
  $addresses = array(
120
  'billing' => $order->getBillingAddress(),
133
  $address->save();
134
  }
135
 
136
+ if ($this->_hasUpdates($order)) {
137
+ $message = "Updated the following fields: " . implode(', ', $this->_getUpdates($order));
138
  $order->addStatusHistoryComment($message);
139
  $order->save();
140
  $this->_log($response, $message);
157
  $value = $response->get($stKey);
158
  if ($value !== (string) $address->getData($coreKey)) {
159
  $address->setData($coreKey, $value);
160
+ $this->_addUpdate($response, $stKey);
161
  }
162
  }
163
  }
176
  $oldValue = array_key_exists($streetKey, $street) ? $street[$streetKey] : '';
177
  if ($value !== (string) $oldValue) {
178
  $street[$streetKey] = $value;
179
+ $this->_addUpdate($response, $stKey);
180
  }
181
  }
182
  $address->setStreet($street);
193
  }
194
  if ($addressCountryId !== (string) $stCountryId) {
195
  $address->setCountryId($stCountryId);
196
+ $this->_addUpdate($response, $stCountryKey);
197
  }
198
  }
199
 
204
 
205
  if ($response->get($stCountyKey) !== (string) $region) {
206
  $address->setRegionId(null)->setRegion($response->get($stCountyKey));
207
+ $this->_addUpdate($response, $stCountryKey);
208
  }
209
  }
210
 
235
  'customeremail',
236
  'enrolled',
237
  'errorcode',
 
238
  'maskedpan',
239
  'orderreference',
240
  'parenttransactionreference',
246
  'settlestatus',
247
  'status',
248
  'transactionreference',
249
+ // custom fields:
250
+ 'errordata',
251
+ 'errormessage',
252
+ 'order_increment_ids',
253
+ 'send_confirmation',
254
+ 'fraudcontrolshieldstatuscode',
255
  );
256
 
257
  foreach($fields as $field) {
app/code/local/Securetrading/Stpp/Model/Cron.php CHANGED
@@ -29,4 +29,10 @@ class Securetrading_Stpp_Model_Cron {
29
  $item->delete();
30
  }
31
  }
 
 
 
 
 
 
32
  }
29
  $item->delete();
30
  }
31
  }
32
+
33
+ public function updateOldOrders() {
34
+ $startDate = date("Y-m-d", strtotime("-30 day"));
35
+ $endDate = date("Y-m-d", strtotime("-8 day"));
36
+ Mage::helper('securetrading_stpp')->updateOldOrders($startDate, $endDate);
37
+ }
38
  }
app/code/local/Securetrading/Stpp/Model/Integration.php CHANGED
@@ -34,8 +34,9 @@ class Securetrading_Stpp_Model_Integration extends Mage_Core_Model_Abstract {
34
  'username' => $paymentMethod->getConfigData('ws_username'),
35
  'password' => $paymentMethod->getConfigData('ws_password'),
36
  'alias' => $paymentMethod->getConfigData('ws_alias'),
37
- 'verifyssl' => $paymentMethod->getConfigData('ws_verify_ca'),
38
- 'cacertfile' => $paymentMethod->getConfigData('ws_ca_file'),
 
39
  ),
40
  'api' => array(
41
  'host' => $paymentMethod->getConfigData('stapi_host'),
@@ -70,6 +71,14 @@ class Securetrading_Stpp_Model_Integration extends Mage_Core_Model_Abstract {
70
  'use_auto_card_store' => $paymentMethod->getConfigData('use_auto_card_store'),
71
  )
72
  ),
 
 
 
 
 
 
 
 
73
  );
74
  }
75
 
@@ -78,7 +87,7 @@ class Securetrading_Stpp_Model_Integration extends Mage_Core_Model_Abstract {
78
 
79
  $this->_facade = Stpp_Facade::instance($config);
80
  $this->_ppagesFacade = Stpp_PaymentPages_Facade::instance($config);
81
- $this->_apiFacade = Stpp_Api_Facade::instance($config);
82
 
83
  $this->_frontendFields = $fieldFacade->newFrontendFields();
84
  $this->_adminFields = $fieldFacade->newAdminFields();
@@ -239,6 +248,10 @@ class Securetrading_Stpp_Model_Integration extends Mage_Core_Model_Abstract {
239
  public function getRefundTransactionName() {
240
  return Stpp_Types::API_REFUND;
241
  }
 
 
 
 
242
 
243
  public function getStartYears() {
244
  return Stpp_Types::getStartYears();
@@ -295,4 +308,8 @@ class Securetrading_Stpp_Model_Integration extends Mage_Core_Model_Abstract {
295
  public function getCardIssueNumberDescription() {
296
  return $this->_getFrontendFields()->getDescription(Stpp_Fields_Frontend::FIELD_ISSUE_NUMBER);
297
  }
 
 
 
 
298
  }
34
  'username' => $paymentMethod->getConfigData('ws_username'),
35
  'password' => $paymentMethod->getConfigData('ws_password'),
36
  'alias' => $paymentMethod->getConfigData('ws_alias'),
37
+ 'ssl_verify_peer' => $paymentMethod->getConfigData('ws_verify_ca'),
38
+ 'ssl_verify_host' => 2,
39
+ 'ssl_cacertfile' => $paymentMethod->getConfigData('ws_ca_file'),
40
  ),
41
  'api' => array(
42
  'host' => $paymentMethod->getConfigData('stapi_host'),
71
  'use_auto_card_store' => $paymentMethod->getConfigData('use_auto_card_store'),
72
  )
73
  ),
74
+ 'transactionsearch' => array(
75
+ 'username' => $paymentMethod->getConfigData('transactionsearch_username'),
76
+ 'password' => $paymentMethod->getConfigData('transactionsearch_password'),
77
+ 'ssl_verify_peer' => $paymentMethod->getConfigData('transactionsearch_verify_ca'),
78
+ 'ssl_verify_host' => 2,
79
+ 'ssl_cacertfile' => $paymentMethod->getConfigData('transactionsearch_ca_file'),
80
+
81
+ )
82
  );
83
  }
84
 
87
 
88
  $this->_facade = Stpp_Facade::instance($config);
89
  $this->_ppagesFacade = Stpp_PaymentPages_Facade::instance($config);
90
+ $this->_apiFacade = Magento_Api_Facade::instance($config);
91
 
92
  $this->_frontendFields = $fieldFacade->newFrontendFields();
93
  $this->_adminFields = $fieldFacade->newAdminFields();
248
  public function getRefundTransactionName() {
249
  return Stpp_Types::API_REFUND;
250
  }
251
+
252
+ public function getThreedqueryName() {
253
+ return Stpp_Types::API_THREEDQUERY;
254
+ }
255
 
256
  public function getStartYears() {
257
  return Stpp_Types::getStartYears();
308
  public function getCardIssueNumberDescription() {
309
  return $this->_getFrontendFields()->getDescription(Stpp_Fields_Frontend::FIELD_ISSUE_NUMBER);
310
  }
311
+
312
+ public function newTransactionSearch() {
313
+ return $this->_apiFacade->newTransactionSearch();
314
+ }
315
  }
app/code/local/Securetrading/Stpp/Model/Observer.php CHANGED
@@ -40,14 +40,15 @@ class Securetrading_Stpp_Model_Observer {
40
  'security_address',
41
  'security_postcode',
42
  'security_code',
 
43
  'enrolled',
44
  'status',
45
  );
46
 
47
  $payment = $observer->getEvent()->getPayment();
48
-
49
- foreach($data as $key) {
50
- $transport = $observer->getEvent()->getTransport();
51
  $value = $payment->getAdditionalInformation($key);
52
  $transport->setData($key, $value);
53
  }
@@ -61,4 +62,27 @@ class Securetrading_Stpp_Model_Observer {
61
  $transport->setData('issue_number', $payment->getCcSsIssue());
62
  $transport->setData('transaction_reference', $payment->getCcTransId());
63
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
64
  }
40
  'security_address',
41
  'security_postcode',
42
  'security_code',
43
+ 'shield_status_code',
44
  'enrolled',
45
  'status',
46
  );
47
 
48
  $payment = $observer->getEvent()->getPayment();
49
+ $transport = $observer->getEvent()->getTransport();
50
+
51
+ foreach($data as $key) {
52
  $value = $payment->getAdditionalInformation($key);
53
  $transport->setData($key, $value);
54
  }
62
  $transport->setData('issue_number', $payment->getCcSsIssue());
63
  $transport->setData('transaction_reference', $payment->getCcTransId());
64
  }
65
+
66
+ public function onAdminhtmlInitSystemConfig(Varien_Event_Observer $observer) { // The event this observer is attached to is only present in Magento 1.7.0.1+.
67
+ $oneDimensionalSectionsWithFields = $observer->getConfig()->getNode('sections/securetrading_stpp/groups');
68
+ $nestedSectionsWithoutFields = $observer->getConfig()->getNode('securetrading_stpp_sections');
69
+
70
+ foreach($oneDimensionalSectionsWithFields->children() as $group) {
71
+ $emptyFieldElement = $nestedSectionsWithoutFields->xpath('.//' . $group->getName());
72
+
73
+ if (count($emptyFieldElement) !== 1) {
74
+ continue;
75
+ }
76
+ $emptyFieldElement[0]->extend($group);
77
+ }
78
+
79
+ $observer->getConfig()->getNode('sections')->extend($nestedSectionsWithoutFields);
80
+
81
+ $observer->getConfig()->setNode('sections/payment/groups/securetrading_stpp/sort_order', '0');
82
+
83
+ // Hide config page from menu:
84
+ $observer->getConfig()->setNode('sections/securetrading_stpp/show_in_default', 0);
85
+ $observer->getConfig()->setNode('sections/securetrading_stpp/show_in_website', 0);
86
+ $observer->getConfig()->setNode('sections/securetrading_stpp/show_in_store', 0);
87
+ }
88
  }
app/code/local/Securetrading/Stpp/Model/Payment/Abstract.php CHANGED
@@ -108,7 +108,7 @@ abstract class Securetrading_Stpp_Model_Payment_Abstract extends Mage_Payment_Mo
108
  $order->getPayment()->registerAuthorizationNotification($amount);
109
  }
110
  else {
111
- throw new Exception(sprintf('Invalid settle status: %s', $requestedSettleStatus));
112
  }
113
  $order->save();
114
  }
108
  $order->getPayment()->registerAuthorizationNotification($amount);
109
  }
110
  else {
111
+ throw new Exception(sprintf('Invalid settle status: "%s".', $requestedSettleStatus));
112
  }
113
  $order->save();
114
  }
app/code/local/Securetrading/Stpp/Model/Payment/Direct.php CHANGED
@@ -13,8 +13,8 @@ class Securetrading_Stpp_Model_Payment_Direct extends Securetrading_Stpp_Model_P
13
  protected $_canRefund = true;
14
  protected $_canRefundInvoicePartial = true;
15
  protected $_canVoid = false;
16
- protected $_canUseInternal = false;
17
- protected $_canUseCheckout = false;
18
  protected $_canUseForMultishipping = false;
19
  protected $_isInitializeNeeded = true;
20
  protected $_canFetchTransactionInfo = false;
@@ -52,7 +52,7 @@ class Securetrading_Stpp_Model_Payment_Direct extends Securetrading_Stpp_Model_P
52
 
53
  switch ($action) {
54
  case Mage_Payment_Model_Method_Abstract::ACTION_AUTHORIZE:
55
- $payment->_authorize(true, $order->getBaseTotalDue()); // base amount will be set inside
56
  $payment->setAmountAuthorized($order->getTotalDue());
57
  break;
58
  case Mage_Payment_Model_Method_Abstract::ACTION_AUTHORIZE_CAPTURE:
@@ -70,8 +70,7 @@ class Securetrading_Stpp_Model_Payment_Direct extends Securetrading_Stpp_Model_P
70
  foreach($this->getInfoInstance()->getOrder()->getStatusHistoryCollection(true) as $c) {
71
  $c->delete();
72
  }
73
- $invoice->cancel();
74
- $invoice->setIsPaid(false); // when $invoice->pay() is called after this function this stops it from setting the order to paid.
75
  }
76
  }
77
 
@@ -107,7 +106,7 @@ class Securetrading_Stpp_Model_Payment_Direct extends Securetrading_Stpp_Model_P
107
  return false;
108
  }
109
 
110
- public function refund(Varien_Object $payment, $amount) {
111
  $transactionReference = $payment->getCcTransId();
112
  $orderIncrementIds = $this->_getOrderIncrementIds($transactionReference);
113
 
@@ -142,81 +141,121 @@ class Securetrading_Stpp_Model_Payment_Direct extends Securetrading_Stpp_Model_P
142
  'order_total_refunded' => $baseTotalRefunded, // How much has been refunded via TU or REFUND.
143
  'amount_to_refund' => $amount,
144
  'partial_refund_already_processed' => $partialRefundAlreadyProcessed,
145
- 'site_reference' => $this->getConfigData('site_reference'),
146
  'transaction_reference' => $transactionReference,
147
  'using_main_amount' => true,
148
  'currency_iso_3a' => $payment->getOrder()->getBaseCurrencyCode(),
149
  'allow_suspend' => true,
150
  );
151
-
 
 
 
 
 
152
  $this->getIntegration()->runApiRefund($payment, $data);
153
- $payment->setParentTransactionId($immediateParentTransactionId); // Ensure the parent transaction reference stored in the core transaction is not the core Authorization.
154
  return $this;
155
  }
156
 
157
  public function cancel(Varien_Object $payment) {
158
  return $this; // Do nothing intentionally.
159
  }
160
-
161
- public function denyPayment(Mage_Payment_Model_Info $payment) {
162
  parent::denyPayment($payment);
 
163
 
164
  if (!empty(self::$_reviewingIncrementIds)) {
165
  $payment->setShouldCloseParentTransaction(true);
166
  $payment->addTransaction(Mage_Sales_Model_Order_Payment_Transaction::TYPE_VOID);
167
  }
168
  else {
 
 
 
 
169
  $transactionReference = $payment->getCcTransId();
170
  $orderIncrementIds = $this->_getOrderIncrementIds($transactionReference);
171
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
172
  if ($orderIncrementIds) {
173
- $this->_updateSettleStatus($payment, '3');
174
  self::$_reviewingIncrementIds = $orderIncrementIds;
175
- foreach($orderIncrementIds as $orderIncrementId) {
176
- $order = Mage::getModel('sales/order')->loadByIncrementId($orderIncrementId);
177
- $order->getPayment()->deny();
178
- $order->save();
179
- }
180
- self::$_reviewingIncrementIds = array();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
181
  }
182
- else {
183
- $this->_updateSettleStatus($payment, '3');
184
- $payment->setShouldCloseParentTransaction(true);
185
- $payment->addTransaction(Mage_Sales_Model_Order_Payment_Transaction::TYPE_VOID);
186
  }
187
  }
188
- return true;
189
  }
190
 
191
  public function acceptPayment(Mage_Payment_Model_Info $payment) {
192
- parent::acceptPayment($payment);
193
-
194
- if (!empty(self::$_reviewingIncrementIds)) {
195
- return true;
196
- }
197
-
198
- $transactionReference = $payment->getCcTransId();
199
- $orderIncrementIds = $this->_getOrderIncrementIds($transactionReference);
200
-
201
- if ($orderIncrementIds) {
202
- self::$_reviewingIncrementIds = $orderIncrementIds;
203
- foreach($orderIncrementIds as $orderIncrementId) {
204
- $order = Mage::getModel('sales/order')->loadByIncrementId($orderIncrementId);
205
- $order->getPayment()->accept();
206
- $order->save();
207
- }
208
- self::$_reviewingIncrementIds = array();
209
- }
210
-
211
- $transaction = Mage::getModel('securetrading_stpp/transaction')->loadByTransactionReference($payment->getCcTransId());
212
- $requestedSettleStatus = $transaction->getRequestData('settlestatus');
213
-
214
- if ($requestedSettleStatus !== '2') { // If the requested settlestatus was 2 there is no need to update the payment (an order should only be put into payment review when the response settlestatus == 2).
215
- $this->_updateSettleStatus($payment, $requestedSettleStatus);
216
  }
217
  return true;
218
  }
219
 
 
 
 
 
 
 
 
 
220
  protected function _getOrderIncrementIds($transactionReference) {
221
  $transaction = Mage::getModel('securetrading_stpp/transaction')->loadByTransactionReference($transactionReference);
222
  $orderIncrementIds = $transaction->getRequestData('order_increment_ids', null);
@@ -230,16 +269,17 @@ class Securetrading_Stpp_Model_Payment_Direct extends Securetrading_Stpp_Model_P
230
  return null;
231
  }
232
 
233
- public function captureAuthorized(Mage_Sales_Model_Order_Payment $payment, $amount) {
234
  $transactionReference = $payment->getCcTransId();
235
  $orderIncrementIds = $this->_getOrderIncrementIds($transactionReference);
 
236
  if ($orderIncrementIds) {
237
  $orderBaseGrandTotal = null;
238
  $baseAmountPaid = null;
239
  $baseAmountRefunded = null;
240
  foreach($orderIncrementIds as $orderIncrementId) {
241
  $order = Mage::getModel('sales/order')->loadByIncrementId($orderIncrementId);
242
- $orderBaseGrandTotal = $order->getBaseGrandTotal();
243
  $baseAmountPaid += $order->getPayment()->getBaseAmountPaid();
244
  $baseAmountRefunded += $order->getPayment()->getBaseAmountRefunded();
245
  }
@@ -260,9 +300,14 @@ class Securetrading_Stpp_Model_Payment_Direct extends Securetrading_Stpp_Model_P
260
  $updates['currencyiso3a'] = $payment->getOrder()->getBaseCurrencyCode();
261
  }
262
 
263
- $data = $this->_prepareTransactionUpdate($payment, $updates);
 
 
 
 
 
264
  $this->getIntegration()->runApiTransactionUpdate($payment, $data);
265
- return $this;
266
  }
267
 
268
  protected function _handleStandardPaymentResult(Stpp_Api_ResultInterface $result) {
@@ -284,20 +329,22 @@ class Securetrading_Stpp_Model_Payment_Direct extends Securetrading_Stpp_Model_P
284
  elseif(!$result->getIsTransactionSuccessful()) {
285
  throw new Mage_Payment_Model_Info_Exception($result->getErrorMessage());
286
  }
 
 
 
287
  return $this;
288
  }
289
 
290
- protected function _updateSettleStatus(Mage_Payment_Model_Info $payment, $settleStatus) {
291
  $updates = array('settlestatus' => $settleStatus);
292
- $data = $this->_prepareTransactionUpdate($payment, $updates);
293
- $this->getIntegration()->runApiTransactionUpdate($payment, $data);
294
- return $this;
295
  }
296
-
297
- protected function _prepareTransactionUpdate(Mage_Sales_Model_Order_Payment $payment, $updates) {
298
  $data = array(
299
  'filter' => array(
300
- 'sitereference' => $this->getConfigData('site_reference'),
301
  'transactionreference' => $payment->getCcTransId(),
302
  ),
303
  'updates' => $updates
@@ -342,24 +389,32 @@ class Securetrading_Stpp_Model_Payment_Direct extends Securetrading_Stpp_Model_P
342
  $data = parent::prepareOrderData($payment, $orderIncrementIds);
343
  $payment = $this->getInfoInstance();
344
 
345
- return $data += array(
346
  'termurl' => Mage::getUrl('securetrading/direct/return'),
347
  'paymenttype' => $payment->getCcType(),
348
  'pan' => $payment->decrypt($payment->getCcNumberEnc()),
349
- 'startdate' => $payment->getCcSsStartMonth() . '/' . $payment->getCcSsStartYear(),
350
  'expirydate' => $payment->getCcExpMonth() . '/' . $payment->getCcExpYear(),
351
  'securitycode' => $payment->decrypt(Mage::getModel('securetrading_stpp/payment_direct_session')->getSecurityCode()),
352
  'issuenumber' => $payment->getCcSsIssue(),
353
  );
 
 
 
 
 
354
  }
355
 
356
  public function run3dAuth() {
357
  $this->log(sprintf('In %s.', __METHOD__));
358
- return $this->getIntegration()->runApi3dAuth()->getIsTransactionSuccessful();
 
 
 
 
359
  }
360
 
361
  public function handleSuccessfulPayment(Mage_Sales_Model_Order $order, $emailConfirmation = true) {
362
- parent::handleSuccessfulPayment($order);
363
  Mage::getSingleton('securetrading_stpp/payment_direct_session')->clear();
364
  }
365
  }
13
  protected $_canRefund = true;
14
  protected $_canRefundInvoicePartial = true;
15
  protected $_canVoid = false;
16
+ protected $_canUseInternal = true;
17
+ protected $_canUseCheckout = true;
18
  protected $_canUseForMultishipping = false;
19
  protected $_isInitializeNeeded = true;
20
  protected $_canFetchTransactionInfo = false;
52
 
53
  switch ($action) {
54
  case Mage_Payment_Model_Method_Abstract::ACTION_AUTHORIZE:
55
+ $payment->authorize(true, $order->getBaseTotalDue()); // base amount will be set inside
56
  $payment->setAmountAuthorized($order->getTotalDue());
57
  break;
58
  case Mage_Payment_Model_Method_Abstract::ACTION_AUTHORIZE_CAPTURE:
70
  foreach($this->getInfoInstance()->getOrder()->getStatusHistoryCollection(true) as $c) {
71
  $c->delete();
72
  }
73
+ $invoice->setIsPaid(false);
 
74
  }
75
  }
76
 
106
  return false;
107
  }
108
 
109
+ public function prepareToRefund(Varien_Object $payment, $amount, $siteReference) {
110
  $transactionReference = $payment->getCcTransId();
111
  $orderIncrementIds = $this->_getOrderIncrementIds($transactionReference);
112
 
141
  'order_total_refunded' => $baseTotalRefunded, // How much has been refunded via TU or REFUND.
142
  'amount_to_refund' => $amount,
143
  'partial_refund_already_processed' => $partialRefundAlreadyProcessed,
144
+ 'site_reference' => $siteReference,
145
  'transaction_reference' => $transactionReference,
146
  'using_main_amount' => true,
147
  'currency_iso_3a' => $payment->getOrder()->getBaseCurrencyCode(),
148
  'allow_suspend' => true,
149
  );
150
+ $payment->setShouldCloseParentTransaction(false);
151
+ return $data;
152
+ }
153
+
154
+ public function refund(Varien_Object $payment, $amount) {
155
+ $data = $this->prepareToRefund($payment, $amount, $this->getConfigData('site_reference'));
156
  $this->getIntegration()->runApiRefund($payment, $data);
 
157
  return $this;
158
  }
159
 
160
  public function cancel(Varien_Object $payment) {
161
  return $this; // Do nothing intentionally.
162
  }
163
+
164
+ public function denyPaymentAndPrepareApiRequest(Mage_Payment_Model_Info $payment, $siteReference) {
165
  parent::denyPayment($payment);
166
+ $data = null;
167
 
168
  if (!empty(self::$_reviewingIncrementIds)) {
169
  $payment->setShouldCloseParentTransaction(true);
170
  $payment->addTransaction(Mage_Sales_Model_Order_Payment_Transaction::TYPE_VOID);
171
  }
172
  else {
173
+ if ($payment->getOrder()->getState() !== Mage_Sales_Model_Order::STATE_PAYMENT_REVIEW) {
174
+ throw new Mage_Core_Exception('This order is no longer in the payment review state.');
175
+ }
176
+
177
  $transactionReference = $payment->getCcTransId();
178
  $orderIncrementIds = $this->_getOrderIncrementIds($transactionReference);
179
 
180
+ if ($orderIncrementIds) {
181
+ self::$_reviewingIncrementIds = $orderIncrementIds;
182
+ foreach($orderIncrementIds as $orderIncrementId) {
183
+ $order = Mage::getModel('sales/order')->loadByIncrementId($orderIncrementId);
184
+ $order->getPayment()->deny();
185
+ $order->save();
186
+ }
187
+ self::$_reviewingIncrementIds = array();
188
+ }
189
+ else {
190
+ $payment->setShouldCloseParentTransaction(true);
191
+ $payment->addTransaction(Mage_Sales_Model_Order_Payment_Transaction::TYPE_VOID);
192
+ }
193
+ $data = $this->_prepareToUpdateSettleStatus($payment, '3', $siteReference);
194
+ }
195
+ return $data;
196
+ }
197
+
198
+ public function acceptPaymentAndPrepareApiRequest(Mage_Payment_Model_Info $payment, $siteReference) {
199
+ parent::acceptPayment($payment);
200
+ $data = null;
201
+
202
+ if (empty(self::$_reviewingIncrementIds)) {
203
+ if ($payment->getOrder()->getState() !== Mage_Sales_Model_Order::STATE_PAYMENT_REVIEW) {
204
+ throw new Mage_Core_Exception('This order is no longer in the payment review state.');
205
+ }
206
+
207
+ $transactionReference = $payment->getCcTransId();
208
+ $orderIncrementIds = $this->_getOrderIncrementIds($transactionReference);
209
+
210
  if ($orderIncrementIds) {
 
211
  self::$_reviewingIncrementIds = $orderIncrementIds;
212
+ foreach($orderIncrementIds as $orderIncrementId) {
213
+ $order = Mage::getModel('sales/order')->loadByIncrementId($orderIncrementId);
214
+ $order->getPayment()->accept();
215
+ $order->save();
216
+ }
217
+ self::$_reviewingIncrementIds = array();
218
+ }
219
+
220
+ $transaction = Mage::getModel('securetrading_stpp/transaction')->loadByTransactionReference($payment->getCcTransId());
221
+ $requestedSettleStatus = $transaction->getRequestData('settlestatus');
222
+
223
+ if ($requestedSettleStatus === null) { // Will be null if the $transaction was a 3D AUTH (which has MD/PaRes instead).
224
+ if (!$parentTransaction = $transaction->getParentTransaction(true)) {
225
+ throw new Exception(sprintf(Mage::helper('securetrading_stpp')->__('Payment "%s" had transaction reference "%s" but had no settle status and no parent transaction reference.'), $payment->getId(), $payment->getCcTransId()));
226
+ }
227
+ if ($parentTransaction->getRequestData('requesttypedescription') !== $this->getIntegration()->getThreedqueryName()) {
228
+ throw new Exception(sprintf(Mage::helper('securetrading_stpp')->__('Payment "%s" had transaction reference "%s" but had no settle status and no parent THREEDQUERY.'), $payment->getId(), $payment->getCcTransId()));
229
+ }
230
+ if ($parentTransaction->getRequestData('settlestatus') === null) {
231
+ throw new Exception(sprintf(Mage::helper('securetrading_stpp')->__('Payment "%s" had transaction reference "%s" but had no settle status and its parent THREEDQUERY had no settle status.'), $payment->getId(), $payment->getCcTransId()));
232
+ }
233
+ $requestedSettleStatus = $parentTransaction->getRequestData('settlestatus');
234
  }
235
+
236
+ if ($requestedSettleStatus !== 2) { // If the requested settlestatus was 2 there is no need to update the payment (an order should only be put into payment review when the response settlestatus == 2).
237
+ $data = $this->_prepareToUpdateSettleStatus($payment, $requestedSettleStatus, $siteReference);
 
238
  }
239
  }
240
+ return $data;
241
  }
242
 
243
  public function acceptPayment(Mage_Payment_Model_Info $payment) {
244
+ $data = $this->acceptPaymentAndPrepareApiRequest($payment, $this->getConfigData('site_reference'));
245
+ if ($data) {
246
+ $this->getIntegration()->runApiTransactionUpdate($payment, $data);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
247
  }
248
  return true;
249
  }
250
 
251
+ public function denyPayment(Mage_Payment_Model_Info $payment) {
252
+ $data = $this->denyPaymentAndPrepareApiRequest($payment, $this->getConfigData('site_reference'));
253
+ if ($data) {
254
+ $this->getIntegration()->runApiTransactionUpdate($payment, $data);
255
+ }
256
+ return true;
257
+ }
258
+
259
  protected function _getOrderIncrementIds($transactionReference) {
260
  $transaction = Mage::getModel('securetrading_stpp/transaction')->loadByTransactionReference($transactionReference);
261
  $orderIncrementIds = $transaction->getRequestData('order_increment_ids', null);
269
  return null;
270
  }
271
 
272
+ public function prepareToCaptureAuthorized(Mage_Sales_Model_Order_Payment $payment, $amount, $siteReference) {
273
  $transactionReference = $payment->getCcTransId();
274
  $orderIncrementIds = $this->_getOrderIncrementIds($transactionReference);
275
+
276
  if ($orderIncrementIds) {
277
  $orderBaseGrandTotal = null;
278
  $baseAmountPaid = null;
279
  $baseAmountRefunded = null;
280
  foreach($orderIncrementIds as $orderIncrementId) {
281
  $order = Mage::getModel('sales/order')->loadByIncrementId($orderIncrementId);
282
+ $orderBaseGrandTotal += $order->getBaseGrandTotal();
283
  $baseAmountPaid += $order->getPayment()->getBaseAmountPaid();
284
  $baseAmountRefunded += $order->getPayment()->getBaseAmountRefunded();
285
  }
300
  $updates['currencyiso3a'] = $payment->getOrder()->getBaseCurrencyCode();
301
  }
302
 
303
+ $data = $this->_prepareTransactionUpdate($payment, $updates, $siteReference);
304
+ return $data;
305
+ }
306
+
307
+ public function captureAuthorized(Mage_Sales_Model_Order_Payment $payment, $amount) {
308
+ $data = $this->prepareToCaptureAuthorized($payment, $amount, $this->getConfigData('site_reference'));
309
  $this->getIntegration()->runApiTransactionUpdate($payment, $data);
310
+ return $this;
311
  }
312
 
313
  protected function _handleStandardPaymentResult(Stpp_Api_ResultInterface $result) {
329
  elseif(!$result->getIsTransactionSuccessful()) {
330
  throw new Mage_Payment_Model_Info_Exception($result->getErrorMessage());
331
  }
332
+ else {
333
+ $this->_getStateObject()->setState(Mage_Sales_Model_Order::STATE_PROCESSING)->setStatus(Mage_Sales_Model_Order::STATE_PROCESSING);
334
+ }
335
  return $this;
336
  }
337
 
338
+ protected function _prepareToUpdateSettleStatus(Mage_Payment_Model_Info $payment, $settleStatus, $siteReference) {
339
  $updates = array('settlestatus' => $settleStatus);
340
+ $data = $this->_prepareTransactionUpdate($payment, $updates, $siteReference);
341
+ return $data;
 
342
  }
343
+
344
+ protected function _prepareTransactionUpdate(Mage_Sales_Model_Order_Payment $payment, $updates, $siteReference) {
345
  $data = array(
346
  'filter' => array(
347
+ 'sitereference' => $siteReference,
348
  'transactionreference' => $payment->getCcTransId(),
349
  ),
350
  'updates' => $updates
389
  $data = parent::prepareOrderData($payment, $orderIncrementIds);
390
  $payment = $this->getInfoInstance();
391
 
392
+ $data += array(
393
  'termurl' => Mage::getUrl('securetrading/direct/return'),
394
  'paymenttype' => $payment->getCcType(),
395
  'pan' => $payment->decrypt($payment->getCcNumberEnc()),
 
396
  'expirydate' => $payment->getCcExpMonth() . '/' . $payment->getCcExpYear(),
397
  'securitycode' => $payment->decrypt(Mage::getModel('securetrading_stpp/payment_direct_session')->getSecurityCode()),
398
  'issuenumber' => $payment->getCcSsIssue(),
399
  );
400
+
401
+ if ($payment->getCcSsStartMonth() || $payment->getCcSsStartYear()) {
402
+ $data['startdate'] = $payment->getCcSsStartMonth() . '/' . $payment->getCcSsStartYear();
403
+ }
404
+ return $data;
405
  }
406
 
407
  public function run3dAuth() {
408
  $this->log(sprintf('In %s.', __METHOD__));
409
+ $result = $this->getIntegration()->runApi3dAuth();
410
+ if ($result->getErrorMessage()) {
411
+ Mage::getSingleton('checkout/session')->addError($result->getErrorMessage());
412
+ }
413
+ return $result->getIsTransactionSuccessful();
414
  }
415
 
416
  public function handleSuccessfulPayment(Mage_Sales_Model_Order $order, $emailConfirmation = true) {
417
+ parent::handleSuccessfulPayment($order, $emailConfirmation);
418
  Mage::getSingleton('securetrading_stpp/payment_direct_session')->clear();
419
  }
420
  }
app/code/local/Securetrading/Stpp/Model/Payment/Redirect.php CHANGED
@@ -27,8 +27,6 @@ class Securetrading_Stpp_Model_Payment_Redirect extends Securetrading_Stpp_Model
27
  $this->_canCapturePartial = true;
28
  $this->_canRefund = true;
29
  $this->_canRefundInvoicePartial = true;
30
-
31
- $this->_canUseForMultishipping = $this->getConfigData('payment_action') !== Mage_Payment_Model_Method_Abstract::ACTION_AUTHORIZE; // Disable MultiShipping if Auth Only (3237).
32
  }
33
  }
34
 
@@ -40,14 +38,20 @@ class Securetrading_Stpp_Model_Payment_Redirect extends Securetrading_Stpp_Model
40
 
41
  public function acceptPayment(Mage_Payment_Model_Info $payment) {
42
  $this->log(sprintf('In %s.', __METHOD__));
43
- parent::acceptPayment($payment);
44
- return $this->_getApi()->acceptPayment($payment);
 
 
 
45
  }
46
 
47
  public function denyPayment(Mage_Payment_Model_Info $payment) {
48
  $this->log(sprintf('In %s.', __METHOD__));
49
- parent::denyPayment($payment);
50
- return $this->_getApi()->denyPayment($payment);
 
 
 
51
  }
52
 
53
  protected function _useFirstPathIfIframe($path1, $path2) {
@@ -99,21 +103,21 @@ class Securetrading_Stpp_Model_Payment_Redirect extends Securetrading_Stpp_Model
99
  public function capture(Varien_Object $payment, $amount) {
100
  $this->log(sprintf('In %s.', __METHOD__));
101
  parent::capture($payment, $amount);
102
- $this->_getApi()->captureAuthorized($payment, $amount);
 
103
  return $this;
104
  }
105
 
106
  public function refund(Varien_Object $payment, $amount) {
107
  $this->log(sprintf('In %s.', __METHOD__));
108
  parent::refund($payment, $amount);
109
- $this->_getApi()->refund($payment, $amount);
 
110
  return $this;
111
  }
112
 
113
  public function cancel(Varien_Object $payment) {
114
- $this->log(sprintf('In %s.', __METHOD__));
115
- $this->_getApi()->cancel($payment);
116
- return $this;
117
  }
118
 
119
  public function prepareData($isMoto = false, array $orderIncrementIds = array(), $sendEmailConfirmation = true) {
27
  $this->_canCapturePartial = true;
28
  $this->_canRefund = true;
29
  $this->_canRefundInvoicePartial = true;
 
 
30
  }
31
  }
32
 
38
 
39
  public function acceptPayment(Mage_Payment_Model_Info $payment) {
40
  $this->log(sprintf('In %s.', __METHOD__));
41
+ $data = $this->_getApi()->acceptPaymentAndPrepareApiRequest($payment, $this->getConfigData('site_reference'));
42
+ if ($data) {
43
+ $this->getIntegration()->runApiTransactionUpdate($payment, $data);
44
+ }
45
+ return true;
46
  }
47
 
48
  public function denyPayment(Mage_Payment_Model_Info $payment) {
49
  $this->log(sprintf('In %s.', __METHOD__));
50
+ $data = $this->_getApi()->denyPaymentAndPrepareApiRequest($payment, $this->getConfigData('site_reference'));
51
+ if ($data) {
52
+ $this->getIntegration()->runApiTransactionUpdate($payment, $data);
53
+ }
54
+ return true;
55
  }
56
 
57
  protected function _useFirstPathIfIframe($path1, $path2) {
103
  public function capture(Varien_Object $payment, $amount) {
104
  $this->log(sprintf('In %s.', __METHOD__));
105
  parent::capture($payment, $amount);
106
+ $data = $this->_getApi()->prepareToCaptureAuthorized($payment, $amount, $this->getConfigData('site_reference'));
107
+ $this->getIntegration()->runApiTransactionUpdate($payment, $data);
108
  return $this;
109
  }
110
 
111
  public function refund(Varien_Object $payment, $amount) {
112
  $this->log(sprintf('In %s.', __METHOD__));
113
  parent::refund($payment, $amount);
114
+ $data = $this->_getApi()->prepareToRefund($payment, $amount, $this->getConfigData('site_reference'));
115
+ $this->getIntegration()->runApiRefund($payment, $data);
116
  return $this;
117
  }
118
 
119
  public function cancel(Varien_Object $payment) {
120
+ return $this; // Do nothing intentionally.
 
 
121
  }
122
 
123
  public function prepareData($isMoto = false, array $orderIncrementIds = array(), $sendEmailConfirmation = true) {
app/code/local/Securetrading/Stpp/Model/Source/Settlestatus.php CHANGED
@@ -1,6 +1,6 @@
1
  <?php
2
 
3
- class SecureTrading_Stpp_Model_Source_Settlestatus {
4
  public function toOptionArray()
5
  {
6
  $settleStatuses = Mage::getModel('securetrading_stpp/integration')->getSettleStatuses();
1
  <?php
2
 
3
+ class Securetrading_Stpp_Model_Source_Settlestatus {
4
  public function toOptionArray()
5
  {
6
  $settleStatuses = Mage::getModel('securetrading_stpp/integration')->getSettleStatuses();
app/code/local/Securetrading/Stpp/Model/Transaction.php CHANGED
@@ -75,12 +75,34 @@ class Securetrading_Stpp_Model_Transaction extends Mage_Core_Model_Abstract {
75
  if ($graceful) {
76
  return false;
77
  }
78
- throw new Stpp_Exception(sprintf(Mage::helper('securetrading_stpp')->__('A transaction with a transaction reference of "%s" cannot be found.'), $parentTransactionReference));
79
  }
80
  return $this;
81
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
82
 
83
- public function findTransactions($orderId, $requestType) {
84
- return array_values($this->getCollection()->addFieldToFilter('order_id', $orderId)->addFieldToFilter('request_type', $requestType)->getItems());
85
- }
86
  }
75
  if ($graceful) {
76
  return false;
77
  }
78
+ throw new Stpp_Exception(sprintf(Mage::helper('securetrading_stpp')->__('A transaction with a transaction reference of "%s" cannot be found.'), $transactionReference));
79
  }
80
  return $this;
81
  }
82
+
83
+ public function getAncestors($includeSelf = true) {
84
+ $pt = $this;
85
+ $array = array();
86
+ while ($pt = $pt->getParentTransaction(true)) {
87
+ $array[] = $pt;
88
+ }
89
+
90
+ if ($includeSelf) {
91
+ array_unshift($array, $this);
92
+ }
93
+ return $array;
94
+ }
95
+
96
+ public function searchAncestorsForRequestType($requestType) {
97
+ foreach($this->getAncestors() as $ancestor) {
98
+ if ($ancestor->getRequestType() === $requestType) {
99
+ return $ancestor;
100
+ }
101
+ }
102
+ return false;
103
+ }
104
 
105
+ public function findTransactions($orderId, $requestType) {
106
+ return array_values($this->getCollection()->addFieldToFilter('order_id', $orderId)->addFieldToFilter('request_type', $requestType)->getItems());
107
+ }
108
  }
app/code/local/Securetrading/Stpp/controllers/DirectController.php CHANGED
@@ -3,17 +3,15 @@
3
  class Securetrading_Stpp_DirectController extends Mage_Core_Controller_Front_Action {
4
  public function returnAction() {
5
  $result = Mage::getModel('securetrading_stpp/payment_direct')->run3dAuth();
6
-
7
  if ($result) {
8
  $path = 'checkout/onepage/success';
9
- $arguments = array();
10
  }
11
  else {
12
- $path = 'checkout/onepage/index';
13
- $arguments = array();
14
  }
15
 
16
- $queryArgs = array('url' => Mage::getUrl($path, $arguments));
17
  $this->_redirect('securetrading/payment/location', array('_query' => $queryArgs));
18
  }
19
  }
3
  class Securetrading_Stpp_DirectController extends Mage_Core_Controller_Front_Action {
4
  public function returnAction() {
5
  $result = Mage::getModel('securetrading_stpp/payment_direct')->run3dAuth();
6
+
7
  if ($result) {
8
  $path = 'checkout/onepage/success';
 
9
  }
10
  else {
11
+ $path = 'checkout/cart';
 
12
  }
13
 
14
+ $queryArgs = array('path' => $path);
15
  $this->_redirect('securetrading/payment/location', array('_query' => $queryArgs));
16
  }
17
  }
app/code/local/Securetrading/Stpp/controllers/RedirectController.php CHANGED
@@ -1,32 +1,54 @@
1
  <?php
2
 
3
  class Securetrading_Stpp_RedirectController extends Mage_Core_Controller_Front_Action {
4
- public function redirectAction() {
 
 
 
 
 
 
 
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
 
12
- Mage::getSingleton('checkout/session')->clear();
13
- Mage::getSingleton('checkout/session')->setDisplaySuccess(true);
14
-
15
- Mage::getSingleton('checkout/type_multishipping_state')->setCompleteStep(Mage_Checkout_Model_Type_Multishipping_State::STEP_OVERVIEW);
16
- Mage::getSingleton('checkout/type_multishipping_state')->setActiveStep(Mage_Checkout_Model_Type_Multishipping_State::STEP_SUCCESS);
 
 
 
 
 
 
 
 
17
  }
18
  else {
19
- $path = 'checkout/onepage/success';
 
20
  }
21
 
22
  $queryArgs = array('path' => $path);
23
  $this->_redirect('securetrading/payment/location', array('_query' => $queryArgs));
24
  }
 
 
 
 
25
 
26
- public function notificationAction() {
27
- $model = Mage::getModel('securetrading_stpp/payment_redirect')
28
- ->log(sprintf('In %s.', __METHOD__))
29
- ->runNotification();
30
- exit($this->__("Notification complete."));
31
- }
 
 
 
 
 
32
  }
1
  <?php
2
 
3
  class Securetrading_Stpp_RedirectController extends Mage_Core_Controller_Front_Action {
4
+ public function notificationAction() {
5
+ Mage::getModel('securetrading_stpp/payment_redirect')
6
+ ->log(sprintf('In %s.', __METHOD__))
7
+ ->runNotification();
8
+ exit($this->__("Notification complete."));
9
+ }
10
+
11
+ public function redirectAction() {
12
  Mage::getModel('securetrading_stpp/payment_redirect')
13
+ ->log(sprintf('In %s.', __METHOD__))
14
+ ->runRedirect();
 
 
 
15
 
16
+ if (Mage::helper('securetrading_stpp')->ordersAreSuccessful($this->_getOrderIncrementIds())) {
17
+ if (Mage::getSingleton('checkout/session')->setLoadInactive(true)->getQuote()->getIsMultiShipping()) {
18
+ Mage::getSingleton('checkout/session')->clear();
19
+ Mage::getSingleton('checkout/session')->setDisplaySuccess(true);
20
+
21
+ Mage::getSingleton('checkout/type_multishipping_state')->setCompleteStep(Mage_Checkout_Model_Type_Multishipping_State::STEP_OVERVIEW);
22
+ Mage::getSingleton('checkout/type_multishipping_state')->setActiveStep(Mage_Checkout_Model_Type_Multishipping_State::STEP_SUCCESS);
23
+
24
+ $path = 'checkout/multishipping/success';
25
+ }
26
+ else {
27
+ $path = 'checkout/onepage/success';
28
+ }
29
  }
30
  else {
31
+ Mage::getSingleton('checkout/session')->addError(sprintf(Mage::helper('securetrading_stpp')->__('These order(s) were not processed successfully: %s'), implode(', ', $this->_getOrderIncrementIds())));
32
+ $path = 'checkout/cart';
33
  }
34
 
35
  $queryArgs = array('path' => $path);
36
  $this->_redirect('securetrading/payment/location', array('_query' => $queryArgs));
37
  }
38
+
39
+ protected function _getOrderIncrementIds() {
40
+ $serializedIncrementIds = $this->getRequest()->getParam('order_increment_ids');
41
+ $orderIncrementIds = @unserialize($serializedIncrementIds);
42
 
43
+ if ($orderIncrementIds === false && $serializedIncrementIds !== serialize(false)) {
44
+ throw new Exception(sprintf(Mage::helper('securetrading_stpp')->__('The string "%s" could not be unserialized.'), $serializedIncrementIds));
45
+ }
46
+
47
+ foreach($orderIncrementIds as $orderIncrementId) { // If responsesitesecurity is not returned the user input is untrusted. Make sure the order IDs are actually in this customers session.
48
+ if (!in_array($orderIncrementId,Mage::getSingleton('core/session')->getOrderIds()) && $orderIncrementId !== Mage::getSingleton('checkout/session')->getLastRealOrderId()) {
49
+ throw new Exception(sprintf(Mage::helper('securetrading_stpp')->__('The order increment ID "%s" was not in the session.'), $orderIncrementId));
50
+ }
51
+ }
52
+ return $orderIncrementIds;
53
+ }
54
  }
app/code/local/Securetrading/Stpp/controllers/Sales/Order/Create/SecuretradingController.php CHANGED
@@ -18,6 +18,7 @@ class Securetrading_Stpp_Sales_Order_Create_SecuretradingController extends Mage
18
  if (!in_array($this->getRequest()->getRequestedActionName(), array('redirect', 'location'))) {
19
  Mage::getModel('securetrading_stpp/payment_redirect')->validateOrders($this->_getOrderIncrementIds());
20
  $this->_methodInstance = Mage::getModel('securetrading_stpp/payment_redirect')->getFirstMethodInstance($this->_getOrderIncrementIds());
 
21
  }
22
  }
23
 
@@ -59,7 +60,13 @@ class Securetrading_Stpp_Sales_Order_Create_SecuretradingController extends Mage
59
  $this->_redirect('*/sales_order_create_securetrading/location', array('_query' => $queryArgs));
60
 
61
  Mage::getSingleton('adminhtml/session')->clear();
62
- Mage::getSingleton('adminhtml/session')->addSuccess($this->__('The order has been created.'));
 
 
 
 
 
 
63
  }
64
 
65
  public function locationAction() {
18
  if (!in_array($this->getRequest()->getRequestedActionName(), array('redirect', 'location'))) {
19
  Mage::getModel('securetrading_stpp/payment_redirect')->validateOrders($this->_getOrderIncrementIds());
20
  $this->_methodInstance = Mage::getModel('securetrading_stpp/payment_redirect')->getFirstMethodInstance($this->_getOrderIncrementIds());
21
+ $this->_methodInstance->setStore($this->_methodInstance->getInfoInstance()->getOrder()->getStore()->getId());
22
  }
23
  }
24
 
60
  $this->_redirect('*/sales_order_create_securetrading/location', array('_query' => $queryArgs));
61
 
62
  Mage::getSingleton('adminhtml/session')->clear();
63
+
64
+ if (Mage::helper('securetrading_stpp')->orderIsSuccessful($orderIncrementId)) {
65
+ Mage::getSingleton('adminhtml/session')->addSuccess($this->__('The order has been created.'));
66
+ }
67
+ else {
68
+ Mage::getSingleton('adminhtml/session')->addError(sprintf($this->__('The order with ID "%s" was not added correctly.'), $orderIncrementId));
69
+ }
70
  }
71
 
72
  public function locationAction() {
app/code/local/Securetrading/Stpp/controllers/Securetrading/TransactionsController.php CHANGED
@@ -4,7 +4,7 @@ class Securetrading_Stpp_Securetrading_TransactionsController extends Mage_Admin
4
  public function indexAction() {
5
  $this
6
  ->_title($this->__('Sales'))
7
- ->_title($this->__('SecureTrading Transactions'));
8
 
9
  $this->loadLayout()->_setActiveMenu('sales/securetrading_transactions');
10
  $this->renderlayout();
@@ -25,7 +25,7 @@ class Securetrading_Stpp_Securetrading_TransactionsController extends Mage_Admin
25
 
26
  $this
27
  ->_title($this->__('Sales'))
28
- ->_title($this->__('SecureTrading Transactions'))
29
  ->_title('#' . $transaction->getTransactionId() . ' (' . $tRef . ')');
30
 
31
  $this->loadLayout()->_setActiveMenu('sales/securetrading_transactions');
4
  public function indexAction() {
5
  $this
6
  ->_title($this->__('Sales'))
7
+ ->_title($this->__('Secure Trading Transactions'));
8
 
9
  $this->loadLayout()->_setActiveMenu('sales/securetrading_transactions');
10
  $this->renderlayout();
25
 
26
  $this
27
  ->_title($this->__('Sales'))
28
+ ->_title($this->__('Secure Trading Transactions'))
29
  ->_title('#' . $transaction->getTransactionId() . ' (' . $tRef . ')');
30
 
31
  $this->loadLayout()->_setActiveMenu('sales/securetrading_transactions');
app/code/local/Securetrading/Stpp/etc/adminhtml.xml CHANGED
@@ -21,6 +21,17 @@
21
  </securetrading_transactions>
22
  </children>
23
  </sales>
 
 
 
 
 
 
 
 
 
 
 
24
  </children>
25
  </admin>
26
  </resources>
21
  </securetrading_transactions>
22
  </children>
23
  </sales>
24
+ <system>
25
+ <children>
26
+ <config>
27
+ <children>
28
+ <securetrading_stpp>
29
+ <title>Secure Trading Config (Magento 1.7.0.0 and lower)</title>
30
+ </securetrading_stpp>
31
+ </children>
32
+ </config>
33
+ </children>
34
+ </system>
35
  </children>
36
  </admin>
37
  </resources>
app/code/local/Securetrading/Stpp/etc/config.xml CHANGED
@@ -3,7 +3,7 @@
3
  <config>
4
  <modules>
5
  <Securetrading_Stpp>
6
- <version>3.2.1</version>
7
  </Securetrading_Stpp>
8
  </modules>
9
 
@@ -35,6 +35,8 @@
35
  <secure_url>
36
  <securetrading_redirect_post_onepage>/securetrading/redirect_post_onepage</securetrading_redirect_post_onepage>
37
  <securetrading_redirect_post_multishipping>/securetrading/redirect_post_multishipping</securetrading_redirect_post_multishipping>
 
 
38
  <securetrading_payment_location>/securetrading/payment/location</securetrading_payment_location>
39
  </secure_url>
40
  </frontend>
@@ -127,9 +129,16 @@
127
  </securetrading_stpp>
128
  </observers>
129
  </checkout_type_multishipping_create_orders_single>
 
 
 
 
 
 
 
 
130
  </events>
131
  </global>
132
- <!--
133
  <crontab>
134
  <jobs>
135
  <securetrading_stpp_abandoned_order_cleanup>
@@ -140,30 +149,41 @@
140
  <model>securetrading_stpp/cron::abandonedOrderCleanup</model>
141
  </run>
142
  </securetrading_stpp_abandoned_order_cleanup>
143
- <securetrading_Stpp_Data_Request_table_cleanup>
144
  <schedule>
145
  <cron_expr>0 * * * *</cron_expr>
146
  </schedule>
147
  <run>
148
  <model>securetrading_stpp/cron::requestTableCleanup</model>
149
  </run>
150
- </securetrading_Stpp_Data_Request_table_cleanup>
 
 
 
 
 
 
 
 
151
  </jobs>
152
  </crontab>
153
- -->
154
  <default>
155
  <payment>
156
- <securetrading_stpp_direct>
157
- <model>securetrading_stpp/payment_direct</model>
158
  <accepted_cards backend_model="securetrading_stpp/adminhtml_system_config_backend_multiselect" />
 
 
159
  <stapi_alias backend_model="adminhtml/system_config_backend_encrypted" />
160
  <stapi_host backend_model="adminhtml/system_config_backend_encrypted" />
161
  <stapi_port backend_model="adminhtml/system_config_backend_encrypted" />
162
  <ws_alias backend_model="adminhtml/system_config_backend_encrypted" />
163
  <ws_username backend_model="adminhtml/system_config_backend_encrypted" />
164
  <ws_password backend_model="adminhtml/system_config_backend_encrypted" />
165
- <api_iframe_width>100%</api_iframe_width>
166
- <api_iframe_height>600px</api_iframe_height>
 
 
167
  </securetrading_stpp_direct>
168
  <securetrading_stpp_redirect>
169
  <model>securetrading_stpp/payment_redirect</model>
@@ -175,6 +195,16 @@
175
  <ppg_iframe_height>600px</ppg_iframe_height>
176
  <parent_css>st.magentoiframeparent</parent_css>
177
  <child_js>st.magentoiframechild</child_js>
 
 
 
 
 
 
 
 
 
 
178
  </securetrading_stpp_redirect>
179
  </payment>
180
  </default>
3
  <config>
4
  <modules>
5
  <Securetrading_Stpp>
6
+ <version>3.3.0</version>
7
  </Securetrading_Stpp>
8
  </modules>
9
 
35
  <secure_url>
36
  <securetrading_redirect_post_onepage>/securetrading/redirect_post_onepage</securetrading_redirect_post_onepage>
37
  <securetrading_redirect_post_multishipping>/securetrading/redirect_post_multishipping</securetrading_redirect_post_multishipping>
38
+ <securetrading_direct_post>/securetrading/direct_post</securetrading_direct_post>
39
+ <securetrading_direct_return>/securetrading/direct/return</securetrading_direct_return>
40
  <securetrading_payment_location>/securetrading/payment/location</securetrading_payment_location>
41
  </secure_url>
42
  </frontend>
129
  </securetrading_stpp>
130
  </observers>
131
  </checkout_type_multishipping_create_orders_single>
132
+ <adminhtml_init_system_config>
133
+ <observers>
134
+ <securetrading_stpp>
135
+ <class>Securetrading_Stpp_Model_Observer</class>
136
+ <method>onAdminhtmlInitSystemConfig</method>
137
+ </securetrading_stpp>
138
+ </observers>
139
+ </adminhtml_init_system_config>
140
  </events>
141
  </global>
 
142
  <crontab>
143
  <jobs>
144
  <securetrading_stpp_abandoned_order_cleanup>
149
  <model>securetrading_stpp/cron::abandonedOrderCleanup</model>
150
  </run>
151
  </securetrading_stpp_abandoned_order_cleanup>
152
+ <securetrading_stpp_request_table_cleanup>
153
  <schedule>
154
  <cron_expr>0 * * * *</cron_expr>
155
  </schedule>
156
  <run>
157
  <model>securetrading_stpp/cron::requestTableCleanup</model>
158
  </run>
159
+ </securetrading_stpp_request_table_cleanup>
160
+ <securetrading_stpp_update_old_orders>
161
+ <schedule>
162
+ <cron_expr>0 0 * * *</cron_expr>
163
+ </schedule>
164
+ <run>
165
+ <model>securetrading_stpp/cron::updateOldOrders</model>
166
+ </run>
167
+ </securetrading_stpp_update_old_orders>
168
  </jobs>
169
  </crontab>
 
170
  <default>
171
  <payment>
172
+ <securetrading_stpp_direct>
173
+ <model>securetrading_stpp/payment_direct</model>
174
  <accepted_cards backend_model="securetrading_stpp/adminhtml_system_config_backend_multiselect" />
175
+ <api_iframe_width>100%</api_iframe_width>
176
+ <api_iframe_height>600px</api_iframe_height>
177
  <stapi_alias backend_model="adminhtml/system_config_backend_encrypted" />
178
  <stapi_host backend_model="adminhtml/system_config_backend_encrypted" />
179
  <stapi_port backend_model="adminhtml/system_config_backend_encrypted" />
180
  <ws_alias backend_model="adminhtml/system_config_backend_encrypted" />
181
  <ws_username backend_model="adminhtml/system_config_backend_encrypted" />
182
  <ws_password backend_model="adminhtml/system_config_backend_encrypted" />
183
+ <ws_verify_ca>1</ws_verify_ca>
184
+ <transactionsearch_username backend_model="adminhtml/system_config_backend_encrypted" />
185
+ <transactionsearch_password backend_model="adminhtml/system_config_backend_encrypted" />
186
+ <transactionsearch_verify_ca>1</transactionsearch_verify_ca>
187
  </securetrading_stpp_direct>
188
  <securetrading_stpp_redirect>
189
  <model>securetrading_stpp/payment_redirect</model>
195
  <ppg_iframe_height>600px</ppg_iframe_height>
196
  <parent_css>st.magentoiframeparent</parent_css>
197
  <child_js>st.magentoiframechild</child_js>
198
+ <stapi_alias backend_model="adminhtml/system_config_backend_encrypted" />
199
+ <stapi_host backend_model="adminhtml/system_config_backend_encrypted" />
200
+ <stapi_port backend_model="adminhtml/system_config_backend_encrypted" />
201
+ <ws_alias backend_model="adminhtml/system_config_backend_encrypted" />
202
+ <ws_username backend_model="adminhtml/system_config_backend_encrypted" />
203
+ <ws_password backend_model="adminhtml/system_config_backend_encrypted" />
204
+ <ws_verify_ca>1</ws_verify_ca>
205
+ <transactionsearch_username backend_model="adminhtml/system_config_backend_encrypted" />
206
+ <transactionsearch_password backend_model="adminhtml/system_config_backend_encrypted" />
207
+ <transactionsearch_verify_ca>1</transactionsearch_verify_ca>
208
  </securetrading_stpp_redirect>
209
  </payment>
210
  </default>
app/code/local/Securetrading/Stpp/etc/system.xml CHANGED
@@ -1,550 +1,847 @@
1
  <?xml version="1.0"?>
2
  <config>
3
  <sections>
4
- <payment>
 
 
 
 
 
 
 
 
 
5
  <groups>
6
- <securetrading_stpp_group translate="label comment" module="securetrading_stpp">
7
- <label>SecureTrading STPP</label>
8
- <comment>Please configure the interface you wish to use.</comment>
9
- <frontend_class>complex</frontend_class>
10
- <frontend_model>securetrading_stpp/adminhtml_system_config_group</frontend_model>
11
- <expanded>1</expanded>
12
- <sort_order>1</sort_order>
13
- <show_in_default>1</show_in_default>
14
- <show_in_website>1</show_in_website>
15
- <show_in_store>1</show_in_store>
16
- <fields>
17
- <securetrading_stpp_redirect type="group" translate="label comment" module="securetrading_stpp">
18
- <label>SecureTrading Payment Pages</label>
19
- <comment>Redirects your customers to SecureTrading's secure payment servers.</comment>
20
- <frontend_model>securetrading_stpp/adminhtml_system_config_fieldset_fields</frontend_model>
21
- <expanded>0</expanded>
22
- <show_in_default>1</show_in_default>
23
- <show_in_website>1</show_in_website>
24
- <show_in_store>1</show_in_store>
25
- <fields>
26
- <securetrading_stpp_redirect_config_basic type="group" translate="label comment" module="securetrading_stpp">
27
- <label>Basic Configuration</label>
28
- <comment>Affects how Magento works with your payment method.</comment>
29
- <frontend_model>securetrading_stpp/adminhtml_system_config_fieldset_fields</frontend_model>
30
- <expanded>0</expanded>
31
- <sort_order>0</sort_order>
32
- <show_in_default>1</show_in_default>
33
- <show_in_website>1</show_in_website>
34
- <show_in_store>1</show_in_store>
35
- <fields>
36
- <active>
37
- <config_path>payment/securetrading_stpp_redirect/active</config_path>
38
- <frontend_type>select</frontend_type>
39
- <source_model>adminhtml/system_config_source_yesno</source_model>
40
- <sort_order>0</sort_order>
41
- <show_in_default>1</show_in_default>
42
- <show_in_website>1</show_in_website>
43
- <show_in_store>1</show_in_store>
44
- </active>
45
- <title>
46
- <config_path>payment/securetrading_stpp_redirect/title</config_path>
47
- <frontend_type>text</frontend_type>
48
- <sort_order>1</sort_order>
49
- <show_in_default>1</show_in_default>
50
- <show_in_website>1</show_in_website>
51
- <show_in_store>1</show_in_store>
52
- </title>
53
- <description>
54
- <config_path>payment/securetrading_stpp_redirect/description</config_path>
55
- <frontend_type>textarea</frontend_type>
56
- <sort_order>2</sort_order>
57
- <show_in_default>1</show_in_default>
58
- <show_in_website>1</show_in_website>
59
- <show_in_store>1</show_in_store>
60
- </description>
61
- <allowspecific>
62
- <config_path>payment/securetrading_stpp_redirect/allowspecific</config_path>
63
- <frontend_type>allowspecific</frontend_type>
64
- <sort_order>3</sort_order>
65
- <source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
66
- <show_in_default>1</show_in_default>
67
- <show_in_website>1</show_in_website>
68
- <show_in_store>1</show_in_store>
69
- </allowspecific>
70
- <specificcountry>
71
- <config_path>payment/securetrading_stpp_redirect/specificcountry</config_path>
72
- <frontend_type>multiselect</frontend_type>
73
- <sort_order>4</sort_order>
74
- <source_model>adminhtml/system_config_source_country</source_model>
75
- <show_in_default>1</show_in_default>
76
- <show_in_website>1</show_in_website>
77
- <show_in_store>1</show_in_store>
78
- </specificcountry>
79
- <ppg_use_iframe>
80
- <config_path>payment/securetrading_stpp_redirect/ppg_use_iframe</config_path>
81
- <frontend_type>select</frontend_type>
82
- <source_model>adminhtml/system_config_source_yesno</source_model>
83
- <sort_order>5</sort_order>
84
- <show_in_default>1</show_in_default>
85
- <show_in_website>1</show_in_website>
86
- <show_in_store>1</show_in_store>
87
- </ppg_use_iframe>
88
- <ppg_iframe_height>
89
- <config_path>payment/securetrading_stpp_redirect/ppg_iframe_height</config_path>
90
- <frontend_type>text</frontend_type>
91
- <sort_order>6</sort_order>
92
- <show_in_default>1</show_in_default>
93
- <show_in_website>1</show_in_website>
94
- <show_in_store>1</show_in_store>
95
- </ppg_iframe_height>
96
- <ppg_iframe_width>
97
- <config_path>payment/securetrading_stpp_redirect/ppg_iframe_width</config_path>
98
- <frontend_type>text</frontend_type>
99
- <sort_order>7</sort_order>
100
- <show_in_default>1</show_in_default>
101
- <show_in_website>1</show_in_website>
102
- <show_in_store>1</show_in_store>
103
- </ppg_iframe_width>
104
- </fields>
105
- </securetrading_stpp_redirect_config_basic>
106
- <securetrading_stpp_redirect_config_gateway type="group" translate="label comment" module="securetrading_stpp">
107
- <label>Gateway Configuration</label>
108
- <comment>Affect how requests to and responses from the SecureTrading gateway are processed.</comment>
109
- <frontend_model>securetrading_stpp/adminhtml_system_config_fieldset_fields</frontend_model>
110
- <expanded>0</expanded>
111
- <sort_order>1</sort_order>
112
- <show_in_default>1</show_in_default>
113
- <show_in_website>1</show_in_website>
114
- <show_in_store>1</show_in_store>
115
- <fields>
116
- <site_reference>
117
- <config_path>payment/securetrading_stpp_redirect/site_reference</config_path>
118
- <frontend_type>text</frontend_type>
119
- <sort_order>0</sort_order>
120
- <show_in_default>1</show_in_default>
121
- <show_in_website>1</show_in_website>
122
- <show_in_store>1</show_in_store>
123
- </site_reference>
124
- <use_site_security>
125
- <config_path>payment/securetrading_stpp_redirect/use_site_security</config_path>
126
- <frontend_type>select</frontend_type>
127
- <source_model>adminhtml/system_config_source_yesno</source_model>
128
- <sort_order>1</sort_order>
129
- <show_in_default>1</show_in_default>
130
- <show_in_website>1</show_in_website>
131
- <show_in_store>1</show_in_store>
132
- </use_site_security>
133
- <site_security_password>
134
- <config_path>payment/securetrading_stpp_redirect/site_security_password</config_path>
135
- <frontend_type>text</frontend_type>
136
- <backend_model>adminhtml/system_config_backend_encrypted</backend_model>
137
- <sort_order>2</sort_order>
138
- <show_in_default>1</show_in_default>
139
- <show_in_website>1</show_in_website>
140
- <show_in_store>1</show_in_store>
141
- </site_security_password>
142
- <use_notification_password>
143
- <config_path>payment/securetrading_stpp_redirect/use_notification_password</config_path>
144
- <frontend_type>select</frontend_type>
145
- <source_model>adminhtml/system_config_source_yesno</source_model>
146
- <sort_order>3</sort_order>
147
- <show_in_default>1</show_in_default>
148
- <show_in_website>1</show_in_website>
149
- <show_in_store>1</show_in_store>
150
- </use_notification_password>
151
- <notification_password>
152
- <config_path>payment/securetrading_stpp_redirect/notification_password</config_path>
153
- <frontend_type>text</frontend_type>
154
- <backend_model>adminhtml/system_config_backend_encrypted</backend_model>
155
- <sort_order>4</sort_order>
156
- <show_in_default>1</show_in_default>
157
- <show_in_website>1</show_in_website>
158
- <show_in_store>1</show_in_store>
159
- </notification_password>
160
- <parent_css>
161
- <config_path>payment/securetrading_stpp_redirect/parent_css</config_path>
162
- <frontend_type>text</frontend_type>
163
- <sort_order>5</sort_order>
164
- <show_in_default>1</show_in_default>
165
- <show_in_website>1</show_in_website>
166
- <show_in_store>1</show_in_store>
167
- </parent_css>
168
- <child_css>
169
- <config_path>payment/securetrading_stpp_redirect/child_css</config_path>
170
- <frontend_type>text</frontend_type>
171
- <sort_order>6</sort_order>
172
- <show_in_default>1</show_in_default>
173
- <show_in_website>1</show_in_website>
174
- <show_in_store>1</show_in_store>
175
- </child_css>
176
- <parent_js>
177
- <config_path>payment/securetrading_stpp_redirect/parent_js</config_path>
178
- <frontend_type>text</frontend_type>
179
- <sort_order>7</sort_order>
180
- <show_in_default>1</show_in_default>
181
- <show_in_website>1</show_in_website>
182
- <show_in_store>1</show_in_store>
183
- </parent_js>
184
- <child_js>
185
- <config_path>payment/securetrading_stpp_redirect/child_js</config_path>
186
- <frontend_type>text</frontend_type>
187
- <sort_order>8</sort_order>
188
- <show_in_default>1</show_in_default>
189
- <show_in_website>1</show_in_website>
190
- <show_in_store>1</show_in_store>
191
- </child_js>
192
- <use_api>
193
- <config_path>payment/securetrading_stpp_redirect/use_api</config_path>
194
- <frontend_type>select</frontend_type>
195
- <source_model>adminhtml/system_config_source_yesno</source_model>
196
- <sort_order>9</sort_order>
197
- <show_in_default>1</show_in_default>
198
- <show_in_website>1</show_in_website>
199
- <show_in_store>1</show_in_store>
200
- </use_api>
201
- <payment_action>
202
- <config_path>payment/securetrading_stpp_redirect/payment_action</config_path>
203
- <frontend_type>select</frontend_type>
204
- <source_model>securetrading_stpp/source_paymentaction</source_model>
205
- <sort_order>10</sort_order>
206
- <show_in_default>1</show_in_default>
207
- <show_in_website>1</show_in_website>
208
- <show_in_store>1</show_in_store>
209
- </payment_action>
210
- <settle_due_date>
211
- <config_path>payment/securetrading_stpp_redirect/settle_due_date</config_path>
212
- <frontend_type>select</frontend_type>
213
- <source_model>securetrading_stpp/source_settleduedate</source_model>
214
- <sort_order>11</sort_order>
215
- <show_in_default>1</show_in_default>
216
- <show_in_website>1</show_in_website>
217
- <show_in_store>1</show_in_store>
218
- </settle_due_date>
219
- <settle_status>
220
- <config_path>payment/securetrading_stpp_redirect/settle_status</config_path>
221
- <frontend_type>select</frontend_type>
222
- <source_model>securetrading_stpp/source_settlestatus</source_model>
223
- <sort_order>12</sort_order>
224
- <show_in_default>1</show_in_default>
225
- <show_in_website>1</show_in_website>
226
- <show_in_store>1</show_in_store>
227
- </settle_status>
228
- </fields>
229
- </securetrading_stpp_redirect_config_gateway>
230
- </fields>
231
- </securetrading_stpp_redirect>
232
- <securetrading_stpp_direct type="group" translate="label comment" module="securetrading_stpp">
233
- <label>SecureTrading API</label>
234
- <comment>Allows your store to capture credit card details. Your store must be PCI compliant to use this payment method.</comment>
235
- <frontend_model>securetrading_stpp/adminhtml_system_config_fieldset_fields</frontend_model>
236
- <expanded>0</expanded>
237
- <sort_order>1</sort_order>
238
- <show_in_default>1</show_in_default>
239
- <show_in_website>1</show_in_website>
240
- <show_in_store>1</show_in_store>
241
- <fields>
242
- <!--
243
- <securetrading_stpp_direct_config_basic type="group" translate="label comment" module="securetrading_stpp">
244
- <label>Basic Configuration</label>
245
- <comment>Affects how Magento works with your payment method.</comment>
246
- <frontend_model>securetrading_stpp/adminhtml_system_config_fieldset_fields</frontend_model>
247
- <expanded>0</expanded>
248
- <sort_order>0</sort_order>
249
- <show_in_default>1</show_in_default>
250
- <show_in_website>1</show_in_website>
251
- <show_in_store>1</show_in_store>
252
- <fields>
253
- <active>
254
- <config_path>payment/securetrading_stpp_direct/active</config_path>
255
- <frontend_type>select</frontend_type>
256
- <source_model>adminhtml/system_config_source_yesno</source_model>
257
- <sort_order>0</sort_order>
258
- <show_in_default>1</show_in_default>
259
- <show_in_website>1</show_in_website>
260
- <show_in_store>1</show_in_store>
261
- </active>
262
- <title>
263
- <config_path>payment/securetrading_stpp_direct/title</config_path>
264
- <frontend_type>text</frontend_type>
265
- <sort_order>1</sort_order>
266
- <show_in_default>1</show_in_default>
267
- <show_in_website>1</show_in_website>
268
- <show_in_store>1</show_in_store>
269
- </title>
270
- <description>
271
- <config_path>payment/securetrading_stpp_direct/description</config_path>
272
- <frontend_type>textarea</frontend_type>
273
- <sort_order>2</sort_order>
274
- <show_in_default>1</show_in_default>
275
- <show_in_website>1</show_in_website>
276
- <show_in_store>1</show_in_store>
277
- </description>
278
- <allowspecific>
279
- <config_path>payment/securetrading_stpp_direct/allowspecific</config_path>
280
- <frontend_type>allowspecific</frontend_type>
281
- <sort_order>3</sort_order>
282
- <source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
283
- <show_in_default>1</show_in_default>
284
- <show_in_website>1</show_in_website>
285
- <show_in_store>1</show_in_store>
286
- </allowspecific>
287
- <specificcountry>
288
- <config_path>payment/securetrading_stpp_direct/specificcountry</config_path>
289
- <frontend_type>multiselect</frontend_type>
290
- <sort_order>4</sort_order>
291
- <source_model>adminhtml/system_config_source_country</source_model>
292
- <show_in_default>1</show_in_default>
293
- <show_in_website>1</show_in_website>
294
- <show_in_store>1</show_in_store>
295
- </specificcountry>
296
- <api_use_iframe>
297
- <config_path>payment/securetrading_stpp_direct/api_use_iframe</config_path>
298
- <frontend_type>select</frontend_type>
299
- <source_model>adminhtml/system_config_source_yesno</source_model>
300
- <sort_order>6</sort_order>
301
- <show_in_default>1</show_in_default>
302
- <show_in_website>1</show_in_website>
303
- <show_in_store>1</show_in_store>
304
- </api_use_iframe>
305
- <api_iframe_height>
306
- <config_path>payment/securetrading_stpp_direct/api_iframe_height</config_path>
307
- <frontend_type>text</frontend_type>
308
- <sort_order>7</sort_order>
309
- <show_in_default>1</show_in_default>
310
- <show_in_website>1</show_in_website>
311
- <show_in_store>1</show_in_store>
312
- </api_iframe_height>
313
- <api_iframe_width>
314
- <config_path>payment/securetrading_stpp_direct/api_iframe_width</config_path>
315
- <frontend_type>text</frontend_type>
316
- <sort_order>8</sort_order>
317
- <show_in_default>1</show_in_default>
318
- <show_in_website>1</show_in_website>
319
- <show_in_store>1</show_in_store>
320
- </api_iframe_width>
321
- </fields>
322
- </securetrading_stpp_direct_config_basic>
323
- -->
324
- <securetrading_stpp_direct_config_gateway type="group" translate="label comment" module="securetrading_stpp">
325
- <label>Gateway Configuration</label>
326
- <comment>Affect how requests to and responses from the SecureTrading gateway are processed.</comment>
327
- <frontend_model>securetrading_stpp/adminhtml_system_config_fieldset_fields</frontend_model>
328
- <expanded>0</expanded>
329
- <sort_order>1</sort_order>
330
- <show_in_default>1</show_in_default>
331
- <show_in_website>1</show_in_website>
332
- <show_in_store>1</show_in_store>
333
- <fields>
334
- <site_reference>
335
- <config_path>payment/securetrading_stpp_direct/site_reference</config_path>
336
- <frontend_type>text</frontend_type>
337
- <sort_order>0</sort_order>
338
- <show_in_default>1</show_in_default>
339
- <show_in_website>1</show_in_website>
340
- <show_in_store>1</show_in_store>
341
- </site_reference>
342
- <connection>
343
- <config_path>payment/securetrading_stpp_direct/connection</config_path>
344
- <comment>You must configure the appropriate connection in the 'Connection Configuration' fieldset after selecting the connection method here.</comment>
345
- <frontend_type>select</frontend_type>
346
- <source_model>securetrading_stpp/source_connection</source_model>
347
- <sort_order>1</sort_order>
348
- <show_in_default>1</show_in_default>
349
- <show_in_website>1</show_in_website>
350
- <show_in_store>1</show_in_store>
351
- </connection>
352
- <!--
353
- <use_3d_secure>
354
- <config_path>payment/securetrading_stpp_direct/use_3d_secure</config_path>
355
- <frontend_type>select</frontend_type>
356
- <source_model>adminhtml/system_config_source_yesno</source_model>
357
- <sort_order>2</sort_order>
358
- <show_in_default>1</show_in_default>
359
- <show_in_website>1</show_in_website>
360
- <show_in_store>1</show_in_store>
361
- </use_3d_secure>
362
- <use_risk_decision>
363
- <config_path>payment/securetrading_stpp_direct/use_risk_decision</config_path>
364
- <frontend_type>select</frontend_type>
365
- <source_model>adminhtml/system_config_source_yesno</source_model>
366
- <sort_order>3</sort_order>
367
- <show_in_default>1</show_in_default>
368
- <show_in_website>1</show_in_website>
369
- <show_in_store>1</show_in_store>
370
- </use_risk_decision>
371
- <use_card_store>
372
- <config_path>payment/securetrading_stpp_direct/use_card_store</config_path>
373
- <frontend_type>select</frontend_type>
374
- <source_model>adminhtml/system_config_source_yesno</source_model>
375
- <sort_order>4</sort_order>
376
- <show_in_default>1</show_in_default>
377
- <show_in_website>1</show_in_website>
378
- <show_in_store>1</show_in_store>
379
- </use_card_store>
380
- <use_auto_card_store>
381
- <config_path>payment/securetrading_stpp_direct/use_auto_card_store</config_path>
382
- <frontend_type>select</frontend_type>
383
- <source_model>adminhtml/system_config_source_yesno</source_model>
384
- <sort_order>5</sort_order>
385
- <show_in_default>1</show_in_default>
386
- <show_in_website>1</show_in_website>
387
- <show_in_store>1</show_in_store>
388
- </use_auto_card_store>
389
- <delay_risk_decision>
390
- <config_path>payment/securetrading_stpp_direct/delay_risk_decision</config_path>
391
- <frontend_type>select</frontend_type>
392
- <source_model>adminhtml/system_config_source_yesno</source_model>
393
- <sort_order>6</sort_order>
394
- <show_in_default>1</show_in_default>
395
- <show_in_website>1</show_in_website>
396
- <show_in_store>1</show_in_store>
397
- </delay_risk_decision>
398
- <accepted_cards>
399
- <config_path>payment/securetrading_stpp_direct/accepted_cards</config_path>
400
- <frontend_type>multiselect</frontend_type>
401
- <backend_model>securetrading_stpp/adminhtml_system_config_backend_multiselect</backend_model>
402
- <source_model>securetrading_stpp/source_cardtypes</source_model>
403
- <sort_order>7</sort_order>
404
- <show_in_default>1</show_in_default>
405
- <show_in_website>1</show_in_website>
406
- <show_in_store>1</show_in_store>
407
- </accepted_cards>
408
- <payment_action>
409
- <config_path>payment/securetrading_stpp_direct/payment_action</config_path>
410
- <frontend_type>select</frontend_type>
411
- <source_model>securetrading_stpp/source_paymentaction</source_model>
412
- <sort_order>8</sort_order>
413
- <show_in_default>1</show_in_default>
414
- <show_in_website>1</show_in_website>
415
- <show_in_store>1</show_in_store>
416
- </payment_action>
417
- <settle_due_date>
418
- <config_path>payment/securetrading_stpp_direct/settle_due_date</config_path>
419
- <frontend_type>select</frontend_type>
420
- <source_model>securetrading_stpp/source_settleduedate</source_model>
421
- <sort_order>9</sort_order>
422
- <show_in_default>1</show_in_default>
423
- <show_in_website>1</show_in_website>
424
- <show_in_store>1</show_in_store>
425
- </settle_due_date>
426
- <settle_status>
427
- <config_path>payment/securetrading_stpp_direct/settle_status</config_path>
428
- <frontend_type>select</frontend_type>
429
- <source_model>securetrading_stpp/source_settlestatus</source_model>
430
- <sort_order>10</sort_order>
431
- <show_in_default>1</show_in_default>
432
- <show_in_website>1</show_in_website>
433
- <show_in_store>1</show_in_store>
434
- </settle_status>
435
- -->
436
- </fields>
437
- </securetrading_stpp_direct_config_gateway>
438
- <securetrading_stpp_direct_config_connections type="group" translate="label comment" module="securetrading_stpp">
439
- <label>Connection Configuration</label>
440
- <comment>Aggregates the configuration for all connection methods provided by this module.</comment>
441
- <frontend_model>securetrading_stpp/adminhtml_system_config_fieldset_fields</frontend_model>
442
- <expanded>0</expanded>
443
- <sort_order>2</sort_order>
444
- <show_in_default>1</show_in_default>
445
- <show_in_website>1</show_in_website>
446
- <show_in_store>1</show_in_store>
447
- <fields>
448
- <securetrading_stpp_api_stapi_group type="group" translate="label comment">
449
- <label>ST API Settings</label>
450
- <comment>Contains ST API connection configuration.</comment>
451
- <frontend_model>securetrading_stpp/adminhtml_system_config_fieldset_fields</frontend_model>
452
- <show_in_default>1</show_in_default>
453
- <show_in_website>1</show_in_website>
454
- <show_in_store>1</show_in_store>
455
- <sort_order>0</sort_order>
456
- <fields>
457
- <stapi_alias>
458
- <config_path>payment/securetrading_stpp_direct/stapi_alias</config_path>
459
- <frontend_type>text</frontend_type>
460
- <backend_model>adminhtml/system_config_backend_encrypted</backend_model>
461
- <sort_order>0</sort_order>
462
- <show_in_default>1</show_in_default>
463
- <show_in_website>1</show_in_website>
464
- <show_in_store>1</show_in_store>
465
- </stapi_alias>
466
- <stapi_host>
467
- <config_path>payment/securetrading_stpp_direct/stapi_host</config_path>
468
- <frontend_type>text</frontend_type>
469
- <backend_model>adminhtml/system_config_backend_encrypted</backend_model>
470
- <sort_order>1</sort_order>
471
- <show_in_default>1</show_in_default>
472
- <show_in_website>1</show_in_website>
473
- <show_in_store>1</show_in_store>
474
- </stapi_host>
475
- <stapi_port>
476
- <config_path>payment/securetrading_stpp_direct/stapi_port</config_path>
477
- <frontend_type>text</frontend_type>
478
- <backend_model>adminhtml/system_config_backend_encrypted</backend_model>
479
- <sort_order>2</sort_order>
480
- <show_in_default>1</show_in_default>
481
- <show_in_website>1</show_in_website>
482
- <show_in_store>1</show_in_store>
483
- </stapi_port>
484
- </fields>
485
- </securetrading_stpp_api_stapi_group>
486
- <securetrading_stpp_api_webservices_group type="group" translate="label comment">
487
- <label>Web Services Connections</label>
488
- <comment>Contains Web Services connection configuration.</comment>
489
- <frontend_model>securetrading_stpp/adminhtml_system_config_fieldset_fields</frontend_model>
490
- <show_in_default>1</show_in_default>
491
- <show_in_website>1</show_in_website>
492
- <show_in_store>1</show_in_store>
493
- <sort_order>1</sort_order>
494
- <fields>
495
- <ws_alias>
496
- <config_path>payment/securetrading_stpp_direct/ws_alias</config_path>
497
- <frontend_type>text</frontend_type>
498
- <backend_model>adminhtml/system_config_backend_encrypted</backend_model>
499
- <sort_order>0</sort_order>
500
- <show_in_default>1</show_in_default>
501
- <show_in_website>1</show_in_website>
502
- <show_in_store>1</show_in_store>
503
- </ws_alias>
504
- <ws_username>
505
- <config_path>payment/securetrading_stpp_direct/ws_username</config_path>
506
- <frontend_type>text</frontend_type>
507
- <backend_model>adminhtml/system_config_backend_encrypted</backend_model>
508
- <sort_order>1</sort_order>
509
- <show_in_default>1</show_in_default>
510
- <show_in_website>1</show_in_website>
511
- <show_in_store>1</show_in_store>
512
- </ws_username>
513
- <ws_password>
514
- <config_path>payment/securetrading_stpp_direct/ws_password</config_path>
515
- <frontend_type>text</frontend_type>
516
- <backend_model>adminhtml/system_config_backend_encrypted</backend_model>
517
- <sort_order>2</sort_order>
518
- <show_in_default>1</show_in_default>
519
- <show_in_website>1</show_in_website>
520
- <show_in_store>1</show_in_store>
521
- </ws_password>
522
- <ws_verify_ca>
523
- <config_path>payment/securetrading_stpp_direct/ws_verify_ca</config_path>
524
- <frontend_type>select</frontend_type>
525
- <source_model>adminhtml/system_config_source_yesno</source_model>
526
- <sort_order>3</sort_order>
527
- <show_in_default>1</show_in_default>
528
- <show_in_website>1</show_in_website>
529
- <show_in_store>1</show_in_store>
530
- </ws_verify_ca>
531
- <ws_ca_file>
532
- <config_path>payment/securetrading_stpp_direct/ws_ca_file</config_path>
533
- <frontend_type>text</frontend_type>
534
- <sort_order>4</sort_order>
535
- <show_in_default>1</show_in_default>
536
- <show_in_website>1</show_in_website>
537
- <show_in_store>1</show_in_store>
538
- </ws_ca_file>
539
- </fields>
540
- </securetrading_stpp_api_webservices_group>
541
- </fields>
542
- </securetrading_stpp_direct_config_connections>
543
- </fields>
544
- </securetrading_stpp_direct>
545
- </fields>
546
- </securetrading_stpp_group>
547
- </groups>
548
- </payment>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
549
  </sections>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
550
  </config>
1
  <?xml version="1.0"?>
2
  <config>
3
  <sections>
4
+ <securetrading_stpp translate="label" module="securetrading_stpp">
5
+ <label>Secure Trading</label>
6
+ <class>securetrading-section</class>
7
+ <header_css>securetrading-header</header_css>
8
+ <tab>sales</tab>
9
+ <frontend_type>text</frontend_type>
10
+ <sort_order>101</sort_order>
11
+ <show_in_default>1</show_in_default>
12
+ <show_in_website>1</show_in_website>
13
+ <show_in_store>1</show_in_store>
14
  <groups>
15
+ <securetrading_stpp_redirect_config_basic type="group" translate="label comment" module="securetrading_stpp">
16
+ <label>Secure Trading Payment Pages - Basic Configuration</label>
17
+ <comment>Affects how Magento works with the Payment Pages.</comment>
18
+ <frontend_model>securetrading_stpp/adminhtml_system_config_fieldset_fields</frontend_model>
19
+ <expanded>0</expanded>
20
+ <sort_order>0</sort_order>
21
+ <show_in_default>1</show_in_default>
22
+ <show_in_website>1</show_in_website>
23
+ <show_in_store>1</show_in_store>
24
+ <fields>
25
+ <active>
26
+ <config_path>payment/securetrading_stpp_redirect/active</config_path>
27
+ <frontend_type>select</frontend_type>
28
+ <source_model>adminhtml/system_config_source_yesno</source_model>
29
+ <sort_order>0</sort_order>
30
+ <show_in_default>1</show_in_default>
31
+ <show_in_website>1</show_in_website>
32
+ <show_in_store>1</show_in_store>
33
+ </active>
34
+ <title>
35
+ <config_path>payment/securetrading_stpp_redirect/title</config_path>
36
+ <frontend_type>text</frontend_type>
37
+ <sort_order>1</sort_order>
38
+ <show_in_default>1</show_in_default>
39
+ <show_in_website>1</show_in_website>
40
+ <show_in_store>1</show_in_store>
41
+ </title>
42
+ <description>
43
+ <config_path>payment/securetrading_stpp_redirect/description</config_path>
44
+ <frontend_type>textarea</frontend_type>
45
+ <sort_order>2</sort_order>
46
+ <show_in_default>1</show_in_default>
47
+ <show_in_website>1</show_in_website>
48
+ <show_in_store>1</show_in_store>
49
+ </description>
50
+ <allowspecific>
51
+ <config_path>payment/securetrading_stpp_redirect/allowspecific</config_path>
52
+ <frontend_type>allowspecific</frontend_type>
53
+ <sort_order>3</sort_order>
54
+ <source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
55
+ <show_in_default>1</show_in_default>
56
+ <show_in_website>1</show_in_website>
57
+ <show_in_store>1</show_in_store>
58
+ </allowspecific>
59
+ <specificcountry>
60
+ <config_path>payment/securetrading_stpp_redirect/specificcountry</config_path>
61
+ <frontend_type>multiselect</frontend_type>
62
+ <sort_order>4</sort_order>
63
+ <source_model>adminhtml/system_config_source_country</source_model>
64
+ <show_in_default>1</show_in_default>
65
+ <show_in_website>1</show_in_website>
66
+ <show_in_store>1</show_in_store>
67
+ </specificcountry>
68
+ <ppg_use_iframe>
69
+ <config_path>payment/securetrading_stpp_redirect/ppg_use_iframe</config_path>
70
+ <frontend_type>select</frontend_type>
71
+ <source_model>adminhtml/system_config_source_yesno</source_model>
72
+ <sort_order>5</sort_order>
73
+ <show_in_default>1</show_in_default>
74
+ <show_in_website>1</show_in_website>
75
+ <show_in_store>1</show_in_store>
76
+ </ppg_use_iframe>
77
+ <ppg_iframe_height>
78
+ <config_path>payment/securetrading_stpp_redirect/ppg_iframe_height</config_path>
79
+ <frontend_type>text</frontend_type>
80
+ <sort_order>6</sort_order>
81
+ <show_in_default>1</show_in_default>
82
+ <show_in_website>1</show_in_website>
83
+ <show_in_store>1</show_in_store>
84
+ </ppg_iframe_height>
85
+ <ppg_iframe_width>
86
+ <config_path>payment/securetrading_stpp_redirect/ppg_iframe_width</config_path>
87
+ <frontend_type>text</frontend_type>
88
+ <sort_order>7</sort_order>
89
+ <show_in_default>1</show_in_default>
90
+ <show_in_website>1</show_in_website>
91
+ <show_in_store>1</show_in_store>
92
+ </ppg_iframe_width>
93
+ <ppg_cancel_60107>
94
+ <label>Cancel Order on 60107 Error Code</label>
95
+ <tooltip>Applicable only if your Secure Trading account has RISKDEC requests enabled and the MyST Rule Manager has been updated to 'Update transaction to Stop Child AUTH ... if a generic request matches RISKDEC DENY'. If you select 'Yes' you must also enable the 'Magento ECOM 60107' and 'Magento MOTO 60107 redirects' in the 'Payment pages redirects' section of MyST (see the readme for more information). Selecting 'Yes' will cause AUTH/THREEDQUERY requests that return RISKDEC's DENY shieldstatuscode to be automatically updated to the 'Canceled' order state by putting them into payment review and denying the payment. The customer will be redirected back to Magento. If you select 'No' the order state will not change and the customer will remain on the Payment Pages.</tooltip>
96
+ <config_path>payment/securetrading_stpp_redirect/ppg_cancel_60107</config_path>
97
+ <frontend_type>select</frontend_type>
98
+ <source_model>adminhtml/system_config_source_yesno</source_model>
99
+ <sort_order>8</sort_order>
100
+ <show_in_default>1</show_in_default>
101
+ <show_in_website>1</show_in_website>
102
+ <show_in_store>1</show_in_store>
103
+ </ppg_cancel_60107>
104
+ </fields>
105
+ </securetrading_stpp_redirect_config_basic>
106
+
107
+ <securetrading_stpp_redirect_config_gateway type="group" translate="label comment" module="securetrading_stpp">
108
+ <label>Secure Trading Payment Pages - Gateway Configuration</label>
109
+ <comment>Affect how requests to and responses from the Secure Trading gateway are processed.</comment>
110
+ <frontend_model>securetrading_stpp/adminhtml_system_config_fieldset_fields</frontend_model>
111
+ <expanded>0</expanded>
112
+ <sort_order>1</sort_order>
113
+ <show_in_default>1</show_in_default>
114
+ <show_in_website>1</show_in_website>
115
+ <show_in_store>1</show_in_store>
116
+ <fields>
117
+ <site_reference>
118
+ <config_path>payment/securetrading_stpp_redirect/site_reference</config_path>
119
+ <frontend_type>text</frontend_type>
120
+ <sort_order>0</sort_order>
121
+ <show_in_default>1</show_in_default>
122
+ <show_in_website>1</show_in_website>
123
+ <show_in_store>1</show_in_store>
124
+ </site_reference>
125
+ <use_site_security>
126
+ <config_path>payment/securetrading_stpp_redirect/use_site_security</config_path>
127
+ <frontend_type>select</frontend_type>
128
+ <source_model>adminhtml/system_config_source_yesno</source_model>
129
+ <sort_order>1</sort_order>
130
+ <show_in_default>1</show_in_default>
131
+ <show_in_website>1</show_in_website>
132
+ <show_in_store>1</show_in_store>
133
+ </use_site_security>
134
+ <site_security_password>
135
+ <config_path>payment/securetrading_stpp_redirect/site_security_password</config_path>
136
+ <frontend_type>text</frontend_type>
137
+ <backend_model>adminhtml/system_config_backend_encrypted</backend_model>
138
+ <sort_order>2</sort_order>
139
+ <show_in_default>1</show_in_default>
140
+ <show_in_website>1</show_in_website>
141
+ <show_in_store>1</show_in_store>
142
+ </site_security_password>
143
+ <use_notification_password>
144
+ <config_path>payment/securetrading_stpp_redirect/use_notification_password</config_path>
145
+ <frontend_type>select</frontend_type>
146
+ <source_model>adminhtml/system_config_source_yesno</source_model>
147
+ <sort_order>3</sort_order>
148
+ <show_in_default>1</show_in_default>
149
+ <show_in_website>1</show_in_website>
150
+ <show_in_store>1</show_in_store>
151
+ </use_notification_password>
152
+ <notification_password>
153
+ <config_path>payment/securetrading_stpp_redirect/notification_password</config_path>
154
+ <frontend_type>text</frontend_type>
155
+ <backend_model>adminhtml/system_config_backend_encrypted</backend_model>
156
+ <sort_order>4</sort_order>
157
+ <show_in_default>1</show_in_default>
158
+ <show_in_website>1</show_in_website>
159
+ <show_in_store>1</show_in_store>
160
+ </notification_password>
161
+ <parent_css>
162
+ <config_path>payment/securetrading_stpp_redirect/parent_css</config_path>
163
+ <frontend_type>text</frontend_type>
164
+ <sort_order>5</sort_order>
165
+ <show_in_default>1</show_in_default>
166
+ <show_in_website>1</show_in_website>
167
+ <show_in_store>1</show_in_store>
168
+ </parent_css>
169
+ <child_css>
170
+ <config_path>payment/securetrading_stpp_redirect/child_css</config_path>
171
+ <frontend_type>text</frontend_type>
172
+ <sort_order>6</sort_order>
173
+ <show_in_default>1</show_in_default>
174
+ <show_in_website>1</show_in_website>
175
+ <show_in_store>1</show_in_store>
176
+ </child_css>
177
+ <parent_js>
178
+ <config_path>payment/securetrading_stpp_redirect/parent_js</config_path>
179
+ <frontend_type>text</frontend_type>
180
+ <sort_order>7</sort_order>
181
+ <show_in_default>1</show_in_default>
182
+ <show_in_website>1</show_in_website>
183
+ <show_in_store>1</show_in_store>
184
+ </parent_js>
185
+ <child_js>
186
+ <config_path>payment/securetrading_stpp_redirect/child_js</config_path>
187
+ <frontend_type>text</frontend_type>
188
+ <sort_order>8</sort_order>
189
+ <show_in_default>1</show_in_default>
190
+ <show_in_website>1</show_in_website>
191
+ <show_in_store>1</show_in_store>
192
+ </child_js>
193
+ <use_api>
194
+ <config_path>payment/securetrading_stpp_redirect/use_api</config_path>
195
+ <frontend_type>select</frontend_type>
196
+ <source_model>adminhtml/system_config_source_yesno</source_model>
197
+ <sort_order>9</sort_order>
198
+ <show_in_default>1</show_in_default>
199
+ <show_in_website>1</show_in_website>
200
+ <show_in_store>1</show_in_store>
201
+ </use_api>
202
+ <payment_action>
203
+ <config_path>payment/securetrading_stpp_redirect/payment_action</config_path>
204
+ <frontend_type>select</frontend_type>
205
+ <source_model>securetrading_stpp/source_paymentaction</source_model>
206
+ <sort_order>10</sort_order>
207
+ <show_in_default>1</show_in_default>
208
+ <show_in_website>1</show_in_website>
209
+ <show_in_store>1</show_in_store>
210
+ </payment_action>
211
+ <settle_due_date>
212
+ <config_path>payment/securetrading_stpp_redirect/settle_due_date</config_path>
213
+ <frontend_type>select</frontend_type>
214
+ <source_model>securetrading_stpp/source_settleduedate</source_model>
215
+ <sort_order>11</sort_order>
216
+ <show_in_default>1</show_in_default>
217
+ <show_in_website>1</show_in_website>
218
+ <show_in_store>1</show_in_store>
219
+ </settle_due_date>
220
+ <settle_status>
221
+ <config_path>payment/securetrading_stpp_redirect/settle_status</config_path>
222
+ <frontend_type>select</frontend_type>
223
+ <source_model>securetrading_stpp/source_settlestatus</source_model>
224
+ <sort_order>12</sort_order>
225
+ <show_in_default>1</show_in_default>
226
+ <show_in_website>1</show_in_website>
227
+ <show_in_store>1</show_in_store>
228
+ </settle_status>
229
+ </fields>
230
+ </securetrading_stpp_redirect_config_gateway>
231
+ <securetrading_stpp_redirect_config_connections>
232
+ <label>Secure Trading Payment Pages - Connection Configuration</label>
233
+ <comment>Aggregates the configuration for all connection methods provided by this module.</comment>
234
+ <frontend_model>securetrading_stpp/adminhtml_system_config_fieldset_fields</frontend_model>
235
+ <expanded>0</expanded>
236
+ <sort_order>2</sort_order>
237
+ <show_in_default>1</show_in_default>
238
+ <show_in_website>1</show_in_website>
239
+ <show_in_store>1</show_in_store>
240
+ <fields>
241
+ <connection>
242
+ <config_path>payment/securetrading_stpp_redirect/connection</config_path>
243
+ <frontend_type>select</frontend_type>
244
+ <source_model>securetrading_stpp/source_connection</source_model>
245
+ <sort_order>0</sort_order>
246
+ <show_in_default>1</show_in_default>
247
+ <show_in_website>1</show_in_website>
248
+ <show_in_store>1</show_in_store>
249
+ </connection>
250
+ </fields>
251
+ </securetrading_stpp_redirect_config_connections>
252
+ <securetrading_stpp_redirect_stapi_group type="group" translate="label comment">
253
+ <label>Connection Configuration - ST API Settings</label>
254
+ <comment>Contains ST API connection configuration.</comment>
255
+ <frontend_model>securetrading_stpp/adminhtml_system_config_fieldset_fields</frontend_model>
256
+ <show_in_default>1</show_in_default>
257
+ <show_in_website>1</show_in_website>
258
+ <show_in_store>1</show_in_store>
259
+ <sort_order>3</sort_order>
260
+ <fields>
261
+ <stapi_alias>
262
+ <config_path>payment/securetrading_stpp_redirect/stapi_alias</config_path>
263
+ <frontend_type>text</frontend_type>
264
+ <backend_model>adminhtml/system_config_backend_encrypted</backend_model>
265
+ <sort_order>0</sort_order>
266
+ <show_in_default>1</show_in_default>
267
+ <show_in_website>1</show_in_website>
268
+ <show_in_store>1</show_in_store>
269
+ </stapi_alias>
270
+ <stapi_host>
271
+ <config_path>payment/securetrading_stpp_redirect/stapi_host</config_path>
272
+ <frontend_type>text</frontend_type>
273
+ <backend_model>adminhtml/system_config_backend_encrypted</backend_model>
274
+ <sort_order>1</sort_order>
275
+ <show_in_default>1</show_in_default>
276
+ <show_in_website>1</show_in_website>
277
+ <show_in_store>1</show_in_store>
278
+ </stapi_host>
279
+ <stapi_port>
280
+ <config_path>payment/securetrading_stpp_redirect/stapi_port</config_path>
281
+ <frontend_type>text</frontend_type>
282
+ <backend_model>adminhtml/system_config_backend_encrypted</backend_model>
283
+ <sort_order>2</sort_order>
284
+ <show_in_default>1</show_in_default>
285
+ <show_in_website>1</show_in_website>
286
+ <show_in_store>1</show_in_store>
287
+ </stapi_port>
288
+ </fields>
289
+ </securetrading_stpp_redirect_stapi_group>
290
+ <securetrading_stpp_redirect_webservices_group type="group" translate="label comment">
291
+ <label>Connection Configuration - Web Services Connections</label>
292
+ <comment>Contains Web Services connection configuration.</comment>
293
+ <frontend_model>securetrading_stpp/adminhtml_system_config_fieldset_fields</frontend_model>
294
+ <show_in_default>1</show_in_default>
295
+ <show_in_website>1</show_in_website>
296
+ <show_in_store>1</show_in_store>
297
+ <sort_order>4</sort_order>
298
+ <fields>
299
+ <ws_alias>
300
+ <config_path>payment/securetrading_stpp_redirect/ws_alias</config_path>
301
+ <frontend_type>text</frontend_type>
302
+ <backend_model>adminhtml/system_config_backend_encrypted</backend_model>
303
+ <sort_order>0</sort_order>
304
+ <show_in_default>1</show_in_default>
305
+ <show_in_website>1</show_in_website>
306
+ <show_in_store>1</show_in_store>
307
+ </ws_alias>
308
+ <ws_username>
309
+ <config_path>payment/securetrading_stpp_redirect/ws_username</config_path>
310
+ <frontend_type>text</frontend_type>
311
+ <backend_model>adminhtml/system_config_backend_encrypted</backend_model>
312
+ <sort_order>1</sort_order>
313
+ <show_in_default>1</show_in_default>
314
+ <show_in_website>1</show_in_website>
315
+ <show_in_store>1</show_in_store>
316
+ </ws_username>
317
+ <ws_password>
318
+ <config_path>payment/securetrading_stpp_redirect/ws_password</config_path>
319
+ <frontend_type>text</frontend_type>
320
+ <backend_model>adminhtml/system_config_backend_encrypted</backend_model>
321
+ <sort_order>2</sort_order>
322
+ <show_in_default>1</show_in_default>
323
+ <show_in_website>1</show_in_website>
324
+ <show_in_store>1</show_in_store>
325
+ </ws_password>
326
+ <ws_verify_ca>
327
+ <config_path>payment/securetrading_stpp_redirect/ws_verify_ca</config_path>
328
+ <frontend_type>select</frontend_type>
329
+ <source_model>adminhtml/system_config_source_yesno</source_model>
330
+ <sort_order>3</sort_order>
331
+ <show_in_default>1</show_in_default>
332
+ <show_in_website>1</show_in_website>
333
+ <show_in_store>1</show_in_store>
334
+ </ws_verify_ca>
335
+ <ws_ca_file>
336
+ <config_path>payment/securetrading_stpp_redirect/ws_ca_file</config_path>
337
+ <frontend_type>text</frontend_type>
338
+ <sort_order>4</sort_order>
339
+ <show_in_default>1</show_in_default>
340
+ <show_in_website>1</show_in_website>
341
+ <show_in_store>1</show_in_store>
342
+ </ws_ca_file>
343
+ </fields>
344
+ </securetrading_stpp_redirect_webservices_group>
345
+ <securetrading_stpp_redirect_transactionsearch type="group" translate="label comment">
346
+ <label>Secure Trading Payment Pages - Transaction Search Configuration</label>
347
+ <comment>Configure the way in which CSV files are downloaded from MyST by our payment modules.</comment>
348
+ <frontend_model>securetrading_stpp/adminhtml_system_config_fieldset_fields</frontend_model>
349
+ <show_in_default>1</show_in_default>
350
+ <show_in_website>1</show_in_website>
351
+ <show_in_store>1</show_in_store>
352
+ <sort_order>5</sort_order>
353
+ <fields>
354
+ <transactionsearch_username>
355
+ <config_path>payment/securetrading_stpp_redirect/transactionsearch_username</config_path>
356
+ <frontend_type>text</frontend_type>
357
+ <backend_model>adminhtml/system_config_backend_encrypted</backend_model>
358
+ <sort_order>0</sort_order>
359
+ <show_in_default>1</show_in_default>
360
+ <show_in_website>1</show_in_website>
361
+ <show_in_store>1</show_in_store>
362
+ </transactionsearch_username>
363
+ <transactionsearch_password>
364
+ <config_path>payment/securetrading_stpp_redirect/transactionsearch_password</config_path>
365
+ <frontend_type>text</frontend_type>
366
+ <backend_model>adminhtml/system_config_backend_encrypted</backend_model>
367
+ <sort_order>1</sort_order>
368
+ <show_in_default>1</show_in_default>
369
+ <show_in_website>1</show_in_website>
370
+ <show_in_store>1</show_in_store>
371
+ </transactionsearch_password>
372
+ <transactionsearch_verify_ca>
373
+ <config_path>payment/securetrading_stpp_redirect/transactionsearch_verify_ca</config_path>
374
+ <frontend_type>select</frontend_type>
375
+ <source_model>adminhtml/system_config_source_yesno</source_model>
376
+ <sort_order>2</sort_order>
377
+ <show_in_default>1</show_in_default>
378
+ <show_in_website>1</show_in_website>
379
+ <show_in_store>1</show_in_store>
380
+ </transactionsearch_verify_ca>
381
+ <transactionsearch_ca_file>
382
+ <config_path>payment/securetrading_stpp_redirect/transactionsearch_ca_file</config_path>
383
+ <frontend_type>text</frontend_type>
384
+ <sort_order>3</sort_order>
385
+ <show_in_default>1</show_in_default>
386
+ <show_in_website>1</show_in_website>
387
+ <show_in_store>1</show_in_store>
388
+ </transactionsearch_ca_file>
389
+ </fields>
390
+ </securetrading_stpp_redirect_transactionsearch>
391
+
392
+ <securetrading_stpp_direct_config_basic type="group" translate="label comment" module="securetrading_stpp">
393
+ <label>Secure Trading API - Basic Configuration</label>
394
+ <comment>Affects how Magento works with the API.</comment>
395
+ <frontend_model>securetrading_stpp/adminhtml_system_config_fieldset_fields</frontend_model>
396
+ <expanded>0</expanded>
397
+ <sort_order>6</sort_order>
398
+ <show_in_default>1</show_in_default>
399
+ <show_in_website>1</show_in_website>
400
+ <show_in_store>1</show_in_store>
401
+ <fields>
402
+ <active>
403
+ <config_path>payment/securetrading_stpp_direct/active</config_path>
404
+ <frontend_type>select</frontend_type>
405
+ <source_model>adminhtml/system_config_source_yesno</source_model>
406
+ <sort_order>0</sort_order>
407
+ <show_in_default>1</show_in_default>
408
+ <show_in_website>1</show_in_website>
409
+ <show_in_store>1</show_in_store>
410
+ </active>
411
+ <title>
412
+ <config_path>payment/securetrading_stpp_direct/title</config_path>
413
+ <frontend_type>text</frontend_type>
414
+ <sort_order>1</sort_order>
415
+ <show_in_default>1</show_in_default>
416
+ <show_in_website>1</show_in_website>
417
+ <show_in_store>1</show_in_store>
418
+ </title>
419
+ <description>
420
+ <config_path>payment/securetrading_stpp_direct/description</config_path>
421
+ <frontend_type>textarea</frontend_type>
422
+ <sort_order>2</sort_order>
423
+ <show_in_default>1</show_in_default>
424
+ <show_in_website>1</show_in_website>
425
+ <show_in_store>1</show_in_store>
426
+ </description>
427
+ <allowspecific>
428
+ <config_path>payment/securetrading_stpp_direct/allowspecific</config_path>
429
+ <frontend_type>allowspecific</frontend_type>
430
+ <sort_order>3</sort_order>
431
+ <source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
432
+ <show_in_default>1</show_in_default>
433
+ <show_in_website>1</show_in_website>
434
+ <show_in_store>1</show_in_store>
435
+ </allowspecific>
436
+ <specificcountry>
437
+ <config_path>payment/securetrading_stpp_direct/specificcountry</config_path>
438
+ <frontend_type>multiselect</frontend_type>
439
+ <sort_order>4</sort_order>
440
+ <source_model>adminhtml/system_config_source_country</source_model>
441
+ <show_in_default>1</show_in_default>
442
+ <show_in_website>1</show_in_website>
443
+ <show_in_store>1</show_in_store>
444
+ </specificcountry>
445
+ <api_use_iframe>
446
+ <config_path>payment/securetrading_stpp_direct/api_use_iframe</config_path>
447
+ <frontend_type>select</frontend_type>
448
+ <source_model>adminhtml/system_config_source_yesno</source_model>
449
+ <sort_order>5</sort_order>
450
+ <show_in_default>1</show_in_default>
451
+ <show_in_website>1</show_in_website>
452
+ <show_in_store>1</show_in_store>
453
+ </api_use_iframe>
454
+ <api_iframe_height>
455
+ <config_path>payment/securetrading_stpp_direct/api_iframe_height</config_path>
456
+ <frontend_type>text</frontend_type>
457
+ <sort_order>6</sort_order>
458
+ <show_in_default>1</show_in_default>
459
+ <show_in_website>1</show_in_website>
460
+ <show_in_store>1</show_in_store>
461
+ </api_iframe_height>
462
+ <api_iframe_width>
463
+ <config_path>payment/securetrading_stpp_direct/api_iframe_width</config_path>
464
+ <frontend_type>text</frontend_type>
465
+ <sort_order>7</sort_order>
466
+ <show_in_default>1</show_in_default>
467
+ <show_in_website>1</show_in_website>
468
+ <show_in_store>1</show_in_store>
469
+ </api_iframe_width>
470
+ </fields>
471
+ </securetrading_stpp_direct_config_basic>
472
+
473
+ <securetrading_stpp_direct_config_gateway type="group" translate="label comment" module="securetrading_stpp">
474
+ <label>Secure Trading API - Gateway Configuration</label>
475
+ <comment>Affect how requests to and responses from the Secure Trading gateway are processed.</comment>
476
+ <frontend_model>securetrading_stpp/adminhtml_system_config_fieldset_fields</frontend_model>
477
+ <expanded>0</expanded>
478
+ <sort_order>7</sort_order>
479
+ <show_in_default>1</show_in_default>
480
+ <show_in_website>1</show_in_website>
481
+ <show_in_store>1</show_in_store>
482
+ <fields>
483
+ <site_reference>
484
+ <config_path>payment/securetrading_stpp_direct/site_reference</config_path>
485
+ <frontend_type>text</frontend_type>
486
+ <sort_order>0</sort_order>
487
+ <show_in_default>1</show_in_default>
488
+ <show_in_website>1</show_in_website>
489
+ <show_in_store>1</show_in_store>
490
+ </site_reference>
491
+
492
+ <use_3d_secure>
493
+ <config_path>payment/securetrading_stpp_direct/use_3d_secure</config_path>
494
+ <frontend_type>select</frontend_type>
495
+ <source_model>adminhtml/system_config_source_yesno</source_model>
496
+ <sort_order>1</sort_order>
497
+ <show_in_default>1</show_in_default>
498
+ <show_in_website>1</show_in_website>
499
+ <show_in_store>1</show_in_store>
500
+ </use_3d_secure>
501
+ <use_risk_decision>
502
+ <config_path>payment/securetrading_stpp_direct/use_risk_decision</config_path>
503
+ <frontend_type>select</frontend_type>
504
+ <source_model>adminhtml/system_config_source_yesno</source_model>
505
+ <sort_order>2</sort_order>
506
+ <show_in_default>1</show_in_default>
507
+ <show_in_website>1</show_in_website>
508
+ <show_in_store>1</show_in_store>
509
+ </use_risk_decision>
510
+ <!--
511
+ <use_card_store>
512
+ <config_path>payment/securetrading_stpp_direct/use_card_store</config_path>
513
+ <frontend_type>select</frontend_type>
514
+ <source_model>adminhtml/system_config_source_yesno</source_model>
515
+ <sort_order>3</sort_order>
516
+ <show_in_default>1</show_in_default>
517
+ <show_in_website>1</show_in_website>
518
+ <show_in_store>1</show_in_store>
519
+ </use_card_store>
520
+ <use_auto_card_store>
521
+ <config_path>payment/securetrading_stpp_direct/use_auto_card_store</config_path>
522
+ <frontend_type>select</frontend_type>
523
+ <source_model>adminhtml/system_config_source_yesno</source_model>
524
+ <sort_order>4</sort_order>
525
+ <show_in_default>1</show_in_default>
526
+ <show_in_website>1</show_in_website>
527
+ <show_in_store>1</show_in_store>
528
+ </use_auto_card_store>
529
+ <delay_risk_decision>
530
+ <config_path>payment/securetrading_stpp_direct/delay_risk_decision</config_path>
531
+ <frontend_type>select</frontend_type>
532
+ <source_model>adminhtml/system_config_source_yesno</source_model>
533
+ <sort_order>5</sort_order>
534
+ <show_in_default>1</show_in_default>
535
+ <show_in_website>1</show_in_website>
536
+ <show_in_store>1</show_in_store>
537
+ </delay_risk_decision>
538
+ -->
539
+ <accepted_cards>
540
+ <config_path>payment/securetrading_stpp_direct/accepted_cards</config_path>
541
+ <frontend_type>multiselect</frontend_type>
542
+ <backend_model>securetrading_stpp/adminhtml_system_config_backend_multiselect</backend_model>
543
+ <source_model>securetrading_stpp/source_cardtypes</source_model>
544
+ <sort_order>6</sort_order>
545
+ <show_in_default>1</show_in_default>
546
+ <show_in_website>1</show_in_website>
547
+ <show_in_store>1</show_in_store>
548
+ </accepted_cards>
549
+ <payment_action>
550
+ <config_path>payment/securetrading_stpp_direct/payment_action</config_path>
551
+ <frontend_type>select</frontend_type>
552
+ <source_model>securetrading_stpp/source_paymentaction</source_model>
553
+ <sort_order>7</sort_order>
554
+ <show_in_default>1</show_in_default>
555
+ <show_in_website>1</show_in_website>
556
+ <show_in_store>1</show_in_store>
557
+ </payment_action>
558
+ <settle_due_date>
559
+ <config_path>payment/securetrading_stpp_direct/settle_due_date</config_path>
560
+ <frontend_type>select</frontend_type>
561
+ <source_model>securetrading_stpp/source_settleduedate</source_model>
562
+ <sort_order>8</sort_order>
563
+ <show_in_default>1</show_in_default>
564
+ <show_in_website>1</show_in_website>
565
+ <show_in_store>1</show_in_store>
566
+ </settle_due_date>
567
+ <settle_status>
568
+ <config_path>payment/securetrading_stpp_direct/settle_status</config_path>
569
+ <frontend_type>select</frontend_type>
570
+ <source_model>securetrading_stpp/source_settlestatus</source_model>
571
+ <sort_order>9</sort_order>
572
+ <show_in_default>1</show_in_default>
573
+ <show_in_website>1</show_in_website>
574
+ <show_in_store>1</show_in_store>
575
+ </settle_status>
576
+ <show_start_date>
577
+ <config_path>payment/securetrading_stpp_direct/show_start_date</config_path>
578
+ <frontend_type>select</frontend_type>
579
+ <source_model>adminhtml/system_config_source_yesno</source_model>
580
+ <sort_order>10</sort_order>
581
+ <show_in_default>1</show_in_default>
582
+ <show_in_website>1</show_in_website>
583
+ <show_in_store>1</show_in_store>
584
+ </show_start_date>
585
+ <show_issue_number>
586
+ <config_path>payment/securetrading_stpp_direct/show_issue_number</config_path>
587
+ <frontend_type>select</frontend_type>
588
+ <source_model>adminhtml/system_config_source_yesno</source_model>
589
+ <sort_order>11</sort_order>
590
+ <show_in_default>1</show_in_default>
591
+ <show_in_website>1</show_in_website>
592
+ <show_in_store>1</show_in_store>
593
+ </show_issue_number>
594
+ </fields>
595
+ </securetrading_stpp_direct_config_gateway>
596
+ <securetrading_stpp_direct_config_connections>
597
+ <label>Secure Trading API - Connection Configuration</label>
598
+ <comment>Aggregates the configuration for all connection methods provided by this module.</comment>
599
+ <frontend_model>securetrading_stpp/adminhtml_system_config_fieldset_fields</frontend_model>
600
+ <expanded>0</expanded>
601
+ <sort_order>8</sort_order>
602
+ <show_in_default>1</show_in_default>
603
+ <show_in_website>1</show_in_website>
604
+ <show_in_store>1</show_in_store>
605
+ <fields>
606
+ <connection>
607
+ <config_path>payment/securetrading_stpp_direct/connection</config_path>
608
+ <frontend_type>select</frontend_type>
609
+ <source_model>securetrading_stpp/source_connection</source_model>
610
+ <sort_order>0</sort_order>
611
+ <show_in_default>1</show_in_default>
612
+ <show_in_website>1</show_in_website>
613
+ <show_in_store>1</show_in_store>
614
+ </connection>
615
+ </fields>
616
+ </securetrading_stpp_direct_config_connections>
617
+ <securetrading_stpp_direct_stapi_group type="group" translate="label comment">
618
+ <label>Secure Trading API - Connection Configuration - ST API Settings</label>
619
+ <comment>Contains ST API connection configuration.</comment>
620
+ <frontend_model>securetrading_stpp/adminhtml_system_config_fieldset_fields</frontend_model>
621
+ <show_in_default>1</show_in_default>
622
+ <show_in_website>1</show_in_website>
623
+ <show_in_store>1</show_in_store>
624
+ <sort_order>9</sort_order>
625
+ <fields>
626
+ <stapi_alias>
627
+ <config_path>payment/securetrading_stpp_direct/stapi_alias</config_path>
628
+ <frontend_type>text</frontend_type>
629
+ <backend_model>adminhtml/system_config_backend_encrypted</backend_model>
630
+ <sort_order>0</sort_order>
631
+ <show_in_default>1</show_in_default>
632
+ <show_in_website>1</show_in_website>
633
+ <show_in_store>1</show_in_store>
634
+ </stapi_alias>
635
+ <stapi_host>
636
+ <config_path>payment/securetrading_stpp_direct/stapi_host</config_path>
637
+ <frontend_type>text</frontend_type>
638
+ <backend_model>adminhtml/system_config_backend_encrypted</backend_model>
639
+ <sort_order>1</sort_order>
640
+ <show_in_default>1</show_in_default>
641
+ <show_in_website>1</show_in_website>
642
+ <show_in_store>1</show_in_store>
643
+ </stapi_host>
644
+ <stapi_port>
645
+ <config_path>payment/securetrading_stpp_direct/stapi_port</config_path>
646
+ <frontend_type>text</frontend_type>
647
+ <backend_model>adminhtml/system_config_backend_encrypted</backend_model>
648
+ <sort_order>2</sort_order>
649
+ <show_in_default>1</show_in_default>
650
+ <show_in_website>1</show_in_website>
651
+ <show_in_store>1</show_in_store>
652
+ </stapi_port>
653
+ </fields>
654
+ </securetrading_stpp_direct_stapi_group>
655
+ <securetrading_stpp_direct_webservices_group type="group" translate="label comment">
656
+ <label>Secure Trading API - Connection Configuration - Web Services Connections</label>
657
+ <comment>Contains Web Services connection configuration.</comment>
658
+ <frontend_model>securetrading_stpp/adminhtml_system_config_fieldset_fields</frontend_model>
659
+ <show_in_default>1</show_in_default>
660
+ <show_in_website>1</show_in_website>
661
+ <show_in_store>1</show_in_store>
662
+ <sort_order>10</sort_order>
663
+ <fields>
664
+ <ws_alias>
665
+ <config_path>payment/securetrading_stpp_direct/ws_alias</config_path>
666
+ <frontend_type>text</frontend_type>
667
+ <backend_model>adminhtml/system_config_backend_encrypted</backend_model>
668
+ <sort_order>0</sort_order>
669
+ <show_in_default>1</show_in_default>
670
+ <show_in_website>1</show_in_website>
671
+ <show_in_store>1</show_in_store>
672
+ </ws_alias>
673
+ <ws_username>
674
+ <config_path>payment/securetrading_stpp_direct/ws_username</config_path>
675
+ <frontend_type>text</frontend_type>
676
+ <backend_model>adminhtml/system_config_backend_encrypted</backend_model>
677
+ <sort_order>1</sort_order>
678
+ <show_in_default>1</show_in_default>
679
+ <show_in_website>1</show_in_website>
680
+ <show_in_store>1</show_in_store>
681
+ </ws_username>
682
+ <ws_password>
683
+ <config_path>payment/securetrading_stpp_direct/ws_password</config_path>
684
+ <frontend_type>text</frontend_type>
685
+ <backend_model>adminhtml/system_config_backend_encrypted</backend_model>
686
+ <sort_order>2</sort_order>
687
+ <show_in_default>1</show_in_default>
688
+ <show_in_website>1</show_in_website>
689
+ <show_in_store>1</show_in_store>
690
+ </ws_password>
691
+ <ws_verify_ca>
692
+ <config_path>payment/securetrading_stpp_direct/ws_verify_ca</config_path>
693
+ <frontend_type>select</frontend_type>
694
+ <source_model>adminhtml/system_config_source_yesno</source_model>
695
+ <sort_order>3</sort_order>
696
+ <show_in_default>1</show_in_default>
697
+ <show_in_website>1</show_in_website>
698
+ <show_in_store>1</show_in_store>
699
+ </ws_verify_ca>
700
+ <ws_ca_file>
701
+ <config_path>payment/securetrading_stpp_direct/ws_ca_file</config_path>
702
+ <frontend_type>text</frontend_type>
703
+ <sort_order>4</sort_order>
704
+ <show_in_default>1</show_in_default>
705
+ <show_in_website>1</show_in_website>
706
+ <show_in_store>1</show_in_store>
707
+ </ws_ca_file>
708
+ </fields>
709
+ </securetrading_stpp_direct_webservices_group>
710
+ <securetrading_stpp_direct_transactionsearch type="group" translate="label comment">
711
+ <label>Secure Trading API - Transaction Search Configuration</label>
712
+ <comment>Configure the way in which CSV files are downloaded from MyST by our payment modules.</comment>
713
+ <frontend_model>securetrading_stpp/adminhtml_system_config_fieldset_fields</frontend_model>
714
+ <show_in_default>1</show_in_default>
715
+ <show_in_website>1</show_in_website>
716
+ <show_in_store>1</show_in_store>
717
+ <sort_order>11</sort_order>
718
+ <fields>
719
+ <transactionsearch_username>
720
+ <config_path>payment/securetrading_stpp_direct/transactionsearch_username</config_path>
721
+ <frontend_type>text</frontend_type>
722
+ <backend_model>adminhtml/system_config_backend_encrypted</backend_model>
723
+ <sort_order>0</sort_order>
724
+ <show_in_default>1</show_in_default>
725
+ <show_in_website>1</show_in_website>
726
+ <show_in_store>1</show_in_store>
727
+ </transactionsearch_username>
728
+ <transactionsearch_password>
729
+ <config_path>payment/securetrading_stpp_direct/transactionsearch_password</config_path>
730
+ <frontend_type>text</frontend_type>
731
+ <backend_model>adminhtml/system_config_backend_encrypted</backend_model>
732
+ <sort_order>1</sort_order>
733
+ <show_in_default>1</show_in_default>
734
+ <show_in_website>1</show_in_website>
735
+ <show_in_store>1</show_in_store>
736
+ </transactionsearch_password>
737
+ <transactionsearch_verify_ca>
738
+ <config_path>payment/securetrading_stpp_direct/transactionsearch_verify_ca</config_path>
739
+ <frontend_type>select</frontend_type>
740
+ <source_model>adminhtml/system_config_source_yesno</source_model>
741
+ <sort_order>2</sort_order>
742
+ <show_in_default>1</show_in_default>
743
+ <show_in_website>1</show_in_website>
744
+ <show_in_store>1</show_in_store>
745
+ </transactionsearch_verify_ca>
746
+ <transactionsearch_ca_file>
747
+ <config_path>payment/securetrading_stpp_direct/transactionsearch_ca_file</config_path>
748
+ <frontend_type>text</frontend_type>
749
+ <sort_order>3</sort_order>
750
+ <show_in_default>1</show_in_default>
751
+ <show_in_website>1</show_in_website>
752
+ <show_in_store>1</show_in_store>
753
+ </transactionsearch_ca_file>
754
+ </fields>
755
+ </securetrading_stpp_direct_transactionsearch>
756
+ </groups>
757
+ </securetrading_stpp>
758
  </sections>
759
+
760
+ <securetrading_stpp_sections>
761
+ <payment>
762
+ <groups>
763
+ <securetrading_stpp translate="label comment" module="securetrading_stpp">
764
+ <label>Secure Trading STPP</label>
765
+ <comment>Please configure the interface you wish to use.</comment>
766
+ <frontend_class>complex</frontend_class>
767
+ <frontend_model>securetrading_stpp/adminhtml_system_config_group</frontend_model>
768
+ <expanded>1</expanded>
769
+ <class>securetrading-section</class>
770
+ <header_css>securetrading-header</header_css>
771
+ <sort_order>101</sort_order>
772
+ <show_in_default>1</show_in_default>
773
+ <show_in_website>1</show_in_website>
774
+ <show_in_store>1</show_in_store>
775
+ <fields>
776
+ <securetrading_stpp_redirect type="group" translate="label comment" module="securetrading_stpp">
777
+ <label>Secure Trading Payment Pages</label>
778
+ <comment>Redirects your customers to Secure Trading's secure payment servers.<![CDATA[<BR />]]>Your store does not have to be PCI compliant to use this payment method.</comment>
779
+ <frontend_model>securetrading_stpp/adminhtml_system_config_fieldset_fields</frontend_model>
780
+ <show_in_default>1</show_in_default>
781
+ <show_in_website>1</show_in_website>
782
+ <show_in_store>1</show_in_store>
783
+ <image_logo>st_logo_strapline_100_32.png</image_logo>
784
+ <activity_path>payment/securetrading_stpp_redirect/active</activity_path>
785
+ <fields>
786
+ <securetrading_stpp_redirect_config_basic type="group" translate="label comment" module="securetrading_stpp">
787
+ <label>Basic Configuration</label>
788
+ </securetrading_stpp_redirect_config_basic>
789
+ <securetrading_stpp_redirect_config_gateway type="group" translate="label comment" module="securetrading_stpp">
790
+ <label>Gateway Configuration</label>
791
+ </securetrading_stpp_redirect_config_gateway>
792
+ <securetrading_stpp_redirect_config_connections type="group" translate="label comment" module="securetrading_stpp">
793
+ <label>Connection Configuration</label>
794
+ <fields>
795
+ <securetrading_stpp_redirect_stapi_group type="group" translate="label comment">
796
+ <label>ST API Configuration</label>
797
+ </securetrading_stpp_redirect_stapi_group>
798
+ <securetrading_stpp_redirect_webservices_group type="group" translate="label comment">
799
+ <label>Web Services Configuration</label>
800
+ </securetrading_stpp_redirect_webservices_group>
801
+ </fields>
802
+ </securetrading_stpp_redirect_config_connections>
803
+ <securetrading_stpp_redirect_transactionsearch type="group" translate="label comment">
804
+ <label>Transaction Search Configuration</label>
805
+ </securetrading_stpp_redirect_transactionsearch>
806
+ </fields>
807
+ </securetrading_stpp_redirect>
808
+ <securetrading_stpp_direct type="group" translate="label comment" module="securetrading_stpp">
809
+ <label>Secure Trading API</label>
810
+ <comment>Allows customers to make debit/credit card payments without leaving your store.<![CDATA[<BR />]]>Your website must be PCI compliant to use this payment method.</comment>
811
+ <frontend_model>securetrading_stpp/adminhtml_system_config_fieldset_fields</frontend_model>
812
+ <expanded>0</expanded>
813
+ <sort_order>1</sort_order>
814
+ <show_in_default>1</show_in_default>
815
+ <show_in_website>1</show_in_website>
816
+ <show_in_store>1</show_in_store>
817
+ <image_logo>st_logo_strapline_100_32.png</image_logo>
818
+ <activity_path>payment/securetrading_stpp_direct/active</activity_path>
819
+ <fields>
820
+ <securetrading_stpp_direct_config_basic type="group" translate="label comment" module="securetrading_stpp">
821
+ <label>Basic Configuration</label>
822
+ </securetrading_stpp_direct_config_basic>
823
+ <securetrading_stpp_direct_config_gateway type="group" translate="label comment" module="securetrading_stpp">
824
+ <label>Gateway Configuration</label>
825
+ </securetrading_stpp_direct_config_gateway>
826
+ <securetrading_stpp_direct_config_connections type="group" translate="label comment" module="securetrading_stpp">
827
+ <label>Connection Configuration</label>
828
+ <fields>
829
+ <securetrading_stpp_direct_stapi_group type="group" translate="label comment">
830
+ <label>ST API Configuration</label>
831
+ </securetrading_stpp_direct_stapi_group>
832
+ <securetrading_stpp_direct_webservices_group type="group" translate="label comment">
833
+ <label>Web Services Configuration</label>
834
+ </securetrading_stpp_direct_webservices_group>
835
+ </fields>
836
+ </securetrading_stpp_direct_config_connections>
837
+ <securetrading_stpp_direct_transactionsearch type="group" translate="label comment">
838
+ <label>Transaction Search Configuration</label>
839
+ </securetrading_stpp_direct_transactionsearch>
840
+ </fields>
841
+ </securetrading_stpp_direct>
842
+ </fields>
843
+ </securetrading_stpp>
844
+ </groups>
845
+ </payment>
846
+ </securetrading_stpp_sections>
847
  </config>
app/code/local/Securetrading/Stpp/lib/code/core/Stpp/Actions/Abstract.php CHANGED
@@ -1,67 +1,6 @@
1
  <?php
2
 
3
  abstract class Stpp_Actions_Abstract implements Stpp_Actions_BaseInterface {
4
- protected $_result;
5
-
6
- protected $_calculationObjects = array();
7
-
8
- public function __construct() {
9
- $this->_initCalculationObjects();
10
- }
11
-
12
- protected function _getResult() {
13
- if ($this->_result === null) {
14
- throw new Stpp_Exception('The result object is null.');
15
- }
16
- return $this->_result;
17
- }
18
-
19
- public function setResult(Stpp_Api_ResultInterface $result) {
20
- $this->_result = $result;
21
- return $this;
22
- }
23
-
24
- public function prepareMessages() {
25
- $result = $this->_getResult();
26
- $responses = $result->getContext()->getResponses();
27
-
28
- foreach($responses as $response) {
29
- $errorMessages = array();
30
- $successMessages = array();
31
-
32
- if ($response->getMessageIsError()) {
33
- $errorMessages[] = $response->getMessage();
34
- }
35
- else {
36
- $successMessages[] = $response->getMessage();
37
- }
38
- }
39
-
40
- $result->setErrorMessage(implode(' - ', $errorMessages));
41
- $result->setSuccessMessage(implode(' - ', $successMessages));
42
- }
43
-
44
- protected function _initCalculationObjects() {
45
- $this->_calculationObjects = array(
46
- 'stpp_actions_abstract_cardstore_with_noncardstore' => new Stpp_Api_Process_Calculation_CardstoreNoncardstoreCombined(),
47
- 'stpp_actions_abstract_riskdec_with_nonriskdec' => new Stpp_Api_Process_Calculation_RiskdecNonriskdecCombined(),
48
- 'stpp_actions_abstract_tu_refund_combined' => new Stpp_Api_Process_Calculation_TuRefundCombined(),
49
- 'stpp_actions_abstract_default' => new Stpp_Api_Process_Calculation_Default(),
50
- );
51
- }
52
-
53
- public function addCalculationObject($code, Stpp_Api_Process_Calculation_BaseInterface $calculationObject) {
54
- $this->_calculationObjects[$code] = $calculationObject;
55
- }
56
-
57
- public function removeCalculationObject($code) {
58
- unset($this->_calculationObjects);
59
- }
60
-
61
- public function getCalculationObjects() {
62
- return $this->_calculationObjects;
63
- }
64
-
65
  public function processError(Stpp_Data_Response $response) {
66
  return false;
67
  }
1
  <?php
2
 
3
  abstract class Stpp_Actions_Abstract implements Stpp_Actions_BaseInterface {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
  public function processError(Stpp_Data_Response $response) {
5
  return false;
6
  }
app/code/local/Securetrading/Stpp/lib/code/core/Stpp/Api/Base.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
 
3
  class Stpp_Api_Base extends Stpp_Component_Abstract implements Stpp_Api_BaseInterface {
4
- const INTERFACE_NAME = 'SecureTrading API';
5
 
6
  public static function getName() {
7
  return static::INTERFACE_NAME;
1
  <?php
2
 
3
  class Stpp_Api_Base extends Stpp_Component_Abstract implements Stpp_Api_BaseInterface {
4
+ const INTERFACE_NAME = 'Secure Trading API';
5
 
6
  public static function getName() {
7
  return static::INTERFACE_NAME;
app/code/local/Securetrading/Stpp/lib/code/core/Stpp/Api/Connection/Webservices.php CHANGED
@@ -1,171 +1,40 @@
1
  <?php
2
 
3
- class Stpp_Api_Connection_Webservices extends Stpp_Component_Abstract implements Stpp_Api_Connection_BaseInterface {
4
- const CONNECTION_KEY = 'Stpp_Connection_Webservices';
5
-
6
- const CONNECTION_NAME = 'Stpp Web Services';
7
-
8
- protected $_ch;
9
 
10
- protected $_actionUrl = 'https://webservices.securetrading.net:443/xml/';
11
-
12
- protected $_username = '';
13
-
14
- protected $_password = '';
15
-
16
- protected $_alias = '';
17
-
18
- protected $_verifySsl = true;
19
-
20
- protected $_caCertFile = '';
21
-
22
- protected $_options = array();
23
-
24
- protected $_connectTimeout = 5;
25
-
26
- protected $_timeout = 60;
27
-
28
- protected $_connectAttempts = 20;
29
-
30
- protected $_connectAttemptsTimeout = 40;
31
-
32
- protected $_sleepUseconds = 1000000;
33
-
34
- public function __construct() {
35
- parent::__construct();
36
- $this->_timeout += $this->_connectTimeout; // Allow 60 seconds to send and receive data and allow time for one connection attempt.
37
- $this->_ch = curl_init();
38
- }
39
-
40
- public static function getKey() {
41
- return static::CONNECTION_KEY;
42
- }
43
-
44
- public static function getName() {
45
- return static::CONNECTION_NAME;
46
- }
47
-
48
- public function setAlias($alias) {
49
- $this->_alias = $alias;
50
- return $this;
51
- }
52
-
53
- public function getAlias() {
54
- return $this->_alias;
55
- }
56
-
57
- public function setUsername($username) {
58
- $this->_username = $username;
59
- return $this;
60
- }
61
-
62
- public function setPassword($password) {
63
- $this->_password = $password;
64
- return $this;
65
- }
66
-
67
- public function setVerifySsl($bool) {
68
- $this->_verifySsl = (bool) $bool;
69
- return $this;
70
- }
71
-
72
- public function setCaCertFile($file) {
73
- $this->_caCertFile = $file;
74
- return $this;
75
- }
76
-
77
- public function setConnectTimeout($connectTimeout) {
78
- $this->_connectTimeout = $connectTimeout;
79
- return $this;
80
- }
81
-
82
- public function setTimeout($connectTimeout) {
83
- $this->_timeout = $connectTimeout;
84
- return $this;
85
- }
86
-
87
- public function setConnectAttempts($connectAttempts) {
88
- $this->_connectAttempts = $connectAttempts;
89
- return $this;
90
- }
91
-
92
- public function setConnectRetries($connectRetries) {
93
- $this->_connectRetries = $connectRetries;
94
- return $this;
95
- }
96
-
97
- public function setSleepUseconds($sleepUseconds) {
98
- $this->_sleepUseconds = $sleepUseconds;
99
- return $this;
100
- }
101
-
102
- public function setOptions(array $options) {
103
- $this->_options = $options;
104
- return $this;
105
- }
106
-
107
- public function setOption($option, $value) {
108
- $this->_options[$option] = $value;
109
- return $this;
110
- }
111
-
112
- public function sendAndReceiveData($requestString) {
113
- $this->_prepareCurl($requestString);
114
- $result = $this->_send();
115
- $this->_checkResult($result);
116
- return $result;
117
- }
118
-
119
- protected function _prepareCurl($postFields) {
120
- curl_setopt($this->_ch, CURLOPT_POST, 1);
121
- curl_setopt($this->_ch, CURLOPT_FAILONERROR, true);
122
- curl_setopt($this->_ch, CURLOPT_FOLLOWLOCATION, true);
123
- curl_setopt($this->_ch, CURLOPT_RETURNTRANSFER, true);
124
- curl_setopt($this->_ch, CURLOPT_URL, $this->_actionUrl);
125
- curl_setopt($this->_ch, CURLOPT_POSTFIELDS, $postFields);
126
- curl_setopt($this->_ch, CURLOPT_SSL_VERIFYPEER, $this->_verifySsl);
127
- curl_setopt($this->_ch, CURLOPT_CONNECTTIMEOUT, $this->_connectTimeout);
128
- curl_setopt($this->_ch, CURLOPT_TIMEOUT, $this->_timeout);
129
- curl_setopt($this->_ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
130
- curl_setopt($this->_ch, CURLOPT_USERPWD, $this->_username . ':' . $this->_password);
131
- curl_setopt($this->_ch, CURLOPT_USERAGENT, '');
132
- curl_setopt($this->_ch, CURLOPT_HTTPHEADER, array('Content-type: text/xml;charset=utf-8', 'Accept: text/xml', 'Connection: close'));
133
-
134
- if (!empty($this->_caCertFile)) {
135
- curl_setopt($this->_ch, CURLOPT_CAINFO, $this->_caCertFile);
136
- }
137
-
138
- curl_setopt_array($this->_ch, $this->_options);
139
- }
140
 
141
- protected function _send() {
142
- $i = 0;
143
- $startTime = time();
144
- $result = null;
145
-
146
- while (true) {
147
- $i++;
148
- $canRetry = false;
149
- $result = curl_exec($this->_ch);
150
-
151
- if (curl_errno($this->_ch) === CURLE_COULDNT_CONNECT) {
152
- $this->getDebugLog()->log(sprintf('Failed to connect to %s on attempt %s of %s. Sleeping for %s second(s).', $this->_actionUrl, $i, $this->_connectAttempts, $this->_sleepUseconds/1000000));
153
- usleep($this->_sleepUseconds);
154
-
155
- $timeElapsed = time() - $startTime;
156
- $canRetry = ($timeElapsed + $this->_connectTimeout + ($this->_sleepUseconds / 100000)) < $this->_connectAttemptsTimeout && $i < $this->_connectAttempts;
157
- }
158
-
159
- if (!$canRetry) {
160
- break;
161
- }
162
- }
163
- return $result;
164
- }
165
-
166
- protected function _checkResult($result) {
167
- if ($result === false) {
168
- throw new Stpp_Exception(sprintf($this->__("cURL Error Code: '%s'. Error Message: '%s'."), curl_errno($this->_ch), curl_error($this->_ch)));
169
- }
170
- }
 
 
171
  }
1
  <?php
2
 
3
+ class Stpp_Api_Connection_Webservices extends Stpp_Http_Base implements Stpp_Api_Connection_BaseInterface {
4
+ const CONNECTION_KEY = 'Stpp_Connection_Webservices';
 
 
 
 
5
 
6
+ const CONNECTION_NAME = 'Stpp Web Services';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7
 
8
+ protected $_url = 'https://webservices.securetrading.net:443/xml/';
9
+
10
+ protected $_alias = '';
11
+
12
+ protected $_httpHeaders = array(
13
+ 'Content-type: text/xml;charset=utf-8',
14
+ 'Accept: text/xml',
15
+ 'Connection: close',
16
+ );
17
+
18
+ protected $_sslRevokedCerts = array();
19
+
20
+ public static function getKey() {
21
+ return static::CONNECTION_KEY;
22
+ }
23
+
24
+ public static function getName() {
25
+ return static::CONNECTION_NAME;
26
+ }
27
+
28
+ public function setAlias($alias) {
29
+ $this->_alias = $alias;
30
+ return $this;
31
+ }
32
+
33
+ public function getAlias() {
34
+ return $this->_alias;
35
+ }
36
+
37
+ public function sendAndReceiveData($requestString) {
38
+ return $this->httpPost($requestString);
39
+ }
40
  }
app/code/local/Securetrading/Stpp/lib/code/core/Stpp/Api/Facade.php CHANGED
@@ -97,53 +97,79 @@ class Stpp_Api_Facade extends Stpp_Facade {
97
  return $stApiConnection;
98
  }
99
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
100
  public function newApiConnectionWebServices() {
101
- $webServicesConnection = new Stpp_Api_Connection_Webservices();
102
-
103
- if ($this->_config->has('connections/web_services/username')) {
104
- $webServicesConnection->setUsername($this->_config->get('connections/web_services/username'));
105
- }
106
-
107
- if ($this->_config->has('connections/web_services/password')) {
108
- $webServicesConnection->setPassword($this->_config->get('connections/web_services/password'));
109
- }
110
-
111
- if ($this->_config->has('connections/web_services/alias')) {
112
- $webServicesConnection->setAlias($this->_config->get('connections/web_services/alias'));
113
- }
114
-
115
- if ($this->_config->has('connections/web_services/connect_timeout')) {
116
- $webServicesConnection->setConnectTimeout($this->_config->get('connections/web_services/connect_timeout'));
117
- }
118
-
119
- if ($this->_config->has('connections/web_services/timeout')) {
120
- $webServicesConnection->setTimeout($this->_config->get('connections/web_services/timeout'));
121
- }
122
-
123
- if ($this->_config->has('connections/web_services/connect_attempts')) {
124
- $webServicesConnection->setConnectAttempts($this->_config->get('connections/web_services/connect_attempts'));
125
- }
126
-
127
- if ($this->_config->has('connections/web_services/connect_retries')) {
128
- $webServicesConnection->setConnectRetries($this->_config->get('connections/web_services/connect_retries'));
129
- }
130
-
131
- if ($this->_config->has('connections/web_services/sleep_useconds')) {
132
- $webServicesConnection->setSleepUseconds($this->_config->get('connections/web_services/sleep_useconds'));
133
- }
134
-
135
- if ($this->_config->has('connections/web_services/verifyssl')) {
136
- $webServicesConnection->setVerifySsl($this->_config->get('connections/web_services/verifyssl'));
137
- }
138
-
139
- if ($this->_config->has('connections/web_services/cacertfile')) {
140
- $webServicesConnection->setCaCertFile($this->_config->get('connections/web_services/cacertfile'));
141
- }
142
-
143
- if ($this->_config->has('connections/web_services/options')) {
144
- $webServicesConnection->setOptions($this->_config->get('connections/web_services/options'));
145
- }
146
- return $webServicesConnection;
147
  }
148
 
149
  public function newApiXmlWriter() {
97
  return $stApiConnection;
98
  }
99
 
100
+ protected function _configureStppHttpBase(Stpp_Http_BaseInterface $object, $key) {
101
+ if ($this->_config->has($key . 'username')) {
102
+ $object->setUsername($this->_config->get($key . 'username'));
103
+ }
104
+
105
+ if ($this->_config->has($key . 'password')) {
106
+ $object->setPassword($this->_config->get($key . 'password'));
107
+ }
108
+
109
+ if ($this->_config->has($key . 'connect_timeout')) {
110
+ $object->setConnectTimeout($this->_config->get($key . 'connect_timeout'));
111
+ }
112
+
113
+ if ($this->_config->has($key . 'timeout')) {
114
+ $object->setTimeout($this->_config->get($key . 'timeout'));
115
+ }
116
+
117
+ if ($this->_config->has($key . 'connect_attempts')) {
118
+ $object->setConnectAttempts($this->_config->get($key . 'connect_attempts'));
119
+ }
120
+
121
+ if ($this->_config->has($key . 'connect_retries')) {
122
+ $object->setConnectRetries($this->_config->get($key . 'connect_retries'));
123
+ }
124
+
125
+ if ($this->_config->has($key . 'sleep_useconds')) {
126
+ $object->setSleepUseconds($this->_config->get($key . 'sleep_useconds'));
127
+ }
128
+
129
+ if ($this->_config->has($key . 'ssl_verify_peer')) {
130
+ $object->setSslVerifyPeer($this->_config->get($key . 'ssl_verify_peer'));
131
+ }
132
+
133
+ if ($this->_config->has($key . 'ssl_verify_host')) {
134
+ $object->setSslVerifyHost($this->_config->get($key . 'ssl_verify_host'));
135
+ }
136
+
137
+ if ($this->_config->has($key . 'ssl_cacertfile')) {
138
+ $object->setSslCaCertFile($this->_config->get($key . 'ssl_cacertfile'));
139
+ }
140
+
141
+ if ($this->_config->has($key . 'ssl_check_revoked_certs')) {
142
+ $object->setSslCheckCertChainForRevokedCerts($this->_config->get($key . 'ssl_check_revoked_certs'));
143
+ }
144
+
145
+ if ($this->_config->has($key . 'ssl_deny_revoked_certs')) {
146
+ $object->setSslDenyRevokedCerts($this->_config->get($key . 'ssl_deny_revoked_certs'));
147
+ }
148
+
149
+ if ($this->_config->has($key . 'curl_options')) {
150
+ $object->setCurlOptions($this->_config->get($key . 'curl_options'));
151
+ }
152
+ return $object;
153
+ }
154
+
155
  public function newApiConnectionWebServices() {
156
+ $webServices = new Stpp_Api_Connection_Webservices();
157
+ $key = 'connections/web_services/';
158
+
159
+ $this->_configureStppHttpBase($webServices, $key);
160
+
161
+ if ($this->_config->has($key . 'alias')) {
162
+ $webServices->setAlias($this->_config->get($key . 'alias'));
163
+ }
164
+
165
+ return $webServices;
166
+ }
167
+
168
+ public function newTransactionSearch() {
169
+ $transactionSearch = new Stpp_Transactionsearch_Base();
170
+ $key = 'transactionsearch/';
171
+ $this->_configureStppHttpBase($transactionSearch, $key);
172
+ return $transactionSearch;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
173
  }
174
 
175
  public function newApiXmlWriter() {
app/code/local/Securetrading/Stpp/lib/code/core/Stpp/Api/Helper.php CHANGED
@@ -73,8 +73,8 @@ class Stpp_Api_Helper extends Stpp_Component_Abstract implements Stpp_Api_Helper
73
 
74
  return $this->generateRequests($originalRequest, $requestTypes);
75
  }
76
-
77
- public function prepare3dAuth(Stpp_Data_Request $request) {
78
  if (!isset($_POST['MD'])) {
79
  throw new Stpp_Exception($this->__('The MD has not been set.'));
80
  }
@@ -82,14 +82,22 @@ class Stpp_Api_Helper extends Stpp_Component_Abstract implements Stpp_Api_Helper
82
  if (!isset($_POST['PaRes'])) {
83
  throw new Stpp_Exception($this->__('The PaRes has not been set.'));
84
  }
85
-
86
- $request->set('requesttypedescription', Stpp_Types::API_AUTH);
 
 
 
 
 
 
87
  $request->set('md', $_POST['MD']);
88
  $request->set('pares', $_POST['PaRes']);
89
  $request->set('accounttypedescription', $this->_calculateAccountTypeDescription(Stpp_Types::API_AUTH));
90
- return array($request);
 
 
91
  }
92
-
93
  public function prepareRefund(Stpp_Data_Request $originalRequest) {
94
  $originalOrderTotal = $originalRequest->get('original_order_total', null);
95
  $orderTotalPaid = $originalRequest->get('order_total_paid', null);
73
 
74
  return $this->generateRequests($originalRequest, $requestTypes);
75
  }
76
+
77
+ public function prepare3dAuth(Stpp_Data_Request $request) {
78
  if (!isset($_POST['MD'])) {
79
  throw new Stpp_Exception($this->__('The MD has not been set.'));
80
  }
82
  if (!isset($_POST['PaRes'])) {
83
  throw new Stpp_Exception($this->__('The PaRes has not been set.'));
84
  }
85
+
86
+ if ($this->_useRiskDecision && $this->_useRiskDecisionAfterAuth) {
87
+ $requestTypes = array(Stpp_Types::API_AUTH, Stpp_Types::API_RISKDEC);
88
+ }
89
+ else {
90
+ $requestTypes = array(Stpp_Types::API_AUTH);
91
+ }
92
+
93
  $request->set('md', $_POST['MD']);
94
  $request->set('pares', $_POST['PaRes']);
95
  $request->set('accounttypedescription', $this->_calculateAccountTypeDescription(Stpp_Types::API_AUTH));
96
+
97
+ return $this->generateRequests($request, $requestTypes);
98
+
99
  }
100
+
101
  public function prepareRefund(Stpp_Data_Request $originalRequest) {
102
  $originalOrderTotal = $originalRequest->get('original_order_total', null);
103
  $orderTotalPaid = $originalRequest->get('order_total_paid', null);
app/code/local/Securetrading/Stpp/lib/code/core/Stpp/Api/Process.php CHANGED
@@ -5,10 +5,22 @@ class Stpp_Api_Process extends Stpp_Component_Abstract implements Stpp_Api_Proce
5
 
6
  protected $_context;
7
 
 
 
8
  protected $_result;
9
 
10
  protected $_apiLog;
11
 
 
 
 
 
 
 
 
 
 
 
12
  public function setActionInstance(Stpp_Api_ActionsInterface $actionInstance) {
13
  $this->_actionInstance = $actionInstance;
14
  return $this;
@@ -38,6 +50,22 @@ class Stpp_Api_Process extends Stpp_Component_Abstract implements Stpp_Api_Proce
38
  return $this;
39
  }
40
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
41
  protected function _getResult() {
42
  if ($this->_result === null) {
43
  throw new Stpp_Exception($this->__('The result object is null.'));
@@ -52,16 +80,14 @@ class Stpp_Api_Process extends Stpp_Component_Abstract implements Stpp_Api_Proce
52
 
53
  public function getApiLog() {
54
  if ($this->_apiLog === null) {
55
- throw new Stpp_Exception($this->__('The api log has not been set.'));
56
  }
57
  return $this->_apiLog;
58
  }
59
 
60
  protected function _init(Stpp_Api_ContextInterface $context) {
61
- $result = $this->_getResult();
62
- $result->setContext($context);
63
  $this->_setContext($context);
64
- $this->_getActionInstance()->setResult($result);
65
  }
66
 
67
  public function run(Stpp_Api_ContextInterface $context) {
@@ -116,7 +142,7 @@ class Stpp_Api_Process extends Stpp_Component_Abstract implements Stpp_Api_Proce
116
 
117
  protected function _runCommonRoutines($responses) {
118
  foreach($responses as $response) {
119
- $this->getApiLog()->log($response);
120
  $this->_formatErrorMessages($response);
121
  }
122
  return $this;
@@ -146,7 +172,7 @@ class Stpp_Api_Process extends Stpp_Component_Abstract implements Stpp_Api_Proce
146
 
147
  protected function _calculateIsTransactionSuccessful() {
148
  $result = null;
149
- $calculationObjects = $this->_getActionInstance()->getCalculationObjects();
150
 
151
  while ($object = array_shift($calculationObjects)) {
152
  if (($result = $object->calculate($this->_getContext())) !== null) {
@@ -159,7 +185,23 @@ class Stpp_Api_Process extends Stpp_Component_Abstract implements Stpp_Api_Proce
159
  }
160
 
161
  protected function _calculateMessages() {
162
- $this->_getActionInstance()->prepareMessages();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
163
  }
164
 
165
  protected function _handleError(Stpp_Data_Response $response) {
5
 
6
  protected $_context;
7
 
8
+ protected $_calculationObjects;
9
+
10
  protected $_result;
11
 
12
  protected $_apiLog;
13
 
14
+ public function __construct() {
15
+ parent::__construct();
16
+ $this->setCalculationObjects(array(
17
+ 'stpp_actions_abstract_cardstore_with_noncardstore' => new Stpp_Api_Process_Calculation_CardstoreNoncardstoreCombined(),
18
+ 'stpp_actions_abstract_riskdec_with_nonriskdec' => new Stpp_Api_Process_Calculation_RiskdecNonriskdecCombined(),
19
+ 'stpp_actions_abstract_tu_refund_combined' => new Stpp_Api_Process_Calculation_TuRefundCombined(),
20
+ 'stpp_actions_abstract_default' => new Stpp_Api_Process_Calculation_Default(),
21
+ ));
22
+ }
23
+
24
  public function setActionInstance(Stpp_Api_ActionsInterface $actionInstance) {
25
  $this->_actionInstance = $actionInstance;
26
  return $this;
50
  return $this;
51
  }
52
 
53
+ public function addCalculationObject($code, Stpp_Api_Process_Calculation_BaseInterface $calculationObject) {
54
+ $this->_calculationObjects[$code] = $calculationObject;
55
+ }
56
+
57
+ public function removeCalculationObject($code) {
58
+ unset($this->_calculationObjects);
59
+ }
60
+
61
+ public function getCalculationObjects() {
62
+ return $this->_calculationObjects;
63
+ }
64
+
65
+ public function setCalculationObjects(array $objects = array()) {
66
+ $this->_calculationObjects = $objects;
67
+ }
68
+
69
  protected function _getResult() {
70
  if ($this->_result === null) {
71
  throw new Stpp_Exception($this->__('The result object is null.'));
80
 
81
  public function getApiLog() {
82
  if ($this->_apiLog === null) {
83
+ throw new Stpp_Exception($this->__('The API log has not been set.'));
84
  }
85
  return $this->_apiLog;
86
  }
87
 
88
  protected function _init(Stpp_Api_ContextInterface $context) {
89
+ $this->_getResult()->setContext($context);
 
90
  $this->_setContext($context);
 
91
  }
92
 
93
  public function run(Stpp_Api_ContextInterface $context) {
142
 
143
  protected function _runCommonRoutines($responses) {
144
  foreach($responses as $response) {
145
+ $this->getApiLog()->log($response);
146
  $this->_formatErrorMessages($response);
147
  }
148
  return $this;
172
 
173
  protected function _calculateIsTransactionSuccessful() {
174
  $result = null;
175
+ $calculationObjects = $this->getCalculationObjects();
176
 
177
  while ($object = array_shift($calculationObjects)) {
178
  if (($result = $object->calculate($this->_getContext())) !== null) {
185
  }
186
 
187
  protected function _calculateMessages() {
188
+ $result = $this->_getResult();
189
+ $responses = $result->getContext()->getResponses();
190
+
191
+ foreach($responses as $response) {
192
+ $errorMessages = array();
193
+ $successMessages = array();
194
+
195
+ if ($response->getMessageIsError()) {
196
+ $errorMessages[] = $response->getMessage();
197
+ }
198
+ else {
199
+ $successMessages[] = $response->getMessage();
200
+ }
201
+ }
202
+
203
+ $result->setErrorMessage(implode(' - ', $errorMessages));
204
+ $result->setSuccessMessage(implode(' - ', $successMessages));
205
  }
206
 
207
  protected function _handleError(Stpp_Data_Response $response) {
app/code/local/Securetrading/Stpp/lib/code/core/Stpp/Api/Xml/Reader.php CHANGED
@@ -132,7 +132,7 @@ class Stpp_Api_Xml_Reader extends Stpp_Component_Abstract implements Stpp_Api_Xm
132
 
133
  $response->set('acsurl', (string) $xmlResponse->threedsecure->acsurl);
134
  $response->set('cavv', (string) $xmlResponse->threedsecure->cavv);
135
- $response->set('3dstatus', (string) $xmlResponse->threedsecure->status);
136
  $response->set('xid', (string) $xmlResponse->threedsecure->xid);
137
  $response->set('eci', (string) $xmlResponse->threedsecure->eci);
138
  $response->set('enrolled', (string) $xmlResponse->threedsecure->enrolled);
132
 
133
  $response->set('acsurl', (string) $xmlResponse->threedsecure->acsurl);
134
  $response->set('cavv', (string) $xmlResponse->threedsecure->cavv);
135
+ $response->set('status', (string) $xmlResponse->threedsecure->status);
136
  $response->set('xid', (string) $xmlResponse->threedsecure->xid);
137
  $response->set('eci', (string) $xmlResponse->threedsecure->eci);
138
  $response->set('enrolled', (string) $xmlResponse->threedsecure->enrolled);
app/code/local/Securetrading/Stpp/lib/code/core/Stpp/Component/Abstract.php CHANGED
@@ -20,10 +20,16 @@ abstract class Stpp_Component_Abstract implements Stpp_Component_BaseInterface {
20
  }
21
 
22
  public function getDebugLog() {
 
 
 
23
  return $this->_debugLog;
24
  }
25
 
26
  public function getTranslator() {
 
 
 
27
  return $this->_translator;
28
  }
29
 
20
  }
21
 
22
  public function getDebugLog() {
23
+ if ($this->_debugLog === null) {
24
+ throw new Stpp_Exception('The translator has not been set.');
25
+ }
26
  return $this->_debugLog;
27
  }
28
 
29
  public function getTranslator() {
30
+ if ($this->_translator === null) {
31
+ throw new Stpp_Exception('The translator has not been set.');
32
+ }
33
  return $this->_translator;
34
  }
35
 
app/code/local/Securetrading/Stpp/lib/code/core/Stpp/Fields/Admin.php CHANGED
@@ -38,6 +38,11 @@ class Stpp_Fields_Admin extends Stpp_Component_Abstract implements Stpp_Fields_A
38
  const FIELD_API_WS_VERIFY_SSL_CA = 'f_api_ws_verifyssl';
39
  const FIELD_API_WS_CA_FILE = 'f_api_ws_cafile';
40
 
 
 
 
 
 
41
  const FIELD_TYPE_NAME = 'name';
42
  const FIELD_TYPE_DESCRIPTION = 'desc';
43
 
@@ -48,15 +53,15 @@ class Stpp_Fields_Admin extends Stpp_Component_Abstract implements Stpp_Fields_A
48
  $this->_array = array(
49
  self::FIELD_ALL_SITE_REFERENCE => array(
50
  self::FIELD_TYPE_NAME => $this->__('Site Reference'),
51
- self::FIELD_TYPE_DESCRIPTION => $this->__('You must obtain a site reference from SecureTrading before you can use this module. This module can accept either a test site reference or a live site reference.'),
52
  ),
53
  self::FIELD_ALL_ENABLE_AUTHORIZE_ONLY => array(
54
  self::FIELD_TYPE_NAME => $this->__('Enable Authorize Only'),
55
- self::FIELD_TYPE_DESCRIPTION => $this->__('Enabling authorize only payments will set the settlestatus of the order to 2. This means the payment will be suspended in the SecureTrading system and will not be captured by your aquiring bank.'),
56
  ),
57
  self::FIELD_ALL_SETTLE_DUE_DATE => array(
58
  self::FIELD_TYPE_NAME => $this->__('Settle Due Date'),
59
- self::FIELD_TYPE_DESCRIPTION => $this->__('The settle due date is the day that funds held against your customers\' account will be aquired.'),
60
  ),
61
  self::FIELD_ALL_SETTLE_STATUS => array(
62
  self::FIELD_TYPE_NAME => $this->__('Settle Status'),
@@ -64,39 +69,39 @@ class Stpp_Fields_Admin extends Stpp_Component_Abstract implements Stpp_Fields_A
64
  ),
65
  self::FIELD_PPG_USE_SITE_SECURITY => array(
66
  self::FIELD_TYPE_NAME => $this->__('Use Site Security'),
67
- self::FIELD_TYPE_DESCRIPTION => $this->__('Site security should always be enabled on a live site. It allows payments to be taken to the Payment Pages safely. It should only be disabled for testing purposes when using a test site reference. The site security must be configured correctly both here and on your SecureTrading account.'),
68
  ),
69
  self::FIELD_PPG_SITE_SECURITY_PASSWORD => array(
70
  self::FIELD_TYPE_NAME => $this->__('Site Security Password'),
71
- self::FIELD_TYPE_DESCRIPTION => $this->__('This is the password that will be used as part of the site security configuration. It must match the password configured on your SecureTrading account.'),
72
  ),
73
  self::FIELD_PPG_SITE_SECURITY_ALGORITHM => array(
74
  self::FIELD_TYPE_NAME => $this->__('Site Security Algorithm'),
75
- self::FIELD_TYPE_DESCRIPTION => $this->__('This is the hash algorithm that will be used as part of the site security configuration. It must match the algorithm configured on your SecureTrading account.'),
76
  ),
77
  self::FIELD_PPG_USE_NOTIFICATION_HASH => array(
78
  self::FIELD_TYPE_NAME => $this->__('Use Notification Hash'),
79
- self::FIELD_TYPE_DESCRIPTION => $this->__('The notification hash should always be enabled on a live site. It allows notifications to be sent from SecureTrading to your store securely. It should only be disabled for testing purposes when using a test site reference. The notification hash must be configured correctly both here and on your SecureTrading account in MyST.'),
80
  ),
81
  self::FIELD_PPG_NOTIFICATION_HASH_PASSWORD => array(
82
  self::FIELD_TYPE_NAME => $this->__('Notification Hash Password'),
83
- self::FIELD_TYPE_DESCRIPTION => $this->__('This is the password that will be used as part of the notification hash configuration. It must match the password configured on your SecureTrading account in MyST.'),
84
  ),
85
  self::FIELD_PPG_NOTIFICATION_HASH_ALGORITHM => array(
86
  self::FIELD_TYPE_NAME => $this->__('Notification Hash Algorithm'),
87
- self::FIELD_TYPE_DESCRIPTION => $this->__('This is the hash algorithm that will be used as part of the notification hash configuration. It must match the algorithm configured on your SecureTrading account in MyST.'),
88
  ),
89
  self::FIELD_PPG_PARENT_CSS => array(
90
  self::FIELD_TYPE_NAME => $this->__('Parent CSS'),
91
- self::FIELD_TYPE_DESCRIPTION => $this->__('The parent CSS file allows you to make the Payment Pages look the same as your own website by overriding the main CSS stylesheet loaded on the SecureTrading Payment Pages. Upload this stylesheet to the MyST File Manager and then enter the filename of the file you uploaded to the File Manager here, without the file path or the extension.'),
92
  ),
93
  self::FIELD_PPG_CHILD_CSS => array(
94
  self::FIELD_TYPE_NAME => $this->__('Child CSS'),
95
- self::FIELD_TYPE_DESCRIPTION => $this->__('The child CSS file allows you to alter the appearance of certain parts of the Payment Pages by extending the main CSS stylesheet loaded on the SecureTrading Payment Pages (CSS Inheritance). This is useful when you wish to make minor changes to the default look of the Payment Pages. Upload this stylesheet to the MyST File Manager and then enter the filename of the file you uploaded to the File Manager here, without the file path or the extension.'),
96
  ),
97
  self::FIELD_PPG_PARENT_JS => array(
98
  self::FIELD_TYPE_NAME => $this->__('Parent JS'),
99
- self::FIELD_TYPE_DESCRIPTION => $this->__('The parent JS file, if provided, replaces the JavaScript file that is loaded when the Payment Pages are viewed by your customers. You should provide this file when you wish to drastically alter the front-end validation and user-experience provided by the default SecureTrading javascript file. Upload this file to the MyST File Manager and then enter the filename of the file you uploaded to the File Manager here, without the file path or the extension.'),
100
  ),
101
  self::FIELD_PPG_CHILD_JS => array(
102
  self::FIELD_TYPE_NAME => $this->__('Child JS'),
@@ -108,24 +113,24 @@ class Stpp_Fields_Admin extends Stpp_Component_Abstract implements Stpp_Fields_A
108
  ),
109
  self::FIELD_PPG_USE_API => array(
110
  self::FIELD_TYPE_NAME => $this->__('Use API with Payment Pages'),
111
- self::FIELD_TYPE_DESCRIPTION => $this->__('Enabling this option will allow your shopping cart to interact with the SecureTrading API using ST API or our WebServices. This allows you to perform TRANSACTIONUPDATE and REFUND requests from the shopping cart without using MyST.'),
112
  ),
113
 
114
  self::FIELD_API_ALL_CONNECTION => array(
115
  self::FIELD_TYPE_NAME => $this->__('Connection'),
116
- self::FIELD_TYPE_DESCRIPTION => $this->__('This lets you choose which connection method to use when connecting to the SecureTrading API.'),
117
  ),
118
  self::FIELD_API_ALL_USE_3D_SECURE => array(
119
  self::FIELD_TYPE_NAME => $this->__('Use 3D Secure'),
120
- self::FIELD_TYPE_DESCRIPTION => $this->__('Enabling 3D Secure will reduce the possibility of fraudulent transactions being processed on your store and can shift the liability of chargebacks from you (the merchant) to your aquiring bank . 3D Secure must be enabled on your SecureTrading account before you can use this feature.'),
121
  ),
122
  self::FIELD_API_ALL_USE_RISK_DECISION => array(
123
  self::FIELD_TYPE_NAME => $this->__('Use Risk Decision'),
124
- self::FIELD_TYPE_DESCRIPTION => $this->__('Enabling Risk Decision requests will reduce the possibility of fraudulent transactions by comparing a customer transaction against a fraud-check database and suspending suspicious transactions. Risk Decision requests must be enabled on your SecureTrading account before you can use this feature.'),
125
  ),
126
  self::FIELD_API_ALL_USE_CARD_STORE => array(
127
  self::FIELD_TYPE_NAME => $this->__('Use Card Store'),
128
- self::FIELD_TYPE_DESCRIPTION => $this->__('Using Card Store will allow your customers to store their debit/credit card information for easy repeat purchasing. Card information is stored on the SecureTrading servers, not on your own website (a maskedpan and transactionreference only are stored on your site). Card Store requests must be enabled on your SecureTrading account before you can use this feature.'),
129
  ),
130
  self::FIELD_API_ALL_DELAY_RISK_DECISION => array(
131
  self::FIELD_TYPE_NAME => $this->__('Use Risk Decision After Auth'),
@@ -133,11 +138,11 @@ class Stpp_Fields_Admin extends Stpp_Component_Abstract implements Stpp_Fields_A
133
  ),
134
  self::FIELD_API_ALL_USE_AUTO_CARD_STORE => array(
135
  self::FIELD_TYPE_NAME => $this->__('Use Auto Card Store'),
136
- self::FIELD_TYPE_DESCRIPTION => $this->__('Enabling this will make your store automatically process Card Store requests when taking payment: users will not be given the choice to store their card details or not. Card Store requests must be enabled on your SecureTrading account before you use this feature. You must also have selected "Enable Card Store".'),
137
  ),
138
  self::FIELD_API_ALL_ACCEPTED_CARDS => array(
139
  self::FIELD_TYPE_NAME => $this->__('Accepted Cards'),
140
- self::FIELD_TYPE_DESCRIPTION => $this->__('These are the payment types that you wish to show when a user makes payment with SecureTrading.'),
141
  ),
142
  self::FIELD_API_ALL_USE_IFRAME => array(
143
  self::FIELD_TYPE_NAME => $this->__('Use Iframe'),
@@ -146,7 +151,7 @@ class Stpp_Fields_Admin extends Stpp_Component_Abstract implements Stpp_Fields_A
146
 
147
  self::FIELD_API_STAPI_ALIAS => array(
148
  self::FIELD_TYPE_NAME => $this->__('ST API Alias'),
149
- self::FIELD_TYPE_DESCRIPTION => $this->__('This is the alias to use when connecting to SecureTrading through ST API. Usually this is the same as your site reference.'),
150
  ),
151
  self::FIELD_API_STAPI_HOST => array(
152
  self::FIELD_TYPE_NAME => $this->__('ST API Host'),
@@ -159,24 +164,41 @@ class Stpp_Fields_Admin extends Stpp_Component_Abstract implements Stpp_Fields_A
159
 
160
  self::FIELD_API_WS_ALIAS => array(
161
  self::FIELD_TYPE_NAME => $this->__('Web Services Alias'),
162
- self::FIELD_TYPE_DESCRIPTION => $this->__('This is the alias to use when connecting to SecureTrading through our WebServices. Usually this is the same as your site reference.'),
163
  ),
164
  self::FIELD_API_WS_USERNAME => array(
165
  self::FIELD_TYPE_NAME => $this->__('Web Services Username'),
166
- self::FIELD_TYPE_DESCRIPTION => $this->__('This is the username used for server authentication when connecting to the SecureTrading API using our Web Services.'),
167
  ),
168
  self::FIELD_API_WS_PASSWORD => array(
169
  self::FIELD_TYPE_NAME => $this->__('Web Services Password'),
170
- self::FIELD_TYPE_DESCRIPTION => $this->__('This is the password used for server authentication when connecting to the SecureTrading API using our Web Services'),
171
  ),
172
  self::FIELD_API_WS_VERIFY_SSL_CA => array(
173
- self::FIELD_TYPE_NAME => $this->__('Verify SSL CA (Web Services)'),
174
- self::FIELD_TYPE_DESCRIPTION => $this->__('Enable this option to verify that the CA signing the SecureTrading Web Services SSL certificate is one you trust. This should always be used in a production environment and should only be disabled for testing purposes when using a test site reference.'),
175
  ),
176
  self::FIELD_API_WS_CA_FILE => array(
177
  self::FIELD_TYPE_NAME => $this->__('SSL CA FILE (Web Services)'),
178
- self::FIELD_TYPE_DESCRIPTION => $this->__('The full filepath containing trusted CAs. The file should be in .PEM/.CRT format. This is required when verifying SSL CAs with our Web Services connection method.'),
179
- ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
180
  );
181
  }
182
 
38
  const FIELD_API_WS_VERIFY_SSL_CA = 'f_api_ws_verifyssl';
39
  const FIELD_API_WS_CA_FILE = 'f_api_ws_cafile';
40
 
41
+ const FIELD_TRANSACTIONSEARCH_USERNAME = 'f_ts_un';
42
+ const FIELD_TRANSACTIONSEARCH_PASSWORD = 'f_ts_pw';
43
+ const FIELD_TRANSACTIONSEARCH_VERIFY_SSL_CA = 'f_ts_verifyssl';
44
+ const FIELD_TRANSACTIONSEARCH_CA_FILE = 'f_ts_cafile';
45
+
46
  const FIELD_TYPE_NAME = 'name';
47
  const FIELD_TYPE_DESCRIPTION = 'desc';
48
 
53
  $this->_array = array(
54
  self::FIELD_ALL_SITE_REFERENCE => array(
55
  self::FIELD_TYPE_NAME => $this->__('Site Reference'),
56
+ self::FIELD_TYPE_DESCRIPTION => $this->__('You must obtain a site reference from Secure Trading before you can use this module. This module can accept either a test site reference or a live site reference.'),
57
  ),
58
  self::FIELD_ALL_ENABLE_AUTHORIZE_ONLY => array(
59
  self::FIELD_TYPE_NAME => $this->__('Enable Authorize Only'),
60
+ self::FIELD_TYPE_DESCRIPTION => $this->__('Enabling authorize only payments will set the settlestatus of the order to 2. This means the payment will be suspended in the Secure Trading system and will not be captured by your aquiring bank.'),
61
  ),
62
  self::FIELD_ALL_SETTLE_DUE_DATE => array(
63
  self::FIELD_TYPE_NAME => $this->__('Settle Due Date'),
64
+ self::FIELD_TYPE_DESCRIPTION => $this->__('The settle due date is the day that funds held against your customers\' account will be acquired.'),
65
  ),
66
  self::FIELD_ALL_SETTLE_STATUS => array(
67
  self::FIELD_TYPE_NAME => $this->__('Settle Status'),
69
  ),
70
  self::FIELD_PPG_USE_SITE_SECURITY => array(
71
  self::FIELD_TYPE_NAME => $this->__('Use Site Security'),
72
+ self::FIELD_TYPE_DESCRIPTION => $this->__('Site security should always be enabled on a live site. It allows payments to be taken to the Payment Pages safely. It should only be disabled for testing purposes when using a test site reference. The site security must be configured correctly both here and on your Secure Trading account.'),
73
  ),
74
  self::FIELD_PPG_SITE_SECURITY_PASSWORD => array(
75
  self::FIELD_TYPE_NAME => $this->__('Site Security Password'),
76
+ self::FIELD_TYPE_DESCRIPTION => $this->__('This is the password that will be used as part of the site security configuration. It must match the password configured on your Secure Trading account.'),
77
  ),
78
  self::FIELD_PPG_SITE_SECURITY_ALGORITHM => array(
79
  self::FIELD_TYPE_NAME => $this->__('Site Security Algorithm'),
80
+ self::FIELD_TYPE_DESCRIPTION => $this->__('This is the hash algorithm that will be used as part of the site security configuration. It must match the algorithm configured on your Secure Trading account.'),
81
  ),
82
  self::FIELD_PPG_USE_NOTIFICATION_HASH => array(
83
  self::FIELD_TYPE_NAME => $this->__('Use Notification Hash'),
84
+ self::FIELD_TYPE_DESCRIPTION => $this->__('The notification hash should always be enabled on a live site. It allows notifications to be sent from Secure Trading to your store securely. It should only be disabled for testing purposes when using a test site reference. The notification hash must be configured correctly both here and on your Secure Trading account in MyST.'),
85
  ),
86
  self::FIELD_PPG_NOTIFICATION_HASH_PASSWORD => array(
87
  self::FIELD_TYPE_NAME => $this->__('Notification Hash Password'),
88
+ self::FIELD_TYPE_DESCRIPTION => $this->__('This is the password that will be used as part of the notification hash configuration. It must match the password configured on your Secure Trading account in MyST.'),
89
  ),
90
  self::FIELD_PPG_NOTIFICATION_HASH_ALGORITHM => array(
91
  self::FIELD_TYPE_NAME => $this->__('Notification Hash Algorithm'),
92
+ self::FIELD_TYPE_DESCRIPTION => $this->__('This is the hash algorithm that will be used as part of the notification hash configuration. It must match the algorithm configured on your Secure Trading account in MyST.'),
93
  ),
94
  self::FIELD_PPG_PARENT_CSS => array(
95
  self::FIELD_TYPE_NAME => $this->__('Parent CSS'),
96
+ self::FIELD_TYPE_DESCRIPTION => $this->__('The parent CSS file allows you to make the Payment Pages look the same as your own website by overriding the main CSS stylesheet loaded on the Secure Trading Payment Pages. Upload this stylesheet to the MyST File Manager and then enter the filename of the file you uploaded to the File Manager here, without the file path or the extension.'),
97
  ),
98
  self::FIELD_PPG_CHILD_CSS => array(
99
  self::FIELD_TYPE_NAME => $this->__('Child CSS'),
100
+ self::FIELD_TYPE_DESCRIPTION => $this->__('The child CSS file allows you to alter the appearance of certain parts of the Payment Pages by extending the main CSS stylesheet loaded on the Secure Trading Payment Pages (CSS Inheritance). This is useful when you wish to make minor changes to the default look of the Payment Pages. Upload this stylesheet to the MyST File Manager and then enter the filename of the file you uploaded to the File Manager here, without the file path or the extension.'),
101
  ),
102
  self::FIELD_PPG_PARENT_JS => array(
103
  self::FIELD_TYPE_NAME => $this->__('Parent JS'),
104
+ self::FIELD_TYPE_DESCRIPTION => $this->__('The parent JS file, if provided, replaces the JavaScript file that is loaded when the Payment Pages are viewed by your customers. You should provide this file when you wish to drastically alter the front-end validation and user-experience provided by the default Secure Trading javascript file. Upload this file to the MyST File Manager and then enter the filename of the file you uploaded to the File Manager here, without the file path or the extension.'),
105
  ),
106
  self::FIELD_PPG_CHILD_JS => array(
107
  self::FIELD_TYPE_NAME => $this->__('Child JS'),
113
  ),
114
  self::FIELD_PPG_USE_API => array(
115
  self::FIELD_TYPE_NAME => $this->__('Use API with Payment Pages'),
116
+ self::FIELD_TYPE_DESCRIPTION => $this->__('Enabling this option will allow your shopping cart to interact with the Secure Trading API using ST API or our WebServices. This allows you to perform TRANSACTIONUPDATE and REFUND requests from the shopping cart without using MyST.'),
117
  ),
118
 
119
  self::FIELD_API_ALL_CONNECTION => array(
120
  self::FIELD_TYPE_NAME => $this->__('Connection'),
121
+ self::FIELD_TYPE_DESCRIPTION => $this->__('This lets you choose which connection method to use when connecting to the Secure Trading API.'),
122
  ),
123
  self::FIELD_API_ALL_USE_3D_SECURE => array(
124
  self::FIELD_TYPE_NAME => $this->__('Use 3D Secure'),
125
+ self::FIELD_TYPE_DESCRIPTION => $this->__('Enabling 3D Secure will reduce the possibility of fraudulent transactions being processed on your store and can shift the liability of chargebacks from you (the merchant) to your aquiring bank . 3D Secure must be enabled on your Secure Trading account before you can use this feature.'),
126
  ),
127
  self::FIELD_API_ALL_USE_RISK_DECISION => array(
128
  self::FIELD_TYPE_NAME => $this->__('Use Risk Decision'),
129
+ self::FIELD_TYPE_DESCRIPTION => $this->__('Enabling Risk Decision requests will reduce the possibility of fraudulent transactions by comparing a customer transaction against a fraud-check database and suspending suspicious transactions. Risk Decision requests must be enabled on your Secure Trading account before you can use this feature.'),
130
  ),
131
  self::FIELD_API_ALL_USE_CARD_STORE => array(
132
  self::FIELD_TYPE_NAME => $this->__('Use Card Store'),
133
+ self::FIELD_TYPE_DESCRIPTION => $this->__('Using Card Store will allow your customers to store their debit/credit card information for easy repeat purchasing. Card information is stored on the Secure Trading servers, not on your own website (a maskedpan and transactionreference only are stored on your site). Card Store requests must be enabled on your Secure Trading account before you can use this feature.'),
134
  ),
135
  self::FIELD_API_ALL_DELAY_RISK_DECISION => array(
136
  self::FIELD_TYPE_NAME => $this->__('Use Risk Decision After Auth'),
138
  ),
139
  self::FIELD_API_ALL_USE_AUTO_CARD_STORE => array(
140
  self::FIELD_TYPE_NAME => $this->__('Use Auto Card Store'),
141
+ self::FIELD_TYPE_DESCRIPTION => $this->__('Enabling this will make your store automatically process Card Store requests when taking payment: users will not be given the choice to store their card details or not. Card Store requests must be enabled on your Secure Trading account before you use this feature. You must also have selected "Enable Card Store".'),
142
  ),
143
  self::FIELD_API_ALL_ACCEPTED_CARDS => array(
144
  self::FIELD_TYPE_NAME => $this->__('Accepted Cards'),
145
+ self::FIELD_TYPE_DESCRIPTION => $this->__('These are the payment types that you wish to show when a user makes payment with Secure Trading.'),
146
  ),
147
  self::FIELD_API_ALL_USE_IFRAME => array(
148
  self::FIELD_TYPE_NAME => $this->__('Use Iframe'),
151
 
152
  self::FIELD_API_STAPI_ALIAS => array(
153
  self::FIELD_TYPE_NAME => $this->__('ST API Alias'),
154
+ self::FIELD_TYPE_DESCRIPTION => $this->__('This is the alias to use when connecting to Secure Trading through ST API. Usually this is the same as your site reference.'),
155
  ),
156
  self::FIELD_API_STAPI_HOST => array(
157
  self::FIELD_TYPE_NAME => $this->__('ST API Host'),
164
 
165
  self::FIELD_API_WS_ALIAS => array(
166
  self::FIELD_TYPE_NAME => $this->__('Web Services Alias'),
167
+ self::FIELD_TYPE_DESCRIPTION => $this->__('This is the alias to use when connecting to Secure Trading through our WebServices. Usually this is the same as your Web Services username.'),
168
  ),
169
  self::FIELD_API_WS_USERNAME => array(
170
  self::FIELD_TYPE_NAME => $this->__('Web Services Username'),
171
+ self::FIELD_TYPE_DESCRIPTION => $this->__('This is the username used for server authentication when connecting to the Secure Trading API using our Web Services.'),
172
  ),
173
  self::FIELD_API_WS_PASSWORD => array(
174
  self::FIELD_TYPE_NAME => $this->__('Web Services Password'),
175
+ self::FIELD_TYPE_DESCRIPTION => $this->__('This is the password used for server authentication when connecting to the Secure Trading API using our Web Services'),
176
  ),
177
  self::FIELD_API_WS_VERIFY_SSL_CA => array(
178
+ self::FIELD_TYPE_NAME => $this->__('Verify SSL Certificates (Web Services)'),
179
+ self::FIELD_TYPE_DESCRIPTION => $this->__('Enable this option to verify that the root Certificate Authority (CA) is trusted and that the verification of the signatures in the certificate chain is successful. This should always be used in a production environment and should only be disabled for testing purposes.'),
180
  ),
181
  self::FIELD_API_WS_CA_FILE => array(
182
  self::FIELD_TYPE_NAME => $this->__('SSL CA FILE (Web Services)'),
183
+ self::FIELD_TYPE_DESCRIPTION => $this->__('The full filepath containing trusted CAs. The file should be in .PEM/.CRT format. This is required when the \'Verify SSL Certificates\' config option is enabled.'),
184
+ ),
185
+
186
+ self::FIELD_TRANSACTIONSEARCH_USERNAME => array(
187
+ self::FIELD_TYPE_NAME => $this->__('Transaction Search Username'),
188
+ self::FIELD_TYPE_DESCRIPTION => $this->__('This is the username used for server authentication when downloading the CSV transaction list from MyST.'),
189
+ ),
190
+ self::FIELD_TRANSACTIONSEARCH_PASSWORD => array(
191
+ self::FIELD_TYPE_NAME => $this->__('Transaction Search Password'),
192
+ self::FIELD_TYPE_DESCRIPTION => $this->__('This is the password used for server authentication when downloading the CSV transaction list from MyST.'),
193
+ ),
194
+ self::FIELD_TRANSACTIONSEARCH_VERIFY_SSL_CA => array(
195
+ self::FIELD_TYPE_NAME => $this->__('Verify SSL Certificates (Transaction Search)'),
196
+ self::FIELD_TYPE_DESCRIPTION => $this->__('Enable this option to verify that the root Certificate Authority (CA) is trusted and that the verification of the signatures in the certificate chain is successful. This should always be used in a production environment and should only be disabled for testing purposes.'),
197
+ ),
198
+ self::FIELD_TRANSACTIONSEARCH_CA_FILE => array(
199
+ self::FIELD_TYPE_NAME => $this->__('SSL CA FILE (Transaction Search)'),
200
+ self::FIELD_TYPE_DESCRIPTION => $this->__('The full filepath containing trusted CAs. The file should be in .PEM/.CRT format. This is required when the \'Verify SSL Certificates\' config option is enabled.'),
201
+ ),
202
  );
203
  }
204
 
app/code/local/Securetrading/Stpp/lib/code/core/Stpp/Http/Base.php ADDED
@@ -0,0 +1,245 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Stpp_Http_Base extends Stpp_Component_Abstract implements Stpp_Http_BaseInterface {
4
+ protected $_ch;
5
+
6
+ protected $_url = '';
7
+
8
+ protected $_username = '';
9
+
10
+ protected $_password = '';
11
+
12
+ protected $_sslVerifyPeer = true;
13
+
14
+ protected $_sslVerifyHost = 2;
15
+
16
+ protected $_sslCaCertFile = '';
17
+
18
+ protected $_sslCheckCertChainForRevokedCerts = true;
19
+
20
+ protected $_sslDenyRevokedCerts = true;
21
+
22
+ protected $_sslRevokedCerts = array();
23
+
24
+ protected $_curlOptions = array();
25
+
26
+ protected $_httpHeaders = array();
27
+
28
+ protected $_connectTimeout = 5;
29
+
30
+ protected $_timeout = 60;
31
+
32
+ protected $_connectAttempts = 20;
33
+
34
+ protected $_connectAttemptsTimeout = 40;
35
+
36
+ protected $_sleepUseconds = 1000000;
37
+
38
+ protected $_curlReadFunctionCalled = false;
39
+
40
+ public function __construct() {
41
+ parent::__construct();
42
+ $this->_timeout += $this->_connectTimeout; // Allow 60 seconds to send and receive data and allow time for one connection attempt.
43
+ $this->_ch = curl_init();
44
+ }
45
+
46
+ public function setUrl($url) {
47
+ $this->_url = $url;
48
+ return $this;
49
+ }
50
+
51
+ public function setUsername($username) {
52
+ $this->_username = $username;
53
+ return $this;
54
+ }
55
+
56
+ public function setPassword($password) {
57
+ $this->_password = $password;
58
+ return $this;
59
+ }
60
+
61
+ public function setSslVerifyPeer($bool) {
62
+ $this->_sslVerifyPeer = (bool) $bool;
63
+ return $this;
64
+ }
65
+
66
+ public function setSslVerifyHost($int) {
67
+ $this->_sslVerifyHost = $int;
68
+ return $this;
69
+ }
70
+
71
+ public function setSslCaCertFile($file) {
72
+ $this->_sslCaCertFile = $file;
73
+ return $this;
74
+ }
75
+
76
+ public function setSslCheckCertChainForRevokedCerts($bool) {
77
+ $this->_sslCheckCertChainForRevokedCerts = (bool) $bool;
78
+ return $this;
79
+ }
80
+
81
+ public function setSslDenyRevokedCerts($bool) {
82
+ $this->_sslDenyRevokedCerts = (bool) $bool;
83
+ return $this;
84
+ }
85
+
86
+ public function setConnectTimeout($connectTimeout) {
87
+ $this->_connectTimeout = $connectTimeout;
88
+ return $this;
89
+ }
90
+
91
+ public function setTimeout($timeout) {
92
+ $this->_timeout = $timeout;
93
+ return $this;
94
+ }
95
+
96
+ public function setConnectAttempts($connectAttempts) {
97
+ $this->_connectAttempts = $connectAttempts;
98
+ return $this;
99
+ }
100
+
101
+ public function setSleepUseconds($sleepUseconds) {
102
+ $this->_sleepUseconds = $sleepUseconds;
103
+ return $this;
104
+ }
105
+
106
+ public function setCurlOptions(array $options) {
107
+ $this->_curlOptions = $options;
108
+ return $this;
109
+ }
110
+
111
+ public function setCurlOption($option, $value) {
112
+ $this->_curlOptions[$option] = $value;
113
+ return $this;
114
+ }
115
+
116
+ public function setHttpHeaders(array $headers) {
117
+ $this->_httpHeaders = $headers;
118
+ return $this;
119
+ }
120
+
121
+ public function addHttpHeader($header) {
122
+ $this->_httpHeaders[] = $header;
123
+ return $this;
124
+ }
125
+
126
+ public function getHttpHeaders() {
127
+ return $this->_httpHeaders;
128
+ }
129
+
130
+ public function httpPost($requestBody = '') {
131
+ curl_setopt($this->_ch, CURLOPT_POST, 1);
132
+ if ($this->_sslCheckCertChainForRevokedCerts) {
133
+ $this->addHttpHeader('Content-Length: ' . strlen($requestBody));
134
+ curl_setopt($this->_ch, CURLOPT_INFILE, fopen('data://text/plain,' . urlencode($requestBody), 'r'));
135
+ curl_setopt($this->_ch, CURLOPT_INFILESIZE, strlen($requestBody));
136
+ curl_setopt($this->_ch, CURLOPT_READFUNCTION, array($this, 'curlReadFunction'));
137
+ }
138
+ else {
139
+ curl_setopt($this->_ch, CURLOPT_POSTFIELDS, $requestBody);
140
+ }
141
+ $this->_prepareCurl();
142
+ return $this->_sendAndReceive();
143
+ }
144
+
145
+ public function httpGet() {
146
+ $this->_prepareCurl();
147
+ return $this->_sendAndReceive();
148
+ }
149
+
150
+ /**
151
+ * Used as CURLOPT_READFUNCTION callback. Should not be used by client code.
152
+ */
153
+ public function curlReadFunction($ch, $fp, $strlen) {
154
+ if ($this->_curlReadFunctionCalled) {
155
+ return false;
156
+ }
157
+ $this->_curlReadFunctionCalled = true;
158
+
159
+ foreach(curl_getinfo($ch, CURLINFO_CERTINFO) as $certInfo) {
160
+ if (in_array($certInfo['Signature'], $this->_sslRevokedCerts)) {
161
+ if ($this->_sslDenyRevokedCerts) {
162
+ curl_setopt($ch, CURLOPT_TIMEOUT,1);
163
+ curl_setopt($ch, CURLOPT_CONNECTTIMEOUT,1);
164
+ throw new Stpp_Exception(sprintf($this->__('Certificate with signature "%s" rejected.'), $certInfo['Signature']));
165
+ }
166
+ else {
167
+ $this->getDebugLog()->log(sprintf($this->__('Certificate with signature "%s" revoked but TLS connection allowed to continue.'), $certInfo['Signature']));
168
+ }
169
+ }
170
+ }
171
+ $str = fread($fp, $strlen);
172
+ return $str;
173
+ }
174
+
175
+ protected function _sendAndReceive() {
176
+ $result = $this->_sendAndReceiveWithRetries();
177
+ $this->_checkResult($result);
178
+ return $result;
179
+ }
180
+
181
+ protected function _prepareCurl() {
182
+ curl_setopt($this->_ch, CURLOPT_FAILONERROR, true);
183
+ curl_setopt($this->_ch, CURLOPT_FOLLOWLOCATION, true);
184
+ curl_setopt($this->_ch, CURLOPT_RETURNTRANSFER, true);
185
+ curl_setopt($this->_ch, CURLOPT_URL, $this->_url);
186
+ curl_setopt($this->_ch, CURLOPT_CERTINFO, 1);
187
+ curl_setopt($this->_ch, CURLOPT_SSL_VERIFYPEER, $this->_sslVerifyPeer);
188
+ curl_setopt($this->_ch, CURLOPT_SSL_VERIFYHOST, $this->_sslVerifyHost);
189
+ curl_setopt($this->_ch, CURLOPT_CONNECTTIMEOUT, $this->_connectTimeout);
190
+ curl_setopt($this->_ch, CURLOPT_TIMEOUT, $this->_timeout);
191
+ curl_setopt($this->_ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
192
+ curl_setopt($this->_ch, CURLOPT_USERPWD, $this->_username . ':' . $this->_password);
193
+ curl_setopt($this->_ch, CURLOPT_USERAGENT, '');
194
+ curl_setopt($this->_ch, CURLOPT_HTTPHEADER, $this->getHttpHeaders());
195
+
196
+ if (!empty($this->_sslCaCertFile)) {
197
+ curl_setopt($this->_ch, CURLOPT_CAINFO, $this->_sslCaCertFile);
198
+ }
199
+
200
+ curl_setopt_array($this->_ch, $this->_curlOptions);
201
+ }
202
+
203
+ protected function _microsecondsToSeconds($useconds) {
204
+ return $useconds / 1000000;
205
+ }
206
+
207
+ protected function _sendAndReceiveWithRetries() {
208
+ $i = 0;
209
+ $startTime = time();
210
+ $execResult = null;
211
+
212
+ while (true) {
213
+ $i++;
214
+ $canRetry = false;
215
+ list($execResult, $curlErrorCode) = $this->_exec();
216
+
217
+ if (in_array($curlErrorCode, array(CURLE_COULDNT_CONNECT, CURLE_OPERATION_TIMEOUTED))) {
218
+ $this->getDebugLog()->log(sprintf('Failed to connect to %s on attempt %s. Max attempts: %s. Connect timeout: %s. cURL Error: %s. Sleeping for %s second(s).', $this->_url, $i, $this->_connectAttempts, $this->_connectAttemptsTimeout, $curlErrorCode, $this->_microsecondsToSeconds($this->_sleepUseconds)));
219
+ usleep($this->_sleepUseconds);
220
+ if ($this->_canRetry($startTime, $i)) {
221
+ continue;
222
+ }
223
+ }
224
+ break;
225
+ }
226
+ return $execResult;
227
+ }
228
+
229
+ protected function _exec() {
230
+ $httpResponseBody = curl_exec($this->_ch);
231
+ $curlErrorCode = curl_errno($this->_ch);
232
+ return array($httpResponseBody, $curlErrorCode);
233
+ }
234
+
235
+ protected function _canRetry($startTime, $i) {
236
+ $timeElapsed = time() - $startTime;
237
+ return ($timeElapsed + $this->_connectTimeout + $this->_microsecondsToSeconds($this->_sleepUseconds)) <= $this->_connectAttemptsTimeout && $i < $this->_connectAttempts;
238
+ }
239
+
240
+ protected function _checkResult($result) {
241
+ if ($result === false) {
242
+ throw new Stpp_Exception(sprintf($this->__("cURL Error Code: '%s'. Error Message: '%s'."), curl_errno($this->_ch), curl_error($this->_ch)));
243
+ }
244
+ }
245
+ }
app/code/local/Securetrading/Stpp/lib/code/core/Stpp/Http/BaseInterface.php ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ interface Stpp_Http_BaseInterface {
4
+ function setUrl($url);
5
+ function setUsername($username);
6
+ function setPassword($password);
7
+ function setSslVerifyPeer($bool);
8
+ function setSslVerifyHost($bool);
9
+ function setSslCaCertFile($bool);
10
+ function setSslCheckCertChainForRevokedCerts($bool);
11
+ function setSslDenyRevokedCerts($bool);
12
+ function setConnectTimeout($connectTimeout);
13
+ function setTimeout($timeout);
14
+ function setConnectAttempts($connectAttempts);
15
+ function setSleepUseconds($sleepUseconds);
16
+ function setCurlOptions(array $curlOptions);
17
+ function setCurlOption($option, $value);
18
+ function setHttpHeaders(array $httpHeaders);
19
+ function addHttpHeader($header);
20
+ function getHttpHeaders();
21
+ function httpPost($requestBody = '');
22
+ function httpGet();
23
+ }
app/code/local/Securetrading/Stpp/lib/code/core/Stpp/Http/Helper.php ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Stpp_Http_Helper implements Stpp_Http_HelperInterface {
4
+ public function retrieveGetParams() {
5
+ return $this->_retrieveHttpRequestBodyParams($_SERVER['QUERY_STRING']);
6
+ }
7
+
8
+ public function retrievePostParams() {
9
+ return $this->_retrieveHttpRequestBodyParams(file_get_contents("php://input"));
10
+ }
11
+
12
+ protected function _retrieveHttpRequestBodyParams($dataString) {
13
+ $data = explode('&', $dataString);
14
+ $params = array();
15
+ foreach($data as $param) {
16
+ list($name, $value) = explode('=', $param);
17
+ $params[urldecode($name)][] = urldecode($value);
18
+ }
19
+ return $params;
20
+ }
21
+ }
app/code/local/Securetrading/Stpp/lib/code/core/Stpp/Http/HelperInterface.php ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ <?php
2
+
3
+ interface Stpp_Http_HelperInterface {
4
+ function retrieveGetParams();
5
+ function retrievePostParams();
6
+ }
app/code/local/Securetrading/Stpp/lib/code/core/Stpp/PaymentPages/Base.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
 
3
  class Stpp_PaymentPages_Base extends Stpp_Component_Abstract implements Stpp_PaymentPages_BaseInterface {
4
- const INTERFACE_NAME = 'SecureTrading Payment Pages';
5
 
6
  const PPAGES_CHOICE_URL = 'https://payments.securetrading.net/process/payments/choice';
7
 
@@ -19,6 +19,8 @@ class Stpp_PaymentPages_Base extends Stpp_Component_Abstract implements Stpp_Pay
19
 
20
  protected $_result;
21
 
 
 
22
  protected $_context;
23
 
24
  protected $_usePost = true;
@@ -67,6 +69,7 @@ class Stpp_PaymentPages_Base extends Stpp_Component_Abstract implements Stpp_Pay
67
 
68
  public function setResult(Stpp_PaymentPages_ResultInterface $result) {
69
  $this->_result = $result;
 
70
  }
71
 
72
  protected function _getResult() {
@@ -76,6 +79,18 @@ class Stpp_PaymentPages_Base extends Stpp_Component_Abstract implements Stpp_Pay
76
  return $this->_result;
77
  }
78
 
 
 
 
 
 
 
 
 
 
 
 
 
79
  public function setUseHttpPost($bool) {
80
  $this->_usePost = (bool) $bool;
81
  }
@@ -254,12 +269,24 @@ class Stpp_PaymentPages_Base extends Stpp_Component_Abstract implements Stpp_Pay
254
  return $this;
255
  }
256
 
257
- protected function _createNotificationHash() {
258
- $fields = $_POST;
259
- unset($fields['responsesitesecurity'], $fields['notificationreference']);
260
- ksort($fields);
261
- array_push($fields, $this->_notificationPassword);
262
- return hash($this->_notificationHashAlgorithm, implode('', $fields));
 
 
 
 
 
 
 
 
 
 
 
 
263
  }
264
 
265
  protected function _mapResponse() {
@@ -295,12 +322,4 @@ class Stpp_PaymentPages_Base extends Stpp_Component_Abstract implements Stpp_Pay
295
  }
296
  return $this;
297
  }
298
-
299
- protected function _createRedirectHash() {
300
- $fields = $_GET;
301
- unset($fields['responsesitesecurity']);
302
- ksort($fields);
303
- array_push($fields, $this->_siteSecurityPassword);
304
- return hash($this->_siteSecurityHashAlgorithm, implode('', $fields));
305
- }
306
  }
1
  <?php
2
 
3
  class Stpp_PaymentPages_Base extends Stpp_Component_Abstract implements Stpp_PaymentPages_BaseInterface {
4
+ const INTERFACE_NAME = 'Secure Trading Payment Pages';
5
 
6
  const PPAGES_CHOICE_URL = 'https://payments.securetrading.net/process/payments/choice';
7
 
19
 
20
  protected $_result;
21
 
22
+ protected $_httpHelper;
23
+
24
  protected $_context;
25
 
26
  protected $_usePost = true;
69
 
70
  public function setResult(Stpp_PaymentPages_ResultInterface $result) {
71
  $this->_result = $result;
72
+ return $this;
73
  }
74
 
75
  protected function _getResult() {
79
  return $this->_result;
80
  }
81
 
82
+ public function setHttpHelper(Stpp_Http_HelperInterface $httpHelper) {
83
+ $this->_httpHelper = $httpHelper;
84
+ return $this;
85
+ }
86
+
87
+ public function _getHttpHelper() {
88
+ if ($this->_httpHelper === null) {
89
+ throw new Stpp_Exception($this->__('The HTTP helper is null.'));
90
+ }
91
+ return $this->_httpHelper;
92
+ }
93
+
94
  public function setUseHttpPost($bool) {
95
  $this->_usePost = (bool) $bool;
96
  }
269
  return $this;
270
  }
271
 
272
+ protected function _createResponseSiteSecurityHash(array $fields, $hashAlgorithm, $password) {
273
+ unset($fields['responsesitesecurity'], $fields['notificationreference']);
274
+ ksort($fields);
275
+ array_push($fields, array($password));
276
+
277
+ $str = '';
278
+ foreach($fields as $k => $vArray) {
279
+ $str .= implode('', $vArray);
280
+ }
281
+ return hash($hashAlgorithm, $str);
282
+ }
283
+
284
+ protected function _createNotificationHash() {
285
+ return $this->_createResponseSiteSecurityHash($this->_getHttpHelper()->retrievePostParams(), $this->_notificationHashAlgorithm, $this->_notificationPassword);
286
+ }
287
+
288
+ protected function _createRedirectHash() {
289
+ return $this->_createResponseSiteSecurityHash($this->_getHttpHelper()->retrieveGetParams(), $this->_siteSecurityHashAlgorithm, $this->_siteSecurityPassword);
290
  }
291
 
292
  protected function _mapResponse() {
322
  }
323
  return $this;
324
  }
 
 
 
 
 
 
 
 
325
  }
app/code/local/Securetrading/Stpp/lib/code/core/Stpp/PaymentPages/Facade.php CHANGED
@@ -45,9 +45,10 @@ class Stpp_PaymentPages_Facade extends Stpp_Facade {
45
  }
46
 
47
  $ppages->setResult($this->newPaymentPagesResult());
 
48
  return $ppages;
49
  }
50
-
51
  public function newPaymentPagesHelper() {
52
  $helper = new Stpp_PaymentPages_Helper();
53
  return $helper;
@@ -57,6 +58,10 @@ class Stpp_PaymentPages_Facade extends Stpp_Facade {
57
  return new Stpp_PaymentPages_Result();
58
  }
59
 
 
 
 
 
60
  public function runPaymentPagesStandard(Stpp_Data_Request $request, $adminAction = false) {
61
  $request = $this->newPaymentPagesHelper()->setAdminAction($adminAction)->prepareStandard($request);
62
  $result = $this->newPaymentPages()->run($request);
45
  }
46
 
47
  $ppages->setResult($this->newPaymentPagesResult());
48
+ $ppages->setHttpHelper($this->newHttpHelper());
49
  return $ppages;
50
  }
51
+
52
  public function newPaymentPagesHelper() {
53
  $helper = new Stpp_PaymentPages_Helper();
54
  return $helper;
58
  return new Stpp_PaymentPages_Result();
59
  }
60
 
61
+ public function newHttpHelper() {
62
+ return new Stpp_Http_Helper();
63
+ }
64
+
65
  public function runPaymentPagesStandard(Stpp_Data_Request $request, $adminAction = false) {
66
  $request = $this->newPaymentPagesHelper()->setAdminAction($adminAction)->prepareStandard($request);
67
  $result = $this->newPaymentPages()->run($request);
app/code/local/Securetrading/Stpp/lib/code/core/Stpp/Transactionsearch/Base.php ADDED
@@ -0,0 +1,173 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Stpp_Transactionsearch_Base extends Stpp_Http_Base implements Stpp_Transactionsearch_BaseInterface {
4
+ protected $_filterTypes = array(
5
+ 'accounttypedescriptions',
6
+ 'requesttypedescriptions',
7
+ 'currencyiso3a',
8
+ 'paymentttypedescriptions',
9
+ 'settlestatus',
10
+ 'errorcodes',
11
+ );
12
+
13
+ protected $_url = 'https://myst.securetrading.net/auto/transactions/transactionsearch?';
14
+
15
+ protected $_startDate = '';
16
+
17
+ protected $_endDate = '';
18
+
19
+ protected $_siteReferences = array();
20
+
21
+ protected $_filters = array();
22
+
23
+ protected $_optionalFields = array();
24
+
25
+ protected $_rawCsvString = '';
26
+
27
+ protected $_parsedCsvArray = array();
28
+
29
+ public function setStartDate($startDate) {
30
+ $this->_startDate = $startDate;
31
+ return $this;
32
+ }
33
+
34
+ public function getStartDate() {
35
+ return $this->_startDate;
36
+ }
37
+
38
+ public function setEndDate($endDate) {
39
+ $this->_endDate = $endDate;
40
+ return $this;
41
+ }
42
+
43
+ public function getEndDate() {
44
+ return $this->_endDate;
45
+ }
46
+
47
+ public function addSiteReference($siteReference) {
48
+ $this->_siteReferences[$siteReference] = true;
49
+ return $this;
50
+ }
51
+
52
+ public function removeSiteReference($siteReference) {
53
+ unset($this->_siteReferences[$siteReference]);
54
+ return $this;
55
+ }
56
+
57
+ public function setSiteReferences($siteReferences) {
58
+ if (!is_array($siteReferences)) {
59
+ $siteReferences = array($siteReferences);
60
+ }
61
+ $this->_siteReferences = array_fill_keys($siteReferences, true);
62
+ return $this;
63
+ }
64
+
65
+ public function getSiteReferences() {
66
+ return $this->_siteReferences;
67
+ }
68
+
69
+ public function addFilter($filterType, $filterValue) {
70
+ $this->_validateFilterType($filterType);
71
+ $this->_filters[$filterType][$filterValue] = true;
72
+ return $this;
73
+ }
74
+
75
+ public function removeFilter($filterType, $filterValue) {
76
+ $this->_validateFilterType($filterType);
77
+ unset($this->_filters[$filterType][$filterValue]);
78
+ return $this;
79
+ }
80
+
81
+ public function setFilter($filterType, $filterValue) {
82
+ $this->_validateFilterType($filterType);
83
+ if (!is_array($filterValue)) {
84
+ $filterValue = array($filterValue);
85
+ }
86
+ $this->_filters[$filterType] = array_fill_keys($filterValue, true);
87
+ return $this;
88
+ }
89
+
90
+ public function getFilter($filterType) {
91
+ $this->_validateFilterType($filterType);
92
+ return $this->_filters[$filterType];
93
+ }
94
+
95
+ public function addOptionalField($field) {
96
+ $this->_optionalFields[$field] = true;
97
+ return $this;
98
+ }
99
+
100
+ public function removeOptionalField($field) {
101
+ unset($this->_optionalFields[$field]);
102
+ return $this;
103
+ }
104
+
105
+ public function setOptionalFields($fields) {
106
+ if (!is_array($fields)) {
107
+ $fields = array($fields);
108
+ }
109
+ $this->_optionalFields = array_fill_keys($fields, true);
110
+ return $this;
111
+ }
112
+
113
+ public function getOptionalFields() {
114
+ return $this->_optionalFields;
115
+ }
116
+
117
+ public function getCsvData() {
118
+ if (empty($this->_rawCsvString)) {
119
+ $this->httpPost();
120
+ }
121
+ return $this->_parsedCsvArray;
122
+ }
123
+
124
+ public function getRawCsvData() {
125
+ if (empty($this->_rawCsvString)) {
126
+ $this->httpPost();
127
+ }
128
+ return $this->_rawCsvString;
129
+ }
130
+
131
+ public function httpPost($requestBody = '') {
132
+ $this->_formUrl();
133
+ $this->_rawCsvString = parent::httpPost($requestBody);
134
+ $this->_parsedCsvArray = $this->_parseCsv($this->_rawCsvString);
135
+ return $this;
136
+ }
137
+
138
+ protected function _validateFilterType($filterType) {
139
+ if (!in_array($filterType, $this->_filterTypes)) {
140
+ throw new Stpp_Exception(sprintf($this->__('The filter type "%s" does not exist.'), $filterType));
141
+ }
142
+ return $this;
143
+ }
144
+
145
+ protected function _formUrl() {
146
+ $array = $this->_filters;
147
+ $array['startdate'] = array($this->getStartDate() => true);
148
+ $array['enddate'] = array($this->getEndDate() => true);
149
+ $array['sitereferences'] = $this->getSiteReferences();
150
+ $array['optionalfields'] = $this->getOptionalFields();
151
+
152
+ $queryParams = array();
153
+ foreach($array as $queryKey => $queryValues) {
154
+ foreach($queryValues as $queryValue => $dummy) {
155
+ $queryParams[] = urlencode($queryKey) . '=' . urlencode($queryValue);
156
+ }
157
+ }
158
+ $queryString = implode('&', $queryParams);
159
+ $this->_url .= $queryString;
160
+ return $this;
161
+ }
162
+
163
+ protected function _parseCsv($rawCsvString) {
164
+ $rows = str_getcsv($rawCsvString, "\n");
165
+ $finalRows = array();
166
+
167
+ foreach($rows as $row) {
168
+ $finalRows[] = str_getcsv($row, ',');
169
+ }
170
+ array_shift($finalRows);
171
+ return $finalRows;
172
+ }
173
+ }
app/code/local/Securetrading/Stpp/lib/code/core/Stpp/Transactionsearch/BaseInterface.php ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ interface Stpp_Transactionsearch_BaseInterface extends Stpp_Http_BaseInterface {
4
+ function setStartDate($startDate);
5
+ function getStartDate();
6
+ function setEndDate($endDate);
7
+ function getEndDate();
8
+ function addSiteReference($siteReference);
9
+ function removeSiteReference($siteReference);
10
+ function setSiteReferences($siteReferences);
11
+ function getSiteReferences();
12
+ function addFilter($filterType, $filterValue);
13
+ function removeFilter($filterType, $filterValue);
14
+ function setFilter($filterType, $filterValues);
15
+ function getFilter($filterTypes);
16
+ function addOptionalField($field);
17
+ function removeOptionalField($field);
18
+ function setOptionalFields($fields);
19
+ function getOptionalFields();
20
+ function getCsvData();
21
+ function getRawCsvData();
22
+ }
app/code/local/Securetrading/Stpp/lib/code/core/Stpp/Types.php CHANGED
@@ -25,7 +25,6 @@ class Stpp_Types implements Stpp_TypesInterface {
25
  const CARD_ELECTRON = 'ELECTRON';
26
  const CARD_JCB = 'JCB';
27
  const CARD_KARENMILLEN = 'KARENMILLEN';
28
- const CARD_LASER = 'LASER';
29
  const CARD_MAESTRO = 'MAESTRO';
30
  const CARD_MASTERCARD = 'MASTERCARD';
31
  const CARD_MASTERCARDDEBIT = 'MASTERCARDDEBIT';
@@ -72,7 +71,6 @@ class Stpp_Types implements Stpp_TypesInterface {
72
  self::CARD_ELECTRON => 'Electron',
73
  self::CARD_JCB => 'JCB',
74
  self::CARD_KARENMILLEN => 'Karen Millen',
75
- self::CARD_LASER => 'Laser',
76
  self::CARD_MAESTRO => 'Maestro',
77
  self::CARD_MASTERCARD => 'Mastercard',
78
  self::CARD_MASTERCARDDEBIT => 'Mastercard Debit',
@@ -202,7 +200,7 @@ class Stpp_Types implements Stpp_TypesInterface {
202
  public static function getStartYears() {
203
  $startYears = array();
204
 
205
- for ($i = 20; $i > 0; $i--) {
206
  $year = date('Y', time() - ($i * (60 * 60 * 24 * 365)));
207
  $startYears[$i] = $year;
208
  }
25
  const CARD_ELECTRON = 'ELECTRON';
26
  const CARD_JCB = 'JCB';
27
  const CARD_KARENMILLEN = 'KARENMILLEN';
 
28
  const CARD_MAESTRO = 'MAESTRO';
29
  const CARD_MASTERCARD = 'MASTERCARD';
30
  const CARD_MASTERCARDDEBIT = 'MASTERCARDDEBIT';
71
  self::CARD_ELECTRON => 'Electron',
72
  self::CARD_JCB => 'JCB',
73
  self::CARD_KARENMILLEN => 'Karen Millen',
 
74
  self::CARD_MAESTRO => 'Maestro',
75
  self::CARD_MASTERCARD => 'Mastercard',
76
  self::CARD_MASTERCARDDEBIT => 'Mastercard Debit',
200
  public static function getStartYears() {
201
  $startYears = array();
202
 
203
+ for ($i = 20; $i >= 0; $i--) {
204
  $year = date('Y', time() - ($i * (60 * 60 * 24 * 365)));
205
  $startYears[$i] = $year;
206
  }
app/code/local/Securetrading/Stpp/lib/code/overrides/Magento/Api/Facade.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Magento_Api_Facade extends Stpp_Api_Facade {
4
+ public function newApiLog() {
5
+ $apiLog = new Stpp_Api_Log();
6
+ $apiLog->setLogWriter(new Magento_Log_Writer('securetrading_api'));
7
+ return $apiLog;
8
+ }
9
+ }
app/code/local/Securetrading/Stpp/lib/code/overrides/Magento/Log/Writer.php ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Magento_Log_Writer implements Stpp_Utility_Log_WriterInterface {
4
+ protected $_filename = '';
5
+
6
+ public function __construct($filename) {
7
+ $this->_filename = $filename;
8
+ }
9
+
10
+ public function log($message) {
11
+ Mage::log($message, null, $this->_filename . '.log');
12
+ }
13
+ }
app/code/local/Securetrading/Stpp/lib/code/overrides/Magento/Utility/Facade.php CHANGED
@@ -2,9 +2,16 @@
2
 
3
  class Magento_Utility_Facade extends Stpp_Utility_Facade {
4
  public function newDebugLog() {
5
- $logWriter = new Magento_Utility_Log_Writer();
6
  $debugLog = new Stpp_Utility_Log_Base();
7
  $debugLog->setLogWriter($logWriter);
8
  return $debugLog;
9
  }
 
 
 
 
 
 
 
10
  }
2
 
3
  class Magento_Utility_Facade extends Stpp_Utility_Facade {
4
  public function newDebugLog() {
5
+ $logWriter = new Magento_Log_Writer('securetrading');
6
  $debugLog = new Stpp_Utility_Log_Base();
7
  $debugLog->setLogWriter($logWriter);
8
  return $debugLog;
9
  }
10
+
11
+ public function newExceptionLog() {
12
+ $logWriter = new Magento_Log_Writer('securetrading_exception');
13
+ $debugLog = new Stpp_Utility_Log_Base();
14
+ $debugLog->setLogWriter($logWriter);
15
+ return $debugLog;
16
+ }
17
  }
app/code/local/Securetrading/Stpp/lib/code/overrides/Magento/Utility/Log/Writer.php DELETED
@@ -1,7 +0,0 @@
1
- <?php
2
-
3
- class Magento_Utility_Log_Writer implements Stpp_Utility_Log_WriterInterface {
4
- public function log($message) {
5
- Mage::log($message, null, 'securetrading.log');
6
- }
7
- }
 
 
 
 
 
 
 
app/code/local/Securetrading/Stpp/lib/stpp_logs/api.txt DELETED
File without changes
app/code/local/Securetrading/Stpp/lib/stpp_logs/exception.txt DELETED
File without changes
app/code/local/Securetrading/Stpp/readme.txt CHANGED
@@ -1,348 +1,3 @@
1
- -------------
2
- 1.1. Contents
3
- -------------
4
 
5
- 1.1. Contents
6
- 1.2. About
7
- 2.1. Configuration
8
- 2.2. Notification
9
- 2.3. Redirect
10
- 2.4. Site Security
11
- 2.5. Notification Hash
12
- 2.6. I-frames
13
- 2.7. Expected Behaviour
14
- 3.1. Support
15
-
16
- ----------
17
- 1.2. About
18
- ----------
19
-
20
- Extension version: 3.0.0
21
-
22
- PHP Version: 5.3 onwards.
23
-
24
- -------------------
25
- 2.1. Configuration
26
- -------------------
27
-
28
- To configure the extension you should perform the following steps:
29
-
30
- 1 - Login to your Magento administration area.
31
- 2 - Hover over 'System' and then click 'Configuration'.
32
- 3 - Select 'Payment Methods' on the left-hand menu.
33
- 4 - Click on 'SecureTrading STPP' - (the configurable fields are listed below)
34
- 5 - Configure the Secure Trading extension and click 'Save Config'.
35
-
36
- The following extension fields can be configured:
37
-
38
- Basic Configuration
39
- -------------------
40
- Enabled : This controls if the extension is enabled or not.
41
- Title : This is the title of the extension when shown on the storefront.
42
- Description : This is the description of the extension when shown on the storefront
43
- Applicable Countries : This allows the extension to be enabled for ALL countries or specific countries as required.
44
- Specific Countires : If applicable countries is set to "specific countries" this is the list of allowed countries.
45
- Use Iframe : Controls if an iframe is used to display the payment page
46
- Iframe Height : If the iframe is enabled this controls the height of the iframe.
47
- Iframe Width : If the iframe is enabled this controls the width of the iframe.
48
-
49
- Gateway Configuration
50
- ---------------------
51
- Site Reference : This is the site reference of your Secure Trading account.
52
- Use Site Security : Enable/disable the use of Site Security.
53
- Site Security Password : The Site Security Password used when generating the hash value.
54
- Use Notification Hash : Enabled/disable the use of Notification Hash
55
- Notification Hash Password : The Notification Hash Password used when generating the hash value.
56
- Parent CSS : The Parent CSS to use when displaying the payment page.
57
- Child CSS : The Child CSS to use when displaying the payment page.
58
- Parent JS : The Parent JS file to use when displaying the payment page.
59
- Child JS : The Child JS file to use when displaying the payment page.
60
- Payment Action : * Currently only "Authorize and Capture" is supported (see section 3.2 for more information). When set to Authorise & Capture settlestatus 0 is sent to Secure Trading and the payment will be scheduled for settlement in the next available run.
61
- Settle Due Date: The settle due date is the day that Secure Trading will schedule the payment to be included in the next available settlement run.
62
- Settle Status : This is the settle status that will be applied to this transaction. This should normally be set to 0.
63
-
64
- ------------------
65
- 2.2. Notification
66
- ------------------
67
-
68
- Notifications are responsible for updating order information in the Magento back-end after payment has been completed.
69
-
70
- You must set-up a notification using MyST - for more information about MyST please see http://www.securetrading.com/support/document/category/myst/
71
-
72
- To set-up a notification you should first add a filter and then a destination within MyST by performing the following steps:
73
-
74
- 1 - Login to MyST and select "Notifications".
75
-
76
- 2 - Select 'Add Filter' and then enter the following information:
77
-
78
- FILTERS:
79
- Description:
80
- Enter a recognizable name of your choice here e.g. "success and decline transactions"
81
-
82
- Requests:
83
- AUTH (mandatory)
84
- THREEDQUERY (optional)
85
- ACCOUNTCHECK (optional)
86
- RISKDEC (optional)
87
-
88
- Payment Types:
89
- Select all payment types
90
-
91
- Error Codes:
92
- 0 - successful transactions
93
- 70000 - decline transactions
94
-
95
- NOTE: Notifications can be sent for errorcodes other than 0 or 70000: e.g. for unauthenticated 3-D Secure payments.
96
- If you wish to be informed of errorcodes other than 0 or 70000 please contact the Secure Trading Support team (support@securetrading.com).
97
-
98
- 3 - Click 'Save'.
99
-
100
- 4 - Select 'Add Destination' and enter the following information:
101
-
102
-
103
- DESTINATIONS
104
- Description:
105
- Enter a recognizable name of your choice here e.g. "Magento notification destination"
106
-
107
- Notification Type:
108
- URL (This perform a HTTP POST to your Magento store)
109
-
110
- Process Notification:
111
- Online (A notification is sent to your store before the customer completes the transaction).
112
-
113
- Destination:
114
- <your_root_magento_install_here>/index.php/securetrading/redirect/notification
115
-
116
- Security Password:
117
- The value of this field is included in the notification security hash which can be used to verify the request has not been modified.
118
-
119
- Security Algorithm:
120
- sha256 (algorithm used for generating the notification hash)
121
-
122
- Fields: (select all of the following default fields)
123
- accounttypedescription
124
- billingprefixname
125
- billingfirstname
126
- billinglastname
127
- billingpremise
128
- billingstreet
129
- billingtown
130
- billingcounty
131
- billingpostcode
132
- billingcountryiso2a
133
- billingtelephone
134
- billingemail
135
- customerprefixname
136
- customerfirstname
137
- customerlastname
138
- customerpremise
139
- customerstreet
140
- customertown
141
- customercounty
142
- customerpostcode
143
- customercountryiso2a
144
- customertelephone
145
- customeremail
146
- enrolled
147
- errorcode
148
- maskedpan
149
- orderreference
150
- parenttransactionreference
151
- paymenttypedescription
152
- requesttypedescription
153
- securityresponseaddress
154
- securityresponsepostcode
155
- securityresponsesecuritycode
156
- settlestatus
157
- status
158
- transactionreference
159
-
160
- Custom Fields: (include the following custom fields)
161
- errordata
162
- errormessage
163
- order_increment_ids
164
- send_confirmation
165
-
166
- 5 - Click 'Save'.
167
- 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.
168
- 7 - Click 'Save'.
169
-
170
- The notification is now enabled.
171
-
172
- -------------
173
- 2.3. Redirect
174
- -------------
175
-
176
- Once a customer has successfully processed their transaction using the Secure Trading payment pages they can be redirected back to your Magento store.
177
-
178
- You can setup a redirect within MyST provided you have a MyST account with one of the following Roles associated with it:
179
-
180
- 1 - Site Admin
181
- 2 - Developer 1
182
- 3 - Developer 2
183
-
184
- Further information on setting up Redirects using MyST can be found within section 11 of the MyST User Guide (titled 'Payment Pages Redirects') which can be found at the following URL : http://www.securetrading.com/wp-content/uploads/2013/07/STPP-My-ST-User-Guide.pdf
185
-
186
- Redirect 1 Condition:
187
- ---------------------
188
- Accounts:
189
- ECOM
190
-
191
- Error codes:
192
- 0
193
-
194
- Requests:
195
- AUTH
196
-
197
- Redirect 1 Action:
198
- ------------------
199
- Redirect URL:
200
- <your_root_magento_install_here>/index.php/securetrading/redirect/redirect
201
-
202
- Fields:
203
- orderreference
204
-
205
- Custom Fields:
206
- order_increment_ids
207
-
208
- Redirect 1 - Further Information
209
- --------------------------------
210
-
211
- If your Magento installation supports multiple websites then you will need to create this redirect for each store that uses the Payment Pages. Use the following configuration:
212
-
213
- Advanced Settings: (for multiple websites only)
214
- 'Custom field 1 is [your store ID here]'.
215
-
216
- Redirect URL: (for multiple websites only)
217
- <your_root_store_url_here>/index.php/securetrading/redirect/redirect
218
-
219
- Redirect 2 Condition:
220
- ---------------------
221
- Accounts:
222
- MOTO
223
-
224
- Error codes:
225
- 0
226
-
227
- Requests:
228
- AUTH
229
-
230
- Redirect 2 Action:
231
- ------------------
232
- Redirect URL:
233
- <your_root_magento_install_here>/index.php/admin/sales_order_create_securetrading/redirect
234
-
235
- Fields:
236
- None
237
-
238
- ------------------
239
- 2.4. Site Security - (We strongly recommend enabling this feature).
240
- ------------------
241
-
242
- Site Security will prevent malicious users from modifying sensitive payment information when they are transferred from your Magento store to the Secure Trading payment pages.
243
-
244
- This feature can be enabled by following these steps:
245
-
246
- 1 - Login to your Magento administration area.
247
- 2 - Hover over 'System' and then click 'Configuration'.
248
- 3 - Select 'Payment Methods' on the left-hand menu.
249
- 4 - Click on 'SecureTrading STPP'.
250
- 5 - Click on 'Configure' to the right of 'SecureTrading Payment Pages'.
251
- 6 - Click on 'Configure' to the right of 'Gateway Configuration'.
252
- 7 - Set 'Use Site Security' to 'Yes'.
253
- 8 - Enter a hard to guess combination of letters and numbers into the 'Site Security Password' field. This combination should be at least 8 characters long.
254
- 9 - Click 'save'.
255
- 10 - You must now notify the Secure Trading Support team via email (support@securetrading.com) that you have "enabled the Site Security Password Hash". Please inform them that the Site Security fields are (in order):
256
- currencyiso3a
257
- mainamount
258
- sitereference
259
- settlestatus
260
- settleduedate
261
- orderreference
262
- accounttypedescription
263
- order_increment_ids
264
- PASSWORD *
265
-
266
- * The last field, 'PASSWORD', is to be the combination of characters you entered into the 'Site Security Password'.
267
-
268
- 'Site Security' is now enabled. Remember to never tell any other individuals your Site Security Password. Do not store hard copies of this password anywhere.
269
-
270
- ----------------------
271
- 2.5. Notification Hash - (We strongly recommended enabling this feature).
272
- ----------------------
273
-
274
- Enabling this feature will ensure that the information sent from Secure Trading to your Magento store has not been modified.
275
-
276
- See section 2.3 for more information on the notifications.
277
-
278
- To enable the notification hash you will firstly have to enter a 'Security Password' in the 'Destination' window of the MyST Notification page (see section 2.3).
279
- You will also have to enter the same password into the Secure Trading Magento extension configuration page. Details on how to configure the extension were given in section 2.2.
280
-
281
- --------------------
282
- 2.6. Iframe support
283
- --------------------
284
-
285
- By default the module uses iframes to redirect customers to the Payment Pages.
286
-
287
- If you wish to disable iframes set 'Use Iframes' to 'No' in the module configuration (see section 2.1). Also delete the text inside the 'Parent CSS' and 'Child JS' configuration options (see section 2.1).
288
-
289
- -----------------------
290
- 2.7. Expected Behaviour
291
- -----------------------
292
-
293
- Order status
294
- ------------
295
- * When a customer is transferred from the Magento store to the Secure Trading Payment Pages the Magento order status will be "Payment Pages".
296
- * When a notification is sent from Secure Trading to the Magento store for a successful (errorcode 0) transaction the Magento order status will be "Processing".
297
- * If Secure Trading return a suspended response for a transaction the Magento order status will be "Suspended" - these transactions should manually be reviewed and updated using the "Approve" or "Denied" buttons within Magento. They will also need to be updated using MyST.
298
-
299
- * When a payment attempt fails at the Payment Pages the attempt will be logged in the order history that is visible to administrators.
300
-
301
- Transaction reporting
302
- ---------------------
303
- See the 'Sales - ST Transactions' menu link to view all ST transactions logged within Magento. Or see the 'ST Transactions' tab when viewing a single order to see the transactions specific to just that order.
304
-
305
- Log files
306
- ---------
307
- A SecureTrading log file will be created. See /var/log/securetrading.log
308
-
309
- Exceptions will be put into /var/reports/* or /var/log/exception.log as per normal Magento behaviour.
310
-
311
- Incorrect notification configuration is recognised as an exception and also inserted into /var/log/reports* or /var/log/exception.log.
312
-
313
- Log files should be monitored regularly.
314
-
315
- Notification
316
- ------------
317
-
318
- If the customer changes any address fields on the Payment Pages the notification will update the address used for the order within Magento.
319
-
320
- Order Cancellation
321
- ------------------
322
-
323
- Orders must be cancelled manually when they have been abandoned in the Payment Pages. To determine which orders have been abandoned:
324
-
325
- 1 - Head to the 'Sales' screen of the admin area.
326
- 2 - Set the 'Status' filter to 'Payment Pages'.
327
- 3 - Set the 'Purchased On' filter to two days ago.
328
- 4 - Click 'Search'.
329
-
330
- The filtered orders can then be cancelled by doing the following:
331
-
332
- 1 - Click 'Select Visible'.
333
- 2 - Set 'Actions' to 'Cancel'.
334
- 3 - Click 'Submit'.
335
- 4 - Repeat until there are no filtered orders. Set 'View' to '200' if you have a large number of orders.
336
-
337
- ------------
338
- 3.1. Support
339
- ------------
340
-
341
- If you require any assistance then please contact us immediately.
342
-
343
- When contacting our Support department you should send the contents of /var/log/ and /var/reports/ with your initial support request.
344
-
345
- Please also send us any server access/error logs along with as much information as you can regarding your problem.
346
-
347
- http://www.securetrading.com/contact.html
348
- support@securetrading.com
1
+ The full readme for this module is located at:
 
 
2
 
3
+ http://www.securetrading.com/files/documentation/Magento-User-Guide.pdf
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/local/Securetrading/Stpp/sql/securetrading_stpp/install-3.0.0.php CHANGED
@@ -24,7 +24,7 @@ $table = $installer->getConnection()
24
  Varien_Db_Ddl_Table::ACTION_CASCADE, Varien_Db_Ddl_Table::ACTION_CASCADE)
25
  ->addIndex($installer->getIdxName('securetrading_stpp/requests', array('order_increment_id'), Varien_Db_Adapter_Interface::INDEX_TYPE_UNIQUE),
26
  array('order_increment_id'), array('type' => Varien_Db_Adapter_Interface::INDEX_TYPE_UNIQUE))
27
- ->setComment('Stores SecureTrading STPP Payment Pages request data. This data is mapped to the response object in the notification.')
28
  ;
29
  $installer->getConnection()->createTable($table);
30
 
@@ -58,7 +58,7 @@ $table = $installer->getConnection()
58
  ->addColumn('type_name', Varien_Db_Ddl_Table::TYPE_VARCHAR, 32, array(
59
  'nullable' => false,
60
  ), 'Name')
61
- ->setComment('SecureTrading API transaction types (e.g. AUTH, RISKDEC)')
62
  ;
63
  $installer->getConnection()->createTable($table);
64
 
@@ -145,7 +145,7 @@ $table = $installer->getConnection()
145
  Varien_Db_Ddl_Table::ACTION_CASCADE, Varien_Db_Ddl_Table::ACTION_CASCADE)
146
  ->addIndex($installer->getIdxName('securetrading_stpp/transactions', array('transaction_reference'), Varien_Db_Adapter_Interface::INDEX_TYPE_UNIQUE),
147
  array('transaction_reference'), array('type' => Varien_Db_Adapter_Interface::INDEX_TYPE_UNIQUE))
148
- ->setComment('Stores SecureTrading STPP transaction details.')
149
  ;
150
  $installer->getConnection()->createTable($table);
151
 
24
  Varien_Db_Ddl_Table::ACTION_CASCADE, Varien_Db_Ddl_Table::ACTION_CASCADE)
25
  ->addIndex($installer->getIdxName('securetrading_stpp/requests', array('order_increment_id'), Varien_Db_Adapter_Interface::INDEX_TYPE_UNIQUE),
26
  array('order_increment_id'), array('type' => Varien_Db_Adapter_Interface::INDEX_TYPE_UNIQUE))
27
+ ->setComment('Stores Secure Trading STPP Payment Pages request data. This data is mapped to the response object in the notification.')
28
  ;
29
  $installer->getConnection()->createTable($table);
30
 
58
  ->addColumn('type_name', Varien_Db_Ddl_Table::TYPE_VARCHAR, 32, array(
59
  'nullable' => false,
60
  ), 'Name')
61
+ ->setComment('Secure Trading API transaction types (e.g. AUTH, RISKDEC)')
62
  ;
63
  $installer->getConnection()->createTable($table);
64
 
145
  Varien_Db_Ddl_Table::ACTION_CASCADE, Varien_Db_Ddl_Table::ACTION_CASCADE)
146
  ->addIndex($installer->getIdxName('securetrading_stpp/transactions', array('transaction_reference'), Varien_Db_Adapter_Interface::INDEX_TYPE_UNIQUE),
147
  array('transaction_reference'), array('type' => Varien_Db_Adapter_Interface::INDEX_TYPE_UNIQUE))
148
+ ->setComment('Stores Secure Trading STPP transaction details.')
149
  ;
150
  $installer->getConnection()->createTable($table);
151
 
app/code/local/Securetrading/Stpp/sql/securetrading_stpp/upgrade-3.2.0-3.2.1.php CHANGED
@@ -3,21 +3,30 @@
3
  $installer = $this;
4
  $this->startSetup();
5
 
 
 
6
  $collection = Mage::getModel('sales/order_invoice')->getCollection();
7
  $collection->addFieldToFilter('transaction_id', array('null' => 'dummyvalue'));
8
 
9
  foreach($collection as $invoice) {
10
  $orderId = $invoice->getOrderId();
11
  $order = Mage::getModel('sales/order')->load($orderId);
12
-
 
 
 
 
13
  $transactions = Mage::getModel('securetrading_stpp/transaction')->findTransactions($orderId, Securetrading_Stpp_Model_Transaction_Types::TYPE_AUTH);
14
-
15
  if (count($transactions) !== 1) {
16
- throw new Exception(sprintf("%s transactions were returned.", (int) count($transactions)));
 
17
  }
18
-
19
  $invoice->setTransactionId($transactions[0]->getTransactionReference());
20
  $invoice->save();
 
 
21
  }
22
 
23
  $installer->endSetup();
3
  $installer = $this;
4
  $this->startSetup();
5
 
6
+ $logFilename = 'securetrading_stpp_320_321_upgrade.log';
7
+
8
  $collection = Mage::getModel('sales/order_invoice')->getCollection();
9
  $collection->addFieldToFilter('transaction_id', array('null' => 'dummyvalue'));
10
 
11
  foreach($collection as $invoice) {
12
  $orderId = $invoice->getOrderId();
13
  $order = Mage::getModel('sales/order')->load($orderId);
14
+
15
+ if (!$order->getIsSecuretradingPaymentMethod()) {
16
+ continue;
17
+ }
18
+
19
  $transactions = Mage::getModel('securetrading_stpp/transaction')->findTransactions($orderId, Securetrading_Stpp_Model_Transaction_Types::TYPE_AUTH);
20
+
21
  if (count($transactions) !== 1) {
22
+ Mage::log(sprintf('Skipping invoice "%s".', $invoice->getId()), null, $logFilename, true);
23
+ continue;
24
  }
25
+
26
  $invoice->setTransactionId($transactions[0]->getTransactionReference());
27
  $invoice->save();
28
+
29
+ Mage::log(sprintf('Updated invoice "%s" with transaction reference "%s".', $invoice->getId(), $transactions[0]->getTransactionReference()), null, $logFilename, true);
30
  }
31
 
32
  $installer->endSetup();
app/code/local/Securetrading/Stpp/sql/securetrading_stpp/upgrade-3.2.1-3.3.0.php ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ $installer = $this;
4
+ $installer->startSetup();
5
+ Mage::getConfig()->loadDb();
6
+
7
+ $connectionData = Mage::getModel('core/config_data')->getCollection()->addFieldToFilter('path', array(
8
+ array('like' => 'payment/securetrading_stpp_direct/ws_%'),
9
+ array('like' => 'payment/securetrading_stpp_direct/stapi_%'),
10
+ array('eq' => 'payment/securetrading_stpp_direct/connection')
11
+ ));
12
+
13
+ $transactionsearchCollection = Mage::getModel('core/config_data')->getCollection()->addFieldToFilter('path', array('like' => 'payment/securetrading_stpp_transactionsearch/%'));
14
+
15
+ foreach($transactionsearchCollection as $entry) {
16
+ foreach(array('direct', 'redirect') as $partOfNewKey) {
17
+ $newPath = 'payment/securetrading_stpp_' . $partOfNewKey . '/transactionsearch_' . array_pop(explode('/',$entry->getPath()));
18
+ Mage::getConfig()->saveConfig($newPath,$entry->getValue(),$entry->getScope(),$entry->getScopeId());
19
+ $entry->delete();
20
+ }
21
+ }
22
+
23
+ foreach($connectionData as $entry) {
24
+ $newPath = 'payment/securetrading_stpp_redirect/' . array_pop(explode('/', $entry->getPath()));
25
+ Mage::getConfig()->saveConfig($newPath,$entry->getValue(),$entry->getScope(),$entry->getScopeId());
26
+ }
27
+
28
+ $installer->endSetup();
app/design/adminhtml/default/default/template/securetrading/stpp/payment/direct/form.phtml CHANGED
@@ -23,6 +23,7 @@
23
  <input type="text" name="payment[securetrading_stpp_card_number]" id="<?php print $_code; ?>_card_number" class="required-entry" />
24
  </div>
25
  </li>
 
26
  <li>
27
  <label for="<?php print $_code; ?>_start_date_month">
28
  <?php print $this->getCardStartDateLabel(); ?>
@@ -40,6 +41,7 @@
40
  </select>
41
  </div>
42
  </li>
 
43
  <li>
44
  <label for="<?php print $_code; ?>_expiry_date_month">
45
  <?php print $this->getCardExpiryDateLabel(); ?>
@@ -66,7 +68,9 @@
66
  <div class="input-box">
67
  <input type="text" name="payment[securetrading_stpp_security_code]" id="<?php print $_code; ?>_security_code" class="required-entry" maxlength="4" />
68
  </div>
69
-
 
 
70
  <label for="<?php print $_code; ?>_issue_number">
71
  <?php print $this->getCardIssueNumberLabel(); ?>
72
  </label>
@@ -74,4 +78,5 @@
74
  <input type="text" name="payment[securetrading_stpp_issue_number]" id="<?php print $_code; ?>_issue_number" />
75
  </div>
76
  </li>
 
77
  </ul>
23
  <input type="text" name="payment[securetrading_stpp_card_number]" id="<?php print $_code; ?>_card_number" class="required-entry" />
24
  </div>
25
  </li>
26
+ <?php if ($this->canShowStartDate()): ?>
27
  <li>
28
  <label for="<?php print $_code; ?>_start_date_month">
29
  <?php print $this->getCardStartDateLabel(); ?>
41
  </select>
42
  </div>
43
  </li>
44
+ <?php endif; ?>
45
  <li>
46
  <label for="<?php print $_code; ?>_expiry_date_month">
47
  <?php print $this->getCardExpiryDateLabel(); ?>
68
  <div class="input-box">
69
  <input type="text" name="payment[securetrading_stpp_security_code]" id="<?php print $_code; ?>_security_code" class="required-entry" maxlength="4" />
70
  </div>
71
+ </li>
72
+ <?php if ($this->canShowIssueNumber()): ?>
73
+ <li>
74
  <label for="<?php print $_code; ?>_issue_number">
75
  <?php print $this->getCardIssueNumberLabel(); ?>
76
  </label>
78
  <input type="text" name="payment[securetrading_stpp_issue_number]" id="<?php print $_code; ?>_issue_number" />
79
  </div>
80
  </li>
81
+ <?php endif; ?>
82
  </ul>
app/design/adminhtml/default/default/template/securetrading/stpp/payment/direct/info.phtml CHANGED
@@ -1,15 +1,38 @@
1
  <b><?php print $this->getTitle(); ?></b>
2
  <br /><br />
3
  <ul>
4
- <li>Account Type Description: <?php print $this->getAccountTypeDescription(); ?></li>
 
 
 
5
  <li>Transaction Reference: <a href="<?php print $this->getTransactionReferenceUrl(); ?>"><?php print $this->getTransactionReference(); ?></a></li>
 
 
6
  <li>Security Response Address: <span style="<?php print $this->getSecurityAddressStyle(); ?>"><?php print $this->getSecurityAddress(); ?></span></li>
 
 
7
  <li>Security Response Postcode: <span style="<?php print $this->getSecurityPostcodeStyle(); ?>"><?php print $this->getSecurityPostcode(); ?></span></li>
 
 
8
  <li>Security Response Security Code: <span style="<?php print $this->getSecurityCodeStyle(); ?>"><?php print $this->getSecurityCode(); ?></span></li>
9
- <li>Payment Type: <?php print $this->getPaymentType(); ?></li>
10
- <li>Last 4 Card Digits: <?php print $this->getCcLast4(); ?></li>
 
 
 
11
  <li>3D Enrolled: <?php print $this->getEnrolled(); ?></li>
 
 
12
  <li>3D Status: <?php print $this->getStatus(); ?></li>
 
 
 
 
 
 
 
13
  </ul>
14
- <a href="<?php print $this->getMystUrl(); ?>" target="_blank">View in MyST</a>
15
- <br /><br />
 
 
1
  <b><?php print $this->getTitle(); ?></b>
2
  <br /><br />
3
  <ul>
4
+ <?php if ($this->getAccountTypeDescription()): ?>
5
+ <li>Account Type Description: <?php print $this->getAccountTypeDescription(); ?></li>
6
+ <?php endif; ?>
7
+ <?php if ($this->getTransactionReference()): ?>
8
  <li>Transaction Reference: <a href="<?php print $this->getTransactionReferenceUrl(); ?>"><?php print $this->getTransactionReference(); ?></a></li>
9
+ <?php endif; ?>
10
+ <?php if ($this->getSecurityAddress()): ?>
11
  <li>Security Response Address: <span style="<?php print $this->getSecurityAddressStyle(); ?>"><?php print $this->getSecurityAddress(); ?></span></li>
12
+ <?php endif; ?>
13
+ <?php if ($this->getSecurityPostcode()): ?>
14
  <li>Security Response Postcode: <span style="<?php print $this->getSecurityPostcodeStyle(); ?>"><?php print $this->getSecurityPostcode(); ?></span></li>
15
+ <?php endif; ?>
16
+ <?php if ($this->getSecurityCode()): ?>
17
  <li>Security Response Security Code: <span style="<?php print $this->getSecurityCodeStyle(); ?>"><?php print $this->getSecurityCode(); ?></span></li>
18
+ <?php endif; ?>
19
+ <?php if ($this->getFraudControlShieldStatusCode()): ?>
20
+ <li>Fraud Control Shield Status Code: <span style="<?php print $this->getFraudControlShieldStatusCodeStyle(); ?>"><?php print $this->getFraudControlShieldStatusCode(); ?></span></li>
21
+ <?php endif; ?>
22
+ <?php if ($this->getEnrolled()): ?>
23
  <li>3D Enrolled: <?php print $this->getEnrolled(); ?></li>
24
+ <?php endif; ?>
25
+ <?php if ($this->getStatus()): ?>
26
  <li>3D Status: <?php print $this->getStatus(); ?></li>
27
+ <?php endif; ?>
28
+ <?php if ($this->getPaymentType()): ?>
29
+ <li>Payment Type: <?php print $this->getPaymentType(); ?></li>
30
+ <?php endif; ?>
31
+ <?php if ($this->getCcLast4()): ?>
32
+ <li>Last 4 Card Digits: <?php print $this->getCcLast4(); ?></li>
33
+ <?php endif; ?>
34
  </ul>
35
+ <?php if ($this->getTransactionReference()): ?>
36
+ <a href="<?php print $this->getMystUrl(); ?>" target="_blank">View in MyST</a>
37
+ <br /><br />
38
+ <?php endif; ?>
app/design/adminhtml/default/default/template/securetrading/stpp/payment/redirect/info.phtml CHANGED
@@ -1,15 +1,38 @@
1
  <b><?php print $this->getTitle(); ?></b>
2
  <br /><br />
3
  <ul>
4
- <li>Account Type Description: <?php print $this->getAccountTypeDescription(); ?></li>
 
 
 
5
  <li>Transaction Reference: <a href="<?php print $this->getTransactionReferenceUrl(); ?>"><?php print $this->getTransactionReference(); ?></a></li>
 
 
6
  <li>Security Response Address: <span style="<?php print $this->getSecurityAddressStyle(); ?>"><?php print $this->getSecurityAddress(); ?></span></li>
 
 
7
  <li>Security Response Postcode: <span style="<?php print $this->getSecurityPostcodeStyle(); ?>"><?php print $this->getSecurityPostcode(); ?></span></li>
 
 
8
  <li>Security Response Security Code: <span style="<?php print $this->getSecurityCodeStyle(); ?>"><?php print $this->getSecurityCode(); ?></span></li>
9
- <li>Payment Type: <?php print $this->getPaymentType(); ?></li>
10
- <li>Last 4 Card Digits: <?php print $this->getCcLast4(); ?></li>
 
 
 
11
  <li>3D Enrolled: <?php print $this->getEnrolled(); ?></li>
 
 
12
  <li>3D Status: <?php print $this->getStatus(); ?></li>
 
 
 
 
 
 
 
13
  </ul>
14
- <a href="<?php print $this->getMystUrl(); ?>" target="_blank">View in MyST</a>
15
- <br /><br />
 
 
1
  <b><?php print $this->getTitle(); ?></b>
2
  <br /><br />
3
  <ul>
4
+ <?php if ($this->getAccountTypeDescription()): ?>
5
+ <li>Account Type Description: <?php print $this->getAccountTypeDescription(); ?></li>
6
+ <?php endif; ?>
7
+ <?php if ($this->getTransactionReference()): ?>
8
  <li>Transaction Reference: <a href="<?php print $this->getTransactionReferenceUrl(); ?>"><?php print $this->getTransactionReference(); ?></a></li>
9
+ <?php endif; ?>
10
+ <?php if ($this->getSecurityAddress()): ?>
11
  <li>Security Response Address: <span style="<?php print $this->getSecurityAddressStyle(); ?>"><?php print $this->getSecurityAddress(); ?></span></li>
12
+ <?php endif; ?>
13
+ <?php if ($this->getSecurityPostcode()): ?>
14
  <li>Security Response Postcode: <span style="<?php print $this->getSecurityPostcodeStyle(); ?>"><?php print $this->getSecurityPostcode(); ?></span></li>
15
+ <?php endif; ?>
16
+ <?php if ($this->getSecurityCode()): ?>
17
  <li>Security Response Security Code: <span style="<?php print $this->getSecurityCodeStyle(); ?>"><?php print $this->getSecurityCode(); ?></span></li>
18
+ <?php endif; ?>
19
+ <?php if ($this->getFraudControlShieldStatusCode()): ?>
20
+ <li>Fraud Control Shield Status Code: <span style="<?php print $this->getFraudControlShieldStatusCodeStyle(); ?>"><?php print $this->getFraudControlShieldStatusCode(); ?></span></li>
21
+ <?php endif; ?>
22
+ <?php if ($this->getEnrolled()): ?>
23
  <li>3D Enrolled: <?php print $this->getEnrolled(); ?></li>
24
+ <?php endif; ?>
25
+ <?php if ($this->getStatus()): ?>
26
  <li>3D Status: <?php print $this->getStatus(); ?></li>
27
+ <?php endif; ?>
28
+ <?php if ($this->getPaymentType()): ?>
29
+ <li>Payment Type: <?php print $this->getPaymentType(); ?></li>
30
+ <?php endif; ?>
31
+ <?php if ($this->getCcLast4()): ?>
32
+ <li>Last 4 Card Digits: <?php print $this->getCcLast4(); ?></li>
33
+ <?php endif; ?>
34
  </ul>
35
+ <?php if ($this->getTransactionReference()): ?>
36
+ <a href="<?php print $this->getMystUrl(); ?>" target="_blank">View in MyST</a>
37
+ <br /><br />
38
+ <?php endif; ?>
app/design/adminhtml/default/default/template/securetrading/stpp/sales/transactions/single.phtml CHANGED
@@ -63,7 +63,7 @@
63
  </tr>
64
  <tr>
65
  <th><?php echo $this->__('MyST'); ?></th>
66
- <td><a href="<?php print $this->getMystUrl(); ?>">View in MyST</a></td>
67
  </tr>
68
  </tbody>
69
  </table>
63
  </tr>
64
  <tr>
65
  <th><?php echo $this->__('MyST'); ?></th>
66
+ <td><a href="<?php print $this->getMystUrl(); ?>" target="_blank">View in MyST</a></td>
67
  </tr>
68
  </tbody>
69
  </table>
app/design/frontend/base/default/template/securetrading/stpp/payment/direct/form.phtml CHANGED
@@ -29,6 +29,7 @@
29
  <?php //print $this->getCardNumberDescription(); ?>
30
  </div>
31
  </li>
 
32
  <li>
33
  <label for="<?php print $_code; ?>_start_date_month">
34
  <?php print $this->getCardStartDateLabel(); ?>
@@ -50,6 +51,7 @@
50
  </div>
51
  </div>
52
  </li>
 
53
  <li>
54
  <label for="<?php print $_code; ?>_expiry_date_month" class="required">
55
  <?php print $this->getCardExpiryDateLabel(); ?>
@@ -81,7 +83,9 @@
81
  <input type="text" name="payment[securetrading_stpp_security_code]" id="<?php print $_code; ?>_security_code" class="required-entry" maxlength="4" />
82
  <?php //print $this->getCardSecurityCodeDescription(); ?>
83
  </div>
84
-
 
 
85
  <label for="<?php print $_code; ?>_issue_number">
86
  <?php print $this->getCardIssueNumberLabel(); ?>
87
  </label>
@@ -90,5 +94,6 @@
90
  <?php //print $this->getCardIssueNumberDescription(); ?>
91
  </div>
92
  </li>
 
93
  </ul>
94
  </fieldset>
29
  <?php //print $this->getCardNumberDescription(); ?>
30
  </div>
31
  </li>
32
+ <?php if ($this->canShowStartDate()): ?>
33
  <li>
34
  <label for="<?php print $_code; ?>_start_date_month">
35
  <?php print $this->getCardStartDateLabel(); ?>
51
  </div>
52
  </div>
53
  </li>
54
+ <?php endif; ?>
55
  <li>
56
  <label for="<?php print $_code; ?>_expiry_date_month" class="required">
57
  <?php print $this->getCardExpiryDateLabel(); ?>
83
  <input type="text" name="payment[securetrading_stpp_security_code]" id="<?php print $_code; ?>_security_code" class="required-entry" maxlength="4" />
84
  <?php //print $this->getCardSecurityCodeDescription(); ?>
85
  </div>
86
+ </li>
87
+ <?php if ($this->canShowIssueNumber()): ?>
88
+ <li>
89
  <label for="<?php print $_code; ?>_issue_number">
90
  <?php print $this->getCardIssueNumberLabel(); ?>
91
  </label>
94
  <?php //print $this->getCardIssueNumberDescription(); ?>
95
  </div>
96
  </li>
97
+ <?php endif; ?>
98
  </ul>
99
  </fieldset>
app/design/frontend/base/default/template/securetrading/stpp/payment/direct/info.phtml CHANGED
@@ -3,7 +3,7 @@
3
  <ul>
4
  <li>Payment Type: <?php print $this->getPaymentType(); ?></li>
5
  <li>Last 4 Card Digits: <?php print $this->getCcLast4(); ?></li>
6
- <?php if ($this->getStartDate()): ?>
7
  <li>Start Date: <?php print $this->getStartDate(); ?></li>
8
  <?php endif; ?>
9
  <li>Expiry Date: <?php print $this->getExpiryDate(); ?></li>
3
  <ul>
4
  <li>Payment Type: <?php print $this->getPaymentType(); ?></li>
5
  <li>Last 4 Card Digits: <?php print $this->getCcLast4(); ?></li>
6
+ <?php if ($this->getStartDate() && $this->getStartDate() !== '/'): ?>
7
  <li>Start Date: <?php print $this->getStartDate(); ?></li>
8
  <?php endif; ?>
9
  <li>Expiry Date: <?php print $this->getExpiryDate(); ?></li>
app/etc/modules/SecureTrading_Stpp.xml CHANGED
@@ -3,6 +3,9 @@
3
  <Securetrading_Stpp>
4
  <codePool>local</codePool>
5
  <active>true</active>
 
 
 
6
  </Securetrading_Stpp>
7
  </modules>
8
  </config>
3
  <Securetrading_Stpp>
4
  <codePool>local</codePool>
5
  <active>true</active>
6
+ <depends>
7
+ <Securetrading_Multishipping/>
8
+ </depends>
9
  </Securetrading_Stpp>
10
  </modules>
11
  </config>
package.xml CHANGED
@@ -1,8 +1,8 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Securetrading_Stpp</name>
4
- <version>3.2.1.1</version>
5
- <stability>beta</stability>
6
  <license>GPL</license>
7
  <channel>community</channel>
8
  <extends/>
@@ -10,9 +10,9 @@
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-06-05</date>
14
- <time>14:43:03</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="0bd4d015736253fdb49a71761e0ce167"/><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="b959d39031f05c4c4cdc9c86d949d2fb"/><file name="Request.php" hash="974c787900f673b88789e077bbb1cdee"/><file name="Response.php" hash="cde9edd437f258f3790d48d4801d1d14"/></dir><file name="Grid.php" hash="3dadcca29051df9ef955fb3f779bc77e"/><file name="Single.php" hash="e0f722dd28882d3f60f73c11a70da963"/><dir name="Type"><file name="Abstract.php" hash="d6fc7cebd2fabb908e56e1b31430606a"/><file name="Default.php" hash="3b079c4dc23ae7ca0dde58d90d76ce1b"/><dir name="Transactionupdate"><file name="Filters.php" hash="fb57db23243321b2e3adbe8d4d6b6b00"/><file name="Updates.php" hash="97cf9ab359d5832eef6e994c76f10229"/></dir><file name="Transactionupdate.php" hash="054a96bd931424b9b8e3123252d815a7"/></dir></dir><file name="Transactions.php" hash="d7a848751b019beed67af4af8d82f19e"/></dir><dir name="System"><dir name="Config"><dir name="Fieldset"><file name="Fields.php" hash="6a4b315ba3d3d9eabe627f04ed36af51"/></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="dc9037dbae9b10ccf088b24fc08e7dd2"/></dir><file name="Iframe.php" hash="1bf66cdd951253928cce893d7235ccf2"/><dir name="Info"><file name="Abstract.php" hash="d3b57a1f6bb7353aa066ea669c5179c7"/></dir><file name="Location.php" hash="2ffcd84c447b187ffa6dc0e45b6393ac"/><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="0d3f5c0f5b3db287e750e5ea2519c805"/><file name="Direct.php" hash="04adfd2beab16e9348c94b0c36163f53"/><file name="Redirect.php" hash="0c477c21df66309dd95dd1cec4c86e9e"/></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="916d31052581fca3513dfef1d2b869af"/><file name="Observer.php" hash="389dd2e397316d34e6134bafddb74819"/><dir name="Payment"><file name="Abstract.php" hash="8d7c6f8b69864495798cd38bf8cf4508"/><dir name="Direct"><file name="Session.php" hash="981654031f061f1e04efc80b4a57b428"/></dir><file name="Direct.php" hash="3af1c6643afecba86218e2344d82135c"/><dir name="Redirect"><file name="Notification.php" hash="22e2a3366aa294f83aabe94decdbc47f"/><file name="Request.php" hash="cb3b90d9bb7a31bec42ae94ae83770cb"/></dir><file name="Redirect.php" hash="2ca42d783848851c55d77d4f1603baca"/></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="1c3712f053e0dadd4edc34ec115effff"/></dir><file name="Transaction.php" hash="3501a9f1f4b340a28413c4c17332c0f9"/></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="5babd6cb7602948f8a2a2cce169b829c"/><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="9bdfa028b78c80b28526d4c7b8342deb"/><dir name="Sales"><dir name="Order"><dir name="Create"><file name="SecuretradingController.php" hash="f4ffe353922e6063f7c734806b16c224"/></dir><file name="CreateController.php" hash="7964d98f1574c0f93dbb43e87161f1f8"/><file name="EditController.php" hash="a12e458fac106c021367426031356f58"/></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="69af42326d93aa440195d81ac0b0b429"/><file name="system.xml" hash="7e8cda4186496dbdd62e29c86a8d6515"/></dir><dir name="lib"><file name="Securetrading.php" hash="5c22e508ffd059847ffb882aba923b2b"/><dir name="code"><dir name="core"><dir name="Stpp"><dir name="Actions"><file name="Abstract.php" hash="462542d98f325cc497d6ff21b76714fc"/><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="fc1ab0625bdecb34662793d76a55b57b"/></dir><file name="Context.php" hash="0ca6f4a61de6113b124795ed8fe83cab"/><file name="ContextInterface.php" hash="b3e9edfa4fe8776140eafce41da98709"/><file name="Facade.php" hash="18a61ca48dbab4a429a7db49bd753ae6"/><file name="Helper.php" hash="1a744bee30eecf5d13cddc29d02049eb"/><file name="HelperInterface.php" hash="aa6f9747d5c2f242455d5c11be51b66b"/><file name="Log.php" hash="8f9df624ea7e440f7d074be07a98e511"/><file name="LogInterface.php" hash="fce5c3d966eaf5885f3575bd800c6d46"/><dir name="Process"><dir name="Calculation"><file name="BaseInterface.php" hash="385960d9d3cd780d194716300a8fc1fa"/><file name="CardstoreNoncardstoreCombined.php" hash="5390f91635fac340ada1bc9d9116a85c"/><file name="Default.php" hash="fc6fbc1b5ad9b405eab5ccfba644fab5"/><file name="RiskdecNonriskdecCombined.php" hash="f72e84f24e5bc57842d15c556e6b275e"/><file name="TuRefundCombined.php" hash="9de65bce6f7d6e49574f4aafb8075ffb"/></dir></dir><file name="Process.php" hash="1809c3052c3fa9147e806493742ce3e5"/><file name="ProcessInterface.php" hash="76117fc893006c7a927eda90596261f3"/><file name="Result.php" hash="d9da44e9241b8b9d7577de8e7e5d6ef0"/><file name="ResultInterface.php" hash="345346e779a4644c8f29d847100ae779"/><file name="Send.php" hash="353c400fe8a72db44a514df07074b6a3"/><file name="SendInterface.php" hash="0a13ea22e3d2f556be7f02d5b8568e43"/><dir name="Xml"><file name="Reader.php" hash="4791b2c4ef0d0997bb063a8c08ceaedf"/><file name="ReaderInterface.php" hash="3a148a5b88af125d766877f33dd882b7"/><file name="Writer.php" hash="2ec6b1e68bd1ca54bcb548db8779b8f3"/><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="9186ff9e00d3446e85dbf19ea1216e6a"/><file name="AbstractInterface.php" hash="511f49db6045b20b299ac27a123b0ee1"/><file name="Request.php" hash="a4206b389b91b3506b66b9942d922976"/><file name="Response.php" hash="41bce777ce4baf6d33f5efe1a754e1f1"/></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="5eada117593cf8c9bb27a6060f6c3714"/></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><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="a4ae94ed11f53075b6a5513bd7082da6"/><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"/><file name="upgrade-3.1.0-3.2.0.php" hash="6f9e0b4cb006faede031f5a170af8798"/><file name="upgrade-3.2.0-3.2.1.php" hash="0f5e6cbb426a90339ad6900fd63f9016"/></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"/><file name="location.phtml" hash="e790bf7d7f7c453f98cd9e03e0b74ab1"/><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="062fb0afe59e07f89828b4c162de2773"/></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="c9253b162d0b6ea0fb8297b70606711e"/></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="906aacd5e1f49d2d1b8b710d4b50a26d"/></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>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Securetrading_Stpp</name>
4
+ <version>3.3.0</version>
5
+ <stability>stable</stability>
6
  <license>GPL</license>
7
  <channel>community</channel>
8
  <extends/>
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-07-18</date>
14
+ <time>15:59:26</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="0bd4d015736253fdb49a71761e0ce167"/><file name="Transactions.php" hash="a6aa9a1fe720256b57de515eb2fb70f6"/></dir></dir></dir><dir name="Transactions"><file name="Children.php" hash="0b35ac5e3a5640ef299797f2cc2928cb"/><dir name="Data"><file name="Abstract.php" hash="b959d39031f05c4c4cdc9c86d949d2fb"/><file name="Request.php" hash="974c787900f673b88789e077bbb1cdee"/><file name="Response.php" hash="cde9edd437f258f3790d48d4801d1d14"/></dir><file name="Grid.php" hash="3dadcca29051df9ef955fb3f779bc77e"/><file name="Single.php" hash="e0f722dd28882d3f60f73c11a70da963"/><dir name="Type"><file name="Abstract.php" hash="d6fc7cebd2fabb908e56e1b31430606a"/><file name="Default.php" hash="3b079c4dc23ae7ca0dde58d90d76ce1b"/><dir name="Transactionupdate"><file name="Filters.php" hash="fb57db23243321b2e3adbe8d4d6b6b00"/><file name="Updates.php" hash="97cf9ab359d5832eef6e994c76f10229"/></dir><file name="Transactionupdate.php" hash="054a96bd931424b9b8e3123252d815a7"/></dir></dir><file name="Transactions.php" hash="d7a848751b019beed67af4af8d82f19e"/></dir><dir name="System"><dir name="Config"><dir name="Fieldset"><file name="Fields.php" hash="42a106af65c7c18b91abfa609b67f73f"/></dir><file name="Group.php" hash="fb37a1754315559cb708dc03a5b61219"/></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="f2aceb73c95cae73aa21d02de0431b80"/><file name="Info.php" hash="96b45fd3a2530d32ad5b762d30adb349"/><file name="Post.php" hash="dc9037dbae9b10ccf088b24fc08e7dd2"/></dir><file name="Iframe.php" hash="1bf66cdd951253928cce893d7235ccf2"/><dir name="Info"><file name="Abstract.php" hash="83a78172f8dc75490c820b4d88ff4f49"/></dir><file name="Location.php" hash="2ffcd84c447b187ffa6dc0e45b6393ac"/><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="43c563ba6a207520f9a4ce3a38ee9138"/></dir><dir name="Model"><dir name="Actions"><file name="Abstract.php" hash="f81b7d408bc5555476a28ccc4f1b31fd"/><file name="Direct.php" hash="9e9eda8f3d445ffc5244bd5f98fc2e35"/><file name="Redirect.php" hash="31aedee830305a443608d3dc0b337eb2"/></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="34f1a9e397aeb1ecfc8cee8a53dde103"/><file name="Integration.php" hash="afed9c50a42394b69066b34805101642"/><file name="Observer.php" hash="e652c01780693ec452f97447a509e61d"/><dir name="Payment"><file name="Abstract.php" hash="0939204996591fe0fbcf79e93b3a987e"/><dir name="Direct"><file name="Session.php" hash="981654031f061f1e04efc80b4a57b428"/></dir><file name="Direct.php" hash="804669d96551f43860c2ef8714d82048"/><dir name="Redirect"><file name="Notification.php" hash="22e2a3366aa294f83aabe94decdbc47f"/><file name="Request.php" hash="cb3b90d9bb7a31bec42ae94ae83770cb"/></dir><file name="Redirect.php" hash="13d1b169ff183b417b9b2d8b082b1a2e"/></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="dc304f8a01d89fa8af5c14c7166d9571"/></dir><dir name="Transaction"><file name="Types.php" hash="1c3712f053e0dadd4edc34ec115effff"/></dir><file name="Transaction.php" hash="543277351dad9217f2bd8284e26531b1"/></dir><dir name="controllers"><dir name="Direct"><file name="PostController.php" hash="8961fb743e3fd0124c0e642ff74a6810"/></dir><file name="DirectController.php" hash="45e17654696f0bff3c7f5992a2297d1c"/><file name="MultishippingController.php" hash="29eba3273479799bca3ec36c32d0f86a"/><file name="PaymentController.php" hash="5babd6cb7602948f8a2a2cce169b829c"/><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="7a3929672dd1e4a665f3af544bfd8d49"/><dir name="Sales"><dir name="Order"><dir name="Create"><file name="SecuretradingController.php" hash="e3c89bb8942d8676b0f043adcc226dfe"/></dir><file name="CreateController.php" hash="7964d98f1574c0f93dbb43e87161f1f8"/><file name="EditController.php" hash="a12e458fac106c021367426031356f58"/></dir></dir><dir name="Securetrading"><file name="TransactionsController.php" hash="ca39e6bb66bfd59cf6bf0176144bd256"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="edf6376a0d883ae4fedc024d346364b3"/><file name="config.xml" hash="8c72e5fed3edeb3f20971ebf2aafc1c2"/><file name="system.xml" hash="1e4613ebf143ea2171e412bb3ad0b5fa"/></dir><dir name="lib"><file name="Securetrading.php" hash="5c22e508ffd059847ffb882aba923b2b"/><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="68a5b1eff62192578a122f327d32f59a"/><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="bb81a31ffc9a8ba20fbe393fdb04cac7"/></dir><file name="Context.php" hash="0ca6f4a61de6113b124795ed8fe83cab"/><file name="ContextInterface.php" hash="b3e9edfa4fe8776140eafce41da98709"/><file name="Facade.php" hash="a1d4eae820c686ab8cfa1ab0ee3b5d1f"/><file name="Helper.php" hash="e0496608a3ff3b7d61e82e06d62e61e8"/><file name="HelperInterface.php" hash="aa6f9747d5c2f242455d5c11be51b66b"/><file name="Log.php" hash="8f9df624ea7e440f7d074be07a98e511"/><file name="LogInterface.php" hash="fce5c3d966eaf5885f3575bd800c6d46"/><dir name="Process"><dir name="Calculation"><file name="BaseInterface.php" hash="385960d9d3cd780d194716300a8fc1fa"/><file name="CardstoreNoncardstoreCombined.php" hash="5390f91635fac340ada1bc9d9116a85c"/><file name="Default.php" hash="fc6fbc1b5ad9b405eab5ccfba644fab5"/><file name="RiskdecNonriskdecCombined.php" hash="f72e84f24e5bc57842d15c556e6b275e"/><file name="TuRefundCombined.php" hash="9de65bce6f7d6e49574f4aafb8075ffb"/></dir></dir><file name="Process.php" hash="fb37ea94d51524af9505667ca33161db"/><file name="ProcessInterface.php" hash="76117fc893006c7a927eda90596261f3"/><file name="Result.php" hash="d9da44e9241b8b9d7577de8e7e5d6ef0"/><file name="ResultInterface.php" hash="345346e779a4644c8f29d847100ae779"/><file name="Send.php" hash="353c400fe8a72db44a514df07074b6a3"/><file name="SendInterface.php" hash="0a13ea22e3d2f556be7f02d5b8568e43"/><dir name="Xml"><file name="Reader.php" hash="6c2ffe5d46d5828d695feae5b5c2b969"/><file name="ReaderInterface.php" hash="3a148a5b88af125d766877f33dd882b7"/><file name="Writer.php" hash="2ec6b1e68bd1ca54bcb548db8779b8f3"/><file name="WriterInterface.php" hash="1700903ae09c5dec1a8b6c215a6f0a97"/></dir></dir><dir name="Component"><file name="Abstract.php" hash="d679a67d53fee2ad8a38d8e9175707f6"/><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="9186ff9e00d3446e85dbf19ea1216e6a"/><file name="AbstractInterface.php" hash="511f49db6045b20b299ac27a123b0ee1"/><file name="Request.php" hash="a4206b389b91b3506b66b9942d922976"/><file name="Response.php" hash="41bce777ce4baf6d33f5efe1a754e1f1"/></dir><file name="Exception.php" hash="ddef67bc724764d3fa455b3f246e670d"/><file name="Facade.php" hash="b044ddd9a1c2e0097bea099efa1f6bd5"/><dir name="Fields"><file name="Admin.php" hash="9bd92eb9fc82ee7ddd2b42fb43ddb23b"/><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="Http"><file name="Base.php" hash="0af2b3e2ba1be476a8c828b01502d906"/><file name="BaseInterface.php" hash="ec910ae696a968ba91991d4e9593bc5a"/><file name="Helper.php" hash="0854cc287d4fe2e8db833730db86b3b1"/><file name="HelperInterface.php" hash="f70f0aac9734f70f62483362ec111470"/></dir><dir name="PaymentPages"><file name="ActionsInterface.php" hash="477836396b30505fd77e2edab9228eb9"/><file name="Base.php" hash="644dabfcc9439009a093cbae56f5b51c"/><file name="BaseInterface.php" hash="8e88b88ea80bbc678275b545f5a0ca0e"/><file name="Facade.php" hash="0cb8b0a018774a8d00474857ca048286"/><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><dir name="Transactionsearch"><file name="Base.php" hash="76e61d0f724035f816c399e89d6e6884"/><file name="BaseInterface.php" hash="fbd240c914a21eb174bf7c52fff645fe"/></dir><file name="Types.php" hash="116bf208c9d6e76763f9e8a36e68e1e9"/><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="5eada117593cf8c9bb27a6060f6c3714"/></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="Api"><file name="Facade.php" hash="0cd067db115b4f5ed00abc434db2245f"/></dir><dir name="Log"><file name="Writer.php" hash="b27229288c0eda838b9a2113c788344c"/></dir><dir name="Utility"><file name="Facade.php" hash="9b6c7e6955acce41cad9121c8028ae09"/></dir></dir></dir></dir><dir name="stpp_translations"><file name="core.php" hash="8de46a7cce58eadbff4ae9b294e20aec"/></dir></dir><file name="readme.txt" hash="fb7d4f0b1527e6574cbe96073aac6eda"/><dir name="sql"><dir name="securetrading_stpp"><file name="install-3.0.0.php" hash="923d824b156fb74eeb195ee57723e26b"/><file name="upgrade-3.0.0-3.1.0.php" hash="779de6f21f30913707d67573434c5827"/><file name="upgrade-3.1.0-3.2.0.php" hash="6f9e0b4cb006faede031f5a170af8798"/><file name="upgrade-3.2.0-3.2.1.php" hash="fc652e065a2375fa7a61679a5553c7d6"/><file name="upgrade-3.2.1-3.3.0.php" hash="d3ca3b1936b10f8254c676e1fd7392fe"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="securetrading"><dir name="stpp"><dir><dir name="payment"><dir name="direct"><file name="form.phtml" hash="5b41701f83182d12d530a78fc3c24d77"/><file name="info.phtml" hash="0573ae000e6b1df77c89c71b108cfa10"/></dir><file name="iframe.phtml" hash="550f6904467d71a368b03b2ba6852841"/><file name="location.phtml" hash="e790bf7d7f7c453f98cd9e03e0b74ab1"/><dir name="redirect"><file name="form.phtml" hash="d41d8cd98f00b204e9800998ecf8427e"/><file name="info.phtml" hash="0573ae000e6b1df77c89c71b108cfa10"/><file name="post.phtml" hash="8b0b70df44ce27b54c57c7369dd59655"/></dir></dir><dir name="sales"><dir name="transactions"><file name="single.phtml" hash="a3dbbda792cb4d806e6283ed7f964634"/></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="c9253b162d0b6ea0fb8297b70606711e"/></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="securetrading"><dir name="stpp"><dir><dir name="payment"><dir name="direct"><file name="form.phtml" hash="3068d1391e1bbe6bb957b6cafc912651"/><file name="info.phtml" hash="a81bbf7d28e9f1c3e9e837f6542c3a58"/><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="906aacd5e1f49d2d1b8b710d4b50a26d"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="SecureTrading_Stpp.xml" hash="eb2a4153d2e9feed7913b46666fb585c"/></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_100_32.png" hash="002186134f7898800305489774711fb7"/><file name="st_logo_strapline_200_63.png" hash="bca24f2696fca0d2bca54681a635e8e3"/><file name="success_16_16.png" hash="5fa7c06b312cbea3675e844686e434af"/></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><package><name>Securetrading_Multishipping</name><channel>community</channel><min/><max/></package></required></dependencies>
18
  </package>
skin/adminhtml/default/default/images/securetrading/stpp/st_logo_strapline_100_32.png ADDED
Binary file
skin/adminhtml/default/default/images/securetrading/stpp/success_16_16.png ADDED
Binary file