Version Notes
local testing mode
configurable if sending invoice or order confirmation email
automatic page reload of success page due to connection error
Download this release
Release Info
| Developer | Magento Core Team |
| Extension | MageBase_DpsPaymentExpress |
| Version | 1.5.3 |
| Comparing to | |
| See all releases | |
Code changes from version 1.5.2 to 1.5.3
app/code/community/MageBase/DpsPaymentExpress/Model/Method/Pxpay.php
CHANGED
|
@@ -397,6 +397,7 @@ class MageBase_DpsPaymentExpress_Model_Method_Pxpay extends Mage_Payment_Model_M
|
|
| 397 |
switch ($order->getState()) {
|
| 398 |
case Mage_Sales_Model_Order::STATE_NEW:
|
| 399 |
case Mage_Sales_Model_Order::STATE_PENDING_PAYMENT:
|
|
|
|
| 400 |
if ((string)$resultXml->TxnType == MageBase_DpsPaymentExpress_Model_Method_Common::ACTION_AUTHORIZE
|
| 401 |
) {
|
| 402 |
Mage::log(
|
|
@@ -550,6 +551,7 @@ class MageBase_DpsPaymentExpress_Model_Method_Pxpay extends Mage_Payment_Model_M
|
|
| 550 |
$order->sendNewOrderEmail();
|
| 551 |
$order->setEmailSent(true);
|
| 552 |
}
|
|
|
|
| 553 |
$order->save();
|
| 554 |
}
|
| 555 |
|
| 397 |
switch ($order->getState()) {
|
| 398 |
case Mage_Sales_Model_Order::STATE_NEW:
|
| 399 |
case Mage_Sales_Model_Order::STATE_PENDING_PAYMENT:
|
| 400 |
+
case 'payment_review': //Mage_Sales_Model_Order::STATE_PAYMENT_REVIEW
|
| 401 |
if ((string)$resultXml->TxnType == MageBase_DpsPaymentExpress_Model_Method_Common::ACTION_AUTHORIZE
|
| 402 |
) {
|
| 403 |
Mage::log(
|
| 551 |
$order->sendNewOrderEmail();
|
| 552 |
$order->setEmailSent(true);
|
| 553 |
}
|
| 554 |
+
$order->setStatus(Mage::getStoreConfig('payment/' . $this->_code . '/order_status'));
|
| 555 |
$order->save();
|
| 556 |
}
|
| 557 |
|
app/code/community/MageBase/DpsPaymentExpress/Model/Method/Pxpost.php
CHANGED
|
@@ -124,8 +124,11 @@ class MageBase_DpsPaymentExpress_Model_Method_Pxpost extends Mage_Payment_Model_
|
|
| 124 |
->setPaymentAction(MageBase_DpsPaymentExpress_Model_Method_Common::ACTION_AUTHORIZE);
|
| 125 |
$result = $this->buildRequestAndSubmitToDps() !== false;
|
| 126 |
if ($result) {
|
|
|
|
| 127 |
$payment->setStatus(self::STATUS_APPROVED)
|
| 128 |
-
->setLastTransId($
|
|
|
|
|
|
|
| 129 |
} else {
|
| 130 |
$error = $this->getError();
|
| 131 |
if (isset($error['message'])) {
|
|
@@ -162,8 +165,11 @@ class MageBase_DpsPaymentExpress_Model_Method_Pxpost extends Mage_Payment_Model_
|
|
| 162 |
$result = $this->buildRequestAndSubmitToDps() !== false;
|
| 163 |
|
| 164 |
if ($result) {
|
|
|
|
| 165 |
$payment->setStatus(self::STATUS_APPROVED)
|
| 166 |
-
->setLastTransId($
|
|
|
|
|
|
|
| 167 |
} else {
|
| 168 |
$error = $this->getError();
|
| 169 |
if (isset($error['message'])) {
|
|
@@ -186,8 +192,11 @@ class MageBase_DpsPaymentExpress_Model_Method_Pxpost extends Mage_Payment_Model_
|
|
| 186 |
->setPaymentAction(MageBase_DpsPaymentExpress_Model_Method_Common::ACTION_REFUND);
|
| 187 |
$result = $this->buildRequestAndSubmitToDps() !== false;
|
| 188 |
if ($result) {
|
|
|
|
| 189 |
$payment->setStatus(self::STATUS_APPROVED)
|
| 190 |
-
->setLastTransId($
|
|
|
|
|
|
|
| 191 |
} else {
|
| 192 |
$error = $this->getError();
|
| 193 |
if (isset($error['message'])) {
|
|
@@ -232,12 +241,18 @@ class MageBase_DpsPaymentExpress_Model_Method_Pxpost extends Mage_Payment_Model_
|
|
| 232 |
$xml->addChild('Amount', trim(sprintf("%9.2f", $this->getAmount())));
|
| 233 |
$xml->addChild('TxnType', $this->getPaymentAction());
|
| 234 |
$xml->addChild('MerchantReference', $this->_getOrderId());
|
| 235 |
-
$
|
| 236 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 237 |
} else {
|
| 238 |
//authorise or purchase
|
| 239 |
$txnId = substr(uniqid(rand()), 0, 16);
|
| 240 |
$this->setTransactionId($txnId);
|
|
|
|
| 241 |
$xml = new SimpleXMLElement('<Txn></Txn>');
|
| 242 |
$xml->addChild('Amount', trim(sprintf("%9.2f", $this->getAmount())));
|
| 243 |
$xml->addChild('CardHolderName', htmlspecialchars(trim($payment->getCcOwner()), ENT_QUOTES, 'UTF-8'));
|
|
@@ -284,8 +299,7 @@ class MageBase_DpsPaymentExpress_Model_Method_Pxpost extends Mage_Payment_Model_
|
|
| 284 |
if ($responseXml && $this->_validateResponse($responseXml)) {
|
| 285 |
$this->unsError();
|
| 286 |
//update payment information with last transaction unless we are refunding or completing
|
| 287 |
-
if ($this->getPaymentAction() != MageBase_DpsPaymentExpress_Model_Method_Common::
|
| 288 |
-
&& $this->getPaymentAction() != MageBase_DpsPaymentExpress_Model_Method_Common::ACTION_REFUND
|
| 289 |
) {
|
| 290 |
$this->setAdditionalData($responseXml, $payment);
|
| 291 |
}
|
| 124 |
->setPaymentAction(MageBase_DpsPaymentExpress_Model_Method_Common::ACTION_AUTHORIZE);
|
| 125 |
$result = $this->buildRequestAndSubmitToDps() !== false;
|
| 126 |
if ($result) {
|
| 127 |
+
$dpsTxnRef = Mage::helper('magebasedps')->getAdditionalData($payment, 'DpsTxnRef');
|
| 128 |
$payment->setStatus(self::STATUS_APPROVED)
|
| 129 |
+
->setLastTransId($dpsTxnRef)
|
| 130 |
+
->setTransactionId($dpsTxnRef);
|
| 131 |
+
$payment->registerAuthorizationNotification($amount);
|
| 132 |
} else {
|
| 133 |
$error = $this->getError();
|
| 134 |
if (isset($error['message'])) {
|
| 165 |
$result = $this->buildRequestAndSubmitToDps() !== false;
|
| 166 |
|
| 167 |
if ($result) {
|
| 168 |
+
$dpsTxnRef = Mage::helper('magebasedps')->getAdditionalData($payment, 'DpsTxnRef');
|
| 169 |
$payment->setStatus(self::STATUS_APPROVED)
|
| 170 |
+
->setLastTransId($dpsTxnRef);
|
| 171 |
+
$payment->registerCaptureNotification($amount);
|
| 172 |
+
|
| 173 |
} else {
|
| 174 |
$error = $this->getError();
|
| 175 |
if (isset($error['message'])) {
|
| 192 |
->setPaymentAction(MageBase_DpsPaymentExpress_Model_Method_Common::ACTION_REFUND);
|
| 193 |
$result = $this->buildRequestAndSubmitToDps() !== false;
|
| 194 |
if ($result) {
|
| 195 |
+
$dpsTxnRef = Mage::helper('magebasedps')->getAdditionalData($payment, 'DpsTxnRef');
|
| 196 |
$payment->setStatus(self::STATUS_APPROVED)
|
| 197 |
+
->setLastTransId($dpsTxnRef)
|
| 198 |
+
->setTransactionId($dpsTxnRef);
|
| 199 |
+
$payment->registerRefundNotification($amount);
|
| 200 |
} else {
|
| 201 |
$error = $this->getError();
|
| 202 |
if (isset($error['message'])) {
|
| 241 |
$xml->addChild('Amount', trim(sprintf("%9.2f", $this->getAmount())));
|
| 242 |
$xml->addChild('TxnType', $this->getPaymentAction());
|
| 243 |
$xml->addChild('MerchantReference', $this->_getOrderId());
|
| 244 |
+
$origDpsTxnRef = Mage::helper('magebasedps')->getAdditionalData($payment, 'DpsTxnRef');
|
| 245 |
+
$xml->addChild('DpsTxnRef', $origDpsTxnRef);
|
| 246 |
+
$txnId = substr(uniqid(rand()), 0, 16);
|
| 247 |
+
$this->setTransactionId($txnId);
|
| 248 |
+
$payment->setTransactionId($txnId);
|
| 249 |
+
$payment->setParentTransactionId($origDpsTxnRef);
|
| 250 |
+
$xml->addChild('TxnId', $txnId);
|
| 251 |
} else {
|
| 252 |
//authorise or purchase
|
| 253 |
$txnId = substr(uniqid(rand()), 0, 16);
|
| 254 |
$this->setTransactionId($txnId);
|
| 255 |
+
$payment->setTransactionId($txnId);
|
| 256 |
$xml = new SimpleXMLElement('<Txn></Txn>');
|
| 257 |
$xml->addChild('Amount', trim(sprintf("%9.2f", $this->getAmount())));
|
| 258 |
$xml->addChild('CardHolderName', htmlspecialchars(trim($payment->getCcOwner()), ENT_QUOTES, 'UTF-8'));
|
| 299 |
if ($responseXml && $this->_validateResponse($responseXml)) {
|
| 300 |
$this->unsError();
|
| 301 |
//update payment information with last transaction unless we are refunding or completing
|
| 302 |
+
if ($this->getPaymentAction() != MageBase_DpsPaymentExpress_Model_Method_Common::ACTION_REFUND
|
|
|
|
| 303 |
) {
|
| 304 |
$this->setAdditionalData($responseXml, $payment);
|
| 305 |
}
|
app/code/community/MageBase/DpsPaymentExpress/etc/config.xml
CHANGED
|
@@ -2,7 +2,7 @@
|
|
| 2 |
<config>
|
| 3 |
<modules>
|
| 4 |
<MageBase_DpsPaymentExpress>
|
| 5 |
-
<version>1.5.
|
| 6 |
</MageBase_DpsPaymentExpress>
|
| 7 |
</modules>
|
| 8 |
<global>
|
| 2 |
<config>
|
| 3 |
<modules>
|
| 4 |
<MageBase_DpsPaymentExpress>
|
| 5 |
+
<version>1.5.3</version>
|
| 6 |
</MageBase_DpsPaymentExpress>
|
| 7 |
</modules>
|
| 8 |
<global>
|
package.xml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
<package>
|
| 3 |
<name>MageBase_DpsPaymentExpress</name>
|
| 4 |
-
<version>1.5.
|
| 5 |
<stability>stable</stability>
|
| 6 |
<license uri="http://www.opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
|
| 7 |
<channel>community</channel>
|
|
@@ -12,9 +12,9 @@
|
|
| 12 |
configurable if sending invoice or order confirmation email
|
| 13 |
automatic page reload of success page due to connection error</notes>
|
| 14 |
<authors><author><name>Kristof Ringleff</name><user>auto-converted</user><email>info@magebase.com</email></author><author><name>Kristof Ringleff</name><user>auto-converted</user><email>info@magebase.com</email></author></authors>
|
| 15 |
-
<date>2013-06-
|
| 16 |
-
<time>
|
| 17 |
-
<contents><target name="magecommunity"><dir name="MageBase"><dir name="DpsPaymentExpress"><dir name="Block"><dir name="Pxpay"><file name="Form.php" hash="0513bd45150f03dab2c2b08dc0456de8"/><file name="Info.php" hash="dbf4f7b363d04d120199380dc2365a49"/></dir><dir name="Pxpost"><file name="Form.php" hash="fde018518598b03e892c43f636c14fa6"/><file name="Info.php" hash="32fd512cb7ade17f751b9385c90e04fd"/></dir></dir><dir name="Helper"><file name="Data.php" hash="8d08ac2b19fd78b6c0069ae26e13fa8a"/></dir><dir name="Model"><dir name="Method"><file name="Common.php" hash="06580baf8976e03e46f06eb9cb755f5d"/><file name="Pxpay.php" hash="
|
| 18 |
<compatible/>
|
| 19 |
<dependencies/>
|
| 20 |
</package>
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
<package>
|
| 3 |
<name>MageBase_DpsPaymentExpress</name>
|
| 4 |
+
<version>1.5.3</version>
|
| 5 |
<stability>stable</stability>
|
| 6 |
<license uri="http://www.opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
|
| 7 |
<channel>community</channel>
|
| 12 |
configurable if sending invoice or order confirmation email
|
| 13 |
automatic page reload of success page due to connection error</notes>
|
| 14 |
<authors><author><name>Kristof Ringleff</name><user>auto-converted</user><email>info@magebase.com</email></author><author><name>Kristof Ringleff</name><user>auto-converted</user><email>info@magebase.com</email></author></authors>
|
| 15 |
+
<date>2013-06-26</date>
|
| 16 |
+
<time>16:20:29</time>
|
| 17 |
+
<contents><target name="magecommunity"><dir name="MageBase"><dir name="DpsPaymentExpress"><dir name="Block"><dir name="Pxpay"><file name="Form.php" hash="0513bd45150f03dab2c2b08dc0456de8"/><file name="Info.php" hash="dbf4f7b363d04d120199380dc2365a49"/></dir><dir name="Pxpost"><file name="Form.php" hash="fde018518598b03e892c43f636c14fa6"/><file name="Info.php" hash="32fd512cb7ade17f751b9385c90e04fd"/></dir></dir><dir name="Helper"><file name="Data.php" hash="8d08ac2b19fd78b6c0069ae26e13fa8a"/></dir><dir name="Model"><dir name="Method"><file name="Common.php" hash="06580baf8976e03e46f06eb9cb755f5d"/><file name="Pxpay.php" hash="a78bba91f3d7b0c68f142d942bbab95d"/><file name="Pxpost.php" hash="67b37f5d41fce645bb2a08db45783245"/></dir><dir name="Mysql4"><dir name="Debug"><file name="Collection.php" hash="6ef2919222f3dcb32599349245e76214"/></dir><file name="Debug.php" hash="56eb2bc341b9cb4ba8d9ae239169766e"/><file name="Setup.php" hash="8a395090a44fda7530548abd2d87835e"/></dir><dir name="System"><file name="InvoiceConfig.php" hash="1759209b7c34c8d6234894c25384d423"/><file name="Logos.php" hash="bfca463fa7d292fbd2b69a33d332d55a"/><file name="PaymentAction.php" hash="0be4f9a5c602b2d2723203ec56f51a8c"/><file name="PendingOrder.php" hash="31d7bd6f5fad8e1fa4315d32d123be0f"/></dir><file name="Debug.php" hash="dadf96f68c9cf4d09aad73ff0bacab0e"/><file name="Observer.php" hash="5b985a3df31c11d70822ba90da5b9c25"/></dir><dir name="controllers"><file name="PxpayController.php" hash="0e93ea82b9452070600dec1be9df9aa3"/></dir><dir name="etc"><file name="config.xml" hash="9308ce2a104ee04535dbaecff9dedee8"/><file name="system.xml" hash="0ef88059832737e71e300a438947e1b8"/></dir><dir name="sql"><dir name="magebasedps_setup"><file name="mysql4-install-0.5.0.php" hash="c512ded8c0dd63b1dcd8e8cbfb5893e8"/><file name="mysql4-upgrade-0.5.0-1.0.0.php" hash="6dbc67541449a0f2d43460acb9b6bbff"/><file name="mysql4-upgrade-1.2.5-1.3.0.php" hash="aa3a758a779bdcb1910125fbfe57d598"/></dir></dir></dir></dir></target><target name="mage"><dir name="app"><dir name="etc"><dir name="modules"><file name="MageBase_DpsPaymentExpress.xml" hash="fae6ba260c006016d14d9a508d17cf14"/></dir></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="images"><dir name="magebase"><dir name="dps"><file name="AmexLogo.png" hash="775a3f26a4b5f7a6201b1331e4fe5579"/><file name="DinersLogo.png" hash="64500fdde86e960ac894f7cf0c44b2d8"/><file name="JCBLogo.png" hash="73f9e8b87c6c2dbf252bbb0de43591bc"/><file name="MCSecureCodeLogo.png" hash="9f31e5ccadd98dc15d0110d0e3b450f7"/><file name="MasterCardLogo.png" hash="801014f81e405cec951076f4080b04f5"/><file name="VisaLogo.png" hash="17173fb8723d34cea61a50c01c4845ed"/><file name="VisaVerifiedLogo.png" hash="af7f6a27a6449a50d1d623d925585c47"/><file name="dpslogo.png" hash="a79b9df3fe45acb4b714cabed162ebda"/><file name="dpspxlogo.png" hash="31b1338586485c872a0f39a41813b248"/></dir></dir></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="magebase"><dir name="dps"><dir name="pxpay"><file name="form.phtml" hash="d1ec1d94031a875ba2819c5f799899c7"/><file name="info.phtml" hash="c53fb2bf0a1afdc81fac85afc15b35e3"/><file name="successproblem.phtml" hash="3c800184f106995844be8d9fabf6e8bf"/></dir><dir name="pxpost"><file name="form.phtml" hash="4b2967ee9afa7cc0f88759b712721996"/><file name="info.phtml" hash="d2fd0f5603342e235ae8cd6ce1346ce2"/></dir></dir></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="magebase"><dir name="dps"><dir name="pxpay"><dir name="pdf"><file name="pxpay.phtml" hash="30691a7b7eddbf52217c2d8194fe3f52"/></dir><file name="form.phtml" hash="1b6d58c3bde68990b743c93a9be529aa"/><file name="info.phtml" hash="d939e3cf2d98bb2fc4eaa2f61c47d4cb"/></dir><dir name="pxpost"><dir name="pdf"><file name="pxpost.phtml" hash="81e5f3b568e748460a5ca61e42138f8e"/></dir><file name="form.phtml" hash="7d1fa5e90ed0627b93ff7343d4bf019f"/><file name="info.phtml" hash="ab01500bd35ed87210f93c22ac19685a"/></dir></dir></dir></dir></dir></dir></dir></target></contents>
|
| 18 |
<compatible/>
|
| 19 |
<dependencies/>
|
| 20 |
</package>
|
