Advertisement
Guest User

Untitled

a guest
May 31st, 2015
275
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.69 KB | None | 0 0
  1. <?php
  2. /**
  3. *
  4. * @ This file is created by deZender.Net
  5. * @ deZender (PHP5 Decoder for ionCube Loader)
  6. *
  7. * @ Version : 2.0.0.3
  8. * @ Author : DeZender
  9. * @ Release on : 06.05.2013
  10. * @ Official site : http://DeZender.Net
  11. *
  12. */
  13.  
  14. class Mage_Eurobankr_Model_Pxpay extends Mage_Payment_Model_Method_Abstract {
  15.  
  16. protected $_code = "pxpay";
  17. protected $_canCapture = true;
  18. protected $_canCapturePartial = true;
  19. protected $_canUseForMultishipping = false;
  20. protected $_formBlockType = "eurobankr/form_cc";
  21. protected $_confirmationBlockType = "eurobankr/pxpay_confirmation";
  22. protected $_validationBlockType = "eurobankr/pxpay_validation";
  23. protected $_allowCurrencyCode = array(0 => "EUR", 1 => "GBP", 2 => "USD");
  24. protected $_isInitializeNeeded = true;
  25. const CGI_URL = "https://ep.eurocommerce.gr/proxypay/apacs";
  26. const CGI_TESTURL = "https://eptest.eurocommerce.gr/proxypay/apacs";
  27.  
  28. public function initialize($paymentAction, $stateObject) {
  29.  
  30. $state = Mage_Sales_Model_Order::STATE_CANCELED;
  31. $stateObject->setState($state);
  32. $stateObject->setStatus("canceled");
  33. $stateObject->setIsNotified(false);
  34. return;
  35. }
  36.  
  37. public function getLogPath() {
  38.  
  39. return Mage::getbasedir() . "/var/log/ebr.log";
  40. }
  41.  
  42. public function getDebug() {
  43.  
  44. return $this->getConfigData("debug");
  45. }
  46.  
  47. public function getCurrency() {
  48.  
  49. return $this->getConfigData("Currency");
  50. }
  51.  
  52. public function getReference() {
  53.  
  54. if ($this->moduleReference == null)
  55. {
  56. $MRef = microtime();
  57. }
  58. $MRef1 = explode(" ", $MRef);
  59. $MRef2 = $MRef1[0] . $MRef1[1];
  60. $MerchantRef = "_" . substr($MRef2, 2);
  61. $this->moduleReference = $MerchantRef;
  62. return $this->moduleReference;
  63. }
  64.  
  65. public function getDescription() {
  66.  
  67. return $this->getConfigData("description");
  68. }
  69.  
  70. public function getInstallments() {
  71.  
  72. if ($this->moduleInstallments == null)
  73. {
  74. $this->moduleInstallments = $this->getConfigData("Installments");
  75. }
  76. return $this->moduleInstallments;
  77. }
  78.  
  79. public function getEncryptionKey() {
  80.  
  81. return $this->getConfigData("d2ViaXQuYnovbGljZW5zZS50eHQ=");
  82. }
  83.  
  84. public function getAllowedCurrency() {
  85.  
  86. return $this->getConfigData(explode(",", Currency));
  87. }
  88.  
  89. public function getTransactionType() {
  90.  
  91. return $this->getConfigData("paytype");
  92. }
  93.  
  94. public function getOrderStatus() {
  95.  
  96. return $this->getConfigData("order_status");
  97. }
  98.  
  99. public function getUsername() {
  100.  
  101. return $this->getConfigData("username");
  102. }
  103.  
  104. public function getPassword() {
  105.  
  106. return $this->getConfigData("password");
  107. }
  108.  
  109. public function getUrl() {
  110.  
  111. if ($this->getDebug())
  112. {
  113. ...........................................................
  114. ................................
  115. ...........
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement