Version Notes
La version 2.6.5.5 est stable.
Download this release
Release Info
Developer | Johnny |
Extension | CardconnectCcgateway |
Version | 1.0.5 |
Comparing to | |
See all releases |
Code changes from version 1.0.4 to 1.0.5
- app/code/community/Cardconnect/Ccgateway/Block/Adminhtml/Customer/Data.php +16 -11
- app/code/community/Cardconnect/Ccgateway/Model/Standard.php +10 -5
- app/code/community/Cardconnect/Ccgateway/controllers/PaymentController.php +14 -0
- app/code/community/Cardconnect/Ccgateway/etc/config.xml +1 -1
- js/cardconnect/ccgateway.js +1 -1
- package.xml +6 -6
app/code/community/Cardconnect/Ccgateway/Block/Adminhtml/Customer/Data.php
CHANGED
@@ -39,23 +39,25 @@ class Cardconnect_Ccgateway_Block_Adminhtml_Customer_Data extends Mage_Adminhtml
|
|
39 |
*/
|
40 |
public function render(Varien_Data_Form_Element_Abstract $element) {
|
41 |
$customer = Mage::registry('current_customer');
|
42 |
-
|
43 |
-
|
44 |
$html = '';
|
45 |
$tokens = $this->getCcCustomerToken();
|
46 |
|
47 |
if (count($tokens)!=0) {
|
48 |
$html .="<tr>";
|
49 |
$html .= "<th>Card Alias</th>";
|
|
|
50 |
$html .= "<th>Card Number</th>";
|
51 |
$html .="<th></th>";
|
52 |
$html .="<th>Operation</td></th>";
|
53 |
|
54 |
$i = 1;
|
55 |
foreach ($tokens as $data) {
|
56 |
-
|
57 |
$html .= "<tr>";
|
58 |
$html .= "<td>".$data->getData('CC_CARD_NAME') . "</td>";
|
|
|
59 |
$html .= "<td>".substr_replace($data->getData('CC_MASK'), str_repeat("X", 12), 0, 12) . "</td>";
|
60 |
$html .= '<td><input type="hidden" id="token_num_' . $i . '" value="' . $data->getData('CC_ID') . '"></td>';
|
61 |
$html .= '<td><button id="card_delete" title="Delete"';
|
@@ -64,18 +66,18 @@ class Cardconnect_Ccgateway_Block_Adminhtml_Customer_Data extends Mage_Adminhtml
|
|
64 |
$i++;
|
65 |
}
|
66 |
} else {
|
67 |
-
$html .="<tr><th>No
|
68 |
}
|
69 |
|
70 |
return $html;
|
71 |
}
|
72 |
|
73 |
|
74 |
-
|
75 |
-
|
76 |
/**
|
77 |
* Returns Profile Data for Card Managment
|
78 |
-
*
|
79 |
* @return string
|
80 |
*/
|
81 |
public function getCcCustomerToken() {
|
@@ -88,7 +90,7 @@ class Cardconnect_Ccgateway_Block_Adminhtml_Customer_Data extends Mage_Adminhtml
|
|
88 |
->setOrder('CC_CREATED', 'DESC');
|
89 |
|
90 |
return $collection;
|
91 |
-
}
|
92 |
|
93 |
}
|
94 |
?>
|
@@ -97,15 +99,18 @@ class Cardconnect_Ccgateway_Block_Adminhtml_Customer_Data extends Mage_Adminhtml
|
|
97 |
function deleteCardDataController(rowNum, requestUrl) {
|
98 |
|
99 |
var tokenNumberId = "token_num_" + rowNum;
|
|
|
100 |
var delId = document.getElementById(tokenNumberId).value;
|
|
|
101 |
|
|
|
102 |
|
103 |
new Ajax.Request(requestUrl, {
|
104 |
method: 'Post',
|
105 |
-
parameters:
|
106 |
onComplete: function (transport) {
|
107 |
-
alert(transport.responseText); //return false;
|
108 |
-
window.location.reload();
|
109 |
}
|
110 |
});
|
111 |
|
39 |
*/
|
40 |
public function render(Varien_Data_Form_Element_Abstract $element) {
|
41 |
$customer = Mage::registry('current_customer');
|
42 |
+
$requestUrl = Mage::getUrl('ccgateway/payment/deletewallet',array('_secure'=>true));
|
43 |
+
|
44 |
$html = '';
|
45 |
$tokens = $this->getCcCustomerToken();
|
46 |
|
47 |
if (count($tokens)!=0) {
|
48 |
$html .="<tr>";
|
49 |
$html .= "<th>Card Alias</th>";
|
50 |
+
$html .="<th></th>";
|
51 |
$html .= "<th>Card Number</th>";
|
52 |
$html .="<th></th>";
|
53 |
$html .="<th>Operation</td></th>";
|
54 |
|
55 |
$i = 1;
|
56 |
foreach ($tokens as $data) {
|
57 |
+
|
58 |
$html .= "<tr>";
|
59 |
$html .= "<td>".$data->getData('CC_CARD_NAME') . "</td>";
|
60 |
+
$html .= '<td><input type="hidden" id="customer_id_' . $i . '" value="' . $customer->getId() . '"></td>';
|
61 |
$html .= "<td>".substr_replace($data->getData('CC_MASK'), str_repeat("X", 12), 0, 12) . "</td>";
|
62 |
$html .= '<td><input type="hidden" id="token_num_' . $i . '" value="' . $data->getData('CC_ID') . '"></td>';
|
63 |
$html .= '<td><button id="card_delete" title="Delete"';
|
66 |
$i++;
|
67 |
}
|
68 |
} else {
|
69 |
+
$html .="<tr><th>No Card Available</th></tr>";
|
70 |
}
|
71 |
|
72 |
return $html;
|
73 |
}
|
74 |
|
75 |
|
76 |
+
|
77 |
+
|
78 |
/**
|
79 |
* Returns Profile Data for Card Managment
|
80 |
+
*
|
81 |
* @return string
|
82 |
*/
|
83 |
public function getCcCustomerToken() {
|
90 |
->setOrder('CC_CREATED', 'DESC');
|
91 |
|
92 |
return $collection;
|
93 |
+
}
|
94 |
|
95 |
}
|
96 |
?>
|
99 |
function deleteCardDataController(rowNum, requestUrl) {
|
100 |
|
101 |
var tokenNumberId = "token_num_" + rowNum;
|
102 |
+
var customerId = "customer_id_" + rowNum;
|
103 |
var delId = document.getElementById(tokenNumberId).value;
|
104 |
+
var customerId = document.getElementById(customerId).value;
|
105 |
|
106 |
+
var data = {"cc_id": delId, "customerId": customerId};
|
107 |
|
108 |
new Ajax.Request(requestUrl, {
|
109 |
method: 'Post',
|
110 |
+
parameters: data,
|
111 |
onComplete: function (transport) {
|
112 |
+
alert(transport.responseText); //return false;
|
113 |
+
window.location.reload();
|
114 |
}
|
115 |
});
|
116 |
|
app/code/community/Cardconnect/Ccgateway/Model/Standard.php
CHANGED
@@ -870,15 +870,17 @@ class Cardconnect_Ccgateway_Model_Standard extends Mage_Payment_Model_Method_Abs
|
|
870 |
|
871 |
// Function for Delete Profile webservices
|
872 |
|
873 |
-
function deleteWalletDataService($profileRowId) {
|
874 |
|
875 |
$username = $this->getConfigData('username');
|
876 |
$merchid = $this->getConfigData('merchant');
|
877 |
$cc_password = $this->getConfigData('password');
|
878 |
|
879 |
-
if
|
880 |
-
|
881 |
-
|
|
|
|
|
882 |
}
|
883 |
|
884 |
$collection = Mage::getModel('cardconnect_ccgateway/cardconnect_wallet')->getCollection()
|
@@ -901,7 +903,6 @@ class Cardconnect_Ccgateway_Model_Standard extends Mage_Payment_Model_Method_Abs
|
|
901 |
|
902 |
if (($response['resptext'] === "Profile Deleted") || ($response['resptext'] === "Profile not found")) {
|
903 |
$resource = Mage::getSingleton('core/resource');
|
904 |
-
$readConnection = $resource->getConnection('core_read');
|
905 |
$writeConnection = $resource->getConnection('core_write');
|
906 |
|
907 |
$getTable = $resource->getTableName('cardconnect_wallet');
|
@@ -921,6 +922,10 @@ class Cardconnect_Ccgateway_Model_Standard extends Mage_Payment_Model_Method_Abs
|
|
921 |
Mage::log($myLogMessage, Zend_Log::ERR , "cc.log" );
|
922 |
$msg = "We are unable to perform the requested action, please contact customer service.";
|
923 |
}
|
|
|
|
|
|
|
|
|
924 |
}
|
925 |
|
926 |
return $msg;
|
870 |
|
871 |
// Function for Delete Profile webservices
|
872 |
|
873 |
+
function deleteWalletDataService($profileRowId, $ccUserId= "") {
|
874 |
|
875 |
$username = $this->getConfigData('username');
|
876 |
$merchid = $this->getConfigData('merchant');
|
877 |
$cc_password = $this->getConfigData('password');
|
878 |
|
879 |
+
if(empty($ccUserId)){
|
880 |
+
if (Mage::getSingleton('customer/session')->isLoggedIn()) {
|
881 |
+
$customerData = Mage::getSingleton('customer/session')->getCustomer();
|
882 |
+
$ccUserId = $customerData->getId();
|
883 |
+
}
|
884 |
}
|
885 |
|
886 |
$collection = Mage::getModel('cardconnect_ccgateway/cardconnect_wallet')->getCollection()
|
903 |
|
904 |
if (($response['resptext'] === "Profile Deleted") || ($response['resptext'] === "Profile not found")) {
|
905 |
$resource = Mage::getSingleton('core/resource');
|
|
|
906 |
$writeConnection = $resource->getConnection('core_write');
|
907 |
|
908 |
$getTable = $resource->getTableName('cardconnect_wallet');
|
922 |
Mage::log($myLogMessage, Zend_Log::ERR , "cc.log" );
|
923 |
$msg = "We are unable to perform the requested action, please contact customer service.";
|
924 |
}
|
925 |
+
}else{
|
926 |
+
$myLogMessage = "CC Delete Profile Service : ". __FILE__ . " @ " . __LINE__;
|
927 |
+
Mage::log($myLogMessage, Zend_Log::ERR , "cc.log" );
|
928 |
+
$msg = "We are unable to perform the requested action, please contact customer service.";
|
929 |
}
|
930 |
|
931 |
return $msg;
|
app/code/community/Cardconnect/Ccgateway/controllers/PaymentController.php
CHANGED
@@ -329,4 +329,18 @@ class Cardconnect_Ccgateway_PaymentController extends Mage_Core_Controller_Front
|
|
329 |
->setBody($json);
|
330 |
}
|
331 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
332 |
}
|
329 |
->setBody($json);
|
330 |
}
|
331 |
|
332 |
+
/**
|
333 |
+
* To delete wallet profile
|
334 |
+
*/
|
335 |
+
public function deletewalletAction() {
|
336 |
+
|
337 |
+
$walletid = $this->getRequest()->getParam('cc_id');
|
338 |
+
$customerId = $this->getRequest()->getParam('customerId');
|
339 |
+
|
340 |
+
$response = Mage::getModel('ccgateway/standard')->deleteWalletDataService($walletid, $customerId);
|
341 |
+
|
342 |
+
echo $response;
|
343 |
+
exit;
|
344 |
+
}
|
345 |
+
|
346 |
}
|
app/code/community/Cardconnect/Ccgateway/etc/config.xml
CHANGED
@@ -35,7 +35,7 @@ to license@magentocommerce.com so we can send you a copy immediately.
|
|
35 |
<config>
|
36 |
<modules>
|
37 |
<Cardconnect_Ccgateway>
|
38 |
-
<version>1.0.
|
39 |
</Cardconnect_Ccgateway>
|
40 |
</modules>
|
41 |
<global>
|
35 |
<config>
|
36 |
<modules>
|
37 |
<Cardconnect_Ccgateway>
|
38 |
+
<version>1.0.5</version>
|
39 |
</Cardconnect_Ccgateway>
|
40 |
</modules>
|
41 |
<global>
|
js/cardconnect/ccgateway.js
CHANGED
@@ -215,7 +215,7 @@ function valid_credit_card(value, isTestMode)
|
|
215 |
else {
|
216 |
document.getElementById("testError").style.display = "block";
|
217 |
document.getElementById("testError").innerHTML = "Please Enter valid card data.";
|
218 |
-
|
219 |
document.getElementById("ccgateway_cc_number_org").focus();
|
220 |
stopLoading();
|
221 |
return false;
|
215 |
else {
|
216 |
document.getElementById("testError").style.display = "block";
|
217 |
document.getElementById("testError").innerHTML = "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;
|
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&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-
|
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="a36241555adfc297c65baa365c627696"/><dir name="Adminhtml"><dir name="Customer"><file name="Data.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.5</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;amp;apos;avis des clients sur votre site ecommerce.</summary>
|
10 |
+
<description>Avis Verifies vous permet de recolter l&amp;amp;amp;apos;avis de vos clients suite &amp;#xE0; leur achat sur votre boutique ecommerce. Essayez gratuitement notre solution sur www.avis-verifies.com et commencez maintenant &amp;#xE0; r&amp;#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-07-02</date>
|
14 |
+
<time>08:59:22</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="a36241555adfc297c65baa365c627696"/><dir name="Adminhtml"><dir name="Customer"><file name="Data.php" hash="355316bbd2d959b04d26f732c64ca9a2"/><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="d3b7b5ec66eb4a4ec8f8d5b0a934935b"/></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="28867ca0604f6cd74060c4aa5de98553"/><file name="Form.php" hash="5c92b69b370998bb3b873ffb4484ec09"/><file name="Info.php" hash="3c47b946295f2cf51acd9e7e841a7f77"/><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="715b8c211d37202edd010fbb4342e82a"/><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="393419bf1ff4555f39e37deee2c7794f"/></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="e18bb5127241bc30200dfa201361a190"/><file name="PaymentController.php" hash="6e0a6073cf30db9c710ee804dddf4965"/></dir><dir name="etc"><file name="config.xml" hash="812b1f7029cc2219b672cb9d809196e1"/><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="eac8d5ee15ec6943fefc4dbbdef74671"/></dir></target><target name="magedesign"><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><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="2aa4b7b3972908e268189a603957c3f2"/><file name="index.phtml" hash="32f863e7bd2c3c05ac6aefab63283154"/><file name="new.phtml" hash="ce08646f609cce75445a03bf9821c227"/></dir><file name="form.phtml" hash="1ade6fdd45536141701d98fc547ce9cd"/><file name="info.phtml" hash="c107ff370b915cd6cc0bf49c1a36363b"/><file name="redirect.phtml" hash="4b3964b41e6e55bf54039f758e74560e"/></dir></dir></dir></dir></dir></target><target name="mage"><dir name="js"><dir name="cardconnect"><file name="ccgateway.js" hash="b3e32c34bd87cc8b377081b81714b54a"/></dir></dir></target><target name="mageskin"><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><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><file name="cardconnect.css" hash="eb4c6d523d8e0b694c9231648a389a7e"/></dir></dir></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>
|