paysure - Version 1.0.2

Version Notes

Receive Visa, Kenswitch and M-pesa payments on your Magento Website through Paysure Gateway.
Contact the developer at http://www.facebook.com/jkuts

Download this release

Release Info

Developer MageKenya
Extension paysure
Version 1.0.2
Comparing to
See all releases


Code changes from version 1.0.1 to 1.0.2

Files changed (28) hide show
  1. app/code/community/MageKenya/Paysurek/Model/Checkout.php +1 -1
  2. app/code/community/MageKenya/Paysuremobile/Block/Form.php +11 -0
  3. app/code/community/MageKenya/Paysuremobile/Block/Info.php +9 -0
  4. app/code/community/MageKenya/Paysuremobile/Block/Redirect.php +30 -0
  5. app/code/community/MageKenya/Paysuremobile/Helper/Data.php +8 -0
  6. app/code/community/MageKenya/Paysuremobile/Model/Checkout.php +110 -0
  7. app/code/community/MageKenya/Paysuremobile/controllers/RedirectController.php +50 -0
  8. app/code/community/MageKenya/Paysuremobile/etc/config.xml +99 -0
  9. app/code/community/MageKenya/Paysuremobile/etc/system.xml +72 -0
  10. app/code/community/MageKenya/Paysurev/Model/Checkout.php +1 -1
  11. app/design/adminhtml/default/default/template/paysuremobile/form.phtml +6 -0
  12. app/design/adminhtml/default/default/template/paysuremobile/info.phtml +5 -0
  13. app/design/frontend/base/default/template/paysuremobile/form.phtml +6 -0
  14. app/design/frontend/base/default/template/paysuremobile/info.phtml +5 -0
  15. app/design/frontend/default/default/template/paysuremobile/form.phtml +6 -0
  16. app/design/frontend/default/default/template/paysuremobile/info.phtml +5 -0
  17. app/etc/modules/MageKenya_Paysuremobile.xml +14 -0
  18. app/locale/en_US/MageKenya_Paysuremobile.csv +6 -0
  19. app/locale/ru_RU/MageKenya_Paysuremobile.csv +6 -0
  20. package.xml +11 -7
  21. skin/adminhtml/default/default/images/paysurek/kenswitch.png +0 -0
  22. skin/adminhtml/default/default/images/paysurev/visa.gif +0 -0
  23. skin/frontend/base/default/images/paysurek/kenswitch.png +0 -0
  24. skin/frontend/base/default/images/paysuremobile/mpesa.jpg +0 -0
  25. skin/frontend/base/default/images/paysurev/visa.gif +0 -0
  26. skin/frontend/default/default/images/paysurek/kenswitch.png +0 -0
  27. skin/frontend/default/default/images/paysuremobile/mpesa.jpg +0 -0
  28. skin/frontend/default/default/images/paysurev/visa.gif +0 -0
app/code/community/MageKenya/Paysurek/Model/Checkout.php CHANGED
@@ -71,7 +71,7 @@ class MageKenya_Paysurek_Model_Checkout extends Mage_Payment_Model_Method_Abstra
71
  $data.='<surl>'.Mage::getUrl('paysurek/redirect/success', array('refno' => $order_id)).'</surl>';
72
  $data.='<furl>'.Mage::getUrl('paysurek/redirect/cancel', array('refno' => $order_id)).'</furl>';
73
  $data.='<description>'.Mage::helper('paysurek')->__('Payment for order #').$order_id.'</description>';
74
- //$data.='<currency>'.$order->getOrderCurrencyCode().'</currency>';
75
  $data.='<buyer>'.$order->getBillingAddress()->getFirstname().' '.$order->getBillingAddress()->getLastname().'</buyer>';
76
  // $data.='<amount>'.(round($order->getGrandTotal(),2)*(1000/1000).'</amount>';
77
  $data.='<amount>'.str_replace(".","",(round($order->getGrandTotal(),2))).'</amount>';
71
  $data.='<surl>'.Mage::getUrl('paysurek/redirect/success', array('refno' => $order_id)).'</surl>';
72
  $data.='<furl>'.Mage::getUrl('paysurek/redirect/cancel', array('refno' => $order_id)).'</furl>';
73
  $data.='<description>'.Mage::helper('paysurek')->__('Payment for order #').$order_id.'</description>';
74
+ $data.='<currency>'.$order->getOrderCurrencyCode().'</currency>';
75
  $data.='<buyer>'.$order->getBillingAddress()->getFirstname().' '.$order->getBillingAddress()->getLastname().'</buyer>';
76
  // $data.='<amount>'.(round($order->getGrandTotal(),2)*(1000/1000).'</amount>';
77
  $data.='<amount>'.str_replace(".","",(round($order->getGrandTotal(),2))).'</amount>';
app/code/community/MageKenya/Paysuremobile/Block/Form.php ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+
4
+ class MageKenya_Paysuremobile_Block_Form extends Mage_Payment_Block_Form
5
+ {
6
+ protected function _construct()
7
+ {
8
+ parent::_construct();
9
+ $this->setTemplate('paysuremobile/form.phtml');
10
+ }
11
+ }
app/code/community/MageKenya/Paysuremobile/Block/Info.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class MageKenya_Paysuremobile_Block_Info extends Mage_Payment_Block_Info {
4
+
5
+ protected function _construct() {
6
+ parent::_construct();
7
+ $this->setTemplate('paysuremobile/info.phtml');
8
+ }
9
+ }
app/code/community/MageKenya/Paysuremobile/Block/Redirect.php ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+
4
+ class MageKenya_Paysuremobile_Block_Redirect extends Mage_Core_Block_Abstract
5
+ {
6
+ protected function _toHtml()
7
+ {
8
+ $paysuremobile = Mage::getModel('paysuremobile/checkout');
9
+
10
+ $form = new Varien_Data_Form();
11
+ $form->setAction($paysuremobile->getPaysuremobileUrl())
12
+ ->setId('pay')
13
+ ->setName('pay')
14
+ ->setMethod('POST')
15
+ ->setUseContainer(true);
16
+ foreach ($paysuremobile->getPaysuremobileCheckoutFormFields() as $field=>$value) {
17
+ // echo $field.' - '.$value.'<br>';
18
+ $form->addField($field, 'hidden', array('name'=>$field, 'value'=>$value));
19
+ }
20
+
21
+ $html = '<html><body>';
22
+ // $html.= $this->__('Redirect to Paysure.co.ke ...');
23
+ $html.= $form->toHtml();
24
+ $html.= '<script type="text/javascript">document.getElementById("pay").submit();</script>';
25
+ $html.= '</body></html>';
26
+
27
+
28
+ return $html;
29
+ }
30
+ }
app/code/community/MageKenya/Paysuremobile/Helper/Data.php ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+
4
+ class MageKenya_Paysuremobile_Helper_Data extends Mage_Core_Helper_Abstract
5
+ {
6
+
7
+
8
+ }
app/code/community/MageKenya/Paysuremobile/Model/Checkout.php ADDED
@@ -0,0 +1,110 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+
4
+ class MageKenya_Paysuremobile_Model_Checkout extends Mage_Payment_Model_Method_Abstract {
5
+
6
+ protected $_code = 'paysuremobile';
7
+ protected $_formBlockType = 'paysuremobile/form';
8
+ protected $_infoBlockType = 'paysuremobile/info';
9
+ protected $_order;
10
+
11
+
12
+ const WALLET_ID = 'payment/paysuremobile/paysure_walletid';
13
+
14
+
15
+
16
+
17
+ public function getCheckout() {
18
+ return Mage::getSingleton('checkout/session');
19
+ }
20
+
21
+ public function getOrderPlaceRedirectUrl() {
22
+ return Mage::getUrl('paysuremobile/redirect', array('_secure' => true));
23
+ }
24
+
25
+ public function getPaysuremobileUrl() {
26
+ $url=$this->getPaysuremobileCheckoutFormFields();
27
+ $wsdl='http://196.216.64.237:8080/webdirect/onlinepay?WSDL';
28
+ $client=new SoapClient($wsdl,array('trace'=>TRUE));
29
+ $result=$client->pickData($url);
30
+
31
+ $link="";
32
+ foreach($result as $key=>$value){
33
+
34
+ $link=$value;
35
+
36
+
37
+
38
+ }
39
+
40
+ return $link;
41
+ }
42
+
43
+ public function getLocale()
44
+ {
45
+ return Mage::app()->getLocale()->getLocaleCode();
46
+ }
47
+
48
+ public function getPaysuremobileCheckoutFormFields() {
49
+
50
+ $order_id = $this->getCheckout()->getLastRealOrderId();
51
+ $order = Mage::getModel('sales/order')->loadByIncrementId($order_id);
52
+ if ($order->getBillingAddress()->getEmail()) {
53
+ $email = $order->getBillingAddress()->getEmail();
54
+ } else {
55
+ $email = $order->getCustomerEmail();
56
+ }
57
+
58
+
59
+ $i=1;
60
+
61
+ for($i=1;$i<=1;$i++){
62
+
63
+
64
+ $data.='<order>';
65
+ $data.='<purchase>';
66
+ $data.='<cardtype>3</cardtype>';
67
+ $data.='<mname>'.Mage::getStoreConfig(MageKenya_Paysuremobile_Model_Checkout::WALLET_ID).'</mname>';
68
+ //$data.='<mname>Paysure Limited</mname>';
69
+ $data.='<refno>'.$order_id.'</refno>';
70
+ $data.='<systemtraceno>'.(($order_id)/2).'</systemtraceno>';
71
+ $data.='<surl>'.Mage::getUrl('paysuremobile/redirect/success', array('refno' => $order_id)).'</surl>';
72
+ $data.='<furl>'.Mage::getUrl('paysuremobile/redirect/cancel', array('refno' => $order_id)).'</furl>';
73
+ $data.='<description>'.Mage::helper('paysuremobile')->__('Payment for order #').$order_id.'</description>';
74
+ $data.='<currency>'.$order->getOrderCurrencyCode().'</currency>';
75
+ $data.='<buyer>'.$order->getBillingAddress()->getFirstname().' '.$order->getBillingAddress()->getLastname().'</buyer>';
76
+ $data.='<amount>'.str_replace(".","",(round($order->getGrandTotal(),2))).'</amount>';
77
+ $data.='<email>'.$email.'</email>';
78
+ $data.='</purchase>';
79
+ $data.='</order>';
80
+
81
+ }
82
+
83
+
84
+ $orderItems = $order->getAllItems();
85
+ $dataitems = '<dataitems>';
86
+ foreach ($orderItems as $item){
87
+ $dataitems.= '<dataitem>';
88
+ //$dataitems .='<itemnamcode>'.$item->getSku().'</itemnamcode>';
89
+ $dataitems .= '<itemname>'.$item->getName() . '</itemname>';
90
+ $dataitems .= '<itemprice>'.trim(round($item->getPrice(),2)) .'</itemprice>';
91
+ $dataitems .= '<quantity>'.$item->getQty() .'</quantity>';
92
+ $dataitems .= '<subtotal>'.trim(round($item->getPrice(),2))*$item->getQty().'</subtotal>';
93
+ $dataitems.= "</dataitem>";
94
+
95
+ }
96
+ //$dataitems = '</dataitems>';
97
+ $params=array('data'=>$data,'dataitems'=>$dataitems);
98
+ return $params;
99
+
100
+ }
101
+
102
+ public function initialize($paymentAction, $stateObject)
103
+ {
104
+ $state = Mage_Sales_Model_Order::STATE_PENDING_PAYMENT;
105
+ $stateObject->setState($state);
106
+ $stateObject->setStatus('pending_payment');
107
+ $stateObject->setIsNotified(false);
108
+ }
109
+
110
+ }
app/code/community/MageKenya/Paysuremobile/controllers/RedirectController.php ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+
4
+ class MageKenya_Paysuremobile_RedirectController extends Mage_Core_Controller_Front_Action {
5
+
6
+ protected $_order;
7
+
8
+ protected function _expireAjax() {
9
+ if (!Mage::getSingleton('checkout/session')->getQuote()->hasItems()) {
10
+ $this->getResponse()->setHeader('HTTP/1.1','403 Session Expired');
11
+ exit;
12
+ }
13
+ }
14
+ protected function _getCheckout()
15
+ {
16
+ return Mage::getSingleton('checkout/session');
17
+ }
18
+
19
+ public function indexAction() {
20
+ $this->getResponse()
21
+ ->setHeader('Content-type', 'text/html; charset=utf8')
22
+ ->setBody($this->getLayout()
23
+ ->createBlock('paysuremobile/redirect')
24
+ ->toHtml());
25
+ }
26
+
27
+
28
+ public function successAction() {
29
+ $event = $this->getRequest()->getParams();
30
+ $transaction_id= $event['transaction_id'];
31
+ $session = Mage::getSingleton('checkout/session');
32
+ $session->setQuoteId($transaction_id);
33
+ Mage::getSingleton('checkout/session')->getQuote()->setIsActive(false)->save();
34
+ $this->_redirect('checkout/onepage/success', array('_secure'=>true));
35
+ }
36
+
37
+
38
+ public function cancelAction()
39
+ {
40
+ $event = $this->getRequest()->getParams();
41
+ $transaction_id= $event['transaction_id'];
42
+ $this->_getCheckout()->addError(Mage::helper('paysuremobile')->__('The order has been canceled. Order #').$transaction_id);
43
+ $this->_redirect('checkout/cart');
44
+ }
45
+
46
+
47
+
48
+ }
49
+
50
+ ?>
app/code/community/MageKenya/Paysuremobile/etc/config.xml ADDED
@@ -0,0 +1,99 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+
3
+ <config>
4
+ <modules>
5
+ <MageKenya_Paysuremobile>
6
+ <version>0.0.1</version>
7
+ </MageKenya_Paysuremobile>
8
+ </modules>
9
+
10
+ <global>
11
+
12
+ <models>
13
+ <paysuremobile>
14
+ <class>MageKenya_Paysuremobile_Model</class>
15
+ </paysuremobile>
16
+ </models>
17
+
18
+ <blocks>
19
+ <paysuremobile>
20
+ <class>MageKenya_Paysuremobile_Block</class>
21
+ </paysuremobile>
22
+ </blocks>
23
+
24
+ <resources>
25
+ <paysure_setup>
26
+ <setup>
27
+ <module>MageKenya_Paysuremobile</module>
28
+ </setup>
29
+ <connection>
30
+ <use>core_setup</use>
31
+ </connection>
32
+ </paysure_setup>
33
+ <paysure_write>
34
+ <connection>
35
+ <use>core_write</use>
36
+ </connection>
37
+ </paysure_write>
38
+ <paysure_read>
39
+ <connection>
40
+ <use>core_read</use>
41
+ </connection>
42
+ </paysure_read>
43
+ </resources>
44
+ <helpers>
45
+ <paysuremobile>
46
+ <class>MageKenya_Paysuremobile_Helper</class>
47
+ </paysuremobile>
48
+ </helpers>
49
+ </global>
50
+
51
+
52
+ <frontend>
53
+ <secure_url>
54
+ <paysure_redirect>/paysuremobile/redirect/00</paysure_redirect>
55
+ </secure_url>
56
+ <routers>
57
+ <paysuremobile>
58
+ <use>standard</use>
59
+ <args>
60
+ <module>MageKenya_Paysuremobile</module>
61
+ <frontName>paysuremobile</frontName>
62
+ </args>
63
+ </paysuremobile>
64
+ </routers>
65
+ <translate>
66
+ <modules>
67
+ <MageKenya_Paysuremobile>
68
+ <files>
69
+ <default>MageKenya_Paysuremobile.csv</default>
70
+ </files>
71
+ </MageKenya_Paysuremobile>
72
+ </modules>
73
+ </translate>
74
+ </frontend>
75
+
76
+
77
+ <adminhtml>
78
+ <translate>
79
+ <modules>
80
+ <MageKenya_Paysuremobile>
81
+ <files>
82
+ <default>MageKenya_Paysuremobile.csv</default>
83
+ </files>
84
+ </MageKenya_Paysuremobile>
85
+ </modules>
86
+ </translate>
87
+ </adminhtml>
88
+
89
+ <default>
90
+ <payment>
91
+ <paysuremobile>
92
+ <active>1</active>
93
+ <model>paysuremobile/checkout</model>
94
+ <title>Paysure | M-pesa</title>
95
+ <paysure_walletid>Enter Merchant ID Here..</paysure_walletid>
96
+ </paysuremobile>
97
+ </payment>
98
+ </default>
99
+ </config>
app/code/community/MageKenya/Paysuremobile/etc/system.xml ADDED
@@ -0,0 +1,72 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <sections>
4
+ <payment>
5
+ <groups>
6
+ <paysuremobile translate="label" module="paysuremobile">
7
+ <label>Paysure | M-pesa</label>
8
+ <frontend_type>text</frontend_type>
9
+ <sort_order>2</sort_order>
10
+ <show_in_default>1</show_in_default>
11
+ <show_in_website>1</show_in_website>
12
+ <show_in_store>1</show_in_store>
13
+ <fields>
14
+ <active translate="label">
15
+ <label>Enabled</label>
16
+ <frontend_type>select</frontend_type>
17
+ <source_model>adminhtml/system_config_source_yesno</source_model>
18
+ <sort_order>2</sort_order>
19
+ <show_in_default>1</show_in_default>
20
+ <show_in_website>1</show_in_website>
21
+ <show_in_store>0</show_in_store>
22
+ </active>
23
+ <title translate="label">
24
+ <label>Title</label>
25
+ <frontend_type>text</frontend_type>
26
+ <sort_order>1</sort_order>
27
+ <show_in_default>1</show_in_default>
28
+ <show_in_website>1</show_in_website>
29
+ <show_in_store>1</show_in_store>
30
+ </title>
31
+ <paysure_walletid translate="label,comment">
32
+ <label>Merchat Id</label>
33
+ <comment><![CDATA[ <a href="http://www.paysure.co.ke/index.php/contact-us" target="_blank"> Get a Paysure Merchant ID </a>]]></comment>
34
+ <frontend_type>text</frontend_type>
35
+ <sort_order>4</sort_order>
36
+ <show_in_default>1</show_in_default>
37
+ <show_in_website>1</show_in_website>
38
+ <show_in_store>1</show_in_store>
39
+ </paysure_walletid>
40
+ <sort_order translate="label,comment">
41
+ <label>Sort Order</label>
42
+ <comment><![CDATA[ Position on the front end relative to other payment options-put 1 if you want it to be the first]]></comment>
43
+ <frontend_type>text</frontend_type>
44
+ <sort_order>99</sort_order>
45
+ <show_in_default>1</show_in_default>
46
+ <show_in_website>1</show_in_website>
47
+ <show_in_store>1</show_in_store>
48
+ </sort_order>
49
+ <allowspecific translate="label">
50
+ <label>Payment from applicable countries</label>
51
+ <frontend_type>allowspecific</frontend_type>
52
+ <sort_order>51</sort_order>
53
+ <source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
54
+ <show_in_default>1</show_in_default>
55
+ <show_in_website>1</show_in_website>
56
+ <show_in_store>1</show_in_store>
57
+ </allowspecific>
58
+ <specificcountry translate="label">
59
+ <label>Payment from Specific countries</label>
60
+ <frontend_type>multiselect</frontend_type>
61
+ <sort_order>52</sort_order>
62
+ <source_model>adminhtml/system_config_source_country</source_model>
63
+ <show_in_default>1</show_in_default>
64
+ <show_in_website>1</show_in_website>
65
+ <show_in_store>1</show_in_store>
66
+ </specificcountry>
67
+ </fields>
68
+ </paysuremobile>
69
+ </groups>
70
+ </payment>
71
+ </sections>
72
+ </config>
app/code/community/MageKenya/Paysurev/Model/Checkout.php CHANGED
@@ -71,7 +71,7 @@ class MageKenya_Paysurev_Model_Checkout extends Mage_Payment_Model_Method_Abstra
71
  $data.='<surl>'.Mage::getUrl('paysurev/redirect/success', array('refno' => $order_id)).'</surl>';
72
  $data.='<furl>'.Mage::getUrl('paysurev/redirect/cancel', array('refno' => $order_id)).'</furl>';
73
  $data.='<description>'.Mage::helper('paysurev')->__('Payment for order #').$order_id.'</description>';
74
- //$data.='<currency>'.$order->getOrderCurrencyCode().'</currency>';
75
  $data.='<buyer>'.$order->getBillingAddress()->getFirstname().' '.$order->getBillingAddress()->getLastname().'</buyer>';
76
  $data.='<amount>'.str_replace(".","",(round($order->getGrandTotal(),2))).'</amount>';
77
  $data.='<email>'.$email.'</email>';
71
  $data.='<surl>'.Mage::getUrl('paysurev/redirect/success', array('refno' => $order_id)).'</surl>';
72
  $data.='<furl>'.Mage::getUrl('paysurev/redirect/cancel', array('refno' => $order_id)).'</furl>';
73
  $data.='<description>'.Mage::helper('paysurev')->__('Payment for order #').$order_id.'</description>';
74
+ $data.='<currency>'.$order->getOrderCurrencyCode().'</currency>';
75
  $data.='<buyer>'.$order->getBillingAddress()->getFirstname().' '.$order->getBillingAddress()->getLastname().'</buyer>';
76
  $data.='<amount>'.str_replace(".","",(round($order->getGrandTotal(),2))).'</amount>';
77
  $data.='<email>'.$email.'</email>';
app/design/adminhtml/default/default/template/paysuremobile/form.phtml ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ <?php
2
+ echo '<table border="0">';
3
+ echo '<tr><td><img src="'.$this->getSkinUrl("images/paysuremobile/mpesa.jpg").'" alt="visa" /></tr>';
4
+ echo '</table>';
5
+
6
+ ?>
app/design/adminhtml/default/default/template/paysuremobile/info.phtml ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ <?php
2
+ echo 'Payment made by M-pesa powerd by<a href="http://www.paysure.co.ke" target="_blank"> Paysure</a>';
3
+ ?>
4
+
5
+
app/design/frontend/base/default/template/paysuremobile/form.phtml ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ <?php
2
+ echo '<table border="0">';
3
+ echo '<tr><td><img src="'.$this->getSkinUrl("images/paysuremobile/mpesa.jpg").'" alt="M-pesa" /></tr>';
4
+ echo '</table>';
5
+
6
+ ?>
app/design/frontend/base/default/template/paysuremobile/info.phtml ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ <?php
2
+ echo 'Payment made by M-pesa powerd by<a href="http://www.paysure.co.ke" target="_blank"> Paysure</a>';
3
+ ?>
4
+
5
+
app/design/frontend/default/default/template/paysuremobile/form.phtml ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ <?php
2
+ echo '<table border="0">';
3
+ echo '<tr><td><img src="'.$this->getSkinUrl("images/paysuremobile/mpesa.jpg").'" alt="M-pesa" /></tr>';
4
+ echo '</table>';
5
+
6
+ ?>
app/design/frontend/default/default/template/paysuremobile/info.phtml ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ <?php
2
+ echo 'Payment made by M-pesa powerd by<a href="http://www.paysure.co.ke" target="_blank"> Paysure</a>';
3
+ ?>
4
+
5
+
app/etc/modules/MageKenya_Paysuremobile.xml ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <MageKenya_Paysuremobile>
5
+ <active>true</active>
6
+ <codePool>community</codePool>
7
+ <depends>
8
+ <Mage_Paygate/>
9
+ <Mage_Checkout/>
10
+ <Mage_Sales/>
11
+ </depends>
12
+ </MageKenya_Paysuremobile>
13
+ </modules>
14
+ </config>
app/locale/en_US/MageKenya_Paysuremobile.csv ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ Payment for order #,Payment for order #
2
+ The order has been canceled. Order #,"The order has been canceled. Order #"""
3
+ Redirect to Paysure.co.ke ...,Redirect to Paysure.co.ke ...
4
+ Merchant ID,Merchant ID
5
+ payments,payments
6
+ When you place an order you will be redirected to,When you place an order you will be redirected to
app/locale/ru_RU/MageKenya_Paysuremobile.csv ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ Payment for order #,Оплата счета №
2
+ The order has been canceled. Order #,"Заказ был отменен, заказ #"
3
+ Redirect to Paysure.co.ke ...,Перенаправление на Paysure.co.ke ...
4
+ Merchant ID,Merchant ID
5
+ payments,платежи
6
+ When you place an order you will be redirected to,Олата происходит автоматически на сайте платежей
package.xml CHANGED
@@ -1,18 +1,22 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>paysure</name>
4
- <version>1.0.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>
8
  <extends/>
9
- <summary>MageKenya Visa and Kenswitch Payment Module for Paysure Gateway</summary>
10
- <description>MageKenya Visa and Kenswitch Payment Module for Paysure Gateway</description>
11
- <notes>MageKenya Visa and Kenswitch Payment Module for Paysure Gateway</notes>
 
 
 
 
12
  <authors><author><name>MageKenya</name><user>kuts2010</user><email>jokuts@gmail.com</email></author></authors>
13
- <date>2013-01-26</date>
14
- <time>23:33:50</time>
15
- <contents><target name="mageskin"><dir name="frontend"><dir name="default"><dir name="default"><dir name="images"><dir name="paysurev"><file name="visa.png" hash="60ed32f5791eef60655456eefd33b16f"/><file name="visa.gif" hash="e1ecb713347232e5d692c173841388b5"/></dir><dir name="paysurek"><file name="kenswitch.png" hash="2727a7b57737afa935243d8b7e3dfba8"/><file name="kenswitch.gif" hash="d753218d44bf02c6eeee86d7d129a197"/></dir></dir></dir></dir><dir name="base"><dir name="default"><dir name="images"><dir name="paysurev"><file name="visa.png" hash="60ed32f5791eef60655456eefd33b16f"/><file name="visa.gif" hash="e1ecb713347232e5d692c173841388b5"/></dir><dir name="paysurek"><file name="kenswitch.png" hash="2727a7b57737afa935243d8b7e3dfba8"/><file name="kenswitch.gif" hash="d753218d44bf02c6eeee86d7d129a197"/></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="images"><dir name="paysurev"><file name="visa.png" hash="60ed32f5791eef60655456eefd33b16f"/><file name="visa.gif" hash="e1ecb713347232e5d692c173841388b5"/></dir><dir name="paysurek"><file name="kenswitch.png" hash="2727a7b57737afa935243d8b7e3dfba8"/><file name="kenswitch.gif" hash="d753218d44bf02c6eeee86d7d129a197"/></dir></dir></dir></dir></dir></target><target name="magelocale"><dir name="ru_RU"><file name="MageKenya_Paysurek.csv" hash="1d9f0f2bd43579cbe55c31c25387a9a6"/><file name="MageKenya_Paysurev.csv" hash="1d9f0f2bd43579cbe55c31c25387a9a6"/></dir><dir name="en_US"><file name="MageKenya_Paysurek.csv" hash="b7c7c106dddc476ea5783e09b2bdd86f"/><file name="MageKenya_Paysurev.csv" hash="b7c7c106dddc476ea5783e09b2bdd86f"/></dir></target><target name="mageetc"><dir name="modules"><file name="MageKenya_Paysurev.xml" hash="77303e647239e94dfeee7eb9567c44eb"/><file name="MageKenya_Paysurek.xml" hash="f7c3a14cef7d39fcac64f537115cea84"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="template"><dir name="paysurev"><file name="form.phtml" hash="0df3b3f2cf8df5f786a0bfa1735e61f6"/><file name="info.phtml" hash="f027c2cebc0af5bffc6ecae8608cb55c"/></dir><dir name="paysurek"><file name="form.phtml" hash="ca33a6a4d9a5c70e04f1052bee5d3942"/><file name="info.phtml" hash="4ad6db1f2f3e35198d7c8527ad9bebc7"/></dir></dir></dir></dir><dir name="base"><dir name="default"><dir name="template"><dir name="paysurev"><file name="info.phtml" hash="f027c2cebc0af5bffc6ecae8608cb55c"/><file name="form.phtml" hash="0df3b3f2cf8df5f786a0bfa1735e61f6"/></dir><dir name="paysurek"><file name="info.phtml" hash="4ad6db1f2f3e35198d7c8527ad9bebc7"/><file name="form.phtml" hash="ca33a6a4d9a5c70e04f1052bee5d3942"/></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="paysurev"><file name="info.phtml" hash="f027c2cebc0af5bffc6ecae8608cb55c"/><file name="form.phtml" hash="0df3b3f2cf8df5f786a0bfa1735e61f6"/></dir><dir name="paysurek"><file name="info.phtml" hash="4ad6db1f2f3e35198d7c8527ad9bebc7"/><file name="form.phtml" hash="ca33a6a4d9a5c70e04f1052bee5d3942"/></dir></dir></dir></dir></dir></target><target name="magecommunity"><dir name="MageKenya"><dir name="Paysurev"><dir name="Block"><file name="Form.php" hash="86e01e0b0c7cc863bc2b6f77a4fc2694"/><file name="Info.php" hash="b3a8dbf9ef685bf43c0be7fbd1561938"/><file name="Redirect.php" hash="19e8d170966cf4fae4949078489f5d7e"/></dir><dir name="controllers"><file name="RedirectController.php" hash="a2ba3e1e7aca0b8623b5383e45d92d37"/></dir><dir name="etc"><file name="config.xml" hash="771e5b35e819b6a51d82d4f9ae193c47"/><file name="system.xml" hash="23fe1509f307d49e098e01ea1819de6e"/></dir><dir name="Helper"><file name="Data.php" hash="8541b287ea6d5e17e822b24c99af90f8"/></dir><dir name="Model"><file name="Checkout.php" hash="0ba11c8aadca37f8932710eb2daf43b2"/></dir></dir><dir name="Paysurek"><dir name="Block"><file name="Form.php" hash="7f5cc1fca38364f87af821382653f471"/><file name="Info.php" hash="f88e0bec1a199a016ef8d5bf96ddb99f"/><file name="Redirect.php" hash="6e03f0d16583cdb3690e25e1b1819be2"/></dir><dir name="controllers"><file name="RedirectController.php" hash="d1648562b9db9c0e08f159a567d17688"/></dir><dir name="etc"><file name="config.xml" hash="8b644e1856e3db85967fbc00261b7356"/><file name="system.xml" hash="bc3398d18fade3c16d2095f5b71c5e9d"/></dir><dir name="Helper"><file name="Data.php" hash="eee7efb7a69bfb9c91217c0a3d2d22e6"/></dir><dir name="Model"><file name="Checkout.php" hash="d4bcc6b76d991d8457509fc5f325eeeb"/></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>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>paysure</name>
4
+ <version>1.0.2</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>Paysure Gateway Payment module.&#xD;
10
+ Incorporates Visa and Kenswitch cards and M-pesa.</summary>
11
+ <description>This module enables Merchants to receive Visa, Kenswitch and M-pesa payments on their Magento Website through Paysure Gateway.&#xD;
12
+ &#xD;
13
+ Visit www.paysure.co.ke for more about Paysure</description>
14
+ <notes>Receive Visa, Kenswitch and M-pesa payments on your Magento Website through Paysure Gateway.&#xD;
15
+ Contact the developer at http://www.facebook.com/jkuts</notes>
16
  <authors><author><name>MageKenya</name><user>kuts2010</user><email>jokuts@gmail.com</email></author></authors>
17
+ <date>2013-10-17</date>
18
+ <time>13:33:24</time>
19
+ <contents><target name="magelocal"><dir name="MageKenya"><dir name="Paysurek"><dir name="controllers"><file name="RedirectController.php" hash=""/></dir><dir name="etc"><file name="system.xml" hash=""/><file name="config.xml" hash=""/></dir><dir name="Helper"><file name="Data.php" hash=""/></dir><dir name="Model"><file name="Checkout.php" hash=""/></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="paysurek"><file name="form.phtml" hash="ca33a6a4d9a5c70e04f1052bee5d3942"/><file name="info.phtml" hash="4ad6db1f2f3e35198d7c8527ad9bebc7"/></dir><dir name="paysuremobile"><file name="form.phtml" hash="59545b6c1400da61e8ff280a9778acea"/><file name="info.phtml" hash="47c08d19221bd9b256d03ed232b28ba7"/></dir><dir name="paysurev"><file name="form.phtml" hash="0df3b3f2cf8df5f786a0bfa1735e61f6"/><file name="info.phtml" hash="f027c2cebc0af5bffc6ecae8608cb55c"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="paysurek"><file name="form.phtml" hash="ca33a6a4d9a5c70e04f1052bee5d3942"/><file name="info.phtml" hash="4ad6db1f2f3e35198d7c8527ad9bebc7"/></dir><dir name="paysuremobile"><file name="form.phtml" hash="b85a7ae13ed09bec728e0a2097610e53"/><file name="info.phtml" hash="47c08d19221bd9b256d03ed232b28ba7"/></dir><dir name="paysurev"><file name="form.phtml" hash="0df3b3f2cf8df5f786a0bfa1735e61f6"/><file name="info.phtml" hash="f027c2cebc0af5bffc6ecae8608cb55c"/></dir></dir></dir></dir><dir name="default"><dir name="default"><dir name="template"><dir name="paysurek"><file name="form.phtml" hash="ca33a6a4d9a5c70e04f1052bee5d3942"/><file name="info.phtml" hash="4ad6db1f2f3e35198d7c8527ad9bebc7"/></dir><dir name="paysuremobile"><file name="form.phtml" hash="b85a7ae13ed09bec728e0a2097610e53"/><file name="info.phtml" hash="47c08d19221bd9b256d03ed232b28ba7"/></dir><dir name="paysurev"><file name="form.phtml" hash="0df3b3f2cf8df5f786a0bfa1735e61f6"/><file name="info.phtml" hash="f027c2cebc0af5bffc6ecae8608cb55c"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="MageKenya_Paysurek.xml" hash="f7c3a14cef7d39fcac64f537115cea84"/><file name="MageKenya_Paysuremobile.xml" hash="2623ff047f066b4ffb3be385858feafb"/><file name="MageKenya_Paysurev.xml" hash="77303e647239e94dfeee7eb9567c44eb"/></dir></target><target name="magelocale"><dir name="en_US"><file name="MageKenya_Paysurek.csv" hash="b7c7c106dddc476ea5783e09b2bdd86f"/><file name="MageKenya_Paysuremobile.csv" hash="b7c7c106dddc476ea5783e09b2bdd86f"/><file name="MageKenya_Paysurev.csv" hash="b7c7c106dddc476ea5783e09b2bdd86f"/></dir><dir name="ru_RU"><file name="MageKenya_Paysurek.csv" hash="1d9f0f2bd43579cbe55c31c25387a9a6"/><file name="MageKenya_Paysuremobile.csv" hash="1d9f0f2bd43579cbe55c31c25387a9a6"/><file name="MageKenya_Paysurev.csv" hash="1d9f0f2bd43579cbe55c31c25387a9a6"/></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="images"><dir name="paysurek"><file name="kenswitch.gif" hash="d753218d44bf02c6eeee86d7d129a197"/></dir><dir name="paysuremobile"><file name="mpesa.jpg" hash=""/></dir><dir name="paysurev"><file name="visa.png" hash="60ed32f5791eef60655456eefd33b16f"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="images"><dir name="paysurek"><file name="kenswitch.gif" hash="d753218d44bf02c6eeee86d7d129a197"/></dir><dir name="paysuremobile"><file name="mpesa.jpg" hash="4429f9754914fb34fc0581bbea957f43"/></dir><dir name="paysurev"><file name="visa.png" hash="60ed32f5791eef60655456eefd33b16f"/></dir></dir></dir></dir><dir name="default"><dir name="default"><dir name="images"><dir name="paysurek"><file name="kenswitch.gif" hash="d753218d44bf02c6eeee86d7d129a197"/></dir><dir name="paysuremobile"><file name="mpesa.jpg" hash="4429f9754914fb34fc0581bbea957f43"/></dir><dir name="paysurev"><file name="visa.png" hash="60ed32f5791eef60655456eefd33b16f"/></dir></dir></dir></dir></dir></target><target name="magecommunity"><dir name="MageKenya"><dir name="Paysurek"><dir name="Block"><file name="Form.php" hash="7f5cc1fca38364f87af821382653f471"/><file name="Info.php" hash="f88e0bec1a199a016ef8d5bf96ddb99f"/><file name="Redirect.php" hash="6e03f0d16583cdb3690e25e1b1819be2"/></dir><dir name="controllers"><file name="RedirectController.php" hash="d1648562b9db9c0e08f159a567d17688"/></dir><dir name="etc"><file name="system.xml" hash="bc3398d18fade3c16d2095f5b71c5e9d"/><file name="config.xml" hash="8b644e1856e3db85967fbc00261b7356"/></dir><dir name="Helper"><file name="Data.php" hash="eee7efb7a69bfb9c91217c0a3d2d22e6"/></dir><dir name="Model"><file name="Checkout.php" hash="5e9b43482ff0246c081f477278985fec"/></dir></dir><dir name="Paysuremobile"><dir name="Block"><file name="Form.php" hash="ec599280f88d2cf1d4382c8a9f545c7e"/><file name="Info.php" hash="da279a8019cce023672793070f4d4daf"/><file name="Redirect.php" hash="df21a77c4832bb8bae7e8a060ddce245"/></dir><dir name="controllers"><file name="RedirectController.php" hash="a6b565f407a5685c1c21355c4f9d4bea"/></dir><dir name="etc"><file name="system.xml" hash="d08484978b7c0a8380f9428780fbabdb"/><file name="config.xml" hash="eefb6f9f98196e02c011bad65a61e1bf"/></dir><dir name="Helper"><file name="Data.php" hash="412d7931704d9ecff0489a703b715897"/></dir><dir name="Model"><file name="Checkout.php" hash="01250b04a5cdad5b3f1ea862aacabe20"/></dir></dir><dir name="Paysurev"><dir name="Block"><file name="Form.php" hash="86e01e0b0c7cc863bc2b6f77a4fc2694"/><file name="Info.php" hash="b3a8dbf9ef685bf43c0be7fbd1561938"/><file name="Redirect.php" hash="19e8d170966cf4fae4949078489f5d7e"/></dir><dir name="controllers"><file name="RedirectController.php" hash="a2ba3e1e7aca0b8623b5383e45d92d37"/></dir><dir name="etc"><file name="system.xml" hash="23fe1509f307d49e098e01ea1819de6e"/><file name="config.xml" hash="771e5b35e819b6a51d82d4f9ae193c47"/></dir><dir name="Helper"><file name="Data.php" hash="8541b287ea6d5e17e822b24c99af90f8"/></dir><dir name="Model"><file name="Checkout.php" hash="c2fc0196dd45ee5c2495c45034920a04"/></dir></dir></dir></target></contents>
20
  <compatible/>
21
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
22
  </package>
skin/adminhtml/default/default/images/paysurek/kenswitch.png DELETED
Binary file
skin/adminhtml/default/default/images/paysurev/visa.gif DELETED
Binary file
skin/frontend/base/default/images/paysurek/kenswitch.png DELETED
Binary file
skin/frontend/base/default/images/paysuremobile/mpesa.jpg ADDED
Binary file
skin/frontend/base/default/images/paysurev/visa.gif DELETED
Binary file
skin/frontend/default/default/images/paysurek/kenswitch.png DELETED
Binary file
skin/frontend/default/default/images/paysuremobile/mpesa.jpg ADDED
Binary file
skin/frontend/default/default/images/paysurev/visa.gif DELETED
Binary file