Version Notes
Added CrossReference to each transaction stored in the additional_data column of the sales_flat_order_payment table.
Added SQL script to create custom order statuses for installations under Magento v1.5 and above.
Download this release
Release Info
| Developer | Magento Core Team |
| Extension | Iridiumcorp_Tpg |
| Version | 1.12.0 |
| Comparing to | |
| See all releases | |
Code changes from version 1.11.0 to 1.12.0
- app/code/local/Iridiumcorp/Checkout/Model/Type/Onepage.php +3 -18
- app/code/local/Iridiumcorp/Sales/Model/Order/Payment.php +7 -5
- app/code/local/Iridiumcorp/Tpg/Model/Direct.php +18 -8
- app/code/local/Iridiumcorp/Tpg/Model/Resource/Eav/Mysql4/Setup.php +6 -0
- app/code/local/Iridiumcorp/Tpg/controllers/PaymentController.php +19 -7
- app/code/local/Iridiumcorp/Tpg/etc/config.xml +1 -0
- app/code/local/Iridiumcorp/Tpg/sql/iridiumcorp_tpg_setup/mysql4-install-0.1.0.php +23 -0
- app/design/adminhtml/base/default/template/tpg/form.phtml +17 -16
- app/design/adminhtml/default/default/template/tpg/form.phtml +17 -16
- app/design/frontend/base/default/template/tpg/form.phtml +16 -15
- app/design/frontend/default/default/template/tpg/form.phtml +17 -16
- package.xml +7 -8
app/code/local/Iridiumcorp/Checkout/Model/Type/Onepage.php
CHANGED
|
@@ -2,21 +2,6 @@
|
|
| 2 |
|
| 3 |
class Iridiumcorp_Checkout_Model_Type_Onepage extends Mage_Checkout_Model_Type_Onepage
|
| 4 |
{
|
| 5 |
-
// TODO : REMOVE - old representation
|
| 6 |
-
/*public function getVersion($magentoVersion)
|
| 7 |
-
{
|
| 8 |
-
$pattern = '/[^\d]/';
|
| 9 |
-
$magentoVersion = preg_replace($pattern, '', $magentoVersion);
|
| 10 |
-
|
| 11 |
-
while(strlen($magentoVersion) < 4)
|
| 12 |
-
{
|
| 13 |
-
$magentoVersion .= '0';
|
| 14 |
-
}
|
| 15 |
-
$magentoVersion = (int)$magentoVersion;
|
| 16 |
-
|
| 17 |
-
return $magentoVersion;
|
| 18 |
-
}*/
|
| 19 |
-
|
| 20 |
/**
|
| 21 |
* Create an order
|
| 22 |
*
|
|
@@ -826,7 +811,7 @@ class Iridiumcorp_Checkout_Model_Type_Onepage extends Mage_Checkout_Model_Type_O
|
|
| 826 |
* @param unknown_type $szOrderID
|
| 827 |
* @return unknown
|
| 828 |
*/
|
| 829 |
-
public function saveOrderAfterRedirectedPaymentAction($boIsHostedPaymentAction, $szStatusCode, $szMessage, $szPreviousStatusCode, $szPreviousMessage, $szOrderID)
|
| 830 |
{
|
| 831 |
$nVersion = Mage::getModel('tpg/direct')->getVersion();
|
| 832 |
|
|
@@ -846,9 +831,9 @@ class Iridiumcorp_Checkout_Model_Type_Onepage extends Mage_Checkout_Model_Type_O
|
|
| 846 |
->setPreviousstatuscode($szPreviousStatusCode)
|
| 847 |
->setPreviousmessage($szPreviousMessage)
|
| 848 |
->setOrderid($szOrderID);
|
| 849 |
-
|
| 850 |
$method = Mage::getSingleton('checkout/session')->getRedirectionmethod();
|
| 851 |
-
$_order->getPayment()->getMethodInstance()->{$method}($_order->getPayment(), $boIsHostedPaymentAction, $szStatusCode, $szMessage, $szPreviousStatusCode, $szPreviousMessage, $szOrderID);
|
| 852 |
|
| 853 |
if ($_order->getFailedThreed() !== true &&
|
| 854 |
$_order->getPayment()->getMethodInstance()->getCode() == 'tpg' &&
|
| 2 |
|
| 3 |
class Iridiumcorp_Checkout_Model_Type_Onepage extends Mage_Checkout_Model_Type_Onepage
|
| 4 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
/**
|
| 6 |
* Create an order
|
| 7 |
*
|
| 811 |
* @param unknown_type $szOrderID
|
| 812 |
* @return unknown
|
| 813 |
*/
|
| 814 |
+
public function saveOrderAfterRedirectedPaymentAction($boIsHostedPaymentAction, $szStatusCode, $szMessage, $szPreviousStatusCode, $szPreviousMessage, $szOrderID, $szCrossReference)
|
| 815 |
{
|
| 816 |
$nVersion = Mage::getModel('tpg/direct')->getVersion();
|
| 817 |
|
| 831 |
->setPreviousstatuscode($szPreviousStatusCode)
|
| 832 |
->setPreviousmessage($szPreviousMessage)
|
| 833 |
->setOrderid($szOrderID);
|
| 834 |
+
|
| 835 |
$method = Mage::getSingleton('checkout/session')->getRedirectionmethod();
|
| 836 |
+
$_order->getPayment()->getMethodInstance()->{$method}($_order->getPayment(), $boIsHostedPaymentAction, $szStatusCode, $szMessage, $szPreviousStatusCode, $szPreviousMessage, $szOrderID, $szCrossReference);
|
| 837 |
|
| 838 |
if ($_order->getFailedThreed() !== true &&
|
| 839 |
$_order->getPayment()->getMethodInstance()->getCode() == 'tpg' &&
|
app/code/local/Iridiumcorp/Sales/Model/Order/Payment.php
CHANGED
|
@@ -11,7 +11,7 @@ class Iridiumcorp_Sales_Model_Order_Payment extends Mage_Sales_Model_Order_Payme
|
|
| 11 |
{
|
| 12 |
$nVersion = Mage::getModel('tpg/direct')->getVersion();
|
| 13 |
|
| 14 |
-
if($nVersion
|
| 15 |
{
|
| 16 |
if (is_null($invoice))
|
| 17 |
{
|
|
@@ -174,9 +174,9 @@ class Iridiumcorp_Sales_Model_Order_Payment extends Mage_Sales_Model_Order_Payme
|
|
| 174 |
*/
|
| 175 |
public function place()
|
| 176 |
{
|
| 177 |
-
|
| 178 |
|
| 179 |
-
if($nVersion
|
| 180 |
{
|
| 181 |
Mage::dispatchEvent('sales_order_payment_place_start', array('payment' => $this));
|
| 182 |
$order = $this->getOrder();
|
|
@@ -228,7 +228,7 @@ class Iridiumcorp_Sales_Model_Order_Payment extends Mage_Sales_Model_Order_Payme
|
|
| 228 |
}
|
| 229 |
}
|
| 230 |
|
| 231 |
-
if($nVersion
|
| 232 |
{
|
| 233 |
$this->_createBillingAgreement();
|
| 234 |
$orderStateHelper = Mage_Sales_Model_Order::STATE_PAYMENT_REVIEW;
|
|
@@ -255,6 +255,7 @@ class Iridiumcorp_Sales_Model_Order_Payment extends Mage_Sales_Model_Order_Payme
|
|
| 255 |
else if($order->getIsHostedPaymentPending())
|
| 256 |
{
|
| 257 |
$order->setState(Mage_Sales_Model_Order::STATE_PENDING_PAYMENT, true)->save();
|
|
|
|
| 258 |
$orderState = 'pending_payment';
|
| 259 |
$orderStatus = 'irc_pending_hosted_payment';
|
| 260 |
$message = 'Hosted Payment need to be completed';
|
|
@@ -286,12 +287,13 @@ class Iridiumcorp_Sales_Model_Order_Payment extends Mage_Sales_Model_Order_Payme
|
|
| 286 |
$order->addStatusToHistory($order->getStatus(), $message, $isCustomerNotified);
|
| 287 |
}
|
| 288 |
|
| 289 |
-
if($nVersion
|
| 290 |
{
|
| 291 |
$order->setHoldBeforeState($orderState);
|
| 292 |
$order->setHoldBeforeStatus($orderStatus);
|
| 293 |
}
|
| 294 |
}
|
|
|
|
| 295 |
// add message to history if order state already declared
|
| 296 |
elseif ($order->getState() && ($orderStatus !== $order->getStatus() || $message))
|
| 297 |
{
|
| 11 |
{
|
| 12 |
$nVersion = Mage::getModel('tpg/direct')->getVersion();
|
| 13 |
|
| 14 |
+
if($nVersion >= 1411 || $nVersion == 1410)
|
| 15 |
{
|
| 16 |
if (is_null($invoice))
|
| 17 |
{
|
| 174 |
*/
|
| 175 |
public function place()
|
| 176 |
{
|
| 177 |
+
$nVersion = Mage::getModel('tpg/direct')->getVersion();
|
| 178 |
|
| 179 |
+
if($nVersion >= 1411 || $nVersion == 1410 || $nVersion == 1401 || $nVersion == 1400)
|
| 180 |
{
|
| 181 |
Mage::dispatchEvent('sales_order_payment_place_start', array('payment' => $this));
|
| 182 |
$order = $this->getOrder();
|
| 228 |
}
|
| 229 |
}
|
| 230 |
|
| 231 |
+
if($nVersion >= 1411 || $nVersion == 1410)
|
| 232 |
{
|
| 233 |
$this->_createBillingAgreement();
|
| 234 |
$orderStateHelper = Mage_Sales_Model_Order::STATE_PAYMENT_REVIEW;
|
| 255 |
else if($order->getIsHostedPaymentPending())
|
| 256 |
{
|
| 257 |
$order->setState(Mage_Sales_Model_Order::STATE_PENDING_PAYMENT, true)->save();
|
| 258 |
+
$orderStateHelper = Mage_Sales_Model_Order::STATE_PENDING_PAYMENT;
|
| 259 |
$orderState = 'pending_payment';
|
| 260 |
$orderStatus = 'irc_pending_hosted_payment';
|
| 261 |
$message = 'Hosted Payment need to be completed';
|
| 287 |
$order->addStatusToHistory($order->getStatus(), $message, $isCustomerNotified);
|
| 288 |
}
|
| 289 |
|
| 290 |
+
if($nVersion >= 1401 || $nVersion == 1400)
|
| 291 |
{
|
| 292 |
$order->setHoldBeforeState($orderState);
|
| 293 |
$order->setHoldBeforeStatus($orderStatus);
|
| 294 |
}
|
| 295 |
}
|
| 296 |
+
|
| 297 |
// add message to history if order state already declared
|
| 298 |
elseif ($order->getState() && ($orderStatus !== $order->getStatus() || $message))
|
| 299 |
{
|
app/code/local/Iridiumcorp/Tpg/Model/Direct.php
CHANGED
|
@@ -319,6 +319,7 @@ class Iridiumcorp_Tpg_Model_Direct extends Mage_Payment_Model_Method_Abstract
|
|
| 319 |
{
|
| 320 |
$szLogMessage = "Transaction could not be completed for OrderID: ".$szOrderID.". Result details: ";
|
| 321 |
$szNotificationMessage = 'Payment Processor Response: '.$cdtrCardDetailsTransactionResult->getMessage();
|
|
|
|
| 322 |
|
| 323 |
switch ($cdtrCardDetailsTransactionResult->getStatusCode())
|
| 324 |
{
|
|
@@ -333,7 +334,6 @@ class Iridiumcorp_Tpg_Model_Direct extends Mage_Payment_Model_Method_Abstract
|
|
| 333 |
$szNotificationMessage = '';
|
| 334 |
|
| 335 |
$szPaReq = $todTransactionOutputData->getThreeDSecureOutputData()->getPaREQ();
|
| 336 |
-
$szCrossReference = $todTransactionOutputData->getCrossReference();
|
| 337 |
$szACSURL = $todTransactionOutputData->getThreeDSecureOutputData()->getACSURL();
|
| 338 |
|
| 339 |
Mage::getSingleton('checkout/session')->setMd($szCrossReference)
|
|
@@ -394,8 +394,7 @@ class Iridiumcorp_Tpg_Model_Direct extends Mage_Payment_Model_Method_Abstract
|
|
| 394 |
if($error)
|
| 395 |
{
|
| 396 |
$payment->setStatus('FAIL')
|
| 397 |
-
->setCcApproval('FAIL')
|
| 398 |
-
->setAdditionalData($cdtrCardDetailsTransactionResult->getMessage());
|
| 399 |
}
|
| 400 |
else
|
| 401 |
{
|
|
@@ -405,6 +404,12 @@ class Iridiumcorp_Tpg_Model_Direct extends Mage_Payment_Model_Method_Abstract
|
|
| 405 |
}
|
| 406 |
}
|
| 407 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 408 |
return $error;
|
| 409 |
}
|
| 410 |
|
|
@@ -789,8 +794,7 @@ class Iridiumcorp_Tpg_Model_Direct extends Mage_Payment_Model_Method_Abstract
|
|
| 789 |
}
|
| 790 |
else
|
| 791 |
{
|
| 792 |
-
$payment->setStatus(self::STATUS_APPROVED)
|
| 793 |
-
->setAdditionalData($message);
|
| 794 |
|
| 795 |
if($nVersion == 1324 || $nVersion == 1330)
|
| 796 |
{
|
|
@@ -802,7 +806,7 @@ class Iridiumcorp_Tpg_Model_Direct extends Mage_Payment_Model_Method_Abstract
|
|
| 802 |
return $this;
|
| 803 |
}
|
| 804 |
|
| 805 |
-
public function _runRedirectedPaymentComplete(Varien_Object $payment, $boIsHostedPaymentAction, $szStatusCode, $szMessage, $szPreviousStatusCode, $szPreviousMessage, $szOrderID)
|
| 806 |
{
|
| 807 |
$error = false;
|
| 808 |
$message;
|
|
@@ -819,6 +823,7 @@ class Iridiumcorp_Tpg_Model_Direct extends Mage_Payment_Model_Method_Abstract
|
|
| 819 |
}
|
| 820 |
|
| 821 |
$message = "Payment Processor Response: ".$szMessage;
|
|
|
|
| 822 |
switch ($szStatusCode)
|
| 823 |
{
|
| 824 |
case "0":
|
|
@@ -841,6 +846,12 @@ class Iridiumcorp_Tpg_Model_Direct extends Mage_Payment_Model_Method_Abstract
|
|
| 841 |
}
|
| 842 |
|
| 843 |
$session->setPaymentprocessorresponse($message);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 844 |
if($error == true)
|
| 845 |
{
|
| 846 |
$message = Mage::helper('tpg')->__($message);
|
|
@@ -848,8 +859,7 @@ class Iridiumcorp_Tpg_Model_Direct extends Mage_Payment_Model_Method_Abstract
|
|
| 848 |
}
|
| 849 |
else
|
| 850 |
{
|
| 851 |
-
$payment->setStatus(self::STATUS_APPROVED)
|
| 852 |
-
->setAdditionalData($message);
|
| 853 |
|
| 854 |
if($nVersion == 1324 || $nVersion ==1330)
|
| 855 |
{
|
| 319 |
{
|
| 320 |
$szLogMessage = "Transaction could not be completed for OrderID: ".$szOrderID.". Result details: ";
|
| 321 |
$szNotificationMessage = 'Payment Processor Response: '.$cdtrCardDetailsTransactionResult->getMessage();
|
| 322 |
+
$szCrossReference = $todTransactionOutputData->getCrossReference();
|
| 323 |
|
| 324 |
switch ($cdtrCardDetailsTransactionResult->getStatusCode())
|
| 325 |
{
|
| 334 |
$szNotificationMessage = '';
|
| 335 |
|
| 336 |
$szPaReq = $todTransactionOutputData->getThreeDSecureOutputData()->getPaREQ();
|
|
|
|
| 337 |
$szACSURL = $todTransactionOutputData->getThreeDSecureOutputData()->getACSURL();
|
| 338 |
|
| 339 |
Mage::getSingleton('checkout/session')->setMd($szCrossReference)
|
| 394 |
if($error)
|
| 395 |
{
|
| 396 |
$payment->setStatus('FAIL')
|
| 397 |
+
->setCcApproval('FAIL');
|
|
|
|
| 398 |
}
|
| 399 |
else
|
| 400 |
{
|
| 404 |
}
|
| 405 |
}
|
| 406 |
|
| 407 |
+
if($szCrossReference)
|
| 408 |
+
{
|
| 409 |
+
$szAdditionalData = "CrossReference=".$szCrossReference;
|
| 410 |
+
$payment->setAdditionalData($szAdditionalData);
|
| 411 |
+
}
|
| 412 |
+
|
| 413 |
return $error;
|
| 414 |
}
|
| 415 |
|
| 794 |
}
|
| 795 |
else
|
| 796 |
{
|
| 797 |
+
$payment->setStatus(self::STATUS_APPROVED);
|
|
|
|
| 798 |
|
| 799 |
if($nVersion == 1324 || $nVersion == 1330)
|
| 800 |
{
|
| 806 |
return $this;
|
| 807 |
}
|
| 808 |
|
| 809 |
+
public function _runRedirectedPaymentComplete(Varien_Object $payment, $boIsHostedPaymentAction, $szStatusCode, $szMessage, $szPreviousStatusCode, $szPreviousMessage, $szOrderID, $szCrossReference)
|
| 810 |
{
|
| 811 |
$error = false;
|
| 812 |
$message;
|
| 823 |
}
|
| 824 |
|
| 825 |
$message = "Payment Processor Response: ".$szMessage;
|
| 826 |
+
|
| 827 |
switch ($szStatusCode)
|
| 828 |
{
|
| 829 |
case "0":
|
| 846 |
}
|
| 847 |
|
| 848 |
$session->setPaymentprocessorresponse($message);
|
| 849 |
+
if($szCrossReference)
|
| 850 |
+
{
|
| 851 |
+
$szAdditionalData = "CrossReference=".$szCrossReference;
|
| 852 |
+
$payment->setAdditionalData($szAdditionalData);
|
| 853 |
+
}
|
| 854 |
+
|
| 855 |
if($error == true)
|
| 856 |
{
|
| 857 |
$message = Mage::helper('tpg')->__($message);
|
| 859 |
}
|
| 860 |
else
|
| 861 |
{
|
| 862 |
+
$payment->setStatus(self::STATUS_APPROVED);
|
|
|
|
| 863 |
|
| 864 |
if($nVersion == 1324 || $nVersion ==1330)
|
| 865 |
{
|
app/code/local/Iridiumcorp/Tpg/Model/Resource/Eav/Mysql4/Setup.php
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
|
| 3 |
+
class Iridiumcorp_Tpg_Model_Resource_Eav_Mysql4_Setup extends Mage_Eav_Model_Entity_Setup
|
| 4 |
+
{
|
| 5 |
+
|
| 6 |
+
}
|
app/code/local/Iridiumcorp/Tpg/controllers/PaymentController.php
CHANGED
|
@@ -241,7 +241,8 @@ class Iridiumcorp_Tpg_PaymentController extends Mage_Core_Controller_Front_Actio
|
|
| 241 |
$this->getRequest()->getPost('Message'),
|
| 242 |
$this->getRequest()->getPost('PreviousStatusCode'),
|
| 243 |
$this->getRequest()->getPost('PreviousMessage'),
|
| 244 |
-
$this->getRequest()->getPost('OrderID')
|
|
|
|
| 245 |
}
|
| 246 |
}
|
| 247 |
catch (Exception $exc)
|
|
@@ -250,7 +251,7 @@ class Iridiumcorp_Tpg_PaymentController extends Mage_Core_Controller_Front_Actio
|
|
| 250 |
$szNotificationMessage = Iridiumcorp_Tpg_Model_Common_GlobalErrors::ERROR_183;
|
| 251 |
Mage::logException($exc);
|
| 252 |
}
|
| 253 |
-
|
| 254 |
$szPaymentProcessorResponse = $session->getPaymentprocessorresponse();
|
| 255 |
if($boError)
|
| 256 |
{
|
|
@@ -260,6 +261,8 @@ class Iridiumcorp_Tpg_PaymentController extends Mage_Core_Controller_Front_Actio
|
|
| 260 |
$szNotificationMessage = $szNotificationMessage.'<br/>'.$szPaymentProcessorResponse;
|
| 261 |
}
|
| 262 |
|
|
|
|
|
|
|
| 263 |
if($nVersion >= 1410)
|
| 264 |
{
|
| 265 |
if($order)
|
|
@@ -279,6 +282,7 @@ class Iridiumcorp_Tpg_PaymentController extends Mage_Core_Controller_Front_Actio
|
|
| 279 |
{
|
| 280 |
Mage::getSingleton('core/session')->addError($szNotificationMessage);
|
| 281 |
}
|
|
|
|
| 282 |
|
| 283 |
$this->_clearSessionVariables();
|
| 284 |
$this->_redirect('checkout/onepage/failure');
|
|
@@ -332,7 +336,8 @@ class Iridiumcorp_Tpg_PaymentController extends Mage_Core_Controller_Front_Actio
|
|
| 332 |
$szMessage,
|
| 333 |
$this->getRequest()->getPost('PreviousStatusCode'),
|
| 334 |
$this->getRequest()->getPost('PreviousMessage'),
|
| 335 |
-
$this->getRequest()->getPost('OrderID')
|
|
|
|
| 336 |
}
|
| 337 |
catch (Exception $exc)
|
| 338 |
{
|
|
@@ -479,7 +484,8 @@ class Iridiumcorp_Tpg_PaymentController extends Mage_Core_Controller_Front_Actio
|
|
| 479 |
$szMessage,
|
| 480 |
$szPreviousStatusCode,
|
| 481 |
$szPreviousMessage,
|
| 482 |
-
$szOrderID
|
|
|
|
| 483 |
}
|
| 484 |
}
|
| 485 |
catch(Exception $exc)
|
|
@@ -494,6 +500,8 @@ class Iridiumcorp_Tpg_PaymentController extends Mage_Core_Controller_Front_Actio
|
|
| 494 |
|
| 495 |
if($szErrorMessage)
|
| 496 |
{
|
|
|
|
|
|
|
| 497 |
if($nVersion >= 1410)
|
| 498 |
{
|
| 499 |
if($order)
|
|
@@ -513,6 +521,7 @@ class Iridiumcorp_Tpg_PaymentController extends Mage_Core_Controller_Front_Actio
|
|
| 513 |
{
|
| 514 |
Mage::getSingleton('core/session')->addError($szErrorMessage);
|
| 515 |
}
|
|
|
|
| 516 |
|
| 517 |
$this->_clearSessionVariables();
|
| 518 |
$this->_redirect('checkout/onepage/failure');
|
|
@@ -725,7 +734,8 @@ class Iridiumcorp_Tpg_PaymentController extends Mage_Core_Controller_Front_Actio
|
|
| 725 |
$this->getRequest()->getPost('Message'),
|
| 726 |
$this->getRequest()->getPost('PreviousStatusCode'),
|
| 727 |
$this->getRequest()->getPost('PreviousMessage'),
|
| 728 |
-
$this->getRequest()->getPost('OrderID')
|
|
|
|
| 729 |
}
|
| 730 |
}
|
| 731 |
catch(Exception $exc)
|
|
@@ -744,6 +754,8 @@ class Iridiumcorp_Tpg_PaymentController extends Mage_Core_Controller_Front_Actio
|
|
| 744 |
$szNotificationMessage = $szNotificationMessage.'<br/>'.$szPaymentProcessorResponse;
|
| 745 |
}
|
| 746 |
|
|
|
|
|
|
|
| 747 |
if($nVersion >= 1410)
|
| 748 |
{
|
| 749 |
if($order)
|
|
@@ -752,7 +764,6 @@ class Iridiumcorp_Tpg_PaymentController extends Mage_Core_Controller_Front_Actio
|
|
| 752 |
$orderStatus = 'irc_failed_hosted_payment';
|
| 753 |
$order->setCustomerNote(Mage::helper('tpg')->__('Transparent Redirect Payment Failed'));
|
| 754 |
$order->setState($orderState, $orderStatus, $szPaymentProcessorResponse, false);
|
| 755 |
-
$order->save();
|
| 756 |
}
|
| 757 |
}
|
| 758 |
if($nVersion == 1324 || $nVersion == 1330)
|
|
@@ -763,6 +774,7 @@ class Iridiumcorp_Tpg_PaymentController extends Mage_Core_Controller_Front_Actio
|
|
| 763 |
{
|
| 764 |
Mage::getSingleton('core/session')->addError($szNotificationMessage);
|
| 765 |
}
|
|
|
|
| 766 |
|
| 767 |
$this->_clearSessionVariables();
|
| 768 |
$this->_redirect('checkout/onepage/failure');
|
|
@@ -900,7 +912,7 @@ class Iridiumcorp_Tpg_PaymentController extends Mage_Core_Controller_Front_Actio
|
|
| 900 |
}
|
| 901 |
// add a comment to the order comments
|
| 902 |
//$order->addStatusToHistory($status, $message, false);
|
| 903 |
-
$order->setState($
|
| 904 |
$order->save();
|
| 905 |
}
|
| 906 |
}
|
| 241 |
$this->getRequest()->getPost('Message'),
|
| 242 |
$this->getRequest()->getPost('PreviousStatusCode'),
|
| 243 |
$this->getRequest()->getPost('PreviousMessage'),
|
| 244 |
+
$this->getRequest()->getPost('OrderID'),
|
| 245 |
+
$this->getRequest()->getPost('CrossReference'));
|
| 246 |
}
|
| 247 |
}
|
| 248 |
catch (Exception $exc)
|
| 251 |
$szNotificationMessage = Iridiumcorp_Tpg_Model_Common_GlobalErrors::ERROR_183;
|
| 252 |
Mage::logException($exc);
|
| 253 |
}
|
| 254 |
+
|
| 255 |
$szPaymentProcessorResponse = $session->getPaymentprocessorresponse();
|
| 256 |
if($boError)
|
| 257 |
{
|
| 261 |
$szNotificationMessage = $szNotificationMessage.'<br/>'.$szPaymentProcessorResponse;
|
| 262 |
}
|
| 263 |
|
| 264 |
+
$order->getPayment()->setAdditionalData("CrossReference=".$this->getRequest()->getPost('CrossReference'));
|
| 265 |
+
|
| 266 |
if($nVersion >= 1410)
|
| 267 |
{
|
| 268 |
if($order)
|
| 282 |
{
|
| 283 |
Mage::getSingleton('core/session')->addError($szNotificationMessage);
|
| 284 |
}
|
| 285 |
+
$order->save();
|
| 286 |
|
| 287 |
$this->_clearSessionVariables();
|
| 288 |
$this->_redirect('checkout/onepage/failure');
|
| 336 |
$szMessage,
|
| 337 |
$this->getRequest()->getPost('PreviousStatusCode'),
|
| 338 |
$this->getRequest()->getPost('PreviousMessage'),
|
| 339 |
+
$this->getRequest()->getPost('OrderID'),
|
| 340 |
+
$this->getRequest()->getPost('CrossReference'));
|
| 341 |
}
|
| 342 |
catch (Exception $exc)
|
| 343 |
{
|
| 484 |
$szMessage,
|
| 485 |
$szPreviousStatusCode,
|
| 486 |
$szPreviousMessage,
|
| 487 |
+
$szOrderID,
|
| 488 |
+
$szCrossReference);
|
| 489 |
}
|
| 490 |
}
|
| 491 |
catch(Exception $exc)
|
| 500 |
|
| 501 |
if($szErrorMessage)
|
| 502 |
{
|
| 503 |
+
$order->getPayment()->setAdditionalData("CrossReference=".$szCrossReference);
|
| 504 |
+
|
| 505 |
if($nVersion >= 1410)
|
| 506 |
{
|
| 507 |
if($order)
|
| 521 |
{
|
| 522 |
Mage::getSingleton('core/session')->addError($szErrorMessage);
|
| 523 |
}
|
| 524 |
+
$order->save();
|
| 525 |
|
| 526 |
$this->_clearSessionVariables();
|
| 527 |
$this->_redirect('checkout/onepage/failure');
|
| 734 |
$this->getRequest()->getPost('Message'),
|
| 735 |
$this->getRequest()->getPost('PreviousStatusCode'),
|
| 736 |
$this->getRequest()->getPost('PreviousMessage'),
|
| 737 |
+
$this->getRequest()->getPost('OrderID'),
|
| 738 |
+
$this->getRequest()->getPost('CrossReference'));
|
| 739 |
}
|
| 740 |
}
|
| 741 |
catch(Exception $exc)
|
| 754 |
$szNotificationMessage = $szNotificationMessage.'<br/>'.$szPaymentProcessorResponse;
|
| 755 |
}
|
| 756 |
|
| 757 |
+
$order->getPayment()->setAdditionalData("CrossReference=".$this->getRequest()->getPost('CrossReference'));
|
| 758 |
+
|
| 759 |
if($nVersion >= 1410)
|
| 760 |
{
|
| 761 |
if($order)
|
| 764 |
$orderStatus = 'irc_failed_hosted_payment';
|
| 765 |
$order->setCustomerNote(Mage::helper('tpg')->__('Transparent Redirect Payment Failed'));
|
| 766 |
$order->setState($orderState, $orderStatus, $szPaymentProcessorResponse, false);
|
|
|
|
| 767 |
}
|
| 768 |
}
|
| 769 |
if($nVersion == 1324 || $nVersion == 1330)
|
| 774 |
{
|
| 775 |
Mage::getSingleton('core/session')->addError($szNotificationMessage);
|
| 776 |
}
|
| 777 |
+
$order->save();
|
| 778 |
|
| 779 |
$this->_clearSessionVariables();
|
| 780 |
$this->_redirect('checkout/onepage/failure');
|
| 912 |
}
|
| 913 |
// add a comment to the order comments
|
| 914 |
//$order->addStatusToHistory($status, $message, false);
|
| 915 |
+
$order->setState($status, 'irc_paid', $message, false);
|
| 916 |
$order->save();
|
| 917 |
}
|
| 918 |
}
|
app/code/local/Iridiumcorp/Tpg/etc/config.xml
CHANGED
|
@@ -16,6 +16,7 @@
|
|
| 16 |
<tpg_setup>
|
| 17 |
<setup>
|
| 18 |
<module>Iridiumcorp_Tpg</module>
|
|
|
|
| 19 |
</setup>
|
| 20 |
<connection>
|
| 21 |
<use>core_setup</use>
|
| 16 |
<tpg_setup>
|
| 17 |
<setup>
|
| 18 |
<module>Iridiumcorp_Tpg</module>
|
| 19 |
+
<class>Iridiumcorp_Tpg_Model_Resource_Eav_Mysql4_Setup</class>
|
| 20 |
</setup>
|
| 21 |
<connection>
|
| 22 |
<use>core_setup</use>
|
app/code/local/Iridiumcorp/Tpg/sql/iridiumcorp_tpg_setup/mysql4-install-0.1.0.php
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
|
| 3 |
+
$installer = $this;
|
| 4 |
+
/* @var $installer Mage_Core_Model_Resource_Setup */
|
| 5 |
+
$installer->startSetup();
|
| 6 |
+
|
| 7 |
+
$installer->run("
|
| 8 |
+
DELETE FROM `magento_1_5_0`.`sales_order_status` WHERE 'status'='irc_failed_hosted_payment');
|
| 9 |
+
DELETE FROM `magento_1_5_0`.`sales_order_status` WHERE 'status'='irc_failed_threed_secure');
|
| 10 |
+
DELETE FROM `magento_1_5_0`.`sales_order_status` WHERE 'status'='irc_paid');
|
| 11 |
+
DELETE FROM `magento_1_5_0`.`sales_order_status` WHERE 'status'='irc_pending');
|
| 12 |
+
DELETE FROM `magento_1_5_0`.`sales_order_status` WHERE 'status'='irc_pending_hosted_payment');
|
| 13 |
+
DELETE FROM `magento_1_5_0`.`sales_order_status` WHERE 'status'='irc_pending_threed_secure');
|
| 14 |
+
|
| 15 |
+
INSERT INTO `magento_1_5_0`.`sales_order_status` (`status`, `label`) VALUES ('irc_failed_hosted_payment', 'Iridiumcorp - Failed Payment');
|
| 16 |
+
INSERT INTO `magento_1_5_0`.`sales_order_status` (`status`, `label`) VALUES ('irc_failed_threed_secure', 'Iridiumcorp - Failed 3D Secure');
|
| 17 |
+
INSERT INTO `magento_1_5_0`.`sales_order_status` (`status`, `label`) VALUES ('irc_paid', 'Iridiumcorp - Successful Payment');
|
| 18 |
+
INSERT INTO `magento_1_5_0`.`sales_order_status` (`status`, `label`) VALUES ('irc_pending', 'Iridiumcorp - Pending Hosted Payment');
|
| 19 |
+
INSERT INTO `magento_1_5_0`.`sales_order_status` (`status`, `label`) VALUES ('irc_pending_hosted_payment', 'Iridiumcorp - Pending Hosted Payment');
|
| 20 |
+
INSERT INTO `magento_1_5_0`.`sales_order_status` (`status`, `label`) VALUES ('irc_pending_threed_secure', 'Iridiumcorp - Pending 3D Secure');
|
| 21 |
+
");
|
| 22 |
+
|
| 23 |
+
$installer->endSetup();
|
app/design/adminhtml/base/default/template/tpg/form.phtml
CHANGED
|
@@ -1,7 +1,9 @@
|
|
| 1 |
<?php $direct = Mage::getModel('tpg/direct'); ?>
|
|
|
|
|
|
|
|
|
|
| 2 |
<?php if ($direct->getConfigData('mode') == Iridiumcorp_Tpg_Model_Source_PaymentMode::PAYMENT_MODE_HOSTED_PAYMENT_FORM) {?>
|
| 3 |
<fieldset class="form-list">
|
| 4 |
-
<?php $_code=$this->getMethodCode() ?>
|
| 5 |
<ul id="payment_form_<?php echo $_code ?>" style="display:none">
|
| 6 |
<li>
|
| 7 |
<?php echo $this->__('You will be redirected to a secure page where you can complete your payment.') ?>
|
|
@@ -10,25 +12,24 @@
|
|
| 10 |
</fieldset>
|
| 11 |
<?php } else {?>
|
| 12 |
<fieldset class="form-list">
|
| 13 |
-
<?php $_code = $this->getMethodCode(); ?>
|
| 14 |
<ul id="payment_form_<?php echo $_code; ?>" style="display:none">
|
| 15 |
<li>
|
| 16 |
<div class="input-box">
|
| 17 |
<label for="<?php echo $_code; ?>_cc_owner"><?php echo $this->__('Name On Card') ?> <span class="required">*</span></label><br/>
|
| 18 |
-
<input type="text" title="<?php echo $this->__('Name On Card') ?>" class="required-entry input-text" id="<?php echo $_code; ?>_cc_owner" name="payment[cc_owner]" value="<?php echo $this->htmlEscape($this->getInfoData('cc_owner')) ?>"/>
|
| 19 |
</div>
|
| 20 |
</li>
|
| 21 |
<li>
|
| 22 |
<div class="input-box">
|
| 23 |
<label for="<?php echo $_code; ?>_cc_number"><?php echo $this->__('Card Number') ?> <span class="required">*</span></label><br/>
|
| 24 |
-
<input type="text" id="<?php echo $_code; ?>_cc_number" name="payment[cc_number]" title="<?php echo $this->__('Card Number') ?>" class="required-entry input-text" value=""/>
|
| 25 |
</div>
|
| 26 |
</li>
|
| 27 |
<li>
|
| 28 |
-
|
| 29 |
-
|
| 30 |
<div class="v-fix">
|
| 31 |
-
<select id="<?php echo $_code; ?>_expiration"
|
| 32 |
<?php $_ccExpMonth = $this->getInfoData('cc_exp_month') ?>
|
| 33 |
<?php foreach ($this->getCcMonths() as $k=>$v): ?>
|
| 34 |
<option value="<?php echo $k?$k:'' ?>"<?php if($k==$_ccExpMonth): ?> selected="selected"<?php endif ?>><?php echo $v ?></option>
|
|
@@ -36,9 +37,9 @@
|
|
| 36 |
</select>
|
| 37 |
</div>
|
| 38 |
|
| 39 |
-
<div class="v-fix"
|
| 40 |
<?php $_ccExpYear = $this->getInfoData('cc_exp_year') ?>
|
| 41 |
-
<select id="<?php echo $_code; ?>_expiration_yr"
|
| 42 |
<?php foreach ($this->getCcYears() as $k=>$v): ?>
|
| 43 |
<option value="<?php echo $k?$k:'' ?>"<?php if($k==$_ccExpYear): ?> selected="selected"<?php endif ?>><?php echo $v ?></option>
|
| 44 |
<?php endforeach ?>
|
|
@@ -47,19 +48,19 @@
|
|
| 47 |
</div>
|
| 48 |
</li>
|
| 49 |
<li>
|
| 50 |
-
|
| 51 |
-
|
| 52 |
<div class="v-fix">
|
| 53 |
-
<select id="<?php echo $_code; ?>_cc_ss_start_month"
|
| 54 |
<?php $_ccStartMonth = $this->getInfoData('cc_ss_start_month') ?>
|
| 55 |
<?php foreach ($this->getCcStartMonths() as $k=>$v): ?>
|
| 56 |
<option value="<?php echo $k?$k:'' ?>"<?php if($k==$_ccStartMonth): ?> selected="selected"<?php endif ?>><?php echo $v ?></option>
|
| 57 |
<?php endforeach ?>
|
| 58 |
</select>
|
| 59 |
</div>
|
| 60 |
-
<div class="v-fix"
|
| 61 |
<?php $_ccStartYear = $this->getInfoData('cc_ss_start_year') ?>
|
| 62 |
-
<select id="<?php echo $_code ?>_cc_ss_start_year"
|
| 63 |
<?php foreach ($this->getCcStartYears() as $k=>$v): ?>
|
| 64 |
<option value="<?php echo $k?$k:'' ?>"<?php if($k==$_ccStartYear): ?> selected="selected"<?php endif ?>><?php echo $v ?></option>
|
| 65 |
<?php endforeach ?>
|
|
@@ -70,13 +71,13 @@
|
|
| 70 |
<li>
|
| 71 |
<div class="input-box">
|
| 72 |
<label for="<?php echo $_code; ?>_cc_ss_issue"><?php echo $this->__('Issue Number') ?></label><br />
|
| 73 |
-
<div class="v-fix"><input type="text" title="<?php echo $this->__('Issue Number') ?>" class="input-text" id="<?php echo $_code ?>_cc_ss_issue" name="payment[cc_ss_issue]"
|
| 74 |
</div>
|
| 75 |
</li>
|
| 76 |
<li>
|
| 77 |
<div class="input-box">
|
| 78 |
<label for="<?php echo $_code; ?>_cc_cid"><?php echo $this->__('CV2') ?> <span class="required">*</span></label><br/>
|
| 79 |
-
<div class="v-fix"><input type="text" title="<?php echo $this->__('CV2') ?>" class="required-entry input-text" id="<?php echo $_code; ?>_cc_cid" name="payment[cc_cid]" style="width:
|
| 80 |
|
| 81 |
<a href="#" class="cvv-what-is-this"><?php echo $this->__('What is this?') ?></a>
|
| 82 |
</div>
|
| 1 |
<?php $direct = Mage::getModel('tpg/direct'); ?>
|
| 2 |
+
<?php $_code = $this->getMethodCode() ?>
|
| 3 |
+
<?php $route = $this->getRequest()->getRequestedRouteName(); if($route == 'onestepcheckout'){ $fieldCode = '['.$_code.']'; } else { $fieldCode = ''; }?>
|
| 4 |
+
|
| 5 |
<?php if ($direct->getConfigData('mode') == Iridiumcorp_Tpg_Model_Source_PaymentMode::PAYMENT_MODE_HOSTED_PAYMENT_FORM) {?>
|
| 6 |
<fieldset class="form-list">
|
|
|
|
| 7 |
<ul id="payment_form_<?php echo $_code ?>" style="display:none">
|
| 8 |
<li>
|
| 9 |
<?php echo $this->__('You will be redirected to a secure page where you can complete your payment.') ?>
|
| 12 |
</fieldset>
|
| 13 |
<?php } else {?>
|
| 14 |
<fieldset class="form-list">
|
|
|
|
| 15 |
<ul id="payment_form_<?php echo $_code; ?>" style="display:none">
|
| 16 |
<li>
|
| 17 |
<div class="input-box">
|
| 18 |
<label for="<?php echo $_code; ?>_cc_owner"><?php echo $this->__('Name On Card') ?> <span class="required">*</span></label><br/>
|
| 19 |
+
<input type="text" title="<?php echo $this->__('Name On Card') ?>" class="required-entry input-text" id="<?php echo $_code; ?>_cc_owner" name="payment<?php echo $fieldCode; ?>[cc_owner]" value="<?php echo $this->htmlEscape($this->getInfoData('cc_owner')) ?>"/>
|
| 20 |
</div>
|
| 21 |
</li>
|
| 22 |
<li>
|
| 23 |
<div class="input-box">
|
| 24 |
<label for="<?php echo $_code; ?>_cc_number"><?php echo $this->__('Card Number') ?> <span class="required">*</span></label><br/>
|
| 25 |
+
<input type="text" id="<?php echo $_code; ?>_cc_number" name="payment<?php echo $fieldCode; ?>[cc_number]" title="<?php echo $this->__('Card Number') ?>" class="required-entry input-text" value=""/>
|
| 26 |
</div>
|
| 27 |
</li>
|
| 28 |
<li>
|
| 29 |
+
<label for="<?php echo $_code; ?>_expiration"><?php echo $this->__('Expiration Date') ?> <span class="required">*</span></label><br/>
|
| 30 |
+
<div class="input-box">
|
| 31 |
<div class="v-fix">
|
| 32 |
+
<select id="<?php echo $_code; ?>_expiration" name="payment<?php echo $fieldCode; ?>[cc_exp_month]" class="month validate-cc-exp required-entry">
|
| 33 |
<?php $_ccExpMonth = $this->getInfoData('cc_exp_month') ?>
|
| 34 |
<?php foreach ($this->getCcMonths() as $k=>$v): ?>
|
| 35 |
<option value="<?php echo $k?$k:'' ?>"<?php if($k==$_ccExpMonth): ?> selected="selected"<?php endif ?>><?php echo $v ?></option>
|
| 37 |
</select>
|
| 38 |
</div>
|
| 39 |
|
| 40 |
+
<div class="v-fix">
|
| 41 |
<?php $_ccExpYear = $this->getInfoData('cc_exp_year') ?>
|
| 42 |
+
<select id="<?php echo $_code; ?>_expiration_yr" name="payment<?php echo $fieldCode; ?>[cc_exp_year]" class="year required-entry">
|
| 43 |
<?php foreach ($this->getCcYears() as $k=>$v): ?>
|
| 44 |
<option value="<?php echo $k?$k:'' ?>"<?php if($k==$_ccExpYear): ?> selected="selected"<?php endif ?>><?php echo $v ?></option>
|
| 45 |
<?php endforeach ?>
|
| 48 |
</div>
|
| 49 |
</li>
|
| 50 |
<li>
|
| 51 |
+
<label for="<?php echo $_code; ?>_cc_ss_start_month"><?php echo $this->__('Start Date') ?></label><br />
|
| 52 |
+
<div class="input-box">
|
| 53 |
<div class="v-fix">
|
| 54 |
+
<select id="<?php echo $_code; ?>_cc_ss_start_month" name="payment<?php echo $fieldCode; ?>[cc_ss_start_month]" class="month">
|
| 55 |
<?php $_ccStartMonth = $this->getInfoData('cc_ss_start_month') ?>
|
| 56 |
<?php foreach ($this->getCcStartMonths() as $k=>$v): ?>
|
| 57 |
<option value="<?php echo $k?$k:'' ?>"<?php if($k==$_ccStartMonth): ?> selected="selected"<?php endif ?>><?php echo $v ?></option>
|
| 58 |
<?php endforeach ?>
|
| 59 |
</select>
|
| 60 |
</div>
|
| 61 |
+
<div class="v-fix">
|
| 62 |
<?php $_ccStartYear = $this->getInfoData('cc_ss_start_year') ?>
|
| 63 |
+
<select id="<?php echo $_code ?>_cc_ss_start_year" name="payment<?php echo $fieldCode; ?>[cc_ss_start_year]" class="year">
|
| 64 |
<?php foreach ($this->getCcStartYears() as $k=>$v): ?>
|
| 65 |
<option value="<?php echo $k?$k:'' ?>"<?php if($k==$_ccStartYear): ?> selected="selected"<?php endif ?>><?php echo $v ?></option>
|
| 66 |
<?php endforeach ?>
|
| 71 |
<li>
|
| 72 |
<div class="input-box">
|
| 73 |
<label for="<?php echo $_code; ?>_cc_ss_issue"><?php echo $this->__('Issue Number') ?></label><br />
|
| 74 |
+
<div class="v-fix"><input type="text" title="<?php echo $this->__('Issue Number') ?>" class="input-text" style="width:50px;" id="<?php echo $_code ?>_cc_ss_issue" name="payment<?php echo $fieldCode; ?>[cc_ss_issue]" value="" /></div>
|
| 75 |
</div>
|
| 76 |
</li>
|
| 77 |
<li>
|
| 78 |
<div class="input-box">
|
| 79 |
<label for="<?php echo $_code; ?>_cc_cid"><?php echo $this->__('CV2') ?> <span class="required">*</span></label><br/>
|
| 80 |
+
<div class="v-fix"><input type="text" title="<?php echo $this->__('CV2') ?>" class="required-entry input-text" id="<?php echo $_code; ?>_cc_cid" name="payment<?php echo $fieldCode; ?>[cc_cid]" style="width:50px;" value=""/></div>
|
| 81 |
|
| 82 |
<a href="#" class="cvv-what-is-this"><?php echo $this->__('What is this?') ?></a>
|
| 83 |
</div>
|
app/design/adminhtml/default/default/template/tpg/form.phtml
CHANGED
|
@@ -1,7 +1,9 @@
|
|
| 1 |
<?php $direct = Mage::getModel('tpg/direct'); ?>
|
|
|
|
|
|
|
|
|
|
| 2 |
<?php if ($direct->getConfigData('mode') == Iridiumcorp_Tpg_Model_Source_PaymentMode::PAYMENT_MODE_HOSTED_PAYMENT_FORM) {?>
|
| 3 |
<fieldset class="form-list">
|
| 4 |
-
<?php $_code=$this->getMethodCode() ?>
|
| 5 |
<ul id="payment_form_<?php echo $_code ?>" style="display:none">
|
| 6 |
<li>
|
| 7 |
<?php echo $this->__('You will be redirected to a secure page where you can complete your payment.') ?>
|
|
@@ -10,25 +12,24 @@
|
|
| 10 |
</fieldset>
|
| 11 |
<?php } else {?>
|
| 12 |
<fieldset class="form-list">
|
| 13 |
-
<?php $_code = $this->getMethodCode(); ?>
|
| 14 |
<ul id="payment_form_<?php echo $_code; ?>" style="display:none">
|
| 15 |
<li>
|
| 16 |
<div class="input-box">
|
| 17 |
<label for="<?php echo $_code; ?>_cc_owner"><?php echo $this->__('Name On Card') ?> <span class="required">*</span></label><br/>
|
| 18 |
-
<input type="text" title="<?php echo $this->__('Name On Card') ?>" class="required-entry input-text" id="<?php echo $_code; ?>_cc_owner" name="payment[cc_owner]" value="<?php echo $this->htmlEscape($this->getInfoData('cc_owner')) ?>"/>
|
| 19 |
</div>
|
| 20 |
</li>
|
| 21 |
<li>
|
| 22 |
<div class="input-box">
|
| 23 |
<label for="<?php echo $_code; ?>_cc_number"><?php echo $this->__('Card Number') ?> <span class="required">*</span></label><br/>
|
| 24 |
-
<input type="text" id="<?php echo $_code; ?>_cc_number" name="payment[cc_number]" title="<?php echo $this->__('Card Number') ?>" class="required-entry input-text" value=""/>
|
| 25 |
</div>
|
| 26 |
</li>
|
| 27 |
<li>
|
| 28 |
-
|
| 29 |
-
|
| 30 |
<div class="v-fix">
|
| 31 |
-
<select id="<?php echo $_code; ?>_expiration"
|
| 32 |
<?php $_ccExpMonth = $this->getInfoData('cc_exp_month') ?>
|
| 33 |
<?php foreach ($this->getCcMonths() as $k=>$v): ?>
|
| 34 |
<option value="<?php echo $k?$k:'' ?>"<?php if($k==$_ccExpMonth): ?> selected="selected"<?php endif ?>><?php echo $v ?></option>
|
|
@@ -36,9 +37,9 @@
|
|
| 36 |
</select>
|
| 37 |
</div>
|
| 38 |
|
| 39 |
-
<div class="v-fix"
|
| 40 |
<?php $_ccExpYear = $this->getInfoData('cc_exp_year') ?>
|
| 41 |
-
<select id="<?php echo $_code; ?>_expiration_yr"
|
| 42 |
<?php foreach ($this->getCcYears() as $k=>$v): ?>
|
| 43 |
<option value="<?php echo $k?$k:'' ?>"<?php if($k==$_ccExpYear): ?> selected="selected"<?php endif ?>><?php echo $v ?></option>
|
| 44 |
<?php endforeach ?>
|
|
@@ -47,19 +48,19 @@
|
|
| 47 |
</div>
|
| 48 |
</li>
|
| 49 |
<li>
|
| 50 |
-
|
| 51 |
-
|
| 52 |
<div class="v-fix">
|
| 53 |
-
<select id="<?php echo $_code; ?>_cc_ss_start_month"
|
| 54 |
<?php $_ccStartMonth = $this->getInfoData('cc_ss_start_month') ?>
|
| 55 |
<?php foreach ($this->getCcStartMonths() as $k=>$v): ?>
|
| 56 |
<option value="<?php echo $k?$k:'' ?>"<?php if($k==$_ccStartMonth): ?> selected="selected"<?php endif ?>><?php echo $v ?></option>
|
| 57 |
<?php endforeach ?>
|
| 58 |
</select>
|
| 59 |
</div>
|
| 60 |
-
<div class="v-fix"
|
| 61 |
<?php $_ccStartYear = $this->getInfoData('cc_ss_start_year') ?>
|
| 62 |
-
<select id="<?php echo $_code ?>_cc_ss_start_year"
|
| 63 |
<?php foreach ($this->getCcStartYears() as $k=>$v): ?>
|
| 64 |
<option value="<?php echo $k?$k:'' ?>"<?php if($k==$_ccStartYear): ?> selected="selected"<?php endif ?>><?php echo $v ?></option>
|
| 65 |
<?php endforeach ?>
|
|
@@ -70,13 +71,13 @@
|
|
| 70 |
<li>
|
| 71 |
<div class="input-box">
|
| 72 |
<label for="<?php echo $_code; ?>_cc_ss_issue"><?php echo $this->__('Issue Number') ?></label><br />
|
| 73 |
-
<div class="v-fix"><input type="text" title="<?php echo $this->__('Issue Number') ?>" class="input-text" id="<?php echo $_code ?>_cc_ss_issue" name="payment[cc_ss_issue]" style="width:
|
| 74 |
</div>
|
| 75 |
</li>
|
| 76 |
<li>
|
| 77 |
<div class="input-box">
|
| 78 |
<label for="<?php echo $_code; ?>_cc_cid"><?php echo $this->__('CV2') ?> <span class="required">*</span></label><br/>
|
| 79 |
-
<div class="v-fix"><input type="text" title="<?php echo $this->__('CV2') ?>" class="required-entry input-text" id="<?php echo $_code; ?>_cc_cid" name="payment[cc_cid]" style="width:
|
| 80 |
|
| 81 |
<a href="#" class="cvv-what-is-this"><?php echo $this->__('What is this?') ?></a>
|
| 82 |
</div>
|
| 1 |
<?php $direct = Mage::getModel('tpg/direct'); ?>
|
| 2 |
+
<?php $_code = $this->getMethodCode() ?>
|
| 3 |
+
<?php $route = $this->getRequest()->getRequestedRouteName(); if($route == 'onestepcheckout'){ $fieldCode = '['.$_code.']'; } else { $fieldCode = ''; }?>
|
| 4 |
+
|
| 5 |
<?php if ($direct->getConfigData('mode') == Iridiumcorp_Tpg_Model_Source_PaymentMode::PAYMENT_MODE_HOSTED_PAYMENT_FORM) {?>
|
| 6 |
<fieldset class="form-list">
|
|
|
|
| 7 |
<ul id="payment_form_<?php echo $_code ?>" style="display:none">
|
| 8 |
<li>
|
| 9 |
<?php echo $this->__('You will be redirected to a secure page where you can complete your payment.') ?>
|
| 12 |
</fieldset>
|
| 13 |
<?php } else {?>
|
| 14 |
<fieldset class="form-list">
|
|
|
|
| 15 |
<ul id="payment_form_<?php echo $_code; ?>" style="display:none">
|
| 16 |
<li>
|
| 17 |
<div class="input-box">
|
| 18 |
<label for="<?php echo $_code; ?>_cc_owner"><?php echo $this->__('Name On Card') ?> <span class="required">*</span></label><br/>
|
| 19 |
+
<input type="text" title="<?php echo $this->__('Name On Card') ?>" class="required-entry input-text" id="<?php echo $_code; ?>_cc_owner" name="payment<?php echo $fieldCode; ?>[cc_owner]" value="<?php echo $this->htmlEscape($this->getInfoData('cc_owner')) ?>"/>
|
| 20 |
</div>
|
| 21 |
</li>
|
| 22 |
<li>
|
| 23 |
<div class="input-box">
|
| 24 |
<label for="<?php echo $_code; ?>_cc_number"><?php echo $this->__('Card Number') ?> <span class="required">*</span></label><br/>
|
| 25 |
+
<input type="text" id="<?php echo $_code; ?>_cc_number" name="payment<?php echo $fieldCode; ?>[cc_number]" title="<?php echo $this->__('Card Number') ?>" class="required-entry input-text" value=""/>
|
| 26 |
</div>
|
| 27 |
</li>
|
| 28 |
<li>
|
| 29 |
+
<label for="<?php echo $_code; ?>_expiration"><?php echo $this->__('Expiration Date') ?> <span class="required">*</span></label><br/>
|
| 30 |
+
<div class="input-box">
|
| 31 |
<div class="v-fix">
|
| 32 |
+
<select id="<?php echo $_code; ?>_expiration" name="payment<?php echo $fieldCode; ?>[cc_exp_month]" class="month validate-cc-exp required-entry">
|
| 33 |
<?php $_ccExpMonth = $this->getInfoData('cc_exp_month') ?>
|
| 34 |
<?php foreach ($this->getCcMonths() as $k=>$v): ?>
|
| 35 |
<option value="<?php echo $k?$k:'' ?>"<?php if($k==$_ccExpMonth): ?> selected="selected"<?php endif ?>><?php echo $v ?></option>
|
| 37 |
</select>
|
| 38 |
</div>
|
| 39 |
|
| 40 |
+
<div class="v-fix">
|
| 41 |
<?php $_ccExpYear = $this->getInfoData('cc_exp_year') ?>
|
| 42 |
+
<select id="<?php echo $_code; ?>_expiration_yr" name="payment<?php echo $fieldCode; ?>[cc_exp_year]" class="year required-entry">
|
| 43 |
<?php foreach ($this->getCcYears() as $k=>$v): ?>
|
| 44 |
<option value="<?php echo $k?$k:'' ?>"<?php if($k==$_ccExpYear): ?> selected="selected"<?php endif ?>><?php echo $v ?></option>
|
| 45 |
<?php endforeach ?>
|
| 48 |
</div>
|
| 49 |
</li>
|
| 50 |
<li>
|
| 51 |
+
<label for="<?php echo $_code; ?>_cc_ss_start_month"><?php echo $this->__('Start Date') ?></label><br />
|
| 52 |
+
<div class="input-box">
|
| 53 |
<div class="v-fix">
|
| 54 |
+
<select id="<?php echo $_code; ?>_cc_ss_start_month" name="payment<?php echo $fieldCode; ?>[cc_ss_start_month]" class="month">
|
| 55 |
<?php $_ccStartMonth = $this->getInfoData('cc_ss_start_month') ?>
|
| 56 |
<?php foreach ($this->getCcStartMonths() as $k=>$v): ?>
|
| 57 |
<option value="<?php echo $k?$k:'' ?>"<?php if($k==$_ccStartMonth): ?> selected="selected"<?php endif ?>><?php echo $v ?></option>
|
| 58 |
<?php endforeach ?>
|
| 59 |
</select>
|
| 60 |
</div>
|
| 61 |
+
<div class="v-fix">
|
| 62 |
<?php $_ccStartYear = $this->getInfoData('cc_ss_start_year') ?>
|
| 63 |
+
<select id="<?php echo $_code ?>_cc_ss_start_year" name="payment<?php echo $fieldCode; ?>[cc_ss_start_year]" class="year">
|
| 64 |
<?php foreach ($this->getCcStartYears() as $k=>$v): ?>
|
| 65 |
<option value="<?php echo $k?$k:'' ?>"<?php if($k==$_ccStartYear): ?> selected="selected"<?php endif ?>><?php echo $v ?></option>
|
| 66 |
<?php endforeach ?>
|
| 71 |
<li>
|
| 72 |
<div class="input-box">
|
| 73 |
<label for="<?php echo $_code; ?>_cc_ss_issue"><?php echo $this->__('Issue Number') ?></label><br />
|
| 74 |
+
<div class="v-fix"><input type="text" title="<?php echo $this->__('Issue Number') ?>" class="input-text" id="<?php echo $_code ?>_cc_ss_issue" name="payment<?php echo $fieldCode; ?>[cc_ss_issue]" style="width:50px;" value="" /></div>
|
| 75 |
</div>
|
| 76 |
</li>
|
| 77 |
<li>
|
| 78 |
<div class="input-box">
|
| 79 |
<label for="<?php echo $_code; ?>_cc_cid"><?php echo $this->__('CV2') ?> <span class="required">*</span></label><br/>
|
| 80 |
+
<div class="v-fix"><input type="text" title="<?php echo $this->__('CV2') ?>" class="required-entry input-text" id="<?php echo $_code; ?>_cc_cid" name="payment<?php echo $fieldCode; ?>[cc_cid]" style="width:50px;" value=""/></div>
|
| 81 |
|
| 82 |
<a href="#" class="cvv-what-is-this"><?php echo $this->__('What is this?') ?></a>
|
| 83 |
</div>
|
app/design/frontend/base/default/template/tpg/form.phtml
CHANGED
|
@@ -1,7 +1,9 @@
|
|
| 1 |
<?php $direct = Mage::getModel('tpg/direct'); ?>
|
|
|
|
|
|
|
|
|
|
| 2 |
<?php if ($direct->getConfigData('mode') == Iridiumcorp_Tpg_Model_Source_PaymentMode::PAYMENT_MODE_HOSTED_PAYMENT_FORM) {?>
|
| 3 |
<fieldset class="form-list">
|
| 4 |
-
<?php $_code=$this->getMethodCode() ?>
|
| 5 |
<ul id="payment_form_<?php echo $_code ?>" style="display:none">
|
| 6 |
<li>
|
| 7 |
<img alt="<?php echo $this->__('Iridium Corporation Logo'); ?>" src="<?php echo $this->getSkinUrl('images/iridium_corporation.jpg'); ?>">
|
|
@@ -13,25 +15,24 @@
|
|
| 13 |
</fieldset>
|
| 14 |
<?php } else {?>
|
| 15 |
<fieldset class="form-list">
|
| 16 |
-
<?php $_code = $this->getMethodCode(); ?>
|
| 17 |
<ul id="payment_form_<?php echo $_code; ?>" style="display:none">
|
| 18 |
<li>
|
| 19 |
<div class="input-box">
|
| 20 |
<label for="<?php echo $_code; ?>_cc_owner"><?php echo $this->__('Name On Card') ?> <span class="required">*</span></label><br/>
|
| 21 |
-
<input type="text" title="<?php echo $this->__('Name On Card') ?>" class="required-entry input-text" id="<?php echo $_code; ?>_cc_owner" name="payment[cc_owner]" value="<?php echo $this->htmlEscape($this->getInfoData('cc_owner')) ?>"/>
|
| 22 |
</div>
|
| 23 |
</li>
|
| 24 |
<li>
|
| 25 |
<div class="input-box">
|
| 26 |
<label for="<?php echo $_code; ?>_cc_number"><?php echo $this->__('Card Number') ?> <span class="required">*</span></label><br/>
|
| 27 |
-
<input type="text" id="<?php echo $_code; ?>_cc_number" name="payment[cc_number]" title="<?php echo $this->__('Card Number') ?>" class="required-entry input-text" value=""/>
|
| 28 |
</div>
|
| 29 |
</li>
|
| 30 |
<li>
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
<select id="<?php echo $_code; ?>_expiration"
|
| 35 |
<?php $_ccExpMonth = $this->getInfoData('cc_exp_month') ?>
|
| 36 |
<?php foreach ($this->getCcMonths() as $k=>$v): ?>
|
| 37 |
<option value="<?php echo $k?$k:'' ?>" <?php if($k==$_ccExpMonth): ?> selected="selected"<?php endif ?>><?php echo $v ?></option>
|
|
@@ -41,7 +42,7 @@
|
|
| 41 |
|
| 42 |
<div class="v-fix" style="padding-left:5px;">
|
| 43 |
<?php $_ccExpYear = $this->getInfoData('cc_exp_year') ?>
|
| 44 |
-
<select id="<?php echo $_code; ?>_expiration_yr"
|
| 45 |
<?php foreach ($this->getCcYears() as $k=>$v): ?>
|
| 46 |
<option value="<?php echo $k?$k:'' ?>" <?php if($k==$_ccExpYear): ?> selected="selected"<?php endif ?>><?php echo $v ?></option>
|
| 47 |
<?php endforeach ?>
|
|
@@ -50,10 +51,10 @@
|
|
| 50 |
</div>
|
| 51 |
</li>
|
| 52 |
<li>
|
| 53 |
-
|
| 54 |
-
|
| 55 |
<div class="v-fix">
|
| 56 |
-
<select id="<?php echo $_code; ?>_cc_ss_start_month"
|
| 57 |
<?php $_ccStartMonth = $this->getInfoData('cc_ss_start_month') ?>
|
| 58 |
<?php foreach ($this->getCcStartMonths() as $k=>$v): ?>
|
| 59 |
<option value="<?php echo $k?$k:'' ?>"<?php if($k==$_ccStartMonth): ?> selected="selected"<?php endif ?>><?php echo $v ?></option>
|
|
@@ -62,7 +63,7 @@
|
|
| 62 |
</div>
|
| 63 |
<div class="v-fix" style="padding-left:5px;">
|
| 64 |
<?php $_ccStartYear = $this->getInfoData('cc_ss_start_year') ?>
|
| 65 |
-
<select id="<?php echo $_code ?>_cc_ss_start_year"
|
| 66 |
<?php foreach ($this->getCcStartYears() as $k=>$v): ?>
|
| 67 |
<option value="<?php echo $k?$k:'' ?>"<?php if($k==$_ccStartYear): ?> selected="selected"<?php endif ?>><?php echo $v ?></option>
|
| 68 |
<?php endforeach ?>
|
|
@@ -73,13 +74,13 @@
|
|
| 73 |
<li>
|
| 74 |
<div class="input-box">
|
| 75 |
<label for="<?php echo $_code; ?>_cc_ss_issue"><?php echo $this->__('Issue Number') ?></label><br />
|
| 76 |
-
<div class="v-fix"><input type="text" title="<?php echo $this->__('Issue Number') ?>" class="input-text" id="<?php echo $_code ?>_cc_ss_issue" name="payment[cc_ss_issue]"
|
| 77 |
</div>
|
| 78 |
</li>
|
| 79 |
<li>
|
| 80 |
<div class="input-box">
|
| 81 |
<label for="<?php echo $_code; ?>_cc_cid"><?php echo $this->__('CV2') ?> <span class="required">*</span></label><br/>
|
| 82 |
-
<div class="v-fix"><input type="text" title="<?php echo $this->__('CV2') ?>" class="required-entry input-text" id="<?php echo $_code; ?>_cc_cid" name="payment[cc_cid]"
|
| 83 |
|
| 84 |
<a href="#" class="cvv-what-is-this"><?php echo $this->__('What is this?') ?></a>
|
| 85 |
</div>
|
| 1 |
<?php $direct = Mage::getModel('tpg/direct'); ?>
|
| 2 |
+
<?php $_code = $this->getMethodCode() ?>
|
| 3 |
+
<?php $route = $this->getRequest()->getRequestedRouteName(); if($route == 'onestepcheckout'){ $fieldCode = '['.$_code.']'; } else { $fieldCode = ''; }?>
|
| 4 |
+
|
| 5 |
<?php if ($direct->getConfigData('mode') == Iridiumcorp_Tpg_Model_Source_PaymentMode::PAYMENT_MODE_HOSTED_PAYMENT_FORM) {?>
|
| 6 |
<fieldset class="form-list">
|
|
|
|
| 7 |
<ul id="payment_form_<?php echo $_code ?>" style="display:none">
|
| 8 |
<li>
|
| 9 |
<img alt="<?php echo $this->__('Iridium Corporation Logo'); ?>" src="<?php echo $this->getSkinUrl('images/iridium_corporation.jpg'); ?>">
|
| 15 |
</fieldset>
|
| 16 |
<?php } else {?>
|
| 17 |
<fieldset class="form-list">
|
|
|
|
| 18 |
<ul id="payment_form_<?php echo $_code; ?>" style="display:none">
|
| 19 |
<li>
|
| 20 |
<div class="input-box">
|
| 21 |
<label for="<?php echo $_code; ?>_cc_owner"><?php echo $this->__('Name On Card') ?> <span class="required">*</span></label><br/>
|
| 22 |
+
<input type="text" title="<?php echo $this->__('Name On Card') ?>" class="required-entry input-text" id="<?php echo $_code; ?>_cc_owner" name="payment<?php echo $fieldCode; ?>[cc_owner]" value="<?php echo $this->htmlEscape($this->getInfoData('cc_owner')) ?>"/>
|
| 23 |
</div>
|
| 24 |
</li>
|
| 25 |
<li>
|
| 26 |
<div class="input-box">
|
| 27 |
<label for="<?php echo $_code; ?>_cc_number"><?php echo $this->__('Card Number') ?> <span class="required">*</span></label><br/>
|
| 28 |
+
<input type="text" id="<?php echo $_code; ?>_cc_number" name="payment<?php echo $fieldCode; ?>[cc_number]" title="<?php echo $this->__('Card Number') ?>" class="required-entry input-text" value=""/>
|
| 29 |
</div>
|
| 30 |
</li>
|
| 31 |
<li>
|
| 32 |
+
<label for="<?php echo $_code; ?>_expiration"><?php echo $this->__('Expiry Date') ?> <span class="required">*</span></label><br/>
|
| 33 |
+
<div class="input-box">
|
| 34 |
+
<div class="v-fix">
|
| 35 |
+
<select id="<?php echo $_code; ?>_expiration" name="payment<?php echo $fieldCode; ?>[cc_exp_month]" class="month validate-cc-exp required-entry">
|
| 36 |
<?php $_ccExpMonth = $this->getInfoData('cc_exp_month') ?>
|
| 37 |
<?php foreach ($this->getCcMonths() as $k=>$v): ?>
|
| 38 |
<option value="<?php echo $k?$k:'' ?>" <?php if($k==$_ccExpMonth): ?> selected="selected"<?php endif ?>><?php echo $v ?></option>
|
| 42 |
|
| 43 |
<div class="v-fix" style="padding-left:5px;">
|
| 44 |
<?php $_ccExpYear = $this->getInfoData('cc_exp_year') ?>
|
| 45 |
+
<select id="<?php echo $_code; ?>_expiration_yr" name="payment<?php echo $fieldCode; ?>[cc_exp_year]" class="year required-entry">
|
| 46 |
<?php foreach ($this->getCcYears() as $k=>$v): ?>
|
| 47 |
<option value="<?php echo $k?$k:'' ?>" <?php if($k==$_ccExpYear): ?> selected="selected"<?php endif ?>><?php echo $v ?></option>
|
| 48 |
<?php endforeach ?>
|
| 51 |
</div>
|
| 52 |
</li>
|
| 53 |
<li>
|
| 54 |
+
<label for="<?php echo $_code; ?>_cc_ss_start_month"><?php echo $this->__('Start Date') ?></label><br />
|
| 55 |
+
<div class="input-box">
|
| 56 |
<div class="v-fix">
|
| 57 |
+
<select id="<?php echo $_code; ?>_cc_ss_start_month" name="payment<?php echo $fieldCode; ?>[cc_ss_start_month]" class="month">
|
| 58 |
<?php $_ccStartMonth = $this->getInfoData('cc_ss_start_month') ?>
|
| 59 |
<?php foreach ($this->getCcStartMonths() as $k=>$v): ?>
|
| 60 |
<option value="<?php echo $k?$k:'' ?>"<?php if($k==$_ccStartMonth): ?> selected="selected"<?php endif ?>><?php echo $v ?></option>
|
| 63 |
</div>
|
| 64 |
<div class="v-fix" style="padding-left:5px;">
|
| 65 |
<?php $_ccStartYear = $this->getInfoData('cc_ss_start_year') ?>
|
| 66 |
+
<select id="<?php echo $_code ?>_cc_ss_start_year" name="payment<?php echo $fieldCode; ?>[cc_ss_start_year]" class="year">
|
| 67 |
<?php foreach ($this->getCcStartYears() as $k=>$v): ?>
|
| 68 |
<option value="<?php echo $k?$k:'' ?>"<?php if($k==$_ccStartYear): ?> selected="selected"<?php endif ?>><?php echo $v ?></option>
|
| 69 |
<?php endforeach ?>
|
| 74 |
<li>
|
| 75 |
<div class="input-box">
|
| 76 |
<label for="<?php echo $_code; ?>_cc_ss_issue"><?php echo $this->__('Issue Number') ?></label><br />
|
| 77 |
+
<div class="v-fix"><input type="text" title="<?php echo $this->__('Issue Number') ?>" class="input-text" style="width:50px;" id="<?php echo $_code ?>_cc_ss_issue" name="payment<?php echo $fieldCode; ?>[cc_ss_issue]" value="" /></div>
|
| 78 |
</div>
|
| 79 |
</li>
|
| 80 |
<li>
|
| 81 |
<div class="input-box">
|
| 82 |
<label for="<?php echo $_code; ?>_cc_cid"><?php echo $this->__('CV2') ?> <span class="required">*</span></label><br/>
|
| 83 |
+
<div class="v-fix"><input type="text" title="<?php echo $this->__('CV2') ?>" class="required-entry input-text" style="width:50px;" id="<?php echo $_code; ?>_cc_cid" name="payment<?php echo $fieldCode; ?>[cc_cid]" value=""/></div>
|
| 84 |
|
| 85 |
<a href="#" class="cvv-what-is-this"><?php echo $this->__('What is this?') ?></a>
|
| 86 |
</div>
|
app/design/frontend/default/default/template/tpg/form.phtml
CHANGED
|
@@ -1,7 +1,9 @@
|
|
| 1 |
<?php $direct = Mage::getModel('tpg/direct'); ?>
|
|
|
|
|
|
|
|
|
|
| 2 |
<?php if ($direct->getConfigData('mode') == Iridiumcorp_Tpg_Model_Source_PaymentMode::PAYMENT_MODE_HOSTED_PAYMENT_FORM) {?>
|
| 3 |
<fieldset class="form-list">
|
| 4 |
-
<?php $_code=$this->getMethodCode() ?>
|
| 5 |
<ul id="payment_form_<?php echo $_code ?>" style="display:none">
|
| 6 |
<li>
|
| 7 |
<img alt="<?php echo $this->__('Iridium Corporation Logo'); ?>" src="<?php echo $this->getSkinUrl('images/iridium_corporation.jpg'); ?>">
|
|
@@ -13,25 +15,24 @@
|
|
| 13 |
</fieldset>
|
| 14 |
<?php } else {?>
|
| 15 |
<fieldset class="form-list">
|
| 16 |
-
<?php $_code = $this->getMethodCode(); ?>
|
| 17 |
<ul id="payment_form_<?php echo $_code; ?>" style="display:none">
|
| 18 |
<li>
|
| 19 |
<div class="input-box">
|
| 20 |
<label for="<?php echo $_code; ?>_cc_owner"><?php echo $this->__('Name On Card') ?> <span class="required">*</span></label><br/>
|
| 21 |
-
<input type="text" title="<?php echo $this->__('Name On Card') ?>" class="required-entry input-text" id="<?php echo $_code; ?>_cc_owner" name="payment[cc_owner]" value="<?php echo $this->htmlEscape($this->getInfoData('cc_owner')) ?>"/>
|
| 22 |
</div>
|
| 23 |
</li>
|
| 24 |
<li>
|
| 25 |
<div class="input-box">
|
| 26 |
<label for="<?php echo $_code; ?>_cc_number"><?php echo $this->__('Card Number') ?> <span class="required">*</span></label><br/>
|
| 27 |
-
<input type="text" id="<?php echo $_code; ?>_cc_number" name="payment[cc_number]" title="<?php echo $this->__('Card Number') ?>" class="required-entry input-text" value=""/>
|
| 28 |
</div>
|
| 29 |
</li>
|
| 30 |
<li>
|
| 31 |
-
<
|
| 32 |
-
|
| 33 |
<div class="v-fix">
|
| 34 |
-
<select id="<?php echo $_code; ?>_expiration"
|
| 35 |
<?php $_ccExpMonth = $this->getInfoData('cc_exp_month') ?>
|
| 36 |
<?php foreach ($this->getCcMonths() as $k=>$v): ?>
|
| 37 |
<option value="<?php echo $k?$k:'' ?>" <?php if($k==$_ccExpMonth): ?> selected="selected"<?php endif ?>><?php echo $v ?></option>
|
|
@@ -39,9 +40,9 @@
|
|
| 39 |
</select>
|
| 40 |
</div>
|
| 41 |
|
| 42 |
-
<div class="v-fix"
|
| 43 |
<?php $_ccExpYear = $this->getInfoData('cc_exp_year') ?>
|
| 44 |
-
<select id="<?php echo $_code; ?>_expiration_yr"
|
| 45 |
<?php foreach ($this->getCcYears() as $k=>$v): ?>
|
| 46 |
<option value="<?php echo $k?$k:'' ?>" <?php if($k==$_ccExpYear): ?> selected="selected"<?php endif ?>><?php echo $v ?></option>
|
| 47 |
<?php endforeach ?>
|
|
@@ -50,19 +51,19 @@
|
|
| 50 |
</div>
|
| 51 |
</li>
|
| 52 |
<li>
|
| 53 |
-
|
| 54 |
-
|
| 55 |
<div class="v-fix">
|
| 56 |
-
<select id="<?php echo $_code; ?>_cc_ss_start_month"
|
| 57 |
<?php $_ccStartMonth = $this->getInfoData('cc_ss_start_month') ?>
|
| 58 |
<?php foreach ($this->getCcStartMonths() as $k=>$v): ?>
|
| 59 |
<option value="<?php echo $k?$k:'' ?>"<?php if($k==$_ccStartMonth): ?> selected="selected"<?php endif ?>><?php echo $v ?></option>
|
| 60 |
<?php endforeach ?>
|
| 61 |
</select>
|
| 62 |
</div>
|
| 63 |
-
<div class="v-fix"
|
| 64 |
<?php $_ccStartYear = $this->getInfoData('cc_ss_start_year') ?>
|
| 65 |
-
<select id="<?php echo $_code ?>_cc_ss_start_year"
|
| 66 |
<?php foreach ($this->getCcStartYears() as $k=>$v): ?>
|
| 67 |
<option value="<?php echo $k?$k:'' ?>"<?php if($k==$_ccStartYear): ?> selected="selected"<?php endif ?>><?php echo $v ?></option>
|
| 68 |
<?php endforeach ?>
|
|
@@ -73,13 +74,13 @@
|
|
| 73 |
<li>
|
| 74 |
<div class="input-box">
|
| 75 |
<label for="<?php echo $_code; ?>_cc_ss_issue"><?php echo $this->__('Issue Number') ?></label><br />
|
| 76 |
-
<div class="v-fix"><input type="text" title="<?php echo $this->__('Issue Number') ?>" class="input-text" id="<?php echo $_code ?>_cc_ss_issue" name="payment[cc_ss_issue]"
|
| 77 |
</div>
|
| 78 |
</li>
|
| 79 |
<li>
|
| 80 |
<div class="input-box">
|
| 81 |
<label for="<?php echo $_code; ?>_cc_cid"><?php echo $this->__('CV2') ?> <span class="required">*</span></label><br/>
|
| 82 |
-
<div class="v-fix"><input type="text" title="<?php echo $this->__('CV2') ?>" class="required-entry input-text" id="<?php echo $_code; ?>_cc_cid" name="payment[cc_cid]"
|
| 83 |
|
| 84 |
<a href="#" class="cvv-what-is-this"><?php echo $this->__('What is this?') ?></a>
|
| 85 |
</div>
|
| 1 |
<?php $direct = Mage::getModel('tpg/direct'); ?>
|
| 2 |
+
<?php $_code=$this->getMethodCode(); ?>
|
| 3 |
+
<?php $route = $this->getRequest()->getRequestedRouteName(); if($route == 'onestepcheckout'){ $fieldCode = '['.$_code.']'; } else { $fieldCode = ''; }?>
|
| 4 |
+
|
| 5 |
<?php if ($direct->getConfigData('mode') == Iridiumcorp_Tpg_Model_Source_PaymentMode::PAYMENT_MODE_HOSTED_PAYMENT_FORM) {?>
|
| 6 |
<fieldset class="form-list">
|
|
|
|
| 7 |
<ul id="payment_form_<?php echo $_code ?>" style="display:none">
|
| 8 |
<li>
|
| 9 |
<img alt="<?php echo $this->__('Iridium Corporation Logo'); ?>" src="<?php echo $this->getSkinUrl('images/iridium_corporation.jpg'); ?>">
|
| 15 |
</fieldset>
|
| 16 |
<?php } else {?>
|
| 17 |
<fieldset class="form-list">
|
|
|
|
| 18 |
<ul id="payment_form_<?php echo $_code; ?>" style="display:none">
|
| 19 |
<li>
|
| 20 |
<div class="input-box">
|
| 21 |
<label for="<?php echo $_code; ?>_cc_owner"><?php echo $this->__('Name On Card') ?> <span class="required">*</span></label><br/>
|
| 22 |
+
<input type="text" title="<?php echo $this->__('Name On Card') ?>" class="required-entry input-text" id="<?php echo $_code; ?>_cc_owner" name="payment<?php echo $fieldCode; ?>[cc_owner]" value="<?php echo $this->htmlEscape($this->getInfoData('cc_owner')) ?>"/>
|
| 23 |
</div>
|
| 24 |
</li>
|
| 25 |
<li>
|
| 26 |
<div class="input-box">
|
| 27 |
<label for="<?php echo $_code; ?>_cc_number"><?php echo $this->__('Card Number') ?> <span class="required">*</span></label><br/>
|
| 28 |
+
<input type="text" id="<?php echo $_code; ?>_cc_number" name="payment<?php echo $fieldCode; ?>[cc_number]" title="<?php echo $this->__('Card Number') ?>" class="required-entry input-text" value=""/>
|
| 29 |
</div>
|
| 30 |
</li>
|
| 31 |
<li>
|
| 32 |
+
<label for="<?php echo $_code; ?>_expiration"><?php echo $this->__('Expiry Date') ?> <span class="required">*</span></label><br/>
|
| 33 |
+
<div class="input-box">
|
| 34 |
<div class="v-fix">
|
| 35 |
+
<select id="<?php echo $_code; ?>_expiration" name="payment<?php echo $fieldCode; ?>[cc_exp_month]" class="month validate-cc-exp required-entry">
|
| 36 |
<?php $_ccExpMonth = $this->getInfoData('cc_exp_month') ?>
|
| 37 |
<?php foreach ($this->getCcMonths() as $k=>$v): ?>
|
| 38 |
<option value="<?php echo $k?$k:'' ?>" <?php if($k==$_ccExpMonth): ?> selected="selected"<?php endif ?>><?php echo $v ?></option>
|
| 40 |
</select>
|
| 41 |
</div>
|
| 42 |
|
| 43 |
+
<div class="v-fix">
|
| 44 |
<?php $_ccExpYear = $this->getInfoData('cc_exp_year') ?>
|
| 45 |
+
<select id="<?php echo $_code; ?>_expiration_yr" name="payment<?php echo $fieldCode; ?>[cc_exp_year]" class="year required-entry">
|
| 46 |
<?php foreach ($this->getCcYears() as $k=>$v): ?>
|
| 47 |
<option value="<?php echo $k?$k:'' ?>" <?php if($k==$_ccExpYear): ?> selected="selected"<?php endif ?>><?php echo $v ?></option>
|
| 48 |
<?php endforeach ?>
|
| 51 |
</div>
|
| 52 |
</li>
|
| 53 |
<li>
|
| 54 |
+
<label for="<?php echo $_code; ?>_cc_ss_start_month"><?php echo $this->__('Start Date') ?></label><br />
|
| 55 |
+
<div class="input-box">
|
| 56 |
<div class="v-fix">
|
| 57 |
+
<select id="<?php echo $_code; ?>_cc_ss_start_month" name="payment<?php echo $fieldCode; ?>[cc_ss_start_month]" class="month">
|
| 58 |
<?php $_ccStartMonth = $this->getInfoData('cc_ss_start_month') ?>
|
| 59 |
<?php foreach ($this->getCcStartMonths() as $k=>$v): ?>
|
| 60 |
<option value="<?php echo $k?$k:'' ?>"<?php if($k==$_ccStartMonth): ?> selected="selected"<?php endif ?>><?php echo $v ?></option>
|
| 61 |
<?php endforeach ?>
|
| 62 |
</select>
|
| 63 |
</div>
|
| 64 |
+
<div class="v-fix">
|
| 65 |
<?php $_ccStartYear = $this->getInfoData('cc_ss_start_year') ?>
|
| 66 |
+
<select id="<?php echo $_code ?>_cc_ss_start_year" name="payment<?php echo $fieldCode; ?>[cc_ss_start_year]" class="year">
|
| 67 |
<?php foreach ($this->getCcStartYears() as $k=>$v): ?>
|
| 68 |
<option value="<?php echo $k?$k:'' ?>"<?php if($k==$_ccStartYear): ?> selected="selected"<?php endif ?>><?php echo $v ?></option>
|
| 69 |
<?php endforeach ?>
|
| 74 |
<li>
|
| 75 |
<div class="input-box">
|
| 76 |
<label for="<?php echo $_code; ?>_cc_ss_issue"><?php echo $this->__('Issue Number') ?></label><br />
|
| 77 |
+
<div class="v-fix"><input type="text" title="<?php echo $this->__('Issue Number') ?>" class="input-text" style="width:50px;" id="<?php echo $_code ?>_cc_ss_issue" name="payment<?php echo $fieldCode; ?>[cc_ss_issue]" value="" /></div>
|
| 78 |
</div>
|
| 79 |
</li>
|
| 80 |
<li>
|
| 81 |
<div class="input-box">
|
| 82 |
<label for="<?php echo $_code; ?>_cc_cid"><?php echo $this->__('CV2') ?> <span class="required">*</span></label><br/>
|
| 83 |
+
<div class="v-fix"><input type="text" title="<?php echo $this->__('CV2') ?>" class="required-entry input-text" style="width:50px;" id="<?php echo $_code; ?>_cc_cid" name="payment<?php echo $fieldCode; ?>[cc_cid]" value=""/></div>
|
| 84 |
|
| 85 |
<a href="#" class="cvv-what-is-this"><?php echo $this->__('What is this?') ?></a>
|
| 86 |
</div>
|
package.xml
CHANGED
|
@@ -1,20 +1,19 @@
|
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
<package>
|
| 3 |
<name>Iridiumcorp_Tpg</name>
|
| 4 |
-
<version>1.
|
| 5 |
<stability>stable</stability>
|
| 6 |
<license>OSL v3.0</license>
|
| 7 |
<channel>community</channel>
|
| 8 |
<extends/>
|
| 9 |
-
<summary>Iridiumcorp payment extension compatible with Magento
|
| 10 |
<description>Fully supports 3D secure transactions. Also supports all of the integration methods provided by Iridiumcorp.</description>
|
| 11 |
-
<notes>
|
| 12 |
-
|
| 13 |
-
base/default theme path applied for v1.4 compatibility</notes>
|
| 14 |
<authors><author><name>benjib98</name><user>auto-converted</user><email>support@iridiumcorp.co.uk</email></author></authors>
|
| 15 |
-
<date>2011-
|
| 16 |
-
<time>
|
| 17 |
-
<contents><target name="
|
| 18 |
<compatible/>
|
| 19 |
<dependencies/>
|
| 20 |
</package>
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
<package>
|
| 3 |
<name>Iridiumcorp_Tpg</name>
|
| 4 |
+
<version>1.12.0</version>
|
| 5 |
<stability>stable</stability>
|
| 6 |
<license>OSL v3.0</license>
|
| 7 |
<channel>community</channel>
|
| 8 |
<extends/>
|
| 9 |
+
<summary>Iridiumcorp payment extension compatible with Magento v 1.3, 1.4, 1.5</summary>
|
| 10 |
<description>Fully supports 3D secure transactions. Also supports all of the integration methods provided by Iridiumcorp.</description>
|
| 11 |
+
<notes>Added CrossReference to each transaction stored in the additional_data column of the sales_flat_order_payment table.
|
| 12 |
+
Added SQL script to create custom order statuses for installations under Magento v1.5 and above.</notes>
|
|
|
|
| 13 |
<authors><author><name>benjib98</name><user>auto-converted</user><email>support@iridiumcorp.co.uk</email></author></authors>
|
| 14 |
+
<date>2011-04-04</date>
|
| 15 |
+
<time>16:33:28</time>
|
| 16 |
+
<contents><target name="mageskin"><dir name="frontend"><dir name="default"><dir name="default"><dir name="images"><file name="iridium_corporation.jpg" hash="589faaa1b7e80b32a425175ecfc3b455"/></dir></dir></dir><dir name="base"><dir name="default"><dir name="images"><file name="iridium_corporation.jpg" hash="589faaa1b7e80b32a425175ecfc3b455"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="tpg"><file name="form.phtml" hash="769856c926b394465359ac1a5d66e189"/><file name="info.phtml" hash="3164afadd87c4811b5f7d0879537f10e"/></dir></dir></dir></dir><dir name="base"><dir name="default"><dir name="template"><dir name="tpg"><file name="form.phtml" hash="b53f59851a6b8c7ec727fb4734837b34"/><file name="info.phtml" hash="3164afadd87c4811b5f7d0879537f10e"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="default"><dir name="default"><dir name="template"><dir name="tpg"><file name="form.phtml" hash="d6a451b03746c92bf1c4f2d827d66e79"/><file name="info.phtml" hash="7d72d07f3afa018d0402219e50573439"/></dir></dir></dir></dir><dir name="base"><dir name="default"><dir name="template"><dir name="tpg"><file name="form.phtml" hash="a24df4cbcb6bfba8269facd75a3247be"/><file name="info.phtml" hash="7d72d07f3afa018d0402219e50573439"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Iridiumcorp_All.xml" hash="f1a85eaa7631af1906f461b662519732"/></dir></target><target name="magelocal"><dir name="Iridiumcorp"><dir name="Tpg"><dir name="Block"><file name="Error.php" hash="905367210beb53a0bc68dc6033e24127"/><file name="Form.php" hash="4b1d51aa84982486f3139510c41a221a"/><file name="Info.php" hash="f88445c4880bfe14914252bc76b6fc28"/><file name="Redirect.php" hash="a91a8a8f8b5ad887ed2cdd8d52732b8b"/><file name="Threedsecure.php" hash="5e753e1e1bbf0ada18f7292d4031da97"/></dir><dir name="controllers"><file name="PaymentController.php" hash="397c199299971205fca325a4607920ac"/></dir><dir name="etc"><file name="config.xml" hash="a22141f14f4b641de6088d0ead20ba49"/><file name="system.xml" hash="13531b8280be72392ae8abbd47f00adf"/></dir><dir name="Helper"><file name="Data.php" hash="a72fba87e718c94d993a57199e20ca96"/></dir><dir name="Model"><dir name="Common"><dir name="ThePaymentGateway"><file name="PaymentSystem.php" hash="4ad38bdb85f865e967153d9f253390cd"/><file name="SOAP.php" hash="504dcb0cb7c60c134b25652881349cc3"/><file name="TPG_Common.php" hash="df1033ef855c7e0e715076a105acb84a"/></dir><file name="GlobalErrors.php" hash="a9c7bab60ebfe87967c794194e1e7208"/><file name="ISOCountries.php" hash="fc63d76fbe25458ba351f114782074cb"/><file name="ISOCurrencies.php" hash="89ac1e124e89c0713ef43a0cf6dd0e2b"/><file name="PaymentFormHelper.php" hash="d1a9cb006cafdb13c2d368620630aaf3"/></dir><dir name="Source"><file name="HashMethod.php" hash="36d7fb4fc762feae459f0e67d51006f4"/><file name="OrderStatus.php" hash="95eb926db39d4afeb26784a9396f7b18"/><file name="PaymentAction.php" hash="bd8dc40852b9ff8c80c08fc01f35a988"/><file name="PaymentMode.php" hash="6849defade8a7da4cfaeff3227ae5b83"/><file name="ResultDeliveryMethod.php" hash="05f3806f2ff4bd5b1568bfb1681b2242"/></dir><dir name="Resource"><dir name="Eav"><dir name="Mysql4"><file name="Setup.php" hash="d75ce704c7f0161f0bea4aa780679af8"/></dir></dir></dir><file name="Direct.php" hash="19664be15d9201da0e50b89a5366cd6a"/><file name="Request.php" hash="a96e462ed3c1882048ea45f2c3a6662c"/></dir><dir name="sql"><dir name="iridiumcorp_tpg_setup"><file name="mysql4-install-0.1.0.php" hash="caa171da509234f450886c134b212f76"/></dir></dir></dir><dir name="Checkout"><dir name="Block"><dir name="Onepage"><dir name="Payment"><file name="Methods.php" hash="47de7ef027476c184a01f6c249a56065"/></dir></dir></dir><dir name="etc"><file name="config.xml" hash="aaa95b6e1d6e145940bf9ba9bbe1dc0f"/></dir><dir name="Model"><dir name="Type"><file name="Onepage.php" hash="8d4eba732d98062a7a326cc2b0102b9b"/></dir></dir></dir><dir name="Sales"><dir name="etc"><file name="config.xml" hash="6e5a6db08b9bbaf959ec31a20ec5ffc2"/></dir><dir name="Model"><dir name="Order"><file name="Invoice.php" hash="1d4318c7b307f40b4a208dcb116fa14b"/><file name="Payment.php" hash="cd56b85013bbae52bb9bfe1984721045"/></dir><dir name="Service"><file name="Quote.php" hash="d1b341b13a74ea6db2b87f098b4caf9a"/></dir><file name="Order.php" hash="a57c4bd661dbc322d5bd18aa2f51dd67"/></dir></dir></dir></target></contents>
|
| 17 |
<compatible/>
|
| 18 |
<dependencies/>
|
| 19 |
</package>
|
