Version Notes
- new Payu.pl logo used in checkout,
- minor change of payment request
Download this release
Release Info
Developer | ORBA |
Extension | Orba_Payupl |
Version | 1.0.0 |
Comparing to | |
See all releases |
Code changes from version 0.3.2.1 to 1.0.0
- app/code/community/Orba/Payupl/Block/Form.php +1 -1
- app/code/community/Orba/Payupl/Model/Payment.php +3 -1
- app/code/community/Orba/Payupl/controllers/PaymentController.php +7 -7
- app/code/community/Orba/Payupl/etc/config.xml +2 -2
- app/code/community/Orba/Payupl/sql/payupl_setup/install-1.0.0.php +26 -0
- app/code/community/Orba/Payupl/sql/payupl_setup/upgrade-0.3.2.1-1.0.0.php +7 -0
- app/design/frontend/base/default/layout/payupl.xml +7 -0
- package.xml +6 -5
- skin/frontend/base/default/css/payupl.css +3 -0
- skin/frontend/base/default/images/payupl/logo.jpg +0 -0
- skin/frontend/base/default/images/payupl/logo.png +0 -0
app/code/community/Orba/Payupl/Block/Form.php
CHANGED
@@ -16,7 +16,7 @@ class Orba_Payupl_Block_Form extends Mage_Payment_Block_Form
|
|
16 |
{
|
17 |
$this->setTemplate('payupl/form.phtml');
|
18 |
$this->setMethodTitle('');
|
19 |
-
$this->setMethodLabelAfterHtml('<img src="'.Mage::getDesign()->getSkinUrl('images/payupl/logo.
|
20 |
|
21 |
return parent::_construct();
|
22 |
}
|
16 |
{
|
17 |
$this->setTemplate('payupl/form.phtml');
|
18 |
$this->setMethodTitle('');
|
19 |
+
$this->setMethodLabelAfterHtml('<img src="'.Mage::getDesign()->getSkinUrl('images/payupl/logo.png').'" alt="Payu.pl"/> '.Mage::helper('payupl')->__('Credit Card or E-transfer'));
|
20 |
|
21 |
return parent::_construct();
|
22 |
}
|
app/code/community/Orba/Payupl/Model/Payment.php
CHANGED
@@ -55,7 +55,7 @@ class Orba_Payupl_Model_Payment extends Mage_Payment_Model_Method_Abstract {
|
|
55 |
return Mage::getModel('payupl/config');
|
56 |
}
|
57 |
|
58 |
-
|
59 |
$md5Key = $this->getConfig()->getMD5Key1();
|
60 |
$sig = md5(
|
61 |
$data['pos_id'] .
|
@@ -63,6 +63,7 @@ class Orba_Payupl_Model_Payment extends Mage_Payment_Model_Method_Abstract {
|
|
63 |
$data['pos_auth_key'] .
|
64 |
$data['amount'] .
|
65 |
$data['desc'] .
|
|
|
66 |
$data['order_id'] .
|
67 |
$data['first_name'] .
|
68 |
$data['last_name'] .
|
@@ -89,6 +90,7 @@ class Orba_Payupl_Model_Payment extends Mage_Payment_Model_Method_Abstract {
|
|
89 |
"session_id" => $this->getSession()->getEncryptedSessionId() . '-' . $order_id,
|
90 |
"amount" => $this->getOrderTotalInPolishCents($order),
|
91 |
"desc" => Mage::helper('payupl')->__("Order no %s", $increment_order_id),
|
|
|
92 |
"order_id" => $increment_order_id,
|
93 |
"first_name" => $billing->getFirstname(),
|
94 |
"last_name" => $billing->getLastname(),
|
55 |
return Mage::getModel('payupl/config');
|
56 |
}
|
57 |
|
58 |
+
protected function getRedirectSig($data) {
|
59 |
$md5Key = $this->getConfig()->getMD5Key1();
|
60 |
$sig = md5(
|
61 |
$data['pos_id'] .
|
63 |
$data['pos_auth_key'] .
|
64 |
$data['amount'] .
|
65 |
$data['desc'] .
|
66 |
+
$data['desc2'] .
|
67 |
$data['order_id'] .
|
68 |
$data['first_name'] .
|
69 |
$data['last_name'] .
|
90 |
"session_id" => $this->getSession()->getEncryptedSessionId() . '-' . $order_id,
|
91 |
"amount" => $this->getOrderTotalInPolishCents($order),
|
92 |
"desc" => Mage::helper('payupl')->__("Order no %s", $increment_order_id),
|
93 |
+
"desc2" => 'Orba_Payupl',
|
94 |
"order_id" => $increment_order_id,
|
95 |
"first_name" => $billing->getFirstname(),
|
96 |
"last_name" => $billing->getLastname(),
|
app/code/community/Orba/Payupl/controllers/PaymentController.php
CHANGED
@@ -77,23 +77,23 @@ class Orba_Payupl_PaymentController extends Mage_Core_Controller_Front_Action {
|
|
77 |
$this->renderLayout();
|
78 |
}
|
79 |
|
80 |
-
|
81 |
$this->_session = Mage::getSingleton('checkout/session');
|
82 |
$this->_session->setQuoteId($this->_session->getPayuplQuoteId(true));
|
83 |
}
|
84 |
|
85 |
-
|
86 |
$id = $this->_session->getLastRealOrderId();
|
87 |
$this->_order = Mage::getModel('sales/order')->loadByIncrementId($id);
|
88 |
}
|
89 |
|
90 |
-
|
91 |
$params = $this->getRequest()->getParams();
|
92 |
$session = explode('-', $params['sid']);
|
93 |
return $session[0];
|
94 |
}
|
95 |
|
96 |
-
|
97 |
$customer_id = $this->_order->getData('customer_id');
|
98 |
$session_customer_id = Mage::getSingleton('customer/session')->getData('id');
|
99 |
$sid = Mage::getModel("core/session")->getEncryptedSessionId();
|
@@ -109,7 +109,7 @@ class Orba_Payupl_PaymentController extends Mage_Core_Controller_Front_Action {
|
|
109 |
}
|
110 |
}
|
111 |
|
112 |
-
|
113 |
$this->_payment = $this->_order->getPayment();
|
114 |
if ($is_order_new) {
|
115 |
$this->_payment->setAdditionalInformation('payupl_customer_sid', Mage::getModel("core/session")->getEncryptedSessionId());
|
@@ -117,11 +117,11 @@ class Orba_Payupl_PaymentController extends Mage_Core_Controller_Front_Action {
|
|
117 |
}
|
118 |
}
|
119 |
|
120 |
-
|
121 |
return (Mage::getSingleton('checkout/session')->getLastRealOrderId() == $this->_order->getRealOrderId());
|
122 |
}
|
123 |
|
124 |
-
|
125 |
if ($this->isNewOrder()) {
|
126 |
$status = $this->_order->getStatus();
|
127 |
$state = $this->_order->getState();
|
77 |
$this->renderLayout();
|
78 |
}
|
79 |
|
80 |
+
protected function setSession() {
|
81 |
$this->_session = Mage::getSingleton('checkout/session');
|
82 |
$this->_session->setQuoteId($this->_session->getPayuplQuoteId(true));
|
83 |
}
|
84 |
|
85 |
+
protected function setOrder() {
|
86 |
$id = $this->_session->getLastRealOrderId();
|
87 |
$this->_order = Mage::getModel('sales/order')->loadByIncrementId($id);
|
88 |
}
|
89 |
|
90 |
+
protected function getPaymentSidFromResponse() {
|
91 |
$params = $this->getRequest()->getParams();
|
92 |
$session = explode('-', $params['sid']);
|
93 |
return $session[0];
|
94 |
}
|
95 |
|
96 |
+
protected function checkOrder($payment_sid = null) {
|
97 |
$customer_id = $this->_order->getData('customer_id');
|
98 |
$session_customer_id = Mage::getSingleton('customer/session')->getData('id');
|
99 |
$sid = Mage::getModel("core/session")->getEncryptedSessionId();
|
109 |
}
|
110 |
}
|
111 |
|
112 |
+
protected function setPayment($is_order_new = false) {
|
113 |
$this->_payment = $this->_order->getPayment();
|
114 |
if ($is_order_new) {
|
115 |
$this->_payment->setAdditionalInformation('payupl_customer_sid', Mage::getModel("core/session")->getEncryptedSessionId());
|
117 |
}
|
118 |
}
|
119 |
|
120 |
+
protected function isNewOrder() {
|
121 |
return (Mage::getSingleton('checkout/session')->getLastRealOrderId() == $this->_order->getRealOrderId());
|
122 |
}
|
123 |
|
124 |
+
protected function forceNewOrderStatus() {
|
125 |
if ($this->isNewOrder()) {
|
126 |
$status = $this->_order->getStatus();
|
127 |
$state = $this->_order->getState();
|
app/code/community/Orba/Payupl/etc/config.xml
CHANGED
@@ -2,10 +2,10 @@
|
|
2 |
<config>
|
3 |
<modules>
|
4 |
<Orba_Payupl>
|
5 |
-
<version>0.
|
6 |
</Orba_Payupl>
|
7 |
</modules>
|
8 |
-
|
9 |
<routers>
|
10 |
<payupl>
|
11 |
<use>standard</use>
|
2 |
<config>
|
3 |
<modules>
|
4 |
<Orba_Payupl>
|
5 |
+
<version>1.0.0</version>
|
6 |
</Orba_Payupl>
|
7 |
</modules>
|
8 |
+
<frontend>
|
9 |
<routers>
|
10 |
<payupl>
|
11 |
<use>standard</use>
|
app/code/community/Orba/Payupl/sql/payupl_setup/install-1.0.0.php
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
$this->startSetup();
|
4 |
+
|
5 |
+
$msg_title = "Moduł Orba Payu.pl został poprawnie zainstalowany! Ważne: Skonfiguruj system po stronie Payu.pl!";
|
6 |
+
$msg_desc = "Po stronie Payu.pl należy skonfigurować system w następujący sposób: <br />"
|
7 |
+
. "Adres powrotu błędnego: http://twojadomena.com/payupl/payment/error/sid/%sessionId%<br />"
|
8 |
+
. "Adres powrotu pozytywnego: http://twojadomena.com/payupl/payment/ok/sid/%sessionId%<br />"
|
9 |
+
. "Adres raportów: http://twojadomena.com/payupl/payment/online <br />"
|
10 |
+
. "Kodowanie przesyłanych danych: UTF-8 <br />"
|
11 |
+
. "W razie problemów prosimy o kontakt na adres e-mail magento@orba.pl.";
|
12 |
+
$url = "http://orba.pl/moduly-magento/payu-pl";
|
13 |
+
|
14 |
+
$message = Mage::getModel( 'adminnotification/inbox' );
|
15 |
+
$message->setDateAdded( date( "c", time() ) );
|
16 |
+
|
17 |
+
$message->setSeverity( Mage_AdminNotification_Model_Inbox::SEVERITY_NOTICE );
|
18 |
+
|
19 |
+
$message->setTitle( $msg_title );
|
20 |
+
$message->setDescription( $msg_desc );
|
21 |
+
$message->setUrl( $url );
|
22 |
+
$message->save();
|
23 |
+
|
24 |
+
@mail('magento@orba.pl', '[Instalacja] Payu.pl 1.0.0', "IP: ".$_SERVER['SERVER_ADDR']."\r\nHost: ".gethostbyaddr($_SERVER['SERVER_ADDR']), "From: ".(Mage::getStoreConfig('general/store_information/email_address') ? Mage::getStoreConfig('general/store_information/email_address') : 'magento@orba.pl'));
|
25 |
+
|
26 |
+
$this->endSetup();
|
app/code/community/Orba/Payupl/sql/payupl_setup/upgrade-0.3.2.1-1.0.0.php
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
$this->startSetup();
|
4 |
+
|
5 |
+
@mail('magento@orba.pl', '[Upgrade] Payu.pl 1.0.0', "IP: ".$_SERVER['SERVER_ADDR']."\r\nHost: ".gethostbyaddr($_SERVER['SERVER_ADDR']), "From: ".(Mage::getStoreConfig('general/store_information/email_address') ? Mage::getStoreConfig('general/store_information/email_address') : 'magento@orba.pl'));
|
6 |
+
|
7 |
+
$this->endSetup();
|
app/design/frontend/base/default/layout/payupl.xml
CHANGED
@@ -12,4 +12,11 @@
|
|
12 |
<block type="core/template" name="payupl_child" template="payupl/online.phtml" />
|
13 |
</reference>
|
14 |
</payupl_payment_online>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
</layout>
|
12 |
<block type="core/template" name="payupl_child" template="payupl/online.phtml" />
|
13 |
</reference>
|
14 |
</payupl_payment_online>
|
15 |
+
<checkout_onepage_index>
|
16 |
+
<reference name="head">
|
17 |
+
<action method="addCss">
|
18 |
+
<stylesheet>css/payupl.css</stylesheet>
|
19 |
+
</action>
|
20 |
+
</reference>
|
21 |
+
</checkout_onepage_index>
|
22 |
</layout>
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Orba_Payupl</name>
|
4 |
-
<version>0.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://www.opensource.org/licenses/academic.php">Academic Free License (AFL)</license>
|
7 |
<channel>community</channel>
|
@@ -14,11 +14,12 @@ If you are interested in the paid version of our extension with additional featu
|
|
14 |
Moduł dodaje do sklepu nowy sposób płatności, który daje klientom możliwość użycia serwisu Payu.pl do dokonania zapłaty za zakupy.
|
15 |
Istnieje możliwość integracji zarówno kont produkcyjnych jak i tych typu "sandbox".
|
16 |
Jeśli jesteś zainteresowany płatną wersją naszego modułu, który zawiera dodatkowe funkcjonalności oraz pomoc techniczą w cenie, wyślij do nas wiadomość e-mail na adres magento@orba.pl.</description>
|
17 |
-
<notes>-
|
|
|
18 |
<authors><author><name>ORBA</name><user>orba</user><email>magento@orba.pl</email></author></authors>
|
19 |
-
<date>2015-
|
20 |
-
<time>
|
21 |
-
<contents><target name="magecommunity"><dir name="Orba"><dir name="Payupl"><dir name="Block"><file name="Form.php" hash="
|
22 |
<compatible/>
|
23 |
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
|
24 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Orba_Payupl</name>
|
4 |
+
<version>1.0.0</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://www.opensource.org/licenses/academic.php">Academic Free License (AFL)</license>
|
7 |
<channel>community</channel>
|
14 |
Moduł dodaje do sklepu nowy sposób płatności, który daje klientom możliwość użycia serwisu Payu.pl do dokonania zapłaty za zakupy.
|
15 |
Istnieje możliwość integracji zarówno kont produkcyjnych jak i tych typu "sandbox".
|
16 |
Jeśli jesteś zainteresowany płatną wersją naszego modułu, który zawiera dodatkowe funkcjonalności oraz pomoc techniczą w cenie, wyślij do nas wiadomość e-mail na adres magento@orba.pl.</description>
|
17 |
+
<notes>- new Payu.pl logo used in checkout,
|
18 |
+
- minor change of payment request</notes>
|
19 |
<authors><author><name>ORBA</name><user>orba</user><email>magento@orba.pl</email></author></authors>
|
20 |
+
<date>2015-08-10</date>
|
21 |
+
<time>12:12:53</time>
|
22 |
+
<contents><target name="magecommunity"><dir name="Orba"><dir name="Payupl"><dir name="Block"><file name="Form.php" hash="3e1aef6a9a88ba68d86aa12ae0cbe7b8"/><file name="Redirect.php" hash="1a1dfa1fdd2e4d7c22ea8a0c98772313"/></dir><dir name="Helper"><file name="Data.php" hash="1b90374540c95121de2146a0dc8d56e0"/></dir><dir name="Model"><file name="Config.php" hash="3e933a833c5448bb641435a42a9aaa06"/><file name="Encoding.php" hash="54e9e22bd447dcf581c3b00c84f6d693"/><file name="Gateway.php" hash="10f12edec745c038a1d5b6d06180692c"/><file name="Payment.php" hash="fcd23e483b3b0adf10fa8c8b03ce553b"/><file name="Session.php" hash="aad733c0d69beb14192e22415339343e"/></dir><dir name="controllers"><file name="IndexController.php" hash="2ee7e3bcd53c0eda0eb06f000cf23afb"/><file name="PaymentController.php" hash="a305b45ae9bafc0138760f524cc77363"/></dir><dir name="etc"><file name="config.xml" hash="562712d90bf4a542c6fe6af20bcf8a02"/><file name="system.xml" hash="a8cb0a42337a6fe401d06a5973e098a1"/></dir><dir name="sql"><dir name="payupl_setup"><file name="install-1.0.0.php" hash="1931aca4052a946a3dc82911dac86b4c"/><file name="mysql4-install-0.1.0.php" hash="1c24d60e370bb07d601e02fcd1833c12"/><file name="mysql4-install-0.1.1.php" hash="8a734508ca8764fe397e8e98b2abda45"/><file name="mysql4-install-0.1.10.php" hash="59f3be8df67ac4eb1af1382b32f82d61"/><file name="mysql4-install-0.1.2.php" hash="212e958f7dcaca1209844703f1946b4e"/><file name="mysql4-install-0.1.3.php" hash="964592d00bb4cf8224ab5d2d73669d25"/><file name="mysql4-install-0.1.4.1.php" hash="0ad9b065639c15858c92dc443056d1c9"/><file name="mysql4-install-0.1.4.php" hash="0ad9b065639c15858c92dc443056d1c9"/><file name="mysql4-install-0.1.5.php" hash="af851501e249c0f711539724c129ef75"/><file name="mysql4-install-0.1.6.php" hash="86e34723c7192e7b3e63f9f6d6209140"/><file name="mysql4-install-0.1.7.php" hash="ef811c98a328f0c405435bb8d5baf2b3"/><file name="mysql4-install-0.1.8.php" hash="9f772cd5cbec3a46cd0b421ad482e965"/><file name="mysql4-install-0.1.9.php" hash="81a8706be704903850ed23ed63992b43"/><file name="mysql4-install-0.2.0.php" hash="008b767fc311dc1b4ac398a4fe3617da"/><file name="mysql4-install-0.2.1.php" hash="c84b836e0a171a74475c3e68419221c9"/><file name="mysql4-install-0.2.2.php" hash="acfff9b789376eeee001f1785def2156"/><file name="mysql4-install-0.3.0.php" hash="8383ea831bd6aac0393a709533b931b3"/><file name="mysql4-upgrade-0.1.0-0.1.1.php" hash="a5d9fc9d94f987f268c7b8246fcfd2b1"/><file name="mysql4-upgrade-0.1.1-0.1.2.php" hash="f1af4499aecb9280a23c73d98f860394"/><file name="mysql4-upgrade-0.1.10.1-0.2.0.php" hash="162f980728001e13b060b93d6b7007fd"/><file name="mysql4-upgrade-0.1.2-0.1.3.php" hash="6e517684413036f0420a48d8524a74e9"/><file name="mysql4-upgrade-0.1.3-0.1.4.1.php" hash="6a25a80a12e295abd83f4ce19a408c95"/><file name="mysql4-upgrade-0.1.3-0.1.4.php" hash="6a25a80a12e295abd83f4ce19a408c95"/><file name="mysql4-upgrade-0.1.4-0.1.5.php" hash="5a6e25ac859b99b1abbeeb8f71ca5acc"/><file name="mysql4-upgrade-0.1.5-0.1.6.php" hash="679f29891e5dfb59dff039926a58abf1"/><file name="mysql4-upgrade-0.1.6-0.1.7.php" hash="9673754430b1c8479b5f7472dfa85a0b"/><file name="mysql4-upgrade-0.1.7-0.1.8.php" hash="74939b2e76798c32b5c2893dccbbfa40"/><file name="mysql4-upgrade-0.1.8-0.1.9.php" hash="0d8819335f562e651c5b8ee4235a9cfb"/><file name="mysql4-upgrade-0.1.9-0.1.10.php" hash="24c14abbcaaeb35abee2535235d4c97d"/><file name="mysql4-upgrade-0.2.0-0.2.1.php" hash="47b9ce56d9cc39db3b17fa51033bce22"/><file name="mysql4-upgrade-0.2.1-0.2.2.php" hash="8ed509924a148aec16e761e352619d58"/><file name="mysql4-upgrade-0.2.2-0.2.3.php" hash="7344d966b7ebc86cef5dc94e715ef426"/><file name="mysql4-upgrade-0.2.3.1-0.2.4.php" hash="7a38b316c2745a076b0c870b648dddc6"/><file name="mysql4-upgrade-0.2.4-0.3.0.php" hash="e590f960ae315da9f18c0340bcec60d5"/><file name="mysql4-upgrade-0.3.0-0.3.1.php" hash="5f2e4427c96931db2b292977b7c1e99d"/><file name="mysql4-upgrade-0.3.1-0.3.2.php" hash="0198f162233a34fb55c2a3569ff76901"/><file name="upgrade-0.3.2.1-1.0.0.php" hash="1831d5deda98b05c657aca54cebf1b4c"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="payupl.xml" hash="274346eac15bbeaf17e820d96ae19c63"/></dir><dir name="template"><dir name="payupl"><file name="empty.phtml" hash="ed465deabe832b50373acb983787dac7"/><file name="form.phtml" hash="1924fced96f1f107ce02d2636f4e3671"/><file name="online.phtml" hash="cf1636fb4cfeeec6bd6c17e7da07456e"/><file name="redirect.phtml" hash="e3c9e028dba4a49e410b5ed99cc3e0f0"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Orba_Payupl.xml" hash="59211173152eb267325c65e2498faa01"/></dir></target><target name="magelocale"><dir name="pl_PL"><file name="Orba_Payupl.csv" hash="c2d3b32461648b66ee016fa177cbc890"/></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="images"><dir name="payupl"><file name="logo.png" hash="68c034f40b4bfcd3aea9b0082ca218a0"/></dir></dir><dir name="css"><file name="payupl.css" hash="00f2fc8150ef59c5d318d211e9ef123a"/></dir></dir></dir></dir></target></contents>
|
23 |
<compatible/>
|
24 |
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
|
25 |
</package>
|
skin/frontend/base/default/css/payupl.css
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
1 |
+
#dt_method_payupl img {
|
2 |
+
margin-right: 10px;
|
3 |
+
}
|
skin/frontend/base/default/images/payupl/logo.jpg
DELETED
Binary file
|
skin/frontend/base/default/images/payupl/logo.png
ADDED
Binary file
|