payitsimplepayment - Version 1.0.4

Version Notes

Some text changes.

Download this release

Release Info

Developer Eric Benayoun
Extension payitsimplepayment
Version 1.0.4
Comparing to
See all releases


Code changes from version 1.0.3 to 1.0.4

app/code/community/PayItSimple/Payment/Block/Form/Pis.php CHANGED
@@ -1,31 +1,31 @@
1
- <?php
2
-
3
- class PayItSimple_Payment_Block_Form_Pis extends Mage_Payment_Block_Form_Cc
4
- {
5
- protected function _construct()
6
- {
7
- parent::_construct();
8
- $this->setTemplate('payitsimple/form/pis.phtml');
9
- }
10
-
11
- public function getAvailableInstallments()
12
- {
13
- $method = $this->getMethod();
14
- $installments = array();
15
- $totalAmount = Mage::getSingleton('checkout/session')->getQuote()->getGrandTotal();
16
- $options = Mage::getModel('pis_payment/source_installments')->toOptionArray();
17
- foreach (explode(',', $method->getConfigData('available_installments')) as $n) {
18
- if (isset($options[$n]['label'])) $installments[$n] = $options[$n]['label'] .' '. $this->__('of') . ' ' . $this->helper('checkout')->formatPrice(round($totalAmount/$n,2));
19
- }
20
- return $installments;
21
- }
22
-
23
- public function getMethodLabelAfterHtml(){
24
- $markFaq = Mage::getConfig()->getBlockClassName('core/template');
25
- $markFaq = new $markFaq;
26
- $markFaq->setTemplate('payitsimple/form/method_faq.phtml')
27
- ->setPaymentInfoEnabled($this->getMethod()->getConfigData('faq_link_enabled'))
28
- ->setPaymentInfoTitle($this->getMethod()->getConfigData('faq_link_title'));
29
- return $markFaq->toHtml();
30
- }
31
- }
1
+ <?php
2
+
3
+ class PayItSimple_Payment_Block_Form_Pis extends Mage_Payment_Block_Form_Cc
4
+ {
5
+ protected function _construct()
6
+ {
7
+ parent::_construct();
8
+ $this->setTemplate('payitsimple/form/pis.phtml');
9
+ }
10
+
11
+ public function getAvailableInstallments()
12
+ {
13
+ $method = $this->getMethod();
14
+ $installments = array();
15
+ $totalAmount = Mage::getSingleton('checkout/session')->getQuote()->getGrandTotal();
16
+ $options = Mage::getModel('pis_payment/source_installments')->toOptionArray();
17
+ foreach (explode(',', $method->getConfigData('available_installments')) as $n) {
18
+ if (isset($options[$n]['label'])) $installments[$n] = $options[$n]['label'] .' '. $this->__('of') . ' ' . $this->helper('checkout')->formatPrice(round($totalAmount/$n,2));
19
+ }
20
+ return $installments;
21
+ }
22
+
23
+ public function getMethodLabelAfterHtml(){
24
+ $markFaq = Mage::getConfig()->getBlockClassName('core/template');
25
+ $markFaq = new $markFaq;
26
+ $markFaq->setTemplate('payitsimple/form/method_faq.phtml')
27
+ ->setPaymentInfoEnabled($this->getMethod()->getConfigData('faq_link_enabled'))
28
+ ->setPaymentInfoTitle($this->getMethod()->getConfigData('faq_link_title'));
29
+ return $markFaq->toHtml();
30
+ }
31
+ }
app/code/community/PayItSimple/Payment/Block/Info/Pis.php CHANGED
@@ -11,7 +11,7 @@ class PayItSimple_Payment_Block_Info_Pis extends Mage_Payment_Block_Info_Cc
11
$transport = new Varien_Object();
12
$transport = parent::_prepareSpecificInformation($transport);
13
$transport->addData(array(
14
- Mage::helper('payment')->__('Installments No#') => $info->getInstallmentsNo(),
15
));
16
return $transport;
17
}
11
$transport = new Varien_Object();
12
$transport = parent::_prepareSpecificInformation($transport);
13
$transport->addData(array(
14
+ Mage::helper('payment')->__('No# of Installments:') => $info->getInstallmentsNo(),
15
));
16
return $transport;
17
}
app/code/community/PayItSimple/Payment/etc/config.xml CHANGED
@@ -1,129 +1,129 @@
1
- <?xml version="1.0"?>
2
- <config>
3
- <modules>
4
- <PayItSimple_Payment>
5
- <version>1.0.3</version>
6
- </PayItSimple_Payment>
7
- </modules>
8
- <frontend>
9
- <routers>
10
- <payitsimple>
11
- <use>standard</use>
12
- <args>
13
- <module>PayItSimple_Payment</module>
14
- <frontName>payitsimple</frontName>
15
- </args>
16
- </payitsimple>
17
- </routers>
18
- <layout>
19
- <updates>
20
- <payitsimple>
21
- <file>pis_payment.xml</file>
22
- </payitsimple>
23
- </updates>
24
- </layout>
25
- </frontend>
26
- <admin>
27
- <routers>
28
- <adminhtml>
29
- <args>
30
- <modules>
31
- <payitsimple after="Mage_Adminhtml">PayItSimple_Payment</payitsimple>
32
- </modules>
33
- </args>
34
- </adminhtml>
35
- </routers>
36
- </admin>
37
- <adminhtml>
38
- <layout>
39
- <updates>
40
- <pis_notification>
41
- <file>payitsimple_notification.xml</file>
42
- </pis_notification>
43
- </updates>
44
- </layout>
45
- </adminhtml>
46
- <global>
47
- <fieldsets>
48
- <sales_convert_quote_payment>
49
- <installments_no>
50
- <to_order_payment>*</to_order_payment>
51
- </installments_no>
52
- </sales_convert_quote_payment>
53
- </fieldsets>
54
- <models>
55
- <pis_payment>
56
- <class>PayItSimple_Payment_Model</class>
57
- <resourceModel>pis_payment_mysql4</resourceModel>
58
- </pis_payment>
59
- <pis_payment_mysql4>
60
- <class>PayItSimple_Payment_Model_Mysql4</class>
61
- <entities>
62
- <pis_payment>
63
- <table>pis_payment</table>
64
- </pis_payment>
65
- </entities>
66
- </pis_payment_mysql4>
67
- </models>
68
- <resources>
69
- <pis_payment_setup>
70
- <setup>
71
- <module>PayItSimple_Payment</module>
72
- </setup>
73
- <connection>
74
- <use>core_setup</use>
75
- </connection>
76
- </pis_payment_setup>
77
- <pis_payment_write>
78
- <connection>
79
- <use>core_write</use>
80
- </connection>
81
- </pis_payment_write>
82
- <pis_payment_read>
83
- <connection>
84
- <use>core_read</use>
85
- </connection>
86
- </pis_payment_read>
87
- </resources>
88
- <blocks>
89
- <pis_payment>
90
- <class>PayItSimple_Payment_Block</class>
91
- </pis_payment>
92
- </blocks>
93
- <helpers>
94
- <pis_payment>
95
- <class>PayItSimple_Payment_Helper</class>
96
- </pis_payment>
97
- </helpers>
98
- </global>
99
- <default>
100
- <payment>
101
- <pis_cc>
102
- <active>0</active>
103
- <model>pis_payment/pisMethod</model>
104
- <order_status>processing</order_status>
105
- <payment_action>authorize</payment_action>
106
- <title>Pay with INTEREST FREE installments</title>
107
- <faq_link_enabled>1</faq_link_enabled>
108
- <faq_link_title>Tell me more</faq_link_title>
109
- <api_url>https://web-api.payitsimple.com/</api_url>
110
- <api_url_sandbox>https://web-api-sandbox.payitsimple.com/</api_url_sandbox>
111
- <sandbox_flag>0</sandbox_flag>
112
- <debug>0</debug>
113
- <cctypes>MC,VI</cctypes>
114
- <allowspecific>1</allowspecific>
115
- <specificcountry>US</specificcountry>
116
- <centinel>0</centinel>
117
- <useccv>1</useccv>
118
- <centinel_is_mode_strict>0</centinel_is_mode_strict>
119
- </pis_cc>
120
- </payment>
121
- </default>
122
- <phpunit>
123
- <suite>
124
- <modules>
125
- <PayItSimple_Payment/>
126
- </modules>
127
- </suite>
128
- </phpunit>
129
</config>
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <PayItSimple_Payment>
5
+ <version>1.0.4</version>
6
+ </PayItSimple_Payment>
7
+ </modules>
8
+ <frontend>
9
+ <routers>
10
+ <payitsimple>
11
+ <use>standard</use>
12
+ <args>
13
+ <module>PayItSimple_Payment</module>
14
+ <frontName>payitsimple</frontName>
15
+ </args>
16
+ </payitsimple>
17
+ </routers>
18
+ <layout>
19
+ <updates>
20
+ <payitsimple>
21
+ <file>pis_payment.xml</file>
22
+ </payitsimple>
23
+ </updates>
24
+ </layout>
25
+ </frontend>
26
+ <admin>
27
+ <routers>
28
+ <adminhtml>
29
+ <args>
30
+ <modules>
31
+ <payitsimple after="Mage_Adminhtml">PayItSimple_Payment</payitsimple>
32
+ </modules>
33
+ </args>
34
+ </adminhtml>
35
+ </routers>
36
+ </admin>
37
+ <adminhtml>
38
+ <layout>
39
+ <updates>
40
+ <pis_notification>
41
+ <file>payitsimple_notification.xml</file>
42
+ </pis_notification>
43
+ </updates>
44
+ </layout>
45
+ </adminhtml>
46
+ <global>
47
+ <fieldsets>
48
+ <sales_convert_quote_payment>
49
+ <installments_no>
50
+ <to_order_payment>*</to_order_payment>
51
+ </installments_no>
52
+ </sales_convert_quote_payment>
53
+ </fieldsets>
54
+ <models>
55
+ <pis_payment>
56
+ <class>PayItSimple_Payment_Model</class>
57
+ <resourceModel>pis_payment_mysql4</resourceModel>
58
+ </pis_payment>
59
+ <pis_payment_mysql4>
60
+ <class>PayItSimple_Payment_Model_Mysql4</class>
61
+ <entities>
62
+ <pis_payment>
63
+ <table>pis_payment</table>
64
+ </pis_payment>
65
+ </entities>
66
+ </pis_payment_mysql4>
67
+ </models>
68
+ <resources>
69
+ <pis_payment_setup>
70
+ <setup>
71
+ <module>PayItSimple_Payment</module>
72
+ </setup>
73
+ <connection>
74
+ <use>core_setup</use>
75
+ </connection>
76
+ </pis_payment_setup>
77
+ <pis_payment_write>
78
+ <connection>
79
+ <use>core_write</use>
80
+ </connection>
81
+ </pis_payment_write>
82
+ <pis_payment_read>
83
+ <connection>
84
+ <use>core_read</use>
85
+ </connection>
86
+ </pis_payment_read>
87
+ </resources>
88
+ <blocks>
89
+ <pis_payment>
90
+ <class>PayItSimple_Payment_Block</class>
91
+ </pis_payment>
92
+ </blocks>
93
+ <helpers>
94
+ <pis_payment>
95
+ <class>PayItSimple_Payment_Helper</class>
96
+ </pis_payment>
97
+ </helpers>
98
+ </global>
99
+ <default>
100
+ <payment>
101
+ <pis_cc>
102
+ <active>0</active>
103
+ <model>pis_payment/pisMethod</model>
104
+ <order_status>processing</order_status>
105
+ <payment_action>authorize</payment_action>
106
+ <title>Pay with INTEREST FREE installments</title>
107
+ <faq_link_enabled>1</faq_link_enabled>
108
+ <faq_link_title>Tell me more</faq_link_title>
109
+ <api_url>https://web-api.payitsimple.com/</api_url>
110
+ <api_url_sandbox>https://web-api-sandbox.payitsimple.com/</api_url_sandbox>
111
+ <sandbox_flag>0</sandbox_flag>
112
+ <debug>0</debug>
113
+ <cctypes>MC,VI</cctypes>
114
+ <allowspecific>1</allowspecific>
115
+ <specificcountry>US</specificcountry>
116
+ <centinel>0</centinel>
117
+ <useccv>1</useccv>
118
+ <centinel_is_mode_strict>0</centinel_is_mode_strict>
119
+ </pis_cc>
120
+ </payment>
121
+ </default>
122
+ <phpunit>
123
+ <suite>
124
+ <modules>
125
+ <PayItSimple_Payment/>
126
+ </modules>
127
+ </suite>
128
+ </phpunit>
129
</config>
app/design/frontend/base/default/template/payitsimple/form/pis.phtml CHANGED
@@ -73,7 +73,7 @@
73
<li>
74
<input style="float: left; margin-right: 5px; margin-top: 2px;" type="checkbox" id="<?php echo $_code ?>_terms" name="payment[terms]" class="required-entry" value="1" />
75
<label for="<?php echo $_code ?>_terms" class="required">
76
- <em>*</em><?php echo $this->__('I acknowledge that I have read and agree to the %s terms and conditions %s','<a href="#" style="float:none; margin-left:0px;" onclick="popWin(\'' . $this->getUrl('payitsimple/payment/terms') . "', 'terms and conditions', 'width=800,height=607,left=0,top=0,location=no,status=no,scrollbars=yes,resizable=no'); return false;\">",'</a>') ?>
77
</label>
78
</li>
79
<li>
73
<li>
74
<input style="float: left; margin-right: 5px; margin-top: 2px;" type="checkbox" id="<?php echo $_code ?>_terms" name="payment[terms]" class="required-entry" value="1" />
75
<label for="<?php echo $_code ?>_terms" class="required">
76
+ <em>*</em><?php echo $this->__('I acknowledge that I have read and agree to the %s terms and conditions %s','<a href="#" style="float:none; margin-left:0px;" onclick="popWin(\'' . 'http://www.payitsimple.com/legal/customers-terms-and-conditions/' . "', 'terms and conditions', 'width=750,height=607,left=0,top=0,location=no,status=no,scrollbars=yes,resizable=no'); return false;\">",'</a>') ?>
77
</label>
78
</li>
79
<li>
package.xml CHANGED
@@ -1,22 +1,6 @@
1
<?xml version="1.0"?>
2
- <package>
3
- <name>payitsimplepayment</name>
4
- <version>1.0.3</version>
5
- <stability>stable</stability>
6
- <license uri="http://opensource.org/licenses/osl-3.0.php">OSL</license>
7
- <channel>community</channel>
8
- <extends/>
9
- <summary>Offer your customers interest-free credit card installment payments. Official extension.</summary>
10
- <description>This extension allows ecommerce merchants to add an additional payment method to your checkout process. A PayItSimple button is added to your website for fast and easy checkout.&lt;br /&gt;&#xD;
11
- It was carefully designed to meet all Magento best development practices and is compatible with all other extensions. This extension is free of charge.&lt;br /&gt;&lt;br /&gt;&#xD;
12
- &#xD;
13
- &lt;h3&gt;Signup for FREE&lt;/h3&gt;&#xD;
14
- &lt;a href="http://payitsimple.com/register/"&gt;Signup with PayItSimple for FREE and start offering your customers interest-free installment payments on their existing credit cards.&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;</description>
15
- <notes>Small improvement</notes>
16
- <authors><author><name>Eric Benayoun</name><user>ericbena</user><email>ericb@payitsimple.com</email></author></authors>
17
- <date>2015-01-14</date>
18
- <time>21:14:52</time>
19
- <contents><target name="magecommunity"><dir name="PayItSimple"><dir name="Payment"><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Form"><file name="Button.php" hash="1d46f9171f8b9017aff4bda66c23f160"/></dir><file name="Notification.php" hash="27ac86d84fe3927c28abc6da018736cd"/></dir></dir></dir><dir name="Form"><file name="Pis.php" hash="eb1a2b7c8b05543b8b7a6654987e86d2"/></dir><dir name="Info"><file name="Pis.php" hash="2e461d695cc1309fb8a51d33cc46c86d"/></dir></dir><dir name="Helper"><file name="Data.php" hash="1fba2ce41eb4f554e365d82424323ccd"/></dir><dir name="Model"><file name="Api.php" hash="70ff5eac35f63af69678a31033b3c341"/><file name="PisMethod.php" hash="521455c095a9c4c34459ca862e822395"/><dir name="Source"><file name="Action.php" hash="1390fb3dce78cf8eff1118df2ee5b997"/><file name="Cctype.php" hash="7f77a0c6729d0896c8ec250bb7f4fd49"/><file name="Installments.php" hash="65b727e639308cba4241662a2040d6f3"/></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="PayitsimpleController.php" hash="4e7a1a3d4dfca38656aa32da9ef70df8"/></dir><file name="PaymentController.php" hash="598f81b5afec4b73d2d14bf4a309e848"/></dir><dir name="etc"><file name="config.xml" hash="49b86a87bd29e1bd745298da08f78524"/><file name="system.xml" hash="c8afdb5921e81f4c4b70146b6d00cab1"/></dir><dir name="sql"><dir name="pis_payment_setup"><file name="mysql4-install-1.0.0.php" hash="8a7677c4ec0aa7906fabbba92efe1eed"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="payitsimple_notification.xml" hash="4ace8359849725965c7ad2e13bf64f07"/></dir><dir name="template"><dir name="payitsimple"><dir><dir name="system"><dir name="config"><file name="button.phtml" hash="b59617f95422a9db03aa410055066df3"/><file name="notification.phtml" hash="27ef3ed68855ba5cd8736df38229e5bf"/></dir></dir></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="pis_payment.xml" hash="9f0521aea108f9e3f9b9c777c6aefee3"/></dir><dir name="template"><dir name="payitsimple"><dir><dir name="form"><file name="method_faq.phtml" hash="6d64f3be6f4a8bd8c3e84a0977b46705"/><file name="pis.phtml" hash="8ffeb0feac3165202705e2b120f2db83"/></dir></dir><file name="help.phtml" hash="78a8c27a89e6a64c2b4a8222ccbc0349"/><file name="terms.phtml" hash="6dd4a1a66a29edbb6deaede13c3f159e"/></dir></dir></dir></dir></dir></target><target name="mage"><dir name="app"><dir name="etc"><dir name="modules"><file name="PayItSimple_Payment.xml" hash="608e164d747a215efa2cf4d062693236"/></dir></dir></dir></target></contents>
20
- <compatible/>
21
- <dependencies><required><php><min>5.3.8</min><max>5.6.0</max></php></required></dependencies>
22
- </package>
1
<?xml version="1.0"?>
2
+ <package><name>payitsimplepayment</name><version>1.0.4</version><stability>stable</stability><license>OSL</license><channel>community</channel><extends></extends><summary>Offer your customers interest-free credit card installment payments. Official extension.</summary><description>This extension allows ecommerce merchants to add an additional payment method to your checkout process. A PayItSimple button is added to your website for fast and easy checkout.&lt;br /&gt;
3
+ It was carefully designed to meet all Magento best development practices and is compatible with all other extensions. This extension is free of charge.&lt;br /&gt;&lt;br /&gt;
4
+
5
+ &lt;h3&gt;Signup for FREE&lt;/h3&gt;
6
+ &lt;a href="http://payitsimple.com/register/"&gt;Signup with PayItSimple for FREE and start offering your customers interest-free installment payments on their existing credit cards.&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;</description><notes>Some text changes.</notes><authors><author><name>Eric Benayoun</name><user>ericbena</user><email>ericb@payitsimple.com</email></author></authors><date>2015-01-30</date><time>12:19:05</time><compatible></compatible><dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies><contents><target name="mage"><dir name="app"><dir name="code"><dir name="community"><dir name="PayItSimple"><dir name="Payment"><dir name="etc"><file name="config.xml" hash="c27dd7d858789f6f7ea50eeada1ed03c"/><file name="system.xml" hash="c8afdb5921e81f4c4b70146b6d00cab1"/></dir><dir name="sql"><dir name="pis_payment_setup"><file name="mysql4-install-1.0.0.php" hash="8a7677c4ec0aa7906fabbba92efe1eed"/></dir></dir><dir name="Model"><file name="Api.php" hash="70ff5eac35f63af69678a31033b3c341"/><file name="PisMethod.php" hash="521455c095a9c4c34459ca862e822395"/><dir name="Source"><file name="Action.php" hash="1390fb3dce78cf8eff1118df2ee5b997"/><file name="Cctype.php" hash="7f77a0c6729d0896c8ec250bb7f4fd49"/><file name="Installments.php" hash="65b727e639308cba4241662a2040d6f3"/></dir></dir><dir name="Block"><dir name="Form"><file name="Pis.php" hash="1b7804b11f2119ddd64a464ddd882a41"/></dir><dir name="Adminhtml"><dir name="System"><dir name="Config"><file name="Notification.php" hash="27ac86d84fe3927c28abc6da018736cd"/><dir name="Form"><file name="Button.php" hash="1d46f9171f8b9017aff4bda66c23f160"/></dir></dir></dir></dir><dir name="Info"><file name="Pis.php" hash="dd56485392e42301cce7e8f9c2b61cb4"/></dir></dir><dir name="controllers"><file name="PaymentController.php" hash="598f81b5afec4b73d2d14bf4a309e848"/><dir name="Adminhtml"><file name="PayitsimpleController.php" hash="4e7a1a3d4dfca38656aa32da9ef70df8"/></dir></dir><dir name="Helper"><file name="Data.php" hash="1fba2ce41eb4f554e365d82424323ccd"/></dir></dir></dir></dir></dir><dir name="etc"><dir name="modules"><file name="PayItSimple_Payment.xml" hash="608e164d747a215efa2cf4d062693236"/></dir></dir><dir name="design"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="payitsimple"><file name="help.phtml" hash="78a8c27a89e6a64c2b4a8222ccbc0349"/><file name="terms.phtml" hash="6dd4a1a66a29edbb6deaede13c3f159e"/><dir name="form"><file name="method_faq.phtml" hash="6d64f3be6f4a8bd8c3e84a0977b46705"/><file name="pis.phtml" hash="e6d8fda242efbb2874a28b720696af4e"/></dir></dir></dir><dir name="layout"><file name="pis_payment.xml" hash="9f0521aea108f9e3f9b9c777c6aefee3"/></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="payitsimple"><dir name="system"><dir name="config"><file name="button.phtml" hash="b59617f95422a9db03aa410055066df3"/><file name="notification.phtml" hash="27ef3ed68855ba5cd8736df38229e5bf"/></dir></dir></dir></dir><dir name="layout"><file name="payitsimple_notification.xml" hash="4ace8359849725965c7ad2e13bf64f07"/></dir></dir></dir></dir></dir></dir></target></contents></package>