Version Notes
After succesful installation, kindly logout and relogin to you magento admin panel to avoid 404 error while trying to configure the extension.
Configuration is under system->configration->suregift checkout
Download this release
Release Info
Developer | Sodiq Fagbola |
Extension | Suregifts_gift |
Version | 1.5.1 |
Comparing to | |
See all releases |
Code changes from version 1.5.0 to 1.5.1
app/code/community/Suregifts/Giftcardapi/Model/Observer.php
CHANGED
@@ -42,9 +42,9 @@ class Suregifts_Giftcardapi_Model_Observer {
|
|
42 |
|
43 |
|
44 |
if ($mode == 1 ){
|
45 |
-
$ch = curl_init('
|
46 |
}else{
|
47 |
-
$ch = curl_init('
|
48 |
}
|
49 |
|
50 |
$header= array();
|
@@ -80,7 +80,7 @@ class Suregifts_Giftcardapi_Model_Observer {
|
|
80 |
$controllerAction = $observer->getEvent()->getControllerAction();
|
81 |
$result = array();
|
82 |
$result['error'] = '-1';
|
83 |
-
$result['message'] = $response_info['Description']!=null
|
84 |
$controllerAction->getResponse()->setBody(Mage::helper('core')->jsonEncode($result));
|
85 |
exit;
|
86 |
}
|
42 |
|
43 |
|
44 |
if ($mode == 1 ){
|
45 |
+
$ch = curl_init('http://sandbox.oms-suregifts.com/api/voucherredemption');
|
46 |
}else{
|
47 |
+
$ch = curl_init('http://oms-suregifts.com/api/voucherredemption');
|
48 |
}
|
49 |
|
50 |
$header= array();
|
80 |
$controllerAction = $observer->getEvent()->getControllerAction();
|
81 |
$result = array();
|
82 |
$result['error'] = '-1';
|
83 |
+
$result['message'] = $response_info['Description']!=null?"Could not redeem giftcard on suregift (".$response_info['Description'].")":"Could not redeem giftcard on suregift";
|
84 |
$controllerAction->getResponse()->setBody(Mage::helper('core')->jsonEncode($result));
|
85 |
exit;
|
86 |
}
|
app/code/community/Suregifts/Giftcardapi/controllers/IndexController.php
CHANGED
@@ -55,9 +55,9 @@ class Suregifts_Giftcardapi_IndexController extends Mage_Core_Controller_Front_A
|
|
55 |
$auth = $username.':'.$password;
|
56 |
|
57 |
if ($mode == 1 ){
|
58 |
-
$ch = curl_init("
|
59 |
}else{
|
60 |
-
$ch = curl_init("
|
61 |
}
|
62 |
|
63 |
curl_setopt($ch, CURLOPT_POST, false);
|
55 |
$auth = $username.':'.$password;
|
56 |
|
57 |
if ($mode == 1 ){
|
58 |
+
$ch = curl_init("http://sandbox.oms-suregifts.com/api/voucherredemption?vouchercode=".$data['giftcard']);
|
59 |
}else{
|
60 |
+
$ch = curl_init("http://oms-suregifts.com/api/voucherredemption?vouchercode=".$data['giftcard']);
|
61 |
}
|
62 |
|
63 |
curl_setopt($ch, CURLOPT_POST, false);
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Suregifts_gift</name>
|
4 |
-
<version>1.5.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://www.opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
|
7 |
<channel>community</channel>
|
@@ -12,9 +12,9 @@
|
|
12 |

|
13 |
Configuration is under system->configration->suregift checkout</notes>
|
14 |
<authors><author><name>Sodiq Fagbola</name><user>realdammy</user><email>realdammy@hotmail.com</email></author></authors>
|
15 |
-
<date>2015-
|
16 |
-
<time>
|
17 |
-
<contents><target name="magecommunity"><dir name="Suregifts"><dir name="Giftcardapi"><dir name="Block"><file name="Discount.php" hash="2faf19df16f0eac5dc61ad21e128dde7"/><dir name="Sales"><dir name="Creditmemo"><dir name="Totals"><file name="Discount.php" hash="5f69bbd2bf97529fc7d4fb9511f2c0e6"/></dir></dir><dir name="Invoice"><dir name="Totals"><file name="Discount.php" hash="4d145f37816e4fc15e5c095e607a9f99"/></dir></dir><dir name="Order"><dir name="Totals"><file name="Discount.php" hash="f81ae9ba01669f5db613693af53c7c52"/></dir></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="531b91ff1c759a605e9a97233e0b3fc7"/></dir><dir name="Model"><dir name="Creditmemo"><file name="Total.php" hash="c6d482ce1543369fbbf7389e89e5569e"/></dir><file name="Giftcardapi.php" hash="fecd7b34b69298a9ab04af6b85129fe7"/><dir name="Invoice"><dir name="Total"><file name="Giftcardapi.php" hash="87d426b08a4403ed46f7ee108cd01322"/><file name="Tax.php" hash="4850403ee908c7019f770ddb982889e5"/></dir></dir><file name="Observer.php" hash="
|
18 |
<compatible/>
|
19 |
<dependencies><required><php><min>5.0.0</min><max>5.6.1</max></php></required></dependencies>
|
20 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Suregifts_gift</name>
|
4 |
+
<version>1.5.1</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>
|
12 |

|
13 |
Configuration is under system->configration->suregift checkout</notes>
|
14 |
<authors><author><name>Sodiq Fagbola</name><user>realdammy</user><email>realdammy@hotmail.com</email></author></authors>
|
15 |
+
<date>2015-06-21</date>
|
16 |
+
<time>21:30:50</time>
|
17 |
+
<contents><target name="magecommunity"><dir name="Suregifts"><dir name="Giftcardapi"><dir name="Block"><file name="Discount.php" hash="2faf19df16f0eac5dc61ad21e128dde7"/><dir name="Sales"><dir name="Creditmemo"><dir name="Totals"><file name="Discount.php" hash="5f69bbd2bf97529fc7d4fb9511f2c0e6"/></dir></dir><dir name="Invoice"><dir name="Totals"><file name="Discount.php" hash="4d145f37816e4fc15e5c095e607a9f99"/></dir></dir><dir name="Order"><dir name="Totals"><file name="Discount.php" hash="f81ae9ba01669f5db613693af53c7c52"/></dir></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="531b91ff1c759a605e9a97233e0b3fc7"/></dir><dir name="Model"><dir name="Creditmemo"><file name="Total.php" hash="c6d482ce1543369fbbf7389e89e5569e"/></dir><file name="Giftcardapi.php" hash="fecd7b34b69298a9ab04af6b85129fe7"/><dir name="Invoice"><dir name="Total"><file name="Giftcardapi.php" hash="87d426b08a4403ed46f7ee108cd01322"/><file name="Tax.php" hash="4850403ee908c7019f770ddb982889e5"/></dir></dir><file name="Observer.php" hash="bcaed1c4fe2364d63cea7747e1deee9b"/><dir name="Quote"><dir name="Total"><file name="Giftcardapi.php" hash="3c5d5f5d0d6517a176d7563960b08714"/><file name="Tax.php" hash="8ab99227fc0f52a209a7e68c2a400f7c"/></dir></dir><dir name="Source"><file name="Discount.php" hash="2fb6a3ccac3608681650414570c13a86"/></dir><file name="Status.php" hash="c497955ef14589b8e5c066b660e1fbd4"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="ExtendoController.php" hash="13fc78a452f1a9f4b26f9701dba7a94a"/></dir><file name="IndexController.php" hash="57cee34d18ae1adaf178c435d6f7d759"/></dir><dir name="etc"><file name="config.xml" hash="0bd3ea874e2d10d8aeeb60a02219f84c"/><file name="system.xml" hash="becb8a7cb3823a0cdf00892f33614e88"/></dir><dir name="sql"><dir name="giftcardapi_setup"><file name="mysql4-install-0.1.0.php" hash="8c8ea981a81cf84c52b864438a10db1a"/><file name="mysql4-upgrade-0.4.2-0.4.3.php" hash="8c8ea981a81cf84c52b864438a10db1a"/><file name="mysql4-upgrade-0.4.3-0.4.4.php" hash="37d346ce4aee03d14a22c91c383a03bc"/><file name="mysql4-upgrade-0.4.4-0.4.5.php" hash="c6211165f64dd1047340127e462531ba"/></dir></dir></dir></dir></target><target name="magelocale"><dir><dir name="en_US"><file name="Suregifts_Giftcardapi.csv" hash="51ff5879f9decb522e0d0236079774a2"/></dir></dir></target><target name="magedesign"><dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="giftcardapi.xml" hash="7f2125c1e63bb5159207fb3932ac83a4"/></dir><dir name="template"><dir name="giftcardapi"><file name="discount.phtml" hash="c8b08b0f45da91c1dff6aad9cf51222b"/></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Suregifts_Giftcardapi.xml" hash="4c9d919bf7e805947e30ce53e4536e5b"/></dir></target></contents>
|
18 |
<compatible/>
|
19 |
<dependencies><required><php><min>5.0.0</min><max>5.6.1</max></php></required></dependencies>
|
20 |
</package>
|