Version Notes
MageKenya Visa and Kenswitch Payment Module for Paysure Gateway
Download this release
Release Info
Developer | MageKenya |
Extension | paysure |
Version | 1.0.0 |
Comparing to | |
See all releases |
Version 1.0.0
- app/code/community/MageKenya/Paysurek/Block/Form.php +11 -0
- app/code/community/MageKenya/Paysurek/Block/Info.php +9 -0
- app/code/community/MageKenya/Paysurek/Block/Redirect.php +30 -0
- app/code/community/MageKenya/Paysurek/Helper/Data.php +8 -0
- app/code/community/MageKenya/Paysurek/Model/Checkout.php +111 -0
- app/code/community/MageKenya/Paysurek/controllers/RedirectController.php +50 -0
- app/code/community/MageKenya/Paysurek/etc/config.xml +99 -0
- app/code/community/MageKenya/Paysurek/etc/system.xml +72 -0
- app/code/community/MageKenya/Paysurev/Block/Form.php +11 -0
- app/code/community/MageKenya/Paysurev/Block/Info.php +9 -0
- app/code/community/MageKenya/Paysurev/Block/Redirect.php +30 -0
- app/code/community/MageKenya/Paysurev/Helper/Data.php +8 -0
- app/code/community/MageKenya/Paysurev/Model/Checkout.php +110 -0
- app/code/community/MageKenya/Paysurev/controllers/RedirectController.php +50 -0
- app/code/community/MageKenya/Paysurev/etc/config.xml +99 -0
- app/code/community/MageKenya/Paysurev/etc/system.xml +72 -0
- app/design/adminhtml/default/default/template/paysurek/form.phtml +6 -0
- app/design/adminhtml/default/default/template/paysurek/info.phtml +5 -0
- app/design/adminhtml/default/default/template/paysurev/form.phtml +6 -0
- app/design/adminhtml/default/default/template/paysurev/info.phtml +5 -0
- app/design/frontend/base/default/template/paysurek/form.phtml +6 -0
- app/design/frontend/base/default/template/paysurek/info.phtml +5 -0
- app/design/frontend/base/default/template/paysurev/form.phtml +6 -0
- app/design/frontend/base/default/template/paysurev/info.phtml +5 -0
- app/design/frontend/default/default/template/paysurek/form.phtml +6 -0
- app/design/frontend/default/default/template/paysurek/info.phtml +5 -0
- app/design/frontend/default/default/template/paysurev/form.phtml +6 -0
- app/design/frontend/default/default/template/paysurev/info.phtml +5 -0
- app/etc/modules/MageKenya_Paysurek.xml +14 -0
- app/etc/modules/MageKenya_Paysurev.xml +14 -0
- app/locale/en_US/MageKenya_Paysurek.csv +6 -0
- app/locale/en_US/MageKenya_Paysurev.csv +6 -0
- app/locale/ru_RU/MageKenya_Paysurek.csv +6 -0
- app/locale/ru_RU/MageKenya_Paysurev.csv +6 -0
- package.xml +18 -0
- skin/adminhtml/default/default/images/paysurek/kenswitch.gif +0 -0
- skin/adminhtml/default/default/images/paysurek/kenswitch.png +0 -0
- skin/adminhtml/default/default/images/paysurev/visa.gif +0 -0
- skin/adminhtml/default/default/images/paysurev/visa.png +0 -0
- skin/frontend/base/default/images/paysurek/kenswitch.gif +0 -0
- skin/frontend/base/default/images/paysurek/kenswitch.png +0 -0
- skin/frontend/base/default/images/paysurev/visa.gif +0 -0
- skin/frontend/base/default/images/paysurev/visa.png +0 -0
- skin/frontend/default/default/images/paysurek/kenswitch.gif +0 -0
- skin/frontend/default/default/images/paysurek/kenswitch.png +0 -0
- skin/frontend/default/default/images/paysurev/visa.gif +0 -0
- skin/frontend/default/default/images/paysurev/visa.png +0 -0
app/code/community/MageKenya/Paysurek/Block/Form.php
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
|
4 |
+
class MageKenya_Paysurek_Block_Form extends Mage_Payment_Block_Form
|
5 |
+
{
|
6 |
+
protected function _construct()
|
7 |
+
{
|
8 |
+
parent::_construct();
|
9 |
+
$this->setTemplate('paysurek/form.phtml');
|
10 |
+
}
|
11 |
+
}
|
app/code/community/MageKenya/Paysurek/Block/Info.php
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class MageKenya_Paysurek_Block_Info extends Mage_Payment_Block_Info {
|
4 |
+
|
5 |
+
protected function _construct() {
|
6 |
+
parent::_construct();
|
7 |
+
$this->setTemplate('paysurek/info.phtml');
|
8 |
+
}
|
9 |
+
}
|
app/code/community/MageKenya/Paysurek/Block/Redirect.php
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
|
4 |
+
class MageKenya_Paysurek_Block_Redirect extends Mage_Core_Block_Abstract
|
5 |
+
{
|
6 |
+
protected function _toHtml()
|
7 |
+
{
|
8 |
+
$paysurek = Mage::getModel('paysurek/checkout');
|
9 |
+
|
10 |
+
$form = new Varien_Data_Form();
|
11 |
+
$form->setAction($paysurek->getPaysurekUrl())
|
12 |
+
->setId('pay')
|
13 |
+
->setName('pay')
|
14 |
+
->setMethod('POST')
|
15 |
+
->setUseContainer(true);
|
16 |
+
foreach ($paysurek->getPaysurekCheckoutFormFields() 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/Paysurek/Helper/Data.php
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
|
4 |
+
class MageKenya_Paysurek_Helper_Data extends Mage_Core_Helper_Abstract
|
5 |
+
{
|
6 |
+
|
7 |
+
|
8 |
+
}
|
app/code/community/MageKenya/Paysurek/Model/Checkout.php
ADDED
@@ -0,0 +1,111 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
|
4 |
+
class MageKenya_Paysurek_Model_Checkout extends Mage_Payment_Model_Method_Abstract {
|
5 |
+
|
6 |
+
protected $_code = 'paysurek';
|
7 |
+
protected $_formBlockType = 'paysurek/form';
|
8 |
+
protected $_infoBlockType = 'paysurek/info';
|
9 |
+
protected $_order;
|
10 |
+
|
11 |
+
|
12 |
+
const WALLET_ID = 'payment/paysurek/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('paysurek/redirect', array('_secure' => true));
|
23 |
+
}
|
24 |
+
|
25 |
+
public function getPaysurekUrl() {
|
26 |
+
$url=$this->getPaysureCheckoutFormFields();
|
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 getPaysureCheckoutFormFields() {
|
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>1</cardtype>';
|
67 |
+
$data.='<mname>'.Mage::getStoreConfig(MageKenya_Paysurek_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('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>';
|
78 |
+
$data.='<email>'.$email.'</email>';
|
79 |
+
$data.='</purchase>';
|
80 |
+
$data.='</order>';
|
81 |
+
|
82 |
+
}
|
83 |
+
|
84 |
+
|
85 |
+
$orderItems = $order->getAllItems();
|
86 |
+
$dataitems = '<dataitems>';
|
87 |
+
foreach ($orderItems as $item){
|
88 |
+
$dataitems.= '<dataitem>';
|
89 |
+
//$dataitems .='<itemnamcode>'.$item->getSku().'</itemnamcode>';
|
90 |
+
$dataitems .= '<itemname>'.$item->getName() . '</itemname>';
|
91 |
+
$dataitems .= '<itemprice>'.trim(round($item->getPrice(),2)) .'</itemprice>';
|
92 |
+
$dataitems .= '<quantity>'.$item->getQty() .'</quantity>';
|
93 |
+
$dataitems .= '<subtotal>'.trim(round($item->getPrice(),2))*$item->getQty().'</subtotal>';
|
94 |
+
$dataitems.= "</dataitem>";
|
95 |
+
|
96 |
+
}
|
97 |
+
//$dataitems = '</dataitems>';
|
98 |
+
$params=array('data'=>$data,'dataitems'=>$dataitems);
|
99 |
+
return $params;
|
100 |
+
|
101 |
+
}
|
102 |
+
|
103 |
+
public function initialize($paymentAction, $stateObject)
|
104 |
+
{
|
105 |
+
$state = Mage_Sales_Model_Order::STATE_PENDING_PAYMENT;
|
106 |
+
$stateObject->setState($state);
|
107 |
+
$stateObject->setStatus('pending_payment');
|
108 |
+
$stateObject->setIsNotified(false);
|
109 |
+
}
|
110 |
+
|
111 |
+
}
|
app/code/community/MageKenya/Paysurek/controllers/RedirectController.php
ADDED
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
|
4 |
+
class MageKenya_Paysurek_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('paysurek/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('paysurek')->__('The order has been canceled. Order #').$transaction_id);
|
43 |
+
$this->_redirect('checkout/cart');
|
44 |
+
}
|
45 |
+
|
46 |
+
|
47 |
+
|
48 |
+
}
|
49 |
+
|
50 |
+
?>
|
app/code/community/MageKenya/Paysurek/etc/config.xml
ADDED
@@ -0,0 +1,99 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
|
3 |
+
<config>
|
4 |
+
<modules>
|
5 |
+
<MageKenya_Paysurek>
|
6 |
+
<version>0.0.1</version>
|
7 |
+
</MageKenya_Paysurek>
|
8 |
+
</modules>
|
9 |
+
|
10 |
+
<global>
|
11 |
+
|
12 |
+
<models>
|
13 |
+
<paysurek>
|
14 |
+
<class>MageKenya_Paysurek_Model</class>
|
15 |
+
</paysurek>
|
16 |
+
</models>
|
17 |
+
|
18 |
+
<blocks>
|
19 |
+
<paysurek>
|
20 |
+
<class>MageKenya_Paysurek_Block</class>
|
21 |
+
</paysurek>
|
22 |
+
</blocks>
|
23 |
+
|
24 |
+
<resources>
|
25 |
+
<paysure_setup>
|
26 |
+
<setup>
|
27 |
+
<module>MageKenya_Paysurek</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 |
+
<paysurek>
|
46 |
+
<class>MageKenya_Paysurek_Helper</class>
|
47 |
+
</paysurek>
|
48 |
+
</helpers>
|
49 |
+
</global>
|
50 |
+
|
51 |
+
|
52 |
+
<frontend>
|
53 |
+
<secure_url>
|
54 |
+
<paysure_redirect>/paysurek/redirect/00</paysure_redirect>
|
55 |
+
</secure_url>
|
56 |
+
<routers>
|
57 |
+
<paysurek>
|
58 |
+
<use>standard</use>
|
59 |
+
<args>
|
60 |
+
<module>MageKenya_Paysurek</module>
|
61 |
+
<frontName>paysurek</frontName>
|
62 |
+
</args>
|
63 |
+
</paysurek>
|
64 |
+
</routers>
|
65 |
+
<translate>
|
66 |
+
<modules>
|
67 |
+
<MageKenya_Paysurek>
|
68 |
+
<files>
|
69 |
+
<default>MageKenya_Paysurek.csv</default>
|
70 |
+
</files>
|
71 |
+
</MageKenya_Paysurek>
|
72 |
+
</modules>
|
73 |
+
</translate>
|
74 |
+
</frontend>
|
75 |
+
|
76 |
+
|
77 |
+
<adminhtml>
|
78 |
+
<translate>
|
79 |
+
<modules>
|
80 |
+
<MageKenya_Paysurek>
|
81 |
+
<files>
|
82 |
+
<default>MageKenya_Paysurek.csv</default>
|
83 |
+
</files>
|
84 |
+
</MageKenya_Paysurek>
|
85 |
+
</modules>
|
86 |
+
</translate>
|
87 |
+
</adminhtml>
|
88 |
+
|
89 |
+
<default>
|
90 |
+
<payment>
|
91 |
+
<paysurek>
|
92 |
+
<active>0</active>
|
93 |
+
<model>paysurek/checkout</model>
|
94 |
+
<title>Paysure | Kenswitch</title>
|
95 |
+
<paysure_walletid>Enter Merchant ID Here..</paysure_walletid>
|
96 |
+
</paysurek>
|
97 |
+
</payment>
|
98 |
+
</default>
|
99 |
+
</config>
|
app/code/community/MageKenya/Paysurek/etc/system.xml
ADDED
@@ -0,0 +1,72 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<sections>
|
4 |
+
<payment>
|
5 |
+
<groups>
|
6 |
+
<paysurek translate="label" module="paysurek">
|
7 |
+
<label>Paysure | Kenswitch</label>
|
8 |
+
<frontend_type>text</frontend_type>
|
9 |
+
<sort_order>1</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>1</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>3</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>50</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>0</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>51</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 |
+
</paysurek>
|
69 |
+
</groups>
|
70 |
+
</payment>
|
71 |
+
</sections>
|
72 |
+
</config>
|
app/code/community/MageKenya/Paysurev/Block/Form.php
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
|
4 |
+
class MageKenya_Paysurev_Block_Form extends Mage_Payment_Block_Form
|
5 |
+
{
|
6 |
+
protected function _construct()
|
7 |
+
{
|
8 |
+
parent::_construct();
|
9 |
+
$this->setTemplate('paysurev/form.phtml');
|
10 |
+
}
|
11 |
+
}
|
app/code/community/MageKenya/Paysurev/Block/Info.php
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class MageKenya_Paysurev_Block_Info extends Mage_Payment_Block_Info {
|
4 |
+
|
5 |
+
protected function _construct() {
|
6 |
+
parent::_construct();
|
7 |
+
$this->setTemplate('paysurev/info.phtml');
|
8 |
+
}
|
9 |
+
}
|
app/code/community/MageKenya/Paysurev/Block/Redirect.php
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
|
4 |
+
class MageKenya_Paysurev_Block_Redirect extends Mage_Core_Block_Abstract
|
5 |
+
{
|
6 |
+
protected function _toHtml()
|
7 |
+
{
|
8 |
+
$paysurev = Mage::getModel('paysurev/checkout');
|
9 |
+
|
10 |
+
$form = new Varien_Data_Form();
|
11 |
+
$form->setAction($paysurev->getPaysurevUrl())
|
12 |
+
->setId('pay')
|
13 |
+
->setName('pay')
|
14 |
+
->setMethod('POST')
|
15 |
+
->setUseContainer(true);
|
16 |
+
foreach ($paysurev->getPaysurevCheckoutFormFields() 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/Paysurev/Helper/Data.php
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
|
4 |
+
class MageKenya_Paysurev_Helper_Data extends Mage_Core_Helper_Abstract
|
5 |
+
{
|
6 |
+
|
7 |
+
|
8 |
+
}
|
app/code/community/MageKenya/Paysurev/Model/Checkout.php
ADDED
@@ -0,0 +1,110 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
|
4 |
+
class MageKenya_Paysurev_Model_Checkout extends Mage_Payment_Model_Method_Abstract {
|
5 |
+
|
6 |
+
protected $_code = 'paysurev';
|
7 |
+
protected $_formBlockType = 'paysurev/form';
|
8 |
+
protected $_infoBlockType = 'paysurev/info';
|
9 |
+
protected $_order;
|
10 |
+
|
11 |
+
|
12 |
+
const WALLET_ID = 'payment/paysurev/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('paysurev/redirect', array('_secure' => true));
|
23 |
+
}
|
24 |
+
|
25 |
+
public function getPaysurevUrl() {
|
26 |
+
$url=$this->getPaysurevCheckoutFormFields();
|
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 getPaysurevCheckoutFormFields() {
|
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>2</cardtype>';
|
67 |
+
$data.='<mname>'.Mage::getStoreConfig(MageKenya_Paysurev_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('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>';
|
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/Paysurev/controllers/RedirectController.php
ADDED
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
|
4 |
+
class MageKenya_Paysurev_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('paysurev/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('paysurev')->__('The order has been canceled. Order #').$transaction_id);
|
43 |
+
$this->_redirect('checkout/cart');
|
44 |
+
}
|
45 |
+
|
46 |
+
|
47 |
+
|
48 |
+
}
|
49 |
+
|
50 |
+
?>
|
app/code/community/MageKenya/Paysurev/etc/config.xml
ADDED
@@ -0,0 +1,99 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
|
3 |
+
<config>
|
4 |
+
<modules>
|
5 |
+
<MageKenya_Paysurev>
|
6 |
+
<version>0.0.1</version>
|
7 |
+
</MageKenya_Paysurev>
|
8 |
+
</modules>
|
9 |
+
|
10 |
+
<global>
|
11 |
+
|
12 |
+
<models>
|
13 |
+
<paysurev>
|
14 |
+
<class>MageKenya_Paysurev_Model</class>
|
15 |
+
</paysurev>
|
16 |
+
</models>
|
17 |
+
|
18 |
+
<blocks>
|
19 |
+
<paysurev>
|
20 |
+
<class>MageKenya_Paysurev_Block</class>
|
21 |
+
</paysurev>
|
22 |
+
</blocks>
|
23 |
+
|
24 |
+
<resources>
|
25 |
+
<paysure_setup>
|
26 |
+
<setup>
|
27 |
+
<module>MageKenya_Paysurev</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 |
+
<paysurev>
|
46 |
+
<class>MageKenya_Paysurev_Helper</class>
|
47 |
+
</paysurev>
|
48 |
+
</helpers>
|
49 |
+
</global>
|
50 |
+
|
51 |
+
|
52 |
+
<frontend>
|
53 |
+
<secure_url>
|
54 |
+
<paysure_redirect>/paysurev/redirect/00</paysure_redirect>
|
55 |
+
</secure_url>
|
56 |
+
<routers>
|
57 |
+
<paysurev>
|
58 |
+
<use>standard</use>
|
59 |
+
<args>
|
60 |
+
<module>MageKenya_Paysurev</module>
|
61 |
+
<frontName>paysurev</frontName>
|
62 |
+
</args>
|
63 |
+
</paysurev>
|
64 |
+
</routers>
|
65 |
+
<translate>
|
66 |
+
<modules>
|
67 |
+
<MageKenya_Paysurev>
|
68 |
+
<files>
|
69 |
+
<default>MageKenya_Paysurev.csv</default>
|
70 |
+
</files>
|
71 |
+
</MageKenya_Paysurev>
|
72 |
+
</modules>
|
73 |
+
</translate>
|
74 |
+
</frontend>
|
75 |
+
|
76 |
+
|
77 |
+
<adminhtml>
|
78 |
+
<translate>
|
79 |
+
<modules>
|
80 |
+
<MageKenya_Paysurev>
|
81 |
+
<files>
|
82 |
+
<default>MageKenya_Paysurev.csv</default>
|
83 |
+
</files>
|
84 |
+
</MageKenya_Paysurev>
|
85 |
+
</modules>
|
86 |
+
</translate>
|
87 |
+
</adminhtml>
|
88 |
+
|
89 |
+
<default>
|
90 |
+
<payment>
|
91 |
+
<paysurev>
|
92 |
+
<active>1</active>
|
93 |
+
<model>paysurev/checkout</model>
|
94 |
+
<title>Paysure | Visa</title>
|
95 |
+
<paysure_walletid>Enter Merchant ID Here..</paysure_walletid>
|
96 |
+
</paysurev>
|
97 |
+
</payment>
|
98 |
+
</default>
|
99 |
+
</config>
|
app/code/community/MageKenya/Paysurev/etc/system.xml
ADDED
@@ -0,0 +1,72 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<sections>
|
4 |
+
<payment>
|
5 |
+
<groups>
|
6 |
+
<paysurev translate="label" module="paysurev">
|
7 |
+
<label>Paysure | Visa</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>3</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>50</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>51</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 |
+
</paysurev>
|
69 |
+
</groups>
|
70 |
+
</payment>
|
71 |
+
</sections>
|
72 |
+
</config>
|
app/design/adminhtml/default/default/template/paysurek/form.phtml
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
echo '<table border="0">';
|
3 |
+
echo '<tr><td><img src="'.$this->getSkinUrl("images/paysurek/kenswitch.gif").'" alt="kenswitch" /></tr>';
|
4 |
+
echo '</table>';
|
5 |
+
|
6 |
+
?>
|
app/design/adminhtml/default/default/template/paysurek/info.phtml
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
echo 'Payment made by Kenswitch powerd by<a href="http://www.paysure.co.ke" target="_blank"> Paysure</a>';
|
3 |
+
?>
|
4 |
+
|
5 |
+
|
app/design/adminhtml/default/default/template/paysurev/form.phtml
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
echo '<table border="0">';
|
3 |
+
echo '<tr><td><img src="'.$this->getSkinUrl("images/paysurev/visa.png").'" alt="visa" /></tr>';
|
4 |
+
echo '</table>';
|
5 |
+
|
6 |
+
?>
|
app/design/adminhtml/default/default/template/paysurev/info.phtml
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
echo 'Payment made by Visa powerd by<a href="http://www.paysure.co.ke" target="_blank"> Paysure</a>';
|
3 |
+
?>
|
4 |
+
|
5 |
+
|
app/design/frontend/base/default/template/paysurek/form.phtml
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
echo '<table border="0">';
|
3 |
+
echo '<tr><td><img src="'.$this->getSkinUrl("images/paysurek/kenswitch.gif").'" alt="kenswitch" /></tr>';
|
4 |
+
echo '</table>';
|
5 |
+
|
6 |
+
?>
|
app/design/frontend/base/default/template/paysurek/info.phtml
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
echo 'Payment made by Kenswitch powerd by<a href="http://www.paysure.co.ke" target="_blank"> Paysure</a>';
|
3 |
+
?>
|
4 |
+
|
5 |
+
|
app/design/frontend/base/default/template/paysurev/form.phtml
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
echo '<table border="0">';
|
3 |
+
echo '<tr><td><img src="'.$this->getSkinUrl("images/paysurev/visa.png").'" alt="visa" /></tr>';
|
4 |
+
echo '</table>';
|
5 |
+
|
6 |
+
?>
|
app/design/frontend/base/default/template/paysurev/info.phtml
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
echo 'Payment made by Visa powerd by<a href="http://www.paysure.co.ke" target="_blank"> Paysure</a>';
|
3 |
+
?>
|
4 |
+
|
5 |
+
|
app/design/frontend/default/default/template/paysurek/form.phtml
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
echo '<table border="0">';
|
3 |
+
echo '<tr><td><img src="'.$this->getSkinUrl("images/paysurek/kenswitch.gif").'" alt="kenswitch" /></tr>';
|
4 |
+
echo '</table>';
|
5 |
+
|
6 |
+
?>
|
app/design/frontend/default/default/template/paysurek/info.phtml
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
echo 'Payment made by Kenswitch powerd by<a href="http://www.paysure.co.ke" target="_blank"> Paysure</a>';
|
3 |
+
?>
|
4 |
+
|
5 |
+
|
app/design/frontend/default/default/template/paysurev/form.phtml
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
echo '<table border="0">';
|
3 |
+
echo '<tr><td><img src="'.$this->getSkinUrl("images/paysurev/visa.png").'" alt="visa" /></tr>';
|
4 |
+
echo '</table>';
|
5 |
+
|
6 |
+
?>
|
app/design/frontend/default/default/template/paysurev/info.phtml
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
echo 'Payment made by Visa powerd by<a href="http://www.paysure.co.ke" target="_blank"> Paysure</a>';
|
3 |
+
?>
|
4 |
+
|
5 |
+
|
app/etc/modules/MageKenya_Paysurek.xml
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<MageKenya_Paysurek>
|
5 |
+
<active>true</active>
|
6 |
+
<codePool>community</codePool>
|
7 |
+
<depends>
|
8 |
+
<Mage_Paygate/>
|
9 |
+
<Mage_Checkout/>
|
10 |
+
<Mage_Sales/>
|
11 |
+
</depends>
|
12 |
+
</MageKenya_Paysurek>
|
13 |
+
</modules>
|
14 |
+
</config>
|
app/etc/modules/MageKenya_Paysurev.xml
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<MageKenya_Paysurev>
|
5 |
+
<active>true</active>
|
6 |
+
<codePool>community</codePool>
|
7 |
+
<depends>
|
8 |
+
<Mage_Paygate/>
|
9 |
+
<Mage_Checkout/>
|
10 |
+
<Mage_Sales/>
|
11 |
+
</depends>
|
12 |
+
</MageKenya_Paysurev>
|
13 |
+
</modules>
|
14 |
+
</config>
|
app/locale/en_US/MageKenya_Paysurek.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/en_US/MageKenya_Paysurev.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_Paysurek.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,Олата происходит автоматически на сайте платежей
|
app/locale/ru_RU/MageKenya_Paysurev.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
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<package>
|
3 |
+
<name>paysure</name>
|
4 |
+
<version>1.0.0</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>09:59:35</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><package><name>Mage_Core_Helper_Abstract</name><channel>community</channel><min>1.5.0.0</min><max>1.7.0.2</max></package><extension><name>soap</name><min></min><max></max></extension></required></dependencies>
|
18 |
+
</package>
|
skin/adminhtml/default/default/images/paysurek/kenswitch.gif
ADDED
Binary file
|
skin/adminhtml/default/default/images/paysurek/kenswitch.png
ADDED
Binary file
|
skin/adminhtml/default/default/images/paysurev/visa.gif
ADDED
Binary file
|
skin/adminhtml/default/default/images/paysurev/visa.png
ADDED
Binary file
|
skin/frontend/base/default/images/paysurek/kenswitch.gif
ADDED
Binary file
|
skin/frontend/base/default/images/paysurek/kenswitch.png
ADDED
Binary file
|
skin/frontend/base/default/images/paysurev/visa.gif
ADDED
Binary file
|
skin/frontend/base/default/images/paysurev/visa.png
ADDED
Binary file
|
skin/frontend/default/default/images/paysurek/kenswitch.gif
ADDED
Binary file
|
skin/frontend/default/default/images/paysurek/kenswitch.png
ADDED
Binary file
|
skin/frontend/default/default/images/paysurev/visa.gif
ADDED
Binary file
|
skin/frontend/default/default/images/paysurev/visa.png
ADDED
Binary file
|