Version Notes
Optile Magento Connector v1.0.3
What's new:
- Added ability to specify merchant division per magento website.
- Added additional logging in case of AJAX error to optile servers
- Added notification mail in case of fatal errors during VALIDATE, CHARGE request
Download this release
Release Info
Developer | i-Ways |
Extension | Optile_Payment_Connector |
Version | 1.0.3 |
Comparing to | |
See all releases |
Code changes from version 1.0.2 to 1.0.3
- app/code/community/Optile/Payment/Helper/Notification.php +88 -0
- app/code/community/Optile/Payment/Model/Checkout.php +10 -0
- app/code/community/Optile/Payment/controllers/PaymentController.php +19 -0
- app/code/community/Optile/Payment/etc/config.xml +5 -0
- app/code/community/Optile/Payment/etc/system.xml +54 -0
- js/optile/checkout.js +82 -2
- lib/Optile/Request/Request.php +2 -2
- package.xml +10 -5
app/code/community/Optile/Payment/Helper/Notification.php
ADDED
@@ -0,0 +1,88 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Copyright optile GmbH 2013
|
4 |
+
* Licensed under the Software License Agreement in effect between optile and
|
5 |
+
* Licensee/user (the "License"); you may not use this file except in compliance
|
6 |
+
* with the License. You may obtain a copy of the License at
|
7 |
+
* http://www.optile.de/software-license-agreement; in addition, a countersigned
|
8 |
+
* copy has been provided to you for your records. Unless required by applicable
|
9 |
+
* law or agreed to in writing or otherwise stipulated in the License, software
|
10 |
+
* distributed under the License is distributed on an "as is” basis without
|
11 |
+
* warranties or conditions of any kind, either express or implied. See the
|
12 |
+
* License for the specific language governing permissions and limitations under
|
13 |
+
* the License.
|
14 |
+
*
|
15 |
+
* @author i-Ways <dev@i-ways.hr>
|
16 |
+
* @copyright Copyright (c) 2013 optile GmbH. (http://www.optile.de)
|
17 |
+
* @license http://www.optile.de/software-license-agreement
|
18 |
+
*/
|
19 |
+
|
20 |
+
class Optile_Payment_Helper_Notification extends Mage_Core_Helper_Abstract {
|
21 |
+
|
22 |
+
const XML_PATH_ALERT_EMAIL_TEMPLATE = 'sales_email/transaction_failed_notification/template';
|
23 |
+
const XML_PATH_ALERT_EMAIL_IDENTITY = 'sales_email/transaction_failed_notification/identity';
|
24 |
+
const XML_PATH_ALERT_EMAIL_TO = 'sales_email/transaction_failed_notification/to';
|
25 |
+
const XML_PATH_ALERT_EMAIL_ENABLED = 'sales_email/transaction_failed_notification/enabled';
|
26 |
+
|
27 |
+
public function processMessage($message, $data){
|
28 |
+
|
29 |
+
if(isset($data['status']) && $data['status'] > 200){
|
30 |
+
|
31 |
+
$this->sendTransactionFailedNotification($message, $data);
|
32 |
+
|
33 |
+
}
|
34 |
+
}
|
35 |
+
|
36 |
+
|
37 |
+
// order_cancel_after
|
38 |
+
private function sendTransactionFailedNotification($message, $data)
|
39 |
+
{
|
40 |
+
|
41 |
+
if (!Mage::getStoreConfigFlag(self::XML_PATH_ALERT_EMAIL_ENABLED)) {
|
42 |
+
Mage::helper('optile')->log(__METHOD__.': Transaction failure Notification email is not enabled. Will not send.');
|
43 |
+
return;
|
44 |
+
}
|
45 |
+
|
46 |
+
$mailer = Mage::getModel('core/email_template_mailer');
|
47 |
+
/* @var $mailer Mage_Core_Model_Email_Template_Mailer */
|
48 |
+
$emailInfo = Mage::getModel('core/email_info');
|
49 |
+
/* @var $emailInfo Mage_Core_Model_Email_Info */
|
50 |
+
|
51 |
+
$emailInfo->addTo(Mage::getStoreConfig(self::XML_PATH_ALERT_EMAIL_TO));
|
52 |
+
$templateId = Mage::getStoreConfig(self::XML_PATH_ALERT_EMAIL_TEMPLATE);
|
53 |
+
$mailer->addEmailInfo($emailInfo);
|
54 |
+
|
55 |
+
|
56 |
+
Mage::helper('optile')->log(__METHOD__.': Sending Transaction failure Notification email');
|
57 |
+
// Set all required params and send emails
|
58 |
+
$mailer
|
59 |
+
->setSender(Mage::getStoreConfig(self::XML_PATH_ALERT_EMAIL_IDENTITY))
|
60 |
+
// ->setStoreId($storeId)
|
61 |
+
->setTemplateId($templateId)
|
62 |
+
->setTemplateParams(array(
|
63 |
+
'message' => $message,
|
64 |
+
'data' => $this->array2ul($data),
|
65 |
+
))
|
66 |
+
->send()
|
67 |
+
;
|
68 |
+
Mage::helper('optile')->log(__METHOD__.': Transaction failure Notification email sent');
|
69 |
+
}
|
70 |
+
|
71 |
+
|
72 |
+
|
73 |
+
function array2ul($array) {
|
74 |
+
$out = "<ul>";
|
75 |
+
foreach($array as $key => $elem){
|
76 |
+
if(!is_array($elem)){
|
77 |
+
$out .= "<li><span>" . $key . ": " . $elem . "</span></li>";
|
78 |
+
} else {
|
79 |
+
$out .= "<li><span>" . $key . "</span>" . $this->array2ul($elem) . "</li>";
|
80 |
+
}
|
81 |
+
}
|
82 |
+
$out .= "</ul>";
|
83 |
+
return $out;
|
84 |
+
}
|
85 |
+
|
86 |
+
|
87 |
+
|
88 |
+
}
|
app/code/community/Optile/Payment/Model/Checkout.php
CHANGED
@@ -66,6 +66,13 @@ class Optile_Payment_Model_Checkout {
|
|
66 |
return Mage::getStoreConfig('payment/optile/merchant_code');
|
67 |
}
|
68 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
69 |
/**
|
70 |
* Returns merchant_token setting
|
71 |
*/
|
@@ -180,6 +187,9 @@ class Optile_Payment_Model_Checkout {
|
|
180 |
->setCountry($this->getCountry())
|
181 |
;
|
182 |
|
|
|
|
|
|
|
183 |
|
184 |
$reference = Mage::helper('checkout')->__('Quote #%s, %s order', Mage::helper('optile')->formatQuoteId($quote->getId()), $this->getStoreName());
|
185 |
|
66 |
return Mage::getStoreConfig('payment/optile/merchant_code');
|
67 |
}
|
68 |
|
69 |
+
/**
|
70 |
+
* Returns merchant_division setting
|
71 |
+
*/
|
72 |
+
protected function getMerchantDivision() {
|
73 |
+
return Mage::getStoreConfig('payment/optile/merchant_division');
|
74 |
+
}
|
75 |
+
|
76 |
/**
|
77 |
* Returns merchant_token setting
|
78 |
*/
|
187 |
->setCountry($this->getCountry())
|
188 |
;
|
189 |
|
190 |
+
if($this->getMerchantDivision()){
|
191 |
+
$request->setDivision($this->getMerchantDivision());
|
192 |
+
}
|
193 |
|
194 |
$reference = Mage::helper('checkout')->__('Quote #%s, %s order', Mage::helper('optile')->formatQuoteId($quote->getId()), $this->getStoreName());
|
195 |
|
app/code/community/Optile/Payment/controllers/PaymentController.php
CHANGED
@@ -61,6 +61,25 @@ class Optile_Payment_PaymentController extends Mage_Core_Controller_Front_Action
|
|
61 |
$this->_redirect('checkout/cart');
|
62 |
}
|
63 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
64 |
/**
|
65 |
* Return checkout session object
|
66 |
*
|
61 |
$this->_redirect('checkout/cart');
|
62 |
}
|
63 |
|
64 |
+
public function ilogAction(){
|
65 |
+
$params = Mage::app()->getRequest()->getPost();
|
66 |
+
$message = isset($params['message']) ? $params['message'] : null;
|
67 |
+
$data = isset($params['data']) ? $params['data'] : null;
|
68 |
+
|
69 |
+
if($message == null){
|
70 |
+
die(); // nothing to log, obscuring log API.
|
71 |
+
}
|
72 |
+
|
73 |
+
Mage::helper('optile')->log($message, Zend_Log::ALERT);
|
74 |
+
Mage::helper('optile')->log($data, Zend_log::ALERT);
|
75 |
+
|
76 |
+
|
77 |
+
// Send out alert emails, if so configured in Admin
|
78 |
+
Mage::helper('optile/notification')->processMessage($message, $data);
|
79 |
+
|
80 |
+
die();
|
81 |
+
}
|
82 |
+
|
83 |
/**
|
84 |
* Return checkout session object
|
85 |
*
|
app/code/community/Optile/Payment/etc/config.xml
CHANGED
@@ -81,6 +81,11 @@
|
|
81 |
<file>optile/order_cancel_guest.html</file>
|
82 |
<type>html</type>
|
83 |
</sales_email_order_cancel_guest_template>
|
|
|
|
|
|
|
|
|
|
|
84 |
</email>
|
85 |
</template>
|
86 |
<events>
|
81 |
<file>optile/order_cancel_guest.html</file>
|
82 |
<type>html</type>
|
83 |
</sales_email_order_cancel_guest_template>
|
84 |
+
<sales_email_transaction_failed_notification_template translate="label" module="sales">
|
85 |
+
<label>Transaction failed Notification</label>
|
86 |
+
<file>optile/transaction_failed_notification.html</file>
|
87 |
+
<type>html</type>
|
88 |
+
</sales_email_transaction_failed_notification_template>
|
89 |
</email>
|
90 |
</template>
|
91 |
<events>
|
app/code/community/Optile/Payment/etc/system.xml
CHANGED
@@ -86,6 +86,15 @@
|
|
86 |
<show_in_website>1</show_in_website>
|
87 |
<show_in_store>0</show_in_store>
|
88 |
</merchant_token>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
89 |
<api_url translate="label">
|
90 |
<label>optile API URL</label>
|
91 |
<frontend_type>text</frontend_type>
|
@@ -325,6 +334,51 @@
|
|
325 |
</copy_method>
|
326 |
</fields>
|
327 |
</order_cancel>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
328 |
</groups>
|
329 |
</sales_email>
|
330 |
</sections>
|
86 |
<show_in_website>1</show_in_website>
|
87 |
<show_in_store>0</show_in_store>
|
88 |
</merchant_token>
|
89 |
+
<merchant_division translate="label">
|
90 |
+
<label>Merchant Division</label>
|
91 |
+
<frontend_type>text</frontend_type>
|
92 |
+
<sort_order>25</sort_order>
|
93 |
+
<show_in_default>1</show_in_default>
|
94 |
+
<show_in_website>1</show_in_website>
|
95 |
+
<show_in_store>0</show_in_store>
|
96 |
+
<comment><![CDATA[Division code]]></comment>
|
97 |
+
</merchant_division>
|
98 |
<api_url translate="label">
|
99 |
<label>optile API URL</label>
|
100 |
<frontend_type>text</frontend_type>
|
334 |
</copy_method>
|
335 |
</fields>
|
336 |
</order_cancel>
|
337 |
+
<transaction_failed_notification translate="label">
|
338 |
+
<label>optile - Failed transaction notification</label>
|
339 |
+
<frontend_type>text</frontend_type>
|
340 |
+
<sort_order>11</sort_order>
|
341 |
+
<show_in_default>1</show_in_default>
|
342 |
+
<show_in_website>1</show_in_website>
|
343 |
+
<show_in_store>1</show_in_store>
|
344 |
+
<fields>
|
345 |
+
<enabled translate="label">
|
346 |
+
<label>Enabled</label>
|
347 |
+
<frontend_type>select</frontend_type>
|
348 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
349 |
+
<sort_order>0</sort_order>
|
350 |
+
<show_in_default>1</show_in_default>
|
351 |
+
<show_in_website>1</show_in_website>
|
352 |
+
<show_in_store>1</show_in_store>
|
353 |
+
</enabled>
|
354 |
+
<identity translate="label">
|
355 |
+
<label>Notification Email Sender</label>
|
356 |
+
<frontend_type>select</frontend_type>
|
357 |
+
<source_model>adminhtml/system_config_source_email_identity</source_model>
|
358 |
+
<sort_order>1</sort_order>
|
359 |
+
<show_in_default>1</show_in_default>
|
360 |
+
<show_in_website>1</show_in_website>
|
361 |
+
<show_in_store>1</show_in_store>
|
362 |
+
</identity>
|
363 |
+
<template translate="label">
|
364 |
+
<label>Notification Template</label>
|
365 |
+
<frontend_type>select</frontend_type>
|
366 |
+
<source_model>adminhtml/system_config_source_email_template</source_model>
|
367 |
+
<sort_order>2</sort_order>
|
368 |
+
<show_in_default>1</show_in_default>
|
369 |
+
<show_in_website>1</show_in_website>
|
370 |
+
<show_in_store>1</show_in_store>
|
371 |
+
</template>
|
372 |
+
<to translate="label comment">
|
373 |
+
<label>Notification To</label>
|
374 |
+
<frontend_type>text</frontend_type>
|
375 |
+
<sort_order>4</sort_order>
|
376 |
+
<show_in_default>1</show_in_default>
|
377 |
+
<show_in_website>1</show_in_website>
|
378 |
+
<show_in_store>1</show_in_store>
|
379 |
+
</to>
|
380 |
+
</fields>
|
381 |
+
</transaction_failed_notification>
|
382 |
</groups>
|
383 |
</sales_email>
|
384 |
</sections>
|
js/optile/checkout.js
CHANGED
@@ -25,6 +25,24 @@ jQuery(function() {
|
|
25 |
return false;
|
26 |
}
|
27 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
28 |
ValidationController.prototype.Validate = function(event) {
|
29 |
var self = this;
|
30 |
var network = this.widget.find("input[name=\"optile-selected-network\"]:checked").val();
|
@@ -67,6 +85,16 @@ jQuery(function() {
|
|
67 |
);
|
68 |
}
|
69 |
;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
70 |
}
|
71 |
|
72 |
});
|
@@ -216,7 +244,9 @@ jQuery(function() {
|
|
216 |
});
|
217 |
}
|
218 |
|
219 |
-
|
|
|
|
|
220 |
|
221 |
var operationUrl = jQuery('#' + network + '-operation').val();
|
222 |
var listRequestSelfLink = jQuery('#optile-list-self').val();
|
@@ -227,7 +257,7 @@ jQuery(function() {
|
|
227 |
jQuery.ajax({
|
228 |
type: 'POST',
|
229 |
url: operationUrl,
|
230 |
-
data:
|
231 |
dataType: 'json',
|
232 |
async: false,
|
233 |
success: function(resultData, resultStatus, xhr) {
|
@@ -251,6 +281,13 @@ jQuery(function() {
|
|
251 |
break;
|
252 |
default:
|
253 |
console.log("ERROR! Can't find interaction code handler");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
254 |
break;
|
255 |
}
|
256 |
if (handler) {
|
@@ -260,6 +297,16 @@ jQuery(function() {
|
|
260 |
if (paymentResponse.interaction.code != OptileInteractionCode.PROCEED) {
|
261 |
self.optile_error = 1;
|
262 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
263 |
}
|
264 |
});
|
265 |
|
@@ -419,6 +466,14 @@ jQuery(function() {
|
|
419 |
// save data before reloading payment section
|
420 |
saveOptileData();
|
421 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
422 |
// simulate shipping method save so it reloads payment section
|
423 |
checkout.setLoadWaiting(false);
|
424 |
shippingMethod.save(this.listRequestSelfLink);
|
@@ -436,6 +491,14 @@ jQuery(function() {
|
|
436 |
// save data before reloading payment section
|
437 |
saveOptileData();
|
438 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
439 |
// simulate shipping method save so it reloads payment section
|
440 |
checkout.setLoadWaiting(false);
|
441 |
shippingMethod.save(this.listRequestSelfLink);
|
@@ -450,6 +513,14 @@ jQuery(function() {
|
|
450 |
|
451 |
OptileErrorHandler.error(this.paymentResponse.resultInfo);
|
452 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
453 |
// simulate shipping method save so it reloads payment section
|
454 |
checkout.setLoadWaiting(false);
|
455 |
shippingMethod.save(this.listRequestSelfLink);
|
@@ -458,6 +529,15 @@ jQuery(function() {
|
|
458 |
|
459 |
var OptileInteractionCodeHandlerABORT = Class.create(OptileInteractionCodeHandler, {
|
460 |
handle: function(context) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
461 |
checkout.setLoadWaiting(false);
|
462 |
|
463 |
OptileErrorHandler.error(this.paymentResponse.resultInfo);
|
25 |
return false;
|
26 |
}
|
27 |
|
28 |
+
iLogger = {
|
29 |
+
error: function(message, data){
|
30 |
+
console.log(data);
|
31 |
+
console.log(status);
|
32 |
+
|
33 |
+
jQuery.ajax({
|
34 |
+
type: 'POST',
|
35 |
+
url: '/optile/payment/ilog',
|
36 |
+
dataType: 'json',
|
37 |
+
data: {
|
38 |
+
message: message,
|
39 |
+
data: data,
|
40 |
+
}
|
41 |
+
})
|
42 |
+
}
|
43 |
+
|
44 |
+
}
|
45 |
+
|
46 |
ValidationController.prototype.Validate = function(event) {
|
47 |
var self = this;
|
48 |
var network = this.widget.find("input[name=\"optile-selected-network\"]:checked").val();
|
85 |
);
|
86 |
}
|
87 |
;
|
88 |
+
},
|
89 |
+
error: function(resultData, resultStatus, xhr){
|
90 |
+
iLogger.error(
|
91 |
+
"Error while sending VALIDATE request",
|
92 |
+
{
|
93 |
+
url: url,
|
94 |
+
responseText: resultData.responseText,
|
95 |
+
status: resultData.status
|
96 |
+
}
|
97 |
+
);
|
98 |
}
|
99 |
|
100 |
});
|
244 |
});
|
245 |
}
|
246 |
|
247 |
+
data = { 'account': data };
|
248 |
+
params = JSON.stringify(data);
|
249 |
+
|
250 |
|
251 |
var operationUrl = jQuery('#' + network + '-operation').val();
|
252 |
var listRequestSelfLink = jQuery('#optile-list-self').val();
|
257 |
jQuery.ajax({
|
258 |
type: 'POST',
|
259 |
url: operationUrl,
|
260 |
+
data: params,
|
261 |
dataType: 'json',
|
262 |
async: false,
|
263 |
success: function(resultData, resultStatus, xhr) {
|
281 |
break;
|
282 |
default:
|
283 |
console.log("ERROR! Can't find interaction code handler");
|
284 |
+
iLogger.error(
|
285 |
+
"Can't find interaction code handler",
|
286 |
+
{
|
287 |
+
url: operationUrl,
|
288 |
+
resultData: resultData,
|
289 |
+
}
|
290 |
+
);
|
291 |
break;
|
292 |
}
|
293 |
if (handler) {
|
297 |
if (paymentResponse.interaction.code != OptileInteractionCode.PROCEED) {
|
298 |
self.optile_error = 1;
|
299 |
}
|
300 |
+
},
|
301 |
+
error: function(resultData, resultStatus, xhr){
|
302 |
+
iLogger.error(
|
303 |
+
"Error while sending CHARGE request",
|
304 |
+
{
|
305 |
+
url: operationUrl,
|
306 |
+
responseText: resultData.responseText,
|
307 |
+
status: resultData.status
|
308 |
+
}
|
309 |
+
);
|
310 |
}
|
311 |
});
|
312 |
|
466 |
// save data before reloading payment section
|
467 |
saveOptileData();
|
468 |
|
469 |
+
iLogger.error(
|
470 |
+
"Received RETRY response code",
|
471 |
+
{
|
472 |
+
url: this.listRequestSelfLink,
|
473 |
+
paymentResponse: this.paymentResponse,
|
474 |
+
}
|
475 |
+
);
|
476 |
+
|
477 |
// simulate shipping method save so it reloads payment section
|
478 |
checkout.setLoadWaiting(false);
|
479 |
shippingMethod.save(this.listRequestSelfLink);
|
491 |
// save data before reloading payment section
|
492 |
saveOptileData();
|
493 |
|
494 |
+
iLogger.error(
|
495 |
+
"Received TRY_OTHER_ACCOUNT response code",
|
496 |
+
{
|
497 |
+
url: this.listRequestSelfLink,
|
498 |
+
paymentResponse: this.paymentResponse,
|
499 |
+
}
|
500 |
+
);
|
501 |
+
|
502 |
// simulate shipping method save so it reloads payment section
|
503 |
checkout.setLoadWaiting(false);
|
504 |
shippingMethod.save(this.listRequestSelfLink);
|
513 |
|
514 |
OptileErrorHandler.error(this.paymentResponse.resultInfo);
|
515 |
|
516 |
+
iLogger.error(
|
517 |
+
"Received TRY_OTHER_NETWORK response code",
|
518 |
+
{
|
519 |
+
url: this.listRequestSelfLink,
|
520 |
+
paymentResponse: this.paymentResponse,
|
521 |
+
}
|
522 |
+
);
|
523 |
+
|
524 |
// simulate shipping method save so it reloads payment section
|
525 |
checkout.setLoadWaiting(false);
|
526 |
shippingMethod.save(this.listRequestSelfLink);
|
529 |
|
530 |
var OptileInteractionCodeHandlerABORT = Class.create(OptileInteractionCodeHandler, {
|
531 |
handle: function(context) {
|
532 |
+
|
533 |
+
iLogger.error(
|
534 |
+
"Received ABORT response code",
|
535 |
+
{
|
536 |
+
url: this.listRequestSelfLink,
|
537 |
+
paymentResponse: this.paymentResponse,
|
538 |
+
}
|
539 |
+
);
|
540 |
+
|
541 |
checkout.setLoadWaiting(false);
|
542 |
|
543 |
OptileErrorHandler.error(this.paymentResponse.resultInfo);
|
lib/Optile/Request/Request.php
CHANGED
@@ -149,7 +149,7 @@ abstract class Request extends Component {
|
|
149 |
Logger::log(__METHOD__.': Request: '.$message);
|
150 |
|
151 |
if(isset($this->merchantCode, $this->merchantToken)) {
|
152 |
-
$curlOpts[CURLOPT_USERPWD] = $this->merchantCode.'
|
153 |
}
|
154 |
|
155 |
$ch = curl_init($url);
|
@@ -160,7 +160,7 @@ abstract class Request extends Component {
|
|
160 |
$response_error = curl_error($ch);
|
161 |
|
162 |
Logger::log(__METHOD__.': Response: '.$response. ', Response error: ' . $response_error);
|
163 |
-
Logger::log(__METHOD__.': Auth: '. $curlOpts[CURLOPT_USERPWD] = $this->merchantCode.'
|
164 |
|
165 |
|
166 |
curl_close($ch);
|
149 |
Logger::log(__METHOD__.': Request: '.$message);
|
150 |
|
151 |
if(isset($this->merchantCode, $this->merchantToken)) {
|
152 |
+
$curlOpts[CURLOPT_USERPWD] = $this->merchantCode.':'.$this->merchantToken;
|
153 |
}
|
154 |
|
155 |
$ch = curl_init($url);
|
160 |
$response_error = curl_error($ch);
|
161 |
|
162 |
Logger::log(__METHOD__.': Response: '.$response. ', Response error: ' . $response_error);
|
163 |
+
Logger::log(__METHOD__.': Auth: '. $curlOpts[CURLOPT_USERPWD] = $this->merchantCode.':'.$this->merchantToken);
|
164 |
|
165 |
|
166 |
curl_close($ch);
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Optile_Payment_Connector</name>
|
4 |
-
<version>1.0.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://www.opensource.org/licenses/gpl-license.php">GNU General Public License</license>
|
7 |
<channel>community</channel>
|
@@ -10,11 +10,16 @@
|
|
10 |
<description>A new way to think payments: any method, any provider, one system. Optile is about keeping resources low that you have to allocate to the implementation and administration of payments. You implement a global payments framework only once, and subsequently scale it as your business grows. Combine state-of-the-art, control & optimisation on-line business processes with best-of-breed payment partners and tools. We have introduced an open, scalable and easy-to-use Payments & BI platform to take your business to the next level.
|
11 |

|
12 |
By installing this extension you add the Optile Payment Gateway as a payment method to your Magento store.</description>
|
13 |
-
<notes>Optile Magento Connector v1.0.
|
|
|
|
|
|
|
|
|
|
|
14 |
<authors><author><name>i-Ways</name><user>extensions</user><email>extensions@i-ways.hr</email></author></authors>
|
15 |
-
<date>2016-
|
16 |
-
<time>
|
17 |
-
<contents><target name="magecommunity"><dir name="Optile"><dir name="Payment"><dir name="Block"><dir name="Adminhtml"><dir name="Notification"><file name="Grid.php" hash="d67c674aede171ef0a61c7fc0995cd5a"/><file name="View.php" hash="4ad4ea53598b14df536a55dde40eb594"/></dir><file name="Notification.php" hash="62bdb1f2608294e62e62188f75b9fe61"/><dir name="Order"><dir name="Creditmemo"><dir name="Create"><file name="Items.php" hash="46a03f043c07021cc98d24b4ad329b17"/></dir></dir><file name="Grid.php" hash="7f5629a24c8866ab157b60ee0e9b3210"/><file name="View.php" hash="ffc38b853c95929951185f1c6ee4c486"/></dir><file name="Order.php" hash="0ce3fd8bdd886a4ba47c8b3fe8ee492c"/><dir name="System"><dir name="Config"><dir name="Frontend"><dir name="Instructions"><file name="Textarea.php" hash="b6359101623d6ccc13981f317510be2f"/></dir><file name="Instructions.php" hash="c981f937a4ab755007ac58ecd497cda1"/><file name="Noactivemethods.php" hash="cca3bb02113e7b5142f33f4111ba937b"/></dir></dir></dir><dir name="Widget"><dir name="Grid"><dir name="Column"><dir name="Renderer"><file name="Url.php" hash="3bb467fe31f3569ce47ec1ec6ba3427a"/></dir></dir></dir></dir></dir><file name="Info.php" hash="3be2571f6d1cfb02b1a31a37f7c316a4"/><file name="List.php" hash="bc3880520190460e5a16260b9d7e3884"/></dir><dir name="Helper"><file name="Cache.php" hash="a1a7163f3612219e2077b2e0bd7f54a8"/><file name="Data.php" hash="6820e3f8a31538e0dd2b6f6248b838b8"/></dir><dir name="Model"><file name="Checkout.php" hash="
|
18 |
<compatible/>
|
19 |
<dependencies><required><php><min>5.2.0</min><max>7.0.0</max></php></required></dependencies>
|
20 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Optile_Payment_Connector</name>
|
4 |
+
<version>1.0.3</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://www.opensource.org/licenses/gpl-license.php">GNU General Public License</license>
|
7 |
<channel>community</channel>
|
10 |
<description>A new way to think payments: any method, any provider, one system. Optile is about keeping resources low that you have to allocate to the implementation and administration of payments. You implement a global payments framework only once, and subsequently scale it as your business grows. Combine state-of-the-art, control & optimisation on-line business processes with best-of-breed payment partners and tools. We have introduced an open, scalable and easy-to-use Payments & BI platform to take your business to the next level.
|
11 |

|
12 |
By installing this extension you add the Optile Payment Gateway as a payment method to your Magento store.</description>
|
13 |
+
<notes>Optile Magento Connector v1.0.3
|
14 |
+

|
15 |
+
What's new:
|
16 |
+
- Added ability to specify merchant division per magento website.
|
17 |
+
- Added additional logging in case of AJAX error to optile servers
|
18 |
+
- Added notification mail in case of fatal errors during VALIDATE, CHARGE request</notes>
|
19 |
<authors><author><name>i-Ways</name><user>extensions</user><email>extensions@i-ways.hr</email></author></authors>
|
20 |
+
<date>2016-10-03</date>
|
21 |
+
<time>12:24:20</time>
|
22 |
+
<contents><target name="magecommunity"><dir name="Optile"><dir name="Payment"><dir name="Block"><dir name="Adminhtml"><dir name="Notification"><file name="Grid.php" hash="d67c674aede171ef0a61c7fc0995cd5a"/><file name="View.php" hash="4ad4ea53598b14df536a55dde40eb594"/></dir><file name="Notification.php" hash="62bdb1f2608294e62e62188f75b9fe61"/><dir name="Order"><dir name="Creditmemo"><dir name="Create"><file name="Items.php" hash="46a03f043c07021cc98d24b4ad329b17"/></dir></dir><file name="Grid.php" hash="7f5629a24c8866ab157b60ee0e9b3210"/><file name="View.php" hash="ffc38b853c95929951185f1c6ee4c486"/></dir><file name="Order.php" hash="0ce3fd8bdd886a4ba47c8b3fe8ee492c"/><dir name="System"><dir name="Config"><dir name="Frontend"><dir name="Instructions"><file name="Textarea.php" hash="b6359101623d6ccc13981f317510be2f"/></dir><file name="Instructions.php" hash="c981f937a4ab755007ac58ecd497cda1"/><file name="Noactivemethods.php" hash="cca3bb02113e7b5142f33f4111ba937b"/></dir></dir></dir><dir name="Widget"><dir name="Grid"><dir name="Column"><dir name="Renderer"><file name="Url.php" hash="3bb467fe31f3569ce47ec1ec6ba3427a"/></dir></dir></dir></dir></dir><file name="Info.php" hash="3be2571f6d1cfb02b1a31a37f7c316a4"/><file name="List.php" hash="bc3880520190460e5a16260b9d7e3884"/></dir><dir name="Helper"><file name="Cache.php" hash="a1a7163f3612219e2077b2e0bd7f54a8"/><file name="Data.php" hash="6820e3f8a31538e0dd2b6f6248b838b8"/><file name="Notification.php" hash="432953d76a0ef71f311c35c7d01d6cb4"/></dir><dir name="Model"><file name="Checkout.php" hash="61676ad7eb4c6223653c9136a4161560"/><dir name="Mysql4"><dir name="Notification"><file name="Collection.php" hash="0f8e5d5cab6a2542869592fb678888b6"/></dir><file name="Notification.php" hash="25e312f5b10ffb01beb8aab5317926c8"/><dir name="Quote"><file name="Collection.php" hash="78ab441b7f76cfc6a745c49dc26116ba"/></dir><file name="Quote.php" hash="59ff7145b4bf7c688ac4be40e4f239b9"/></dir><file name="Notification.php" hash="be307f2b110b817de1b750dcad14273c"/><file name="Observer.php" hash="2fb2bec273714988d4ee89b2f4e9dfbf"/><dir name="Order"><file name="Payment.php" hash="9695f43762d4c1e9f9f87d259149fa68"/></dir><file name="PaymentMethod.php" hash="08c4836ca857e95ac34a0e9549c89507"/><file name="Quote.php" hash="8df0af8da9b80908292c59695d055407"/><dir name="System"><dir name="Config"><dir name="Backend"><file name="Disablemethods.php" hash="d505987b818685afb89e36789bedb120"/><dir name="Enabledmethods"><file name="Bool.php" hash="4e83bd68c221a4f2cbf3f19cbffc2062"/><file name="Select.php" hash="755653e250f67219e1a6af9f57e24f74"/></dir><file name="Instructions.php" hash="bcb5f6bf1729b8a5e4bc9488ebf2d0bb"/></dir><dir name="Source"><file name="Deferral.php" hash="e011625c18a74d2935f0aa8a5c3ba1f9"/><file name="Enabledmethods.php" hash="582d51bdd816c4ff58b98dc40fcdf029"/><file name="Loglevel.php" hash="e72713cf3e982f44e9c9f17f5969e5d7"/></dir></dir></dir></dir><dir name="controllers"><dir name="Adminhtml"><dir name="Optile"><file name="NotificationController.php" hash="15be1515d72beadf878fde398c11b5aa"/><file name="OrderController.php" hash="7a48e0243e3ea6ac97dc631a5afefc77"/></dir></dir><file name="NotificationController.php" hash="ac5a6aa89a3580b1b4928e9c8efeec31"/><file name="PaymentController.php" hash="98aeb27a6006b2c543e05ad20e592ce7"/></dir><dir name="etc"><file name="adminhtml.xml" hash="2cfb43269cc4fda040236a36fd79f7ae"/><file name="config.xml" hash="006be8f1bf3bda03344f7da6c8ede07e"/><file name="system.xml" hash="9d11e16c577c4f531cc4aee1f85b2e4c"/></dir><dir name="sql"><dir name="optile_setup"><file name="mysql4-install-1.0.0.php" hash="50ae0b0067556158f05f1ce6c72b3ca9"/><file name="mysql4-upgrade-1.0.0-1.0.1.php" hash="9a59f0c042dc2f43ea0b1a3d146a2aa8"/><file name="mysql4-upgrade-1.0.1-1.0.2.php" hash="99a265fe1b4b3f7fa2e2af28cd1a44bc"/><file name="mysql4-upgrade-1.0.2-1.0.3.php" hash="55599e5e356613299803242de2273941"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Optile_Payment.xml" hash="c7dc2f4c13a7f726a6634b4c9c8d8b0d"/></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="optile"><file name="info.phtml" hash="63ebc67d374969660580a65f3cf22085"/><file name="notification_view.phtml" hash="05a85b98e23063f14ed111da7dbae2fa"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><dir name="optile"><file name="payment.xml" hash="ca6e8c391734887dd1e3f07335e2092d"/></dir></dir><dir name="template"><dir name="optile"><file name="info.phtml" hash="f5b641ce59755f6fb5bf0d602938b6f8"/><file name="list.phtml" hash="0e2bb973f45362b0722f27e2d9c4e57a"/><file name="list_error.phtml" hash="ef327facb3c4ab7b9adbe18593ece348"/></dir></dir></dir></dir></dir></target><target name="mage"><dir name="js"><dir name="optile"><file name="checkout.js" hash="4ccd158a0f1e53a4b806780b4fed6a83"/><file name="jquery.2.0.3.min.js" hash="ccd0edd113b78697e04fb5c1b519a5cd"/><file name="jquery.noconflict.js" hash="8abb80eb8acc7fb599a9a9be6e1f3aa2"/><file name="optilevalidation.js" hash="6d97ac3ff142966b3e096894b1e6d2d9"/></dir></dir><dir name="lib"><dir name="Optile"><dir name="Request"><file name="Account.php" hash="58a4ad2c590e0b8749d0bf85038fa738"/><file name="Cache.php" hash="c9850c7b9c8dcebb13dfc887ec864fdf"/><file name="Callback.php" hash="6771c9874bba21aab2edd83810845f8f"/><file name="CancelRequest.php" hash="7bc3e0d6c57a42e1498eebbcea5ff99e"/><file name="ChargeRequest.php" hash="28deed42afdcb21bd811b44748f81222"/><file name="ClientInfo.php" hash="877848a94cdc202f1cf1b03528c57fa5"/><file name="CloseRequest.php" hash="0b8f39879c370563ad43c07ba1db74d2"/><file name="Component.php" hash="603bf2d504f1578ea952e397f5719f95"/><file name="Customer.php" hash="2e66e741b2b7ba857ec32b778a736704"/><file name="Exception.php" hash="1ceed951284b5db8d0f0afd59cd46308"/><file name="ListRequest.php" hash="5e1d843165cb2be6900504e999b0ae4a"/><file name="Logger.php" hash="11f427866d679baa67c20eb82528368c"/><file name="Payment.php" hash="90a204eb27808ca08a0b2aa2fc947b1c"/><file name="PayoutRequest.php" hash="d40c951d20fecf56bf84cb827c0a24c8"/><file name="Preselection.php" hash="b95f03f22e6a62fb179894de98a52d86"/><file name="Product.php" hash="147b2f0297d7f8514c6316e90306e9a7"/><file name="ReloadListRequest.php" hash="1b180a57eabf20b004e32913a14b308e"/><file name="Request.php" hash="d415d0d3ab9bf50f33155e510b50b696"/><file name="RequestFactory.php" hash="5983c30e32fbd703b3d601425aabb1cd"/><file name="SimpleRequest.php" hash="c88448b762984d36f0390fe8439ddc52"/></dir><dir name="Response"><file name="Entity.php" hash="30ae19ad1411951efb4ff32a4ec30041"/><file name="Interaction.php" hash="87fee62693b10828c2aa1dd24491b13b"/><file name="Network.php" hash="3423c5d3a47be0bff16839ce9f1a34b2"/><file name="NetworkLink.php" hash="edc01e441207697e31d0eadb7d77e72a"/><file name="Redirect.php" hash="cf0019cd1503abfba0e45ab4759d6b84"/><file name="Response.php" hash="770b8f28adb3d07de84b00660fad3f97"/><file name="ResponseFactory.php" hash="5f3f1126006b6348b390944e1cdf5087"/></dir></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="optile"><dir name="css"><file name="style.css" hash="99aff3792a76f1a366aa8c13e5914bb2"/></dir></dir></dir></dir></dir></target><target name="magelocale"><dir name="de_DE"><file name="Iways_Optile.csv" hash="60f636bac8844da9aab7d027d4c5d59b"/></dir></target></contents>
|
23 |
<compatible/>
|
24 |
<dependencies><required><php><min>5.2.0</min><max>7.0.0</max></php></required></dependencies>
|
25 |
</package>
|