Version Notes
La version 2.6.5.5 est stable
Download this release
Release Info
Developer | Johnny |
Extension | CardconnectCcgateway |
Version | 1.0.3 |
Comparing to | |
See all releases |
Code changes from version 1.0.2 to 1.0.3
- app/code/community/Cardconnect/Ccgateway/Model/Standard.php +136 -136
- app/code/community/Cardconnect/Ccgateway/controllers/Adminhtml/Sales/OrderController.php +19 -9
- app/code/community/Cardconnect/Ccgateway/controllers/PaymentController.php +50 -49
- app/code/community/Cardconnect/Ccgateway/etc/config.xml +112 -1
- app/code/community/Cardconnect/Ccgateway/sql/cardconnect_ccgateway_setup/install-1.0.0.php +41 -22
- app/design/frontend/base/default/template/ccgateway/cardmanagement/editcard.phtml +12 -30
- app/design/frontend/base/default/template/ccgateway/cardmanagement/index.phtml +16 -16
- app/design/frontend/base/default/template/ccgateway/cardmanagement/new.phtml +22 -13
- app/design/frontend/base/default/template/ccgateway/form.phtml +26 -21
- app/etc/modules/Cardconnect_Ccgateway.xml +6 -1
- js/cardconnect/ccgateway.js +38 -13
- package.xml +7 -7
- skin/frontend/base/default/css/cardconnect.css +420 -420
app/code/community/Cardconnect/Ccgateway/Model/Standard.php
CHANGED
@@ -12,22 +12,22 @@
|
|
12 |
*
|
13 |
* */
|
14 |
/**
|
15 |
-
|
16 |
*
|
17 |
-
|
18 |
*
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
*
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
*/
|
32 |
require('cardconnect_webservice.php');
|
33 |
|
@@ -56,7 +56,7 @@ class Cardconnect_Ccgateway_Model_Standard extends Mage_Payment_Model_Method_Abs
|
|
56 |
parent::_construct();
|
57 |
}
|
58 |
|
59 |
-
/**
|
60 |
* Return payment url type string
|
61 |
*
|
62 |
* @return string
|
@@ -66,10 +66,10 @@ class Cardconnect_Ccgateway_Model_Standard extends Mage_Payment_Model_Method_Abs
|
|
66 |
$isTestMode = Mage::getStoreConfig('payment/ccgateway/test_mode');
|
67 |
switch ($isTestMode) {
|
68 |
case 0:
|
69 |
-
$_url = 'https://securepayments.cardconnect.com/hpp/payment/';
|
70 |
break;
|
71 |
default:
|
72 |
-
|
73 |
break;
|
74 |
}
|
75 |
|
@@ -86,10 +86,10 @@ class Cardconnect_Ccgateway_Model_Standard extends Mage_Payment_Model_Method_Abs
|
|
86 |
$isTestMode = Mage::getStoreConfig('payment/ccgateway/test_mode');
|
87 |
switch ($isTestMode) {
|
88 |
case 0:
|
89 |
-
|
90 |
break;
|
91 |
default:
|
92 |
-
$_webServicesUrl = 'https://fts.prinpay.com:6443/cardconnect/rest/';
|
93 |
break;
|
94 |
}
|
95 |
|
@@ -191,9 +191,9 @@ class Cardconnect_Ccgateway_Model_Standard extends Mage_Payment_Model_Method_Abs
|
|
191 |
|
192 |
/**
|
193 |
* prepare params array to send it to gateway page via POST
|
194 |
-
*
|
195 |
-
* NOTE: Currency is not a parameter, it is configured by CardConnect in the merchant profile.
|
196 |
-
*
|
197 |
* @return array
|
198 |
*/
|
199 |
public function getFormFields() {
|
@@ -216,7 +216,7 @@ class Cardconnect_Ccgateway_Model_Standard extends Mage_Payment_Model_Method_Abs
|
|
216 |
'ccDisplayCvv' => Mage::getStoreConfig('payment/ccgateway/display'), /* Display CVV */
|
217 |
'ccAmount' => $price, /* Transaction Amount */
|
218 |
'ccName' => Mage::helper('core')->removeAccents($billing->getFirstname()
|
219 |
-
|
220 |
'ccAddress' => Mage::helper('core')->removeAccents($billing->getStreet(1)), /* Account street address */
|
221 |
'ccCity' => Mage::helper('core')->removeAccents($billing->getCity()), /* Account city */
|
222 |
'ccState' => $billing->getRegionCode(), /* US State, Mexican State, Canadian Province, etc. */
|
@@ -260,15 +260,15 @@ class Cardconnect_Ccgateway_Model_Standard extends Mage_Payment_Model_Method_Abs
|
|
260 |
|
261 |
$info = $this->getInfoInstance();
|
262 |
$info->setCcType($data->getCcType())
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
;
|
273 |
return $this;
|
274 |
}
|
@@ -309,7 +309,7 @@ class Cardconnect_Ccgateway_Model_Standard extends Mage_Payment_Model_Method_Abs
|
|
309 |
// For Pratial Shipment Reauthorization
|
310 |
$quote_id = $order->getQuoteId();
|
311 |
$collection = Mage::getModel('sales/quote_payment')->getCollection()
|
312 |
-
|
313 |
|
314 |
foreach ($collection as $data) {
|
315 |
$ccOwner = $data->getData("cc_owner");
|
@@ -399,15 +399,15 @@ class Cardconnect_Ccgateway_Model_Standard extends Mage_Payment_Model_Method_Abs
|
|
399 |
// Save Partial Authorization Response data
|
400 |
$this->saveResponseData($response);
|
401 |
// Set custom order status
|
402 |
-
$order->setState(Mage_Sales_Model_Order::
|
403 |
}
|
404 |
} else {
|
405 |
-
|
406 |
-
|
407 |
|
408 |
// Set custom order status
|
409 |
-
$order->setState(Mage_Sales_Model_Order::
|
410 |
-
|
411 |
|
412 |
}
|
413 |
|
@@ -493,10 +493,10 @@ class Cardconnect_Ccgateway_Model_Standard extends Mage_Payment_Model_Method_Abs
|
|
493 |
}
|
494 |
} else {
|
495 |
$myLogMessage = "CC Capture : ". __FILE__ . " @ " . __LINE__ ." ".$cc->getLastErrorMessage();
|
496 |
-
|
497 |
-
|
498 |
// Set custom order status
|
499 |
-
$order->setState(Mage_Sales_Model_Order::
|
500 |
$errorMsg = "Unable to perform operation. Please consult the Magento log for additional information.";
|
501 |
Mage::throwException($errorMsg);
|
502 |
|
@@ -510,8 +510,8 @@ class Cardconnect_Ccgateway_Model_Standard extends Mage_Payment_Model_Method_Abs
|
|
510 |
function checkCaptureOnceDone($orderId) {
|
511 |
|
512 |
$collection = Mage::getModel('cardconnect_ccgateway/cardconnect_resp')->getCollection()
|
513 |
-
|
514 |
-
|
515 |
|
516 |
$cc_action = array();
|
517 |
foreach ($collection as $data) {
|
@@ -545,7 +545,7 @@ class Cardconnect_Ccgateway_Model_Standard extends Mage_Payment_Model_Method_Abs
|
|
545 |
$cc_password = Mage::getModel('core/encryption')->decrypt($passWord);
|
546 |
|
547 |
$cc = new CardConnectWebService($this->getWebServicesUrl(), Mage::getStoreConfig('payment/ccgateway/username'), $cc_password, Mage::getStoreConfig('payment/ccgateway/merchant'), $this->getKeysLocation());
|
548 |
-
|
549 |
$resp = $cc->voidService($retref, $amount);
|
550 |
|
551 |
if ($resp != "") {
|
@@ -560,21 +560,21 @@ class Cardconnect_Ccgateway_Model_Standard extends Mage_Payment_Model_Method_Abs
|
|
560 |
|
561 |
if (empty($action)) {
|
562 |
// Set custom order status
|
563 |
-
$order->setState(Mage_Sales_Model_Order::
|
564 |
}
|
565 |
} else {
|
566 |
-
|
567 |
-
|
568 |
-
|
569 |
// Set custom order status
|
570 |
-
$order->setState(Mage_Sales_Model_Order::
|
571 |
|
572 |
$errorMsg = "Unable to perform operation. Please consult the Magento log for additional information.";
|
573 |
Mage::throwException($errorMsg);
|
574 |
|
575 |
}
|
576 |
|
577 |
-
return $
|
578 |
}
|
579 |
|
580 |
// Check the Capture status for a current order
|
@@ -583,8 +583,8 @@ class Cardconnect_Ccgateway_Model_Standard extends Mage_Payment_Model_Method_Abs
|
|
583 |
$orderId = $order->getIncrementId();
|
584 |
|
585 |
$collection = Mage::getModel('cardconnect_ccgateway/cardconnect_resp')->getCollection()
|
586 |
-
|
587 |
-
|
588 |
|
589 |
$cc_action = array();
|
590 |
foreach ($collection as $data) {
|
@@ -665,17 +665,17 @@ class Cardconnect_Ccgateway_Model_Standard extends Mage_Payment_Model_Method_Abs
|
|
665 |
// Save Refund Response data
|
666 |
$this->saveResponseData($response);
|
667 |
// Set custom order status
|
668 |
-
$order->setState(Mage_Sales_Model_Order::
|
669 |
} else {
|
670 |
-
|
671 |
-
|
672 |
-
|
673 |
-
|
674 |
// Set custom order status
|
675 |
-
$order->setState(Mage_Sales_Model_Order::
|
676 |
$errorMsg = "Unable to perform operation. Please consult the Magento log for additional information.";
|
677 |
Mage::throwException($errorMsg);
|
678 |
-
|
679 |
}
|
680 |
|
681 |
return $this;
|
@@ -712,20 +712,20 @@ class Cardconnect_Ccgateway_Model_Standard extends Mage_Payment_Model_Method_Abs
|
|
712 |
if (abs($response['amount']) == $order_amount || abs($response['amount']) == '0.00') {
|
713 |
if ($response['setlstat'] == 'Accepted' || $response['setlstat'] == 'Voided') {
|
714 |
if ($ccAction == 'Refund') {
|
715 |
-
$order->setState(Mage_Sales_Model_Order::
|
716 |
}
|
717 |
if ($ccAction == 'authorize' || $ccAction == 'authorize_capture') {
|
718 |
if ($response['setlstat'] == 'Voided') {
|
719 |
-
$order->setState(Mage_Sales_Model_Order::
|
720 |
} else if ($response['setlstat'] == 'Accepted') {
|
721 |
-
$order->setState(Mage_Sales_Model_Order::
|
722 |
}
|
723 |
}
|
724 |
if ($ccAction == 'Void') {
|
725 |
-
$order->setState(Mage_Sales_Model_Order::
|
726 |
}
|
727 |
} else if ($response['setlstat'] == 'Rejected') {
|
728 |
-
|
729 |
}
|
730 |
|
731 |
$stat = strpos($setlstat, $response['setlstat']);
|
@@ -748,9 +748,9 @@ class Cardconnect_Ccgateway_Model_Standard extends Mage_Payment_Model_Method_Abs
|
|
748 |
}
|
749 |
} else {
|
750 |
$errorMsg = 1;
|
751 |
-
|
752 |
-
|
753 |
-
|
754 |
}
|
755 |
}
|
756 |
} else {
|
@@ -824,9 +824,9 @@ class Cardconnect_Ccgateway_Model_Standard extends Mage_Payment_Model_Method_Abs
|
|
824 |
$this->saveResponseData($response, "Wallat");
|
825 |
}
|
826 |
} else {
|
827 |
-
|
828 |
-
|
829 |
-
|
830 |
}
|
831 |
|
832 |
return $response;
|
@@ -837,7 +837,7 @@ class Cardconnect_Ccgateway_Model_Standard extends Mage_Payment_Model_Method_Abs
|
|
837 |
|
838 |
$passWord = Mage::getStoreConfig('payment/ccgateway/password');
|
839 |
$cc_password = Mage::getModel('core/encryption')->decrypt($passWord);
|
840 |
-
|
841 |
$cc = new CardConnectWebService($this->getWebServicesUrl(), Mage::getStoreConfig('payment/ccgateway/username'), $cc_password, Mage::getStoreConfig('payment/ccgateway/merchant'), $this->getKeysLocation());
|
842 |
$resp = $cc->getProfileService($profileId);
|
843 |
if (!empty($resp) && $cc_id != "") {
|
@@ -851,9 +851,9 @@ class Cardconnect_Ccgateway_Model_Standard extends Mage_Payment_Model_Method_Abs
|
|
851 |
$resp = json_decode($resp, true);
|
852 |
$resp[] = $rsCard['CC_CARD_NAME'];
|
853 |
} else {
|
854 |
-
|
855 |
-
|
856 |
-
|
857 |
|
858 |
}
|
859 |
|
@@ -865,13 +865,13 @@ class Cardconnect_Ccgateway_Model_Standard extends Mage_Payment_Model_Method_Abs
|
|
865 |
|
866 |
$passWord = Mage::getStoreConfig('payment/ccgateway/password');
|
867 |
$cc_password = Mage::getModel('core/encryption')->decrypt($passWord);
|
868 |
-
|
869 |
$cc = new CardConnectWebService($this->getWebServicesUrl(), Mage::getStoreConfig('payment/ccgateway/username'), $cc_password, Mage::getStoreConfig('payment/ccgateway/merchant'), $this->getKeysLocation());
|
870 |
$resp = $cc->getProfileService($profileId);
|
871 |
if (empty($resp)) {
|
872 |
-
|
873 |
-
|
874 |
-
|
875 |
}
|
876 |
|
877 |
return $resp;
|
@@ -883,15 +883,15 @@ class Cardconnect_Ccgateway_Model_Standard extends Mage_Payment_Model_Method_Abs
|
|
883 |
|
884 |
$passWord = Mage::getStoreConfig('payment/ccgateway/password');
|
885 |
$cc_password = Mage::getModel('core/encryption')->decrypt($passWord);
|
886 |
-
|
887 |
$customerData = Mage::getSingleton('customer/session')->getCustomer();
|
888 |
$ccUserId = $customerData->getId();
|
889 |
-
|
890 |
|
891 |
$collection = Mage::getModel('cardconnect_ccgateway/cardconnect_wallet')->getCollection()
|
892 |
-
|
893 |
-
|
894 |
-
|
895 |
|
896 |
foreach ($collection as $data) {
|
897 |
$ccProfileId = $data->getData('CC_PROFILEID');
|
@@ -899,35 +899,35 @@ class Cardconnect_Ccgateway_Model_Standard extends Mage_Payment_Model_Method_Abs
|
|
899 |
}
|
900 |
|
901 |
|
902 |
-
|
903 |
-
|
904 |
-
|
905 |
-
|
906 |
-
|
907 |
-
|
908 |
-
|
909 |
-
|
910 |
-
|
911 |
-
|
912 |
-
|
913 |
-
|
914 |
-
|
915 |
-
|
916 |
-
|
917 |
-
|
918 |
-
|
919 |
-
|
920 |
-
|
921 |
-
|
922 |
-
|
923 |
-
|
924 |
-
|
925 |
-
|
926 |
-
|
927 |
-
|
928 |
-
|
929 |
-
|
930 |
-
|
931 |
}
|
932 |
|
933 |
return $msg;
|
@@ -965,7 +965,7 @@ class Cardconnect_Ccgateway_Model_Standard extends Mage_Payment_Model_Method_Abs
|
|
965 |
'phone' => $paymentInformation['cc_telephone'],
|
966 |
'postal' => $paymentInformation['cc_postcode']
|
967 |
);
|
968 |
-
|
969 |
|
970 |
$cc = new CardConnectWebService($this->getWebServicesUrl(), Mage::getStoreConfig('payment/ccgateway/username'), $cc_password, Mage::getStoreConfig('payment/ccgateway/merchant'), $this->getKeysLocation());
|
971 |
|
@@ -973,20 +973,20 @@ class Cardconnect_Ccgateway_Model_Standard extends Mage_Payment_Model_Method_Abs
|
|
973 |
if ($resp != "") {
|
974 |
$response = json_decode($resp, true);
|
975 |
if ($response['resptext'] == "Profile Saved") {
|
976 |
-
|
977 |
-
|
978 |
-
|
979 |
-
|
980 |
-
|
981 |
-
|
982 |
$response = "Profile Updated";
|
983 |
} else {
|
984 |
$errorMessage = "There is some problem in updatae profile. Due to " . $response['resptext'];
|
985 |
Mage::log($errorMessage, Zend_Log::ERR);
|
986 |
}
|
987 |
} else {
|
988 |
-
|
989 |
-
|
990 |
}
|
991 |
|
992 |
|
@@ -997,8 +997,8 @@ class Cardconnect_Ccgateway_Model_Standard extends Mage_Payment_Model_Method_Abs
|
|
997 |
function hasWalletCard($customerID) {
|
998 |
|
999 |
$collection = Mage::getModel('cardconnect_ccgateway/cardconnect_wallet')->getCollection()
|
1000 |
-
|
1001 |
-
|
1002 |
|
1003 |
$ccProfileId = "";
|
1004 |
foreach ($collection as $data) {
|
@@ -1018,12 +1018,12 @@ class Cardconnect_Ccgateway_Model_Standard extends Mage_Payment_Model_Method_Abs
|
|
1018 |
|
1019 |
public function getResponseDataByOrderId($orderId) {
|
1020 |
$collection = Mage::getModel('cardconnect_ccgateway/cardconnect_resp')->getCollection()
|
1021 |
-
|
1022 |
-
|
1023 |
-
|
1024 |
-
|
1025 |
)
|
1026 |
-
|
1027 |
|
1028 |
return $collection;
|
1029 |
}
|
@@ -1045,8 +1045,8 @@ class Cardconnect_Ccgateway_Model_Standard extends Mage_Payment_Model_Method_Abs
|
|
1045 |
|
1046 |
|
1047 |
if ($table == "Wallat") {
|
1048 |
-
|
1049 |
-
|
1050 |
$data = array('CC_USER_ID' => $response['ccUserId'], /* Checkout Transaction Type */
|
1051 |
'CC_PROFILEID' => $response['profileid'], /* Retrieval Reference Number */
|
1052 |
'CC_ACCTID' => $response['acctid'], /* Capture Amount */
|
@@ -1058,9 +1058,9 @@ class Cardconnect_Ccgateway_Model_Standard extends Mage_Payment_Model_Method_Abs
|
|
1058 |
$model = Mage::getModel('cardconnect_ccgateway/cardconnect_wallet')->setData($data);
|
1059 |
} else {
|
1060 |
$retref = $response['retref'];
|
1061 |
-
|
1062 |
-
|
1063 |
-
|
1064 |
$data = array('CC_ACTION' => $response['action'], /* Checkout Transaction Type */
|
1065 |
'CC_RETREF' => "$retref", /* Retrieval Reference Number */
|
1066 |
'CC_AMT' => @$response['amount'], /* Capture Amount */
|
@@ -1087,8 +1087,8 @@ class Cardconnect_Ccgateway_Model_Standard extends Mage_Payment_Model_Method_Abs
|
|
1087 |
public function getAuthCode($currentOrderId) {
|
1088 |
|
1089 |
$collection = Mage::getModel('cardconnect_ccgateway/cardconnect_resp')->getCollection()
|
1090 |
-
|
1091 |
-
|
1092 |
|
1093 |
$authDesc = "";
|
1094 |
foreach ($collection as $data) {
|
@@ -1102,8 +1102,8 @@ class Cardconnect_Ccgateway_Model_Standard extends Mage_Payment_Model_Method_Abs
|
|
1102 |
public function getRetrefReferenceNumber($currentOrderId, $action = "") {
|
1103 |
|
1104 |
$collection = Mage::getModel('cardconnect_ccgateway/cardconnect_resp')->getCollection()
|
1105 |
-
|
1106 |
-
|
1107 |
if ($action !== "Refund") {
|
1108 |
$collection->setOrder('CC_CREATED', 'DESC');
|
1109 |
}
|
12 |
*
|
13 |
* */
|
14 |
/**
|
15 |
+
Magento
|
16 |
*
|
17 |
+
NOTICE OF LICENSE
|
18 |
*
|
19 |
+
This source file is subject to the Open Software License (OSL 3.0)
|
20 |
+
that is bundled with this package in the file LICENSE.txt.
|
21 |
+
It is also available through the world-wide-web at this URL:
|
22 |
+
http://opensource.org/licenses/osl-3.0.php
|
23 |
+
If you did not receive a copy of the license and are unable to
|
24 |
+
obtain it through the world-wide-web, please send an email
|
25 |
+
to license@magentocommerce.com so we can send you a copy immediately.
|
26 |
*
|
27 |
+
@category Cardconnect
|
28 |
+
@package Cardconnect_Ccgateway
|
29 |
+
@copyright Copyright (c) 2014 CardConnect (http://www.cardconnect.com)
|
30 |
+
@license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
31 |
*/
|
32 |
require('cardconnect_webservice.php');
|
33 |
|
56 |
parent::_construct();
|
57 |
}
|
58 |
|
59 |
+
/**
|
60 |
* Return payment url type string
|
61 |
*
|
62 |
* @return string
|
66 |
$isTestMode = Mage::getStoreConfig('payment/ccgateway/test_mode');
|
67 |
switch ($isTestMode) {
|
68 |
case 0:
|
69 |
+
$_url = 'https://securepayments.cardconnect.com/hpp/payment/';
|
70 |
break;
|
71 |
default:
|
72 |
+
$_url = 'https://securepaymentstest.cardconnect.com/hpp/payment/';
|
73 |
break;
|
74 |
}
|
75 |
|
86 |
$isTestMode = Mage::getStoreConfig('payment/ccgateway/test_mode');
|
87 |
switch ($isTestMode) {
|
88 |
case 0:
|
89 |
+
$_webServicesUrl = 'https://fts.prinpay.com:8443/cardconnect/rest/';
|
90 |
break;
|
91 |
default:
|
92 |
+
$_webServicesUrl = 'https://fts.prinpay.com:6443/cardconnect/rest/';
|
93 |
break;
|
94 |
}
|
95 |
|
191 |
|
192 |
/**
|
193 |
* prepare params array to send it to gateway page via POST
|
194 |
+
*
|
195 |
+
* NOTE: Currency is not a parameter, it is configured by CardConnect in the merchant profile.
|
196 |
+
*
|
197 |
* @return array
|
198 |
*/
|
199 |
public function getFormFields() {
|
216 |
'ccDisplayCvv' => Mage::getStoreConfig('payment/ccgateway/display'), /* Display CVV */
|
217 |
'ccAmount' => $price, /* Transaction Amount */
|
218 |
'ccName' => Mage::helper('core')->removeAccents($billing->getFirstname()
|
219 |
+
. ' ' . $billing->getLastname()), /* Account Name */
|
220 |
'ccAddress' => Mage::helper('core')->removeAccents($billing->getStreet(1)), /* Account street address */
|
221 |
'ccCity' => Mage::helper('core')->removeAccents($billing->getCity()), /* Account city */
|
222 |
'ccState' => $billing->getRegionCode(), /* US State, Mexican State, Canadian Province, etc. */
|
260 |
|
261 |
$info = $this->getInfoInstance();
|
262 |
$info->setCcType($data->getCcType())
|
263 |
+
->setCcOwner($data->getCcOwner())
|
264 |
+
->setCcLast4(substr($data->getCcNumber(), -4))
|
265 |
+
->setCcNumber($data->getCcNumber())
|
266 |
+
->setCcCid($data->getCcCid())
|
267 |
+
->setCcExpMonth($data->getCcExpMonth())
|
268 |
+
->setCcExpYear($data->getCcExpYear())
|
269 |
+
->setCcSsIssue($data->getCcSsIssue())
|
270 |
+
->setCcSsStartMonth($data->getCcSsStartMonth())
|
271 |
+
->setCcSsStartYear($data->getCcSsStartYear())
|
272 |
;
|
273 |
return $this;
|
274 |
}
|
309 |
// For Pratial Shipment Reauthorization
|
310 |
$quote_id = $order->getQuoteId();
|
311 |
$collection = Mage::getModel('sales/quote_payment')->getCollection()
|
312 |
+
->addFieldToFilter('quote_id', array('eq' => $quote_id));
|
313 |
|
314 |
foreach ($collection as $data) {
|
315 |
$ccOwner = $data->getData("cc_owner");
|
399 |
// Save Partial Authorization Response data
|
400 |
$this->saveResponseData($response);
|
401 |
// Set custom order status
|
402 |
+
$order->setState(Mage_Sales_Model_Order::STATE_PROCESSING, 'cardconnect_processing', $response['resptext'])->save();
|
403 |
}
|
404 |
} else {
|
405 |
+
$myLogMessage = "CC Authorization : ". __FILE__ . " @ " . __LINE__ ." ".$cc->getLastErrorMessage();
|
406 |
+
Mage::log($myLogMessage, Zend_Log::ERR , "cc.log" );
|
407 |
|
408 |
// Set custom order status
|
409 |
+
$order->setState(Mage_Sales_Model_Order::STATE_CANCELED, 'cardconnect_reject', "Invalid response from CardConnect.")->save();
|
410 |
+
$response= array('resptext' => "CardConnect_Error");
|
411 |
|
412 |
}
|
413 |
|
493 |
}
|
494 |
} else {
|
495 |
$myLogMessage = "CC Capture : ". __FILE__ . " @ " . __LINE__ ." ".$cc->getLastErrorMessage();
|
496 |
+
Mage::log($myLogMessage, Zend_Log::ERR , "cc.log" );
|
497 |
+
|
498 |
// Set custom order status
|
499 |
+
$order->setState(Mage_Sales_Model_Order::STATE_CANCELED, 'cardconnect_reject', "Invalid response from CardConnect.")->save();
|
500 |
$errorMsg = "Unable to perform operation. Please consult the Magento log for additional information.";
|
501 |
Mage::throwException($errorMsg);
|
502 |
|
510 |
function checkCaptureOnceDone($orderId) {
|
511 |
|
512 |
$collection = Mage::getModel('cardconnect_ccgateway/cardconnect_resp')->getCollection()
|
513 |
+
->addFieldToFilter('CC_ORDERID', array('eq' => $orderId))
|
514 |
+
->addFieldToSelect('CC_ACTION');
|
515 |
|
516 |
$cc_action = array();
|
517 |
foreach ($collection as $data) {
|
545 |
$cc_password = Mage::getModel('core/encryption')->decrypt($passWord);
|
546 |
|
547 |
$cc = new CardConnectWebService($this->getWebServicesUrl(), Mage::getStoreConfig('payment/ccgateway/username'), $cc_password, Mage::getStoreConfig('payment/ccgateway/merchant'), $this->getKeysLocation());
|
548 |
+
Mage::log("Void req ".$retref." amount ".$amount, Zend_Log::ERR , "cc.log" );
|
549 |
$resp = $cc->voidService($retref, $amount);
|
550 |
|
551 |
if ($resp != "") {
|
560 |
|
561 |
if (empty($action)) {
|
562 |
// Set custom order status
|
563 |
+
$order->setState(Mage_Sales_Model_Order::STATE_CANCELED, 'cardconnect_void', $response['resptext'])->save();
|
564 |
}
|
565 |
} else {
|
566 |
+
$myLogMessage = "CC Void : ". __FILE__ . " @ " . __LINE__ ." ".$cc->getLastErrorMessage();
|
567 |
+
Mage::log($myLogMessage, Zend_Log::ERR , "cc.log" );
|
568 |
+
|
569 |
// Set custom order status
|
570 |
+
$order->setState(Mage_Sales_Model_Order::STATE_CANCELED, 'cardconnect_reject', "Invalid response from CardConnect.")->save();
|
571 |
|
572 |
$errorMsg = "Unable to perform operation. Please consult the Magento log for additional information.";
|
573 |
Mage::throwException($errorMsg);
|
574 |
|
575 |
}
|
576 |
|
577 |
+
return $response;
|
578 |
}
|
579 |
|
580 |
// Check the Capture status for a current order
|
583 |
$orderId = $order->getIncrementId();
|
584 |
|
585 |
$collection = Mage::getModel('cardconnect_ccgateway/cardconnect_resp')->getCollection()
|
586 |
+
->addFieldToFilter('CC_ORDERID', array('eq' => $orderId))
|
587 |
+
->addFieldToSelect('CC_ACTION');
|
588 |
|
589 |
$cc_action = array();
|
590 |
foreach ($collection as $data) {
|
665 |
// Save Refund Response data
|
666 |
$this->saveResponseData($response);
|
667 |
// Set custom order status
|
668 |
+
$order->setState(Mage_Sales_Model_Order::STATE_PROCESSING, 'cardconnect_refund', $response['resptext'])->save();
|
669 |
} else {
|
670 |
+
|
671 |
+
$myLogMessage = "CC Refund : ". __FILE__ . " @ " . __LINE__ ." ".$cc->getLastErrorMessage();
|
672 |
+
Mage::log($myLogMessage, Zend_Log::ERR , "cc.log" );
|
673 |
+
|
674 |
// Set custom order status
|
675 |
+
$order->setState(Mage_Sales_Model_Order::STATE_CANCELED, 'cardconnect_reject', "Invalid response from CardConnect.")->save();
|
676 |
$errorMsg = "Unable to perform operation. Please consult the Magento log for additional information.";
|
677 |
Mage::throwException($errorMsg);
|
678 |
+
|
679 |
}
|
680 |
|
681 |
return $this;
|
712 |
if (abs($response['amount']) == $order_amount || abs($response['amount']) == '0.00') {
|
713 |
if ($response['setlstat'] == 'Accepted' || $response['setlstat'] == 'Voided') {
|
714 |
if ($ccAction == 'Refund') {
|
715 |
+
$order->setState(Mage_Sales_Model_Order::STATE_REFUNDED, 'cardconnect_refund', $response['setlstat'])->save();
|
716 |
}
|
717 |
if ($ccAction == 'authorize' || $ccAction == 'authorize_capture') {
|
718 |
if ($response['setlstat'] == 'Voided') {
|
719 |
+
$order->setState(Mage_Sales_Model_Order::STATE_CANCELED, 'cardconnect_void', $response['setlstat'])->save();
|
720 |
} else if ($response['setlstat'] == 'Accepted') {
|
721 |
+
$order->setState(Mage_Sales_Model_Order::STATE_COMPLETE, 'cardconnect_txn_settled', $response['setlstat'])->save();
|
722 |
}
|
723 |
}
|
724 |
if ($ccAction == 'Void') {
|
725 |
+
$order->setState(Mage_Sales_Model_Order::STATE_CANCELED, 'cardconnect_void', $response['setlstat'])->save();
|
726 |
}
|
727 |
} else if ($response['setlstat'] == 'Rejected') {
|
728 |
+
// Do not update order status for refund
|
729 |
}
|
730 |
|
731 |
$stat = strpos($setlstat, $response['setlstat']);
|
748 |
}
|
749 |
} else {
|
750 |
$errorMsg = 1;
|
751 |
+
$myLogMessage = "CC Inquire : ". __FILE__ . " @ " . __LINE__ ." ".$cc->getLastErrorMessage();
|
752 |
+
Mage::log($myLogMessage, Zend_Log::ERR , "cc.log" );
|
753 |
+
|
754 |
}
|
755 |
}
|
756 |
} else {
|
824 |
$this->saveResponseData($response, "Wallat");
|
825 |
}
|
826 |
} else {
|
827 |
+
$myLogMessage = "CC Create Profile Service : ". __FILE__ . " @ " . __LINE__ ." ".$cc->getLastErrorMessage();
|
828 |
+
Mage::log($myLogMessage, Zend_Log::ERR , "cc.log" );
|
829 |
+
$response= array('resptext' => "CardConnect_Error");
|
830 |
}
|
831 |
|
832 |
return $response;
|
837 |
|
838 |
$passWord = Mage::getStoreConfig('payment/ccgateway/password');
|
839 |
$cc_password = Mage::getModel('core/encryption')->decrypt($passWord);
|
840 |
+
|
841 |
$cc = new CardConnectWebService($this->getWebServicesUrl(), Mage::getStoreConfig('payment/ccgateway/username'), $cc_password, Mage::getStoreConfig('payment/ccgateway/merchant'), $this->getKeysLocation());
|
842 |
$resp = $cc->getProfileService($profileId);
|
843 |
if (!empty($resp) && $cc_id != "") {
|
851 |
$resp = json_decode($resp, true);
|
852 |
$resp[] = $rsCard['CC_CARD_NAME'];
|
853 |
} else {
|
854 |
+
$myLogMessage = "CC Get Profile Service : ". __FILE__ . " @ " . __LINE__ ." ".$cc->getLastErrorMessage();
|
855 |
+
Mage::log($myLogMessage, Zend_Log::ERR , "cc.log" );
|
856 |
+
$resp[] = array('resptext' => "CardConnect_Error");
|
857 |
|
858 |
}
|
859 |
|
865 |
|
866 |
$passWord = Mage::getStoreConfig('payment/ccgateway/password');
|
867 |
$cc_password = Mage::getModel('core/encryption')->decrypt($passWord);
|
868 |
+
|
869 |
$cc = new CardConnectWebService($this->getWebServicesUrl(), Mage::getStoreConfig('payment/ccgateway/username'), $cc_password, Mage::getStoreConfig('payment/ccgateway/merchant'), $this->getKeysLocation());
|
870 |
$resp = $cc->getProfileService($profileId);
|
871 |
if (empty($resp)) {
|
872 |
+
$myLogMessage = "CC Get Profile Service : ". __FILE__ . " @ " . __LINE__ ." ".$cc->getLastErrorMessage();
|
873 |
+
Mage::log($myLogMessage, Zend_Log::ERR , "cc.log" );
|
874 |
+
$resp[] = array('resptext' => "CardConnect_Error");
|
875 |
}
|
876 |
|
877 |
return $resp;
|
883 |
|
884 |
$passWord = Mage::getStoreConfig('payment/ccgateway/password');
|
885 |
$cc_password = Mage::getModel('core/encryption')->decrypt($passWord);
|
886 |
+
if (Mage::getSingleton('customer/session')->isLoggedIn()) {
|
887 |
$customerData = Mage::getSingleton('customer/session')->getCustomer();
|
888 |
$ccUserId = $customerData->getId();
|
889 |
+
}
|
890 |
|
891 |
$collection = Mage::getModel('cardconnect_ccgateway/cardconnect_wallet')->getCollection()
|
892 |
+
->addFieldToFilter('CC_ID', array('eq' => $profileRowId))
|
893 |
+
->addFieldToFilter('CC_USER_ID', array('eq' => $ccUserId))
|
894 |
+
->addFieldToSelect("*");
|
895 |
|
896 |
foreach ($collection as $data) {
|
897 |
$ccProfileId = $data->getData('CC_PROFILEID');
|
899 |
}
|
900 |
|
901 |
|
902 |
+
if (!empty($tokenNum)) {
|
903 |
+
$cc = new CardConnectWebService($this->getWebServicesUrl(), Mage::getStoreConfig('payment/ccgateway/username'), $cc_password, Mage::getStoreConfig('payment/ccgateway/merchant'), $this->getKeysLocation());
|
904 |
+
$resp = $cc->deleteProfileService($ccProfileId);
|
905 |
+
|
906 |
+
if (!empty($resp)) {
|
907 |
+
$response = json_decode($resp, true);
|
908 |
+
|
909 |
+
if (($response['resptext'] === "Profile Deleted") || ($response['resptext'] === "Profile not found")) {
|
910 |
+
$resource = Mage::getSingleton('core/resource');
|
911 |
+
$readConnection = $resource->getConnection('core_read');
|
912 |
+
$writeConnection = $resource->getConnection('core_write');
|
913 |
+
|
914 |
+
$getTable = $resource->getTableName('cardconnect_wallet');
|
915 |
+
// Query to delete cardconnect_wallet table
|
916 |
+
$delQry = "DELETE FROM {$getTable} WHERE CC_ID=" . $profileRowId." AND CC_USER_ID=". $ccUserId;
|
917 |
+
$writeConnection->query($delQry);
|
918 |
+
$msg = "Card has been deleted successfully.";
|
919 |
+
} else {
|
920 |
+
$msg = "We are unable to perform the requested action, please contact customer service.";
|
921 |
+
$myLogMessage = "CC Delete Profile Service : ". __FILE__ . " @ " . __LINE__ ." ".$cc->getLastErrorMessage();
|
922 |
+
Mage::log($myLogMessage, Zend_Log::ERR , "cc.log" );
|
923 |
+
$myMessage = "CC Delete Profile Service : ". __FILE__ . " @ " . __LINE__ ." ".$response['resptext'];
|
924 |
+
Mage::log($myMessage, Zend_Log::ERR , "cc.log" );
|
925 |
+
}
|
926 |
+
} else {
|
927 |
+
$myLogMessage = "CC Delete Profile Service : ". __FILE__ . " @ " . __LINE__ ." ".$cc->getLastErrorMessage();
|
928 |
+
Mage::log($myLogMessage, Zend_Log::ERR , "cc.log" );
|
929 |
+
$msg = "We are unable to perform the requested action, please contact customer service.";
|
930 |
+
}
|
931 |
}
|
932 |
|
933 |
return $msg;
|
965 |
'phone' => $paymentInformation['cc_telephone'],
|
966 |
'postal' => $paymentInformation['cc_postcode']
|
967 |
);
|
968 |
+
|
969 |
|
970 |
$cc = new CardConnectWebService($this->getWebServicesUrl(), Mage::getStoreConfig('payment/ccgateway/username'), $cc_password, Mage::getStoreConfig('payment/ccgateway/merchant'), $this->getKeysLocation());
|
971 |
|
973 |
if ($resp != "") {
|
974 |
$response = json_decode($resp, true);
|
975 |
if ($response['resptext'] == "Profile Saved") {
|
976 |
+
$fields = array('CC_CARD_NAME' => $ccCardName, 'CC_MASK' => $response['token']);
|
977 |
+
$connectionWrite = Mage::getSingleton('core/resource')->getConnection('core_write');
|
978 |
+
$connectionWrite->beginTransaction();
|
979 |
+
$where = $connectionWrite->quoteInto('CC_ID =?', $cc_id);
|
980 |
+
$connectionWrite->update('cardconnect_wallet', $fields, $where);
|
981 |
+
$connectionWrite->commit();
|
982 |
$response = "Profile Updated";
|
983 |
} else {
|
984 |
$errorMessage = "There is some problem in updatae profile. Due to " . $response['resptext'];
|
985 |
Mage::log($errorMessage, Zend_Log::ERR);
|
986 |
}
|
987 |
} else {
|
988 |
+
$myLogMessage = "CC Update Profile Service : ". __FILE__ . " @ " . __LINE__ ." ".$cc->getLastErrorMessage();
|
989 |
+
Mage::log($myLogMessage, Zend_Log::ERR , "cc.log" );
|
990 |
}
|
991 |
|
992 |
|
997 |
function hasWalletCard($customerID) {
|
998 |
|
999 |
$collection = Mage::getModel('cardconnect_ccgateway/cardconnect_wallet')->getCollection()
|
1000 |
+
->addFieldToFilter('CC_USER_ID', array('eq' => $customerID))
|
1001 |
+
->addFieldToSelect("CC_USER_ID");
|
1002 |
|
1003 |
$ccProfileId = "";
|
1004 |
foreach ($collection as $data) {
|
1018 |
|
1019 |
public function getResponseDataByOrderId($orderId) {
|
1020 |
$collection = Mage::getModel('cardconnect_ccgateway/cardconnect_resp')->getCollection()
|
1021 |
+
->addFieldToFilter('CC_ORDERID', array('eq' => $orderId))
|
1022 |
+
->addFieldToFilter('CC_SETLSTAT', array(
|
1023 |
+
array('nin' => array('Accepted', 'Voided')),
|
1024 |
+
array('null' => true),
|
1025 |
)
|
1026 |
+
);
|
1027 |
|
1028 |
return $collection;
|
1029 |
}
|
1045 |
|
1046 |
|
1047 |
if ($table == "Wallat") {
|
1048 |
+
$ccMask = substr_replace(@$response['token'], '************', 0, 12);
|
1049 |
+
|
1050 |
$data = array('CC_USER_ID' => $response['ccUserId'], /* Checkout Transaction Type */
|
1051 |
'CC_PROFILEID' => $response['profileid'], /* Retrieval Reference Number */
|
1052 |
'CC_ACCTID' => $response['acctid'], /* Capture Amount */
|
1058 |
$model = Mage::getModel('cardconnect_ccgateway/cardconnect_wallet')->setData($data);
|
1059 |
} else {
|
1060 |
$retref = $response['retref'];
|
1061 |
+
// $ccToken = @$response['token'];
|
1062 |
+
$ccToken ="";
|
1063 |
+
|
1064 |
$data = array('CC_ACTION' => $response['action'], /* Checkout Transaction Type */
|
1065 |
'CC_RETREF' => "$retref", /* Retrieval Reference Number */
|
1066 |
'CC_AMT' => @$response['amount'], /* Capture Amount */
|
1087 |
public function getAuthCode($currentOrderId) {
|
1088 |
|
1089 |
$collection = Mage::getModel('cardconnect_ccgateway/cardconnect_resp')->getCollection()
|
1090 |
+
->addFieldToFilter('CC_ORDERID', array('eq' => $currentOrderId))
|
1091 |
+
->addFieldToSelect('CC_AUTHCODE');
|
1092 |
|
1093 |
$authDesc = "";
|
1094 |
foreach ($collection as $data) {
|
1102 |
public function getRetrefReferenceNumber($currentOrderId, $action = "") {
|
1103 |
|
1104 |
$collection = Mage::getModel('cardconnect_ccgateway/cardconnect_resp')->getCollection()
|
1105 |
+
->addFieldToFilter('CC_ORDERID', array('eq' => $currentOrderId))
|
1106 |
+
->addFieldToSelect('CC_RETREF');
|
1107 |
if ($action !== "Refund") {
|
1108 |
$collection->setOrder('CC_CREATED', 'DESC');
|
1109 |
}
|
app/code/community/Cardconnect/Ccgateway/controllers/Adminhtml/Sales/OrderController.php
CHANGED
@@ -13,9 +13,9 @@
|
|
13 |
* */
|
14 |
/**
|
15 |
Magento
|
16 |
-
*
|
17 |
NOTICE OF LICENSE
|
18 |
-
*
|
19 |
This source file is subject to the Open Software License (OSL 3.0)
|
20 |
that is bundled with this package in the file LICENSE.txt.
|
21 |
It is also available through the world-wide-web at this URL:
|
@@ -23,12 +23,12 @@ http://opensource.org/licenses/osl-3.0.php
|
|
23 |
If you did not receive a copy of the license and are unable to
|
24 |
obtain it through the world-wide-web, please send an email
|
25 |
to license@magentocommerce.com so we can send you a copy immediately.
|
26 |
-
*
|
27 |
@category Cardconnect
|
28 |
@package Cardconnect_Ccgateway
|
29 |
@copyright Copyright (c) 2014 CardConnect (http://www.cardconnect.com)
|
30 |
@license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
31 |
-
*/
|
32 |
|
33 |
|
34 |
require_once 'Mage/Adminhtml/controllers/Sales/OrderController.php';
|
@@ -65,12 +65,22 @@ class Cardconnect_Ccgateway_Adminhtml_Sales_OrderController extends Mage_Adminht
|
|
65 |
// Checking if payment method is CardConnect then void service will call.
|
66 |
$payment_method_code = $order->getPayment()->getMethodInstance()->getCode();
|
67 |
if ($payment_method_code == "ccgateway") {
|
68 |
-
Mage::getModel('ccgateway/standard')->voidService($order);
|
69 |
-
|
70 |
-
|
71 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
72 |
$this->__('The order has been cancelled.')
|
73 |
-
|
|
|
74 |
}else{
|
75 |
$this->_getSession()->addError($this->__('Order is already invoiced. Cancel is not allowed on invoiced order.'));
|
76 |
Mage::log("Unable to perform full void. Order is already Captured, full void is not allowed on after capture.");
|
13 |
* */
|
14 |
/**
|
15 |
Magento
|
16 |
+
*
|
17 |
NOTICE OF LICENSE
|
18 |
+
*
|
19 |
This source file is subject to the Open Software License (OSL 3.0)
|
20 |
that is bundled with this package in the file LICENSE.txt.
|
21 |
It is also available through the world-wide-web at this URL:
|
23 |
If you did not receive a copy of the license and are unable to
|
24 |
obtain it through the world-wide-web, please send an email
|
25 |
to license@magentocommerce.com so we can send you a copy immediately.
|
26 |
+
*
|
27 |
@category Cardconnect
|
28 |
@package Cardconnect_Ccgateway
|
29 |
@copyright Copyright (c) 2014 CardConnect (http://www.cardconnect.com)
|
30 |
@license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
31 |
+
*/
|
32 |
|
33 |
|
34 |
require_once 'Mage/Adminhtml/controllers/Sales/OrderController.php';
|
65 |
// Checking if payment method is CardConnect then void service will call.
|
66 |
$payment_method_code = $order->getPayment()->getMethodInstance()->getCode();
|
67 |
if ($payment_method_code == "ccgateway") {
|
68 |
+
$voidResponse = Mage::getModel('ccgateway/standard')->voidService($order);
|
69 |
+
if($voidResponse['respcode'] == '00' ){
|
70 |
+
$order->cancel()->save();
|
71 |
+
$this->_getSession()->addSuccess(
|
72 |
+
$this->__('The order has been cancelled.')
|
73 |
+
);
|
74 |
+
}else{
|
75 |
+
$myLogMessage = "CC Void : ". __FILE__ . " @ " . __LINE__ ." ".$voidResponse['respcode']." => ".$voidResponse['resptext'];
|
76 |
+
Mage::log($myLogMessage, Zend_Log::ERR , "cc.log" );
|
77 |
+
}
|
78 |
+
}else{
|
79 |
+
$order->cancel()->save();
|
80 |
+
$this->_getSession()->addSuccess(
|
81 |
$this->__('The order has been cancelled.')
|
82 |
+
);
|
83 |
+
}
|
84 |
}else{
|
85 |
$this->_getSession()->addError($this->__('Order is already invoiced. Cancel is not allowed on invoiced order.'));
|
86 |
Mage::log("Unable to perform full void. Order is already Captured, full void is not allowed on after capture.");
|
app/code/community/Cardconnect/Ccgateway/controllers/PaymentController.php
CHANGED
@@ -13,22 +13,22 @@
|
|
13 |
* */
|
14 |
|
15 |
/**
|
16 |
-
|
17 |
*
|
18 |
-
|
19 |
*
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
*
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
*/
|
33 |
class Cardconnect_Ccgateway_PaymentController extends Mage_Core_Controller_Front_Action {
|
34 |
|
@@ -70,16 +70,16 @@ class Cardconnect_Ccgateway_PaymentController extends Mage_Core_Controller_Front
|
|
70 |
|
71 |
if ($checkoutType == "tokenized_post") {
|
72 |
$response = Mage::getModel('ccgateway/standard')->authService($order);
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
} else {
|
84 |
$this->loadLayout();
|
85 |
$this->renderLayout();
|
@@ -100,8 +100,8 @@ class Cardconnect_Ccgateway_PaymentController extends Mage_Core_Controller_Front
|
|
100 |
$session = $this->_getCheckout();
|
101 |
$order = Mage::getModel('sales/order');
|
102 |
$order->loadByIncrementId($session->getLastRealOrderId());
|
103 |
-
|
104 |
-
|
105 |
if ($this->getRequest()->isPost()) {
|
106 |
$post = $this->getRequest()->getPost();
|
107 |
|
@@ -111,7 +111,7 @@ class Cardconnect_Ccgateway_PaymentController extends Mage_Core_Controller_Front
|
|
111 |
$avsResp = $post['avsResp'];
|
112 |
$cvvResp = $post['cvvResp'];
|
113 |
$retref = $post['retref'];
|
114 |
-
|
115 |
|
116 |
/* Handling Hosted Payment Page API Response */
|
117 |
$data = array('CC_ACTION' => $cc_action, /* Checkout Transaction Type */
|
@@ -135,9 +135,9 @@ class Cardconnect_Ccgateway_PaymentController extends Mage_Core_Controller_Front
|
|
135 |
$avsResp = @$response['avsresp'];
|
136 |
$cvvResp = @$response['cvvresp'];
|
137 |
$retref = $response['retref'];
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
/* Handling Tokenize Post API Response */
|
142 |
$data = array('CC_ACTION' => $cc_action, /* Checkout Transaction Type */
|
143 |
'CC_RETREF' => "$retref", /* Retrieval Reference Number */
|
@@ -183,29 +183,31 @@ class Cardconnect_Ccgateway_PaymentController extends Mage_Core_Controller_Front
|
|
183 |
|
184 |
|
185 |
if (($statAVS && $statCVV) == false) {
|
186 |
-
$this->responseCancel($errorStat);
|
187 |
$this->saveResponseData2ccgateway($data);
|
188 |
-
|
189 |
-
$
|
190 |
-
|
|
|
|
|
|
|
191 |
} else {
|
192 |
-
$this->responseSuccess($orderId);
|
193 |
$this->saveResponseData2ccgateway($data);
|
|
|
194 |
// Set custom order status
|
195 |
-
$order->setState(Mage_Sales_Model_Order::
|
196 |
}
|
197 |
} elseif ($errorCode == 02) {
|
198 |
$errorStat = $response['respproc'] . $response['respcode'];
|
199 |
$this->responseCancel($errorStat);
|
200 |
$this->saveResponseData2ccgateway($data);
|
201 |
// Set custom order status
|
202 |
-
$order->setState(Mage_Sales_Model_Order::
|
203 |
} else {
|
204 |
$errorStat = $response['respproc'] . $response['respcode'];
|
205 |
$this->responseCancel(@$errorStat);
|
206 |
$this->saveResponseData2ccgateway($data);
|
207 |
// Set custom order status
|
208 |
-
$order->setState(Mage_Sales_Model_Order::
|
209 |
}
|
210 |
}
|
211 |
|
@@ -213,8 +215,8 @@ class Cardconnect_Ccgateway_PaymentController extends Mage_Core_Controller_Front
|
|
213 |
protected function saveResponseData2ccgateway($data) {
|
214 |
|
215 |
$collection = Mage::getModel('cardconnect_ccgateway/cardconnect_resp')->getCollection()
|
216 |
-
|
217 |
-
|
218 |
|
219 |
if ($collection->count() == 0) {
|
220 |
$model = Mage::getModel('cardconnect_ccgateway/cardconnect_resp')->setData($data);
|
@@ -232,13 +234,12 @@ class Cardconnect_Ccgateway_PaymentController extends Mage_Core_Controller_Front
|
|
232 |
|
233 |
$order->sendNewOrderEmail();
|
234 |
$order->setEmailSent(true);
|
235 |
-
$order->save();
|
236 |
|
237 |
try {
|
238 |
|
239 |
$session = Mage::getSingleton('checkout/session');
|
240 |
$session->setQuoteId($session->getCcgatewayQuoteId());
|
241 |
-
$order->setState(Mage_Sales_Model_Order::
|
242 |
$order->save();
|
243 |
Mage::getSingleton('checkout/session')->getQuote()->setIsActive(false)->save();
|
244 |
$this->_redirect('checkout/onepage/success', array('_secure'=>true));
|
@@ -284,8 +285,8 @@ class Cardconnect_Ccgateway_PaymentController extends Mage_Core_Controller_Front
|
|
284 |
}
|
285 |
|
286 |
// Set custom order status
|
287 |
-
$order->setState(Mage_Sales_Model_Order::
|
288 |
-
|
289 |
$this->_redirect('checkout/cart');
|
290 |
}
|
291 |
|
@@ -309,9 +310,9 @@ class Cardconnect_Ccgateway_PaymentController extends Mage_Core_Controller_Front
|
|
309 |
$json = json_encode($response);
|
310 |
|
311 |
$this->getResponse()
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
}
|
316 |
|
317 |
// Function for call Get Profile Webservices Edit Card Data
|
@@ -323,9 +324,9 @@ class Cardconnect_Ccgateway_PaymentController extends Mage_Core_Controller_Front
|
|
323 |
$json = json_encode($response);
|
324 |
|
325 |
$this->getResponse()
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
}
|
330 |
|
331 |
}
|
13 |
* */
|
14 |
|
15 |
/**
|
16 |
+
Magento
|
17 |
*
|
18 |
+
NOTICE OF LICENSE
|
19 |
*
|
20 |
+
This source file is subject to the Open Software License (OSL 3.0)
|
21 |
+
that is bundled with this package in the file LICENSE.txt.
|
22 |
+
It is also available through the world-wide-web at this URL:
|
23 |
+
http://opensource.org/licenses/osl-3.0.php
|
24 |
+
If you did not receive a copy of the license and are unable to
|
25 |
+
obtain it through the world-wide-web, please send an email
|
26 |
+
to license@magentocommerce.com so we can send you a copy immediately.
|
27 |
*
|
28 |
+
@category Cardconnect
|
29 |
+
@package Cardconnect_Ccgateway
|
30 |
+
@copyright Copyright (c) 2014 CardConnect (http://www.cardconnect.com)
|
31 |
+
@license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
32 |
*/
|
33 |
class Cardconnect_Ccgateway_PaymentController extends Mage_Core_Controller_Front_Action {
|
34 |
|
70 |
|
71 |
if ($checkoutType == "tokenized_post") {
|
72 |
$response = Mage::getModel('ccgateway/standard')->authService($order);
|
73 |
+
|
74 |
+
if($response['resptext']=="CardConnect_Error"){
|
75 |
+
$errorMsg = "We are unable to perform the requested action, please contact customer service.";
|
76 |
+
$session = $this->_getCheckout();
|
77 |
+
$session->addError(Mage::helper('ccgateway')->__($errorMsg));
|
78 |
+
$this->_redirect('checkout/cart');
|
79 |
+
}else{
|
80 |
+
$this->responseAction($response);
|
81 |
+
}
|
82 |
+
|
83 |
} else {
|
84 |
$this->loadLayout();
|
85 |
$this->renderLayout();
|
100 |
$session = $this->_getCheckout();
|
101 |
$order = Mage::getModel('sales/order');
|
102 |
$order->loadByIncrementId($session->getLastRealOrderId());
|
103 |
+
$ccToken = "";
|
104 |
+
|
105 |
if ($this->getRequest()->isPost()) {
|
106 |
$post = $this->getRequest()->getPost();
|
107 |
|
111 |
$avsResp = $post['avsResp'];
|
112 |
$cvvResp = $post['cvvResp'];
|
113 |
$retref = $post['retref'];
|
114 |
+
|
115 |
|
116 |
/* Handling Hosted Payment Page API Response */
|
117 |
$data = array('CC_ACTION' => $cc_action, /* Checkout Transaction Type */
|
135 |
$avsResp = @$response['avsresp'];
|
136 |
$cvvResp = @$response['cvvresp'];
|
137 |
$retref = $response['retref'];
|
138 |
+
|
139 |
+
|
140 |
+
|
141 |
/* Handling Tokenize Post API Response */
|
142 |
$data = array('CC_ACTION' => $cc_action, /* Checkout Transaction Type */
|
143 |
'CC_RETREF' => "$retref", /* Retrieval Reference Number */
|
183 |
|
184 |
|
185 |
if (($statAVS && $statCVV) == false) {
|
|
|
186 |
$this->saveResponseData2ccgateway($data);
|
187 |
+
$voidResponse = Mage::getModel('ccgateway/standard')->voidService($order);
|
188 |
+
if($voidResponse['respcode'] == '00' ){
|
189 |
+
$this->responseCancel($errorStat);
|
190 |
+
// Set custom order status
|
191 |
+
$order->setState(Mage_Sales_Model_Order::STATE_CANCELED, 'cardconnect_reject', $errorDesc)->save();
|
192 |
+
}
|
193 |
} else {
|
|
|
194 |
$this->saveResponseData2ccgateway($data);
|
195 |
+
$this->responseSuccess($orderId);
|
196 |
// Set custom order status
|
197 |
+
$order->setState(Mage_Sales_Model_Order::STATE_PROCESSING, 'cardconnect_processing', $errorDesc)->save();
|
198 |
}
|
199 |
} elseif ($errorCode == 02) {
|
200 |
$errorStat = $response['respproc'] . $response['respcode'];
|
201 |
$this->responseCancel($errorStat);
|
202 |
$this->saveResponseData2ccgateway($data);
|
203 |
// Set custom order status
|
204 |
+
$order->setState(Mage_Sales_Model_Order::STATE_CANCELED, 'cardconnect_reject', $errorDesc)->save();
|
205 |
} else {
|
206 |
$errorStat = $response['respproc'] . $response['respcode'];
|
207 |
$this->responseCancel(@$errorStat);
|
208 |
$this->saveResponseData2ccgateway($data);
|
209 |
// Set custom order status
|
210 |
+
$order->setState(Mage_Sales_Model_Order::STATE_CANCELED, 'cardconnect_reject', $errorDesc)->save();
|
211 |
}
|
212 |
}
|
213 |
|
215 |
protected function saveResponseData2ccgateway($data) {
|
216 |
|
217 |
$collection = Mage::getModel('cardconnect_ccgateway/cardconnect_resp')->getCollection()
|
218 |
+
->addFieldToFilter('CC_ORDERID', array('eq' => $data['CC_ORDERID']))
|
219 |
+
->addFieldToSelect('CC_ACTION');
|
220 |
|
221 |
if ($collection->count() == 0) {
|
222 |
$model = Mage::getModel('cardconnect_ccgateway/cardconnect_resp')->setData($data);
|
234 |
|
235 |
$order->sendNewOrderEmail();
|
236 |
$order->setEmailSent(true);
|
|
|
237 |
|
238 |
try {
|
239 |
|
240 |
$session = Mage::getSingleton('checkout/session');
|
241 |
$session->setQuoteId($session->getCcgatewayQuoteId());
|
242 |
+
$order->setState(Mage_Sales_Model_Order::STATE_PROCESSING, 'cardconnect_processing', "Successfully order placed via CardConnect.");
|
243 |
$order->save();
|
244 |
Mage::getSingleton('checkout/session')->getQuote()->setIsActive(false)->save();
|
245 |
$this->_redirect('checkout/onepage/success', array('_secure'=>true));
|
285 |
}
|
286 |
|
287 |
// Set custom order status
|
288 |
+
$order->setState(Mage_Sales_Model_Order::STATE_CANCELED, 'cardconnect_reject', $errorMsg)->save();
|
289 |
+
|
290 |
$this->_redirect('checkout/cart');
|
291 |
}
|
292 |
|
310 |
$json = json_encode($response);
|
311 |
|
312 |
$this->getResponse()
|
313 |
+
->clearHeaders()
|
314 |
+
->setHeader('Content-Type', 'application/json')
|
315 |
+
->setBody($json);
|
316 |
}
|
317 |
|
318 |
// Function for call Get Profile Webservices Edit Card Data
|
324 |
$json = json_encode($response);
|
325 |
|
326 |
$this->getResponse()
|
327 |
+
->clearHeaders()
|
328 |
+
->setHeader('Content-Type', 'application/json')
|
329 |
+
->setBody($json);
|
330 |
}
|
331 |
|
332 |
}
|
app/code/community/Cardconnect/Ccgateway/etc/config.xml
CHANGED
@@ -128,7 +128,118 @@ to license@magentocommerce.com so we can send you a copy immediately.
|
|
128 |
</observers>
|
129 |
</controller_action_postdispatch_checkout_onepage_savePayment>
|
130 |
</events>
|
131 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
132 |
<default>
|
133 |
<payment>
|
134 |
<ccgateway>
|
128 |
</observers>
|
129 |
</controller_action_postdispatch_checkout_onepage_savePayment>
|
130 |
</events>
|
131 |
+
|
132 |
+
<sales>
|
133 |
+
<order>
|
134 |
+
<statuses>
|
135 |
+
<cardconnect_processing>
|
136 |
+
<label>CardConnect Processing</label>
|
137 |
+
<description>CardConnect Processing</description>
|
138 |
+
</cardconnect_processing>
|
139 |
+
</statuses>
|
140 |
+
<states>
|
141 |
+
<cardconnect_processing>
|
142 |
+
<statuses>
|
143 |
+
<cardconnect_processing/>
|
144 |
+
</statuses>
|
145 |
+
<visible_on_front>1</visible_on_front>
|
146 |
+
</cardconnect_processing>
|
147 |
+
<processing>
|
148 |
+
<statuses>
|
149 |
+
<cardconnect_processing/>
|
150 |
+
</statuses>
|
151 |
+
<visible_on_front>1</visible_on_front>
|
152 |
+
</processing>
|
153 |
+
</states>
|
154 |
+
|
155 |
+
<statuses>
|
156 |
+
<cardconnect_capture>
|
157 |
+
<label>CardConnect Capture</label>
|
158 |
+
<description>CardConnect Capture</description>
|
159 |
+
</cardconnect_capture>
|
160 |
+
</statuses>
|
161 |
+
<states>
|
162 |
+
<cardconnect_capture>
|
163 |
+
<statuses>
|
164 |
+
<cardconnect_capture/>
|
165 |
+
</statuses>
|
166 |
+
<visible_on_front>1</visible_on_front>
|
167 |
+
</cardconnect_capture>
|
168 |
+
<pending_payment>
|
169 |
+
<statuses>
|
170 |
+
<cardconnect_capture/>
|
171 |
+
</statuses>
|
172 |
+
<visible_on_front>1</visible_on_front>
|
173 |
+
</pending_payment>
|
174 |
+
</states>
|
175 |
+
|
176 |
+
<statuses>
|
177 |
+
<cardconnect_void>
|
178 |
+
<label>CardConnect Void</label>
|
179 |
+
<description>CardConnect Void</description>
|
180 |
+
</cardconnect_void>
|
181 |
+
</statuses>
|
182 |
+
<states>
|
183 |
+
<cardconnect_void>
|
184 |
+
<statuses>
|
185 |
+
<cardconnect_void/>
|
186 |
+
</statuses>
|
187 |
+
<visible_on_front>1</visible_on_front>
|
188 |
+
</cardconnect_void>
|
189 |
+
<canceled>
|
190 |
+
<statuses>
|
191 |
+
<cardconnect_void/>
|
192 |
+
</statuses>
|
193 |
+
<visible_on_front>1</visible_on_front>
|
194 |
+
</canceled>
|
195 |
+
</states>
|
196 |
+
|
197 |
+
<statuses>
|
198 |
+
<cardconnect_reject>
|
199 |
+
<label>CardConnect Rejected</label>
|
200 |
+
<description>CardConnect Rejected</description>
|
201 |
+
</cardconnect_reject>
|
202 |
+
</statuses>
|
203 |
+
<states>
|
204 |
+
<cardconnect_reject>
|
205 |
+
<statuses>
|
206 |
+
<cardconnect_reject/>
|
207 |
+
</statuses>
|
208 |
+
<visible_on_front>1</visible_on_front>
|
209 |
+
</cardconnect_reject>
|
210 |
+
<canceled>
|
211 |
+
<statuses>
|
212 |
+
<cardconnect_reject/>
|
213 |
+
</statuses>
|
214 |
+
<visible_on_front>1</visible_on_front>
|
215 |
+
</canceled>
|
216 |
+
</states>
|
217 |
+
|
218 |
+
<statuses>
|
219 |
+
<cardconnect_txn_settled>
|
220 |
+
<label>CardConnect Txn Settled</label>
|
221 |
+
<description>CardConnect Txn Settled</description>
|
222 |
+
</cardconnect_txn_settled>
|
223 |
+
</statuses>
|
224 |
+
<states>
|
225 |
+
<cardconnect_txn_settled>
|
226 |
+
<statuses>
|
227 |
+
<cardconnect_txn_settled/>
|
228 |
+
</statuses>
|
229 |
+
<visible_on_front>1</visible_on_front>
|
230 |
+
</cardconnect_txn_settled>
|
231 |
+
<complete>
|
232 |
+
<statuses>
|
233 |
+
<cardconnect_txn_settled/>
|
234 |
+
</statuses>
|
235 |
+
<visible_on_front>1</visible_on_front>
|
236 |
+
</complete>
|
237 |
+
</states>
|
238 |
+
|
239 |
+
</order>
|
240 |
+
</sales>
|
241 |
+
|
242 |
+
</global>
|
243 |
<default>
|
244 |
<payment>
|
245 |
<ccgateway>
|
app/code/community/Cardconnect/Ccgateway/sql/cardconnect_ccgateway_setup/install-1.0.0.php
CHANGED
@@ -12,22 +12,22 @@
|
|
12 |
*
|
13 |
* */
|
14 |
/**
|
15 |
-
|
16 |
*
|
17 |
-
|
18 |
*
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
*
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
*/
|
32 |
$installer = $this;
|
33 |
$installer->startSetup();
|
@@ -63,7 +63,7 @@ CREATE INDEX CC_RETREF_INDEX ON {$this->getTable('cardconnect_resp')} ( CC_RE
|
|
63 |
// Set custom order status in sales_order_status table
|
64 |
|
65 |
$statusTable = $installer->getTable('sales/order_status');
|
66 |
-
|
67 |
|
68 |
|
69 |
// Delete if order status exist
|
@@ -78,19 +78,38 @@ delete from ' . $statusTable . ' where status = "cardconnect_processing";
|
|
78 |
|
79 |
// Insert status
|
80 |
$installer->getConnection()->insertArray(
|
81 |
-
|
82 |
'status',
|
83 |
'label'
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
91 |
)
|
|
|
92 |
);
|
93 |
|
|
|
94 |
$installer->run("
|
95 |
DROP TABLE IF EXISTS {$this->getTable('cardconnect_wallet')};
|
96 |
CREATE TABLE {$this->getTable('cardconnect_wallet')} (
|
12 |
*
|
13 |
* */
|
14 |
/**
|
15 |
+
Magento
|
16 |
*
|
17 |
+
NOTICE OF LICENSE
|
18 |
*
|
19 |
+
This source file is subject to the Open Software License (OSL 3.0)
|
20 |
+
that is bundled with this package in the file LICENSE.txt.
|
21 |
+
It is also available through the world-wide-web at this URL:
|
22 |
+
http://opensource.org/licenses/osl-3.0.php
|
23 |
+
If you did not receive a copy of the license and are unable to
|
24 |
+
obtain it through the world-wide-web, please send an email
|
25 |
+
to license@magentocommerce.com so we can send you a copy immediately.
|
26 |
*
|
27 |
+
@category Cardconnect
|
28 |
+
@package Cardconnect_Ccgateway
|
29 |
+
@copyright Copyright (c) 2014 CardConnect (http://www.cardconnect.com)
|
30 |
+
@license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
31 |
*/
|
32 |
$installer = $this;
|
33 |
$installer->startSetup();
|
63 |
// Set custom order status in sales_order_status table
|
64 |
|
65 |
$statusTable = $installer->getTable('sales/order_status');
|
66 |
+
$statusStateTable = $installer->getTable('sales/order_status_state');
|
67 |
|
68 |
|
69 |
// Delete if order status exist
|
78 |
|
79 |
// Insert status
|
80 |
$installer->getConnection()->insertArray(
|
81 |
+
$statusTable, array(
|
82 |
'status',
|
83 |
'label'
|
84 |
+
), array(
|
85 |
+
array('status' => 'cardconnect_capture', 'label' => 'CardConnect Capture'),
|
86 |
+
array('status' => 'cardconnect_void', 'label' => 'CardConnect Void'),
|
87 |
+
array('status' => 'cardconnect_refund', 'label' => 'CardConnect Refund'),
|
88 |
+
array('status' => 'cardconnect_reject', 'label' => 'CardConnect Rejected'),
|
89 |
+
array('status' => 'cardconnect_txn_settled', 'label' => 'CardConnect Txn Settled'),
|
90 |
+
array('status' => 'cardconnect_processing', 'label' => 'CardConnect Processing')
|
91 |
+
)
|
92 |
+
);
|
93 |
+
|
94 |
+
|
95 |
+
// Insert states and mapping of statuses to states
|
96 |
+
$installer->getConnection()->insertArray(
|
97 |
+
$statusStateTable,
|
98 |
+
array(
|
99 |
+
'status',
|
100 |
+
'state',
|
101 |
+
'is_default'
|
102 |
+
),
|
103 |
+
array(
|
104 |
+
array(
|
105 |
+
'status' => 'cardconnect_refund',
|
106 |
+
'state' => 'refunded',
|
107 |
+
'is_default' => 1
|
108 |
)
|
109 |
+
)
|
110 |
);
|
111 |
|
112 |
+
|
113 |
$installer->run("
|
114 |
DROP TABLE IF EXISTS {$this->getTable('cardconnect_wallet')};
|
115 |
CREATE TABLE {$this->getTable('cardconnect_wallet')} (
|
app/design/frontend/base/default/template/ccgateway/cardmanagement/editcard.phtml
CHANGED
@@ -38,7 +38,7 @@
|
|
38 |
var requestUrl = "<?php echo Mage::getUrl('ccgateway/payment/getprofiledataedit',array('_secure'=>true)); ?>";
|
39 |
var profile = "<?php echo $this->getRequest()->getParam('pid'); ?>";
|
40 |
var cid = "<?php echo $this->getRequest()->getParam('cardid'); ?>";
|
41 |
-
|
42 |
new Ajax.Request(requestUrl, {
|
43 |
onCreate : startLoading,
|
44 |
method: 'Post',
|
@@ -47,7 +47,7 @@
|
|
47 |
onComplete: function (transport) {
|
48 |
response = transport.responseText.evalJSON();
|
49 |
//alert(response.toSource());
|
50 |
-
|
51 |
if(response[0].resptext == "CardConnect_Error"){
|
52 |
alert("We are unable to perform the requested action, please contact customer service.");
|
53 |
}else{
|
@@ -75,7 +75,7 @@
|
|
75 |
document.getElementById("_cc_region").value = response[0].region;
|
76 |
document.getElementById("_cc_country").value = response[0].country;
|
77 |
document.getElementById("_cc_postcode").value = response[0].postal;
|
78 |
-
document.getElementById("_cc_telephone").value = response[0].phone;
|
79 |
}
|
80 |
|
81 |
|
@@ -89,24 +89,6 @@
|
|
89 |
});
|
90 |
|
91 |
|
92 |
-
var loaded = false;
|
93 |
-
function startLoading() {
|
94 |
-
loaded = false;
|
95 |
-
window.setTimeout('showLoadingImage()', 1000);
|
96 |
-
}
|
97 |
-
|
98 |
-
function showLoadingImage() {
|
99 |
-
var el = document.getElementById("loading_box");
|
100 |
-
if (el && !loaded) {
|
101 |
-
el.innerHTML = '<img src="<?php echo $this->getSkinUrl('images/opc-ajax-loader.gif'); ?>" alt="Loading...">';
|
102 |
-
new Effect.Appear('loading_box');
|
103 |
-
}
|
104 |
-
}
|
105 |
-
|
106 |
-
function stopLoading() {
|
107 |
-
Element.hide('fade');
|
108 |
-
loaded = true;
|
109 |
-
}
|
110 |
|
111 |
function removeCardNumber(){
|
112 |
document.getElementById("ccgateway_cc_number").value = "";
|
@@ -115,16 +97,16 @@
|
|
115 |
}
|
116 |
</script>
|
117 |
<style>
|
118 |
-
#fade{ width:100%; height:100%; background:rgba(0,0,0,0.1); position:fixed; top:0px; left:0px;}
|
119 |
-
.loader{position:absolute; top:80%; left:50%;}
|
120 |
</style>
|
121 |
|
122 |
<div class="page-title title-buttons">
|
123 |
<h1 onclick="getAlert();"><?php echo $this->__('Edit Card Form') ?></h1>
|
124 |
<button type="button" title="<?php echo $this->__('Go Back') ?>" class="button" onclick="window.location = '<?php echo $this->getUrl('customer/cardmanagement/') ?>';"><span><span><?php echo $this->__('Go Back') ?></span></span></button>
|
125 |
</div>
|
126 |
-
<div id="fade">
|
127 |
-
<div id="loading_box" class="loader"></div>
|
128 |
</div>
|
129 |
|
130 |
<fieldset class="form-list">
|
@@ -157,17 +139,17 @@
|
|
157 |
<option value=""><?php echo $this->__('--Please Select--') ?></option>
|
158 |
<?php $_ccType = $this->getInfoData('cc_type'); ?>
|
159 |
<?php foreach ($this->getCcTypes() as $ccType): ?>
|
160 |
-
<option value="<?php echo $ccType['value']; ?>" ><?php echo $ccType['label']; ?></option>
|
161 |
<?php endforeach ?>
|
162 |
-
</select>
|
163 |
-
|
164 |
</div>
|
165 |
</li>
|
166 |
|
167 |
<li>
|
168 |
<label for="<?php echo $_code ?>_cc_number" class="required"><em>*</em><?php echo $this->__('Credit Card Number') ?></label>
|
169 |
<div class="input-box">
|
170 |
-
|
171 |
<input type="text" onblur="valid_credit_card(value, '<?php echo $isTestMode; ?>')" onkeypress="javascript:return validate(event, 'ccgateway_cc_number_org');
|
172 |
blockNonNumbers(this, event, false, false)" id="ccgateway_cc_number_org" name="editcard[cc_number_org]" title="<?php echo $this->__('Credit Card Number') ?>" maxlength="16" class="input-text required-entry" value="" required />
|
173 |
<input type="hidden" id="ccgateway_cc_number" name="editcard[cc_number]" title="<?php echo $this->__('Credit Card Number') ?>" class="input-text" value="" required />
|
@@ -218,7 +200,7 @@
|
|
218 |
|
219 |
<label for="<?php echo $_code ?>_cc_region" class="required"><em>*</em><?php echo $this->__('State/Province') ?></label>
|
220 |
<div class="input-box">
|
221 |
-
<?php $regionCollection = Mage::getModel('directory/region_api')->items("US"); ?>
|
222 |
<select name='editcard[cc_region]' id='<?php echo $_code ?>_cc_region' required>
|
223 |
<option>Please select region, state or province</option>
|
224 |
<?php
|
38 |
var requestUrl = "<?php echo Mage::getUrl('ccgateway/payment/getprofiledataedit',array('_secure'=>true)); ?>";
|
39 |
var profile = "<?php echo $this->getRequest()->getParam('pid'); ?>";
|
40 |
var cid = "<?php echo $this->getRequest()->getParam('cardid'); ?>";
|
41 |
+
|
42 |
new Ajax.Request(requestUrl, {
|
43 |
onCreate : startLoading,
|
44 |
method: 'Post',
|
47 |
onComplete: function (transport) {
|
48 |
response = transport.responseText.evalJSON();
|
49 |
//alert(response.toSource());
|
50 |
+
|
51 |
if(response[0].resptext == "CardConnect_Error"){
|
52 |
alert("We are unable to perform the requested action, please contact customer service.");
|
53 |
}else{
|
75 |
document.getElementById("_cc_region").value = response[0].region;
|
76 |
document.getElementById("_cc_country").value = response[0].country;
|
77 |
document.getElementById("_cc_postcode").value = response[0].postal;
|
78 |
+
document.getElementById("_cc_telephone").value = response[0].phone;
|
79 |
}
|
80 |
|
81 |
|
89 |
});
|
90 |
|
91 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
92 |
|
93 |
function removeCardNumber(){
|
94 |
document.getElementById("ccgateway_cc_number").value = "";
|
97 |
}
|
98 |
</script>
|
99 |
<style>
|
100 |
+
#fade{ width:100%; height:100%; background:rgba(0,0,0,0.1); position:fixed; top:0px; left:0px;}
|
101 |
+
.loader{position:absolute; top:80%; left:50%;}
|
102 |
</style>
|
103 |
|
104 |
<div class="page-title title-buttons">
|
105 |
<h1 onclick="getAlert();"><?php echo $this->__('Edit Card Form') ?></h1>
|
106 |
<button type="button" title="<?php echo $this->__('Go Back') ?>" class="button" onclick="window.location = '<?php echo $this->getUrl('customer/cardmanagement/') ?>';"><span><span><?php echo $this->__('Go Back') ?></span></span></button>
|
107 |
</div>
|
108 |
+
<div id="fade" style="display:none;">
|
109 |
+
<div id="loading_box" class="loader"></div>
|
110 |
</div>
|
111 |
|
112 |
<fieldset class="form-list">
|
139 |
<option value=""><?php echo $this->__('--Please Select--') ?></option>
|
140 |
<?php $_ccType = $this->getInfoData('cc_type'); ?>
|
141 |
<?php foreach ($this->getCcTypes() as $ccType): ?>
|
142 |
+
<option value="<?php echo $ccType['value']; ?>" ><?php echo $ccType['label']; ?></option>
|
143 |
<?php endforeach ?>
|
144 |
+
</select>
|
145 |
+
|
146 |
</div>
|
147 |
</li>
|
148 |
|
149 |
<li>
|
150 |
<label for="<?php echo $_code ?>_cc_number" class="required"><em>*</em><?php echo $this->__('Credit Card Number') ?></label>
|
151 |
<div class="input-box">
|
152 |
+
|
153 |
<input type="text" onblur="valid_credit_card(value, '<?php echo $isTestMode; ?>')" onkeypress="javascript:return validate(event, 'ccgateway_cc_number_org');
|
154 |
blockNonNumbers(this, event, false, false)" id="ccgateway_cc_number_org" name="editcard[cc_number_org]" title="<?php echo $this->__('Credit Card Number') ?>" maxlength="16" class="input-text required-entry" value="" required />
|
155 |
<input type="hidden" id="ccgateway_cc_number" name="editcard[cc_number]" title="<?php echo $this->__('Credit Card Number') ?>" class="input-text" value="" required />
|
200 |
|
201 |
<label for="<?php echo $_code ?>_cc_region" class="required"><em>*</em><?php echo $this->__('State/Province') ?></label>
|
202 |
<div class="input-box">
|
203 |
+
<?php $regionCollection = Mage::getModel('directory/region_api')->items("US"); ?>
|
204 |
<select name='editcard[cc_region]' id='<?php echo $_code ?>_cc_region' required>
|
205 |
<option>Please select region, state or province</option>
|
206 |
<?php
|
app/design/frontend/base/default/template/ccgateway/cardmanagement/index.phtml
CHANGED
@@ -38,25 +38,25 @@
|
|
38 |
#t_content_row{
|
39 |
text-align: left;
|
40 |
}
|
41 |
-
#t_content_row td{
|
42 |
padding-left: 10px;
|
43 |
}
|
44 |
#text_link{
|
45 |
color:#3399CC;
|
46 |
cursor: pointer;
|
47 |
}
|
48 |
-
#text_link:hover{
|
49 |
text-decoration: underline;
|
50 |
}
|
51 |
-
|
52 |
#fade{ width:100%; height:100%; background:rgba(0,0,0,0.1); position:fixed; top:0px; left:0px; display:none;}
|
53 |
-
.loader{position:absolute; top:80%; left:50%;}
|
54 |
</style>
|
55 |
|
56 |
|
57 |
<script>
|
58 |
function makeDefaultPayment(defaultId, value, id) {
|
59 |
-
|
60 |
var loadurl = '<?php echo Mage::getUrl('ccgateway/cardmanagement/makedefaultpayment',array('_secure'=>true)); ?>';
|
61 |
//Element.show('loadingmask');
|
62 |
new Ajax.Request(loadurl, {
|
@@ -72,22 +72,22 @@
|
|
72 |
});
|
73 |
}
|
74 |
|
75 |
-
|
76 |
-
|
77 |
function confirm_del(delId) {
|
78 |
|
79 |
var loc = document.getElementById('cardListGrid');
|
80 |
var conf = confirm("Are you sure to delete this?");
|
81 |
if (conf == true) {
|
82 |
var loadurl = '<?php echo Mage::getUrl('ccgateway/cardmanagement/deletewallet',array('_secure'=>true)); ?>';
|
83 |
-
|
84 |
new Ajax.Request(loadurl, {
|
85 |
onCreate : startLoading,
|
86 |
method: 'post',
|
87 |
parameters: "cc_id=" + delId,
|
88 |
onComplete: function (transport) {
|
89 |
alert(transport.responseText); //return false;
|
90 |
-
stopLoading();
|
91 |
document.getElementById('success-msg').style.display = "";
|
92 |
$('success-msg').innerHTML = transport.responseText;
|
93 |
window.location.reload();
|
@@ -109,19 +109,19 @@
|
|
109 |
document.getElementById('fade').style.display ="block";
|
110 |
var el = document.getElementById("loading_box");
|
111 |
if (el && !loaded) {
|
112 |
-
|
113 |
el.innerHTML = '<img src="<?php echo $this->getSkinUrl('images/opc-ajax-loader.gif'); ?>" alt="Loading...">';
|
114 |
new Effect.Appear('loading_box');
|
115 |
}
|
116 |
-
}
|
117 |
-
|
118 |
function stopLoading() {
|
119 |
document.getElementById('fade').style.display ="none";
|
120 |
Element.hide('loading_box');
|
121 |
loaded = true;
|
122 |
-
}
|
|
|
123 |
|
124 |
-
|
125 |
|
126 |
</script>
|
127 |
|
@@ -167,7 +167,7 @@
|
|
167 |
<td>
|
168 |
<a href="<?php echo $this->getEditUrl() . "?cardid=" . $data['CC_ID'] . "&pid=" . $data['CC_PROFILEID']; ?>">Edit</a>
|
169 |
<span id="text_link" <?php if ($data['CC_DEFAULT_CARD'] == 'Y' && count($walletProfile) !=1) { ?> style="display:none;" <?php } ?> onclick="confirm_del(<?php echo $data['CC_ID']; ?>);">Delete</span>
|
170 |
-
|
171 |
</td>
|
172 |
<td><input type="radio" name="defaultPaymentCard" id="defaultPaymentCard_<?php echo $i; ?>" onclick="javascript:makeDefaultPayment(this.id, this.value, <?php echo $data['CC_ID']; ?>);" <?php if ($data['CC_DEFAULT_CARD'] == 'Y') { ?> checked="checked" <?php } ?>value="<?php echo $data['CC_DEFAULT_CARD']; ?>" /> <?php // echo $data['CC_PROFILEID']; ?></td>
|
173 |
</tr>
|
@@ -179,7 +179,7 @@
|
|
179 |
<div>
|
180 |
<strong>No Card Found.</strong>
|
181 |
</div>
|
182 |
-
|
183 |
<?php } ?>
|
184 |
</table>
|
185 |
</div>
|
38 |
#t_content_row{
|
39 |
text-align: left;
|
40 |
}
|
41 |
+
#t_content_row td{
|
42 |
padding-left: 10px;
|
43 |
}
|
44 |
#text_link{
|
45 |
color:#3399CC;
|
46 |
cursor: pointer;
|
47 |
}
|
48 |
+
#text_link:hover{
|
49 |
text-decoration: underline;
|
50 |
}
|
51 |
+
|
52 |
#fade{ width:100%; height:100%; background:rgba(0,0,0,0.1); position:fixed; top:0px; left:0px; display:none;}
|
53 |
+
.loader{position:absolute; top:80%; left:50%;}
|
54 |
</style>
|
55 |
|
56 |
|
57 |
<script>
|
58 |
function makeDefaultPayment(defaultId, value, id) {
|
59 |
+
|
60 |
var loadurl = '<?php echo Mage::getUrl('ccgateway/cardmanagement/makedefaultpayment',array('_secure'=>true)); ?>';
|
61 |
//Element.show('loadingmask');
|
62 |
new Ajax.Request(loadurl, {
|
72 |
});
|
73 |
}
|
74 |
|
75 |
+
|
76 |
+
|
77 |
function confirm_del(delId) {
|
78 |
|
79 |
var loc = document.getElementById('cardListGrid');
|
80 |
var conf = confirm("Are you sure to delete this?");
|
81 |
if (conf == true) {
|
82 |
var loadurl = '<?php echo Mage::getUrl('ccgateway/cardmanagement/deletewallet',array('_secure'=>true)); ?>';
|
83 |
+
|
84 |
new Ajax.Request(loadurl, {
|
85 |
onCreate : startLoading,
|
86 |
method: 'post',
|
87 |
parameters: "cc_id=" + delId,
|
88 |
onComplete: function (transport) {
|
89 |
alert(transport.responseText); //return false;
|
90 |
+
stopLoading();
|
91 |
document.getElementById('success-msg').style.display = "";
|
92 |
$('success-msg').innerHTML = transport.responseText;
|
93 |
window.location.reload();
|
109 |
document.getElementById('fade').style.display ="block";
|
110 |
var el = document.getElementById("loading_box");
|
111 |
if (el && !loaded) {
|
112 |
+
|
113 |
el.innerHTML = '<img src="<?php echo $this->getSkinUrl('images/opc-ajax-loader.gif'); ?>" alt="Loading...">';
|
114 |
new Effect.Appear('loading_box');
|
115 |
}
|
116 |
+
}
|
117 |
+
|
118 |
function stopLoading() {
|
119 |
document.getElementById('fade').style.display ="none";
|
120 |
Element.hide('loading_box');
|
121 |
loaded = true;
|
122 |
+
}
|
123 |
+
|
124 |
|
|
|
125 |
|
126 |
</script>
|
127 |
|
167 |
<td>
|
168 |
<a href="<?php echo $this->getEditUrl() . "?cardid=" . $data['CC_ID'] . "&pid=" . $data['CC_PROFILEID']; ?>">Edit</a>
|
169 |
<span id="text_link" <?php if ($data['CC_DEFAULT_CARD'] == 'Y' && count($walletProfile) !=1) { ?> style="display:none;" <?php } ?> onclick="confirm_del(<?php echo $data['CC_ID']; ?>);">Delete</span>
|
170 |
+
|
171 |
</td>
|
172 |
<td><input type="radio" name="defaultPaymentCard" id="defaultPaymentCard_<?php echo $i; ?>" onclick="javascript:makeDefaultPayment(this.id, this.value, <?php echo $data['CC_ID']; ?>);" <?php if ($data['CC_DEFAULT_CARD'] == 'Y') { ?> checked="checked" <?php } ?>value="<?php echo $data['CC_DEFAULT_CARD']; ?>" /> <?php // echo $data['CC_PROFILEID']; ?></td>
|
173 |
</tr>
|
179 |
<div>
|
180 |
<strong>No Card Found.</strong>
|
181 |
</div>
|
182 |
+
|
183 |
<?php } ?>
|
184 |
</table>
|
185 |
</div>
|
app/design/frontend/base/default/template/ccgateway/cardmanagement/new.phtml
CHANGED
@@ -29,6 +29,11 @@
|
|
29 |
@license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
30 |
*/
|
31 |
?>
|
|
|
|
|
|
|
|
|
|
|
32 |
<?php
|
33 |
$_code = "ccgateway";
|
34 |
|
@@ -37,9 +42,9 @@ if(Mage::getSingleton('customer/session')->isLoggedIn()) {
|
|
37 |
$customerData = Mage::getSingleton('customer/session')->getCustomer();
|
38 |
$customerId = $customerData->getId();
|
39 |
$address = Mage::getSingleton('customer/session')->getCustomer()->getDefaultBillingAddress();
|
40 |
-
|
41 |
if($address){
|
42 |
-
$customer = Mage::getModel('customer/customer')->load($customerId);
|
43 |
$billingAddress = $customer->getDefaultBillingAddress();
|
44 |
$billingStreet = $billingAddress->getData('street');
|
45 |
$billingCity = $billingAddress->getData('city');
|
@@ -58,6 +63,10 @@ if(Mage::getSingleton('customer/session')->isLoggedIn()) {
|
|
58 |
<button type="button" title="<?php echo $this->__('Go Back') ?>" class="button" onclick="window.location = '<?php echo $this->getUrl('customer/cardmanagement/') ?>';"><span><span><?php echo $this->__('Go Back') ?></span></span></button>
|
59 |
</div>
|
60 |
|
|
|
|
|
|
|
|
|
61 |
<fieldset class="form-list">
|
62 |
<form name="addcard" method="post" action="<?php echo Mage::getUrl('ccgateway/cardmanagement/savePayment',array('_secure'=>true)); ?>">
|
63 |
<ul id="add_new_card_form_<?php echo $_code ?>" style="display:block">
|
@@ -82,11 +91,11 @@ if(Mage::getSingleton('customer/session')->isLoggedIn()) {
|
|
82 |
<select id="ccgateway_cc_type" name="addcard[cc_type]" title="<?php echo $this->__('Credit Card Type') ?>" class="required-entry validate-select" required>
|
83 |
<option value=""><?php echo $this->__('--Please Select--') ?></option>
|
84 |
<?php foreach ($this->getCcTypes() as $ccType): ?>
|
85 |
-
<option value="<?php echo $ccType['value']; ?>" ><?php echo $ccType['label'] ?></option>
|
86 |
<?php endforeach ?>
|
87 |
</select>
|
88 |
</div>
|
89 |
-
</li>
|
90 |
|
91 |
<li>
|
92 |
<label for="<?php echo $_code ?>_cc_number" class="required"><em>*</em><?php echo $this->__('Credit Card Number') ?></label>
|
@@ -97,7 +106,7 @@ if(Mage::getSingleton('customer/session')->isLoggedIn()) {
|
|
97 |
|
98 |
</div>
|
99 |
|
100 |
-
</li>
|
101 |
<li><div id="response"></div></li>
|
102 |
|
103 |
<li>
|
@@ -126,14 +135,14 @@ if(Mage::getSingleton('customer/session')->isLoggedIn()) {
|
|
126 |
|
127 |
<li>
|
128 |
<label for="<?php echo $_code ?>_cc_Billing"><strong><?php echo $this->__('Billing Information') ?></strong></label>
|
129 |
-
</li>
|
130 |
<?php if($address){ ?>
|
131 |
<li>
|
132 |
<div class="input-box">
|
133 |
<div class="v-fix">
|
134 |
<span style="margin-bottom: 10px;">
|
135 |
-
<input type="checkbox" title="<?php echo $this->__('Use default bill to address') ?>"
|
136 |
-
onclick="javascript:return showDefaultAddress('<?php echo $billingStreet; ?>', '<?php echo $billingCity; ?>', '<?php echo $billingRegion; ?>', '<?php echo $billingCountry; ?>', '<?php echo $billingPostCode; ?>', '<?php echo $billingTelephone; ?>')"
|
137 |
id="ccgateway_default_address" name="addcard[default_address]" value="" />
|
138 |
</span>
|
139 |
<label for="<?php echo $_code ?>_cc_wallet"><?php echo $this->__('Use default bill to address') ?></label>
|
@@ -161,7 +170,7 @@ if(Mage::getSingleton('customer/session')->isLoggedIn()) {
|
|
161 |
|
162 |
<label for="<?php echo $_code ?>_cc_region" class="required"><em>*</em><?php echo $this->__('State/Province') ?></label>
|
163 |
<div class="input-box">
|
164 |
-
<?php $regionCollection = Mage::getModel('directory/region_api')->items("US"); ?>
|
165 |
<select name='addcard[cc_region]' id='<?php echo $_code ?>_cc_region' class="required-entry validate-select" required>
|
166 |
<option>Please select region, state or province</option>
|
167 |
<?php
|
@@ -172,7 +181,7 @@ if(Mage::getSingleton('customer/session')->isLoggedIn()) {
|
|
172 |
}
|
173 |
?>
|
174 |
|
175 |
-
</select>
|
176 |
</div>
|
177 |
|
178 |
</li>
|
@@ -197,7 +206,7 @@ if(Mage::getSingleton('customer/session')->isLoggedIn()) {
|
|
197 |
</option>
|
198 |
<?php endforeach; ?>
|
199 |
</select>
|
200 |
-
<?php endif; ?>
|
201 |
|
202 |
</div>
|
203 |
</div>
|
@@ -222,12 +231,12 @@ if(Mage::getSingleton('customer/session')->isLoggedIn()) {
|
|
222 |
</span>
|
223 |
<label for="<?php // echo $_code ?>_cc_wallet"><?php // echo $this->__('Make this Card as default') ?></label>
|
224 |
</li>
|
225 |
-
-->
|
226 |
|
227 |
|
228 |
<button id="addcardbutton" class="button" style="margin-top: 10px;" type="submit" title="<?php echo $this->__('Add') ?>" class="button" onclick="<?php echo $this->getUrl('ccgateway/cardmanagement/savecard'); ?>"><span><span><?php echo $this->__('Add') ?></span></span></button>
|
229 |
|
230 |
-
</div>
|
231 |
|
232 |
|
233 |
<?php echo $this->getChildHtml() ?>
|
29 |
@license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
30 |
*/
|
31 |
?>
|
32 |
+
<style>
|
33 |
+
#fade{ width:100%; height:100%; background:rgba(0,0,0,0.1); position:fixed; top:0px; left:0px; display:none;}
|
34 |
+
.loader{position:absolute; top:80%; left:50%;}
|
35 |
+
</style>
|
36 |
+
|
37 |
<?php
|
38 |
$_code = "ccgateway";
|
39 |
|
42 |
$customerData = Mage::getSingleton('customer/session')->getCustomer();
|
43 |
$customerId = $customerData->getId();
|
44 |
$address = Mage::getSingleton('customer/session')->getCustomer()->getDefaultBillingAddress();
|
45 |
+
|
46 |
if($address){
|
47 |
+
$customer = Mage::getModel('customer/customer')->load($customerId);
|
48 |
$billingAddress = $customer->getDefaultBillingAddress();
|
49 |
$billingStreet = $billingAddress->getData('street');
|
50 |
$billingCity = $billingAddress->getData('city');
|
63 |
<button type="button" title="<?php echo $this->__('Go Back') ?>" class="button" onclick="window.location = '<?php echo $this->getUrl('customer/cardmanagement/') ?>';"><span><span><?php echo $this->__('Go Back') ?></span></span></button>
|
64 |
</div>
|
65 |
|
66 |
+
<div id="fade" style="display:none;">
|
67 |
+
<div id="loading_box" class="loader"></div>
|
68 |
+
</div>
|
69 |
+
|
70 |
<fieldset class="form-list">
|
71 |
<form name="addcard" method="post" action="<?php echo Mage::getUrl('ccgateway/cardmanagement/savePayment',array('_secure'=>true)); ?>">
|
72 |
<ul id="add_new_card_form_<?php echo $_code ?>" style="display:block">
|
91 |
<select id="ccgateway_cc_type" name="addcard[cc_type]" title="<?php echo $this->__('Credit Card Type') ?>" class="required-entry validate-select" required>
|
92 |
<option value=""><?php echo $this->__('--Please Select--') ?></option>
|
93 |
<?php foreach ($this->getCcTypes() as $ccType): ?>
|
94 |
+
<option value="<?php echo $ccType['value']; ?>" ><?php echo $ccType['label'] ?></option>
|
95 |
<?php endforeach ?>
|
96 |
</select>
|
97 |
</div>
|
98 |
+
</li>
|
99 |
|
100 |
<li>
|
101 |
<label for="<?php echo $_code ?>_cc_number" class="required"><em>*</em><?php echo $this->__('Credit Card Number') ?></label>
|
106 |
|
107 |
</div>
|
108 |
|
109 |
+
</li>
|
110 |
<li><div id="response"></div></li>
|
111 |
|
112 |
<li>
|
135 |
|
136 |
<li>
|
137 |
<label for="<?php echo $_code ?>_cc_Billing"><strong><?php echo $this->__('Billing Information') ?></strong></label>
|
138 |
+
</li>
|
139 |
<?php if($address){ ?>
|
140 |
<li>
|
141 |
<div class="input-box">
|
142 |
<div class="v-fix">
|
143 |
<span style="margin-bottom: 10px;">
|
144 |
+
<input type="checkbox" title="<?php echo $this->__('Use default bill to address') ?>"
|
145 |
+
onclick="javascript:return showDefaultAddress('<?php echo $billingStreet; ?>', '<?php echo $billingCity; ?>', '<?php echo $billingRegion; ?>', '<?php echo $billingCountry; ?>', '<?php echo $billingPostCode; ?>', '<?php echo $billingTelephone; ?>')"
|
146 |
id="ccgateway_default_address" name="addcard[default_address]" value="" />
|
147 |
</span>
|
148 |
<label for="<?php echo $_code ?>_cc_wallet"><?php echo $this->__('Use default bill to address') ?></label>
|
170 |
|
171 |
<label for="<?php echo $_code ?>_cc_region" class="required"><em>*</em><?php echo $this->__('State/Province') ?></label>
|
172 |
<div class="input-box">
|
173 |
+
<?php $regionCollection = Mage::getModel('directory/region_api')->items("US"); ?>
|
174 |
<select name='addcard[cc_region]' id='<?php echo $_code ?>_cc_region' class="required-entry validate-select" required>
|
175 |
<option>Please select region, state or province</option>
|
176 |
<?php
|
181 |
}
|
182 |
?>
|
183 |
|
184 |
+
</select>
|
185 |
</div>
|
186 |
|
187 |
</li>
|
206 |
</option>
|
207 |
<?php endforeach; ?>
|
208 |
</select>
|
209 |
+
<?php endif; ?>
|
210 |
|
211 |
</div>
|
212 |
</div>
|
231 |
</span>
|
232 |
<label for="<?php // echo $_code ?>_cc_wallet"><?php // echo $this->__('Make this Card as default') ?></label>
|
233 |
</li>
|
234 |
+
-->
|
235 |
|
236 |
|
237 |
<button id="addcardbutton" class="button" style="margin-top: 10px;" type="submit" title="<?php echo $this->__('Add') ?>" class="button" onclick="<?php echo $this->getUrl('ccgateway/cardmanagement/savecard'); ?>"><span><span><?php echo $this->__('Add') ?></span></span></button>
|
238 |
|
239 |
+
</div>
|
240 |
|
241 |
|
242 |
<?php echo $this->getChildHtml() ?>
|
app/design/frontend/base/default/template/ccgateway/form.phtml
CHANGED
@@ -40,7 +40,7 @@ if(Mage::getStoreConfig('payment/ccgateway/active')==1){
|
|
40 |
$isTestMode = $this->isTransactionModeTest();
|
41 |
$quote = Mage::getSingleton('checkout/session')->getQuote();
|
42 |
$billingAddress = $quote->getBillingAddress();
|
43 |
-
|
44 |
$requestUrl = Mage::getUrl('ccgateway/payment/getprofiledata',array('_secure'=>true));
|
45 |
$billingStreet = $billingAddress->getStreet(1);
|
46 |
$billingCity = $billingAddress->getCity();
|
@@ -50,11 +50,11 @@ if(Mage::getStoreConfig('payment/ccgateway/active')==1){
|
|
50 |
$billingTelephone = $billingAddress->getTelephone();
|
51 |
?>
|
52 |
<ul id="payment_form_<?php echo $_code ?>" style="display:none" >
|
53 |
-
<?php if ($this->getCheckoutType() == "payment_page") { ?>
|
54 |
<li>
|
55 |
<?php echo Mage::helper('ccgateway')->__('You will be redirected to CardConnect website when you place an order.') ?>
|
56 |
</li>
|
57 |
-
<?php } else { ?>
|
58 |
|
59 |
|
60 |
<?php
|
@@ -72,14 +72,14 @@ if(Mage::getStoreConfig('payment/ccgateway/active')==1){
|
|
72 |
<?php foreach ($this->getCCProfileName() as $data): ?>
|
73 |
<option value="<?php echo $data->getData('CC_PROFILEID'); ?>"
|
74 |
<?php if ($data->getData('CC_PROFILEID') == $response[0]['profileid']) { ?>
|
75 |
-
selected="selected"
|
76 |
<?php } ?> >
|
77 |
<?php echo $data->getData('CC_CARD_NAME'); ?>
|
78 |
-
</option>
|
79 |
<?php endforeach ?>
|
80 |
<option value="<?php echo "Checkout with new card"; ?>" ><?php echo "Checkout with new card"; ?></option>
|
81 |
</select>
|
82 |
-
|
83 |
</div>
|
84 |
</li>
|
85 |
<?php }else{ ?>
|
@@ -107,7 +107,7 @@ if(Mage::getStoreConfig('payment/ccgateway/active')==1){
|
|
107 |
<?php endforeach ?>
|
108 |
</select>
|
109 |
</div>
|
110 |
-
</li>
|
111 |
</div>
|
112 |
|
113 |
<li <?php if($response =="CardConnect_Error"){?> style="display: none;" <?php } ?>>
|
@@ -119,10 +119,15 @@ if(Mage::getStoreConfig('payment/ccgateway/active')==1){
|
|
119 |
|
120 |
</div>
|
121 |
|
122 |
-
</li>
|
123 |
<li><div id="response"></div></li>
|
124 |
|
125 |
-
|
|
|
|
|
|
|
|
|
|
|
126 |
<li>
|
127 |
<label for="<?php echo $_code ?>_expiration" class="required"><em>*</em><?php echo $this->__('Expiration Date') ?></label>
|
128 |
<div class="input-box">
|
@@ -145,7 +150,7 @@ if(Mage::getStoreConfig('payment/ccgateway/active')==1){
|
|
145 |
|
146 |
</div>
|
147 |
</li>
|
148 |
-
</div>
|
149 |
<li <?php if($response =="CardConnect_Error"){?> style="display: none;" <?php } ?>>
|
150 |
<label for="<?php echo $_code ?>_cc_cid" class="required"><em>*</em><?php echo $this->__('Card Verification Number') ?></label>
|
151 |
<div class="input-box">
|
@@ -158,14 +163,14 @@ if(Mage::getStoreConfig('payment/ccgateway/active')==1){
|
|
158 |
</div>
|
159 |
<!-- <a href="#" class="cvv-what-is-this"><?php // echo $this->__('What is this?') ?></a> -->
|
160 |
</div>
|
161 |
-
</li>
|
162 |
|
163 |
-
<?php if (Mage::getSingleton('customer/session')->isLoggedIn()) { ?>
|
164 |
<div id="save_card_4future" <?php if ($this->hasCCProfile() == true) { ?> style="display:none;" <?php } ?>>
|
165 |
<li>
|
166 |
<span style="margin-bottom: 10px;">
|
167 |
<input type="checkbox" title="<?php echo $this->__('Save Card details for future use') ?>" id="ccgateway_cc_wallet" name="payment[cc_wallet]" value="checked" onclick="javascript:return showAliseField()" />
|
168 |
-
</span>
|
169 |
<label for="<?php echo $_code ?>_cc_wallet"><?php echo $this->__('Save Card details for future use') ?></label>
|
170 |
</li>
|
171 |
</div>
|
@@ -176,15 +181,15 @@ if(Mage::getStoreConfig('payment/ccgateway/active')==1){
|
|
176 |
|
177 |
<li>
|
178 |
<label for="<?php echo $_code ?>_cc_Billing"><strong><?php echo $this->__('Billing Information') ?></strong></label>
|
179 |
-
</li>
|
180 |
|
181 |
<li>
|
182 |
<span style="margin-bottom: 10px;">
|
183 |
-
<input type="checkbox" title="<?php echo $this->__('Use default bill to address') ?>" id="ccgateway_default_address" name="payment[cc_default_address]" value="checked"
|
184 |
onclick="javascript:return showDefaultAddress('<?php echo $billingStreet; ?>', '<?php echo $billingCity; ?>', '<?php echo $billingRegion; ?>', '<?php echo $billingCountry; ?>', '<?php echo $billingPostCode; ?>', '<?php echo $billingTelephone; ?>')" />
|
185 |
-
</span>
|
186 |
<label for="<?php echo $_code ?>_default_address"><?php echo $this->__('Use default bill to address') ?></label>
|
187 |
-
</li>
|
188 |
|
189 |
|
190 |
<li>
|
@@ -211,7 +216,7 @@ if(Mage::getStoreConfig('payment/ccgateway/active')==1){
|
|
211 |
|
212 |
<label for="<?php echo $_code ?>_cc_region" class="required"><em>*</em><?php echo $this->__('State/Province') ?></label>
|
213 |
<div class="input-box">
|
214 |
-
<?php $regionCollection = Mage::getModel('directory/region_api')->items("US"); ?>
|
215 |
<select name='payment[cc_region]' id='<?php echo $_code ?>_cc_region' class="validate-select" >
|
216 |
<option value="">Please select region, state or province</option>
|
217 |
<?php
|
@@ -222,7 +227,7 @@ if(Mage::getStoreConfig('payment/ccgateway/active')==1){
|
|
222 |
}
|
223 |
?>
|
224 |
|
225 |
-
</select>
|
226 |
</div>
|
227 |
|
228 |
</li>
|
@@ -247,7 +252,7 @@ if(Mage::getStoreConfig('payment/ccgateway/active')==1){
|
|
247 |
</option>
|
248 |
<?php endforeach; ?>
|
249 |
</select>
|
250 |
-
<?php endif; ?>
|
251 |
|
252 |
</div>
|
253 |
</div>
|
@@ -267,7 +272,7 @@ if(Mage::getStoreConfig('payment/ccgateway/active')==1){
|
|
267 |
</li>
|
268 |
|
269 |
|
270 |
-
</div>
|
271 |
|
272 |
|
273 |
<?php echo $this->getChildHtml() ?>
|
40 |
$isTestMode = $this->isTransactionModeTest();
|
41 |
$quote = Mage::getSingleton('checkout/session')->getQuote();
|
42 |
$billingAddress = $quote->getBillingAddress();
|
43 |
+
|
44 |
$requestUrl = Mage::getUrl('ccgateway/payment/getprofiledata',array('_secure'=>true));
|
45 |
$billingStreet = $billingAddress->getStreet(1);
|
46 |
$billingCity = $billingAddress->getCity();
|
50 |
$billingTelephone = $billingAddress->getTelephone();
|
51 |
?>
|
52 |
<ul id="payment_form_<?php echo $_code ?>" style="display:none" >
|
53 |
+
<?php if ($this->getCheckoutType() == "payment_page") { ?>
|
54 |
<li>
|
55 |
<?php echo Mage::helper('ccgateway')->__('You will be redirected to CardConnect website when you place an order.') ?>
|
56 |
</li>
|
57 |
+
<?php } else { ?>
|
58 |
|
59 |
|
60 |
<?php
|
72 |
<?php foreach ($this->getCCProfileName() as $data): ?>
|
73 |
<option value="<?php echo $data->getData('CC_PROFILEID'); ?>"
|
74 |
<?php if ($data->getData('CC_PROFILEID') == $response[0]['profileid']) { ?>
|
75 |
+
selected="selected"
|
76 |
<?php } ?> >
|
77 |
<?php echo $data->getData('CC_CARD_NAME'); ?>
|
78 |
+
</option>
|
79 |
<?php endforeach ?>
|
80 |
<option value="<?php echo "Checkout with new card"; ?>" ><?php echo "Checkout with new card"; ?></option>
|
81 |
</select>
|
82 |
+
|
83 |
</div>
|
84 |
</li>
|
85 |
<?php }else{ ?>
|
107 |
<?php endforeach ?>
|
108 |
</select>
|
109 |
</div>
|
110 |
+
</li>
|
111 |
</div>
|
112 |
|
113 |
<li <?php if($response =="CardConnect_Error"){?> style="display: none;" <?php } ?>>
|
119 |
|
120 |
</div>
|
121 |
|
122 |
+
</li>
|
123 |
<li><div id="response"></div></li>
|
124 |
|
125 |
+
<div id="fade" style="display:none;">
|
126 |
+
<div id="loading_box" class="loader"></div>
|
127 |
+
</div>
|
128 |
+
|
129 |
+
|
130 |
+
<div id="payment_info1" <?php if ($this->hasCCProfile() == true) { ?> style="display: none;" <?php } ?> >
|
131 |
<li>
|
132 |
<label for="<?php echo $_code ?>_expiration" class="required"><em>*</em><?php echo $this->__('Expiration Date') ?></label>
|
133 |
<div class="input-box">
|
150 |
|
151 |
</div>
|
152 |
</li>
|
153 |
+
</div>
|
154 |
<li <?php if($response =="CardConnect_Error"){?> style="display: none;" <?php } ?>>
|
155 |
<label for="<?php echo $_code ?>_cc_cid" class="required"><em>*</em><?php echo $this->__('Card Verification Number') ?></label>
|
156 |
<div class="input-box">
|
163 |
</div>
|
164 |
<!-- <a href="#" class="cvv-what-is-this"><?php // echo $this->__('What is this?') ?></a> -->
|
165 |
</div>
|
166 |
+
</li>
|
167 |
|
168 |
+
<?php if (Mage::getSingleton('customer/session')->isLoggedIn()) { ?>
|
169 |
<div id="save_card_4future" <?php if ($this->hasCCProfile() == true) { ?> style="display:none;" <?php } ?>>
|
170 |
<li>
|
171 |
<span style="margin-bottom: 10px;">
|
172 |
<input type="checkbox" title="<?php echo $this->__('Save Card details for future use') ?>" id="ccgateway_cc_wallet" name="payment[cc_wallet]" value="checked" onclick="javascript:return showAliseField()" />
|
173 |
+
</span>
|
174 |
<label for="<?php echo $_code ?>_cc_wallet"><?php echo $this->__('Save Card details for future use') ?></label>
|
175 |
</li>
|
176 |
</div>
|
181 |
|
182 |
<li>
|
183 |
<label for="<?php echo $_code ?>_cc_Billing"><strong><?php echo $this->__('Billing Information') ?></strong></label>
|
184 |
+
</li>
|
185 |
|
186 |
<li>
|
187 |
<span style="margin-bottom: 10px;">
|
188 |
+
<input type="checkbox" title="<?php echo $this->__('Use default bill to address') ?>" id="ccgateway_default_address" name="payment[cc_default_address]" value="checked"
|
189 |
onclick="javascript:return showDefaultAddress('<?php echo $billingStreet; ?>', '<?php echo $billingCity; ?>', '<?php echo $billingRegion; ?>', '<?php echo $billingCountry; ?>', '<?php echo $billingPostCode; ?>', '<?php echo $billingTelephone; ?>')" />
|
190 |
+
</span>
|
191 |
<label for="<?php echo $_code ?>_default_address"><?php echo $this->__('Use default bill to address') ?></label>
|
192 |
+
</li>
|
193 |
|
194 |
|
195 |
<li>
|
216 |
|
217 |
<label for="<?php echo $_code ?>_cc_region" class="required"><em>*</em><?php echo $this->__('State/Province') ?></label>
|
218 |
<div class="input-box">
|
219 |
+
<?php $regionCollection = Mage::getModel('directory/region_api')->items("US"); ?>
|
220 |
<select name='payment[cc_region]' id='<?php echo $_code ?>_cc_region' class="validate-select" >
|
221 |
<option value="">Please select region, state or province</option>
|
222 |
<?php
|
227 |
}
|
228 |
?>
|
229 |
|
230 |
+
</select>
|
231 |
</div>
|
232 |
|
233 |
</li>
|
252 |
</option>
|
253 |
<?php endforeach; ?>
|
254 |
</select>
|
255 |
+
<?php endif; ?>
|
256 |
|
257 |
</div>
|
258 |
</div>
|
272 |
</li>
|
273 |
|
274 |
|
275 |
+
</div>
|
276 |
|
277 |
|
278 |
<?php echo $this->getChildHtml() ?>
|
app/etc/modules/Cardconnect_Ccgateway.xml
CHANGED
@@ -41,6 +41,11 @@
|
|
41 |
<Cardconnect_Ccgateway>
|
42 |
<active>true</active>
|
43 |
<codePool>community</codePool>
|
|
|
|
|
|
|
44 |
</Cardconnect_Ccgateway>
|
45 |
</modules>
|
46 |
-
</config>
|
|
|
|
41 |
<Cardconnect_Ccgateway>
|
42 |
<active>true</active>
|
43 |
<codePool>community</codePool>
|
44 |
+
<depends>
|
45 |
+
<Mage_Sales/>
|
46 |
+
</depends>
|
47 |
</Cardconnect_Ccgateway>
|
48 |
</modules>
|
49 |
+
</config>
|
50 |
+
|
51 |
+
|
js/cardconnect/ccgateway.js
CHANGED
@@ -9,7 +9,7 @@
|
|
9 |
* @version $Id: $
|
10 |
*
|
11 |
**/
|
12 |
-
|
13 |
/**
|
14 |
Magento
|
15 |
*
|
@@ -170,6 +170,7 @@ function parseXml(xmlStr) {
|
|
170 |
|
171 |
function valid_credit_card(value, isTestMode)
|
172 |
{
|
|
|
173 |
|
174 |
document.getElementById("ccgateway_expiration").disabled = true;
|
175 |
document.getElementById("ccgateway_expiration_yr").disabled = true;
|
@@ -203,10 +204,12 @@ function valid_credit_card(value, isTestMode)
|
|
203 |
var selectedCardType = e.options[e.selectedIndex].value;
|
204 |
if (cardType == selectedCardType && selectedCardType != null ) {
|
205 |
tokenize(cardNum , isTestMode);
|
|
|
206 |
} else {
|
207 |
alert("Entered card information mismatched. Please try again.");
|
208 |
document.getElementById("ccgateway_cc_number_org").value = "";
|
209 |
document.getElementById("ccgateway_cc_number_org").focus();
|
|
|
210 |
}
|
211 |
return;
|
212 |
}
|
@@ -214,6 +217,7 @@ function valid_credit_card(value, isTestMode)
|
|
214 |
alert("Please Enter valid card data.");
|
215 |
document.getElementById("ccgateway_cc_number_org").value = "";
|
216 |
document.getElementById("ccgateway_cc_number_org").focus();
|
|
|
217 |
return false;
|
218 |
}
|
219 |
|
@@ -286,7 +290,7 @@ function blockNonNumbers(obj, e, allowDecimal, allowNegative) {
|
|
286 |
|
287 |
keychar = String.fromCharCode(key);
|
288 |
// check for backspace or delete, or if Ctrl was pressed
|
289 |
-
|
290 |
if (key == 8 || isCtrl) {
|
291 |
return true;
|
292 |
}
|
@@ -300,9 +304,9 @@ function blockNonNumbers(obj, e, allowDecimal, allowNegative) {
|
|
300 |
|
301 |
|
302 |
function showAliseField(){
|
303 |
-
|
304 |
if( document.getElementById("ccgateway_cc_wallet").checked == true){
|
305 |
-
|
306 |
}else{
|
307 |
document.getElementById("save_card").hide();
|
308 |
}
|
@@ -315,7 +319,7 @@ function callGetProfileWebserviceController( requestUrl, profile ){
|
|
315 |
//alert(profile);
|
316 |
|
317 |
if((profile != "Checkout with new card")){
|
318 |
-
|
319 |
document.getElementById("ccgateway_cc_owner").readOnly = true;
|
320 |
document.getElementById("ccgateway_cc_number_org").readOnly = true;
|
321 |
document.getElementById("ccgateway_cc_number").readOnly = true;
|
@@ -323,9 +327,9 @@ function callGetProfileWebserviceController( requestUrl, profile ){
|
|
323 |
document.getElementById("ccgateway_expiration").readOnly = true;
|
324 |
document.getElementById("ccgateway_expiration_yr").readOnly = true;
|
325 |
document.getElementById("ccgateway_cc_cid").readOnly = false;
|
326 |
-
document.getElementById("ccgateway_cc_wallet").disabled = true;
|
327 |
new Ajax.Request(requestUrl, {
|
328 |
-
|
329 |
method: 'Post',
|
330 |
parameters: {profile: profile},
|
331 |
requestHeaders: {Accept: 'application/json'},
|
@@ -348,14 +352,14 @@ function callGetProfileWebserviceController( requestUrl, profile ){
|
|
348 |
document.getElementById("ccgateway_expiration").value = month;
|
349 |
document.getElementById("ccgateway_expiration_yr").value = "20"+year;
|
350 |
document.getElementById("ccgateway_cc_cid").value = "";
|
351 |
-
document.getElementById("save_card_4future").hide();
|
352 |
document.getElementById("payment_info").hide();
|
353 |
document.getElementById("payment_info1").hide();
|
354 |
|
355 |
}
|
356 |
});
|
357 |
}else{
|
358 |
-
|
359 |
document.getElementById("ccgateway_cc_owner").readOnly = false;
|
360 |
document.getElementById("ccgateway_cc_number_org").readOnly = false;
|
361 |
document.getElementById("ccgateway_cc_number").readOnly = false;
|
@@ -364,7 +368,7 @@ function callGetProfileWebserviceController( requestUrl, profile ){
|
|
364 |
document.getElementById("ccgateway_expiration_yr").readOnly = false;
|
365 |
document.getElementById("ccgateway_cc_cid").readOnly = false;
|
366 |
document.getElementById("ccgateway_cc_wallet").disabled = false;
|
367 |
-
|
368 |
document.getElementById("ccgateway_cc_owner").value = "";
|
369 |
document.getElementById("ccgateway_cc_number_org").value = "";
|
370 |
document.getElementById("ccgateway_cc_number").value = "";
|
@@ -372,9 +376,9 @@ function callGetProfileWebserviceController( requestUrl, profile ){
|
|
372 |
document.getElementById("ccgateway_expiration").value = "";
|
373 |
document.getElementById("ccgateway_expiration_yr").value = "";
|
374 |
document.getElementById("ccgateway_cc_cid").value = "";
|
375 |
-
document.getElementById("save_card_4future").show();
|
376 |
-
document.getElementById("payment_info").show();
|
377 |
-
document.getElementById("payment_info1").show();
|
378 |
|
379 |
}
|
380 |
|
@@ -402,3 +406,24 @@ function showDefaultAddress(billingStreet,billingCity,billingRegion,billingCount
|
|
402 |
|
403 |
}
|
404 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
* @version $Id: $
|
10 |
*
|
11 |
**/
|
12 |
+
|
13 |
/**
|
14 |
Magento
|
15 |
*
|
170 |
|
171 |
function valid_credit_card(value, isTestMode)
|
172 |
{
|
173 |
+
startLoading();
|
174 |
|
175 |
document.getElementById("ccgateway_expiration").disabled = true;
|
176 |
document.getElementById("ccgateway_expiration_yr").disabled = true;
|
204 |
var selectedCardType = e.options[e.selectedIndex].value;
|
205 |
if (cardType == selectedCardType && selectedCardType != null ) {
|
206 |
tokenize(cardNum , isTestMode);
|
207 |
+
setTimeout(stopLoading, 1000);
|
208 |
} else {
|
209 |
alert("Entered card information mismatched. Please try again.");
|
210 |
document.getElementById("ccgateway_cc_number_org").value = "";
|
211 |
document.getElementById("ccgateway_cc_number_org").focus();
|
212 |
+
stopLoading();
|
213 |
}
|
214 |
return;
|
215 |
}
|
217 |
alert("Please Enter valid card data.");
|
218 |
document.getElementById("ccgateway_cc_number_org").value = "";
|
219 |
document.getElementById("ccgateway_cc_number_org").focus();
|
220 |
+
stopLoading();
|
221 |
return false;
|
222 |
}
|
223 |
|
290 |
|
291 |
keychar = String.fromCharCode(key);
|
292 |
// check for backspace or delete, or if Ctrl was pressed
|
293 |
+
|
294 |
if (key == 8 || isCtrl) {
|
295 |
return true;
|
296 |
}
|
304 |
|
305 |
|
306 |
function showAliseField(){
|
307 |
+
|
308 |
if( document.getElementById("ccgateway_cc_wallet").checked == true){
|
309 |
+
document.getElementById("save_card").show();
|
310 |
}else{
|
311 |
document.getElementById("save_card").hide();
|
312 |
}
|
319 |
//alert(profile);
|
320 |
|
321 |
if((profile != "Checkout with new card")){
|
322 |
+
|
323 |
document.getElementById("ccgateway_cc_owner").readOnly = true;
|
324 |
document.getElementById("ccgateway_cc_number_org").readOnly = true;
|
325 |
document.getElementById("ccgateway_cc_number").readOnly = true;
|
327 |
document.getElementById("ccgateway_expiration").readOnly = true;
|
328 |
document.getElementById("ccgateway_expiration_yr").readOnly = true;
|
329 |
document.getElementById("ccgateway_cc_cid").readOnly = false;
|
330 |
+
document.getElementById("ccgateway_cc_wallet").disabled = true;
|
331 |
new Ajax.Request(requestUrl, {
|
332 |
+
|
333 |
method: 'Post',
|
334 |
parameters: {profile: profile},
|
335 |
requestHeaders: {Accept: 'application/json'},
|
352 |
document.getElementById("ccgateway_expiration").value = month;
|
353 |
document.getElementById("ccgateway_expiration_yr").value = "20"+year;
|
354 |
document.getElementById("ccgateway_cc_cid").value = "";
|
355 |
+
document.getElementById("save_card_4future").hide();
|
356 |
document.getElementById("payment_info").hide();
|
357 |
document.getElementById("payment_info1").hide();
|
358 |
|
359 |
}
|
360 |
});
|
361 |
}else{
|
362 |
+
|
363 |
document.getElementById("ccgateway_cc_owner").readOnly = false;
|
364 |
document.getElementById("ccgateway_cc_number_org").readOnly = false;
|
365 |
document.getElementById("ccgateway_cc_number").readOnly = false;
|
368 |
document.getElementById("ccgateway_expiration_yr").readOnly = false;
|
369 |
document.getElementById("ccgateway_cc_cid").readOnly = false;
|
370 |
document.getElementById("ccgateway_cc_wallet").disabled = false;
|
371 |
+
|
372 |
document.getElementById("ccgateway_cc_owner").value = "";
|
373 |
document.getElementById("ccgateway_cc_number_org").value = "";
|
374 |
document.getElementById("ccgateway_cc_number").value = "";
|
376 |
document.getElementById("ccgateway_expiration").value = "";
|
377 |
document.getElementById("ccgateway_expiration_yr").value = "";
|
378 |
document.getElementById("ccgateway_cc_cid").value = "";
|
379 |
+
document.getElementById("save_card_4future").show();
|
380 |
+
document.getElementById("payment_info").show();
|
381 |
+
document.getElementById("payment_info1").show();
|
382 |
|
383 |
}
|
384 |
|
406 |
|
407 |
}
|
408 |
|
409 |
+
|
410 |
+
var loaded = false;
|
411 |
+
function startLoading() {
|
412 |
+
loaded = false;
|
413 |
+
showLoadingImage();
|
414 |
+
}
|
415 |
+
|
416 |
+
function showLoadingImage() {
|
417 |
+
document.getElementById("fade").style.display = "block";
|
418 |
+
var el = document.getElementById("loading_box");
|
419 |
+
if (el && !loaded) {
|
420 |
+
el.innerHTML = '<img src="" alt="Loading...">';
|
421 |
+
new Effect.Appear('loading_box');
|
422 |
+
}
|
423 |
+
}
|
424 |
+
|
425 |
+
function stopLoading() {
|
426 |
+
Element.hide('fade');
|
427 |
+
loaded = true;
|
428 |
+
document.getElementById("fade").style.display = "none";
|
429 |
+
}
|
package.xml
CHANGED
@@ -1,18 +1,18 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>CardconnectCcgateway</name>
|
4 |
-
<version>1.0.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://www.opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
-
<summary>Avis Verifies vous permet de recolter l&apos;avis des clients sur votre site ecommerce.</summary>
|
10 |
-
<description>Avis Verifies vous permet de recolter l&amp;apos;avis de vos clients suite
|
11 |
-
<notes>La version 2.6.5.5 est stable
|
12 |
<authors><author><name>Johnny</name><user>Mikhael</user><email>johnny@verified-reviews.com</email></author><author><name>Rémi</name><user>Gravelle</user><email>remi@avis-verifies.com</email></author></authors>
|
13 |
-
<date>2015-04-
|
14 |
-
<time>
|
15 |
-
<contents><target name="magecommunity"><dir name="Cardconnect"><dir name="Ccgateway"><dir name="Adminhtml"><dir name="Model"><dir name="System"><dir name="Config"><dir name="Source"><file name="Cardtype.php" hash="4c6fd9bc202c33e88f515349e1cd6905"/><file name="Checkouttype.php" hash="4185650bfb5e2a872f1db890d5971fd0"/><file name="Transaction.php" hash="dc2fd1f6b45f1e2a53495017d443b1d2"/></dir></dir></dir></dir></dir><dir name="Block"><file name="Addcard.php" hash="cfdf7c3763f437bb0ed4a9fc295a8de0"/><dir name="Adminhtml"><dir name="Customer"><file name="Data.php" hash="9b83c37bf900d12e6c46a1759617f60e"/><dir name="Edit"><dir name="Tab"><file name="Account.php" hash="c1b27f91036c483ae39685602f9f2633"/></dir></dir></dir><dir name="Sales"><dir name="Order"><dir name="Creditmemo"><dir name="Create"><file name="Form.php" hash="b1988d1db38e0f2b3d88ef6e829f9f6e"/><file name="Items.php" hash="15bf4862d806f944138e306960417050"/></dir><dir name="View"><file name="Form.php" hash="f0f8634c1f0033330eab4da031e3770c"/></dir></dir><dir name="Invoice"><dir name="Create"><file name="Form.php" hash="ad294ba34400cfe291187306e554af46"/><file name="Items.php" hash="c764168038b18ee0a3eb86afdd5b63db"/></dir><dir name="View"><file name="Form.php" hash="68a9a8435e67fe3e9d8f2f80e2c8d892"/></dir></dir><dir name="Shipment"><dir name="Create"><file name="Form.php" hash="f327b0f3fc5ef3dcb506dbeffd00ec8f"/></dir><dir name="View"><file name="Form.php" hash="6e56e053843082a99896cf93b2de93f3"/></dir></dir><dir name="View"><dir name="Tab"><file name="Info.php" hash="5e30f132a5180278bb13a3c20a92081a"/></dir></dir></dir></dir></dir><file name="Cardmanagement.php" hash="5fc5ff0aa4e58a432fb7a13ce8c1f818"/><file name="Form.php" hash="1391c89b6b2e695f47467334ba51c25c"/><file name="Info.php" hash="bf49118e0720dd7f33f783ce9ace04f1"/><dir name="Onepage"><file name="Billing.php" hash="2bf341d653420e82e44bd15711c01abe"/></dir><file name="Redirect.php" hash="90c95f26953ee79d3d8f03f5cb664a41"/></dir><dir name="Helper"><file name="Data.php" hash="7ce727f86e64fd142b01610cf67b5884"/></dir><dir name="Model"><dir name="Cardconnect"><file name="Resp.php" hash="d96c58ed0636097348f7020d529708bb"/><file name="Wallet.php" hash="d271c1cea34fce819e2eed1b2f06b3a8"/></dir><file name="Observer.php" hash="6c7908fc4927d73bb7177944bdfdf5e3"/><dir name="Resource"><dir name="Cardconnect"><dir name="Resp"><file name="Collection.php" hash="454a1ad0ebe24f3af523001fd285e8f3"/></dir><file name="Resp.php" hash="fd67df66591d46cfb8399029bf02015c"/><dir name="Wallet"><file name="Collection.php" hash="2b7040940b22f2934df94c5779c44c81"/></dir><file name="Wallet.php" hash="b7254cf020d5ac4bfdce636692be896a"/></dir></dir><file name="Standard.php" hash="
|
16 |
<compatible/>
|
17 |
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
|
18 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>CardconnectCcgateway</name>
|
4 |
+
<version>1.0.3</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://www.opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
+
<summary>Avis Verifies vous permet de recolter l&amp;apos;avis des clients sur votre site ecommerce.</summary>
|
10 |
+
<description>Avis Verifies vous permet de recolter l&amp;amp;apos;avis de vos clients suite &#xE0; leur achat sur votre boutique ecommerce. Essayez gratuitement notre solution sur www.avis-verifies.com et commencez maintenant &#xE0; r&#xE9;colter les avis de vos clients.</description>
|
11 |
+
<notes>La version 2.6.5.5 est stable</notes>
|
12 |
<authors><author><name>Johnny</name><user>Mikhael</user><email>johnny@verified-reviews.com</email></author><author><name>Rémi</name><user>Gravelle</user><email>remi@avis-verifies.com</email></author></authors>
|
13 |
+
<date>2015-04-21</date>
|
14 |
+
<time>02:56:41</time>
|
15 |
+
<contents><target name="magecommunity"><dir name="Cardconnect"><dir name="Ccgateway"><dir name="Adminhtml"><dir name="Model"><dir name="System"><dir name="Config"><dir name="Source"><file name="Cardtype.php" hash="4c6fd9bc202c33e88f515349e1cd6905"/><file name="Checkouttype.php" hash="4185650bfb5e2a872f1db890d5971fd0"/><file name="Transaction.php" hash="dc2fd1f6b45f1e2a53495017d443b1d2"/></dir></dir></dir></dir></dir><dir name="Block"><file name="Addcard.php" hash="cfdf7c3763f437bb0ed4a9fc295a8de0"/><dir name="Adminhtml"><dir name="Customer"><file name="Data.php" hash="9b83c37bf900d12e6c46a1759617f60e"/><dir name="Edit"><dir name="Tab"><file name="Account.php" hash="c1b27f91036c483ae39685602f9f2633"/></dir></dir></dir><dir name="Sales"><dir name="Order"><dir name="Creditmemo"><dir name="Create"><file name="Form.php" hash="b1988d1db38e0f2b3d88ef6e829f9f6e"/><file name="Items.php" hash="15bf4862d806f944138e306960417050"/></dir><dir name="View"><file name="Form.php" hash="f0f8634c1f0033330eab4da031e3770c"/></dir></dir><dir name="Invoice"><dir name="Create"><file name="Form.php" hash="ad294ba34400cfe291187306e554af46"/><file name="Items.php" hash="c764168038b18ee0a3eb86afdd5b63db"/></dir><dir name="View"><file name="Form.php" hash="68a9a8435e67fe3e9d8f2f80e2c8d892"/></dir></dir><dir name="Shipment"><dir name="Create"><file name="Form.php" hash="f327b0f3fc5ef3dcb506dbeffd00ec8f"/></dir><dir name="View"><file name="Form.php" hash="6e56e053843082a99896cf93b2de93f3"/></dir></dir><dir name="View"><dir name="Tab"><file name="Info.php" hash="5e30f132a5180278bb13a3c20a92081a"/></dir></dir></dir></dir></dir><file name="Cardmanagement.php" hash="5fc5ff0aa4e58a432fb7a13ce8c1f818"/><file name="Form.php" hash="1391c89b6b2e695f47467334ba51c25c"/><file name="Info.php" hash="bf49118e0720dd7f33f783ce9ace04f1"/><dir name="Onepage"><file name="Billing.php" hash="2bf341d653420e82e44bd15711c01abe"/></dir><file name="Redirect.php" hash="90c95f26953ee79d3d8f03f5cb664a41"/></dir><dir name="Helper"><file name="Data.php" hash="7ce727f86e64fd142b01610cf67b5884"/></dir><dir name="Model"><dir name="Cardconnect"><file name="Resp.php" hash="d96c58ed0636097348f7020d529708bb"/><file name="Wallet.php" hash="d271c1cea34fce819e2eed1b2f06b3a8"/></dir><file name="Observer.php" hash="6c7908fc4927d73bb7177944bdfdf5e3"/><dir name="Resource"><dir name="Cardconnect"><dir name="Resp"><file name="Collection.php" hash="454a1ad0ebe24f3af523001fd285e8f3"/></dir><file name="Resp.php" hash="fd67df66591d46cfb8399029bf02015c"/><dir name="Wallet"><file name="Collection.php" hash="2b7040940b22f2934df94c5779c44c81"/></dir><file name="Wallet.php" hash="b7254cf020d5ac4bfdce636692be896a"/></dir></dir><file name="Standard.php" hash="d43e25413406612897a2814229e3177a"/><file name="cardconnect_webservice.php" hash="693b2bf76ec0ff58ec4f7980b12ee074"/></dir><dir name="blocks"><file name="billing.phtml" hash="ad81f6b3f396ddfb9c2c2e43f3b2d3eb"/><dir name="creditmemo"><dir name="create"><file name="form.phtml" hash="f88e763be7a99551c9f54354672d4551"/></dir><dir name="view"><file name="form.phtml" hash="d4d1a1402ae9bb9c0811786aa9795e38"/></dir></dir><file name="info.phtml" hash="bf0898675acdf232a9b54ddf89c7e248"/><dir name="invoice"><dir name="create"><file name="form.phtml" hash="9203de0089224e123aa8ad7bbb0f0f23"/><file name="items.phtml" hash="a8997890db377d22bac48f2b83e0546e"/></dir><dir name="view"><file name="form.phtml" hash="1cb3c24f93138f5871b571260f48d1bc"/></dir></dir><dir name="shipment"><dir name="create"><file name="form.phtml" hash="f227f013e1410a82c1ffbad757e0e8de"/></dir><dir name="view"><file name="form.phtml" hash="be5ea3d6fa7277cb77785e92a9275b44"/></dir></dir></dir><dir name="cc_keys"><file name="cacert.pem" hash="060fd410fecfc10d9c229b941868090c"/><file name=".htaccess" hash="d6a6f4184696bd7c56ae76973ec3489a"/></dir><dir name="controllers"><dir name="Adminhtml"><dir name="Sales"><dir name="Order"><file name="CreateController.php" hash="13010ed7291bfcb96c57137364d9476f"/></dir><file name="OrderController.php" hash="39546076c91c5069420a614f12f7e79f"/></dir></dir><file name="CardmanagementController.php" hash="4adf6b229209a1718b2b4717d8d7df6d"/><file name="PaymentController.php" hash="2909b532f3bcb690b4e8f7e4b5c5bf92"/></dir><dir name="etc"><file name="config.xml" hash="40591df0051ac247150efd5e7d54268b"/><file name="system.xml" hash="b931b80be0fac76b5adeb481e8bd6e3d"/></dir><dir name="sql"><dir name="cardconnect_ccgateway_setup"><file name="install-1.0.0.php" hash="53714977ae574b3ede0b3701c271a42f"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Cardconnect_Ccgateway.xml" hash="adc433ea691093ef3fefc2c5153e307c"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="ccgateway.xml" hash="4752e242b9f6bd6d8e8dfa69f2e8b8c5"/></dir><dir name="template"><dir name="ccgateway"><file name="blank.phtml" hash="b11f3718962eb7574970bd346f2105aa"/><dir name="cardmanagement"><file name="editcard.phtml" hash="9ffde4fd9c240ccaea1bd849e7afb631"/><file name="index.phtml" hash="32f863e7bd2c3c05ac6aefab63283154"/><file name="new.phtml" hash="43a0764457a00f3be3032085a9b3cd06"/></dir><file name="form.phtml" hash="69777c8a4776581bab31af71f831cb5c"/><file name="info.phtml" hash="c107ff370b915cd6cc0bf49c1a36363b"/><file name="redirect.phtml" hash="4b3964b41e6e55bf54039f758e74560e"/></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="ccgateway.xml" hash="354ffbd902833eaa7c7af1a847cb230f"/></dir><dir name="template"><dir name="ccgateway"><file name="form.phtml" hash="83e8b94111d74d9fa3e4d95b1c26f579"/><file name="info.phtml" hash="296b8e5284fa15e1ed0d771bb5a6b644"/></dir></dir></dir></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><file name="cardconnect.css" hash="eb4c6d523d8e0b694c9231648a389a7e"/></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="images"><dir name="cardconnect"><file name="cardconnect.gif" hash="b0ccf9c7446efd2bb6b65eadd98a3fde"/></dir></dir></dir></dir></dir></target><target name="mage"><dir name="js"><dir name="cardconnect"><file name="ccgateway.js" hash="e78c0cbe1a3d05fabbe85b38fb4cb60e"/></dir></dir></target></contents>
|
16 |
<compatible/>
|
17 |
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
|
18 |
</package>
|
skin/frontend/base/default/css/cardconnect.css
CHANGED
@@ -1,420 +1,420 @@
|
|
1 |
-
/**
|
2 |
-
* @brief Defines the css for custom payment page.
|
3 |
-
* @category Magento CardConnect Payment Module
|
4 |
-
* @author CardConnect
|
5 |
-
* @copyright Portions copyright 2014 CardConnect
|
6 |
-
* @copyright Portions copyright Magento 2014
|
7 |
-
* @license GPL v2, please see LICENSE.txt
|
8 |
-
* @access public
|
9 |
-
* @version $Id: $
|
10 |
-
*
|
11 |
-
**/
|
12 |
-
|
13 |
-
/**
|
14 |
-
Magento
|
15 |
-
*
|
16 |
-
NOTICE OF LICENSE
|
17 |
-
*
|
18 |
-
This source file is subject to the Open Software License (OSL 3.0)
|
19 |
-
that is bundled with this package in the file LICENSE.txt.
|
20 |
-
It is also available through the world-wide-web at this URL:
|
21 |
-
http://opensource.org/licenses/osl-3.0.php
|
22 |
-
If you did not receive a copy of the license and are unable to
|
23 |
-
obtain it through the world-wide-web, please send an email
|
24 |
-
to license@magentocommerce.com so we can send you a copy immediately.
|
25 |
-
*
|
26 |
-
@category Cardconnect
|
27 |
-
@package Cardconnect_Ccgateway
|
28 |
-
@copyright Copyright (c) 2014 CardConnect (http://www.cardconnect.com)
|
29 |
-
@license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
30 |
-
*/
|
31 |
-
|
32 |
-
.ccBody {
|
33 |
-
font-family: Arial;
|
34 |
-
font-size: .8em;
|
35 |
-
}
|
36 |
-
|
37 |
-
.ccContent {
|
38 |
-
width: 1000px;
|
39 |
-
margin:0 auto;
|
40 |
-
}
|
41 |
-
|
42 |
-
/* Header */
|
43 |
-
.ccHeader {
|
44 |
-
width: 1000px;
|
45 |
-
height: 90px;
|
46 |
-
margin-bottom: 10px;
|
47 |
-
text-align: left;
|
48 |
-
background-image:url('http://ccerp.cardconnect.com/~ssajwan/magento_demo_store/skin/frontend/rwd/default/images/media/logo.png');
|
49 |
-
background-repeat: no-repeat;
|
50 |
-
border-bottom: 20px solid #5C9CCC;
|
51 |
-
background-position: left center;
|
52 |
-
}
|
53 |
-
|
54 |
-
.ccHeaderImg {
|
55 |
-
position: relative;
|
56 |
-
text-align: right;
|
57 |
-
background-repeat: no-repeat;
|
58 |
-
background-position: center;
|
59 |
-
width: 400px;
|
60 |
-
height: 53px;
|
61 |
-
float: right;
|
62 |
-
|
63 |
-
|
64 |
-
}
|
65 |
-
|
66 |
-
|
67 |
-
/* 3D Secure */
|
68 |
-
.cc3DSOverlay {
|
69 |
-
background: #000;
|
70 |
-
opacity:0.6;
|
71 |
-
position: fixed;
|
72 |
-
width: 100%;
|
73 |
-
height: 100%;
|
74 |
-
top:0;
|
75 |
-
left:0;
|
76 |
-
display:none;
|
77 |
-
z-index: 999998;
|
78 |
-
}
|
79 |
-
.cc3DSWindow {
|
80 |
-
display: none;
|
81 |
-
top: 50%;
|
82 |
-
left: 50%;
|
83 |
-
margin-left: -200px;
|
84 |
-
margin-top: -200px;
|
85 |
-
position: absolute;
|
86 |
-
background:#FFF;
|
87 |
-
border: 1px solid #555;
|
88 |
-
box-shadow: 2px 2px 40px #222;
|
89 |
-
z-index: 999999;
|
90 |
-
}
|
91 |
-
.cc3DSiFrame {
|
92 |
-
width: 400px;
|
93 |
-
height: 400px;
|
94 |
-
margin:0 auto;
|
95 |
-
z-index: 999999;
|
96 |
-
}
|
97 |
-
|
98 |
-
|
99 |
-
/* Payment form */
|
100 |
-
.ccPaymentForm {
|
101 |
-
height: 500px;
|
102 |
-
margin: 0 270px;
|
103 |
-
}
|
104 |
-
|
105 |
-
.ccPaymentFormError {
|
106 |
-
color: red;
|
107 |
-
}
|
108 |
-
|
109 |
-
/* Fieldsets */
|
110 |
-
.ccPaymentFieldset {
|
111 |
-
border: 0;
|
112 |
-
width: 450px;
|
113 |
-
}
|
114 |
-
|
115 |
-
.ccPaymentLegend {
|
116 |
-
font-weight: bold;
|
117 |
-
|
118 |
-
}
|
119 |
-
|
120 |
-
.ccBillingFieldset {
|
121 |
-
border: 0;
|
122 |
-
width: 450px;
|
123 |
-
}
|
124 |
-
|
125 |
-
.ccBillingLegend {
|
126 |
-
font-weight: bold;
|
127 |
-
}
|
128 |
-
|
129 |
-
/* General form classes */
|
130 |
-
.ccFormRow {
|
131 |
-
|
132 |
-
}
|
133 |
-
|
134 |
-
.ccFormLabel {
|
135 |
-
padding: .4em;
|
136 |
-
width: 10em;
|
137 |
-
margin: .1em;
|
138 |
-
display: inline-block;
|
139 |
-
}
|
140 |
-
|
141 |
-
.ccFormLabelError {
|
142 |
-
color:red;
|
143 |
-
}
|
144 |
-
|
145 |
-
.ccFormField {
|
146 |
-
|
147 |
-
}
|
148 |
-
|
149 |
-
.ccFormFieldError {
|
150 |
-
border: 1px solid red;
|
151 |
-
}
|
152 |
-
|
153 |
-
.ccFormError {
|
154 |
-
margin-left: .5em;
|
155 |
-
color: red;
|
156 |
-
}
|
157 |
-
|
158 |
-
.ccFormCardImage {
|
159 |
-
|
160 |
-
}
|
161 |
-
|
162 |
-
/* Name field */
|
163 |
-
.ccNameRow {
|
164 |
-
|
165 |
-
}
|
166 |
-
|
167 |
-
.ccNameLabel {
|
168 |
-
|
169 |
-
}
|
170 |
-
|
171 |
-
.ccNameLabelError {
|
172 |
-
|
173 |
-
}
|
174 |
-
|
175 |
-
.ccNameField {
|
176 |
-
|
177 |
-
}
|
178 |
-
|
179 |
-
.ccNameFieldError {
|
180 |
-
|
181 |
-
}
|
182 |
-
|
183 |
-
.ccNameError {
|
184 |
-
|
185 |
-
}
|
186 |
-
|
187 |
-
/* Card Number field */
|
188 |
-
.ccCardNumberRow {
|
189 |
-
|
190 |
-
}
|
191 |
-
|
192 |
-
.ccCardNumberLabel {
|
193 |
-
|
194 |
-
}
|
195 |
-
|
196 |
-
.ccCardNumberLabelError {
|
197 |
-
|
198 |
-
}
|
199 |
-
|
200 |
-
.ccCardNumberField {
|
201 |
-
|
202 |
-
}
|
203 |
-
|
204 |
-
.ccCardNumberFieldError {
|
205 |
-
|
206 |
-
}
|
207 |
-
|
208 |
-
.ccCardNumberError {
|
209 |
-
|
210 |
-
}
|
211 |
-
|
212 |
-
/* Credit Card images */
|
213 |
-
.ccCardImagesRow {
|
214 |
-
|
215 |
-
}
|
216 |
-
|
217 |
-
.ccCardImagesLabel {
|
218 |
-
|
219 |
-
}
|
220 |
-
|
221 |
-
.ccAmexCardImage {
|
222 |
-
|
223 |
-
}
|
224 |
-
|
225 |
-
.ccDiscoverCardImage {
|
226 |
-
|
227 |
-
}
|
228 |
-
|
229 |
-
.ccMCCardImage {
|
230 |
-
|
231 |
-
}
|
232 |
-
|
233 |
-
.ccVisaCardImage {
|
234 |
-
|
235 |
-
}
|
236 |
-
|
237 |
-
/* cvv2 field */
|
238 |
-
.ccCvv2Row {
|
239 |
-
|
240 |
-
}
|
241 |
-
|
242 |
-
.ccCvv2Label {
|
243 |
-
|
244 |
-
}
|
245 |
-
|
246 |
-
.ccCvv2LabelError {
|
247 |
-
|
248 |
-
}
|
249 |
-
|
250 |
-
.ccCvv2Field {
|
251 |
-
|
252 |
-
}
|
253 |
-
|
254 |
-
.ccCvv2FieldError {
|
255 |
-
|
256 |
-
}
|
257 |
-
|
258 |
-
.ccCvv2Error {
|
259 |
-
|
260 |
-
}
|
261 |
-
|
262 |
-
/* Country field */
|
263 |
-
.ccCountryRow {
|
264 |
-
|
265 |
-
}
|
266 |
-
|
267 |
-
.ccCountryLabel {
|
268 |
-
|
269 |
-
}
|
270 |
-
|
271 |
-
.ccCountryLabelError {
|
272 |
-
|
273 |
-
}
|
274 |
-
|
275 |
-
.ccCountryField {
|
276 |
-
|
277 |
-
}
|
278 |
-
|
279 |
-
.ccCountryFieldError {
|
280 |
-
|
281 |
-
}
|
282 |
-
|
283 |
-
.ccCountryError {
|
284 |
-
|
285 |
-
}
|
286 |
-
|
287 |
-
/* Address field */
|
288 |
-
.ccAddressRow {
|
289 |
-
|
290 |
-
}
|
291 |
-
|
292 |
-
.ccAddressLabel {
|
293 |
-
|
294 |
-
}
|
295 |
-
|
296 |
-
.ccAddressLabelError {
|
297 |
-
|
298 |
-
}
|
299 |
-
|
300 |
-
.ccAddressField {
|
301 |
-
|
302 |
-
}
|
303 |
-
|
304 |
-
.ccAddressFieldError {
|
305 |
-
|
306 |
-
}
|
307 |
-
|
308 |
-
.ccAddressError {
|
309 |
-
|
310 |
-
}
|
311 |
-
|
312 |
-
/* Address 2 field */
|
313 |
-
.ccAddress2Row {
|
314 |
-
|
315 |
-
}
|
316 |
-
|
317 |
-
.ccAddress2Label {
|
318 |
-
|
319 |
-
}
|
320 |
-
|
321 |
-
.ccAddress2LabelError {
|
322 |
-
|
323 |
-
}
|
324 |
-
|
325 |
-
.ccAddress2Field {
|
326 |
-
|
327 |
-
}
|
328 |
-
|
329 |
-
.ccAddress2FieldError {
|
330 |
-
|
331 |
-
}
|
332 |
-
|
333 |
-
.ccAddress2Error {
|
334 |
-
|
335 |
-
}
|
336 |
-
|
337 |
-
/* City field */
|
338 |
-
.ccCityRow {
|
339 |
-
|
340 |
-
}
|
341 |
-
|
342 |
-
.ccCityLabel {
|
343 |
-
|
344 |
-
}
|
345 |
-
|
346 |
-
.ccCityLabelError {
|
347 |
-
|
348 |
-
}
|
349 |
-
|
350 |
-
.ccCityField {
|
351 |
-
|
352 |
-
}
|
353 |
-
|
354 |
-
.ccCityFieldError {
|
355 |
-
|
356 |
-
}
|
357 |
-
|
358 |
-
.ccCityError {
|
359 |
-
|
360 |
-
}
|
361 |
-
|
362 |
-
/* State field */
|
363 |
-
.ccStateRow {
|
364 |
-
|
365 |
-
}
|
366 |
-
|
367 |
-
.ccStateLabel {
|
368 |
-
|
369 |
-
}
|
370 |
-
|
371 |
-
.ccStateLabelError {
|
372 |
-
|
373 |
-
}
|
374 |
-
|
375 |
-
.ccStateField {
|
376 |
-
|
377 |
-
}
|
378 |
-
|
379 |
-
.ccStateFieldError {
|
380 |
-
|
381 |
-
}
|
382 |
-
|
383 |
-
.ccStateError {
|
384 |
-
|
385 |
-
}
|
386 |
-
|
387 |
-
/* Zip field */
|
388 |
-
.ccZipRow {
|
389 |
-
|
390 |
-
}
|
391 |
-
|
392 |
-
.ccZipLabel {
|
393 |
-
|
394 |
-
}
|
395 |
-
|
396 |
-
.ccZipLabelError {
|
397 |
-
|
398 |
-
}
|
399 |
-
|
400 |
-
.ccZipField {
|
401 |
-
|
402 |
-
}
|
403 |
-
|
404 |
-
.ccZipFieldError {
|
405 |
-
|
406 |
-
}
|
407 |
-
|
408 |
-
.ccZipError {
|
409 |
-
|
410 |
-
}
|
411 |
-
|
412 |
-
/* Submit button */
|
413 |
-
.ccFormSubmit {
|
414 |
-
|
415 |
-
}
|
416 |
-
|
417 |
-
/* Cancel button */
|
418 |
-
.ccFormCancel {
|
419 |
-
|
420 |
-
}
|
1 |
+
/**
|
2 |
+
* @brief Defines the css for custom payment page.
|
3 |
+
* @category Magento CardConnect Payment Module
|
4 |
+
* @author CardConnect
|
5 |
+
* @copyright Portions copyright 2014 CardConnect
|
6 |
+
* @copyright Portions copyright Magento 2014
|
7 |
+
* @license GPL v2, please see LICENSE.txt
|
8 |
+
* @access public
|
9 |
+
* @version $Id: $
|
10 |
+
*
|
11 |
+
**/
|
12 |
+
|
13 |
+
/**
|
14 |
+
Magento
|
15 |
+
*
|
16 |
+
NOTICE OF LICENSE
|
17 |
+
*
|
18 |
+
This source file is subject to the Open Software License (OSL 3.0)
|
19 |
+
that is bundled with this package in the file LICENSE.txt.
|
20 |
+
It is also available through the world-wide-web at this URL:
|
21 |
+
http://opensource.org/licenses/osl-3.0.php
|
22 |
+
If you did not receive a copy of the license and are unable to
|
23 |
+
obtain it through the world-wide-web, please send an email
|
24 |
+
to license@magentocommerce.com so we can send you a copy immediately.
|
25 |
+
*
|
26 |
+
@category Cardconnect
|
27 |
+
@package Cardconnect_Ccgateway
|
28 |
+
@copyright Copyright (c) 2014 CardConnect (http://www.cardconnect.com)
|
29 |
+
@license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
30 |
+
*/
|
31 |
+
|
32 |
+
.ccBody {
|
33 |
+
font-family: Arial;
|
34 |
+
font-size: .8em;
|
35 |
+
}
|
36 |
+
|
37 |
+
.ccContent {
|
38 |
+
width: 1000px;
|
39 |
+
margin:0 auto;
|
40 |
+
}
|
41 |
+
|
42 |
+
/* Header */
|
43 |
+
.ccHeader {
|
44 |
+
width: 1000px;
|
45 |
+
height: 90px;
|
46 |
+
margin-bottom: 10px;
|
47 |
+
text-align: left;
|
48 |
+
background-image:url('http://ccerp.cardconnect.com/~ssajwan/magento_demo_store/skin/frontend/rwd/default/images/media/logo.png');
|
49 |
+
background-repeat: no-repeat;
|
50 |
+
border-bottom: 20px solid #5C9CCC;
|
51 |
+
background-position: left center;
|
52 |
+
}
|
53 |
+
|
54 |
+
.ccHeaderImg {
|
55 |
+
position: relative;
|
56 |
+
text-align: right;
|
57 |
+
background-repeat: no-repeat;
|
58 |
+
background-position: center;
|
59 |
+
width: 400px;
|
60 |
+
height: 53px;
|
61 |
+
float: right;
|
62 |
+
|
63 |
+
|
64 |
+
}
|
65 |
+
|
66 |
+
|
67 |
+
/* 3D Secure */
|
68 |
+
.cc3DSOverlay {
|
69 |
+
background: #000;
|
70 |
+
opacity:0.6;
|
71 |
+
position: fixed;
|
72 |
+
width: 100%;
|
73 |
+
height: 100%;
|
74 |
+
top:0;
|
75 |
+
left:0;
|
76 |
+
display:none;
|
77 |
+
z-index: 999998;
|
78 |
+
}
|
79 |
+
.cc3DSWindow {
|
80 |
+
display: none;
|
81 |
+
top: 50%;
|
82 |
+
left: 50%;
|
83 |
+
margin-left: -200px;
|
84 |
+
margin-top: -200px;
|
85 |
+
position: absolute;
|
86 |
+
background:#FFF;
|
87 |
+
border: 1px solid #555;
|
88 |
+
box-shadow: 2px 2px 40px #222;
|
89 |
+
z-index: 999999;
|
90 |
+
}
|
91 |
+
.cc3DSiFrame {
|
92 |
+
width: 400px;
|
93 |
+
height: 400px;
|
94 |
+
margin:0 auto;
|
95 |
+
z-index: 999999;
|
96 |
+
}
|
97 |
+
|
98 |
+
|
99 |
+
/* Payment form */
|
100 |
+
.ccPaymentForm {
|
101 |
+
height: 500px;
|
102 |
+
margin: 0 270px;
|
103 |
+
}
|
104 |
+
|
105 |
+
.ccPaymentFormError {
|
106 |
+
color: red;
|
107 |
+
}
|
108 |
+
|
109 |
+
/* Fieldsets */
|
110 |
+
.ccPaymentFieldset {
|
111 |
+
border: 0;
|
112 |
+
width: 450px;
|
113 |
+
}
|
114 |
+
|
115 |
+
.ccPaymentLegend {
|
116 |
+
font-weight: bold;
|
117 |
+
|
118 |
+
}
|
119 |
+
|
120 |
+
.ccBillingFieldset {
|
121 |
+
border: 0;
|
122 |
+
width: 450px;
|
123 |
+
}
|
124 |
+
|
125 |
+
.ccBillingLegend {
|
126 |
+
font-weight: bold;
|
127 |
+
}
|
128 |
+
|
129 |
+
/* General form classes */
|
130 |
+
.ccFormRow {
|
131 |
+
|
132 |
+
}
|
133 |
+
|
134 |
+
.ccFormLabel {
|
135 |
+
padding: .4em;
|
136 |
+
width: 10em;
|
137 |
+
margin: .1em;
|
138 |
+
display: inline-block;
|
139 |
+
}
|
140 |
+
|
141 |
+
.ccFormLabelError {
|
142 |
+
color:red;
|
143 |
+
}
|
144 |
+
|
145 |
+
.ccFormField {
|
146 |
+
|
147 |
+
}
|
148 |
+
|
149 |
+
.ccFormFieldError {
|
150 |
+
border: 1px solid red;
|
151 |
+
}
|
152 |
+
|
153 |
+
.ccFormError {
|
154 |
+
margin-left: .5em;
|
155 |
+
color: red;
|
156 |
+
}
|
157 |
+
|
158 |
+
.ccFormCardImage {
|
159 |
+
|
160 |
+
}
|
161 |
+
|
162 |
+
/* Name field */
|
163 |
+
.ccNameRow {
|
164 |
+
|
165 |
+
}
|
166 |
+
|
167 |
+
.ccNameLabel {
|
168 |
+
|
169 |
+
}
|
170 |
+
|
171 |
+
.ccNameLabelError {
|
172 |
+
|
173 |
+
}
|
174 |
+
|
175 |
+
.ccNameField {
|
176 |
+
|
177 |
+
}
|
178 |
+
|
179 |
+
.ccNameFieldError {
|
180 |
+
|
181 |
+
}
|
182 |
+
|
183 |
+
.ccNameError {
|
184 |
+
|
185 |
+
}
|
186 |
+
|
187 |
+
/* Card Number field */
|
188 |
+
.ccCardNumberRow {
|
189 |
+
|
190 |
+
}
|
191 |
+
|
192 |
+
.ccCardNumberLabel {
|
193 |
+
|
194 |
+
}
|
195 |
+
|
196 |
+
.ccCardNumberLabelError {
|
197 |
+
|
198 |
+
}
|
199 |
+
|
200 |
+
.ccCardNumberField {
|
201 |
+
|
202 |
+
}
|
203 |
+
|
204 |
+
.ccCardNumberFieldError {
|
205 |
+
|
206 |
+
}
|
207 |
+
|
208 |
+
.ccCardNumberError {
|
209 |
+
|
210 |
+
}
|
211 |
+
|
212 |
+
/* Credit Card images */
|
213 |
+
.ccCardImagesRow {
|
214 |
+
|
215 |
+
}
|
216 |
+
|
217 |
+
.ccCardImagesLabel {
|
218 |
+
|
219 |
+
}
|
220 |
+
|
221 |
+
.ccAmexCardImage {
|
222 |
+
|
223 |
+
}
|
224 |
+
|
225 |
+
.ccDiscoverCardImage {
|
226 |
+
|
227 |
+
}
|
228 |
+
|
229 |
+
.ccMCCardImage {
|
230 |
+
|
231 |
+
}
|
232 |
+
|
233 |
+
.ccVisaCardImage {
|
234 |
+
|
235 |
+
}
|
236 |
+
|
237 |
+
/* cvv2 field */
|
238 |
+
.ccCvv2Row {
|
239 |
+
|
240 |
+
}
|
241 |
+
|
242 |
+
.ccCvv2Label {
|
243 |
+
|
244 |
+
}
|
245 |
+
|
246 |
+
.ccCvv2LabelError {
|
247 |
+
|
248 |
+
}
|
249 |
+
|
250 |
+
.ccCvv2Field {
|
251 |
+
|
252 |
+
}
|
253 |
+
|
254 |
+
.ccCvv2FieldError {
|
255 |
+
|
256 |
+
}
|
257 |
+
|
258 |
+
.ccCvv2Error {
|
259 |
+
|
260 |
+
}
|
261 |
+
|
262 |
+
/* Country field */
|
263 |
+
.ccCountryRow {
|
264 |
+
|
265 |
+
}
|
266 |
+
|
267 |
+
.ccCountryLabel {
|
268 |
+
|
269 |
+
}
|
270 |
+
|
271 |
+
.ccCountryLabelError {
|
272 |
+
|
273 |
+
}
|
274 |
+
|
275 |
+
.ccCountryField {
|
276 |
+
|
277 |
+
}
|
278 |
+
|
279 |
+
.ccCountryFieldError {
|
280 |
+
|
281 |
+
}
|
282 |
+
|
283 |
+
.ccCountryError {
|
284 |
+
|
285 |
+
}
|
286 |
+
|
287 |
+
/* Address field */
|
288 |
+
.ccAddressRow {
|
289 |
+
|
290 |
+
}
|
291 |
+
|
292 |
+
.ccAddressLabel {
|
293 |
+
|
294 |
+
}
|
295 |
+
|
296 |
+
.ccAddressLabelError {
|
297 |
+
|
298 |
+
}
|
299 |
+
|
300 |
+
.ccAddressField {
|
301 |
+
|
302 |
+
}
|
303 |
+
|
304 |
+
.ccAddressFieldError {
|
305 |
+
|
306 |
+
}
|
307 |
+
|
308 |
+
.ccAddressError {
|
309 |
+
|
310 |
+
}
|
311 |
+
|
312 |
+
/* Address 2 field */
|
313 |
+
.ccAddress2Row {
|
314 |
+
|
315 |
+
}
|
316 |
+
|
317 |
+
.ccAddress2Label {
|
318 |
+
|
319 |
+
}
|
320 |
+
|
321 |
+
.ccAddress2LabelError {
|
322 |
+
|
323 |
+
}
|
324 |
+
|
325 |
+
.ccAddress2Field {
|
326 |
+
|
327 |
+
}
|
328 |
+
|
329 |
+
.ccAddress2FieldError {
|
330 |
+
|
331 |
+
}
|
332 |
+
|
333 |
+
.ccAddress2Error {
|
334 |
+
|
335 |
+
}
|
336 |
+
|
337 |
+
/* City field */
|
338 |
+
.ccCityRow {
|
339 |
+
|
340 |
+
}
|
341 |
+
|
342 |
+
.ccCityLabel {
|
343 |
+
|
344 |
+
}
|
345 |
+
|
346 |
+
.ccCityLabelError {
|
347 |
+
|
348 |
+
}
|
349 |
+
|
350 |
+
.ccCityField {
|
351 |
+
|
352 |
+
}
|
353 |
+
|
354 |
+
.ccCityFieldError {
|
355 |
+
|
356 |
+
}
|
357 |
+
|
358 |
+
.ccCityError {
|
359 |
+
|
360 |
+
}
|
361 |
+
|
362 |
+
/* State field */
|
363 |
+
.ccStateRow {
|
364 |
+
|
365 |
+
}
|
366 |
+
|
367 |
+
.ccStateLabel {
|
368 |
+
|
369 |
+
}
|
370 |
+
|
371 |
+
.ccStateLabelError {
|
372 |
+
|
373 |
+
}
|
374 |
+
|
375 |
+
.ccStateField {
|
376 |
+
|
377 |
+
}
|
378 |
+
|
379 |
+
.ccStateFieldError {
|
380 |
+
|
381 |
+
}
|
382 |
+
|
383 |
+
.ccStateError {
|
384 |
+
|
385 |
+
}
|
386 |
+
|
387 |
+
/* Zip field */
|
388 |
+
.ccZipRow {
|
389 |
+
|
390 |
+
}
|
391 |
+
|
392 |
+
.ccZipLabel {
|
393 |
+
|
394 |
+
}
|
395 |
+
|
396 |
+
.ccZipLabelError {
|
397 |
+
|
398 |
+
}
|
399 |
+
|
400 |
+
.ccZipField {
|
401 |
+
|
402 |
+
}
|
403 |
+
|
404 |
+
.ccZipFieldError {
|
405 |
+
|
406 |
+
}
|
407 |
+
|
408 |
+
.ccZipError {
|
409 |
+
|
410 |
+
}
|
411 |
+
|
412 |
+
/* Submit button */
|
413 |
+
.ccFormSubmit {
|
414 |
+
|
415 |
+
}
|
416 |
+
|
417 |
+
/* Cancel button */
|
418 |
+
.ccFormCancel {
|
419 |
+
|
420 |
+
}
|