AltaPay_for_Magento1 - Version 1.2.0

Version Notes

Merging of the version 1.1.3 with the five terminals extension version 1.0.1.

Download this release

Release Info

Developer AltaPay Integration Team
Extension AltaPay_for_Magento1
Version 1.2.0
Comparing to
See all releases


Code changes from version 1.1.3 to 1.2.0

Files changed (42) hide show
  1. app/code/community/Altapay/Payment/Model/Altapay.php +2 -2
  2. app/code/community/Altapay/Payment/Model/Method/Abstract.php +5 -0
  3. app/code/community/Altapay/Payment/controllers/OnepageController.php +26 -3
  4. app/code/community/Altapay/Payment/controllers/OnepageController.php.bak +519 -0
  5. app/code/community/Altapay/PaymentExtraGateways/Block/Form/Gateway2.php +13 -0
  6. app/code/community/Altapay/PaymentExtraGateways/Block/Form/Gateway3.php +13 -0
  7. app/code/community/Altapay/PaymentExtraGateways/Block/Form/Gateway4.php +13 -0
  8. app/code/community/Altapay/PaymentExtraGateways/Block/Form/Gateway5.php +13 -0
  9. app/code/community/Altapay/PaymentExtraGateways/Block/Info/Gateway2.php +18 -0
  10. app/code/community/Altapay/PaymentExtraGateways/Block/Info/Gateway3.php +18 -0
  11. app/code/community/Altapay/PaymentExtraGateways/Block/Info/Gateway4.php +18 -0
  12. app/code/community/Altapay/PaymentExtraGateways/Block/Info/Gateway5.php +18 -0
  13. app/code/community/Altapay/PaymentExtraGateways/Helper/Data.php +4 -0
  14. app/code/community/Altapay/PaymentExtraGateways/Model/Constants.php +16 -0
  15. app/code/community/Altapay/PaymentExtraGateways/Model/Method/Gateway2.php +21 -0
  16. app/code/community/Altapay/PaymentExtraGateways/Model/Method/Gateway3.php +21 -0
  17. app/code/community/Altapay/PaymentExtraGateways/Model/Method/Gateway4.php +21 -0
  18. app/code/community/Altapay/PaymentExtraGateways/Model/Method/Gateway5.php +21 -0
  19. app/code/community/Altapay/PaymentExtraGateways/etc/config.xml +70 -0
  20. app/code/community/Altapay/PaymentExtraGateways/etc/system.xml +277 -0
  21. app/design/adminhtml/default/default/template/altapaypaymentextragateways/info/gateway2.phtml +29 -0
  22. app/design/adminhtml/default/default/template/altapaypaymentextragateways/info/gateway3.phtml +29 -0
  23. app/design/adminhtml/default/default/template/altapaypaymentextragateways/info/gateway4.phtml +29 -0
  24. app/design/adminhtml/default/default/template/altapaypaymentextragateways/info/gateway5.phtml +29 -0
  25. app/design/adminhtml/default/default/template/altapaypaymentextragateways/pdf/gateway2.phtml +29 -0
  26. app/design/adminhtml/default/default/template/altapaypaymentextragateways/pdf/gateway3.phtml +29 -0
  27. app/design/adminhtml/default/default/template/altapaypaymentextragateways/pdf/gateway4.phtml +29 -0
  28. app/design/adminhtml/default/default/template/altapaypaymentextragateways/pdf/gateway5.phtml +29 -0
  29. app/design/frontend/base/default/template/altapaypaymentextragateways/form/gateway2.phtml +4 -0
  30. app/design/frontend/base/default/template/altapaypaymentextragateways/form/gateway3.phtml +4 -0
  31. app/design/frontend/base/default/template/altapaypaymentextragateways/form/gateway4.phtml +4 -0
  32. app/design/frontend/base/default/template/altapaypaymentextragateways/form/gateway5.phtml +4 -0
  33. app/design/frontend/base/default/template/altapaypaymentextragateways/info/gateway2.phtml +1 -0
  34. app/design/frontend/base/default/template/altapaypaymentextragateways/info/gateway3.phtml +1 -0
  35. app/design/frontend/base/default/template/altapaypaymentextragateways/info/gateway4.phtml +1 -0
  36. app/design/frontend/base/default/template/altapaypaymentextragateways/info/gateway5.phtml +1 -0
  37. app/design/frontend/base/default/template/altapaypaymentextragateways/pdf/gateway2.phtml +1 -0
  38. app/design/frontend/base/default/template/altapaypaymentextragateways/pdf/gateway3.phtml +1 -0
  39. app/design/frontend/base/default/template/altapaypaymentextragateways/pdf/gateway4.phtml +1 -0
  40. app/design/frontend/base/default/template/altapaypaymentextragateways/pdf/gateway5.phtml +1 -0
  41. app/etc/modules/Altapay_Payment.xml +7 -0
  42. package.xml +5 -5
app/code/community/Altapay/Payment/Model/Altapay.php CHANGED
@@ -166,9 +166,9 @@ class Altapay_Payment_Model_Altapay {
166
  *
167
  * @return AltapayReleaseResponse
168
  */
169
- public function releaseReservation($paymentId, $amount)
170
  {
171
- return $this->getAltapayMerchantAPI()->releaseReservation($paymentId, $amount);
172
  }
173
 
174
 
166
  *
167
  * @return AltapayReleaseResponse
168
  */
169
+ public function releaseReservation($paymentId)
170
  {
171
+ return $this->getAltapayMerchantAPI()->releaseReservation($paymentId);
172
  }
173
 
174
 
app/code/community/Altapay/Payment/Model/Method/Abstract.php CHANGED
@@ -265,8 +265,12 @@ abstract class Altapay_Payment_Model_Method_Abstract extends Mage_Payment_Model_
265
 
266
 
267
  /**
 
 
 
268
  * (non-PHPdoc)
269
  * @see code/core/Mage/Payment/Model/Method/Mage_Payment_Model_Method_Abstract#void()
 
270
  */
271
  public function void(Varien_Object $payment)
272
  {
@@ -274,6 +278,7 @@ abstract class Altapay_Payment_Model_Method_Abstract extends Mage_Payment_Model_
274
  $transaction_id = $authTrans->getTxnId();
275
 
276
  $response = $this->getAltapayModel($payment)->releaseReservation($transaction_id);
 
277
  $payment->setTransactionAdditionalInfo('altapay_response', serialize($response));
278
 
279
  $payment->setIsTransactionClosed(false);
265
 
266
 
267
  /**
268
+ * Void is in regards to the payment on the order invoice - to void the authorization, for instance - so that the
269
+ * funds aren't subsequently captured. Payments have to be refunded after capture and cannot be voided.
270
+ *
271
  * (non-PHPdoc)
272
  * @see code/core/Mage/Payment/Model/Method/Mage_Payment_Model_Method_Abstract#void()
273
+ * @see http://magento.stackexchange.com/questions/7271/whats-the-difference-between-voiding-and-canceling-an-order
274
  */
275
  public function void(Varien_Object $payment)
276
  {
278
  $transaction_id = $authTrans->getTxnId();
279
 
280
  $response = $this->getAltapayModel($payment)->releaseReservation($transaction_id);
281
+
282
  $payment->setTransactionAdditionalInfo('altapay_response', serialize($response));
283
 
284
  $payment->setIsTransactionClosed(false);
app/code/community/Altapay/Payment/controllers/OnepageController.php CHANGED
@@ -121,9 +121,6 @@ class Altapay_Payment_OnepageController extends Mage_Checkout_OnepageController
121
 
122
  $order = $this->_loadOrder($orderId);
123
 
124
-
125
-
126
-
127
  $status = $this->getRequest()->getParam('status');
128
  if(!is_null($order))
129
  {
@@ -165,6 +162,12 @@ class Altapay_Payment_OnepageController extends Mage_Checkout_OnepageController
165
  {
166
  // The notification is a payment-notification
167
  $order->setState(Mage_Sales_Model_Order::STATE_PROCESSING, true, 'The payment is no longer "open" at Altapay, we can start processing the order', false);
 
 
 
 
 
 
168
  }
169
  else
170
  {
@@ -208,6 +211,7 @@ class Altapay_Payment_OnepageController extends Mage_Checkout_OnepageController
208
  print("An unknown notification was sent: ".$status);
209
  throw new Exception("An unknown notification was sent: ".$status);
210
  }
 
211
  }
212
 
213
  /**
@@ -516,4 +520,23 @@ class Altapay_Payment_OnepageController extends Mage_Checkout_OnepageController
516
  }
517
  $this->_redirect('altapaypayment/onepage/failure?orderID=' . $reservationResponse->getPrimaryPayment()->getShopOrderId());
518
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
519
  }
121
 
122
  $order = $this->_loadOrder($orderId);
123
 
 
 
 
124
  $status = $this->getRequest()->getParam('status');
125
  if(!is_null($order))
126
  {
162
  {
163
  // The notification is a payment-notification
164
  $order->setState(Mage_Sales_Model_Order::STATE_PROCESSING, true, 'The payment is no longer "open" at Altapay, we can start processing the order', false);
165
+
166
+ if ($this->getRequest()->getParam('payment_status') == 'bank_payment_finalized')
167
+ {
168
+ $this->saveNotificationTransactionForEPayments($order, $reservationResponse); // Only for ePayments
169
+ }
170
+
171
  }
172
  else
173
  {
211
  print("An unknown notification was sent: ".$status);
212
  throw new Exception("An unknown notification was sent: ".$status);
213
  }
214
+
215
  }
216
 
217
  /**
520
  }
521
  $this->_redirect('altapaypayment/onepage/failure?orderID=' . $reservationResponse->getPrimaryPayment()->getShopOrderId());
522
  }
523
+
524
+ /**
525
+ * @param $order
526
+ * @param $reservationResponse
527
+ * @throws Exception
528
+ */
529
+ private function saveNotificationTransactionForEPayments($order, $reservationResponse)
530
+ {
531
+ /* @var $payment Mage_Sales_Model_Order_Payment */
532
+ $payment = $order->getPayment();
533
+
534
+ $authTrans = $payment->getAuthorizationTransaction();
535
+
536
+ // Updates the existing authorization transaction. This will allow the capture of the payment.
537
+ $authTrans->setAdditionalInformation(Mage_Sales_Model_Order_Payment_Transaction::RAW_DETAILS, $this->getRequest()->getParams());
538
+ $authTrans->setAdditionalInformation('altapay_response', serialize($reservationResponse));
539
+
540
+ $authTrans->save();
541
+ }
542
  }
app/code/community/Altapay/Payment/controllers/OnepageController.php.bak ADDED
@@ -0,0 +1,519 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ require_once 'Mage/Checkout/controllers/OnepageController.php';
4
+ require_once(dirname(__FILE__).'/../Model/Api/AltapayMerchantAPI.class.php');
5
+
6
+
7
+ class Altapay_Payment_OnepageController extends Mage_Checkout_OnepageController {
8
+
9
+ public function failureAction() {
10
+
11
+ $errorMessage = 'Internal error';
12
+ $paymentScheme = 'N/A';
13
+
14
+ try
15
+ {
16
+ if ($this->getRequest()->has('xml'))
17
+ {
18
+ $reservationResponse = new AltapayReservationResponse(new SimpleXmlElement($this->getRequest()->getParam('xml')));
19
+
20
+ $errorMessage = $reservationResponse->getCardHolderErrorMessage();
21
+
22
+ $payments = $reservationResponse->getPayments();
23
+ if (!is_null($payments) && count($payments) > 0)
24
+ {
25
+ $paymentScheme = $payments[0]->getPaymentSchemeName();
26
+ }
27
+ }
28
+ }
29
+ catch (Exception $ex)
30
+ {
31
+ // do something?
32
+ }
33
+ Mage::getSingleton('core/session')->setData('altapay_error_message', $errorMessage);
34
+ Mage::getSingleton('core/session')->setData('altapay_payment_scheme_name', $paymentScheme);
35
+
36
+ $this->loadLayout();
37
+ $this->renderLayout();
38
+ }
39
+
40
+ public function formAction() {
41
+ $this->loadLayout();
42
+ $this->getLayout()->getBlock('head')->setTitle($this->__('Checkout'));
43
+ $this->renderLayout();
44
+ }
45
+
46
+ /**
47
+ * This method is called by Altapay, and the result will be displayed to the customer.
48
+ */
49
+ public function successAction()
50
+ {
51
+
52
+ $reservationResponse = new AltapayReservationResponse(new SimpleXmlElement($this->getRequest()->getParam('xml')));
53
+
54
+ /**
55
+ * Store the authorization transaction id in the session, in order
56
+ * for it to be available in Payment->capture (which is called by Magento
57
+ * when saving the quote)
58
+ */
59
+ Mage::getSingleton('core/session')->setData('altapay_auth_transaction_id', $reservationResponse->getPrimaryPayment()->getId());
60
+ Mage::getSingleton('core/session')->setData('altapay_requires_capture', $this->getRequest()->getParam('require_capture'));
61
+ Mage::getSingleton('core/session')->setData('altapay_payment_status', $this->getRequest()->getParam('payment_status'));
62
+
63
+ $reservationAmount = $this->extractPriceFromXML($reservationResponse->getXml());
64
+
65
+ $amountIsMathing = false;
66
+ if($reservationAmount == $this->getQuoteAmount() || $this->getQuoteAmount() == 0) {
67
+ $amountIsMathing = true;
68
+ }
69
+
70
+ if ($reservationResponse->wasSuccessful() && $amountIsMathing) {
71
+ if($this->isFraudcheckEnabled($reservationResponse)){
72
+ switch ($reservationResponse->getPrimaryPayment()->getFraudRecommendation()) {
73
+ case 'Deny':
74
+ $this->handleTransactionRejection($reservationResponse);
75
+ break;
76
+ case 'Unknown':
77
+ //Intentional fall through
78
+ case 'Challenge': //There is to handle challange cases.
79
+ //Intentional fall through
80
+ case 'Accept':
81
+ default:
82
+ //Intentional fall through
83
+ $this->storeOrderAndPayment($reservationResponse, 'success');
84
+ break;
85
+ }
86
+ }
87
+ else{
88
+ $this->storeOrderAndPayment($reservationResponse, 'success');
89
+ }
90
+ }
91
+ elseif ($reservationResponse->wasSuccessful() && !$amountIsMathing) {
92
+ $this->handleTransactionRejection($reservationResponse);
93
+ }
94
+ else {
95
+ $this->storeOrderAndPayment($reservationResponse, 'failed');
96
+ }
97
+ }
98
+
99
+ /**
100
+ * This method is called by Altapay, and the result will be displayed to the customer.
101
+ */
102
+ public function openAction()
103
+ {
104
+ $reservationResponse = new AltapayReservationResponse(new SimpleXmlElement($this->getRequest()->getParam('xml')));
105
+
106
+ $this->storeOrderAndPayment($reservationResponse, 'open');
107
+ }
108
+
109
+ /**
110
+ * This method is called by Altapay's gateway without the user being there to see the result.
111
+ * For this reason we print out some things which will be visible in the logs in Altapay.
112
+ */
113
+ public function notificationAction()
114
+ {
115
+ $reservationResponse = new AltapayReservationResponse(new SimpleXmlElement($this->getRequest()->getParam('xml')));
116
+
117
+ // Find the order
118
+ $orderId = $reservationResponse->getPrimaryPayment()->getShopOrderId();
119
+
120
+ //Mage_Checkout_Model_Session::getQuote();
121
+
122
+ $order = $this->_loadOrder($orderId);
123
+
124
+
125
+
126
+
127
+ $status = $this->getRequest()->getParam('status');
128
+ if(!is_null($order))
129
+ {
130
+ print("OrderState: ".$order->getState()."\n");
131
+ }
132
+ else
133
+ {
134
+ $merchantErrorMessage = $this->getRequest()->getPost('merchant_error_message', '');
135
+
136
+ if ($merchantErrorMessage == 'Declined')
137
+ {
138
+ // we are ok with not finding the payment
139
+ return;
140
+ }
141
+
142
+ $quote = Mage::getModel('sales/quote')->load($reservationResponse->getPrimaryPayment()->getShopOrderId(), 'reserved_order_id');
143
+
144
+ $this->getOnePage()->setQuote($quote);
145
+
146
+ if($status == 'success' || $status == 'succeeded')
147
+ {
148
+ // create an order etc.
149
+ $this->successAction();
150
+ $order = $this->_loadOrder($orderId);
151
+ }
152
+ else
153
+ {
154
+ print("Could not find order: ".$orderId);
155
+ throw new Exception("Could not find order: ".$orderId);
156
+ }
157
+ }
158
+
159
+ // Handle the actual notification
160
+ if($status == 'success' || $status == 'succeeded')
161
+ {
162
+ if($order->getState() == Mage_Sales_Model_Order::STATE_PENDING_PAYMENT)
163
+ {
164
+ if(bccomp($reservationResponse->getPrimaryPayment()->getReservedAmount(), $order->getTotalDue(), 2) == 0)
165
+ {
166
+ // The notification is a payment-notification
167
+ $order->setState(Mage_Sales_Model_Order::STATE_PROCESSING, true, 'The payment is no longer "open" at Altapay, we can start processing the order', false);
168
+ }
169
+ else
170
+ {
171
+ print('The payment is most likely still "open" because the reserved amount and the amount due do not match: '.$reservationResponse->getPrimaryPayment()->getReservedAmount().' and '.$order->getTotalDue()."\n");
172
+ $order->setState(Mage_Sales_Model_Order::STATE_PENDING_PAYMENT, true, 'The payment is most likely still "open" because the reserved amount and the amount due do not match: '.$reservationResponse->getPrimaryPayment()->getReservedAmount().' and '.$order->getTotalDue(), false);
173
+ }
174
+ $order->save();
175
+ }
176
+ else if($order->getState() == Mage_Sales_Model_Order::STATE_PROCESSING)
177
+ {
178
+ print("The order is already processing, hmm..\n");
179
+ }
180
+ else
181
+ {
182
+ print("Status was success/succeeded, but the order state was unexpected:".$order->getState()."\n");
183
+ }
184
+ }
185
+ else if($status == 'failed')
186
+ {
187
+ print("status is failed\n");
188
+
189
+ /**
190
+ * Cancel the order if it is
191
+ * pending
192
+ * _or_
193
+ * is a paypal payment (as those guys can make all sorts of crazy jumps in state)
194
+ *
195
+ * Keeping it narrow for the time being, as we do not know the consequences of changing
196
+ * the state on the order.
197
+ */
198
+ if($order->getState() == Mage_Sales_Model_Order::STATE_PENDING_PAYMENT || $reservationResponse->getPrimaryPayment()->getPaymentSchemeName() == 'PayPal')
199
+ {
200
+ print("cancelling order\n");
201
+ // Cancel the order (as the payment was declined)
202
+ $order->setState(Mage_Sales_Model_Order::STATE_CANCELED, true, 'The payment was declined', false);
203
+ $order->save();
204
+ }
205
+ }
206
+ else
207
+ {
208
+ print("An unknown notification was sent: ".$status);
209
+ throw new Exception("An unknown notification was sent: ".$status);
210
+ }
211
+ }
212
+
213
+ /**
214
+ * This method is called when the user chooses to use an already existing subscription.
215
+ *
216
+ * We should:
217
+ * - Find the subscription and verify that it belongs to the user.
218
+ * - Attempt to make a recurring preauth/capture to cover the order.
219
+ */
220
+ public function recurringPaymentAction()
221
+ {
222
+ $params = $this->getRequest()->getParams();
223
+
224
+ if(!isset($params['subscription_id']) || $params['subscription_id'] == 'new')
225
+ {
226
+ Mage::getSingleton('checkout/session')->setErrorMessage("No subscription provided");
227
+ $this->_redirect('checkout/onepage/failure');
228
+ }
229
+ else
230
+ {
231
+ $subscription = Mage::getModel('altapaypayment/subscription')->load($params['subscription_id']);
232
+ if($subscription->getCustomerId() != $this->getCustomer()->getId())
233
+ {
234
+ Mage::getSingleton('checkout/session')->setErrorMessage("This subscription does not belong to you");
235
+ $this->_redirect('checkout/onepage/failure');
236
+ }
237
+
238
+ if($subscription->getCurrencyCode() != $this->getOnepage()->getQuote()->getQuoteCurrencyCode())
239
+ {
240
+ Mage::getSingleton('checkout/session')->setErrorMessage("This subscription is in the wrong currency");
241
+ $this->_redirect('checkout/onepage/failure');
242
+ }
243
+ else
244
+ {
245
+ $this->processRecurringPayment($subscription);
246
+ }
247
+ }
248
+ }
249
+
250
+ /**
251
+ * This method is called when we have successfully made a subscription.
252
+ *
253
+ * We should:
254
+ * - Store the subscription for later use
255
+ * - Attempt to make a recurring preauth/capture to cover the order.
256
+ */
257
+ public function recurringSuccessAction()
258
+ {
259
+ // Store the subscription
260
+ $subscription = $this->storeSubscription($this->getRequest()->getParam('xml'));
261
+
262
+ $this->processRecurringPayment($subscription);
263
+ }
264
+
265
+ private function storeOrderAndPayment($reservationResponse, $successType='success')
266
+ {
267
+
268
+ if(!$this->getOnepage()->getQuote()){
269
+ Mage::log($_SERVER['REMOTE_ADDR'].': no quote',null,'altapay.log',true);
270
+ // Redirect to success page
271
+ $this->_redirect('checkout/onepage/success');
272
+
273
+ // Render Meta-Redirect success page (could be skipped)
274
+ $this->loadLayout();
275
+ $this->_initLayoutMessages('checkout/session');
276
+ $this->renderLayout();
277
+ return;
278
+ }
279
+
280
+ if(!$this->getOnepage()->getQuote()->getIsActive()){
281
+ Mage::log($_SERVER['REMOTE_ADDR'].': quote not active',null,'altapay.log',true);
282
+ // Redirect to success page
283
+ $this->_redirect('checkout/onepage/success');
284
+
285
+ // Render Meta-Redirect success page (could be skipped)
286
+ $this->loadLayout();
287
+ $this->_initLayoutMessages('checkout/session');
288
+ $this->renderLayout();
289
+ return;
290
+ }
291
+
292
+ $checkoutSessionId = $this->getOnepage()->getCheckout()->getSessionId();
293
+
294
+ try{
295
+ // Clear the basket and save the order (including some info about how the payment went)
296
+ $this->getOnepage()->getQuote()->collectTotals();
297
+ $this->getOnepage()->getQuote()->getPayment()->setAdditionalInformation('successType', $successType);
298
+ $orderId = $this->getOnepage()->saveOrder()->getLastOrderId();
299
+ $this->getOnepage()->getQuote()->save();
300
+ }
301
+ catch(Exception $e){
302
+ Mage::log($_SERVER['REMOTE_ADDR'].': exception: '.$e->getMessage(),null,'altapay.log',true);
303
+ // Redirect to success page
304
+ $this->_redirect('checkout/onepage/success');
305
+
306
+ // Render Meta-Redirect success page (could be skipped)
307
+ $this->loadLayout();
308
+ $this->_initLayoutMessages('checkout/session');
309
+ $this->renderLayout();
310
+ return;
311
+ }
312
+
313
+ // Store the information from Altapay
314
+ {
315
+ $order = $this->_loadOrder($orderId);
316
+
317
+ $payment = $order->getPayment();
318
+ $payment->setTransactionId($reservationResponse->getPrimaryPayment()->getId());
319
+ if($reservationResponse->getPrimaryPayment()->getPaymentNature() == 'CreditCard')
320
+ {
321
+ $payment->setData('cc_last4', substr('****'.$reservationResponse->getPrimaryPayment()->getMaskedPan(), -4));
322
+ $payment->setData('cc_number_enc', $reservationResponse->getPrimaryPayment()->getMaskedPan());
323
+ $payment->setData('cc_trans_id', $reservationResponse->getPrimaryPayment()->getId());
324
+ }
325
+ $payment->setAdditionalData(serialize($reservationResponse));
326
+ $payment->setAdditionalInformation(Mage_Sales_Model_Order_Payment_Transaction::RAW_DETAILS, $this->getRequest()->getParams());
327
+
328
+ $payment->save();
329
+
330
+ $transaction = $payment->addTransaction(Mage_Sales_Model_Order_Payment_Transaction::TYPE_AUTH);
331
+ $transaction->setAdditionalInformation(Mage_Sales_Model_Order_Payment_Transaction::RAW_DETAILS, $this->getRequest()->getParams());
332
+ $transaction->setAdditionalInformation('altapay_response', serialize($reservationResponse));
333
+ $transaction->setTxnId($reservationResponse->getPrimaryPayment()->getId());
334
+ $transaction->setIsClosed(false);
335
+ $transaction->save();
336
+
337
+ if($successType == 'open')
338
+ {
339
+ $order->setState(Mage_Sales_Model_Order::STATE_PENDING_PAYMENT, true, 'The payment is "open" at Altapay, we must wait for a notification before it will be processing', false);
340
+ $order->save();
341
+ }
342
+ elseif ($successType == 'failed')
343
+ {
344
+ // Cancel the order (as the payment was declined)
345
+ $order->setState(Mage_Sales_Model_Order::STATE_CANCELED, true, 'The payment was declined', false);
346
+ $order->save();
347
+ }
348
+ }
349
+
350
+ if($checkoutSessionId != $this->getOnepage()->getCheckout()->getSessionId()) {
351
+ $this->_redirect('altapaypayment/onepage/customerCreated',array('success' => $this->getOnepage()->getCheckout()->getSessionId()));
352
+ } else {
353
+ // Redirect to success page
354
+ $this->_redirect('checkout/onepage/success');
355
+ }
356
+ // Render Meta-Redirect success page (could be skipped)
357
+ $this->loadLayout();
358
+ $this->_initLayoutMessages('checkout/session');
359
+ $this->renderLayout();
360
+ }
361
+
362
+ public function customerCreatedAction() {
363
+
364
+ $session = Mage::getSingleton('checkout/session');
365
+ $sessionId = $this->getRequest()->getParam('success',false);
366
+ if($session->getSessionId() != $sessionId) {
367
+ $session->getCookie()->set($session->getSessionName(),$sessionId);
368
+ }
369
+ $this->_redirect('checkout/onepage/success');
370
+ }
371
+
372
+
373
+ private function processRecurringPayment($subscription)
374
+ {
375
+ $totals = $this->getOnePage()->getQuote()->getTotals();
376
+ $grandTotal = $totals['grand_total']->getValue();
377
+ $amount = number_format($grandTotal, 2,'.','');
378
+
379
+ $storeId = $this->getOnePage()->getQuote()->getStoreId();
380
+ $altapayModel = new Altapay_Payment_Model_Altapay($storeId);
381
+ $reservationResponse = $altapayModel->recurringReservation($subscription->getSubscriptionId(), $amount);
382
+
383
+ if($reservationResponse->wasSuccessful())
384
+ {
385
+ $this->storeOrderAndPayment($reservationResponse, 'success');
386
+ }
387
+ else
388
+ {
389
+ Mage::getSingleton('checkout/session')->setErrorMessage($reservationResponse->getCardHolderErrorMessage());
390
+ $this->_redirect('checkout/onepage/failure');
391
+ }
392
+ }
393
+
394
+ private function storeSubscription($xml)
395
+ {
396
+ $subscriptionResponse = new AltapayReservationResponse(new SimpleXmlElement($xml));
397
+
398
+ $currencyMapper = new Altapay_Payment_Helper_CurrencyMapper();
399
+
400
+ /* @var Mage_Customer_Model_Customer $customer */
401
+ $customer = $this->getOnepage()->getCustomerSession()->getCustomer();
402
+ $subscription = Mage::getModel('altapaypayment/subscription');
403
+ $subscription->setSubscriptionId($subscriptionResponse->getPrimaryPayment()->getId());
404
+ $subscription->setCustomerId($customer->getId());
405
+ $subscription->setMaskedPan($subscriptionResponse->getPrimaryPayment()->getMaskedPan());
406
+ $subscription->setCardToken($subscriptionResponse->getPrimaryPayment()->getCreditCardToken());
407
+ $subscription->setCurrencyCode($currencyMapper->getAlpha($subscriptionResponse->getPrimaryPayment()->getCurrency()));
408
+ $subscription->save();
409
+
410
+ return $subscription;
411
+ }
412
+
413
+ /**
414
+ * @return Mage_Sales_Model_Order
415
+ **/
416
+ private function _loadOrder($orderId)
417
+ {
418
+ $order = Mage::getModel('sales/order')->loadByIncrementId($orderId);
419
+ if($order->getIncrementId() == $orderId)
420
+ {
421
+ return $order;
422
+ }
423
+ return null;
424
+ }
425
+
426
+ /**
427
+ * @return Mage_Customer_Model_Customer
428
+ */
429
+ private function getCustomer()
430
+ {
431
+ return $this->getOnepage()->getCustomerSession()->getCustomer();
432
+ }
433
+
434
+ private function getQuoteAmount()
435
+ {
436
+ $totals = $this->getOnePage()->getQuote()->getTotals();
437
+ $grandTotal = $totals['grand_total']->getValue();
438
+ $amount = number_format($grandTotal, 2,'.','');
439
+ return $amount;
440
+ }
441
+
442
+ private function extractPriceFromXML($xml)
443
+ {
444
+ $simpleXML = new SimpleXmlElement($xml);
445
+ $total = $simpleXML->Body->Transactions[0]->Transaction->ReservedAmount;
446
+ $surcharge = $simpleXML->Body->Transactions[0]->Transaction->SurchargeAmount;
447
+ return bcsub($total, $surcharge, 2);
448
+ }
449
+
450
+ private function releasePayment($paymentID)
451
+ {
452
+ try{
453
+ $altapayAPI = $this->getAltapayAPI();
454
+ $altapayAPI->releaseReservation($paymentID);
455
+ }
456
+ catch(Exception $ex){
457
+ //We tried
458
+ }
459
+ }
460
+
461
+ private function refundPayment($paymentID)
462
+ {
463
+ try{
464
+ $altapayAPI = $this->getAltapayAPI();
465
+ $altapayAPI->refundCapturedReservation($paymentID);
466
+ }
467
+ catch(Exception $ex){
468
+ //We tried
469
+ }
470
+ }
471
+
472
+ private function getAltapayAPI()
473
+ {
474
+ $baseURL = Mage::getStoreConfig(Altapay_Payment_Model_Constants::CONF_PATH_API_INSTALLATION);
475
+ $username = Mage::getStoreConfig(Altapay_Payment_Model_Constants::CONF_PATH_API_USERNAME);
476
+ $password = Mage::getStoreConfig(Altapay_Payment_Model_Constants::CONF_PATH_API_PASSWORD);
477
+ return new AltapayMerchantAPI($baseURL, $username, $password);
478
+ }
479
+ private function isReservation($paymentStatus){
480
+ if($paymentStatus == 'preauth'){
481
+ return true;
482
+ }
483
+ elseif($paymentStatus == 'invoice_initialized'){
484
+ return true;
485
+ }
486
+ return false;
487
+ }
488
+
489
+ /**
490
+ * @param AltapayReservationResponse $reservationResponse
491
+ */
492
+ private function isFraudcheckEnabled($reservationResponse)
493
+ {
494
+ try{
495
+ if($reservationResponse->getPrimaryPayment()->getFraudRecommendation() != null) {
496
+ return true;
497
+ }
498
+ }
499
+ catch(Exception $ex){
500
+ //I would assume that there is no fraud detection available.
501
+ }
502
+ return false;
503
+ }
504
+
505
+ /**
506
+ * @param AltapayReservationResponse $reservationResponse
507
+ */
508
+ private function handleTransactionRejection($reservationResponse)
509
+ {
510
+ if($this->isReservation($this->getRequest()->getParam('payment_status')))
511
+ {
512
+ $this->releasePayment($reservationResponse->getPrimaryPayment()->getId());
513
+ }
514
+ else{
515
+ $this->refundPayment($reservationResponse->getPrimaryPayment()->getId());
516
+ }
517
+ $this->_redirect('altapaypayment/onepage/failure?orderID=' . $reservationResponse->getPrimaryPayment()->getShopOrderId());
518
+ }
519
+ }
app/code/community/Altapay/PaymentExtraGateways/Block/Form/Gateway2.php ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Altapay_PaymentExtraGateways_Block_Form_Gateway2 extends Mage_Payment_Block_Form_Cc
4
+ {
5
+
6
+ protected function _construct()
7
+ {
8
+ parent::_construct();
9
+ $this->setTemplate('altapaypaymentextragateways/form/gateway2.phtml');
10
+ }
11
+
12
+
13
+ }
app/code/community/Altapay/PaymentExtraGateways/Block/Form/Gateway3.php ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Altapay_PaymentExtraGateways_Block_Form_Gateway3 extends Mage_Payment_Block_Form_Cc
4
+ {
5
+
6
+ protected function _construct()
7
+ {
8
+ parent::_construct();
9
+ $this->setTemplate('altapaypaymentextragateways/form/gateway3.phtml');
10
+ }
11
+
12
+
13
+ }
app/code/community/Altapay/PaymentExtraGateways/Block/Form/Gateway4.php ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Altapay_PaymentExtraGateways_Block_Form_Gateway4 extends Mage_Payment_Block_Form_Cc
4
+ {
5
+
6
+ protected function _construct()
7
+ {
8
+ parent::_construct();
9
+ $this->setTemplate('altapaypaymentextragateways/form/gateway4.phtml');
10
+ }
11
+
12
+
13
+ }
app/code/community/Altapay/PaymentExtraGateways/Block/Form/Gateway5.php ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Altapay_PaymentExtraGateways_Block_Form_Gateway5 extends Mage_Payment_Block_Form_Cc
4
+ {
5
+
6
+ protected function _construct()
7
+ {
8
+ parent::_construct();
9
+ $this->setTemplate('altapaypaymentextragateways/form/gateway5.phtml');
10
+ }
11
+
12
+
13
+ }
app/code/community/Altapay/PaymentExtraGateways/Block/Info/Gateway2.php ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Altapay_PaymentExtraGateways_Block_Info_Gateway2 extends Mage_Payment_Block_Info_Cc
4
+ {
5
+ protected function _construct()
6
+ {
7
+ parent::_construct();
8
+ $this->setTemplate('altapaypaymentextragateways/info/gateway2.phtml');
9
+ }
10
+
11
+ public function toPdf()
12
+ {
13
+ $this->setTemplate('altapaypaymentextragateways/pdf/gateway2.phtml');
14
+ return $this->toHtml();
15
+ }
16
+
17
+
18
+ }
app/code/community/Altapay/PaymentExtraGateways/Block/Info/Gateway3.php ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Altapay_PaymentExtraGateways_Block_Info_Gateway3 extends Mage_Payment_Block_Info_Cc
4
+ {
5
+ protected function _construct()
6
+ {
7
+ parent::_construct();
8
+ $this->setTemplate('altapaypaymentextragateways/info/gateway3.phtml');
9
+ }
10
+
11
+ public function toPdf()
12
+ {
13
+ $this->setTemplate('altapaypaymentextragateways/pdf/gateway3.phtml');
14
+ return $this->toHtml();
15
+ }
16
+
17
+
18
+ }
app/code/community/Altapay/PaymentExtraGateways/Block/Info/Gateway4.php ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Altapay_PaymentExtraGateways_Block_Info_Gateway4 extends Mage_Payment_Block_Info_Cc
4
+ {
5
+ protected function _construct()
6
+ {
7
+ parent::_construct();
8
+ $this->setTemplate('altapaypaymentextragateways/info/gateway4.phtml');
9
+ }
10
+
11
+ public function toPdf()
12
+ {
13
+ $this->setTemplate('altapaypaymentextragateways/pdf/gateway4.phtml');
14
+ return $this->toHtml();
15
+ }
16
+
17
+
18
+ }
app/code/community/Altapay/PaymentExtraGateways/Block/Info/Gateway5.php ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Altapay_PaymentExtraGateways_Block_Info_Gateway5 extends Mage_Payment_Block_Info_Cc
4
+ {
5
+ protected function _construct()
6
+ {
7
+ parent::_construct();
8
+ $this->setTemplate('altapaypaymentextragateways/info/gateway5.phtml');
9
+ }
10
+
11
+ public function toPdf()
12
+ {
13
+ $this->setTemplate('altapaypaymentextragateways/pdf/gateway5.phtml');
14
+ return $this->toHtml();
15
+ }
16
+
17
+
18
+ }
app/code/community/Altapay/PaymentExtraGateways/Helper/Data.php ADDED
@@ -0,0 +1,4 @@
 
 
 
 
1
+ <?php
2
+ class Altapay_PaymentExtraGateways_Helper_Data extends Altapay_Payment_Helper_Data {
3
+
4
+ }
app/code/community/Altapay/PaymentExtraGateways/Model/Constants.php ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Altapay_PaymentExtraGateways_Model_Constants {
3
+ // configuration paths
4
+ const CONF_PATH_GATEWAY2_TERMINAL = 'payment/altapay_gateway2/terminal';
5
+ const CONT_PATH_GATEWAY2_ACTION_TYPE = 'payment/altapay_gateway2/payment_action';
6
+
7
+ const CONF_PATH_GATEWAY3_TERMINAL = 'payment/altapay_gateway3/terminal';
8
+ const CONT_PATH_GATEWAY3_ACTION_TYPE = 'payment/altapay_gateway3/payment_action';
9
+
10
+ const CONF_PATH_GATEWAY4_TERMINAL = 'payment/altapay_gateway4/terminal';
11
+ const CONT_PATH_GATEWAY4_ACTION_TYPE = 'payment/altapay_gateway4/payment_action';
12
+
13
+ const CONF_PATH_GATEWAY5_TERMINAL = 'payment/altapay_gateway5/terminal';
14
+ const CONT_PATH_GATEWAY5_ACTION_TYPE = 'payment/altapay_gateway5/payment_action';
15
+
16
+ }
app/code/community/Altapay/PaymentExtraGateways/Model/Method/Gateway2.php ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Altapay_PaymentExtraGateways_Model_Method_Gateway2 extends Altapay_Payment_Model_Method_Gateway {
3
+
4
+ protected $_code = 'altapay_gateway2';
5
+ protected $_formBlockType = 'altapaypaymentextragateways/form_gateway2';
6
+ protected $_infoBlockType = 'altapaypaymentextragateways/info_gateway2';
7
+
8
+ public function __construct($params) {
9
+ parent::__construct($params);
10
+ }
11
+
12
+ public function getAltapayPaymentType($configPath, $storeId = null)
13
+ {
14
+ return parent::getAltapayPaymentType(Altapay_PaymentExtraGateways_Model_Constants::CONT_PATH_GATEWAY2_ACTION_TYPE,$storeId);
15
+ }
16
+
17
+ protected function getAltapayTerminal()
18
+ {
19
+ return Mage::getStoreConfig(Altapay_PaymentExtraGateways_Model_Constants::CONF_PATH_GATEWAY2_TERMINAL);
20
+ }
21
+ }
app/code/community/Altapay/PaymentExtraGateways/Model/Method/Gateway3.php ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Altapay_PaymentExtraGateways_Model_Method_Gateway3 extends Altapay_Payment_Model_Method_Gateway {
3
+
4
+ protected $_code = 'altapay_gateway3';
5
+ protected $_formBlockType = 'altapaypaymentextragateways/form_gateway3';
6
+ protected $_infoBlockType = 'altapaypaymentextragateways/info_gateway3';
7
+
8
+ public function __construct($params) {
9
+ parent::__construct($params);
10
+ }
11
+
12
+ public function getAltapayPaymentType($configPath, $storeId = null)
13
+ {
14
+ return parent::getAltapayPaymentType(Altapay_PaymentExtraGateways_Model_Constants::CONT_PATH_GATEWAY3_ACTION_TYPE,$storeId);
15
+ }
16
+
17
+ protected function getAltapayTerminal()
18
+ {
19
+ return Mage::getStoreConfig(Altapay_PaymentExtraGateways_Model_Constants::CONF_PATH_GATEWAY3_TERMINAL);
20
+ }
21
+ }
app/code/community/Altapay/PaymentExtraGateways/Model/Method/Gateway4.php ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Altapay_PaymentExtraGateways_Model_Method_Gateway4 extends Altapay_Payment_Model_Method_Gateway {
3
+
4
+ protected $_code = 'altapay_gateway4';
5
+ protected $_formBlockType = 'altapaypaymentextragateways/form_gateway4';
6
+ protected $_infoBlockType = 'altapaypaymentextragateways/info_gateway4';
7
+
8
+ public function __construct($params) {
9
+ parent::__construct($params);
10
+ }
11
+
12
+ public function getAltapayPaymentType($configPath, $storeId = null)
13
+ {
14
+ return parent::getAltapayPaymentType(Altapay_PaymentExtraGateways_Model_Constants::CONT_PATH_GATEWAY4_ACTION_TYPE,$storeId);
15
+ }
16
+
17
+ protected function getAltapayTerminal()
18
+ {
19
+ return Mage::getStoreConfig(Altapay_PaymentExtraGateways_Model_Constants::CONF_PATH_GATEWAY4_TERMINAL);
20
+ }
21
+ }
app/code/community/Altapay/PaymentExtraGateways/Model/Method/Gateway5.php ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Altapay_PaymentExtraGateways_Model_Method_Gateway5 extends Altapay_Payment_Model_Method_Gateway {
3
+
4
+ protected $_code = 'altapay_gateway5';
5
+ protected $_formBlockType = 'altapaypaymentextragateways/form_gateway5';
6
+ protected $_infoBlockType = 'altapaypaymentextragateways/info_gateway5';
7
+
8
+ public function __construct($params) {
9
+ parent::__construct($params);
10
+ }
11
+
12
+ public function getAltapayPaymentType($configPath, $storeId = null)
13
+ {
14
+ return parent::getAltapayPaymentType(Altapay_PaymentExtraGateways_Model_Constants::CONT_PATH_GATEWAY5_ACTION_TYPE,$storeId);
15
+ }
16
+
17
+ protected function getAltapayTerminal()
18
+ {
19
+ return Mage::getStoreConfig(Altapay_PaymentExtraGateways_Model_Constants::CONF_PATH_GATEWAY5_TERMINAL);
20
+ }
21
+ }
app/code/community/Altapay/PaymentExtraGateways/etc/config.xml ADDED
@@ -0,0 +1,70 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * Altapay Payment Extension
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
9
+ * compliance with the License. You may obtain a copy of the License at
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ * Unless required by applicable law or agreed to in writing, software distributed under the License is
12
+ * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and limitations under the License.
14
+ *
15
+ * @category Altapay
16
+ * @package Altapay_PaymentExtraGateways
17
+ * @copyright Copyright (c) 2011-2012 Altapay A/S (http://altapay.com)
18
+ * @author Emanuel Greisen
19
+ * @license Apache License, Version 2.0
20
+ */
21
+ -->
22
+ <config>
23
+ <modules>
24
+ <Altapay_PaymentExtraGateways>
25
+ <version>1.0.1</version>
26
+ </Altapay_PaymentExtraGateways>
27
+ </modules>
28
+
29
+ <global>
30
+ <blocks>
31
+ <altapaypaymentextragateways>
32
+ <class>Altapay_PaymentExtraGateways_Block</class>
33
+ </altapaypaymentextragateways>
34
+ </blocks>
35
+ <helpers>
36
+ <altapaypaymentextragateways>
37
+ <class>Altapay_PaymentExtraGateways_Helper</class>
38
+ </altapaypaymentextragateways>
39
+ </helpers>
40
+ <models>
41
+ <altapaypaymentextragateways>
42
+ <class>Altapay_PaymentExtraGateways_Model</class>
43
+ </altapaypaymentextragateways>
44
+ </models>
45
+ </global>
46
+ <default>
47
+ <payment>
48
+ <altapay_gateway2>
49
+ <active>0</active>
50
+ <model>altapaypaymentextragateways/method_gateway2</model>
51
+ <title>Altapay Payment Gateway #2</title>
52
+ </altapay_gateway2>
53
+ <altapay_gateway3>
54
+ <active>0</active>
55
+ <model>altapaypaymentextragateways/method_gateway3</model>
56
+ <title>Altapay Payment Gateway #3</title>
57
+ </altapay_gateway3>
58
+ <altapay_gateway4>
59
+ <active>0</active>
60
+ <model>altapaypaymentextragateways/method_gateway4</model>
61
+ <title>Altapay Payment Gateway #4</title>
62
+ </altapay_gateway4>
63
+ <altapay_gateway5>
64
+ <active>0</active>
65
+ <model>altapaypaymentextragateways/method_gateway5</model>
66
+ <title>Altapay Payment Gateway #5</title>
67
+ </altapay_gateway5>
68
+ </payment>
69
+ </default>
70
+ </config>
app/code/community/Altapay/PaymentExtraGateways/etc/system.xml ADDED
@@ -0,0 +1,277 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * Altapay Payment Extension
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
9
+ * compliance with the License. You may obtain a copy of the License at
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ * Unless required by applicable law or agreed to in writing, software distributed under the License is
12
+ * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and limitations under the License.
14
+ *
15
+ * @category Altapay
16
+ * @package Altapay_Payment
17
+ * @copyright Copyright (c) 2011-2012 Altapay A/S (http://altapay.com)
18
+ * @author Emanuel Holm Greisen
19
+ * @license Apache License, Version 2.0
20
+ */
21
+ -->
22
+ <config>
23
+ <sections>
24
+ <altapay>
25
+ <groups>
26
+ <altapay_gateway2 translate="label">
27
+ <label>Altapay Payment Gateway #2 - Allows your customers to purchase with any of the payment options you have enabled in your Altapay account.</label>
28
+ <fieldset_css>altapay-config</fieldset_css>
29
+ <frontend_type>text</frontend_type>
30
+ <sort_order>200</sort_order>
31
+ <show_in_default>1</show_in_default>
32
+ <show_in_store>1</show_in_store>
33
+ <comment><![CDATA[
34
+ <div class="box">
35
+ <p class="grand-total"><b>Note:</b></p>
36
+ <p>Before you can use the Gateway you must make sure that your Magento installation is visible to the outside as Altapay's Payment Gateway will be
37
+ performing callback calls with information about the payment.<p>
38
+ </div>]]>
39
+ </comment>
40
+ <fields>
41
+ <active translate="label">
42
+ <label>Enable</label>
43
+ <frontend_type>select</frontend_type>
44
+ <source_model>adminhtml/system_config_source_yesno</source_model>
45
+ <sort_order>0</sort_order>
46
+ <config_path>payment/altapay_gateway2/active</config_path>
47
+ <show_in_default>1</show_in_default>
48
+ <show_in_store>1</show_in_store>
49
+ </active>
50
+ <terminal translate="label">
51
+ <label>Terminal</label>
52
+ <comment>You need to set your username / password above before you can choose your Terminal.</comment>
53
+ <frontend_type>select</frontend_type>
54
+ <source_model>altapay_payment_model_source_terminals</source_model>
55
+ <sort_order>1</sort_order>
56
+ <config_path>payment/altapay_gateway2/terminal</config_path>
57
+ <show_in_default>1</show_in_default>
58
+ <show_in_store>1</show_in_store>
59
+ </terminal>
60
+ <title translate="label comment">
61
+ <label>Title</label>
62
+ <config_path>payment/altapay_gateway2/title</config_path>
63
+ <frontend_type>text</frontend_type>
64
+ <sort_order>2</sort_order>
65
+ <show_in_default>1</show_in_default>
66
+ <show_in_store>1</show_in_store>
67
+ </title>
68
+
69
+ <payment_action translate="label">
70
+ <label>Payment Action</label>
71
+ <frontend_type>select</frontend_type>
72
+ <config_path>payment/altapay_gateway2/payment_action</config_path>
73
+ <source_model>altapay_payment_model_source_paymentAction</source_model>
74
+ <sort_order>3</sort_order>
75
+ <show_in_default>1</show_in_default>
76
+ <show_in_store>1</show_in_store>
77
+ </payment_action>
78
+ <sort_order translate="label">
79
+ <label>Sort Order</label>
80
+ <config_path>payment/altapay_gateway2/sort_order</config_path>
81
+ <frontend_type>text</frontend_type>
82
+ <sort_order>100</sort_order>
83
+ <show_in_default>1</show_in_default>
84
+ <show_in_store>1</show_in_store>
85
+ </sort_order>
86
+ </fields>
87
+ </altapay_gateway2>
88
+ <altapay_gateway3 translate="label">
89
+ <label>Altapay Payment Gateway #3 - Allows your customers to purchase with any of the payment options you have enabled in your Altapay account.</label>
90
+ <fieldset_css>altapay-config</fieldset_css>
91
+ <frontend_type>text</frontend_type>
92
+ <sort_order>300</sort_order>
93
+ <show_in_default>1</show_in_default>
94
+ <show_in_store>1</show_in_store>
95
+ <comment><![CDATA[
96
+ <div class="box">
97
+ <p class="grand-total"><b>Note:</b></p>
98
+ <p>Before you can use the Gateway you must make sure that your Magento installation is visible to the outside as Altapay's Payment Gateway will be
99
+ performing callback calls with information about the payment.<p>
100
+ </div>]]>
101
+ </comment>
102
+ <fields>
103
+ <active translate="label">
104
+ <label>Enable</label>
105
+ <frontend_type>select</frontend_type>
106
+ <source_model>adminhtml/system_config_source_yesno</source_model>
107
+ <sort_order>0</sort_order>
108
+ <config_path>payment/altapay_gateway3/active</config_path>
109
+ <show_in_default>1</show_in_default>
110
+ <show_in_store>1</show_in_store>
111
+ </active>
112
+ <terminal translate="label">
113
+ <label>Terminal</label>
114
+ <comment>You need to set your username / password above before you can choose your Terminal.</comment>
115
+ <frontend_type>select</frontend_type>
116
+ <source_model>altapay_payment_model_source_terminals</source_model>
117
+ <sort_order>1</sort_order>
118
+ <config_path>payment/altapay_gateway3/terminal</config_path>
119
+ <show_in_default>1</show_in_default>
120
+ <show_in_store>1</show_in_store>
121
+ </terminal>
122
+ <title translate="label comment">
123
+ <label>Title</label>
124
+ <config_path>payment/altapay_gateway3/title</config_path>
125
+ <frontend_type>text</frontend_type>
126
+ <sort_order>2</sort_order>
127
+ <show_in_default>1</show_in_default>
128
+ <show_in_store>1</show_in_store>
129
+ </title>
130
+
131
+ <payment_action translate="label">
132
+ <label>Payment Action</label>
133
+ <frontend_type>select</frontend_type>
134
+ <config_path>payment/altapay_gateway3/payment_action</config_path>
135
+ <source_model>altapay_payment_model_source_paymentAction</source_model>
136
+ <sort_order>3</sort_order>
137
+ <show_in_default>1</show_in_default>
138
+ <show_in_store>1</show_in_store>
139
+ </payment_action>
140
+ <sort_order translate="label">
141
+ <label>Sort Order</label>
142
+ <config_path>payment/altapay_gateway3/sort_order</config_path>
143
+ <frontend_type>text</frontend_type>
144
+ <sort_order>100</sort_order>
145
+ <show_in_default>1</show_in_default>
146
+ <show_in_store>1</show_in_store>
147
+ </sort_order>
148
+ </fields>
149
+ </altapay_gateway3>
150
+ <altapay_gateway4 translate="label">
151
+ <label>Altapay Payment Gateway #4 - Allows your customers to purchase with any of the payment options you have enabled in your Altapay account.</label>
152
+ <fieldset_css>altapay-config</fieldset_css>
153
+ <frontend_type>text</frontend_type>
154
+ <sort_order>400</sort_order>
155
+ <show_in_default>1</show_in_default>
156
+ <show_in_store>1</show_in_store>
157
+ <comment><![CDATA[
158
+ <div class="box">
159
+ <p class="grand-total"><b>Note:</b></p>
160
+ <p>Before you can use the Gateway you must make sure that your Magento installation is visible to the outside as Altapay's Payment Gateway will be
161
+ performing callback calls with information about the payment.<p>
162
+ </div>]]>
163
+ </comment>
164
+ <fields>
165
+ <active translate="label">
166
+ <label>Enable</label>
167
+ <frontend_type>select</frontend_type>
168
+ <source_model>adminhtml/system_config_source_yesno</source_model>
169
+ <sort_order>0</sort_order>
170
+ <config_path>payment/altapay_gateway4/active</config_path>
171
+ <show_in_default>1</show_in_default>
172
+ <show_in_store>1</show_in_store>
173
+ </active>
174
+ <terminal translate="label">
175
+ <label>Terminal</label>
176
+ <comment>You need to set your username / password above before you can choose your Terminal.</comment>
177
+ <frontend_type>select</frontend_type>
178
+ <source_model>altapay_payment_model_source_terminals</source_model>
179
+ <sort_order>1</sort_order>
180
+ <config_path>payment/altapay_gateway4/terminal</config_path>
181
+ <show_in_default>1</show_in_default>
182
+ <show_in_store>1</show_in_store>
183
+ </terminal>
184
+ <title translate="label comment">
185
+ <label>Title</label>
186
+ <config_path>payment/altapay_gateway4/title</config_path>
187
+ <frontend_type>text</frontend_type>
188
+ <sort_order>2</sort_order>
189
+ <show_in_default>1</show_in_default>
190
+ <show_in_store>1</show_in_store>
191
+ </title>
192
+
193
+ <payment_action translate="label">
194
+ <label>Payment Action</label>
195
+ <frontend_type>select</frontend_type>
196
+ <config_path>payment/altapay_gateway4/payment_action</config_path>
197
+ <source_model>altapay_payment_model_source_paymentAction</source_model>
198
+ <sort_order>3</sort_order>
199
+ <show_in_default>1</show_in_default>
200
+ <show_in_store>1</show_in_store>
201
+ </payment_action>
202
+ <sort_order translate="label">
203
+ <label>Sort Order</label>
204
+ <config_path>payment/altapay_gateway4/sort_order</config_path>
205
+ <frontend_type>text</frontend_type>
206
+ <sort_order>100</sort_order>
207
+ <show_in_default>1</show_in_default>
208
+ <show_in_store>1</show_in_store>
209
+ </sort_order>
210
+ </fields>
211
+ </altapay_gateway4>
212
+ <altapay_gateway5 translate="label">
213
+ <label>Altapay Payment Gateway #5 - Allows your customers to purchase with any of the payment options you have enabled in your Altapay account.</label>
214
+ <fieldset_css>altapay-config</fieldset_css>
215
+ <frontend_type>text</frontend_type>
216
+ <sort_order>500</sort_order>
217
+ <show_in_default>1</show_in_default>
218
+ <show_in_store>1</show_in_store>
219
+ <comment><![CDATA[
220
+ <div class="box">
221
+ <p class="grand-total"><b>Note:</b></p>
222
+ <p>Before you can use the Gateway you must make sure that your Magento installation is visible to the outside as Altapay's Payment Gateway will be
223
+ performing callback calls with information about the payment.<p>
224
+ </div>]]>
225
+ </comment>
226
+ <fields>
227
+ <active translate="label">
228
+ <label>Enable</label>
229
+ <frontend_type>select</frontend_type>
230
+ <source_model>adminhtml/system_config_source_yesno</source_model>
231
+ <sort_order>0</sort_order>
232
+ <config_path>payment/altapay_gateway5/active</config_path>
233
+ <show_in_default>1</show_in_default>
234
+ <show_in_store>1</show_in_store>
235
+ </active>
236
+ <terminal translate="label">
237
+ <label>Terminal</label>
238
+ <comment>You need to set your username / password above before you can choose your Terminal.</comment>
239
+ <frontend_type>select</frontend_type>
240
+ <source_model>altapay_payment_model_source_terminals</source_model>
241
+ <sort_order>1</sort_order>
242
+ <config_path>payment/altapay_gateway5/terminal</config_path>
243
+ <show_in_default>1</show_in_default>
244
+ <show_in_store>1</show_in_store>
245
+ </terminal>
246
+ <title translate="label comment">
247
+ <label>Title</label>
248
+ <config_path>payment/altapay_gateway5/title</config_path>
249
+ <frontend_type>text</frontend_type>
250
+ <sort_order>2</sort_order>
251
+ <show_in_default>1</show_in_default>
252
+ <show_in_store>1</show_in_store>
253
+ </title>
254
+
255
+ <payment_action translate="label">
256
+ <label>Payment Action</label>
257
+ <frontend_type>select</frontend_type>
258
+ <config_path>payment/altapay_gateway5/payment_action</config_path>
259
+ <source_model>altapay_payment_model_source_paymentAction</source_model>
260
+ <sort_order>3</sort_order>
261
+ <show_in_default>1</show_in_default>
262
+ <show_in_store>1</show_in_store>
263
+ </payment_action>
264
+ <sort_order translate="label">
265
+ <label>Sort Order</label>
266
+ <config_path>payment/altapay_gateway5/sort_order</config_path>
267
+ <frontend_type>text</frontend_type>
268
+ <sort_order>100</sort_order>
269
+ <show_in_default>1</show_in_default>
270
+ <show_in_store>1</show_in_store>
271
+ </sort_order>
272
+ </fields>
273
+ </altapay_gateway5>
274
+ </groups>
275
+ </altapay>
276
+ </sections>
277
+ </config>
app/design/adminhtml/default/default/template/altapaypaymentextragateways/info/gateway2.phtml ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Altapay Payment Gateway<br />
2
+ <?php
3
+ if($_info = $this->getInfo())
4
+ {
5
+ if(!is_null($_info->getAdditionalData()) &&
6
+ ($paymentResponse = @unserialize($_info->getAdditionalData())) !== false)
7
+ {
8
+ //print('<pre>');
9
+ //print_r($paymentResponse);
10
+ if($paymentResponse !== false)
11
+ {
12
+ echo $this->__('Payment Nature: %s (%s)', $this->htmlEscape($paymentResponse->getPrimaryPayment()->getPaymentNature()), $this->htmlEscape($paymentResponse->getPrimaryPayment()->getPaymentNatureService()->getName())).'<br />';
13
+ if($paymentResponse->getPrimaryPayment()->getPaymentNature() == 'CreditCard')
14
+ {
15
+ echo $this->__('Credit Card Number: %s', $this->htmlEscape($paymentResponse->getPrimaryPayment()->getMaskedPan())).'<br />';
16
+ echo $this->__('Credit Card Status: %s', $this->htmlEscape($paymentResponse->getPrimaryPayment()->getCardStatus())).'<br />';
17
+ }
18
+ }
19
+ }
20
+ else
21
+ {
22
+ echo $this->__('Credit Card Number: %s', $this->htmlEscape($this->getInfo()->getData('cc_number_enc'))).'<br />';
23
+ }
24
+ }
25
+ else
26
+ {
27
+ print("Payment Information Missing");
28
+ }
29
+
app/design/adminhtml/default/default/template/altapaypaymentextragateways/info/gateway3.phtml ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Altapay Payment Gateway<br />
2
+ <?php
3
+ if($_info = $this->getInfo())
4
+ {
5
+ if(!is_null($_info->getAdditionalData()) &&
6
+ ($paymentResponse = @unserialize($_info->getAdditionalData())) !== false)
7
+ {
8
+ //print('<pre>');
9
+ //print_r($paymentResponse);
10
+ if($paymentResponse !== false)
11
+ {
12
+ echo $this->__('Payment Nature: %s (%s)', $this->htmlEscape($paymentResponse->getPrimaryPayment()->getPaymentNature()), $this->htmlEscape($paymentResponse->getPrimaryPayment()->getPaymentNatureService()->getName())).'<br />';
13
+ if($paymentResponse->getPrimaryPayment()->getPaymentNature() == 'CreditCard')
14
+ {
15
+ echo $this->__('Credit Card Number: %s', $this->htmlEscape($paymentResponse->getPrimaryPayment()->getMaskedPan())).'<br />';
16
+ echo $this->__('Credit Card Status: %s', $this->htmlEscape($paymentResponse->getPrimaryPayment()->getCardStatus())).'<br />';
17
+ }
18
+ }
19
+ }
20
+ else
21
+ {
22
+ echo $this->__('Credit Card Number: %s', $this->htmlEscape($this->getInfo()->getData('cc_number_enc'))).'<br />';
23
+ }
24
+ }
25
+ else
26
+ {
27
+ print("Payment Information Missing");
28
+ }
29
+
app/design/adminhtml/default/default/template/altapaypaymentextragateways/info/gateway4.phtml ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Altapay Payment Gateway<br />
2
+ <?php
3
+ if($_info = $this->getInfo())
4
+ {
5
+ if(!is_null($_info->getAdditionalData()) &&
6
+ ($paymentResponse = @unserialize($_info->getAdditionalData())) !== false)
7
+ {
8
+ //print('<pre>');
9
+ //print_r($paymentResponse);
10
+ if($paymentResponse !== false)
11
+ {
12
+ echo $this->__('Payment Nature: %s (%s)', $this->htmlEscape($paymentResponse->getPrimaryPayment()->getPaymentNature()), $this->htmlEscape($paymentResponse->getPrimaryPayment()->getPaymentNatureService()->getName())).'<br />';
13
+ if($paymentResponse->getPrimaryPayment()->getPaymentNature() == 'CreditCard')
14
+ {
15
+ echo $this->__('Credit Card Number: %s', $this->htmlEscape($paymentResponse->getPrimaryPayment()->getMaskedPan())).'<br />';
16
+ echo $this->__('Credit Card Status: %s', $this->htmlEscape($paymentResponse->getPrimaryPayment()->getCardStatus())).'<br />';
17
+ }
18
+ }
19
+ }
20
+ else
21
+ {
22
+ echo $this->__('Credit Card Number: %s', $this->htmlEscape($this->getInfo()->getData('cc_number_enc'))).'<br />';
23
+ }
24
+ }
25
+ else
26
+ {
27
+ print("Payment Information Missing");
28
+ }
29
+
app/design/adminhtml/default/default/template/altapaypaymentextragateways/info/gateway5.phtml ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Altapay Payment Gateway<br />
2
+ <?php
3
+ if($_info = $this->getInfo())
4
+ {
5
+ if(!is_null($_info->getAdditionalData()) &&
6
+ ($paymentResponse = @unserialize($_info->getAdditionalData())) !== false)
7
+ {
8
+ //print('<pre>');
9
+ //print_r($paymentResponse);
10
+ if($paymentResponse !== false)
11
+ {
12
+ echo $this->__('Payment Nature: %s (%s)', $this->htmlEscape($paymentResponse->getPrimaryPayment()->getPaymentNature()), $this->htmlEscape($paymentResponse->getPrimaryPayment()->getPaymentNatureService()->getName())).'<br />';
13
+ if($paymentResponse->getPrimaryPayment()->getPaymentNature() == 'CreditCard')
14
+ {
15
+ echo $this->__('Credit Card Number: %s', $this->htmlEscape($paymentResponse->getPrimaryPayment()->getMaskedPan())).'<br />';
16
+ echo $this->__('Credit Card Status: %s', $this->htmlEscape($paymentResponse->getPrimaryPayment()->getCardStatus())).'<br />';
17
+ }
18
+ }
19
+ }
20
+ else
21
+ {
22
+ echo $this->__('Credit Card Number: %s', $this->htmlEscape($this->getInfo()->getData('cc_number_enc'))).'<br />';
23
+ }
24
+ }
25
+ else
26
+ {
27
+ print("Payment Information Missing");
28
+ }
29
+
app/design/adminhtml/default/default/template/altapaypaymentextragateways/pdf/gateway2.phtml ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Altapay Payment Gateway<br />
2
+ <?php
3
+ if($_info = $this->getInfo())
4
+ {
5
+ if(!is_null($_info->getAdditionalData()) &&
6
+ ($paymentResponse = @unserialize($_info->getAdditionalData())) !== false)
7
+ {
8
+ //print('<pre>');
9
+ //print_r($paymentResponse);
10
+ if($paymentResponse !== false)
11
+ {
12
+ echo $this->__('Payment Nature: %s (%s)', $this->htmlEscape($paymentResponse->getPrimaryPayment()->getPaymentNature()), $this->htmlEscape($paymentResponse->getPrimaryPayment()->getPaymentNatureService()->getName())).'<br />';
13
+ if($paymentResponse->getPrimaryPayment()->getPaymentNature() == 'CreditCard')
14
+ {
15
+ echo $this->__('Credit Card Number: %s', $this->htmlEscape($paymentResponse->getPrimaryPayment()->getMaskedPan())).'<br />';
16
+ echo $this->__('Credit Card Status: %s', $this->htmlEscape($paymentResponse->getPrimaryPayment()->getCardStatus())).'<br />';
17
+ }
18
+ }
19
+ }
20
+ else
21
+ {
22
+ echo $this->__('Credit Card Number: %s', $this->htmlEscape($this->getInfo()->getData('cc_number_enc'))).'<br />';
23
+ }
24
+ }
25
+ else
26
+ {
27
+ print("Payment Information Missing");
28
+ }
29
+
app/design/adminhtml/default/default/template/altapaypaymentextragateways/pdf/gateway3.phtml ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Altapay Payment Gateway<br />
2
+ <?php
3
+ if($_info = $this->getInfo())
4
+ {
5
+ if(!is_null($_info->getAdditionalData()) &&
6
+ ($paymentResponse = @unserialize($_info->getAdditionalData())) !== false)
7
+ {
8
+ //print('<pre>');
9
+ //print_r($paymentResponse);
10
+ if($paymentResponse !== false)
11
+ {
12
+ echo $this->__('Payment Nature: %s (%s)', $this->htmlEscape($paymentResponse->getPrimaryPayment()->getPaymentNature()), $this->htmlEscape($paymentResponse->getPrimaryPayment()->getPaymentNatureService()->getName())).'<br />';
13
+ if($paymentResponse->getPrimaryPayment()->getPaymentNature() == 'CreditCard')
14
+ {
15
+ echo $this->__('Credit Card Number: %s', $this->htmlEscape($paymentResponse->getPrimaryPayment()->getMaskedPan())).'<br />';
16
+ echo $this->__('Credit Card Status: %s', $this->htmlEscape($paymentResponse->getPrimaryPayment()->getCardStatus())).'<br />';
17
+ }
18
+ }
19
+ }
20
+ else
21
+ {
22
+ echo $this->__('Credit Card Number: %s', $this->htmlEscape($this->getInfo()->getData('cc_number_enc'))).'<br />';
23
+ }
24
+ }
25
+ else
26
+ {
27
+ print("Payment Information Missing");
28
+ }
29
+
app/design/adminhtml/default/default/template/altapaypaymentextragateways/pdf/gateway4.phtml ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Altapay Payment Gateway<br />
2
+ <?php
3
+ if($_info = $this->getInfo())
4
+ {
5
+ if(!is_null($_info->getAdditionalData()) &&
6
+ ($paymentResponse = @unserialize($_info->getAdditionalData())) !== false)
7
+ {
8
+ //print('<pre>');
9
+ //print_r($paymentResponse);
10
+ if($paymentResponse !== false)
11
+ {
12
+ echo $this->__('Payment Nature: %s (%s)', $this->htmlEscape($paymentResponse->getPrimaryPayment()->getPaymentNature()), $this->htmlEscape($paymentResponse->getPrimaryPayment()->getPaymentNatureService()->getName())).'<br />';
13
+ if($paymentResponse->getPrimaryPayment()->getPaymentNature() == 'CreditCard')
14
+ {
15
+ echo $this->__('Credit Card Number: %s', $this->htmlEscape($paymentResponse->getPrimaryPayment()->getMaskedPan())).'<br />';
16
+ echo $this->__('Credit Card Status: %s', $this->htmlEscape($paymentResponse->getPrimaryPayment()->getCardStatus())).'<br />';
17
+ }
18
+ }
19
+ }
20
+ else
21
+ {
22
+ echo $this->__('Credit Card Number: %s', $this->htmlEscape($this->getInfo()->getData('cc_number_enc'))).'<br />';
23
+ }
24
+ }
25
+ else
26
+ {
27
+ print("Payment Information Missing");
28
+ }
29
+
app/design/adminhtml/default/default/template/altapaypaymentextragateways/pdf/gateway5.phtml ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Altapay Payment Gateway<br />
2
+ <?php
3
+ if($_info = $this->getInfo())
4
+ {
5
+ if(!is_null($_info->getAdditionalData()) &&
6
+ ($paymentResponse = @unserialize($_info->getAdditionalData())) !== false)
7
+ {
8
+ //print('<pre>');
9
+ //print_r($paymentResponse);
10
+ if($paymentResponse !== false)
11
+ {
12
+ echo $this->__('Payment Nature: %s (%s)', $this->htmlEscape($paymentResponse->getPrimaryPayment()->getPaymentNature()), $this->htmlEscape($paymentResponse->getPrimaryPayment()->getPaymentNatureService()->getName())).'<br />';
13
+ if($paymentResponse->getPrimaryPayment()->getPaymentNature() == 'CreditCard')
14
+ {
15
+ echo $this->__('Credit Card Number: %s', $this->htmlEscape($paymentResponse->getPrimaryPayment()->getMaskedPan())).'<br />';
16
+ echo $this->__('Credit Card Status: %s', $this->htmlEscape($paymentResponse->getPrimaryPayment()->getCardStatus())).'<br />';
17
+ }
18
+ }
19
+ }
20
+ else
21
+ {
22
+ echo $this->__('Credit Card Number: %s', $this->htmlEscape($this->getInfo()->getData('cc_number_enc'))).'<br />';
23
+ }
24
+ }
25
+ else
26
+ {
27
+ print("Payment Information Missing");
28
+ }
29
+
app/design/frontend/base/default/template/altapaypaymentextragateways/form/gateway2.phtml ADDED
@@ -0,0 +1,4 @@
 
 
 
 
1
+ <?php $_code=$this->getMethodCode() ?>
2
+ <div class="form-list" id="payment_form_<?php echo $_code ?>" style="display:none;">
3
+ <?php echo $this->__('You can supply your payment details securely after clicking Continue') ?>
4
+ </div>
app/design/frontend/base/default/template/altapaypaymentextragateways/form/gateway3.phtml ADDED
@@ -0,0 +1,4 @@
 
 
 
 
1
+ <?php $_code=$this->getMethodCode() ?>
2
+ <div class="form-list" id="payment_form_<?php echo $_code ?>" style="display:none;">
3
+ <?php echo $this->__('You can supply your payment details securely after clicking Continue') ?>
4
+ </div>
app/design/frontend/base/default/template/altapaypaymentextragateways/form/gateway4.phtml ADDED
@@ -0,0 +1,4 @@
 
 
 
 
1
+ <?php $_code=$this->getMethodCode() ?>
2
+ <div class="form-list" id="payment_form_<?php echo $_code ?>" style="display:none;">
3
+ <?php echo $this->__('You can supply your payment details securely after clicking Continue') ?>
4
+ </div>
app/design/frontend/base/default/template/altapaypaymentextragateways/form/gateway5.phtml ADDED
@@ -0,0 +1,4 @@
 
 
 
 
1
+ <?php $_code=$this->getMethodCode() ?>
2
+ <div class="form-list" id="payment_form_<?php echo $_code ?>" style="display:none;">
3
+ <?php echo $this->__('You can supply your payment details securely after clicking Continue') ?>
4
+ </div>
app/design/frontend/base/default/template/altapaypaymentextragateways/info/gateway2.phtml ADDED
@@ -0,0 +1 @@
 
1
+ Altapay Payment Gateway
app/design/frontend/base/default/template/altapaypaymentextragateways/info/gateway3.phtml ADDED
@@ -0,0 +1 @@
 
1
+ Altapay Payment Gateway
app/design/frontend/base/default/template/altapaypaymentextragateways/info/gateway4.phtml ADDED
@@ -0,0 +1 @@
 
1
+ Altapay Payment Gateway
app/design/frontend/base/default/template/altapaypaymentextragateways/info/gateway5.phtml ADDED
@@ -0,0 +1 @@
 
1
+ Altapay Payment Gateway
app/design/frontend/base/default/template/altapaypaymentextragateways/pdf/gateway2.phtml ADDED
@@ -0,0 +1 @@
 
1
+ Altapay Payment Gateway
app/design/frontend/base/default/template/altapaypaymentextragateways/pdf/gateway3.phtml ADDED
@@ -0,0 +1 @@
 
1
+ Altapay Payment Gateway
app/design/frontend/base/default/template/altapaypaymentextragateways/pdf/gateway4.phtml ADDED
@@ -0,0 +1 @@
 
1
+ Altapay Payment Gateway
app/design/frontend/base/default/template/altapaypaymentextragateways/pdf/gateway5.phtml ADDED
@@ -0,0 +1 @@
 
1
+ Altapay Payment Gateway
app/etc/modules/Altapay_Payment.xml CHANGED
@@ -23,5 +23,12 @@
23
  <active>true</active>
24
  <codePool>community</codePool>
25
  </Altapay_Payment>
 
 
 
 
 
 
 
26
  </modules>
27
  </config>
23
  <active>true</active>
24
  <codePool>community</codePool>
25
  </Altapay_Payment>
26
+ <Altapay_PaymentExtraGateways>
27
+ <active>true</active>
28
+ <codePool>community</codePool>
29
+ <depends>
30
+ <Altapay_Payment />
31
+ </depends>
32
+ </Altapay_PaymentExtraGateways>
33
  </modules>
34
  </config>
package.xml CHANGED
@@ -1,18 +1,18 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>AltaPay_for_Magento1</name>
4
- <version>1.1.3</version>
5
  <stability>stable</stability>
6
  <license>The MIT License (MIT)</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Plugin that integrates Magento to the AltaPay payment gateway.</summary>
10
  <description>AltaPay has made it much easier for you as merchant/developer to receive secure payments in your Magento web shop. AltaPay is fully integrated with Magento via a plug-in.</description>
11
- <notes>First version. Correction of a bug.</notes>
12
  <authors><author><name>AltaPay Integration Team</name><user>altapay_int</user><email>integration@altapay.com</email></author></authors>
13
- <date>2016-09-23</date>
14
- <time>11:11:05</time>
15
- <contents><target name="magecommunity"><dir name="Altapay"><dir name="Payment"><dir name="Block"><dir name="Customer"><dir name="Account"><file name="Token.php" hash="62e630661f5a28a033773f30041667a2"/></dir></dir><dir name="Form"><file name="Gateway.php" hash="10963a08e6553eafb6c13b3211d1873a"/><file name="Moto.php" hash="c722348e5e2f3b17ea3b06402bfba4f9"/><file name="Recurring.php" hash="2cac58ab0231f7071479fe0770c5b2fe"/><file name="Token.php" hash="77763cc1be021e04d46f3d8754e7077a"/></dir><dir name="Info"><file name="Gateway.php" hash="b3a133fb41b393da80658a35417967b1"/><file name="Moto.php" hash="86b593e08d0ab00f86e7c41ef711d8a2"/><file name="Recurring.php" hash="0c4da217141f7ba8aecd8fe564e344ce"/><file name="Token.php" hash="2ce16d8a5c01b193092611ff6c9fc8a8"/></dir><dir name="Onepage"><file name="Failed.php" hash="445738a686c709fd59343aff587c73f4"/><file name="Form.php" hash="b23ad18f71e2ace2e6a44320d747b7a1"/><dir name="Success"><file name="Token.php" hash="6aa5da3158d6ec668e0d001254b4d99d"/></dir><file name="Success.php" hash="2564809634dc37e16ceb81ef9b86d34b"/></dir><file name="Onepage.php" hash="ad81e2d0e68761f9a8c9b0237a3c36ff"/></dir><dir name="Helper"><file name="CurrencyMapper.php" hash="03088924615092d202ec3dfe3c2ad9a3"/><file name="Data.php" hash="f5350cf643355583e62bf97f066582c9"/><file name="Logger.php" hash="9e2ab6436a5e22af40ae39108d9d4ea5"/><file name="Utilities.php" hash="3c55a010f3b4705b3cd168257f43dfea"/></dir><dir name="Model"><file name="Altapay.php" hash="273bccfe651da6bb48fd8ad1448f8a59"/><dir name="Api"><file name="ALTAPAY_VERSION.php" hash="f09924828ecdd17f9b21f1b44d0c2294"/><file name="AltapayCallbackHandler.class.php" hash="964370c9295b1823fa65b2760d1b8d28"/><file name="AltapayMerchantAPI.class.php" hash="429831af898d1b7b83dda0b93aef9022"/><file name="IAltapayCommunicationLogger.class.php" hash="99b8f25360bbbd29e50ea829d3bfe5b7"/><dir name="exceptions"><file name="AltapayConnectionFailedException.class.php" hash="652416bff05f7534c9d723c0f6108dc6"/><file name="AltapayInvalidResponseException.class.php" hash="ddbf173a9f40444c20e90a3a27b9519c"/><file name="AltapayMerchantAPIException.class.php" hash="50237012813c5525df1aabfe35ebaf31"/><file name="AltapayRequestTimeoutException.class.php" hash="dd37a9977e4485f6512a583accc98ef6"/><file name="AltapayUnauthorizedAccessException.class.php" hash="b52faff4abd48c75ab483d100e87cb36"/><file name="AltapayUnknownMerchantAPIException.class.php" hash="1e19cd3c3bbec2224eb4e4f221caf7ff"/><file name="AltapayXmlException.class.php" hash="19a435d6c5ae0d6c37cda11e1e18e09b"/></dir><dir name="http"><file name="AltapayCurlBasedHttpUtils.class.php" hash="cb47ed7599fc36cf6da0dcd8ec5e9d5e"/><file name="AltapayFOpenBasedHttpUtils.class.php" hash="596956789903c8b201c4c8a645264666"/><file name="AltapayHttpRequest.class.php" hash="97955f33a1b127e892264ed0dd8c84a6"/><file name="AltapayHttpResponse.class.php" hash="de62a9d507ae836bdd8e7773194ffd47"/><file name="IAltapayHttpUtils.class.php" hash="63007aaa93e155019ef670a77ef4541b"/></dir><dir name="request"><file name="AltapayAPITransactionsRequest.class.php" hash="c723def7d72c961fa2b5213396126733"/></dir><dir name="response"><file name="AltapayAPIAddress.class.php" hash="f9f2f225ca4b2e5155e57bd112cb047e"/><file name="AltapayAPIChargebackEvent.class.php" hash="bcb0b4430aa943c7389edde862364af7"/><file name="AltapayAPIChargebackEvents.class.php" hash="0ab35b4c56f9f5a79eb028ed6e5c2a53"/><file name="AltapayAPICountryOfOrigin.class.php" hash="c24653e0dee13c3229a778c4bbc26b13"/><file name="AltapayAPICustomerInfo.class.php" hash="4be6bf4e24d749979edd95556dc55ec1"/><file name="AltapayAPIFunding.class.php" hash="71fdfbe0113702bf9292224d10e1b845"/><file name="AltapayAPIPayment.class.php" hash="2292b4c8715d5a7bdba8e5f4af5943bc"/><file name="AltapayAPIPaymentInfos.class.php" hash="926b2335da38c6e8209b450659e3a32b"/><file name="AltapayAPIPaymentNatureService.class.php" hash="ff99401cf50429dcd2845a77673882c8"/><file name="AltapayAPIReconciliationIdentifier.class.php" hash="0b75f7ba353d304e021612043f64471b"/><file name="AltapayAbstractPaymentResponse.class.php" hash="8b8920f3f331d81eff7109d4c9bbd1f6"/><file name="AltapayAbstractResponse.class.php" hash="36c199c005dfd92b6bfb7618fd0dce82"/><file name="AltapayCalculateSurchargeResponse.class.php" hash="f22251db3145e8d895af0ff993522ce6"/><file name="AltapayCaptureRecurringResponse.class.php" hash="559967cc555bf7e79ab2717a06fbefe4"/><file name="AltapayCaptureResponse.class.php" hash="8fd5d56c9df9e61233432fb79270d84a"/><file name="AltapayCreatePaymentRequestResponse.class.php" hash="1999636b78fc5988e1f899f7e1ef7eb5"/><file name="AltapayFundingListResponse.class.php" hash="e8994ffe5e039c273a649d8779256769"/><file name="AltapayGetPaymentResponse.class.php" hash="fb83e969b9dd1647cd4d2ac9e2de9644"/><file name="AltapayGetTerminalsResponse.class.php" hash="d6b471ef2579c791ce15ab99f426727c"/><file name="AltapayLoginResponse.class.php" hash="17a33bf9f1359f52441c24c86cc88471"/><file name="AltapayPreauthRecurringResponse.class.php" hash="9d4b71a0a26b398b4ef84e981afb0b30"/><file name="AltapayRefundResponse.class.php" hash="5a5275d4a4c8ea52a60e775a7b54158b"/><file name="AltapayReleaseResponse.class.php" hash="31c751505ce70222e394fb7f1c48e8f8"/><file name="AltapayReservationResponse.class.php" hash="e77596681b58a39949a4e23e0c5ff98b"/><file name="AltapayTerminal.class.php" hash="3e467641e1d612be5380ccb99c9a733d"/></dir></dir><file name="Constants.php" hash="40ae3d205720eef516acf29dd2c70791"/><dir name="Method"><file name="Abstract.php" hash="677726f1c65536ab48faa988e82de4d7"/><file name="Gateway.php" hash="5cbba92579e8fa0b20083c5333c78993"/><file name="Moto.php" hash="b21e961bc6eeea479f1b6fd70597fa29"/><file name="Recurring.php" hash="f0107de1c333a264a55770e9265e1d59"/><file name="Token.php" hash="2abe1866f4d467176535591717964472"/></dir><file name="Observer.php" hash="79cff57b4406853f8054ba0bf8913462"/><dir name="Resource"><dir name="Subscription"><file name="Collection.php" hash="75569c1889f06201d07420f7fbb225a2"/></dir><file name="Subscription.php" hash="3122e10012cb8ff5697abe3f2445c27b"/><dir name="Token"><file name="Collection.php" hash="fb0bbaa1c5d4cf71c8f5099db31f0782"/></dir><file name="Token.php" hash="9e75ce9111f171e3841bb99df5928632"/></dir><dir name="Source"><file name="PaymentAction.php" hash="0ff49129bfdb9a74899e7603ba18e9b2"/><file name="Terminals.php" hash="73d01eb63dab4ea16c07a8e33904bc09"/></dir><file name="Subscription.php" hash="6c86a22de4c6dc6a53ba8ed5624a81ad"/><file name="Token.php" hash="4bb26c0862c5425075c180c82e56485d"/></dir><dir name="controllers"><file name="OnepageController.php" hash="713236f1490d0aee69026a42f914263d"/><file name="TokenController.php" hash="c0f15cb458edcd4ec3c4dbc989cfdf99"/></dir><dir name="etc"><file name="adminhtml.xml" hash="38829e4c43a434d811f52315e0127af7"/><file name="config.xml" hash="b1de4e97b822f411159786f6e6fdf96e"/><file name="system.xml" hash="dccf8992ce4e6e12b5716151f9cc8bc5"/></dir><dir name="sql"><dir name="altapaypayment_setup"><file name="install-1.0.0.php" hash="45d8306bc7d51feff9a795d5107b02dc"/><file name="upgrade-1.0.0-1.0.1.php" hash="492b11587e232b46030e1c7702e1ea01"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="altapay.xml" hash="4155d8d8f691f56322231374573a4ff7"/></dir><dir name="template"><dir name="altapay"><dir name="payment"><dir name="form"><file name="moto.phtml" hash="4ff0daaa4221e2f2457e9a8353de6626"/></dir><dir name="info"><file name="gateway.phtml" hash="35c1107df98fcc3fa5038913e83e676a"/><file name="moto.phtml" hash="f327b26f0e978536f5d28271513a3efa"/><file name="recurring.phtml" hash="3fe4c5e2c9bd278f28ada23823c7a13a"/></dir></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="altapay.xml" hash="2415a8d0dd5a90f436f9723ed383d06c"/></dir><dir name="template"><dir name="altapay"><dir name="checkout"><file name="default_styling.css" hash="ecdee520dfae2bb7330f68c509f5acdb"/><file name="default_styling_nojs.css" hash="d4bc0421cce0fffa9708cd048db2e891"/><file name="failed.phtml" hash="6126855f97a7efc4defbd8c3ed051799"/><file name="form.phtml" hash="a2fe2963491a9742b40f50d7fc35d0c7"/><file name="magento_styling.css" hash="cb7bc729a64a7efd29bfa19a06d02bf3"/><file name="magento_styling_nojs.css" hash="e9fcb8f00e73fc5bee029298fa61fc0c"/><dir name="onepage"><file name="progress.phtml" hash="c1dd84dcf00cd10330d492767684dce1"/><dir name="success"><file name="token.phtml" hash="8743dbdeb2de8d63fc712af2b040773b"/></dir></dir><file name="success_redirect.phtml" hash="9616c7799e8c3cde544ae9522832cd12"/></dir><dir name="customer"><dir name="account"><dir name="token"><file name="view.phtml" hash="c23e1b9d6eef7706851079ce35d73029"/></dir></dir></dir><dir name="payment"><dir name="form"><file name="gateway.phtml" hash="24f8298198c9dbe7a1157a3af3bf905d"/><file name="recurring.phtml" hash="43ff5ed38cf301bfb2898d7df4647570"/><file name="token.phtml" hash="f3b1bf30a6587c5927cc1736c4de1605"/></dir><dir name="info"><file name="gateway.phtml" hash="1cd140b78afaddd992ee990482fbf229"/><file name="recurring.phtml" hash="1cd140b78afaddd992ee990482fbf229"/><file name="token.phtml" hash="1cd140b78afaddd992ee990482fbf229"/></dir></dir></dir></dir></dir></dir></dir></target><target name="magelocale"><dir name="en_GB"><file name="Altapay_Payment.csv" hash="2a097614d7a9414f5a06b082814b38a2"/></dir><dir name="en_US"><file name="Altapay_Payment.csv" hash="2a097614d7a9414f5a06b082814b38a2"/></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><file name="altapay.css" hash="4c522d61f889ff448bd45d1bbcf35a0e"/><dir name="images"><file name="altapay.png" hash="b10208d0a82dd80562eb03e7508e97b4"/></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="altapay"><dir name="css"><file name="altapay.css" hash="aa3ded5e41e19abc114b39c5c7bcbdcc"/></dir><dir name="images"><file name="ajax-loader.gif" hash="2ef5e9c1839462b187c93535a1670b92"/><file name="error.png" hash="1e1534f925cb26b45ad30536f1bc1896"/><file name="success.png" hash="5ea5d6dac9344616dd7de4b8c2695937"/></dir><dir name="js"><file name="altapay.js" hash="59bd1ba2566fec5ba134340d8a750eb7"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Altapay_Payment.xml" hash="0369f728a6767df0ea7b7f9f9bbd6b31"/></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.5.9</min><max>7.0.10</max></php></required></dependencies>
18
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>AltaPay_for_Magento1</name>
4
+ <version>1.2.0</version>
5
  <stability>stable</stability>
6
  <license>The MIT License (MIT)</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Plugin that integrates Magento to the AltaPay payment gateway.</summary>
10
  <description>AltaPay has made it much easier for you as merchant/developer to receive secure payments in your Magento web shop. AltaPay is fully integrated with Magento via a plug-in.</description>
11
+ <notes>Merging of the version 1.1.3 with the five terminals extension version 1.0.1.</notes>
12
  <authors><author><name>AltaPay Integration Team</name><user>altapay_int</user><email>integration@altapay.com</email></author></authors>
13
+ <date>2016-10-10</date>
14
+ <time>14:13:15</time>
15
+ <contents><target name="magecommunity"><dir name="Altapay"><dir name="Payment"><dir name="Block"><dir name="Customer"><dir name="Account"><file name="Token.php" hash="62e630661f5a28a033773f30041667a2"/></dir></dir><dir name="Form"><file name="Gateway.php" hash="10963a08e6553eafb6c13b3211d1873a"/><file name="Moto.php" hash="c722348e5e2f3b17ea3b06402bfba4f9"/><file name="Recurring.php" hash="2cac58ab0231f7071479fe0770c5b2fe"/><file name="Token.php" hash="77763cc1be021e04d46f3d8754e7077a"/></dir><dir name="Info"><file name="Gateway.php" hash="b3a133fb41b393da80658a35417967b1"/><file name="Moto.php" hash="86b593e08d0ab00f86e7c41ef711d8a2"/><file name="Recurring.php" hash="0c4da217141f7ba8aecd8fe564e344ce"/><file name="Token.php" hash="2ce16d8a5c01b193092611ff6c9fc8a8"/></dir><dir name="Onepage"><file name="Failed.php" hash="445738a686c709fd59343aff587c73f4"/><file name="Form.php" hash="b23ad18f71e2ace2e6a44320d747b7a1"/><dir name="Success"><file name="Token.php" hash="6aa5da3158d6ec668e0d001254b4d99d"/></dir><file name="Success.php" hash="2564809634dc37e16ceb81ef9b86d34b"/></dir><file name="Onepage.php" hash="ad81e2d0e68761f9a8c9b0237a3c36ff"/></dir><dir name="Helper"><file name="CurrencyMapper.php" hash="03088924615092d202ec3dfe3c2ad9a3"/><file name="Data.php" hash="f5350cf643355583e62bf97f066582c9"/><file name="Logger.php" hash="9e2ab6436a5e22af40ae39108d9d4ea5"/><file name="Utilities.php" hash="3c55a010f3b4705b3cd168257f43dfea"/></dir><dir name="Model"><file name="Altapay.php" hash="ab551084b21dd8a075a35661818679f5"/><dir name="Api"><file name="ALTAPAY_VERSION.php" hash="f09924828ecdd17f9b21f1b44d0c2294"/><file name="AltapayCallbackHandler.class.php" hash="964370c9295b1823fa65b2760d1b8d28"/><file name="AltapayMerchantAPI.class.php" hash="429831af898d1b7b83dda0b93aef9022"/><file name="IAltapayCommunicationLogger.class.php" hash="99b8f25360bbbd29e50ea829d3bfe5b7"/><dir name="exceptions"><file name="AltapayConnectionFailedException.class.php" hash="652416bff05f7534c9d723c0f6108dc6"/><file name="AltapayInvalidResponseException.class.php" hash="ddbf173a9f40444c20e90a3a27b9519c"/><file name="AltapayMerchantAPIException.class.php" hash="50237012813c5525df1aabfe35ebaf31"/><file name="AltapayRequestTimeoutException.class.php" hash="dd37a9977e4485f6512a583accc98ef6"/><file name="AltapayUnauthorizedAccessException.class.php" hash="b52faff4abd48c75ab483d100e87cb36"/><file name="AltapayUnknownMerchantAPIException.class.php" hash="1e19cd3c3bbec2224eb4e4f221caf7ff"/><file name="AltapayXmlException.class.php" hash="19a435d6c5ae0d6c37cda11e1e18e09b"/></dir><dir name="http"><file name="AltapayCurlBasedHttpUtils.class.php" hash="cb47ed7599fc36cf6da0dcd8ec5e9d5e"/><file name="AltapayFOpenBasedHttpUtils.class.php" hash="596956789903c8b201c4c8a645264666"/><file name="AltapayHttpRequest.class.php" hash="97955f33a1b127e892264ed0dd8c84a6"/><file name="AltapayHttpResponse.class.php" hash="de62a9d507ae836bdd8e7773194ffd47"/><file name="IAltapayHttpUtils.class.php" hash="63007aaa93e155019ef670a77ef4541b"/></dir><dir name="request"><file name="AltapayAPITransactionsRequest.class.php" hash="c723def7d72c961fa2b5213396126733"/></dir><dir name="response"><file name="AltapayAPIAddress.class.php" hash="f9f2f225ca4b2e5155e57bd112cb047e"/><file name="AltapayAPIChargebackEvent.class.php" hash="bcb0b4430aa943c7389edde862364af7"/><file name="AltapayAPIChargebackEvents.class.php" hash="0ab35b4c56f9f5a79eb028ed6e5c2a53"/><file name="AltapayAPICountryOfOrigin.class.php" hash="c24653e0dee13c3229a778c4bbc26b13"/><file name="AltapayAPICustomerInfo.class.php" hash="4be6bf4e24d749979edd95556dc55ec1"/><file name="AltapayAPIFunding.class.php" hash="71fdfbe0113702bf9292224d10e1b845"/><file name="AltapayAPIPayment.class.php" hash="2292b4c8715d5a7bdba8e5f4af5943bc"/><file name="AltapayAPIPaymentInfos.class.php" hash="926b2335da38c6e8209b450659e3a32b"/><file name="AltapayAPIPaymentNatureService.class.php" hash="ff99401cf50429dcd2845a77673882c8"/><file name="AltapayAPIReconciliationIdentifier.class.php" hash="0b75f7ba353d304e021612043f64471b"/><file name="AltapayAbstractPaymentResponse.class.php" hash="8b8920f3f331d81eff7109d4c9bbd1f6"/><file name="AltapayAbstractResponse.class.php" hash="36c199c005dfd92b6bfb7618fd0dce82"/><file name="AltapayCalculateSurchargeResponse.class.php" hash="f22251db3145e8d895af0ff993522ce6"/><file name="AltapayCaptureRecurringResponse.class.php" hash="559967cc555bf7e79ab2717a06fbefe4"/><file name="AltapayCaptureResponse.class.php" hash="8fd5d56c9df9e61233432fb79270d84a"/><file name="AltapayCreatePaymentRequestResponse.class.php" hash="1999636b78fc5988e1f899f7e1ef7eb5"/><file name="AltapayFundingListResponse.class.php" hash="e8994ffe5e039c273a649d8779256769"/><file name="AltapayGetPaymentResponse.class.php" hash="fb83e969b9dd1647cd4d2ac9e2de9644"/><file name="AltapayGetTerminalsResponse.class.php" hash="d6b471ef2579c791ce15ab99f426727c"/><file name="AltapayLoginResponse.class.php" hash="17a33bf9f1359f52441c24c86cc88471"/><file name="AltapayPreauthRecurringResponse.class.php" hash="9d4b71a0a26b398b4ef84e981afb0b30"/><file name="AltapayRefundResponse.class.php" hash="5a5275d4a4c8ea52a60e775a7b54158b"/><file name="AltapayReleaseResponse.class.php" hash="31c751505ce70222e394fb7f1c48e8f8"/><file name="AltapayReservationResponse.class.php" hash="e77596681b58a39949a4e23e0c5ff98b"/><file name="AltapayTerminal.class.php" hash="3e467641e1d612be5380ccb99c9a733d"/></dir></dir><file name="Constants.php" hash="40ae3d205720eef516acf29dd2c70791"/><dir name="Method"><file name="Abstract.php" hash="3aa4318568813009329a2c3627dbf161"/><file name="Gateway.php" hash="5cbba92579e8fa0b20083c5333c78993"/><file name="Moto.php" hash="b21e961bc6eeea479f1b6fd70597fa29"/><file name="Recurring.php" hash="f0107de1c333a264a55770e9265e1d59"/><file name="Token.php" hash="2abe1866f4d467176535591717964472"/></dir><file name="Observer.php" hash="79cff57b4406853f8054ba0bf8913462"/><dir name="Resource"><dir name="Subscription"><file name="Collection.php" hash="75569c1889f06201d07420f7fbb225a2"/></dir><file name="Subscription.php" hash="3122e10012cb8ff5697abe3f2445c27b"/><dir name="Token"><file name="Collection.php" hash="fb0bbaa1c5d4cf71c8f5099db31f0782"/></dir><file name="Token.php" hash="9e75ce9111f171e3841bb99df5928632"/></dir><dir name="Source"><file name="PaymentAction.php" hash="0ff49129bfdb9a74899e7603ba18e9b2"/><file name="Terminals.php" hash="73d01eb63dab4ea16c07a8e33904bc09"/></dir><file name="Subscription.php" hash="6c86a22de4c6dc6a53ba8ed5624a81ad"/><file name="Token.php" hash="4bb26c0862c5425075c180c82e56485d"/></dir><dir name="controllers"><file name="OnepageController.php" hash="2ee43ebb549f06a804854f553945edfa"/><file name="OnepageController.php.bak" hash="713236f1490d0aee69026a42f914263d"/><file name="TokenController.php" hash="c0f15cb458edcd4ec3c4dbc989cfdf99"/></dir><dir name="etc"><file name="adminhtml.xml" hash="38829e4c43a434d811f52315e0127af7"/><file name="config.xml" hash="b1de4e97b822f411159786f6e6fdf96e"/><file name="system.xml" hash="dccf8992ce4e6e12b5716151f9cc8bc5"/></dir><dir name="sql"><dir name="altapaypayment_setup"><file name="install-1.0.0.php" hash="45d8306bc7d51feff9a795d5107b02dc"/><file name="upgrade-1.0.0-1.0.1.php" hash="492b11587e232b46030e1c7702e1ea01"/></dir></dir></dir><dir name="PaymentExtraGateways"><dir name="Block"><dir name="Form"><file name="Gateway2.php" hash="37ade71ea30349235e277f47e3ba3227"/><file name="Gateway3.php" hash="c4c452e19a540c5d77cb0d73dfe1b4bb"/><file name="Gateway4.php" hash="0823082e059f59bbe5d9f2b2e7ec3ef3"/><file name="Gateway5.php" hash="e2dddc767418b4fdbbbe6d8377b90c72"/></dir><dir name="Info"><file name="Gateway2.php" hash="b6a6e2f5a4ff01121c4fedc20bd73f14"/><file name="Gateway3.php" hash="cbe7ea00eef6ada31e0f780f79322337"/><file name="Gateway4.php" hash="6290ae35d42980078044c2c5d46e7ad7"/><file name="Gateway5.php" hash="a081d9725ea572ae4b8728f55c2aa04c"/></dir></dir><dir name="Helper"><file name="Data.php" hash="a5528a3ae5cbad0250f09be2daa31ca0"/></dir><dir name="Model"><file name="Constants.php" hash="79d7bddf1954eb9dfcbe9067931c2076"/><dir name="Method"><file name="Gateway2.php" hash="cb8150a30ebc0da765be8c242c2d258c"/><file name="Gateway3.php" hash="b0ecd8a250613fac0fbc0e961c9f106b"/><file name="Gateway4.php" hash="fed39f65a425c3143ca3dcd4d60de475"/><file name="Gateway5.php" hash="2504fb66cb830c7711188975badd0ccf"/></dir></dir><dir name="etc"><file name="config.xml" hash="b210e030a38040288f52b92b81e45f5d"/><file name="system.xml" hash="76419dad9a7da5622a9a013bb142c2a1"/></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="altapay.xml" hash="4155d8d8f691f56322231374573a4ff7"/></dir><dir name="template"><dir name="altapay"><dir name="payment"><dir name="form"><file name="moto.phtml" hash="4ff0daaa4221e2f2457e9a8353de6626"/></dir><dir name="info"><file name="gateway.phtml" hash="35c1107df98fcc3fa5038913e83e676a"/><file name="moto.phtml" hash="f327b26f0e978536f5d28271513a3efa"/><file name="recurring.phtml" hash="3fe4c5e2c9bd278f28ada23823c7a13a"/></dir></dir></dir><dir name="altapaypaymentextragateways"><dir name="info"><file name="gateway2.phtml" hash="35c1107df98fcc3fa5038913e83e676a"/><file name="gateway3.phtml" hash="35c1107df98fcc3fa5038913e83e676a"/><file name="gateway4.phtml" hash="35c1107df98fcc3fa5038913e83e676a"/><file name="gateway5.phtml" hash="35c1107df98fcc3fa5038913e83e676a"/></dir><dir name="pdf"><file name="gateway2.phtml" hash="35c1107df98fcc3fa5038913e83e676a"/><file name="gateway3.phtml" hash="35c1107df98fcc3fa5038913e83e676a"/><file name="gateway4.phtml" hash="35c1107df98fcc3fa5038913e83e676a"/><file name="gateway5.phtml" hash="35c1107df98fcc3fa5038913e83e676a"/></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="altapay.xml" hash="2415a8d0dd5a90f436f9723ed383d06c"/></dir><dir name="template"><dir name="altapay"><dir name="checkout"><file name="default_styling.css" hash="ecdee520dfae2bb7330f68c509f5acdb"/><file name="default_styling_nojs.css" hash="d4bc0421cce0fffa9708cd048db2e891"/><file name="failed.phtml" hash="6126855f97a7efc4defbd8c3ed051799"/><file name="form.phtml" hash="a2fe2963491a9742b40f50d7fc35d0c7"/><file name="magento_styling.css" hash="cb7bc729a64a7efd29bfa19a06d02bf3"/><file name="magento_styling_nojs.css" hash="e9fcb8f00e73fc5bee029298fa61fc0c"/><dir name="onepage"><file name="progress.phtml" hash="c1dd84dcf00cd10330d492767684dce1"/><dir name="success"><file name="token.phtml" hash="8743dbdeb2de8d63fc712af2b040773b"/></dir></dir><file name="success_redirect.phtml" hash="9616c7799e8c3cde544ae9522832cd12"/></dir><dir name="customer"><dir name="account"><dir name="token"><file name="view.phtml" hash="c23e1b9d6eef7706851079ce35d73029"/></dir></dir></dir><dir name="payment"><dir name="form"><file name="gateway.phtml" hash="24f8298198c9dbe7a1157a3af3bf905d"/><file name="recurring.phtml" hash="43ff5ed38cf301bfb2898d7df4647570"/><file name="token.phtml" hash="f3b1bf30a6587c5927cc1736c4de1605"/></dir><dir name="info"><file name="gateway.phtml" hash="1cd140b78afaddd992ee990482fbf229"/><file name="recurring.phtml" hash="1cd140b78afaddd992ee990482fbf229"/><file name="token.phtml" hash="1cd140b78afaddd992ee990482fbf229"/></dir></dir></dir><dir name="altapaypaymentextragateways"><dir name="form"><file name="gateway2.phtml" hash="24f8298198c9dbe7a1157a3af3bf905d"/><file name="gateway3.phtml" hash="24f8298198c9dbe7a1157a3af3bf905d"/><file name="gateway4.phtml" hash="24f8298198c9dbe7a1157a3af3bf905d"/><file name="gateway5.phtml" hash="24f8298198c9dbe7a1157a3af3bf905d"/></dir><dir name="info"><file name="gateway2.phtml" hash="1cd140b78afaddd992ee990482fbf229"/><file name="gateway3.phtml" hash="1cd140b78afaddd992ee990482fbf229"/><file name="gateway4.phtml" hash="1cd140b78afaddd992ee990482fbf229"/><file name="gateway5.phtml" hash="1cd140b78afaddd992ee990482fbf229"/></dir><dir name="pdf"><file name="gateway2.phtml" hash="1cd140b78afaddd992ee990482fbf229"/><file name="gateway3.phtml" hash="1cd140b78afaddd992ee990482fbf229"/><file name="gateway4.phtml" hash="1cd140b78afaddd992ee990482fbf229"/><file name="gateway5.phtml" hash="1cd140b78afaddd992ee990482fbf229"/></dir></dir></dir></dir></dir></dir></target><target name="magelocale"><dir name="en_GB"><file name="Altapay_Payment.csv" hash="2a097614d7a9414f5a06b082814b38a2"/></dir><dir name="en_US"><file name="Altapay_Payment.csv" hash="2a097614d7a9414f5a06b082814b38a2"/></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><file name="altapay.css" hash="4c522d61f889ff448bd45d1bbcf35a0e"/><dir name="images"><file name="altapay.png" hash="b10208d0a82dd80562eb03e7508e97b4"/></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="altapay"><dir name="css"><file name="altapay.css" hash="aa3ded5e41e19abc114b39c5c7bcbdcc"/></dir><dir name="images"><file name="ajax-loader.gif" hash="2ef5e9c1839462b187c93535a1670b92"/><file name="error.png" hash="1e1534f925cb26b45ad30536f1bc1896"/><file name="success.png" hash="5ea5d6dac9344616dd7de4b8c2695937"/></dir><dir name="js"><file name="altapay.js" hash="59bd1ba2566fec5ba134340d8a750eb7"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Altapay_Payment.xml" hash="a0ccc3aba96392eaf0703e2a7616df32"/></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.5.9</min><max>7.0.10</max></php></required></dependencies>
18
  </package>