Cardpay_Payeezy - Version 1.0.7

Version Notes

Added ability to always save cards.

Download this release

Release Info

Developer Brian McGowan
Extension Cardpay_Payeezy
Version 1.0.7
Comparing to
See all releases


Code changes from version 1.0.6 to 1.0.7

app/code/community/Cardpay/Payeezy/Block/Form.php CHANGED
@@ -39,7 +39,7 @@ class Cardpay_Payeezy_Block_Form extends Mage_Payment_Block_Form_Cc
39
  *
40
  * @return bool if can save
41
  */
42
- public function canSaveCard()
43
  {
44
  $methodRegister = Mage_Checkout_Model_Type_Onepage::METHOD_REGISTER;
45
  if (Mage::getModel('payeezy/paymentmethod')->getConfigData('use_vault')
39
  *
40
  * @return bool if can save
41
  */
42
+ public function canSaveCard()
43
  {
44
  $methodRegister = Mage_Checkout_Model_Type_Onepage::METHOD_REGISTER;
45
  if (Mage::getModel('payeezy/paymentmethod')->getConfigData('use_vault')
app/code/community/Cardpay/Payeezy/Model/Paymentmethod.php CHANGED
@@ -80,7 +80,7 @@ class Cardpay_Payeezy_Model_PaymentMethod extends Mage_Payment_Model_Method_Cc
80
  ->setParentTransactionId(null)
81
  ->setCcAvsStatus(Mage::helper('payeezy')->getAvsResponse($response->avs))
82
  ->setCcCidStatus(Mage::helper('payeezy')->getCvvResponse($response->cvv2));
83
- if (isset($post['payment']['save_card'])) {
84
  $this->saveCard($payment, $response->token->token_data->value);
85
  }
86
  return $this;
@@ -154,7 +154,7 @@ class Cardpay_Payeezy_Model_PaymentMethod extends Mage_Payment_Model_Method_Cc
154
  ->setParentTransactionId(null)
155
  ->setCcAvsStatus(Mage::helper('payeezy')->getAvsResponse($response->avs))
156
  ->setCcCidStatus(Mage::helper('payeezy')->getCvvResponse($response->cvv2));
157
- if (isset($post['payment']['save_card'])) {
158
  $this->saveCard($payment, $response->token->token_data->value);
159
  }
160
  return $this;
80
  ->setParentTransactionId(null)
81
  ->setCcAvsStatus(Mage::helper('payeezy')->getAvsResponse($response->avs))
82
  ->setCcCidStatus(Mage::helper('payeezy')->getCvvResponse($response->cvv2));
83
+ if (isset($post['payment']['save_card']) || ($this->getConfigData('use_vault') == 2 && empty($post['payment']['token']))) {
84
  $this->saveCard($payment, $response->token->token_data->value);
85
  }
86
  return $this;
154
  ->setParentTransactionId(null)
155
  ->setCcAvsStatus(Mage::helper('payeezy')->getAvsResponse($response->avs))
156
  ->setCcCidStatus(Mage::helper('payeezy')->getCvvResponse($response->cvv2));
157
+ if (isset($post['payment']['save_card']) || ($this->getConfigData('use_vault') == 2 && empty($post['payment']['token']))) {
158
  $this->saveCard($payment, $response->token->token_data->value);
159
  }
160
  return $this;
app/code/community/Cardpay/Payeezy/Model/Source/Ccstore.php ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Cardpay Solutions, Inc.
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is available through the world-wide-web at this URL:
9
+ * http://opensource.org/licenses/osl-3.0.php
10
+ *
11
+ * PHP version 5
12
+ *
13
+ * @category Cardpay
14
+ * @package Cardpay_Payeezy
15
+ * @copyright Copyright (c) 2015 Cardpay Solutions, Inc. (http://www.cardpaysolutions.com)
16
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
17
+ */
18
+
19
+ /**
20
+ * First Data Payeezy credit card store source model.
21
+ *
22
+ * @category Cardpay
23
+ * @package Cardpay_Payeezy
24
+ * @author Cardpay Solutions, Inc. <sales@cardpaysolutions.com>
25
+ */
26
+ class Cardpay_Payeezy_Model_Source_Ccstore
27
+ {
28
+ /**
29
+ * Allowed credit cards to be stored
30
+ */
31
+ public function toOptionArray()
32
+ {
33
+ return array(
34
+ array(
35
+ 'value' => false,
36
+ 'label' => 'Disabled'
37
+ ),
38
+ array(
39
+ 'value' => 1,
40
+ 'label' => 'Ask the customer'
41
+ ),
42
+ array(
43
+ 'value' => 2,
44
+ 'label' => 'Save without asking'
45
+ ),
46
+ );
47
+ }
48
+ }
app/code/community/Cardpay/Payeezy/etc/config.xml CHANGED
@@ -20,7 +20,7 @@
20
  <congig>
21
  <modules>
22
  <Cardpay_Payeezy>
23
- <version>1.0.6</version>
24
  </Cardpay_Payeezy>
25
  </modules>
26
  <global>
@@ -81,7 +81,7 @@
81
  <allowspecific>0</allowspecific>
82
  <currency>USD</currency>
83
  <useccv>1</useccv>
84
- <use_vault>1</use_vault>
85
  </payeezy>
86
  </payment>
87
  </default>
20
  <congig>
21
  <modules>
22
  <Cardpay_Payeezy>
23
+ <version>1.0.7</version>
24
  </Cardpay_Payeezy>
25
  </modules>
26
  <global>
81
  <allowspecific>0</allowspecific>
82
  <currency>USD</currency>
83
  <useccv>1</useccv>
84
+ <use_vault>0</use_vault>
85
  </payeezy>
86
  </payment>
87
  </default>
app/code/community/Cardpay/Payeezy/etc/system.xml CHANGED
@@ -36,7 +36,7 @@
36
  <sort_order>1</sort_order>
37
  <show_in_default>1</show_in_default>
38
  <show_in_website>1</show_in_website>
39
- <show_in_store>0</show_in_store>
40
  </active>
41
  <title translate="label">
42
  <label>Title</label>
@@ -54,7 +54,7 @@
54
  <sort_order>3</sort_order>
55
  <show_in_default>1</show_in_default>
56
  <show_in_website>1</show_in_website>
57
- <show_in_store>0</show_in_store>
58
  </test_mode>
59
  <merchant_token translate="label">
60
  <label>Merchant Token</label>
@@ -63,7 +63,7 @@
63
  <sort_order>4</sort_order>
64
  <show_in_default>1</show_in_default>
65
  <show_in_website>1</show_in_website>
66
- <show_in_store>0</show_in_store>
67
  </merchant_token>
68
  <order_status translate="label">
69
  <label>New order status</label>
@@ -73,7 +73,7 @@
73
  <sort_order>5</sort_order>
74
  <show_in_default>1</show_in_default>
75
  <show_in_website>1</show_in_website>
76
- <show_in_store>0</show_in_store>
77
  </order_status>
78
  <payment_action translate="label">
79
  <label>Payment Action</label>
@@ -82,7 +82,7 @@
82
  <sort_order>6</sort_order>
83
  <show_in_default>1</show_in_default>
84
  <show_in_website>1</show_in_website>
85
- <show_in_store>0</show_in_store>
86
  </payment_action>
87
  <currency translate="label">
88
  <label>Accepted Currency</label>
@@ -92,7 +92,7 @@
92
  <sort_order>7</sort_order>
93
  <show_in_default>1</show_in_default>
94
  <show_in_website>1</show_in_website>
95
- <show_in_store>0</show_in_store>
96
  </currency>
97
  <cctypes translate="label">
98
  <label>Credit Card Types</label>
@@ -102,7 +102,7 @@
102
  <sort_order>8</sort_order>
103
  <show_in_default>1</show_in_default>
104
  <show_in_website>1</show_in_website>
105
- <show_in_store>0</show_in_store>
106
  </cctypes>
107
  <useccv translate="label">
108
  <label>Credit Card Verification</label>
@@ -112,17 +112,17 @@
112
  <sort_order>9</sort_order>
113
  <show_in_default>1</show_in_default>
114
  <show_in_website>1</show_in_website>
115
- <show_in_store>0</show_in_store>
116
  </useccv>
117
  <use_vault translate="label">
118
  <label>Allow Stored Cards</label>
119
  <comment><![CDATA[Allow a logged in customer to save credit cards for future use. PCI Compliant TransArmor Tokenization.]]></comment>
120
  <frontend_type>select</frontend_type>
121
- <source_model>adminhtml/system_config_source_yesno</source_model>
122
  <sort_order>10</sort_order>
123
  <show_in_default>1</show_in_default>
124
  <show_in_website>1</show_in_website>
125
- <show_in_store>0</show_in_store>
126
  </use_vault>
127
  <ta_token translate="label">
128
  <label>TransArmor Token</label>
@@ -131,7 +131,7 @@
131
  <sort_order>11</sort_order>
132
  <show_in_default>1</show_in_default>
133
  <show_in_website>1</show_in_website>
134
- <show_in_store>0</show_in_store>
135
  </ta_token>
136
  <allowspecific translate="label">
137
  <label><![CDATA[Payment from applicable countries:]]></label>
@@ -141,7 +141,7 @@
141
  <source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
142
  <show_in_default>1</show_in_default>
143
  <show_in_website>1</show_in_website>
144
- <show_in_store>0</show_in_store>
145
  </allowspecific>
146
  <specificcountry translate="label">
147
  <label><![CDATA[Payment from Specific countries:]]></label>
@@ -151,7 +151,7 @@
151
  <source_model>adminhtml/system_config_source_country</source_model>
152
  <show_in_default>1</show_in_default>
153
  <show_in_website>1</show_in_website>
154
- <show_in_store>0</show_in_store>
155
  </specificcountry>
156
  <sort_order translate="label">
157
  <label>Sort Order</label>
@@ -160,7 +160,7 @@
160
  <sort_order>14</sort_order>
161
  <show_in_default>1</show_in_default>
162
  <show_in_website>1</show_in_website>
163
- <show_in_store>0</show_in_store>
164
  <frontend_class>validate-number</frontend_class>
165
  </sort_order>
166
  </fields>
36
  <sort_order>1</sort_order>
37
  <show_in_default>1</show_in_default>
38
  <show_in_website>1</show_in_website>
39
+ <show_in_store>1</show_in_store>
40
  </active>
41
  <title translate="label">
42
  <label>Title</label>
54
  <sort_order>3</sort_order>
55
  <show_in_default>1</show_in_default>
56
  <show_in_website>1</show_in_website>
57
+ <show_in_store>1</show_in_store>
58
  </test_mode>
59
  <merchant_token translate="label">
60
  <label>Merchant Token</label>
63
  <sort_order>4</sort_order>
64
  <show_in_default>1</show_in_default>
65
  <show_in_website>1</show_in_website>
66
+ <show_in_store>1</show_in_store>
67
  </merchant_token>
68
  <order_status translate="label">
69
  <label>New order status</label>
73
  <sort_order>5</sort_order>
74
  <show_in_default>1</show_in_default>
75
  <show_in_website>1</show_in_website>
76
+ <show_in_store>1</show_in_store>
77
  </order_status>
78
  <payment_action translate="label">
79
  <label>Payment Action</label>
82
  <sort_order>6</sort_order>
83
  <show_in_default>1</show_in_default>
84
  <show_in_website>1</show_in_website>
85
+ <show_in_store>1</show_in_store>
86
  </payment_action>
87
  <currency translate="label">
88
  <label>Accepted Currency</label>
92
  <sort_order>7</sort_order>
93
  <show_in_default>1</show_in_default>
94
  <show_in_website>1</show_in_website>
95
+ <show_in_store>1</show_in_store>
96
  </currency>
97
  <cctypes translate="label">
98
  <label>Credit Card Types</label>
102
  <sort_order>8</sort_order>
103
  <show_in_default>1</show_in_default>
104
  <show_in_website>1</show_in_website>
105
+ <show_in_store>1</show_in_store>
106
  </cctypes>
107
  <useccv translate="label">
108
  <label>Credit Card Verification</label>
112
  <sort_order>9</sort_order>
113
  <show_in_default>1</show_in_default>
114
  <show_in_website>1</show_in_website>
115
+ <show_in_store>1</show_in_store>
116
  </useccv>
117
  <use_vault translate="label">
118
  <label>Allow Stored Cards</label>
119
  <comment><![CDATA[Allow a logged in customer to save credit cards for future use. PCI Compliant TransArmor Tokenization.]]></comment>
120
  <frontend_type>select</frontend_type>
121
+ <source_model>payeezy/source_ccstore</source_model>
122
  <sort_order>10</sort_order>
123
  <show_in_default>1</show_in_default>
124
  <show_in_website>1</show_in_website>
125
+ <show_in_store>1</show_in_store>
126
  </use_vault>
127
  <ta_token translate="label">
128
  <label>TransArmor Token</label>
131
  <sort_order>11</sort_order>
132
  <show_in_default>1</show_in_default>
133
  <show_in_website>1</show_in_website>
134
+ <show_in_store>1</show_in_store>
135
  </ta_token>
136
  <allowspecific translate="label">
137
  <label><![CDATA[Payment from applicable countries:]]></label>
141
  <source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
142
  <show_in_default>1</show_in_default>
143
  <show_in_website>1</show_in_website>
144
+ <show_in_store>1</show_in_store>
145
  </allowspecific>
146
  <specificcountry translate="label">
147
  <label><![CDATA[Payment from Specific countries:]]></label>
151
  <source_model>adminhtml/system_config_source_country</source_model>
152
  <show_in_default>1</show_in_default>
153
  <show_in_website>1</show_in_website>
154
+ <show_in_store>1</show_in_store>
155
  </specificcountry>
156
  <sort_order translate="label">
157
  <label>Sort Order</label>
160
  <sort_order>14</sort_order>
161
  <show_in_default>1</show_in_default>
162
  <show_in_website>1</show_in_website>
163
+ <show_in_store>1</show_in_store>
164
  <frontend_class>validate-number</frontend_class>
165
  </sort_order>
166
  </fields>
app/design/frontend/base/default/template/payeezy/form.phtml CHANGED
@@ -97,7 +97,6 @@ $_useVault = $_loggedIn && $_model->useVault() && count($_savedCards);
97
  </li>
98
  <?php endif; ?>
99
  </ul>
100
-
101
  <script type="text/javascript">
102
  //<![CDATA[
103
  (function() {
97
  </li>
98
  <?php endif; ?>
99
  </ul>
 
100
  <script type="text/javascript">
101
  //<![CDATA[
102
  (function() {
package.xml CHANGED
@@ -1,18 +1,18 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Cardpay_Payeezy</name>
4
- <version>1.0.6</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">Open Software License (OSL)</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>First Data Payeezy payment extension with TransArmor.</summary>
10
  <description>The First Data Payeezy payment extension allows you to securely accept credit cards through your Magento store. In addition to processing one-time transactions, the extension also utilizes First Data TransArmor Tokenization to allow customers to securely store and manage credit card profiles for future use.</description>
11
- <notes>Minor bug fixes</notes>
12
  <authors><author><name>Brian McGowan</name><user>bmcgowan</user><email>bmcgowan@cardpaysolutions.com</email></author></authors>
13
- <date>2016-11-17</date>
14
- <time>17:10:09</time>
15
- <contents><target name="magecommunity"><dir name="Cardpay"><dir name="Payeezy"><dir name="Block"><file name="Creditcard.php" hash="a0d44b2d6901f147e7ba8ac1522a1f61"/><file name="Form.php" hash="35ecc9030ab25cdd83e8fb8662e1c4f1"/><file name="Info.php" hash="8c120874f2dcbea00ce1f3e11620c4e3"/></dir><dir name="Helper"><file name="Data.php" hash="7082ca56f1a091e3c76852040e88a79a"/></dir><dir name="Model"><file name="Creditcard.php" hash="97ec6c6e017bb9895dd487aed85367a1"/><file name="Paymentmethod.php" hash="6cfdf1e1a84d540f0f496568361881f1"/><dir name="Resource"><dir name="Creditcard"><file name="Collection.php" hash="6003a43e766277d0ee7e788815473783"/></dir><file name="Creditcard.php" hash="13ed47dda59c30d23382eb4af76c2293"/></dir><dir name="Source"><file name="Cctype.php" hash="9c3e10285ec4d78d17e19e49d803518b"/><file name="PaymentAction.php" hash="1ddd3037b306f1ab9cffe8f93f0cb8e3"/></dir></dir><dir name="controllers"><file name="CreditcardController.php" hash="29b0520b713ecab57c3ad619e0ff6275"/></dir><dir name="etc"><file name="config.xml" hash="1bb5bb861509eeb981e75b8a2ea85cf5"/><file name="system.xml" hash="cda46ee2b6f67d30683cf3b1a0a1b287"/></dir><dir name="sql"><dir name="payeezy_setup"><file name="install-1.0.2.php" hash="99c1f9408ce25663c185719b446b2adb"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="payeezy"><file name="form.phtml" hash="692e5aa7de607c2b577ed82df3e1cc70"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="payeezy.xml" hash="2bea5df11e86b9c8c589d1e572eea4f0"/></dir><dir name="template"><dir name="payeezy"><dir name="creditcard"><file name="delete.phtml" hash="7f52b91b36608bcaff0422490363c7fd"/><file name="edit.phtml" hash="d17445164936a0635f16e4ef79b40cff"/><file name="index.phtml" hash="27b13b140de5e8797ee955b1aeb670d6"/></dir><file name="form.phtml" hash="ec1b6c13c4e8752cabeb0ac784886da0"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Cardpay_Payeezy.xml" hash="7805ddefa49d4a140fc03668cde2c3c2"/></dir></target><target name="magelocale"><dir name="en_US"><file name="Cardpay_Payeezy.csv" hash="1dad15e42befedbf24800f845bebb60c"/></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.3.29</min><max>5.6.28</max></php></required></dependencies>
18
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Cardpay_Payeezy</name>
4
+ <version>1.0.7</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">Open Software License (OSL)</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>First Data Payeezy payment extension with TransArmor.</summary>
10
  <description>The First Data Payeezy payment extension allows you to securely accept credit cards through your Magento store. In addition to processing one-time transactions, the extension also utilizes First Data TransArmor Tokenization to allow customers to securely store and manage credit card profiles for future use.</description>
11
+ <notes>Added ability to always save cards.</notes>
12
  <authors><author><name>Brian McGowan</name><user>bmcgowan</user><email>bmcgowan@cardpaysolutions.com</email></author></authors>
13
+ <date>2016-12-02</date>
14
+ <time>19:42:17</time>
15
+ <contents><target name="magecommunity"><dir name="Cardpay"><dir name="Payeezy"><dir name="Block"><file name="Creditcard.php" hash="a0d44b2d6901f147e7ba8ac1522a1f61"/><file name="Form.php" hash="1da31944da62739205ebc87eb145164e"/><file name="Info.php" hash="8c120874f2dcbea00ce1f3e11620c4e3"/></dir><dir name="Helper"><file name="Data.php" hash="7082ca56f1a091e3c76852040e88a79a"/></dir><dir name="Model"><file name="Creditcard.php" hash="97ec6c6e017bb9895dd487aed85367a1"/><file name="Paymentmethod.php" hash="fdf3f652d43a765b0612e6227bf1b983"/><dir name="Resource"><dir name="Creditcard"><file name="Collection.php" hash="6003a43e766277d0ee7e788815473783"/></dir><file name="Creditcard.php" hash="13ed47dda59c30d23382eb4af76c2293"/></dir><dir name="Source"><file name="Ccstore.php" hash="d60a6dd080a3abee1cf17722d954a943"/><file name="Cctype.php" hash="9c3e10285ec4d78d17e19e49d803518b"/><file name="PaymentAction.php" hash="1ddd3037b306f1ab9cffe8f93f0cb8e3"/></dir></dir><dir name="controllers"><file name="CreditcardController.php" hash="29b0520b713ecab57c3ad619e0ff6275"/></dir><dir name="etc"><file name="config.xml" hash="afaf997bfe8eb1b7c3beac930afc2005"/><file name="system.xml" hash="0e33813caa063d5c4d44dcbcabb7a171"/></dir><dir name="sql"><dir name="payeezy_setup"><file name="install-1.0.2.php" hash="99c1f9408ce25663c185719b446b2adb"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="payeezy"><file name="form.phtml" hash="692e5aa7de607c2b577ed82df3e1cc70"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="payeezy.xml" hash="2bea5df11e86b9c8c589d1e572eea4f0"/></dir><dir name="template"><dir name="payeezy"><dir name="creditcard"><file name="delete.phtml" hash="7f52b91b36608bcaff0422490363c7fd"/><file name="edit.phtml" hash="d17445164936a0635f16e4ef79b40cff"/><file name="index.phtml" hash="27b13b140de5e8797ee955b1aeb670d6"/></dir><file name="form.phtml" hash="e2496157cf70e6629c76c79c1e04f3b1"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Cardpay_Payeezy.xml" hash="7805ddefa49d4a140fc03668cde2c3c2"/></dir></target><target name="magelocale"><dir name="en_US"><file name="Cardpay_Payeezy.csv" hash="1dad15e42befedbf24800f845bebb60c"/></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.3.29</min><max>5.6.28</max></php></required></dependencies>
18
  </package>