Version Notes
This extension uses the BBS Netaxept API.
Download this release
Release Info
Developer | Magento Core Team |
Extension | BBSNetAxept_Norway |
Version | 1.5.2 |
Comparing to | |
See all releases |
Code changes from version 1.5.1 to 1.5.2
- app/code/community/Trollweb/BBSNetAxept/Block/PaymentInfo.php +0 -1
- app/code/community/Trollweb/BBSNetAxept/Block/Redirect.php +1 -1
- app/code/community/Trollweb/BBSNetAxept/Model/Api/Bbs.php +2 -2
- app/code/community/Trollweb/BBSNetAxept/Model/WithGUI.php +46 -31
- app/code/community/Trollweb/BBSNetAxept/etc/config.xml +1 -1
- app/code/community/Trollweb/BBSNetAxept/etc/system.xml +1 -1
- app/code/community/Trollweb/BBSNetAxept/sql/bbsnetaxept_setup/mysql4-install-0.1.0.php +1 -1
- app/design/frontend/base/default/template/bbsnetaxept/form.phtml +1 -1
- package.xml +4 -4
- skin/frontend/{default → base}/default/images/bbsnetaxept/logo.png +0 -0
- skin/frontend/{default → base}/default/images/bbsnetaxept/technology_logo.png +0 -0
app/code/community/Trollweb/BBSNetAxept/Block/PaymentInfo.php
CHANGED
@@ -19,7 +19,6 @@
|
|
19 |
|
20 |
class Trollweb_BBSNetAxept_Block_PaymentInfo extends Mage_Payment_Block_Info
|
21 |
{
|
22 |
-
|
23 |
protected function _construct()
|
24 |
{
|
25 |
parent::_construct();
|
19 |
|
20 |
class Trollweb_BBSNetAxept_Block_PaymentInfo extends Mage_Payment_Block_Info
|
21 |
{
|
|
|
22 |
protected function _construct()
|
23 |
{
|
24 |
parent::_construct();
|
app/code/community/Trollweb/BBSNetAxept/Block/Redirect.php
CHANGED
@@ -58,7 +58,7 @@ class Trollweb_BBSNetAxept_Block_Redirect extends Mage_Core_Block_Abstract
|
|
58 |
$html = '<html><body>';
|
59 |
$html.= $this->__('You will be redirected to BBS NetAxept in a few seconds.');
|
60 |
$html.= $form->toHtml();
|
61 |
-
$html.= '<script type="text/javascript">document.getElementById("BBS_WithGUI_checkout").submit();</script>';
|
62 |
$html.= '</body></html>';
|
63 |
|
64 |
return $html;
|
58 |
$html = '<html><body>';
|
59 |
$html.= $this->__('You will be redirected to BBS NetAxept in a few seconds.');
|
60 |
$html.= $form->toHtml();
|
61 |
+
// $html.= '<script type="text/javascript">document.getElementById("BBS_WithGUI_checkout").submit();</script>';
|
62 |
$html.= '</body></html>';
|
63 |
|
64 |
return $html;
|
app/code/community/Trollweb/BBSNetAxept/Model/Api/Bbs.php
CHANGED
@@ -291,8 +291,8 @@ object(stdClass)[850]
|
|
291 |
public function validate() {
|
292 |
$regcode = $this->getRegCode();
|
293 |
$carray = explode(".",$_SERVER[base64_decode('U0VSVkVSX05BTUU=')]);
|
294 |
-
|
295 |
-
|
296 |
return ($this->magic(${base64_decode("ZA==")},$regcode,$d) == ${base64_decode('cmVnY29kZQ==')});
|
297 |
}
|
298 |
|
291 |
public function validate() {
|
292 |
$regcode = $this->getRegCode();
|
293 |
$carray = explode(".",$_SERVER[base64_decode('U0VSVkVSX05BTUU=')]);
|
294 |
+
$d = strtolower($carray[count($carray)-2]);
|
295 |
+
|
296 |
return ($this->magic(${base64_decode("ZA==")},$regcode,$d) == ${base64_decode('cmVnY29kZQ==')});
|
297 |
}
|
298 |
|
app/code/community/Trollweb/BBSNetAxept/Model/WithGUI.php
CHANGED
@@ -156,37 +156,41 @@ class Trollweb_BBSNetAxept_Model_WithGUI extends Mage_Payment_Model_Method_Abstr
|
|
156 |
|
157 |
public function getBBSTransKey()
|
158 |
{
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
|
|
|
|
|
|
|
|
190 |
|
191 |
return $this->getCheckout()->getBBSTransKey();
|
192 |
}
|
@@ -409,5 +413,16 @@ class Trollweb_BBSNetAxept_Model_WithGUI extends Mage_Payment_Model_Method_Abstr
|
|
409 |
|
410 |
return $message;
|
411 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
412 |
|
413 |
}
|
156 |
|
157 |
public function getBBSTransKey()
|
158 |
{
|
159 |
+
|
160 |
+
$order = Mage::getModel('sales/order');
|
161 |
+
$order->load(Mage::getSingleton('checkout/session')->getLastOrderId());
|
162 |
+
if ($order->getPayment()->getStatus() != self::STATUS_APPROVED) {
|
163 |
+
|
164 |
+
$this->getCheckout()->setBBSTransactionId(uniqid());
|
165 |
+
|
166 |
+
$transKey = $this->getApi()->
|
167 |
+
setCurrencyCode($this->getQuote()->getStoreCurrencyCode())->
|
168 |
+
setTransactionId($this->getCheckout()->getBBSTransactionId())->
|
169 |
+
setAmount(sprintf("%0.0f",$this->getQuote()->getGrandTotal()*100))->
|
170 |
+
setOrderNumber($this->getCheckout()->getLastRealOrderId())->
|
171 |
+
setOrderDescription(date("d.m.Y")." - Order ".$this->getCheckout()->getLastRealOrderId())->
|
172 |
+
setCustomerEmail($this->getQuote()->getCustomerEmail())->
|
173 |
+
setCustomerPhoneNumber($this->getQuote()->getBillingAddress()->getTelephone())->
|
174 |
+
setSessionId($this->getCheckout()->getQuoteId())->
|
175 |
+
setInternalGUI($this->useInternalGUI())->
|
176 |
+
getTransKey();
|
177 |
+
|
178 |
+
if ($transKey == false) {
|
179 |
+
Mage::throwException(Mage::helper('bbsnetaxept')->__('Error receiving key from BBS: '.$this->getApi()->getErrorMessage()));
|
180 |
+
}
|
181 |
+
else {
|
182 |
+
$this->getCheckout()->setBBSTransKey($transKey);
|
183 |
+
if ($this->useInternalGUI()) {
|
184 |
+
$info = $this->getInfoInstance();
|
185 |
+
if (!($info instanceof Varien_Object)) {
|
186 |
+
$info = new Varien_Object($info);
|
187 |
+
}
|
188 |
+
$this->getCheckout()->setCardInfo($info);
|
189 |
+
}
|
190 |
+
$order->addStatusToHistory('pending_bbs','Redirected to BBS Payment.',false);
|
191 |
+
$order->save();
|
192 |
+
}
|
193 |
+
}
|
194 |
|
195 |
return $this->getCheckout()->getBBSTransKey();
|
196 |
}
|
413 |
|
414 |
return $message;
|
415 |
}
|
416 |
+
|
417 |
+
private function dolog($logline)
|
418 |
+
{
|
419 |
+
$logDir = Mage::getBaseDir('log');
|
420 |
+
$fh = fopen($logDir."/bbsnexaxept.log","a");
|
421 |
+
if ($fh) {
|
422 |
+
fwrite($fh,"[".date("d.m.Y h:i:s")."] ".$logline."\n");
|
423 |
+
fclose($fh);
|
424 |
+
}
|
425 |
+
}
|
426 |
+
|
427 |
|
428 |
}
|
app/code/community/Trollweb/BBSNetAxept/etc/config.xml
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
<config>
|
3 |
<modules>
|
4 |
<Trollweb_BBSNetAxept>
|
5 |
-
<version>1.5.
|
6 |
<depends>
|
7 |
<Mage_Payment />
|
8 |
</depends>
|
2 |
<config>
|
3 |
<modules>
|
4 |
<Trollweb_BBSNetAxept>
|
5 |
+
<version>1.5.2</version>
|
6 |
<depends>
|
7 |
<Mage_Payment />
|
8 |
</depends>
|
app/code/community/Trollweb/BBSNetAxept/etc/system.xml
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
<payment>
|
5 |
<groups>
|
6 |
<bbsnetaxept_withgui translate="label" module="bbsnetaxept">
|
7 |
-
<label>BBS Netaxept, versjon 1.5.
|
8 |
<sort_order>670</sort_order>
|
9 |
<show_in_default>1</show_in_default>
|
10 |
<show_in_website>1</show_in_website>
|
4 |
<payment>
|
5 |
<groups>
|
6 |
<bbsnetaxept_withgui translate="label" module="bbsnetaxept">
|
7 |
+
<label>BBS Netaxept, versjon 1.5.2</label>
|
8 |
<sort_order>670</sort_order>
|
9 |
<show_in_default>1</show_in_default>
|
10 |
<show_in_website>1</show_in_website>
|
app/code/community/Trollweb/BBSNetAxept/sql/bbsnetaxept_setup/mysql4-install-0.1.0.php
CHANGED
@@ -32,4 +32,4 @@ $installer->addAttribute('order_payment', 'bbs_session_number', array());
|
|
32 |
|
33 |
$installer->doTWregister();
|
34 |
|
35 |
-
$installer->endSetup();
|
32 |
|
33 |
$installer->doTWregister();
|
34 |
|
35 |
+
$installer->endSetup();
|
app/design/frontend/base/default/template/bbsnetaxept/form.phtml
CHANGED
@@ -24,7 +24,7 @@ $logoUrl = $this->getLogo();
|
|
24 |
<ul id="payment_form_<?php echo $_code ?>" style="display:none">
|
25 |
<li>
|
26 |
<?php if (!empty($logoUrl)): ?>
|
27 |
-
<img id="bbs_logo_<?php echo $_code; ?>" src="<?php echo $this->getSkinUrl($logoUrl); ?>"
|
28 |
<br />
|
29 |
<?php endif;?>
|
30 |
<?php echo $this->getRedirectText(); ?>
|
24 |
<ul id="payment_form_<?php echo $_code ?>" style="display:none">
|
25 |
<li>
|
26 |
<?php if (!empty($logoUrl)): ?>
|
27 |
+
<img id="bbs_logo_<?php echo $_code; ?>" src="<?php echo $this->getSkinUrl($logoUrl); ?>" />
|
28 |
<br />
|
29 |
<?php endif;?>
|
30 |
<?php echo $this->getRedirectText(); ?>
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>BBSNetAxept_Norway</name>
|
4 |
-
<version>1.5.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://www.trollweb.no/bbs">GPL License</license>
|
7 |
<channel>community</channel>
|
@@ -12,9 +12,9 @@
|
|
12 |
Please remember that you need to sign up with both BBS and Teller. Sign up forms are available directly in the Magento Admin and Payment Gateways, under the BBS Netaxept Settings.</description>
|
13 |
<notes>This extension uses the BBS Netaxept API.</notes>
|
14 |
<authors><author><name>Trollweb Solutions AS</name><user>auto-converted</user><email>post@trollweb.no</email></author></authors>
|
15 |
-
<date>2010-
|
16 |
-
<time>20:
|
17 |
-
<contents><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="bbsnetaxept"><file name="form.phtml" hash="d61295f247bccb512608c1f9dec45876"/><file name="paymentinfo.phtml" hash="4f3b4e6e0d39720429c9b7f6afe87db3"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="bbsnetaxept"><file name="form.phtml" hash="
|
18 |
<compatible/>
|
19 |
<dependencies/>
|
20 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>BBSNetAxept_Norway</name>
|
4 |
+
<version>1.5.2</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://www.trollweb.no/bbs">GPL License</license>
|
7 |
<channel>community</channel>
|
12 |
Please remember that you need to sign up with both BBS and Teller. Sign up forms are available directly in the Magento Admin and Payment Gateways, under the BBS Netaxept Settings.</description>
|
13 |
<notes>This extension uses the BBS Netaxept API.</notes>
|
14 |
<authors><author><name>Trollweb Solutions AS</name><user>auto-converted</user><email>post@trollweb.no</email></author></authors>
|
15 |
+
<date>2010-05-05</date>
|
16 |
+
<time>20:54:15</time>
|
17 |
+
<contents><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="bbsnetaxept"><file name="form.phtml" hash="d61295f247bccb512608c1f9dec45876"/><file name="paymentinfo.phtml" hash="4f3b4e6e0d39720429c9b7f6afe87db3"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="bbsnetaxept"><file name="form.phtml" hash="f2c6bb87bb25ddd68a3dddde8ed64f12"/><file name="paymentinfo.phtml" hash="6ec9c7243fdb7c67a9d3de210a56908c"/></dir></dir></dir></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="images"><dir name="bbsnetaxept"><file name="logo.png" hash="17dcefecee14a0231c58dd87b2e0dc5e"/><file name="technology_logo.png" hash="e0b62fb37da9fb8c1ef69390762f066b"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Trollweb_BBSNetAxept.xml" hash="f3b2219f86e88ada812f5bde8ae6859c"/></dir></target><target name="magecommunity"><dir name="Trollweb"><dir name="BBSNetAxept"><dir name="Block"><file name="Form.php" hash="2e843f8b372cf86b901604676223e9ff"/><file name="PaymentInfo.php" hash="8c84a5d8a98a05bbc896733e2ca387f1"/><file name="Redirect.php" hash="1d103f72126931bf11b09ead4f874e16"/></dir><dir name="controllers"><file name="ReturnController.php" hash="1af5a611e3c8ed282648911911c52de1"/></dir><dir name="etc"><file name="config.xml" hash="007be8697f31df72c74359f47d53d73c"/><file name="system.xml" hash="9a731e3bd0b0dd73aaac998c4996a3b7"/></dir><dir name="Helper"><file name="Data.php" hash="06e6b25c35fa45f014c51163ccec2e44"/></dir><dir name="Model"><dir name="Api"><file name="Bbs.php" hash="b29157599631d3c73b779b165373f01b"/><file name="BbsRequest.php" hash="1d89c8369032ba4ba79c89828770da56"/><file name="SoapClient.php" hash="0bea5c38b2402fe854c092389aae9a21"/></dir><dir name="BBSNetterminal"><file name="Debug.php" hash="4c938bc2a079719a111478c9d24adf77"/><file name="Language.php" hash="8bafa1d208ee1571920eebfdf98a6745"/><file name="PaymentAction.php" hash="60efa6278b77fcd56d28d81e19617ccc"/><file name="Request.php" hash="b9353f6c6ca06349928aa418cf943744"/><file name="Result.php" hash="2faf0b6cc4fb00b00cbec7a48f4dca07"/></dir><dir name="Config"><file name="Logo.php" hash="7a6d09c42821270b85d32a6f9509395b"/></dir><dir name="Entity"><file name="Setup.php" hash="6d17490981f2d9efa48ac7a0f9318a83"/></dir><file name="WithGUI.php" hash="0a879d1db2712770186578073e9f9645"/></dir><dir name="sql"><dir name="bbsnetaxept_setup"><file name="mysql4-install-0.1.0.php" hash="e84d45a9a21b253c0b3cb766079df28b"/><file name="mysql4-uninstall-0.1.0.php" hash="5393aadd53afafee1392949fe6a4511a"/></dir></dir></dir></dir></target></contents>
|
18 |
<compatible/>
|
19 |
<dependencies/>
|
20 |
</package>
|
skin/frontend/{default → base}/default/images/bbsnetaxept/logo.png
RENAMED
File without changes
|
skin/frontend/{default → base}/default/images/bbsnetaxept/technology_logo.png
RENAMED
File without changes
|