Version Notes
Fix issue where "Pay with Bitcoin" was still displayed even after plugin was disabled.
UI fixes
Download this release
Release Info
Developer | Tawfek Daghistani |
Extension | Yellow_Pay |
Version | 1.0.2 |
Comparing to | |
See all releases |
Code changes from version 1.0.1 to 1.0.2
- app/code/local/Yellow/Bitcoin/Block/Form/Bitcoin.php +1 -10
- app/code/local/Yellow/Bitcoin/Model/Bitcoin.php +3 -2
- app/code/local/Yellow/Bitcoin/etc/config.xml +1 -1
- app/code/local/Yellow/Bitcoin/etc/system.xml +2 -2
- app/design/frontend/base/default/template/bitcoin/form/bitcoin.phtml +0 -11
- app/design/frontend/base/default/template/bitcoin/form/logo.phtml +2 -5
- app/design/frontend/base/default/template/bitcoin/fullscreen/widget/footer.phtml +6 -3
- app/etc/modules/Yellow_Bitcoin.xml +1 -1
- package.xml +6 -5
- skin/frontend/base/default/css/bitcoin.css +1 -0
app/code/local/Yellow/Bitcoin/Block/Form/Bitcoin.php
CHANGED
@@ -46,15 +46,6 @@ class Yellow_Bitcoin_Block_Form_Bitcoin extends Mage_Payment_Block_Form
|
|
46 |
protected function _construct()
|
47 |
{
|
48 |
$class = Mage::getConfig()->getBlockClassName('core/template');
|
49 |
-
|
50 |
-
$guide = "";
|
51 |
-
|
52 |
-
if (Mage::helper("bitcoin")->isFullScreen()) {
|
53 |
-
$guide = new $class;
|
54 |
-
$guide->setTemplate("bitcoin/form/bitcoin.phtml");
|
55 |
-
$guide = $guide->toHtml();
|
56 |
-
}
|
57 |
-
|
58 |
try {
|
59 |
$css_block = Mage::getModel('cms/block')->setStoreId(Mage::app()->getStore()->getId())->load(self::CSS_BLOCK_ID);
|
60 |
if ($css_block->getData("is_active") == 1) {
|
@@ -76,7 +67,7 @@ class Yellow_Bitcoin_Block_Form_Bitcoin extends Mage_Payment_Block_Form
|
|
76 |
Mage::helper('bitcoin')->__('You will be paid via Yellow')
|
77 |
)
|
78 |
->setMethodTitle('')
|
79 |
-
->setMethodLabelAfterHtml($css_output . $logo->toHtml()
|
80 |
|
81 |
return parent::_construct();
|
82 |
}
|
46 |
protected function _construct()
|
47 |
{
|
48 |
$class = Mage::getConfig()->getBlockClassName('core/template');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
49 |
try {
|
50 |
$css_block = Mage::getModel('cms/block')->setStoreId(Mage::app()->getStore()->getId())->load(self::CSS_BLOCK_ID);
|
51 |
if ($css_block->getData("is_active") == 1) {
|
67 |
Mage::helper('bitcoin')->__('You will be paid via Yellow')
|
68 |
)
|
69 |
->setMethodTitle('')
|
70 |
+
->setMethodLabelAfterHtml($css_output . $logo->toHtml());
|
71 |
|
72 |
return parent::_construct();
|
73 |
}
|
app/code/local/Yellow/Bitcoin/Model/Bitcoin.php
CHANGED
@@ -116,10 +116,11 @@ Class Yellow_Bitcoin_Model_Bitcoin extends Mage_Payment_Model_Method_Abstract
|
|
116 |
*/
|
117 |
public function isAvailable($quote = null)
|
118 |
{
|
119 |
-
parent::isAvailable($quote);
|
120 |
$quoteCurrency = $quote->getData("quote_currency_code");
|
121 |
$currencies = array_map('trim', explode(',', Mage::getStoreConfig('payment/bitcoin/currencies')));
|
122 |
-
|
|
|
123 |
}
|
124 |
|
125 |
/**
|
116 |
*/
|
117 |
public function isAvailable($quote = null)
|
118 |
{
|
119 |
+
$isAvailable = parent::isAvailable($quote);
|
120 |
$quoteCurrency = $quote->getData("quote_currency_code");
|
121 |
$currencies = array_map('trim', explode(',', Mage::getStoreConfig('payment/bitcoin/currencies')));
|
122 |
+
$is_allowed_to_use_currency = array_search($quoteCurrency, $currencies) !== false;
|
123 |
+
return ($isAvailable && $is_allowed_to_use_currency);
|
124 |
}
|
125 |
|
126 |
/**
|
app/code/local/Yellow/Bitcoin/etc/config.xml
CHANGED
@@ -27,7 +27,7 @@ SOFTWARE.
|
|
27 |
<config>
|
28 |
<modules>
|
29 |
<Yellow_Bitcoin>
|
30 |
-
<version>1.0.
|
31 |
<depends>
|
32 |
<Mage_Payment/>
|
33 |
</depends>
|
27 |
<config>
|
28 |
<modules>
|
29 |
<Yellow_Bitcoin>
|
30 |
+
<version>1.0.2</version>
|
31 |
<depends>
|
32 |
<Mage_Payment/>
|
33 |
</depends>
|
app/code/local/Yellow/Bitcoin/etc/system.xml
CHANGED
@@ -117,7 +117,7 @@ SOFTWARE.
|
|
117 |
<show_in_store>0</show_in_store>
|
118 |
</currencies>
|
119 |
<public_key translate="label">
|
120 |
-
<label>
|
121 |
<frontend_type>obscure</frontend_type>
|
122 |
<backend_model>adminhtml/system_config_backend_encrypted</backend_model>
|
123 |
<sort_order>10</sort_order>
|
@@ -126,7 +126,7 @@ SOFTWARE.
|
|
126 |
<show_in_store>1</show_in_store>
|
127 |
</public_key>
|
128 |
<private_key translate="label">
|
129 |
-
<label>
|
130 |
<frontend_type>obscure</frontend_type>
|
131 |
<backend_model>adminhtml/system_config_backend_encrypted</backend_model>
|
132 |
<sort_order>11</sort_order>
|
117 |
<show_in_store>0</show_in_store>
|
118 |
</currencies>
|
119 |
<public_key translate="label">
|
120 |
+
<label>API Key</label>
|
121 |
<frontend_type>obscure</frontend_type>
|
122 |
<backend_model>adminhtml/system_config_backend_encrypted</backend_model>
|
123 |
<sort_order>10</sort_order>
|
126 |
<show_in_store>1</show_in_store>
|
127 |
</public_key>
|
128 |
<private_key translate="label">
|
129 |
+
<label>API Secret</label>
|
130 |
<frontend_type>obscure</frontend_type>
|
131 |
<backend_model>adminhtml/system_config_backend_encrypted</backend_model>
|
132 |
<sort_order>11</sort_order>
|
app/design/frontend/base/default/template/bitcoin/form/bitcoin.phtml
CHANGED
@@ -1,11 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
if (Mage::helper("bitcoin")->isFullScreen()):?>
|
3 |
-
<ul class="form-list checkout-agreements" id="payment_form_<?php echo $this->getMethodCode() ?>"
|
4 |
-
style="display:none;">
|
5 |
-
<li>
|
6 |
-
<div class="<?php echo $this->getMethodCode() ?>-instructions-content agreement-content">
|
7 |
-
<?php echo $this->__("After selecting this payment option and placing your order, you will be redirected to a full page invoice to complete the payment");?>
|
8 |
-
</div>
|
9 |
-
</li>
|
10 |
-
</ul>
|
11 |
-
<?php endif; ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/design/frontend/base/default/template/bitcoin/form/logo.phtml
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
-
<div id="bitcoin">
|
2 |
<?php if(Mage::getStoreConfig("payment/bitcoin/show_logo")):?>
|
3 |
<!-- Yellow Logo -->
|
4 |
<img src="<?php echo $this->getSkinUrl('images/bitcoin/bitcoin_accepted.png', array('_secure' => true)); ?>"
|
5 |
-
alt="<?php echo Mage::helper('bitcoin')->__('Yellow Bitcoin') ?>" class="v-middle" style="height:35px;"
|
|
|
6 |
<span style="margin-top: 6px;">
|
7 |
<?php //echo Mage::helper('bitcoin')->__('Powered By Yellow'); ?>
|
8 |
<small>
|
@@ -13,13 +13,10 @@
|
|
13 |
</span>
|
14 |
<!-- Yellow Logo -->
|
15 |
<?php else : ?>
|
16 |
-
<p>
|
17 |
<?php echo $this->__("Pay with Bitcoin");?>
|
18 |
<small>
|
19 |
<a href="<?php echo "http://yellowpay.co/what-is-bitcoin"; ?>" target="_blank">
|
20 |
<?php echo Mage::helper('bitcoin')->__('What is Bitcoin ?'); ?>
|
21 |
</a>
|
22 |
</small>
|
23 |
-
</p>
|
24 |
<?php endif;?>
|
25 |
-
</div>
|
|
|
1 |
<?php if(Mage::getStoreConfig("payment/bitcoin/show_logo")):?>
|
2 |
<!-- Yellow Logo -->
|
3 |
<img src="<?php echo $this->getSkinUrl('images/bitcoin/bitcoin_accepted.png', array('_secure' => true)); ?>"
|
4 |
+
alt="<?php echo Mage::helper('bitcoin')->__('Yellow Bitcoin') ?>" class="v-middle" style="height:35px;"
|
5 |
+
id="yellow-logo"/>
|
6 |
<span style="margin-top: 6px;">
|
7 |
<?php //echo Mage::helper('bitcoin')->__('Powered By Yellow'); ?>
|
8 |
<small>
|
13 |
</span>
|
14 |
<!-- Yellow Logo -->
|
15 |
<?php else : ?>
|
|
|
16 |
<?php echo $this->__("Pay with Bitcoin");?>
|
17 |
<small>
|
18 |
<a href="<?php echo "http://yellowpay.co/what-is-bitcoin"; ?>" target="_blank">
|
19 |
<?php echo Mage::helper('bitcoin')->__('What is Bitcoin ?'); ?>
|
20 |
</a>
|
21 |
</small>
|
|
|
22 |
<?php endif;?>
|
|
app/design/frontend/base/default/template/bitcoin/fullscreen/widget/footer.phtml
CHANGED
@@ -14,9 +14,12 @@
|
|
14 |
<div
|
15 |
class="yp-bolder-text"><?php echo $this->__($invoice["invoice_ccy"]); ?> <?php echo $this->__("{$invoice["invoice_price"]}"); ?> </div>
|
16 |
<div class="yp-vertical-space-10"></div>
|
17 |
-
|
18 |
-
|
19 |
-
|
|
|
|
|
|
|
20 |
</div>
|
21 |
<div id="yp-fullpage-info">
|
22 |
<div class="yp-bolder-text"><?php echo $this->__("%s is proud to accept Bitcoin!", $storeName); ?></div>
|
14 |
<div
|
15 |
class="yp-bolder-text"><?php echo $this->__($invoice["invoice_ccy"]); ?> <?php echo $this->__("{$invoice["invoice_price"]}"); ?> </div>
|
16 |
<div class="yp-vertical-space-10"></div>
|
17 |
+
<?php $formatted_price = Mage::getModel('directory/currency')->format($invoice["base_price"] ,
|
18 |
+
array('display'=>Zend_Currency::NO_SYMBOL), false);?>
|
19 |
+
<div id="yp-info">
|
20 |
+
<?php echo $this->escapeHtml($invoice["invoice_ccy"]); ?> <?php echo $this->escapeHtml($invoice["invoice_price"]); ?>
|
21 |
+
= <?php echo $this->escapeHtml($invoice["base_ccy"]); ?> <?php echo $this->escapeHtml($formatted_price); ?>
|
22 |
+
</div>
|
23 |
</div>
|
24 |
<div id="yp-fullpage-info">
|
25 |
<div class="yp-bolder-text"><?php echo $this->__("%s is proud to accept Bitcoin!", $storeName); ?></div>
|
app/etc/modules/Yellow_Bitcoin.xml
CHANGED
@@ -33,7 +33,7 @@ SOFTWARE.
|
|
33 |
<depends>
|
34 |
<Mage_Payment/>
|
35 |
</depends>
|
36 |
-
<version>1.0.
|
37 |
</Yellow_Bitcoin>
|
38 |
</modules>
|
39 |
</config>
|
33 |
<depends>
|
34 |
<Mage_Payment/>
|
35 |
</depends>
|
36 |
+
<version>1.0.2</version>
|
37 |
</Yellow_Bitcoin>
|
38 |
</modules>
|
39 |
</config>
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Yellow_Pay</name>
|
4 |
-
<version>1.0.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="https://github.com/YellowPay/yellow-magento/blob/master/LICENSE.md">MITL</license>
|
7 |
<channel>community</channel>
|
@@ -30,11 +30,12 @@ Bitcoin payment is received and the customer is redirected to an order confirmat
|
|
30 |

|
31 |
6.
|
32 |
Yellow converts the received Bitcoin payment into a national currency (like AED) and transfers it to the merchant's bank account</description>
|
33 |
-
<notes>
|
|
|
34 |
<authors><author><name>Tawfek Daghistani</name><user>tawfekov</user><email>tawfekov@gmail.com</email></author><author><name>James Piechota</name><user>YellowPay</user><email>james@yellowpay.co</email></author></authors>
|
35 |
-
<date>2015-
|
36 |
-
<time>
|
37 |
-
<contents><target name="magelocal"><dir name="Yellow"><dir name="Bitcoin"><dir name="Block"><dir name="Adminhtml"><dir name="Ipn"><dir name="Edit"><file name="Form.php" hash="7f80eace317f9fe82d4f76c1964c1130"/><dir name="Tab"><file name="Form.php" hash="6a89244929f6cb68dfee02e8559cafb2"/></dir><file name="Tabs.php" hash="238c2dc91e560ea5b71964c8257d52a1"/></dir><file name="Edit.php" hash="025d0b4b35397890207a7ea8af97ee0e"/><file name="Grid.php" hash="84bf9234f25b8b27bbb1032442fc26ba"/></dir><file name="Ipn.php" hash="5fe044c4cb3fffcdab958c481a83e864"/><dir name="Log"><dir name="Edit"><file name="Form.php" hash="27fa08c710def8bf91ba212882c74e83"/><dir name="Tab"><file name="Form.php" hash="d9a427fd3e1011188f0214c128d3bb4e"/></dir><file name="Tabs.php" hash="275d186945a3cfc9d73ab2b7a606ca18"/></dir><file name="Edit.php" hash="6a4763b0d2427ce58ae46adef581d2f6"/><file name="Grid.php" hash="7eea4350f39da7956abfd60dec08e512"/></dir><file name="Log.php" hash="bca0901efdb1f99e5103fce583774967"/></dir><dir name="Form"><file name="Bitcoin.php" hash="
|
38 |
<compatible/>
|
39 |
<dependencies><required><php><min>5.3.0</min><max>6.0.0</max></php></required></dependencies>
|
40 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Yellow_Pay</name>
|
4 |
+
<version>1.0.2</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="https://github.com/YellowPay/yellow-magento/blob/master/LICENSE.md">MITL</license>
|
7 |
<channel>community</channel>
|
30 |

|
31 |
6.
|
32 |
Yellow converts the received Bitcoin payment into a national currency (like AED) and transfers it to the merchant's bank account</description>
|
33 |
+
<notes>Fix issue where "Pay with Bitcoin" was still displayed even after plugin was disabled.
|
34 |
+
UI fixes</notes>
|
35 |
<authors><author><name>Tawfek Daghistani</name><user>tawfekov</user><email>tawfekov@gmail.com</email></author><author><name>James Piechota</name><user>YellowPay</user><email>james@yellowpay.co</email></author></authors>
|
36 |
+
<date>2015-06-17</date>
|
37 |
+
<time>23:53:34</time>
|
38 |
+
<contents><target name="magelocal"><dir name="Yellow"><dir name="Bitcoin"><dir name="Block"><dir name="Adminhtml"><dir name="Ipn"><dir name="Edit"><file name="Form.php" hash="7f80eace317f9fe82d4f76c1964c1130"/><dir name="Tab"><file name="Form.php" hash="6a89244929f6cb68dfee02e8559cafb2"/></dir><file name="Tabs.php" hash="238c2dc91e560ea5b71964c8257d52a1"/></dir><file name="Edit.php" hash="025d0b4b35397890207a7ea8af97ee0e"/><file name="Grid.php" hash="84bf9234f25b8b27bbb1032442fc26ba"/></dir><file name="Ipn.php" hash="5fe044c4cb3fffcdab958c481a83e864"/><dir name="Log"><dir name="Edit"><file name="Form.php" hash="27fa08c710def8bf91ba212882c74e83"/><dir name="Tab"><file name="Form.php" hash="d9a427fd3e1011188f0214c128d3bb4e"/></dir><file name="Tabs.php" hash="275d186945a3cfc9d73ab2b7a606ca18"/></dir><file name="Edit.php" hash="6a4763b0d2427ce58ae46adef581d2f6"/><file name="Grid.php" hash="7eea4350f39da7956abfd60dec08e512"/></dir><file name="Log.php" hash="bca0901efdb1f99e5103fce583774967"/></dir><dir name="Form"><file name="Bitcoin.php" hash="ac5bd0bc5d4cdd1f1a3f5cd1be68359e"/></dir><dir name="Fullscreen"><dir name="Widget"><file name="Content.php" hash="f97e2a8a3ef850272fb5d3a7e2dd750d"/><file name="Footer.php" hash="d10cd8c519422fd4de3defcd88569239"/><file name="Header.php" hash="ba790b89254447b7d4a9362d02d2b4f3"/></dir></dir><file name="Info.php" hash="1d2052d6dcf46c18dd846d1072f259ef"/><file name="Status.php" hash="dd26ce7879dc006f19b8528b4cfe6dd4"/><file name="Widget.php" hash="6d640b82fae0c83cce79aed368a05044"/></dir><dir name="Helper"><file name="Data.php" hash="b96124f0753fdaa49644b8fdac5f95ce"/></dir><dir name="Model"><file name="Bitcoin.php" hash="1e8a300edd388e803bf6a0424337dee8"/><file name="Http.php" hash="8cd7ca764944940130a54b7ed2927fdd"/><file name="Ipn.php" hash="cd66beab4f6bea576c6997bff68e0de2"/><file name="Log.php" hash="67d5fbbc997e57cefdbc1c8b28a94d93"/><dir name="Resource"><dir name="Ipn"><file name="Collection.php" hash="74285c584012f2b9d079ba258bc30ac9"/></dir><file name="Ipn.php" hash="a81ef4ed09a444a61c11ad1e92965438"/><dir name="Log"><file name="Collection.php" hash="fe97d78a654f856ea4eb005728b683e3"/></dir><file name="Log.php" hash="70de1ff87111d0ef4961c89810a1d8a0"/></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="IpnController.php" hash="fcd760bd4f54eab247544dcd70cfa3e2"/><file name="LogController.php" hash="dbe296b63e4d3f6b7cc3b231fae8bf72"/></dir><file name="IndexController.php" hash="314d06d1fc10c37a171c07d23dc694f4"/></dir><dir name="etc"><file name="config.xml" hash="af88f1fb6042d7b29487a4bb6f03fb3a"/><file name="system.xml" hash="c886a7fcb9d719b2ee6455c8a7499bea"/></dir><dir name="sql"><dir name="bitcoin_setup"><file name="mysql4-install-0.1.0.php" hash="2cd90bb78e7befc41e7b3c74d602db86"/><file name="mysql4-upgrade-0.1.0-0.1.1.php" hash="029263662ecc7b7dfe8e76cfa907b38b"/><file name="mysql4-upgrade-0.1.1-0.1.2.php" hash="afa8d749b6f82519964f9fe2aa4ff4a1"/><file name="mysql4-upgrade-0.1.2-0.1.3.php" hash="1872837133e08ed077cfa52eafd91a3a"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="bitcoin.xml" hash="7bfade000e7b0161459d711da6cc7461"/></dir><dir name="template"><dir name="bitcoin"><dir name="info"><file name="invoice.phtml" hash="61aa4bdffb8c22cc8601087cd1219057"/></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="bitcoin.xml" hash="a014f0f6db51f74368c2b613038347a3"/></dir><dir name="template"><dir name="bitcoin"><dir name="form"><file name="bitcoin.phtml" hash="d41d8cd98f00b204e9800998ecf8427e"/><file name="logo.phtml" hash="9ab2ebe0829c5559e6d854d024e69c26"/></dir><dir name="fullscreen"><dir name="widget"><file name="content.phtml" hash="6bfc9ee8833020bf300273efb8768111"/><file name="footer.phtml" hash="158b47f886130826a4edc58df73d7911"/><file name="header.phtml" hash="959f3d652959d9eefde349f5bd42b412"/></dir></dir><dir name="info"><file name="invoice.phtml" hash="ba13d5900d99c8fcf550601e378dcb4c"/></dir><file name="status.phtml" hash="4d7753c3efdcad9a2974b89ec636aa4c"/><file name="widget.phtml" hash="fe6e73c20d78b9a8ca5d6195b7fd07f8"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Yellow_Bitcoin.xml" hash="d6a57fb9ce9744a1eb27861a9d53097e"/></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="base"><dir name="default"><dir name="images"><dir name="bitcoin"><file name="bitcoin_accepted.png" hash="0682420205f3e2001b72901c44073163"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><file name="bitcoin.css" hash="f4e845ab9eb14e25e0a174b73271980a"/></dir><dir name="images"><dir name="bitcoin"><file name="bitcoin_accepted.png" hash="0682420205f3e2001b72901c44073163"/></dir></dir><dir name="js"><file name="iframeResizer.min.js" hash="0f471bcfd5d0edf49ef67542b7a763a0"/></dir></dir></dir></dir></target></contents>
|
39 |
<compatible/>
|
40 |
<dependencies><required><php><min>5.3.0</min><max>6.0.0</max></php></required></dependencies>
|
41 |
</package>
|
skin/frontend/base/default/css/bitcoin.css
CHANGED
@@ -194,6 +194,7 @@
|
|
194 |
/* *************************************** */
|
195 |
|
196 |
.yp-widget-container {
|
|
|
197 |
margin: auto;
|
198 |
}
|
199 |
|
194 |
/* *************************************** */
|
195 |
|
196 |
.yp-widget-container {
|
197 |
+
padding-bottom: 13px;
|
198 |
margin: auto;
|
199 |
}
|
200 |
|