666999 - Version 0.4.4

Version Notes

Implements Interac payments feature.

Download this release

Release Info

Developer Demac Media
Extension 666999
Version 0.4.4
Comparing to
See all releases


Code changes from version 0.4.3 to 0.4.4

app/code/community/Demac/.DS_Store DELETED
Binary file
app/code/community/Demac/Optimal/Block/Form/Creditcard.php CHANGED
@@ -45,9 +45,17 @@ class Demac_Optimal_Block_Form_Creditcard extends Mage_Payment_Block_Form_Cc
45
  $customerId = $session->getId();
46
  if (isset($customerId))
47
  {
 
 
 
 
 
 
 
48
  $profiles = Mage::getModel('optimal/creditcard')
49
  ->getCollection()
50
  ->addFieldToFilter('customer_id', $customerId)
 
51
  ->addFieldToFilter('is_deleted', false);
52
 
53
  if($profiles->count() >= 1)
@@ -57,9 +65,16 @@ class Demac_Optimal_Block_Form_Creditcard extends Mage_Payment_Block_Form_Cc
57
  }
58
  }
59
 
 
 
60
  return false;
61
  }
62
 
 
 
 
 
 
63
  /**
64
  * Check if profile saving is enabled
65
  *
@@ -68,7 +83,7 @@ class Demac_Optimal_Block_Form_Creditcard extends Mage_Payment_Block_Form_Cc
68
  public function canSaveProfiles()
69
  {
70
  $session = Mage::getSingleton('customer/session');
71
- $profilesEnabled = Mage::getStoreConfig('payment/optimal_profiles/active',$this->getStore());
72
  $checkoutMethod = Mage::getModel('checkout/cart')->getQuote()->getCheckoutMethod();
73
  if (($session->getCustomerId() || $checkoutMethod == 'register') && $profilesEnabled)
74
  {
@@ -76,4 +91,14 @@ class Demac_Optimal_Block_Form_Creditcard extends Mage_Payment_Block_Form_Cc
76
  }
77
  return false;
78
  }
 
 
 
 
 
 
 
 
 
 
79
  }
45
  $customerId = $session->getId();
46
  if (isset($customerId))
47
  {
48
+ $merchCustId = Mage::helper('optimal')->getMerchantCustomerId($customerId);
49
+ if (!$merchCustId) {
50
+ return false;
51
+ }
52
+
53
+ $merchantCustomerId = $merchCustId['merchant_customer_id'];
54
+
55
  $profiles = Mage::getModel('optimal/creditcard')
56
  ->getCollection()
57
  ->addFieldToFilter('customer_id', $customerId)
58
+ ->addFieldToFilter('merchant_customer_id', $merchantCustomerId)
59
  ->addFieldToFilter('is_deleted', false);
60
 
61
  if($profiles->count() >= 1)
65
  }
66
  }
67
 
68
+ $this->profiles = array();
69
+
70
  return false;
71
  }
72
 
73
+ public function getStoreId()
74
+ {
75
+ return Mage::app()->getStore()->getStoreId();
76
+ }
77
+
78
  /**
79
  * Check if profile saving is enabled
80
  *
83
  public function canSaveProfiles()
84
  {
85
  $session = Mage::getSingleton('customer/session');
86
+ $profilesEnabled = Mage::getStoreConfig('payment/optimal_profiles/active', $this->getStoreId());
87
  $checkoutMethod = Mage::getModel('checkout/cart')->getQuote()->getCheckoutMethod();
88
  if (($session->getCustomerId() || $checkoutMethod == 'register') && $profilesEnabled)
89
  {
91
  }
92
  return false;
93
  }
94
+
95
+ public function skip3D()
96
+ {
97
+ return Mage::getStoreConfig('payment/optimal_hosted/skip3D', $this->getStoreId());
98
+ }
99
+
100
+ public function allowInterac()
101
+ {
102
+ return Mage::getStoreConfig('payment/optimal_hosted/allow_interac', $this->getStoreId());
103
+ }
104
  }
app/code/community/Demac/Optimal/Helper/Data.php CHANGED
@@ -50,10 +50,6 @@ class Demac_Optimal_Helper_Data extends Mage_Core_Helper_Abstract
50
  $customer->setDataChanges(true); // force save in case we need to save just the ID.
51
  $customer->save();
52
 
53
- $cData = Mage::getModel('optimal/merchant_customer')->getCollection()
54
- ->addFieldToFilter('customer_id', $customer_id)
55
- ->getFirstItem();
56
-
57
  return $this->processMerchantCustomerId($customer);
58
  }
59
 
@@ -98,6 +94,7 @@ class Demac_Optimal_Helper_Data extends Mage_Core_Helper_Abstract
98
  $orderItems = $orderData['order_items'];
99
  $billingAddress = $orderData['billing_address'];
100
  $shippingAddress = $orderData['shipping_address'];
 
101
 
102
  // Order extended options
103
  $extendedOptionsArray = array();
@@ -106,15 +103,25 @@ class Demac_Optimal_Helper_Data extends Mage_Core_Helper_Abstract
106
  $data = array(
107
  'totalAmount' => (int) $this->formatAmount($orderData['base_grand_total']),
108
  'currencyCode' => (string) $orderData['base_currency_code'],
109
- 'merchantRefNum' => (string) $orderData['increment_id'] . time(),
110
  );
111
 
112
- if(strlen(Mage::getStoreConfig('payment/optimal_hosted/merchant_email')) > 0) {
 
 
 
 
 
 
 
 
 
 
113
  $data['merchantNotificationEmail'] = Mage::getStoreConfig('payment/optimal_hosted/merchant_email');
114
  }
115
 
116
  $data['customerNotificationEmail'] = (string) $orderData['customer_email'];
117
- if(Mage::getStoreConfig('payment/optimal_hosted/email_customer') != 1) {
118
  $extendedOptionsArray[] = array(
119
  'key' => (string) 'suppressCustomerEmail',
120
  'value' => true
@@ -133,8 +140,8 @@ class Demac_Optimal_Helper_Data extends Mage_Core_Helper_Abstract
133
  $customerProfile['firstName'] = (string) $customerData['firstname'];
134
  $merchantCustomerId = null;
135
 
136
- $skip3d = Mage::getStoreConfig('payment/optimal_hosted/skip3D', Mage::app()->getStore()->getStoreId());
137
- $profilesEnabled = Mage::getStoreConfig('payment/optimal_profiles/active', Mage::app()->getStore()->getStoreId());
138
 
139
  if (!$customerData['is_guest']) {
140
 
@@ -197,7 +204,7 @@ class Demac_Optimal_Helper_Data extends Mage_Core_Helper_Abstract
197
 
198
  // Need to be sure this matches the store on which the order was placed
199
  if (is_null($transactionMode)) {
200
- $transactionMode = Mage::getStoreConfig('payment/optimal_hosted/payment_action');
201
  }
202
 
203
  switch($transactionMode){
@@ -218,8 +225,6 @@ class Demac_Optimal_Helper_Data extends Mage_Core_Helper_Abstract
218
  break;
219
  }
220
 
221
- $skip3d = Mage::getStoreConfig('payment/optimal_hosted/skip3D', Mage::app()->getStore()->getStoreId());
222
-
223
  if($skip3d)
224
  {
225
  $extendedOptionsArray[] = array(
@@ -246,7 +251,7 @@ class Demac_Optimal_Helper_Data extends Mage_Core_Helper_Abstract
246
  $addendumDataArray = array();
247
  $threatMetrixId = Mage::getSingleton('core/session')->getThreatMetrixSessionKey();
248
 
249
- if(isset($threatMetrixId) && Mage::getStoreConfig('payment/threat_metrix/active'))
250
  {
251
  $extendedOptionsArray[] = array(
252
  'key' => (string) 'threatMetrixSessionId',
@@ -411,7 +416,6 @@ class Demac_Optimal_Helper_Data extends Mage_Core_Helper_Abstract
411
  $data['extendedOptions'] = $extendedOptionsArray;
412
  $data['addendumData'] = $addendumDataArray;
413
 
414
- Mage::log($data, null, 'NetBanxData.log');
415
  return $data;
416
  }
417
 
50
  $customer->setDataChanges(true); // force save in case we need to save just the ID.
51
  $customer->save();
52
 
 
 
 
 
53
  return $this->processMerchantCustomerId($customer);
54
  }
55
 
94
  $orderItems = $orderData['order_items'];
95
  $billingAddress = $orderData['billing_address'];
96
  $shippingAddress = $orderData['shipping_address'];
97
+ $storeId = Mage::app()->getStore()->getStoreId();
98
 
99
  // Order extended options
100
  $extendedOptionsArray = array();
103
  $data = array(
104
  'totalAmount' => (int) $this->formatAmount($orderData['base_grand_total']),
105
  'currencyCode' => (string) $orderData['base_currency_code'],
106
+ 'merchantRefNum' => (string) $orderData['increment_id'] . time()
107
  );
108
 
109
+ $useInterac = false;
110
+ if (isset($orderData['use_interac'])) {
111
+ $useInterac = $orderData['use_interac'];
112
+ unset($orderData['use_interac']);
113
+ }
114
+
115
+ if ($useInterac) {
116
+ $data['paymentMethod'] = array('interac');
117
+ }
118
+
119
+ if(strlen(Mage::getStoreConfig('payment/optimal_hosted/merchant_email', $storeId)) > 0) {
120
  $data['merchantNotificationEmail'] = Mage::getStoreConfig('payment/optimal_hosted/merchant_email');
121
  }
122
 
123
  $data['customerNotificationEmail'] = (string) $orderData['customer_email'];
124
+ if(Mage::getStoreConfig('payment/optimal_hosted/email_customer', $storeId) != 1) {
125
  $extendedOptionsArray[] = array(
126
  'key' => (string) 'suppressCustomerEmail',
127
  'value' => true
140
  $customerProfile['firstName'] = (string) $customerData['firstname'];
141
  $merchantCustomerId = null;
142
 
143
+ $skip3d = Mage::getStoreConfig('payment/optimal_hosted/skip3D', $storeId);
144
+ $profilesEnabled = Mage::getStoreConfig('payment/optimal_profiles/active', $storeId);
145
 
146
  if (!$customerData['is_guest']) {
147
 
204
 
205
  // Need to be sure this matches the store on which the order was placed
206
  if (is_null($transactionMode)) {
207
+ $transactionMode = Mage::getStoreConfig('payment/optimal_hosted/payment_action', $storeId);
208
  }
209
 
210
  switch($transactionMode){
225
  break;
226
  }
227
 
 
 
228
  if($skip3d)
229
  {
230
  $extendedOptionsArray[] = array(
251
  $addendumDataArray = array();
252
  $threatMetrixId = Mage::getSingleton('core/session')->getThreatMetrixSessionKey();
253
 
254
+ if(isset($threatMetrixId) && Mage::getStoreConfig('payment/threat_metrix/active', $storeId))
255
  {
256
  $extendedOptionsArray[] = array(
257
  'key' => (string) 'threatMetrixSessionId',
416
  $data['extendedOptions'] = $extendedOptionsArray;
417
  $data['addendumData'] = $addendumDataArray;
418
 
 
419
  return $data;
420
  }
421
 
app/code/community/Demac/Optimal/Model/Creditcard.php CHANGED
@@ -31,7 +31,5 @@ class Demac_Optimal_Model_Creditcard extends Mage_Core_Model_Abstract
31
  public function loadByCustomerId($customerId)
32
  {
33
  return $this->load($customerId, 'customer_id');
34
- // $this->_getResource()->loadByCustomerId($this, $customerId);
35
- // return $this;
36
  }
37
  }
31
  public function loadByCustomerId($customerId)
32
  {
33
  return $this->load($customerId, 'customer_id');
 
 
34
  }
35
  }
app/code/community/Demac/Optimal/Model/Hosted/Client.php CHANGED
@@ -205,7 +205,6 @@ class Demac_Optimal_Model_Hosted_Client extends Demac_Optimal_Model_Client_Abstr
205
  $defaultMessage = 'Payment Gateway Error. Please contact the site admin.';
206
 
207
  if (isset($response->error) && !isset($response->error->code)) {
208
- Mage::log('Corrupt Response from Gateway:', null, 'demac_optimal.log');
209
  Mage::log($response, null, 'demac_optimal.log');
210
  $helper->cleanMerchantCustomerId($session->getId());
211
  throw new Demac_Optimal_Model_Hosted_Exception($defaultMessage);
@@ -229,7 +228,6 @@ class Demac_Optimal_Model_Hosted_Client extends Demac_Optimal_Model_Client_Abstr
229
  $message = $helper->getMsgByCode($response->transaction->errorCode);
230
 
231
  if ($message === null && !isset($response->transaction->errorCode)) {
232
- Mage::log('Corrupt Response from Gateway (transaction):', null, 'demac_optimal.log');
233
  Mage::log($response, null, 'demac_optimal.log');
234
  throw new Demac_Optimal_Model_Hosted_Exception($defaultMessage);
235
  }
205
  $defaultMessage = 'Payment Gateway Error. Please contact the site admin.';
206
 
207
  if (isset($response->error) && !isset($response->error->code)) {
 
208
  Mage::log($response, null, 'demac_optimal.log');
209
  $helper->cleanMerchantCustomerId($session->getId());
210
  throw new Demac_Optimal_Model_Hosted_Exception($defaultMessage);
228
  $message = $helper->getMsgByCode($response->transaction->errorCode);
229
 
230
  if ($message === null && !isset($response->transaction->errorCode)) {
 
231
  Mage::log($response, null, 'demac_optimal.log');
232
  throw new Demac_Optimal_Model_Hosted_Exception($defaultMessage);
233
  }
app/code/community/Demac/Optimal/Model/Method/Hosted.php CHANGED
@@ -105,6 +105,8 @@ class Demac_Optimal_Model_Method_Hosted extends Mage_Payment_Model_Method_Cc
105
 
106
  $profileId = $data->getProfileId();
107
 
 
 
108
  if(isset($profileId) && ($profileId != 0)) {
109
  $profile = Mage::getModel('optimal/creditcard')
110
  ->load($profileId, 'entity_id');
@@ -134,6 +136,7 @@ class Demac_Optimal_Model_Method_Hosted extends Mage_Payment_Model_Method_Cc
134
  ->setCcSsStartYear($data->getCcSsStartYear())
135
  ->setOptimalCreateProfile($data->getOptimalCreateProfile());
136
  }
 
137
  return $this;
138
  }
139
 
@@ -146,12 +149,14 @@ class Demac_Optimal_Model_Method_Hosted extends Mage_Payment_Model_Method_Cc
146
  public function validate()
147
  {
148
  $skip3d = Mage::getStoreConfig('payment/optimal_hosted/skip3D', Mage::app()->getStore()->getStoreId());
 
 
 
149
 
150
- if (!$skip3d) {
151
  return $this;
152
  }
153
 
154
- $info = $this->getInfoInstance();
155
  $errorMsg = false;
156
  $availableTypes = explode(',',$this->getConfigData('cctypes'));
157
 
@@ -235,10 +240,20 @@ class Demac_Optimal_Model_Method_Hosted extends Mage_Payment_Model_Method_Cc
235
 
236
  $paymentData = $payment->getData();
237
 
238
- if(isset($paymentData['optimal_create_profile'])){
 
 
 
239
  $createProfile = $paymentData['optimal_create_profile'];
240
  }
241
 
 
 
 
 
 
 
 
242
  $checkoutMethod = Mage::getSingleton('checkout/type_onepage')->getCheckoutMethod();
243
 
244
  if ($checkoutMethod != 'guest') {
@@ -290,9 +305,8 @@ class Demac_Optimal_Model_Method_Hosted extends Mage_Payment_Model_Method_Cc
290
  Mage::throwException($this->__("There was a problem creating the order"));
291
  }
292
 
293
- $skip3d = Mage::getStoreConfig('payment/optimal_hosted/skip3D', Mage::app()->getStore()->getStoreId());
294
  // Redirect the Customer if 3D-Secure verification is turned on
295
- if (isset($postURL) && !$skip3d) {
296
 
297
  try {
298
  $order->setState(Mage_Sales_Model_Order::STATE_PENDING_PAYMENT);
@@ -361,7 +375,9 @@ class Demac_Optimal_Model_Method_Hosted extends Mage_Payment_Model_Method_Cc
361
  if($createProfile){
362
  if(isset($orderStatus->profile)){
363
  $profile = Mage::getModel('optimal/creditcard');
364
- $merchantCustomerId = $orderStatus->profile->merchantCustomerId;
 
 
365
 
366
  if(!isset($merchantCustomerId))
367
  {
@@ -469,6 +485,15 @@ class Demac_Optimal_Model_Method_Hosted extends Mage_Payment_Model_Method_Cc
469
 
470
  }
471
 
 
 
 
 
 
 
 
 
 
472
 
473
  /**
474
  * Send capture request to gateway
105
 
106
  $profileId = $data->getProfileId();
107
 
108
+ $info->setOptimalUseInterac($data->getOptimalUseInterac());
109
+
110
  if(isset($profileId) && ($profileId != 0)) {
111
  $profile = Mage::getModel('optimal/creditcard')
112
  ->load($profileId, 'entity_id');
136
  ->setCcSsStartYear($data->getCcSsStartYear())
137
  ->setOptimalCreateProfile($data->getOptimalCreateProfile());
138
  }
139
+
140
  return $this;
141
  }
142
 
149
  public function validate()
150
  {
151
  $skip3d = Mage::getStoreConfig('payment/optimal_hosted/skip3D', Mage::app()->getStore()->getStoreId());
152
+ $allowInterac = Mage::getStoreConfig('payment/optimal_hosted/allow_interac', Mage::app()->getStore()->getStoreId());
153
+ $info = $this->getInfoInstance();
154
+ $last4 = $info->getData('cc_last4');
155
 
156
+ if ((!$skip3d || $allowInterac) && empty($last4)) { // Do not require Credit Card info if NOT skipping 3D verification or when payment method is Interac
157
  return $this;
158
  }
159
 
 
160
  $errorMsg = false;
161
  $availableTypes = explode(',',$this->getConfigData('cctypes'));
162
 
240
 
241
  $paymentData = $payment->getData();
242
 
243
+ $skip3d = Mage::getStoreConfig('payment/optimal_hosted/skip3D', Mage::app()->getStore()->getStoreId());
244
+ $allowInterac = Mage::getStoreConfig('payment/optimal_hosted/allow_interac', Mage::app()->getStore()->getStoreId());
245
+
246
+ if (isset($paymentData['optimal_create_profile'])) {
247
  $createProfile = $paymentData['optimal_create_profile'];
248
  }
249
 
250
+ $useInterac = false;
251
+ if ($this->_useInterac($quote)) {
252
+ $orderData['use_interac'] = 1;
253
+ $createProfile = false;
254
+ $useInterac = true;
255
+ }
256
+
257
  $checkoutMethod = Mage::getSingleton('checkout/type_onepage')->getCheckoutMethod();
258
 
259
  if ($checkoutMethod != 'guest') {
305
  Mage::throwException($this->__("There was a problem creating the order"));
306
  }
307
 
 
308
  // Redirect the Customer if 3D-Secure verification is turned on
309
+ if (isset($postURL) && (!$skip3d || ($allowInterac && $useInterac))) {
310
 
311
  try {
312
  $order->setState(Mage_Sales_Model_Order::STATE_PENDING_PAYMENT);
375
  if($createProfile){
376
  if(isset($orderStatus->profile)){
377
  $profile = Mage::getModel('optimal/creditcard');
378
+ if (isset($orderStatus->profile->merchantCustomerId)) {
379
+ $merchantCustomerId = $orderStatus->profile->merchantCustomerId;
380
+ }
381
 
382
  if(!isset($merchantCustomerId))
383
  {
485
 
486
  }
487
 
488
+ protected function _useInterac($quote) {
489
+ $quotePayment = $quote->getPayment();
490
+ $useInterac = $quotePayment->getOptimalUseInterac();
491
+
492
+ $allowInterac = Mage::getStoreConfig('payment/optimal_hosted/allow_interac', Mage::app()->getStore()->getStoreId());
493
+
494
+ return $allowInterac && $useInterac;
495
+ }
496
+
497
 
498
  /**
499
  * Send capture request to gateway
app/code/community/Demac/Optimal/controllers/Frontend/OptimalController.php CHANGED
@@ -196,13 +196,6 @@ class Demac_Optimal_Frontend_OptimalController extends Mage_Core_Controller_Fron
196
  }
197
  }
198
 
199
- // $data['extendedOptions'][] = array(
200
- // 'key' => 'storeCardIndicator',
201
- // 'value' => true
202
- // );
203
-
204
- Mage::log($data, null, 'optimal-addcc.log');
205
-
206
  // Call Netbanks API and create the order
207
  $response = $client->createOrder($data);
208
  if (isset($response->link)) {
@@ -226,7 +219,6 @@ class Demac_Optimal_Frontend_OptimalController extends Mage_Core_Controller_Fron
226
  );
227
 
228
  $paymentResponse = $client->submitPayment($postURL,$paymentData);
229
- Mage::log($paymentResponse, null, 'optimnal-paymentrsp.log');
230
  $orderStatus = $client->retrieveOrder($response->id);
231
  $transaction = $orderStatus->transaction;
232
 
196
  }
197
  }
198
 
 
 
 
 
 
 
 
199
  // Call Netbanks API and create the order
200
  $response = $client->createOrder($data);
201
  if (isset($response->link)) {
219
  );
220
 
221
  $paymentResponse = $client->submitPayment($postURL,$paymentData);
 
222
  $orderStatus = $client->retrieveOrder($response->id);
223
  $transaction = $orderStatus->transaction;
224
 
app/code/community/Demac/Optimal/controllers/HandlerController.php CHANGED
@@ -111,9 +111,12 @@ class Demac_Optimal_HandlerController extends Mage_Core_Controller_Front_Action
111
  $transaction = $orderStatus->transaction;
112
 
113
  $customerSession = Mage::getSingleton('customer/session');
114
- list($month, $year) = explode('/', $transaction->card->expiry);
115
 
116
- if ($customerSession->isLoggedIn()) {
 
 
 
 
117
  $customerId = $customerSession->getId();
118
  $customerData = Mage::getModel('customer/customer')->load($customerId)->getData();
119
  $Card = Mage::getModel('optimal/creditcard');
@@ -138,7 +141,7 @@ class Demac_Optimal_HandlerController extends Mage_Core_Controller_Front_Action
138
  // Set Profile Info
139
  $profile->setCustomerId($customerId);
140
  $profile->setProfileId($orderStatus->profile->id);
141
- $lnt = strlen($orderStatus->profile->id);
142
  $profile->setMerchantCustomerId($merchantCustomerId);
143
  $profile->setPaymentToken($orderStatus->profile->paymentToken);
144
 
@@ -175,11 +178,15 @@ class Demac_Optimal_HandlerController extends Mage_Core_Controller_Front_Action
175
  $payment->setTransactionId($optimalOrderId);
176
  // magento will automatically close the transaction on auth preventing the invoice from being captured online.
177
  $payment->setIsTransactionClosed(false);
178
- $payment->setCcOwner($cardHolder)
179
- ->setCcType(Mage::helper('optimal')->processCardNickname($transaction->card->brand))
180
- ->setCcExpMonth($month)
181
- ->setCcExpYear($year)
182
- ->setCcLast4($transaction->card->lastDigits);
 
 
 
 
183
  $payment->save();
184
 
185
  $this->_redirect('checkout/onepage/success');
111
  $transaction = $orderStatus->transaction;
112
 
113
  $customerSession = Mage::getSingleton('customer/session');
 
114
 
115
+ if (isset($transaction->card->expiry)) {
116
+ list($month, $year) = explode('/', $transaction->card->expiry);
117
+ }
118
+
119
+ if ($customerSession->isLoggedIn() && $transaction->paymentType != 'interac') {
120
  $customerId = $customerSession->getId();
121
  $customerData = Mage::getModel('customer/customer')->load($customerId)->getData();
122
  $Card = Mage::getModel('optimal/creditcard');
141
  // Set Profile Info
142
  $profile->setCustomerId($customerId);
143
  $profile->setProfileId($orderStatus->profile->id);
144
+
145
  $profile->setMerchantCustomerId($merchantCustomerId);
146
  $profile->setPaymentToken($orderStatus->profile->paymentToken);
147
 
178
  $payment->setTransactionId($optimalOrderId);
179
  // magento will automatically close the transaction on auth preventing the invoice from being captured online.
180
  $payment->setIsTransactionClosed(false);
181
+
182
+ if ($transaction->paymentType != 'interac') {
183
+ $payment->setCcOwner($cardHolder)
184
+ ->setCcType(Mage::helper('optimal')->processCardNickname($transaction->card->brand))
185
+ ->setCcExpMonth($month)
186
+ ->setCcExpYear($year)
187
+ ->setCcLast4($transaction->card->lastDigits);
188
+ }
189
+
190
  $payment->save();
191
 
192
  $this->_redirect('checkout/onepage/success');
app/code/community/Demac/Optimal/etc/config.xml CHANGED
@@ -2,7 +2,7 @@
2
  <config>
3
  <modules>
4
  <Demac_Optimal>
5
- <version>0.4.3</version>
6
  </Demac_Optimal>
7
  </modules>
8
 
2
  <config>
3
  <modules>
4
  <Demac_Optimal>
5
+ <version>0.4.4</version>
6
  </Demac_Optimal>
7
  </modules>
8
 
app/code/community/Demac/Optimal/etc/system.xml CHANGED
@@ -120,6 +120,15 @@
120
  <show_in_website>1</show_in_website>
121
  <show_in_store>0</show_in_store>
122
  </skip3D>
 
 
 
 
 
 
 
 
 
123
  <allowspecific translate="label">
124
  <label>Payment from Applicable Countries</label>
125
  <frontend_type>allowspecific</frontend_type>
120
  <show_in_website>1</show_in_website>
121
  <show_in_store>0</show_in_store>
122
  </skip3D>
123
+ <allow_interac translate="label">
124
+ <label>Allow Interac?</label>
125
+ <frontend_type>select</frontend_type>
126
+ <source_model>adminhtml/system_config_source_yesno</source_model>
127
+ <sort_order>151</sort_order>
128
+ <show_in_default>1</show_in_default>
129
+ <show_in_website>1</show_in_website>
130
+ <show_in_store>0</show_in_store>
131
+ </allow_interac>
132
  <allowspecific translate="label">
133
  <label>Payment from Applicable Countries</label>
134
  <frontend_type>allowspecific</frontend_type>
app/code/community/Demac/Optimal/sql/optimal_setup/mysql4-upgrade-0.4.3-0.4.4.php ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $installer = $this;
3
+
4
+ $installer->startSetup();
5
+
6
+ $installer->getConnection()->addColumn($installer->getTable('sales_flat_quote_payment'),
7
+ 'optimal_use_interac', 'TINYINT(1) NOT NULL DEFAULT "0" AFTER `optimal_create_profile`');
8
+
9
+ $installer->getConnection()->addColumn($installer->getTable('sales_flat_order_payment'),
10
+ 'optimal_use_interac', 'TINYINT(1) NOT NULL DEFAULT "0" AFTER `optimal_create_profile`');
11
+
12
+ $installer->endSetup();
app/code/community/Demac/Optimal/sql/optimal_setup/upgrade-0.4.3-0.4.4.php ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $installer = $this;
3
+
4
+ $installer->startSetup();
5
+
6
+ $installer->getConnection()->addColumn($installer->getTable('sales_flat_quote_payment'),
7
+ 'optimal_use_interac', 'TINYINT(1) NOT NULL DEFAULT "0" AFTER `optimal_create_profile`');
8
+
9
+ $installer->getConnection()->addColumn($installer->getTable('sales_flat_order_payment'),
10
+ 'optimal_use_interac', 'TINYINT(1) NOT NULL DEFAULT "0" AFTER `optimal_create_profile`');
11
+
12
+ $installer->endSetup();
app/design/frontend/base/default/template/optimal/customer/cards/form.phtml CHANGED
@@ -1,116 +1,116 @@
1
- <form action="<?php echo $this->getUrl('customer/optimal/addPost') ?>" method="post" id="form-validate">
2
- <div class="fieldset">
3
- <input type="hidden" name="success_url" value="">
4
- <input type="hidden" name="error_url" value="">
5
- <h2 class="legend"><?php echo $this->__('Credit Card Information') ?></h2>
6
- <ul class="form-list">
7
- <li class="fields">
8
- <div class="customer-name">
9
- </div>
10
- </li>
11
- <li class="wide">
12
- <label for="cc_number" class="required"><em>*</em><?php echo $this->__('Credit Card Number') ?></label>
13
- <div class="input-box">
14
- <input type="text" name="cc_number" id="cc_number" title="Credit Card Number" value="" class="input-text required-entry">
15
- </div>
16
- </li>
17
- <li class="fields">
18
- <div class="field">
19
- <label for="cc_cid" class="required"><em>*</em><?php echo $this->__('CVV') ?></label>
20
- <div class="input-box">
21
- <input type="text" name="cc_cid" value="" title="cc_cid" class="input-text required-entry" id="cc_cid">
22
- </div>
23
- </div>
24
- <div class="field">
25
- <label for="cc_exp_month" class="required"><em>*</em><?php echo $this->__('Expiration Date Month') ?></label>
26
- <select id="cc_exp_month" name="cc_exp_month" class="month validate-cc-exp required-entry">
27
- <?php foreach ($this->getCcMonths() as $k=>$v): ?>
28
- <option value="<?php echo $k?$k:'' ?>"><?php echo $v ?></option>
29
- <?php endforeach ?>
30
- </select>
31
- </div>
32
- <div class="field">
33
- <label for="cc_exp_year" class="required"><em>*</em><?php echo $this->__('Expiration Date Year') ?></label>
34
- <select id="cc_exp_year" name="cc_exp_year" class="year validate-cc-exp required-entry">
35
- <?php foreach ($this->getCcYears() as $k=>$v): ?>
36
- <option value="<?php echo $v ?>"><?php echo $v ?></option>
37
- <?php endforeach ?>
38
- </select>
39
- </div>
40
- </li>
41
- </ul>
42
- </div>
43
- <div class="buttons-set">
44
- <p class="required">* <?php echo $this->__('Required Fields') ?></p>
45
- <p class="back-link"><a href=""><small>« </small><?php echo $this->__('Back') ?></a></p>
46
- <button type="submit" title="Save Credit Card" class="button"><span><span><?php echo $this->__('Save Credit Card') ?></span></span></button>
47
- </div>
48
- </form>
49
-
50
- <script type="text/javascript">
51
- var CreditCard = {
52
- CARDS: {
53
- Visa: /^4[0-9]{12}(?:[0-9]{3})?$/,
54
- MasterCard: /^5[1-5][0-9]{14}$/,
55
- DinersClub: /^3(?:0[0-5]|[68][0-9])[0-9]{11}$/,
56
- Amex: /^3[47][0-9]{13}$/,
57
- Discover: /^6(?:011|5[0-9]{2})[0-9]{12}$/
58
- },
59
- TEST_NUMBERS: $w('378282246310005 371449635398431 378734493671000 '+
60
- '30569309025904 38520000023237 6011111111111117 '+
61
- '6011000990139424 5555555555554444 5105105105105100 '+
62
- '4111111111111111 4012888888881881 4222222222222'
63
- ),
64
-
65
- // Validate that is a Luhn valid number
66
- // Validate that is one of the valid credit card types
67
- // Validate that is not a test number
68
- validate: function(number){
69
- return CreditCard.verifyLuhn10(number)
70
- && !!CreditCard.type(number)
71
- && !CreditCard.isTestNumber(number);
72
- },
73
-
74
- // The Luhn algorithm or Luhn formula, also known as the "modulus 10" or "mod 10" algorithm, is a simple
75
- // checksum formula used to validate a variety of identification numbers, such as credit card numbers,
76
- // IMEI numbers, National Provider Identifier numbers in US and Canadian Social Insurance Numbers.
77
- verifyLuhn10: function(number){
78
- return ($A(CreditCard.strip(number)).reverse().inject(0,function(a,n,index){
79
- return a + $A((parseInt(n) * [1,2][index%2]).toString())
80
- .inject(0, function(b,o){ return b + parseInt(o) }) }) % 10 == 0);
81
- },
82
-
83
- // Check if is test number
84
- isTestNumber: function(number){
85
- return CreditCard.TEST_NUMBERS.include(CreditCard.strip(number));
86
- },
87
-
88
- // Remove spaces
89
- strip: function(number) {
90
- return number.gsub(/\s/,'');
91
- },
92
-
93
- // Check credit card types
94
- type: function(number) {
95
- for(var card in CreditCard.CARDS)
96
- if(CreditCard['is'+card](number)) return card;
97
- }
98
- };
99
-
100
- (function(){
101
- for(var card in CreditCard.CARDS)
102
- CreditCard['is'+card] = function(card, number){
103
- return CreditCard.CARDS[card].test(CreditCard.strip(number));
104
- }.curry(card);
105
- })();
106
-
107
-
108
- Event.observe('form-validate', 'submit', function (event) {
109
- var creditcard = $('credit_number').value;
110
- if (!CreditCard.validate(creditcard)) {
111
- Event.stop(event);
112
- $('credit_number').addClassName('validation-failed');
113
- alert('Your Credit Card is not valid');
114
- }
115
- });
116
  </script>
1
+ <form action="<?php echo $this->getUrl('customer/optimal/addPost') ?>" method="post" id="form-validate">
2
+ <div class="fieldset">
3
+ <input type="hidden" name="success_url" value="">
4
+ <input type="hidden" name="error_url" value="">
5
+ <h2 class="legend"><?php echo $this->__('Credit Card Information') ?></h2>
6
+ <ul class="form-list">
7
+ <li class="fields">
8
+ <div class="customer-name">
9
+ </div>
10
+ </li>
11
+ <li class="wide">
12
+ <label for="cc_number" class="required"><em>*</em><?php echo $this->__('Credit Card Number') ?></label>
13
+ <div class="input-box">
14
+ <input type="text" name="cc_number" id="cc_number" title="Credit Card Number" value="" class="input-text required-entry">
15
+ </div>
16
+ </li>
17
+ <li class="fields">
18
+ <div class="field">
19
+ <label for="cc_cid" class="required"><em>*</em><?php echo $this->__('CVV') ?></label>
20
+ <div class="input-box">
21
+ <input type="text" name="cc_cid" value="" title="cc_cid" class="input-text required-entry" id="cc_cid">
22
+ </div>
23
+ </div>
24
+ <div class="field">
25
+ <label for="cc_exp_month" class="required"><em>*</em><?php echo $this->__('Expiration Date Month') ?></label>
26
+ <select id="cc_exp_month" name="cc_exp_month" class="month validate-cc-exp required-entry">
27
+ <?php foreach ($this->getCcMonths() as $k=>$v): ?>
28
+ <option value="<?php echo $k?$k:'' ?>"><?php echo $v ?></option>
29
+ <?php endforeach ?>
30
+ </select>
31
+ </div>
32
+ <div class="field">
33
+ <label for="cc_exp_year" class="required"><em>*</em><?php echo $this->__('Expiration Date Year') ?></label>
34
+ <select id="cc_exp_year" name="cc_exp_year" class="year validate-cc-exp required-entry">
35
+ <?php foreach ($this->getCcYears() as $k=>$v): ?>
36
+ <option value="<?php echo $v ?>"><?php echo $v ?></option>
37
+ <?php endforeach ?>
38
+ </select>
39
+ </div>
40
+ </li>
41
+ </ul>
42
+ </div>
43
+ <div class="buttons-set">
44
+ <p class="required">* <?php echo $this->__('Required Fields') ?></p>
45
+ <p class="back-link"><a href=""><small>« </small><?php echo $this->__('Back') ?></a></p>
46
+ <button type="submit" title="Save Credit Card" class="button"><span><span><?php echo $this->__('Save Credit Card') ?></span></span></button>
47
+ </div>
48
+ </form>
49
+
50
+ <script type="text/javascript">
51
+ var CreditCard = {
52
+ CARDS: {
53
+ Visa: /^4[0-9]{12}(?:[0-9]{3})?$/,
54
+ MasterCard: /^5[1-5][0-9]{14}$/,
55
+ DinersClub: /^3(?:0[0-5]|[68][0-9])[0-9]{11}$/,
56
+ Amex: /^3[47][0-9]{13}$/,
57
+ Discover: /^6(?:011|5[0-9]{2})[0-9]{12}$/
58
+ },
59
+ TEST_NUMBERS: $w('378282246310005 371449635398431 378734493671000 '+
60
+ '30569309025904 38520000023237 6011111111111117 '+
61
+ '6011000990139424 5555555555554444 5105105105105100 '+
62
+ '4111111111111111 4012888888881881 4222222222222'
63
+ ),
64
+
65
+ // Validate that is a Luhn valid number
66
+ // Validate that is one of the valid credit card types
67
+ // Validate that is not a test number
68
+ validate: function(number){
69
+ return CreditCard.verifyLuhn10(number)
70
+ && !!CreditCard.type(number)
71
+ && !CreditCard.isTestNumber(number);
72
+ },
73
+
74
+ // The Luhn algorithm or Luhn formula, also known as the "modulus 10" or "mod 10" algorithm, is a simple
75
+ // checksum formula used to validate a variety of identification numbers, such as credit card numbers,
76
+ // IMEI numbers, National Provider Identifier numbers in US and Canadian Social Insurance Numbers.
77
+ verifyLuhn10: function(number){
78
+ return ($A(CreditCard.strip(number)).reverse().inject(0,function(a,n,index){
79
+ return a + $A((parseInt(n) * [1,2][index%2]).toString())
80
+ .inject(0, function(b,o){ return b + parseInt(o) }) }) % 10 == 0);
81
+ },
82
+
83
+ // Check if is test number
84
+ isTestNumber: function(number){
85
+ return CreditCard.TEST_NUMBERS.include(CreditCard.strip(number));
86
+ },
87
+
88
+ // Remove spaces
89
+ strip: function(number) {
90
+ return number.gsub(/\s/,'');
91
+ },
92
+
93
+ // Check credit card types
94
+ type: function(number) {
95
+ for(var card in CreditCard.CARDS)
96
+ if(CreditCard['is'+card](number)) return card;
97
+ }
98
+ };
99
+
100
+ (function(){
101
+ for(var card in CreditCard.CARDS)
102
+ CreditCard['is'+card] = function(card, number){
103
+ return CreditCard.CARDS[card].test(CreditCard.strip(number));
104
+ }.curry(card);
105
+ })();
106
+
107
+
108
+ Event.observe('form-validate', 'submit', function (event) {
109
+ var creditcard = $('credit_number').value;
110
+ if (!CreditCard.validate(creditcard)) {
111
+ Event.stop(event);
112
+ $('credit_number').addClassName('validation-failed');
113
+ alert('Your Credit Card is not valid');
114
+ }
115
+ });
116
  </script>
app/design/frontend/base/default/template/optimal/customer/cards/grid.phtml CHANGED
@@ -1,36 +1,36 @@
1
- <?php if($this->hasOptimalProfiles()): ?>
2
-
3
- <table class="data-table" id="my-orders-table">
4
- <colgroup>
5
- <col width="1">
6
- <col>
7
- <col width="1">
8
- <col width="1">
9
- <col width="1">
10
- <col>
11
- </colgroup><thead>
12
- <tr class="first last">
13
- <th><?php echo $this->__('Card Alias') ?></th>
14
- <th><?php echo $this->__('Number') ?></th>
15
- <th><?php echo $this->__('Exp. Date') ?></th>
16
- <th><?php echo $this->__('Cardholder Name') ?></th>
17
- <th>&nbsp;</th>
18
- </tr>
19
- </thead>
20
- <tbody>
21
- <?php foreach($this->profiles as $profile): ?>
22
- <tr class="odd">
23
- <td><?php echo $profile->getCardNickname(); ?></td>
24
- <td>**** **** **** <?php echo $profile->getLastFourDigits(); ?></td>
25
- <td><span class="nobr"><?php echo $profile->getCardExpiration(); ?></span></td>
26
- <td><?php echo $profile->getCardHolder(); ?></td>
27
- <td>
28
- <button type="button" title="Delete" class="button" onclick='window.location="<?php echo Mage::getUrl('customer/optimal/delete') . 'profile_id/' . $profile->getId(); ?>";'><span><span>Delete</span></span></button>
29
- </td>
30
- </tr>
31
- <?php endforeach; ?>
32
-
33
- </tbody>
34
- </table>
35
-
36
  <?php endif; ?>
1
+ <?php if($this->hasOptimalProfiles()): ?>
2
+
3
+ <table class="data-table" id="my-orders-table">
4
+ <colgroup>
5
+ <col width="1">
6
+ <col>
7
+ <col width="1">
8
+ <col width="1">
9
+ <col width="1">
10
+ <col>
11
+ </colgroup><thead>
12
+ <tr class="first last">
13
+ <th><?php echo $this->__('Card Alias') ?></th>
14
+ <th><?php echo $this->__('Number') ?></th>
15
+ <th><?php echo $this->__('Exp. Date') ?></th>
16
+ <th><?php echo $this->__('Cardholder Name') ?></th>
17
+ <th>&nbsp;</th>
18
+ </tr>
19
+ </thead>
20
+ <tbody>
21
+ <?php foreach($this->profiles as $profile): ?>
22
+ <tr class="odd">
23
+ <td><?php echo $profile->getCardNickname(); ?></td>
24
+ <td>**** **** **** <?php echo $profile->getLastFourDigits(); ?></td>
25
+ <td><span class="nobr"><?php echo $profile->getCardExpiration(); ?></span></td>
26
+ <td><?php echo $profile->getCardHolder(); ?></td>
27
+ <td>
28
+ <button type="button" title="Delete" class="button" onclick='window.location="<?php echo Mage::getUrl('customer/optimal/delete') . 'profile_id/' . $profile->getId(); ?>";'><span><span>Delete</span></span></button>
29
+ </td>
30
+ </tr>
31
+ <?php endforeach; ?>
32
+
33
+ </tbody>
34
+ </table>
35
+
36
  <?php endif; ?>
app/design/frontend/base/default/template/optimal/form/creditcard.phtml CHANGED
@@ -27,43 +27,263 @@
27
  <?php
28
  $_code = $this->getMethodCode();
29
 
30
- $skip3d = Mage::getStoreConfig('payment/optimal_hosted/skip3D');
31
- $profilesEnabled = ($this->hasOptimalProfiles() === true);
32
-
 
 
33
  ?>
34
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
35
 
36
- <?php if($profilesEnabled && $skip3d): ?>
37
- <div id="select_card_form" >
38
- <ul class="profile_list form-list" id="payment_form_<?php echo $_code ?>" >
39
- <li class="wide">
40
- <label for="<?php echo $_code ?>_profile_id"><?php echo $this->__('Select a Credit Card Profile.') ?></label>
41
- <div class="input-box">
42
- <select class="<?php echo $_code ?>_profile_id" id="<?php echo $_code ?>_profile_id" name="payment[profile_id]">
43
- <?php foreach($this->profiles as $profile): ?>
44
- <option selected="" value="<?php echo $profile->getEntityId(); ?>"><?php echo ucwords($profile->getCardNickname()); ?> / **** **** **** <?php echo $profile->getLastFourDigits(); ?></option>
45
- <?php endforeach; ?>
46
- <option value="0"><?php echo $this->__('New Profile') ?></option>
47
- </select>
48
- </div>
49
- </li>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
50
  <li>
51
- <label class="<?php echo $_code ?>_cc_cid" for="<?php echo $_code ?>_cc_cid" class="required"><em>*</em><?php echo $this->__('Card Verification Number') ?></label>
52
  <div class="input-box">
53
- <div class="v-fix">
54
- <input type="text" title="<?php echo $this->__('Card Verification Number') ?>" class="input-text cvv required-entry" id="<?php echo $_code ?>_cc_cid" name="payment[cc_cid]" value="" />
55
- </div>
56
  </div>
57
  </li>
58
- </ul>
59
- </div>
60
-
61
- <div id="create_card_form" style="display:none;">
62
- <ul class="form-list" id="payment_form_<?php echo $_code ?>">
63
  <li>
64
  <label for="<?php echo $_code ?>_cc_type" class="required"><em>*</em><?php echo $this->__('Credit Card Type') ?></label>
65
  <div class="input-box">
66
- <select id="<?php echo $_code ?>_cc_type" name="payment[cc_type]" title="<?php echo $this->__('Credit Card Type') ?>" class="cc_type required-entry validate-cc-type-select">
67
  <option value=""><?php echo $this->__('--Please Select--') ?></option>
68
  <?php $_ccType = $this->getInfoData('cc_type') ?>
69
  <?php foreach ($this->getCcAvailableTypes() as $_typeCode => $_typeName): ?>
@@ -110,202 +330,69 @@ $profilesEnabled = ($this->hasOptimalProfiles() === true);
110
  </div>
111
  </li>
112
  <?php endif; ?>
113
- <li class="control">
114
- <input type="checkbox" title="<?php echo $this->__('Create Profile and Save Card') ?>" class="radio" value="1" id="<?php echo $_code ?>_create_profile" name="payment[optimal_create_profile]">
115
- <label for="<?php echo $_code ?>_optimal_create_profile"><?php echo $this->__('Create Profile and Save Card') ?> </label>
116
- </li>
117
- </ul>
118
- </div>
119
- <script type="text/javascript">
120
- //<![CDATA[
121
- // initially hide all containers for tab
122
-
123
- Event.observe($('p_method_optimal_hosted'),'change', function(){
124
- $('optimal_hosted_profile_id').enable();
125
- $$('.profile_list')[0].select('#optimal_hosted_cc_cid')[0].enable();
126
-
127
- $('create_card_form').select('input').each(function(el){
128
- $(el).disable();
129
- });
130
-
131
- $('create_card_form').select('select').each(function(el){
132
- $(el).disable();
133
- });
134
- $$('.cc_type')[0].writeAttribute("id", "<?php echo $_code ?>_cc_type_disabled");
135
-
136
- });
137
-
138
- Event.observe(window, "load", function() {
139
- var f = $('optimal_hosted_profile_id').value;
140
- setOptimalPaymentsCreditCardForm(f);
141
- });
142
-
143
-
144
- Event.observe($('optimal_hosted_profile_id'),'change', function() {
145
- var f = $('optimal_hosted_profile_id').value;
146
- setOptimalPaymentsCreditCardForm(f);
147
- });
148
-
149
- function setOptimalPaymentsCreditCardForm(f) {
150
- //var f = $('optimal_hosted_profile_id').value;
151
- if(f == '0') {
152
- $('create_card_form').show();
153
- $$('.profile_list')[0].select('#optimal_hosted_cc_cid')[0].hide();
154
- $$('.profile_list')[0].select('#optimal_hosted_cc_cid')[0].disable();
155
-
156
- $$('.cc_type')[0].writeAttribute("id", "<?php echo $_code ?>_cc_type");
157
-
158
- $('create_card_form').select('input').each(function(el){
159
- $(el).enable();
160
- });
161
- $$('.<?php echo $_code ?>_cc_cid')[0].hide();
162
-
163
- $('create_card_form').select('select').each(function(el){
164
- $(el).enable();
165
- });
166
-
167
- } else {
168
- $('create_card_form').hide();
169
- $$('.profile_list')[0].select('#optimal_hosted_cc_cid')[0].enable();
170
- $$('.profile_list')[0].select('#optimal_hosted_cc_cid')[0].show();
171
-
172
- $$('.cc_type')[0].writeAttribute("id", "<?php echo $_code ?>_cc_type_disabled");
173
-
174
- $('create_card_form').select('input').each(function(el){
175
- $(el).disable();
176
- });
177
- $$('.<?php echo $_code ?>_cc_cid')[0].show();
178
-
179
- $('create_card_form').select('select').each(function(el){
180
- $(el).disable();
181
- });
182
- }
183
- }
184
 
185
- //]]>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
186
 
 
 
 
 
 
 
 
 
 
187
 
188
- </script>
189
 
190
- <?php elseif (!$skip3d): ?>
191
- <ul class="form-list" id="payment_form_<?php echo $_code ?>" style="display:none;">
192
- <li>You will be redirected to Optimal Payments for payment authorisation.</li>
193
- </ul>
194
- <?php else: ?>
195
 
196
- <ul class="form-list" id="payment_form_<?php echo $_code ?>" style="display:none;">
197
- <li>
198
- <label for="<?php echo $_code ?>_cc_owner" class="required"><em>*</em><?php echo $this->__('Name on Card') ?></label>
199
- <div class="input-box">
200
- <input type="text" title="<?php echo $this->__('Name on Card') ?>" class="input-text required-entry" id="<?php echo $_code ?>_cc_owner" name="payment[cc_owner]" value="<?php echo $this->escapeHtml($this->getInfoData('cc_owner')) ?>" />
201
- </div>
202
- </li>
203
- <li>
204
- <label for="<?php echo $_code ?>_cc_type" class="required"><em>*</em><?php echo $this->__('Credit Card Type') ?></label>
205
- <div class="input-box">
206
- <select id="<?php echo $_code ?>_cc_type" name="payment[cc_type]" title="<?php echo $this->__('Credit Card Type') ?>" class="required-entry validate-cc-type-select">
207
- <option value=""><?php echo $this->__('--Please Select--') ?></option>
208
- <?php $_ccType = $this->getInfoData('cc_type') ?>
209
- <?php foreach ($this->getCcAvailableTypes() as $_typeCode => $_typeName): ?>
210
- <option value="<?php echo $_typeCode ?>"<?php if($_typeCode==$_ccType): ?> selected="selected"<?php endif ?>><?php echo $_typeName ?></option>
211
- <?php endforeach ?>
212
- </select>
213
- </div>
214
- </li>
215
- <li>
216
- <label for="<?php echo $_code ?>_cc_number" class="required"><em>*</em><?php echo $this->__('Credit Card Number') ?></label>
217
- <div class="input-box">
218
- <input type="text" id="<?php echo $_code ?>_cc_number" name="payment[cc_number]" title="<?php echo $this->__('Credit Card Number') ?>" class="input-text validate-cc-number validate-cc-type" value="" />
219
- </div>
220
- </li>
221
- <li>
222
- <label for="<?php echo $_code ?>_expiration" class="required"><em>*</em><?php echo $this->__('Expiration Date') ?></label>
223
- <div class="input-box">
224
- <div class="v-fix">
225
- <select id="<?php echo $_code ?>_expiration" name="payment[cc_exp_month]" class="month validate-cc-exp required-entry">
226
- <?php $_ccExpMonth = $this->getInfoData('cc_exp_month') ?>
227
- <?php foreach ($this->getCcMonths() as $k=>$v): ?>
228
- <option value="<?php echo $k?$k:'' ?>"<?php if($k==$_ccExpMonth): ?> selected="selected"<?php endif ?>><?php echo $v ?></option>
229
- <?php endforeach ?>
230
- </select>
231
- </div>
232
- <div class="v-fix">
233
- <?php $_ccExpYear = $this->getInfoData('cc_exp_year') ?>
234
- <select id="<?php echo $_code ?>_expiration_yr" name="payment[cc_exp_year]" class="year required-entry">
235
- <?php foreach ($this->getCcYears() as $k=>$v): ?>
236
- <option value="<?php echo $k?$k:'' ?>"<?php if($k==$_ccExpYear): ?> selected="selected"<?php endif ?>><?php echo $v ?></option>
237
- <?php endforeach ?>
238
- </select>
239
- </div>
240
- </div>
241
- </li>
242
- <?php echo $this->getChildHtml() ?>
243
- <?php if($this->hasVerification()): ?>
244
- <li>
245
- <label for="<?php echo $_code ?>_cc_cid" class="required"><em>*</em><?php echo $this->__('Card Verification Number') ?></label>
246
- <div class="input-box">
247
- <div class="v-fix">
248
- <input type="text" title="<?php echo $this->__('Card Verification Number') ?>" class="input-text cvv required-entry validate-cc-cvn" id="<?php echo $_code ?>_cc_cid" name="payment[cc_cid]" value="" />
249
- </div>
250
- </div>
251
- </li>
252
- <?php endif; ?>
253
- <?php if($this->canSaveProfiles()): ?>
254
- <li class="control">
255
- <input type="checkbox" title="<?php echo $this->__('Create Profile and Save Card') ?>" class="radio" value="1" id="<?php echo $_code ?>_create_profile" name="payment[optimal_create_profile]">
256
- <label for="<?php echo $_code ?>_optimal_create_profile" class="required"><em>*</em><?php echo $this->__('Create Profile and Save Card') ?> </label>
257
- </li>
258
- <?php else: ?>
259
- <input type="hidden" title="<?php echo $this->__('Create Profile and Save Card') ?>" class="radio" value="0" id="<?php echo $_code ?>_create_profile" name="payment[optimal_create_profile]">
260
- <?php endif; ?>
261
- <?php if ($this->hasSsCardType()): ?>
262
- <li id="<?php echo $_code ?>_cc_type_ss_div">
263
- <ul class="inner-form">
264
- <li class="form-alt"><label for="<?php echo $_code ?>_cc_issue" class="required"><em>*</em><?php echo $this->__('Switch/Solo/Maestro Only') ?></label></li>
265
- <li>
266
- <label for="<?php echo $_code ?>_cc_issue"><?php echo $this->__('Issue Number') ?>:</label>
267
- <span class="input-box">
268
- <input type="text" title="<?php echo $this->__('Issue Number') ?>" class="input-text validate-cc-ukss cvv" id="<?php echo $_code ?>_cc_issue" name="payment[cc_ss_issue]" value="" />
269
- </span>
270
- </li>
271
-
272
- <li>
273
- <label for="<?php echo $_code ?>_start_month"><?php echo $this->__('Start Date') ?>:</label>
274
- <div class="input-box">
275
- <div class="v-fix">
276
- <select id="<?php echo $_code ?>_start_month" name="payment[cc_ss_start_month]" class="validate-cc-ukss month">
277
- <?php foreach ($this->getCcMonths() as $k=>$v): ?>
278
- <option value="<?php echo $k?$k:'' ?>"<?php if($k==$this->getInfoData('cc_ss_start_month')): ?> selected="selected"<?php endif ?>><?php echo $v ?></option>
279
- <?php endforeach ?>
280
- </select>
281
- </div>
282
- <div class="v-fix">
283
- <select id="<?php echo $_code ?>_start_year" name="payment[cc_ss_start_year]" class="validate-cc-ukss year">
284
- <?php foreach ($this->getSsStartYears() as $k=>$v): ?>
285
- <option value="<?php echo $k?$k:'' ?>"<?php if($k==$this->getInfoData('cc_ss_start_year')): ?> selected="selected"<?php endif ?>><?php echo $v ?></option>
286
- <?php endforeach ?>
287
- </select>
288
- </div>
289
- </div>
290
- </li>
291
- <li class="adv-container">&nbsp;</li>
292
- </ul>
293
- <script type="text/javascript">
294
- //<![CDATA[
295
- var SSChecked<?php echo $_code ?> = function() {
296
- var elm = $('<?php echo $_code ?>_cc_type');
297
- if (['SS','SM','SO'].indexOf(elm.value) != -1) {
298
- $('<?php echo $_code ?>_cc_type_ss_div').show();
299
- } else {
300
- $('<?php echo $_code ?>_cc_type_ss_div').hide();
301
- }
302
- };
303
-
304
- Event.observe($('<?php echo $_code ?>_cc_type'), 'change', SSChecked<?php echo $_code ?>);
305
- SSChecked<?php echo $_code ?>();
306
- //]]>
307
- </script>
308
- </li>
309
- <?php endif; ?>
310
- </ul>
311
- <?php endif;?>
27
  <?php
28
  $_code = $this->getMethodCode();
29
 
30
+ $skip3d = $this->skip3D();
31
+ $profilesEnabled = $this->canSaveProfiles();
32
+ //$profilesEnabled = ($this->hasOptimalProfiles() === true);
33
+ $allowInterac = $this->allowInterac();
34
+ $profiles = $this->hasOptimalProfiles();
35
  ?>
36
 
37
+ <?php if (!$skip3d): ?>
38
+ <ul class="form-list" id="payment_form_<?php echo $_code ?>" style="display:none;">
39
+ <li>You will be redirected to Optimal Payments for payment authorisation. <?php echo $allowInterac ? 'Please choose mode of payment below.' : ''; ?></li>
40
+ <?php if ($allowInterac): ?>
41
+ <li class="control">
42
+ <input id="optimal-pay-via-interac" type="radio" title="<?php echo $this->__('Pay via Interac') ?>" class="radio optimal-pay-via validate-one-required-by-name" value="1" name="payment[optimal_use_interac]">
43
+ <label for="optimal-pay-via-interac"><?php echo $this->__('Pay via Interac') ?> </label>
44
+ </li>
45
+ <li class="control">
46
+ <input id="optimal-pay-via-cc" type="radio" title="<?php echo $this->__('Pay using Credit Card') ?>" class="radio optimal-pay-via validate-one-required-by-name" value="0" name="payment[optimal_use_interac]">
47
+ <label for="optimal-pay-via-cc"><?php echo $this->__('Pay using Credit Card') ?> </label>
48
+ </li>
49
+ <?php endif; ?>
50
+ </ul>
51
 
52
+ <script type="text/javascript">
53
+ $$('input[name=payment[method]]').invoke('on', 'click', function() {
54
+ if (this.value == '<?php echo $_code; ?>') {
55
+ $('payment_form_<?php echo $_code ?>').show();
56
+ } else {
57
+ $('payment_form_<?php echo $_code ?>').hide();
58
+ }
59
+ });
60
+ </script>
61
+
62
+ <?php return; endif; ?>
63
+
64
+ <div id="optimal-cc-forms">
65
+
66
+ <?php if ($allowInterac): ?>
67
+
68
+ <ul class="form-list" id="optimal-form-controls" style="display:none;">
69
+ <li class="control">
70
+ <input id="optimal-pay-via-interac" type="checkbox" title="<?php echo $this->__('Use Interac') ?>" class="radio optimal-pay-via" value="interac" name="optimal-pay-via">
71
+ <label for="optimal-pay-via-interac"><?php echo $this->__('Use Interac') ?> </label>
72
+ <input type="hidden" value="0" name="payment[optimal_use_interac]" id="opt-use-interac" />
73
+ </li>
74
+ <li id="interac-msg" style="display:none;">
75
+ <ul class="form-list">
76
+ <li><?php echo $this->__('This will redirect you to Optimal Hosted Payments page where you can complete your payment via Interac.'); ?></li>
77
+ </ul>
78
+ </li>
79
+ <li class="control">
80
+ <input id="optimal-pay-via-cc" type="checkbox" title="<?php echo $this->__('Pay Via Credit Card') ?>" class="radio optimal-pay-via" value="creditcard" name="optimal-pay-via">
81
+ <label for="optimal-pay-via-cc"><?php echo $this->__('Pay Via Credit Card') ?> </label>
82
+ </li>
83
+ </ul>
84
+
85
+ <script type="text/javascript">
86
+ $('p_method_<?php echo $_code; ?>').on('click', function() {
87
+ $('optimal-form-controls').show();
88
+ $$('input[name=optimal-pay-via]').each(function(element){
89
+ element.disabled = false;
90
+ });
91
+ $('opt-use-interac').disabled = false;
92
+ });
93
+
94
+ $$('input[name=optimal-pay-via]').invoke('on', 'click', function() {
95
+ if (this.value == 'interac') {
96
+ if (this.checked == true) {
97
+ $('interac-msg').show();
98
+ $('optimal-pay-via-cc').checked = false;
99
+ $('opt-use-interac').value = 1;
100
+
101
+ <?php if ($profilesEnabled): ?>
102
+
103
+ hideProfilesSelector();
104
+
105
+ <?php endif; ?>
106
+
107
+ hideFormCombo();
108
+
109
+ } else {
110
+ $('interac-msg').hide();
111
+ $('opt-use-interac').value = 0;
112
+ }
113
+ } else if (this.value == 'creditcard') {
114
+ if (this.checked == true) {
115
+ $('interac-msg').hide();
116
+ $('opt-use-interac').value = 0;
117
+ $('optimal-pay-via-interac').checked = false;
118
+
119
+ <?php if ($profilesEnabled): ?>
120
+ showProfilesSelector();
121
+ <?php endif; ?>
122
+
123
+ showFormCombo();
124
+ return;
125
+
126
+ }
127
+
128
+ <?php if ($profilesEnabled): ?>
129
+ hideProfilesSelector();
130
+ <?php endif; ?>
131
+
132
+ hideFormCombo();
133
+ }
134
+ });
135
+
136
+ function showProfilesSelector() {
137
+ $('optimal-save-profiles').show();
138
+ $$('#optimal-save-profiles select, #optimal-save-profiles input').each(function(element) {
139
+ element.disabled = false;
140
+ });
141
+ }
142
+
143
+ function showFormCombo() {
144
+ $('optimal-form-combinations').show();
145
+ $$('#optimal-form-combinations input, #optimal-form-combinations select').each(function(element) {
146
+ element.disabled = false;
147
+ });
148
+ }
149
+
150
+ function hideProfilesSelector() {
151
+ $('optimal-save-profiles').hide();
152
+ $$('#optimal-save-profiles select, #optimal-save-profiles input').each(function(element) {
153
+ element.disabled = true;
154
+ });
155
+ }
156
+
157
+ function hideFormCombo() {
158
+ $('optimal-form-combinations').hide();
159
+ $$('#optimal-form-combinations input, #optimal-form-combinations select').each(function(element) {
160
+ element.disabled = true;
161
+ });
162
+ }
163
+ </script>
164
+
165
+ <?php else: ?>
166
+
167
+ <script type="text/javascript">
168
+ $$('input[name=payment[method]]').invoke('on', 'click', function() {
169
+
170
+ if (this.value == '<?php echo $_code; ?>') {
171
+
172
+ $('optimal-form-combinations').show();
173
+
174
+ <?php if ($profilesEnabled): ?>
175
+
176
+ $('optimal-save-profiles').show();
177
+ $$('#optimal-save-profiles input, #optimal-save-profiles select').each(function(element) {
178
+ element.disabled = false;
179
+ });
180
+
181
+ <?php else: ?>
182
+
183
+ $('<?php echo $_code; ?>_cc-payment-form').show();
184
+ $$('#<?php echo $_code; ?>_cc-payment-form input, #<?php echo $_code; ?>_cc-payment-form select').each(function(element) {
185
+ element.disabled = false;
186
+ });
187
+
188
+ <?php endif; ?>
189
+
190
+ } else {
191
+
192
+ $('optimal-form-combinations').hide();
193
+
194
+ <?php if (!$profilesEnabled): ?>
195
+
196
+ $$('#<?php echo $_code; ?>_cc-payment-form input, #<?php echo $_code; ?>_cc-payment-form select').each(function(element) {
197
+ element.disabled = true;
198
+ });
199
+
200
+ <?php endif; ?>
201
+ }
202
+ });
203
+ </script>
204
+
205
+
206
+ <?php endif; ?>
207
+
208
+ <div id="optimal-form-combinations" style="display:none;">
209
+
210
+ <?php if ($profilesEnabled): ?>
211
+
212
+ <div id="select-card-form">
213
+ <ul class="profile_list form-list" id="optimal-save-profiles" style="display:none;">
214
+ <li class="wide">
215
+ <label for="<?php echo $_code ?>_profile_id"><?php echo $this->__('Select a Credit Card Profile.') ?></label>
216
+ <div class="input-box">
217
+ <select class="<?php echo $_code ?>_profile_id" id="<?php echo $_code ?>_profile_id" name="payment[profile_id]">
218
+
219
+ <option value="select"><?php echo $this->__('Select Profile') ?></option>
220
+
221
+ <?php foreach($this->profiles as $profile): ?>
222
+ <option selected="" value="<?php echo $profile->getEntityId(); ?>"><?php echo ucwords($profile->getCardNickname()); ?> / **** **** **** <?php echo $profile->getLastFourDigits(); ?></option>
223
+ <?php endforeach; ?>
224
+
225
+ <option value="new"><?php echo $this->__('New Profile') ?></option>
226
+ </select>
227
+ </div>
228
+ </li>
229
+ <li id="optimal-cc-verification">
230
+ <label class="<?php echo $_code ?>_cc_cid" for="<?php echo $_code ?>_cc_cid" class="required"><em>*</em><?php echo $this->__('Card Verification Number') ?></label>
231
+ <div class="input-box">
232
+ <div class="v-fix">
233
+ <input type="text" title="<?php echo $this->__('Card Verification Number') ?>" class="input-text cvv required-entry" id="<?php echo $_code ?>_cc_cid" name="payment[cc_cid]" value="" />
234
+ </div>
235
+ </div>
236
+ </li>
237
+ </ul>
238
+ </div>
239
+
240
+ <script type="text/javascript">
241
+ function showOptimalCcForm() {
242
+ $('<?php echo $_code; ?>_cc-payment-form').show();
243
+ $$('#<?php echo $_code; ?>_cc-payment-form input, #<?php echo $_code; ?>_cc-payment-form select').each(function(element) {
244
+ element.disabled = false;
245
+ });
246
+ }
247
+ function hideOptimalCcForm() {
248
+ $('<?php echo $_code; ?>_cc-payment-form').hide();
249
+ $$('#<?php echo $_code; ?>_cc-payment-form input, #<?php echo $_code; ?>_cc-payment-form select').each(function(element) {
250
+ element.disabled = true;
251
+ });
252
+ }
253
+
254
+ $('<?php echo $_code ?>_profile_id').on('change', function() {
255
+ if (this.value == 'new') {
256
+ $('optimal-cc-verification').hide();
257
+ $$('#optimal-cc-verification input, #optimal-cc-verification select').each(function (element) {
258
+ element.disabled = true;
259
+ });
260
+ showOptimalCcForm();
261
+ }else if (this.value == 'select') {
262
+ //
263
+ } else {
264
+ hideOptimalCcForm();
265
+ $('optimal-cc-verification').show();
266
+ $$('#optimal-cc-verification input, #optimal-cc-verification select').each(function(element) {
267
+ element.disabled = false;
268
+ });
269
+ }
270
+ });
271
+ </script>
272
+
273
+ <?php endif; ?>
274
+
275
+ <div id="<?php echo $_code; ?>_cc-payment-form" style="<?php echo $profilesEnabled ? 'display:none;' : ''; ?>">
276
+ <ul class="form-list">
277
  <li>
278
+ <label for="<?php echo $_code ?>_cc_owner" class="required"><em>*</em><?php echo $this->__('Name on Card') ?></label>
279
  <div class="input-box">
280
+ <input type="text" title="<?php echo $this->__('Name on Card') ?>" class="input-text required-entry" id="<?php echo $_code ?>_cc_owner" name="payment[cc_owner]" value="<?php echo $this->escapeHtml($this->getInfoData('cc_owner')) ?>" />
 
 
281
  </div>
282
  </li>
 
 
 
 
 
283
  <li>
284
  <label for="<?php echo $_code ?>_cc_type" class="required"><em>*</em><?php echo $this->__('Credit Card Type') ?></label>
285
  <div class="input-box">
286
+ <select id="<?php echo $_code ?>_cc_type" name="payment[cc_type]" title="<?php echo $this->__('Credit Card Type') ?>" class="required-entry validate-cc-type-select">
287
  <option value=""><?php echo $this->__('--Please Select--') ?></option>
288
  <?php $_ccType = $this->getInfoData('cc_type') ?>
289
  <?php foreach ($this->getCcAvailableTypes() as $_typeCode => $_typeName): ?>
330
  </div>
331
  </li>
332
  <?php endif; ?>
333
+ <?php if($this->canSaveProfiles()): ?>
334
+ <li class="control">
335
+ <input type="checkbox" title="<?php echo $this->__('Create Profile and Save Card') ?>" class="radio" value="1" id="<?php echo $_code ?>_optimal_create_profile" name="payment[optimal_create_profile]">
336
+ <label for="<?php echo $_code ?>_optimal_create_profile" class="required"><em>*</em><?php echo $this->__('Create Profile and Save Card') ?> </label>
337
+ </li>
338
+ <?php else: ?>
339
+ <input type="hidden" title="<?php echo $this->__('Create Profile and Save Card') ?>" class="radio" value="0" id="<?php echo $_code ?>_create_profile" name="payment[optimal_create_profile]">
340
+ <?php endif; ?>
341
+ <?php if ($this->hasSsCardType()): ?>
342
+ <li id="<?php echo $_code ?>_cc_type_ss_div">
343
+ <ul class="inner-form">
344
+ <li class="form-alt"><label for="<?php echo $_code ?>_cc_issue" class="required"><em>*</em><?php echo $this->__('Switch/Solo/Maestro Only') ?></label></li>
345
+ <li>
346
+ <label for="<?php echo $_code ?>_cc_issue"><?php echo $this->__('Issue Number') ?>:</label>
347
+ <span class="input-box">
348
+ <input type="text" title="<?php echo $this->__('Issue Number') ?>" class="input-text validate-cc-ukss cvv" id="<?php echo $_code ?>_cc_issue" name="payment[cc_ss_issue]" value="" />
349
+ </span>
350
+ </li>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
351
 
352
+ <li>
353
+ <label for="<?php echo $_code ?>_start_month"><?php echo $this->__('Start Date') ?>:</label>
354
+ <div class="input-box">
355
+ <div class="v-fix">
356
+ <select id="<?php echo $_code ?>_start_month" name="payment[cc_ss_start_month]" class="validate-cc-ukss month">
357
+ <?php foreach ($this->getCcMonths() as $k=>$v): ?>
358
+ <option value="<?php echo $k?$k:'' ?>"<?php if($k==$this->getInfoData('cc_ss_start_month')): ?> selected="selected"<?php endif ?>><?php echo $v ?></option>
359
+ <?php endforeach ?>
360
+ </select>
361
+ </div>
362
+ <div class="v-fix">
363
+ <select id="<?php echo $_code ?>_start_year" name="payment[cc_ss_start_year]" class="validate-cc-ukss year">
364
+ <?php foreach ($this->getSsStartYears() as $k=>$v): ?>
365
+ <option value="<?php echo $k?$k:'' ?>"<?php if($k==$this->getInfoData('cc_ss_start_year')): ?> selected="selected"<?php endif ?>><?php echo $v ?></option>
366
+ <?php endforeach ?>
367
+ </select>
368
+ </div>
369
+ </div>
370
+ </li>
371
+ <li class="adv-container">&nbsp;</li>
372
+ </ul>
373
+ <script type="text/javascript">
374
+ //<![CDATA[
375
+ var SSChecked<?php echo $_code ?> = function() {
376
+ var elm = $('<?php echo $_code ?>_cc_type');
377
+ if (['SS','SM','SO'].indexOf(elm.value) != -1) {
378
+ $('<?php echo $_code ?>_cc_type_ss_div').show();
379
+ } else {
380
+ $('<?php echo $_code ?>_cc_type_ss_div').hide();
381
+ }
382
+ };
383
 
384
+ Event.observe($('<?php echo $_code ?>_cc_type'), 'change', SSChecked<?php echo $_code ?>);
385
+ SSChecked<?php echo $_code ?>();
386
+ //]]>
387
+ </script>
388
+ </li>
389
+ <?php endif; ?>
390
+ </ul>
391
+ </div>
392
+ </div>
393
 
394
+ </div>
395
 
396
+ <script type="text/javascript">
 
 
 
 
397
 
398
+ </script>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/design/frontend/base/default/template/optimal/info/creditcard.phtml CHANGED
@@ -1,12 +1,15 @@
1
  <?php
2
- $skip3d = Mage::getStoreConfig('payment/optimal_hosted/skip3D');
 
 
 
 
3
  // if 3D-Secure check is enabled, only show the Payment Method Title
4
- if (!$skip3d) {
5
- echo Mage::getStoreConfig('payment/optimal_hosted/title');
6
  return;
7
  }
8
 
9
- $info = $this->getCardInfo();
10
  ?>
11
  <?php echo $this->__('Credit Card Type: %s', $this->htmlEscape(ucwords($info['card_type']))) ?><br />
12
  <?php echo $this->__('Credit Card Number: xxxx-%s', $this->htmlEscape($info['card_number'])) ?><br />
1
  <?php
2
+ $storeId = Mage::app()->getStore()->getId();
3
+ $skip3d = Mage::getStoreConfig('payment/optimal_hosted/skip3D', $storeId);
4
+ $allowInterac = Mage::getStoreConfig('payment/optimal_hosted/allow_interac', $storeId);
5
+ $info = $this->getCardInfo();
6
+
7
  // if 3D-Secure check is enabled, only show the Payment Method Title
8
+ if ((!$skip3d || $allowInterac) && empty($info['card_number'])) {
9
+ echo Mage::getStoreConfig('payment/optimal_hosted/title', $storeId);
10
  return;
11
  }
12
 
 
13
  ?>
14
  <?php echo $this->__('Credit Card Type: %s', $this->htmlEscape(ucwords($info['card_type']))) ?><br />
15
  <?php echo $this->__('Credit Card Number: xxxx-%s', $this->htmlEscape($info['card_number'])) ?><br />
app/etc/modules/Demac_Optimal.xml CHANGED
@@ -1,11 +1,11 @@
1
- <config>
2
- <modules>
3
- <Demac_Optimal>
4
- <active>true</active>
5
- <codePool>community</codePool>
6
- <depends>
7
- <Mage_Payment />
8
- </depends>
9
- </Demac_Optimal>
10
- </modules>
11
  </config>
1
+ <config>
2
+ <modules>
3
+ <Demac_Optimal>
4
+ <active>true</active>
5
+ <codePool>community</codePool>
6
+ <depends>
7
+ <Mage_Payment />
8
+ </depends>
9
+ </Demac_Optimal>
10
+ </modules>
11
  </config>
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>666999</name>
4
- <version>0.4.3</version>
5
  <stability>stable</stability>
6
  <license>GPL</license>
7
  <channel>community</channel>
@@ -14,11 +14,11 @@ The Optimal Payments extension uses a Silent Post integration to the merchant&#x
14
  This integration significantly reduces PCI compliance requirements and liability as all of the credit card information is processed in Optimal Payments Level 1 PCI compliant environment and servers leaving no sensitive customer payment information stored locally on merchant servers.&#xD;
15
  &lt;br /&gt; &lt;br /&gt;&#xD;
16
  Through the Optimal integration merchants also have the option to enable Threatmetrix fraud detection and management services. ThreatMetrix works by collecting relevant data about the customer and the order, and validating this information during the checkout. Fully integrated into the NETBANX payment gateway, enabling the ThreatMetrix option will allow merchants to automatically hold and flag suspicious orders, drastically reducing any fraud occurrences. Depending on the Score returned by ThreatMetrix an order can be held and flagged or altogether denied during the checkout.</description>
17
- <notes>Implements 3D Secure payment feature.</notes>
18
  <authors><author><name>Demac Media</name><user>demacmedia</user><email>support@demacmedia.com</email></author></authors>
19
- <date>2015-04-23</date>
20
- <time>14:28:38</time>
21
- <contents><target name="magecommunity"><dir name="Demac"><dir name="Optimal"><dir name="Block"><dir name="Adminhtml"><dir name="Errorcode"><dir name="Edit"><file name="Form.php" hash="56618ff0cc5f4c674f750412d0606aab"/></dir><file name="Edit.php" hash="8980988ca1324fac229b40f471d745c8"/><file name="Grid.php" hash="2d8ea2f836d380167e9b25a67acefd70"/></dir><file name="Errorcode.php" hash="9f0d3c6b0b51e3bedd239d3b727eff75"/><dir name="Risk"><dir name="Edit"><file name="Form.php" hash="25d4bcb59e33a94799bc9f6cb0509cc3"/><dir name="Tab"><file name="Form.php" hash="3731d284c28ed279eb5e00b41f494810"/></dir><file name="Tabs.php" hash="61a8d2ac9942356db313b423fc3c47c2"/></dir><file name="Edit.php" hash="959e8af1e6aae6d02560c98bcabea5ab"/><file name="Grid.php" hash="e999f01578aac6084520029f86852c09"/></dir><file name="Risk.php" hash="6bf5127ba14f9dd38519c6b62203f1f8"/></dir><dir name="Customer"><dir name="Cards"><file name="Form.php" hash="ce79e221d5caf995a10e47cbb4e51f8b"/><file name="Grid.php" hash="d14eb692082fe1299977e7b3ee75dcf3"/></dir><file name="Cards.php" hash="f99686c2296a850312713f6aadc4d04a"/></dir><dir name="Form"><file name="Creditcard.php" hash="d3642d432409cf55069253680bf9ee34"/></dir><dir name="Info"><file name="Creditcard.php" hash="7ba1df22bade177f4956ce9084fa98c6"/></dir><file name="Navigation.php" hash="d3b7d8765356b8da18d300cc9b1a447e"/><file name="Threat.php" hash="69605e0b8aacc80f47b5ed91e8631248"/></dir><dir name="Helper"><file name="Data.php" hash="40559187622b7867514c520f309f3d82"/></dir><dir name="Model"><dir name="Client"><file name="Abstract.php" hash="f83275be8d3b248eb145d45c2a926d84"/></dir><dir name="Config"><file name="Mode.php" hash="798d2a9bab2c0fc2749116ac1a3fc926"/><file name="Status.php" hash="767ba25406456aae4a0bd86b11023b45"/><file name="Transaction.php" hash="e83e8427e4b14c4d3cd83058c68f8965"/></dir><dir name="Creditcard"><file name="Client.php" hash="f1014811d23c1cf5efbccf61c3c6c80c"/></dir><file name="Creditcard.php" hash="4754639f6fb3d4e1f1af0fd429e46092"/><file name="Errorcode.php" hash="dae5fa1abb705961bd9f15abf3d65ec0"/><dir name="Hosted"><file name="Client.php" hash="043fdac7d3c1c4af09424488d5d1cb7f"/><file name="Exception.php" hash="dfca385bc45b1c055bbf2e8e7031230b"/></dir><dir name="Merchant"><file name="Customer.php" hash="be743a5c7aababb9752bf961570b0c27"/></dir><dir name="Method"><file name="Hosted.php" hash="4c906977feb4b3927c5e684ea9b52a37"/></dir><dir name="Mysql4"><dir name="Creditcard"><file name="Collection.php" hash="700985c287355082a3966d4b3f74838f"/></dir><file name="Creditcard.php" hash="a4e5ea4090d2f127edd19de9d2feb343"/><dir name="Errorcode"><file name="Collection.php" hash="075c7c98b606573f02aad1b096f13899"/></dir><file name="Errorcode.php" hash="0d19835b405402a5a5a7ae7c24a42c97"/><dir name="Merchant"><dir name="Customer"><file name="Collection.php" hash="aa0fbf9c0cc0a3207565443e35ae3779"/></dir><file name="Customer.php" hash="fe991d98537b7b3a07160d5b9b10802d"/></dir><dir name="Profile"><file name="Collection.php" hash="f5cd814fe62d2af8fbcc2214f94bfeb4"/></dir><file name="Profile.php" hash="6944c811248ef955a51357989ca11dd3"/><dir name="Risk"><file name="Collection.php" hash="558dc26690672dc09ae6fbfa8e780302"/></dir><file name="Risk.php" hash="5c77111382678451da4dde209a43b0fa"/></dir><file name="Observer.php" hash="ce11ba1751b4fb6c6ddf551adca02b4d"/><dir name="Profile"><file name="Client.php" hash="4358736ced5bdc7d2a7fbbf53e2ff07d"/></dir><file name="Profile.php" hash="798cef09bbc0556545edf1f00bae9bf0"/><dir name="Resource"><dir name="Mysql4"><file name="Setup.php" hash="e936830d9e4f74badc3b7663f60436dc"/></dir></dir><file name="Risk.php" hash="fab5519b0e257b8ef2f66f5f76d49f2b"/><dir name="Sales"><file name="Order.php" hash="32320888ae209b1ea3208da59312da5c"/></dir><dir name="Source"><file name="Cctype.php" hash="dd21379a29444a4c58e33e90ddeb300e"/></dir><dir name="Web"><file name="Client.php" hash="d565e254fc281e7c246cc9cfe8c2f39d"/></dir></dir><dir name="Test"><dir name="Model"><dir name="Hosted"><file name="Client.php" hash="8aa8bb4bc740daa59be041827f7cf614"/></dir><dir name="Method"><file name="Hosted.php" hash="9d39c78d0617d136c66c4c52185706a7"/></dir><file name="Observer.php" hash="345883a098197f64e2063a97d17e6274"/></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="ErrorcodesController.php" hash="7149f83536e46413ddf5b159ae4ebf91"/><file name="ThreatController.php" hash="5db39713fbd0ae13e943a891940bb22c"/></dir><dir name="Frontend"><file name="OptimalController.php" hash="b67878eb0dd4310fbb6f84723cd6ce43"/></dir><file name="HandlerController.php" hash="974dd6f3058671578a02a6ee7c0af6fb"/></dir><dir name="data"><dir name="optimal_setup"><dir name="csv"><file name="common-codes-0.3.3.csv" hash="e3c9195dbe01cfb5cf341378271b1240"/><file name="webservices-codes-0.3.3.csv" hash="8fc5562ff9bb3e5c3235fa6c7c21c0d5"/></dir><file name="data-upgrade-0.3.4-0.3.5.php" hash="4afe267d997446c46c0a1fcba771d1e1"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="30a4af4a510783219bbee940d185fb19"/><file name="config.xml" hash="1074ac413f928ad9adba6bfc34cac3a6"/><file name="system.xml" hash="4e28392139fad2a08d168d0b1381f081"/></dir><dir name="sql"><dir name="optimal_setup"><file name="install-0.1.1.php" hash="422b6afb2d2320f5d9c59cd5bff0dc3d"/><file name="install-0.2.0.php" hash="6a97d7f7b4513bce80c9bf151bd21fdc"/><file name="install-0.2.1.php" hash="2ec1146f6739ff03f90ea07217e9e968"/><file name="install-0.2.2.php" hash="3fdd9863b235b275593893af34abcefb"/><file name="install-0.2.3.php" hash="e07b474749b6ee431e90343a9c79f46b"/><file name="install-0.2.4.php" hash="e07b474749b6ee431e90343a9c79f46b"/><file name="install-0.2.5.php" hash="84228a0ce89a63179095a9790167715d"/><file name="install-0.2.6.php" hash="2986f567d1e7b4dd3e5ebdd8abd612c4"/><file name="install-0.2.7.php" hash="2986f567d1e7b4dd3e5ebdd8abd612c4"/><file name="install-0.2.9.php" hash="2986f567d1e7b4dd3e5ebdd8abd612c4"/><file name="install-0.3.5.php" hash="4abfc294ba5df2e55772e4474af173da"/><file name="mysql4-install-0.1.1.php" hash="422b6afb2d2320f5d9c59cd5bff0dc3d"/><file name="mysql4-install-0.2.0.php" hash="6a97d7f7b4513bce80c9bf151bd21fdc"/><file name="mysql4-install-0.2.1.php" hash="2ec1146f6739ff03f90ea07217e9e968"/><file name="mysql4-install-0.2.2.php" hash="3fdd9863b235b275593893af34abcefb"/><file name="mysql4-install-0.2.3.php" hash="e07b474749b6ee431e90343a9c79f46b"/><file name="mysql4-install-0.2.4.php" hash="e07b474749b6ee431e90343a9c79f46b"/><file name="mysql4-install-0.2.5.php" hash="84228a0ce89a63179095a9790167715d"/><file name="mysql4-install-0.2.6.php" hash="2986f567d1e7b4dd3e5ebdd8abd612c4"/><file name="mysql4-install-0.2.7.php" hash="2986f567d1e7b4dd3e5ebdd8abd612c4"/><file name="mysql4-install-0.2.9.php" hash="30039fc096f8db2a82a3268b467ef856"/><file name="mysql4-install-0.3.5.php" hash="5e98dddfa3303ede96338c1e73f0febe"/><file name="mysql4-upgrade-0.1.1-0.2.7.php" hash="2986f567d1e7b4dd3e5ebdd8abd612c4"/><file name="mysql4-upgrade-0.4.1-0.4.2.php" hash="fa4ffded7147e16c7b07f2aedd1d660b"/><file name="upgrade-0.1.1-0.2.7.php" hash="2986f567d1e7b4dd3e5ebdd8abd612c4"/><file name="upgrade-0.2.9-0.3.0.php" hash="989e6c4043fccfa6cdcba0a09938dd07"/><file name="upgrade-0.3.1-0.3.2.php" hash="aea721b40772c92db786b96fbb9c8bda"/><file name="upgrade-0.3.4-0.3.5.php" hash="5283e3567c7d35e22b4c87bbc89a0eb3"/><file name="upgrade-0.3.7-0.3.8.php" hash="5283e3567c7d35e22b4c87bbc89a0eb3"/><file name="upgrade-0.4.1-0.4.2.php" hash="fa4ffded7147e16c7b07f2aedd1d660b"/></dir></dir></dir><file name=".DS_Store" hash="274a24b68e17a80774c8065fa0e5d839"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="optimal.xml" hash="03c64fd49785bfca34ee3249cc9bc97d"/></dir><dir name="template"><dir name="optimal"><dir name="customer"><dir name="cards"><file name="form.phtml" hash="969544827b5e5765b6bb2bea2f62392a"/><file name="grid.phtml" hash="9a160522aa31ed44eb2f5751f40718c8"/></dir><file name="cards.phtml" hash="ed3f6e56b134674e7d8ddcb6a1deac59"/></dir><dir name="form"><file name="creditcard.phtml" hash="38c3799facc887179afd3efbabf8ec93"/></dir><dir name="info"><file name="creditcard.phtml" hash="8ed46f25ea6bd04a67317743d8502e69"/></dir><file name="threatmeter.phtml" hash="3dd0ea7621038895aa1dd1e322ba7d99"/></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="optimal"><dir name="form"><file name="creditcard.phtml" hash="550c80a4e0dc4224946de029f4c3ecf6"/></dir><dir name="info"><file name="creditcard.phtml" hash="b40291e8e97dbcb6b7cf2f4b8ffb93f5"/></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Demac_Optimal.xml" hash="2ebfc5a3a1c5688639c0cc5eb34fded0"/></dir></target></contents>
22
  <compatible/>
23
  <dependencies><required><php><min>5.3.0</min><max>5.5.19</max></php></required></dependencies>
24
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>666999</name>
4
+ <version>0.4.4</version>
5
  <stability>stable</stability>
6
  <license>GPL</license>
7
  <channel>community</channel>
14
  This integration significantly reduces PCI compliance requirements and liability as all of the credit card information is processed in Optimal Payments Level 1 PCI compliant environment and servers leaving no sensitive customer payment information stored locally on merchant servers.&#xD;
15
  &lt;br /&gt; &lt;br /&gt;&#xD;
16
  Through the Optimal integration merchants also have the option to enable Threatmetrix fraud detection and management services. ThreatMetrix works by collecting relevant data about the customer and the order, and validating this information during the checkout. Fully integrated into the NETBANX payment gateway, enabling the ThreatMetrix option will allow merchants to automatically hold and flag suspicious orders, drastically reducing any fraud occurrences. Depending on the Score returned by ThreatMetrix an order can be held and flagged or altogether denied during the checkout.</description>
17
+ <notes>Implements Interac payments feature.</notes>
18
  <authors><author><name>Demac Media</name><user>demacmedia</user><email>support@demacmedia.com</email></author></authors>
19
+ <date>2015-07-20</date>
20
+ <time>15:47:43</time>
21
+ <contents><target name="magecommunity"><dir name="Demac"><dir name="Optimal"><dir name="Block"><dir name="Adminhtml"><dir name="Errorcode"><dir name="Edit"><file name="Form.php" hash="56618ff0cc5f4c674f750412d0606aab"/></dir><file name="Edit.php" hash="8980988ca1324fac229b40f471d745c8"/><file name="Grid.php" hash="2d8ea2f836d380167e9b25a67acefd70"/></dir><file name="Errorcode.php" hash="9f0d3c6b0b51e3bedd239d3b727eff75"/><dir name="Risk"><dir name="Edit"><file name="Form.php" hash="25d4bcb59e33a94799bc9f6cb0509cc3"/><dir name="Tab"><file name="Form.php" hash="3731d284c28ed279eb5e00b41f494810"/></dir><file name="Tabs.php" hash="61a8d2ac9942356db313b423fc3c47c2"/></dir><file name="Edit.php" hash="959e8af1e6aae6d02560c98bcabea5ab"/><file name="Grid.php" hash="e999f01578aac6084520029f86852c09"/></dir><file name="Risk.php" hash="6bf5127ba14f9dd38519c6b62203f1f8"/></dir><dir name="Customer"><dir name="Cards"><file name="Form.php" hash="ce79e221d5caf995a10e47cbb4e51f8b"/><file name="Grid.php" hash="d14eb692082fe1299977e7b3ee75dcf3"/></dir><file name="Cards.php" hash="f99686c2296a850312713f6aadc4d04a"/></dir><dir name="Form"><file name="Creditcard.php" hash="f2105aace1d71c8b0f417a78b919aab1"/></dir><dir name="Info"><file name="Creditcard.php" hash="7ba1df22bade177f4956ce9084fa98c6"/></dir><file name="Navigation.php" hash="d3b7d8765356b8da18d300cc9b1a447e"/><file name="Threat.php" hash="69605e0b8aacc80f47b5ed91e8631248"/></dir><dir name="Helper"><file name="Data.php" hash="be368ef5a0ab684fc31a29dd4aac8c9e"/></dir><dir name="Model"><dir name="Client"><file name="Abstract.php" hash="f83275be8d3b248eb145d45c2a926d84"/></dir><dir name="Config"><file name="Mode.php" hash="798d2a9bab2c0fc2749116ac1a3fc926"/><file name="Status.php" hash="767ba25406456aae4a0bd86b11023b45"/><file name="Transaction.php" hash="e83e8427e4b14c4d3cd83058c68f8965"/></dir><dir name="Creditcard"><file name="Client.php" hash="f1014811d23c1cf5efbccf61c3c6c80c"/></dir><file name="Creditcard.php" hash="7fc5fd2c06ddf2dfb63b3b30450b2316"/><file name="Errorcode.php" hash="dae5fa1abb705961bd9f15abf3d65ec0"/><dir name="Hosted"><file name="Client.php" hash="00b2f596614a9a2881e522a356fdc947"/><file name="Exception.php" hash="dfca385bc45b1c055bbf2e8e7031230b"/></dir><dir name="Merchant"><file name="Customer.php" hash="be743a5c7aababb9752bf961570b0c27"/></dir><dir name="Method"><file name="Hosted.php" hash="6135da66e687ca0071f0bdd0376ad981"/></dir><dir name="Mysql4"><dir name="Creditcard"><file name="Collection.php" hash="700985c287355082a3966d4b3f74838f"/></dir><file name="Creditcard.php" hash="a4e5ea4090d2f127edd19de9d2feb343"/><dir name="Errorcode"><file name="Collection.php" hash="075c7c98b606573f02aad1b096f13899"/></dir><file name="Errorcode.php" hash="0d19835b405402a5a5a7ae7c24a42c97"/><dir name="Merchant"><dir name="Customer"><file name="Collection.php" hash="aa0fbf9c0cc0a3207565443e35ae3779"/></dir><file name="Customer.php" hash="fe991d98537b7b3a07160d5b9b10802d"/></dir><dir name="Profile"><file name="Collection.php" hash="f5cd814fe62d2af8fbcc2214f94bfeb4"/></dir><file name="Profile.php" hash="6944c811248ef955a51357989ca11dd3"/><dir name="Risk"><file name="Collection.php" hash="558dc26690672dc09ae6fbfa8e780302"/></dir><file name="Risk.php" hash="5c77111382678451da4dde209a43b0fa"/></dir><file name="Observer.php" hash="ce11ba1751b4fb6c6ddf551adca02b4d"/><dir name="Profile"><file name="Client.php" hash="4358736ced5bdc7d2a7fbbf53e2ff07d"/></dir><file name="Profile.php" hash="798cef09bbc0556545edf1f00bae9bf0"/><dir name="Resource"><dir name="Mysql4"><file name="Setup.php" hash="e936830d9e4f74badc3b7663f60436dc"/></dir></dir><file name="Risk.php" hash="fab5519b0e257b8ef2f66f5f76d49f2b"/><dir name="Sales"><file name="Order.php" hash="32320888ae209b1ea3208da59312da5c"/></dir><dir name="Source"><file name="Cctype.php" hash="dd21379a29444a4c58e33e90ddeb300e"/></dir><dir name="Web"><file name="Client.php" hash="d565e254fc281e7c246cc9cfe8c2f39d"/></dir></dir><dir name="Test"><dir name="Model"><dir name="Hosted"><file name="Client.php" hash="8aa8bb4bc740daa59be041827f7cf614"/></dir><dir name="Method"><file name="Hosted.php" hash="9d39c78d0617d136c66c4c52185706a7"/></dir><file name="Observer.php" hash="345883a098197f64e2063a97d17e6274"/></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="ErrorcodesController.php" hash="7149f83536e46413ddf5b159ae4ebf91"/><file name="ThreatController.php" hash="5db39713fbd0ae13e943a891940bb22c"/></dir><dir name="Frontend"><file name="OptimalController.php" hash="3b7c37744a48f2babb5c5e6ffe1f563e"/></dir><file name="HandlerController.php" hash="2308d08c79fae424d5ae04ea273595c7"/></dir><dir name="data"><dir name="optimal_setup"><dir name="csv"><file name="common-codes-0.3.3.csv" hash="e3c9195dbe01cfb5cf341378271b1240"/><file name="webservices-codes-0.3.3.csv" hash="8fc5562ff9bb3e5c3235fa6c7c21c0d5"/></dir><file name="data-upgrade-0.3.4-0.3.5.php" hash="4afe267d997446c46c0a1fcba771d1e1"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="30a4af4a510783219bbee940d185fb19"/><file name="config.xml" hash="d4d6bfbcf1a32ad031aeab6491bfddd0"/><file name="system.xml" hash="7a1bd378b32f879e3711cd2cdcfa2e8f"/></dir><dir name="sql"><dir name="optimal_setup"><file name="install-0.1.1.php" hash="422b6afb2d2320f5d9c59cd5bff0dc3d"/><file name="install-0.2.0.php" hash="6a97d7f7b4513bce80c9bf151bd21fdc"/><file name="install-0.2.1.php" hash="2ec1146f6739ff03f90ea07217e9e968"/><file name="install-0.2.2.php" hash="3fdd9863b235b275593893af34abcefb"/><file name="install-0.2.3.php" hash="e07b474749b6ee431e90343a9c79f46b"/><file name="install-0.2.4.php" hash="e07b474749b6ee431e90343a9c79f46b"/><file name="install-0.2.5.php" hash="84228a0ce89a63179095a9790167715d"/><file name="install-0.2.6.php" hash="2986f567d1e7b4dd3e5ebdd8abd612c4"/><file name="install-0.2.7.php" hash="2986f567d1e7b4dd3e5ebdd8abd612c4"/><file name="install-0.2.9.php" hash="2986f567d1e7b4dd3e5ebdd8abd612c4"/><file name="install-0.3.5.php" hash="4abfc294ba5df2e55772e4474af173da"/><file name="mysql4-install-0.1.1.php" hash="422b6afb2d2320f5d9c59cd5bff0dc3d"/><file name="mysql4-install-0.2.0.php" hash="6a97d7f7b4513bce80c9bf151bd21fdc"/><file name="mysql4-install-0.2.1.php" hash="2ec1146f6739ff03f90ea07217e9e968"/><file name="mysql4-install-0.2.2.php" hash="3fdd9863b235b275593893af34abcefb"/><file name="mysql4-install-0.2.3.php" hash="e07b474749b6ee431e90343a9c79f46b"/><file name="mysql4-install-0.2.4.php" hash="e07b474749b6ee431e90343a9c79f46b"/><file name="mysql4-install-0.2.5.php" hash="84228a0ce89a63179095a9790167715d"/><file name="mysql4-install-0.2.6.php" hash="2986f567d1e7b4dd3e5ebdd8abd612c4"/><file name="mysql4-install-0.2.7.php" hash="2986f567d1e7b4dd3e5ebdd8abd612c4"/><file name="mysql4-install-0.2.9.php" hash="30039fc096f8db2a82a3268b467ef856"/><file name="mysql4-install-0.3.5.php" hash="5e98dddfa3303ede96338c1e73f0febe"/><file name="mysql4-upgrade-0.1.1-0.2.7.php" hash="2986f567d1e7b4dd3e5ebdd8abd612c4"/><file name="mysql4-upgrade-0.4.1-0.4.2.php" hash="fa4ffded7147e16c7b07f2aedd1d660b"/><file name="mysql4-upgrade-0.4.3-0.4.4.php" hash="5cb4f76fccf0f97f9b4c5e5ebd530f70"/><file name="upgrade-0.1.1-0.2.7.php" hash="2986f567d1e7b4dd3e5ebdd8abd612c4"/><file name="upgrade-0.2.9-0.3.0.php" hash="989e6c4043fccfa6cdcba0a09938dd07"/><file name="upgrade-0.3.1-0.3.2.php" hash="aea721b40772c92db786b96fbb9c8bda"/><file name="upgrade-0.3.4-0.3.5.php" hash="5283e3567c7d35e22b4c87bbc89a0eb3"/><file name="upgrade-0.3.7-0.3.8.php" hash="5283e3567c7d35e22b4c87bbc89a0eb3"/><file name="upgrade-0.4.1-0.4.2.php" hash="fa4ffded7147e16c7b07f2aedd1d660b"/><file name="upgrade-0.4.3-0.4.4.php" hash="5cb4f76fccf0f97f9b4c5e5ebd530f70"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="optimal.xml" hash="03c64fd49785bfca34ee3249cc9bc97d"/></dir><dir name="template"><dir name="optimal"><dir name="customer"><dir name="cards"><file name="form.phtml" hash="be217c0a2959b8ef1284d5e45813bd03"/><file name="grid.phtml" hash="33a02b86b53044c4ff5a6c839d86ab01"/></dir><file name="cards.phtml" hash="ed3f6e56b134674e7d8ddcb6a1deac59"/></dir><dir name="form"><file name="creditcard.phtml" hash="5f2558110424752d35c3e5b3a63c4201"/></dir><dir name="info"><file name="creditcard.phtml" hash="c11c746e88ac2b299af4a1f425300bc7"/></dir><file name="threatmeter.phtml" hash="3dd0ea7621038895aa1dd1e322ba7d99"/></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="optimal"><dir name="form"><file name="creditcard.phtml" hash="550c80a4e0dc4224946de029f4c3ecf6"/></dir><dir name="info"><file name="creditcard.phtml" hash="b40291e8e97dbcb6b7cf2f4b8ffb93f5"/></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Demac_Optimal.xml" hash="c1fb7e819674b01877dc9cae9547f174"/></dir></target></contents>
22
  <compatible/>
23
  <dependencies><required><php><min>5.3.0</min><max>5.5.19</max></php></required></dependencies>
24
  </package>