Version Notes
Resolved issue with PHP-version.
Download this release
Release Info
Developer | Oscar Villegas |
Extension | Payson |
Version | 1.8.3.4 |
Comparing to | |
See all releases |
Code changes from version 1.8.3.3 to 1.8.3.4
- app/code/community/Payson/Payson/Helper/Api.php +6 -7
- app/code/community/Payson/Payson/Helper/FundingConstraint.php +35 -35
- app/code/community/Payson/Payson/Model/Method/Abstract.php +148 -148
- app/code/community/Payson/Payson/Model/Method/Invoice.php +65 -65
- app/code/community/Payson/Payson/Model/Order/Invoice/Total/Invoice.php +8 -8
- app/code/community/Payson/Payson/Model/Order/Invoice/Total/Invoice.php.bak +0 -48
- app/code/community/Payson/Payson/controllers/Adminhtml/Sales/Order/ShipmentController.php +1 -3
- app/code/community/Payson/Payson/controllers/CheckoutController.php +238 -240
- app/code/community/Payson/Payson/etc/config.xml +167 -167
- app/code/community/Payson/Payson/etc/system.xml +166 -166
- app/design/adminhtml/default/default/template/Payson/Payson/total.phtml +11 -11
- app/design/frontend/base/default/layout/Payson.xml +45 -45
- app/etc/modules/Payson_Payson.xml +14 -14
- package.xml +9 -9
- skin/frontend/base/default/Payson/Payson/Allinone.png +0 -0
- skin/frontend/base/default/Payson/Payson/Allinone3.png +0 -0
- skin/frontend/base/default/Payson/Payson/payson.png +0 -0
app/code/community/Payson/Payson/Helper/Api.php
CHANGED
@@ -153,7 +153,7 @@ class Payson_Payson_Helper_Api {
|
|
153 |
$total -= $item->getDiscountAmount();
|
154 |
$numberOfItem = floor($order->getData('total_qty_ordered'));
|
155 |
$items = 0;
|
156 |
-
|
157 |
$discountAmount = $item->getDiscountAmount();
|
158 |
for ($i = 0; $i <= $numberOfItem; $i++) {
|
159 |
$orderVat = $orderitems['orderItemList.orderItem(' . $i . ').taxPercentage'];
|
@@ -207,17 +207,17 @@ class Payson_Payson_Helper_Api {
|
|
207 |
$product = $this->getProductOptions($item->getProductId());
|
208 |
|
209 |
if ($item->getProductType() != 'bundle'||$product->getPriceType() == Mage_Bundle_Model_Product_Price::PRICE_TYPE_DYNAMIC) {
|
210 |
-
|
211 |
}
|
212 |
foreach ($children as $child) {
|
213 |
$this->prepareOrderItemData($child, $total, $order);
|
214 |
}
|
215 |
//checks if there are bundles items is present and if it is dynamic
|
216 |
if (($quoteItems->getSize() < 1)) {
|
217 |
-
|
218 |
} elseif ($product->getPriceType() == Mage_Bundle_Model_Product_Price::PRICE_TYPE_DYNAMIC && $item->getProductType() == 'bundle') {
|
219 |
return;
|
220 |
-
|
221 |
}
|
222 |
|
223 |
$productOptions = $item->getProductOptions();
|
@@ -476,7 +476,6 @@ class Payson_Payson_Helper_Api {
|
|
476 |
|
477 |
// Calculate price of each item in the order
|
478 |
$total = 0;
|
479 |
-
|
480 |
foreach ($order->getAllVisibleItems() as $item) {
|
481 |
$this->prepareOrderItemData($item, $total, $order);
|
482 |
}
|
@@ -486,7 +485,6 @@ class Payson_Payson_Helper_Api {
|
|
486 |
if ($this->getStoreCountry() == 'SE' && $customerCountry == 'SE' && $this->vatDiscount() == 'true') {
|
487 |
|
488 |
foreach ($order->getAllVisibleItems() as $item) {
|
489 |
-
|
490 |
$this->setSwedishDiscountItem($item, $total, $productItems, $order);
|
491 |
}
|
492 |
if ($this->order_discount_item > 0) {
|
@@ -508,13 +506,14 @@ class Payson_Payson_Helper_Api {
|
|
508 |
|
509 |
foreach ($order->getAllVisibleItems() as $item) {
|
510 |
$this->setInternationalDiscountItem($item, $total);
|
511 |
-
}
|
512 |
|
513 |
if ($this->order_discount_item > 0) {
|
514 |
$this->prepareProductData('discount', 'discount', 1, -$this->order_discount_item, 0.0);
|
515 |
}
|
516 |
}
|
517 |
//
|
|
|
518 |
// Calculate price for shipping
|
519 |
$this->prepareOrderShippingData($order, $customer, $store, $total);
|
520 |
$args = $this->generateProductDataForPayson($args);
|
153 |
$total -= $item->getDiscountAmount();
|
154 |
$numberOfItem = floor($order->getData('total_qty_ordered'));
|
155 |
$items = 0;
|
156 |
+
|
157 |
$discountAmount = $item->getDiscountAmount();
|
158 |
for ($i = 0; $i <= $numberOfItem; $i++) {
|
159 |
$orderVat = $orderitems['orderItemList.orderItem(' . $i . ').taxPercentage'];
|
207 |
$product = $this->getProductOptions($item->getProductId());
|
208 |
|
209 |
if ($item->getProductType() != 'bundle'||$product->getPriceType() == Mage_Bundle_Model_Product_Price::PRICE_TYPE_DYNAMIC) {
|
210 |
+
$this->prepareProductData($item->getName(), $item->getSku(), $item->getQtyOrdered(), 0, 0);
|
211 |
}
|
212 |
foreach ($children as $child) {
|
213 |
$this->prepareOrderItemData($child, $total, $order);
|
214 |
}
|
215 |
//checks if there are bundles items is present and if it is dynamic
|
216 |
if (($quoteItems->getSize() < 1)) {
|
217 |
+
return;
|
218 |
} elseif ($product->getPriceType() == Mage_Bundle_Model_Product_Price::PRICE_TYPE_DYNAMIC && $item->getProductType() == 'bundle') {
|
219 |
return;
|
220 |
+
}
|
221 |
}
|
222 |
|
223 |
$productOptions = $item->getProductOptions();
|
476 |
|
477 |
// Calculate price of each item in the order
|
478 |
$total = 0;
|
|
|
479 |
foreach ($order->getAllVisibleItems() as $item) {
|
480 |
$this->prepareOrderItemData($item, $total, $order);
|
481 |
}
|
485 |
if ($this->getStoreCountry() == 'SE' && $customerCountry == 'SE' && $this->vatDiscount() == 'true') {
|
486 |
|
487 |
foreach ($order->getAllVisibleItems() as $item) {
|
|
|
488 |
$this->setSwedishDiscountItem($item, $total, $productItems, $order);
|
489 |
}
|
490 |
if ($this->order_discount_item > 0) {
|
506 |
|
507 |
foreach ($order->getAllVisibleItems() as $item) {
|
508 |
$this->setInternationalDiscountItem($item, $total);
|
509 |
+
}
|
510 |
|
511 |
if ($this->order_discount_item > 0) {
|
512 |
$this->prepareProductData('discount', 'discount', 1, -$this->order_discount_item, 0.0);
|
513 |
}
|
514 |
}
|
515 |
//
|
516 |
+
|
517 |
// Calculate price for shipping
|
518 |
$this->prepareOrderShippingData($order, $customer, $store, $total);
|
519 |
$args = $this->generateProductDataForPayson($args);
|
app/code/community/Payson/Payson/Helper/FundingConstraint.php
CHANGED
@@ -1,36 +1,36 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class FundingConstraint {
|
4 |
-
|
5 |
-
const NONE = 0;
|
6 |
-
const CREDITCARD = 1;
|
7 |
-
const BANK = 2;
|
8 |
-
const INVOICE = 3;
|
9 |
-
const SMS = 4;
|
10 |
-
|
11 |
-
public static function addConstraintsToOutput($fundingConstraints, &$output) {
|
12 |
-
$formatString = "fundingList.fundingConstraint(%d).constraint";
|
13 |
-
|
14 |
-
$i = 0;
|
15 |
-
foreach ($fundingConstraints as $constraint) {
|
16 |
-
if ($constraint != self::NONE) {
|
17 |
-
$output[sprintf($formatString, $i)] = self::ConstantToString($constraint);
|
18 |
-
$i++;
|
19 |
-
}
|
20 |
-
}
|
21 |
-
}
|
22 |
-
|
23 |
-
public static function ConstantToString($value) {
|
24 |
-
switch ($value) {
|
25 |
-
case self::BANK:
|
26 |
-
return "BANK";
|
27 |
-
case self::CREDITCARD:
|
28 |
-
return "CREDITCARD";
|
29 |
-
case self::INVOICE:
|
30 |
-
return "INVOICE";
|
31 |
-
case self::SMS:
|
32 |
-
return "SMS";
|
33 |
-
}
|
34 |
-
}
|
35 |
-
|
36 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class FundingConstraint {
|
4 |
+
|
5 |
+
const NONE = 0;
|
6 |
+
const CREDITCARD = 1;
|
7 |
+
const BANK = 2;
|
8 |
+
const INVOICE = 3;
|
9 |
+
const SMS = 4;
|
10 |
+
|
11 |
+
public static function addConstraintsToOutput($fundingConstraints, &$output) {
|
12 |
+
$formatString = "fundingList.fundingConstraint(%d).constraint";
|
13 |
+
|
14 |
+
$i = 0;
|
15 |
+
foreach ($fundingConstraints as $constraint) {
|
16 |
+
if ($constraint != self::NONE) {
|
17 |
+
$output[sprintf($formatString, $i)] = self::ConstantToString($constraint);
|
18 |
+
$i++;
|
19 |
+
}
|
20 |
+
}
|
21 |
+
}
|
22 |
+
|
23 |
+
public static function ConstantToString($value) {
|
24 |
+
switch ($value) {
|
25 |
+
case self::BANK:
|
26 |
+
return "BANK";
|
27 |
+
case self::CREDITCARD:
|
28 |
+
return "CREDITCARD";
|
29 |
+
case self::INVOICE:
|
30 |
+
return "INVOICE";
|
31 |
+
case self::SMS:
|
32 |
+
return "SMS";
|
33 |
+
}
|
34 |
+
}
|
35 |
+
|
36 |
}
|
app/code/community/Payson/Payson/Model/Method/Abstract.php
CHANGED
@@ -1,148 +1,148 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
abstract class Payson_Payson_Model_Method_Abstract extends Mage_Payment_Model_Method_Abstract {
|
4 |
-
|
5 |
-
/**
|
6 |
-
* @inheritDoc
|
7 |
-
*/
|
8 |
-
protected $_isGateway = false;
|
9 |
-
protected $_canAuthorize = false;
|
10 |
-
protected $_canCapture = false;
|
11 |
-
protected $_canCapturePartial = false;
|
12 |
-
protected $_canRefund = false;
|
13 |
-
protected $_canRefundInvoicePartial = false;
|
14 |
-
protected $_canVoid = false;
|
15 |
-
protected $_canUseInternal = false; // true
|
16 |
-
protected $_canUseCheckout = true; // true
|
17 |
-
protected $_canUseForMultishipping = false; // true
|
18 |
-
protected $_isInitializeNeeded = false;
|
19 |
-
protected $_canFetchTransactionInfo = false;
|
20 |
-
protected $_canReviewPayment = false;
|
21 |
-
protected $_canCreateBillingAgreement = false;
|
22 |
-
protected $_canManageRecurringProfiles = false; // true
|
23 |
-
|
24 |
-
/**
|
25 |
-
* @inheritDoc
|
26 |
-
*/
|
27 |
-
protected $_canCancelInvoice = true;
|
28 |
-
|
29 |
-
/*
|
30 |
-
* Protected methods
|
31 |
-
*/
|
32 |
-
|
33 |
-
protected function GetCheckout() {
|
34 |
-
return Mage::getSingleton('checkout/session');
|
35 |
-
}
|
36 |
-
|
37 |
-
protected function GetQuote() {
|
38 |
-
return $this->GetCheckout()->getQuote();
|
39 |
-
}
|
40 |
-
|
41 |
-
/*
|
42 |
-
* Public methods
|
43 |
-
*/
|
44 |
-
|
45 |
-
/**
|
46 |
-
* Redirect url when user place order
|
47 |
-
*
|
48 |
-
* @return string
|
49 |
-
*/
|
50 |
-
public function getOrderPlaceRedirectUrl() {
|
51 |
-
return Mage::getUrl('payson/checkout/redirect', array('_secure' => true));
|
52 |
-
}
|
53 |
-
|
54 |
-
/**
|
55 |
-
* @inheritDoc
|
56 |
-
*/
|
57 |
-
/* public function initialize($payment_action, $state_object)
|
58 |
-
{
|
59 |
-
$state_object->setState(Mage_Sales_Model_Order::STATE_PENDING_PAYMENT);
|
60 |
-
$state_object->setStatus(Mage_Sales_Model_Order::STATE_PENDING_PAYMENT);
|
61 |
-
$state_object->setIsNotified(false);
|
62 |
-
|
63 |
-
return $this;
|
64 |
-
} */
|
65 |
-
|
66 |
-
/**
|
67 |
-
* Whether this paymend method is available for specified currency
|
68 |
-
*
|
69 |
-
* @param string $currency
|
70 |
-
* @return bool
|
71 |
-
*/
|
72 |
-
public function canUseForCurrency($currency) {
|
73 |
-
return Mage::getModel('payson/config')->IsCurrencySupported(Mage::app()->getStore()->getCurrentCurrencyCode());
|
74 |
-
}
|
75 |
-
|
76 |
-
/**
|
77 |
-
* @inheritDoc
|
78 |
-
*/
|
79 |
-
public function refund(Varien_Object $payment, $amount) {
|
80 |
-
|
81 |
-
/* @var $order Mage_Sales_Model_Order */
|
82 |
-
$order = $payment->getOrder();
|
83 |
-
|
84 |
-
$method = $payment->getMethod();
|
85 |
-
|
86 |
-
if ($order->getBaseGrandTotal() != $amount) {
|
87 |
-
Mage::throwException('Invalid amount');
|
88 |
-
}
|
89 |
-
|
90 |
-
$helper = Mage::helper('payson');
|
91 |
-
$order_id = $order->getData('increment_id');
|
92 |
-
$api = Mage::helper('payson/api');
|
93 |
-
if ($method == "payson_standard") {
|
94 |
-
$paysonPaymethod = $method;
|
95 |
-
}if ($method == "payson_invoice") {
|
96 |
-
$paysonPaymethod = $method;
|
97 |
-
}
|
98 |
-
$api->PaymentUpdate($order_id, $paysonPaymethod ?
|
99 |
-
Payson_Payson_Helper_Api::UPDATE_ACTION_CREDITORDER :
|
100 |
-
Payson_Payson_Helper_Api::UPDATE_ACTION_REFUNDORDER);
|
101 |
-
|
102 |
-
$order->addStatusHistoryComment($helper->__(
|
103 |
-
'Payment was credited at Payson'));
|
104 |
-
|
105 |
-
return $this;
|
106 |
-
}
|
107 |
-
|
108 |
-
/**
|
109 |
-
* @inheritDoc
|
110 |
-
*/
|
111 |
-
public function void(Varien_Object $payment) {
|
112 |
-
$payment->setTransactionId('auth')
|
113 |
-
->setIsTransactionClosed(0);
|
114 |
-
return $this;
|
115 |
-
}
|
116 |
-
|
117 |
-
/**
|
118 |
-
* @inheritDoc
|
119 |
-
*/
|
120 |
-
public function cancel(Varien_Object $payment) {
|
121 |
-
$order = $payment->getOrder();
|
122 |
-
$order_id = $order->getData('increment_id');
|
123 |
-
|
124 |
-
$api = Mage::helper('payson/api');
|
125 |
-
$helper = Mage::helper('payson');
|
126 |
-
$api->PaymentDetails($order_id);
|
127 |
-
$details = $api->GetResponse();
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
if (($details->type === Payson_Payson_Helper_Api::PAYMENT_METHOD_INVOICE) ||
|
132 |
-
($details->invoiceStatus === Payson_Payson_Helper_Api::INVOICE_STATUS_ORDERCREATED) ||
|
133 |
-
($details->type !== Payson_Payson_Helper_Api::PAYMENT_METHOD_INVOICE && $details->status === Payson_Payson_Helper_Api::STATUS_CREATED) ||
|
134 |
-
$order->getState() === Mage_Sales_Model_Order::STATE_PROCESSING) {
|
135 |
-
$api->PaymentUpdate($order_id, Payson_Payson_Helper_Api::UPDATE_ACTION_CANCELORDER);
|
136 |
-
|
137 |
-
$order->addStatusHistoryComment($helper->__(
|
138 |
-
'Order was canceled at Payson'));
|
139 |
-
|
140 |
-
$payment->setTransactionId('auth')
|
141 |
-
->setIsTransactionClosed(1);
|
142 |
-
} else {
|
143 |
-
Mage::throwException($helper->__('Payson is not ready to cancel the order. Please try again later.'));
|
144 |
-
}
|
145 |
-
return $this;
|
146 |
-
}
|
147 |
-
|
148 |
-
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
abstract class Payson_Payson_Model_Method_Abstract extends Mage_Payment_Model_Method_Abstract {
|
4 |
+
|
5 |
+
/**
|
6 |
+
* @inheritDoc
|
7 |
+
*/
|
8 |
+
protected $_isGateway = false;
|
9 |
+
protected $_canAuthorize = false;
|
10 |
+
protected $_canCapture = false;
|
11 |
+
protected $_canCapturePartial = false;
|
12 |
+
protected $_canRefund = false;
|
13 |
+
protected $_canRefundInvoicePartial = false;
|
14 |
+
protected $_canVoid = false;
|
15 |
+
protected $_canUseInternal = false; // true
|
16 |
+
protected $_canUseCheckout = true; // true
|
17 |
+
protected $_canUseForMultishipping = false; // true
|
18 |
+
protected $_isInitializeNeeded = false;
|
19 |
+
protected $_canFetchTransactionInfo = false;
|
20 |
+
protected $_canReviewPayment = false;
|
21 |
+
protected $_canCreateBillingAgreement = false;
|
22 |
+
protected $_canManageRecurringProfiles = false; // true
|
23 |
+
|
24 |
+
/**
|
25 |
+
* @inheritDoc
|
26 |
+
*/
|
27 |
+
protected $_canCancelInvoice = true;
|
28 |
+
|
29 |
+
/*
|
30 |
+
* Protected methods
|
31 |
+
*/
|
32 |
+
|
33 |
+
protected function GetCheckout() {
|
34 |
+
return Mage::getSingleton('checkout/session');
|
35 |
+
}
|
36 |
+
|
37 |
+
protected function GetQuote() {
|
38 |
+
return $this->GetCheckout()->getQuote();
|
39 |
+
}
|
40 |
+
|
41 |
+
/*
|
42 |
+
* Public methods
|
43 |
+
*/
|
44 |
+
|
45 |
+
/**
|
46 |
+
* Redirect url when user place order
|
47 |
+
*
|
48 |
+
* @return string
|
49 |
+
*/
|
50 |
+
public function getOrderPlaceRedirectUrl() {
|
51 |
+
return Mage::getUrl('payson/checkout/redirect', array('_secure' => true));
|
52 |
+
}
|
53 |
+
|
54 |
+
/**
|
55 |
+
* @inheritDoc
|
56 |
+
*/
|
57 |
+
/* public function initialize($payment_action, $state_object)
|
58 |
+
{
|
59 |
+
$state_object->setState(Mage_Sales_Model_Order::STATE_PENDING_PAYMENT);
|
60 |
+
$state_object->setStatus(Mage_Sales_Model_Order::STATE_PENDING_PAYMENT);
|
61 |
+
$state_object->setIsNotified(false);
|
62 |
+
|
63 |
+
return $this;
|
64 |
+
} */
|
65 |
+
|
66 |
+
/**
|
67 |
+
* Whether this paymend method is available for specified currency
|
68 |
+
*
|
69 |
+
* @param string $currency
|
70 |
+
* @return bool
|
71 |
+
*/
|
72 |
+
public function canUseForCurrency($currency) {
|
73 |
+
return Mage::getModel('payson/config')->IsCurrencySupported(Mage::app()->getStore()->getCurrentCurrencyCode());
|
74 |
+
}
|
75 |
+
|
76 |
+
/**
|
77 |
+
* @inheritDoc
|
78 |
+
*/
|
79 |
+
public function refund(Varien_Object $payment, $amount) {
|
80 |
+
|
81 |
+
/* @var $order Mage_Sales_Model_Order */
|
82 |
+
$order = $payment->getOrder();
|
83 |
+
|
84 |
+
$method = $payment->getMethod();
|
85 |
+
|
86 |
+
if ($order->getBaseGrandTotal() != $amount) {
|
87 |
+
Mage::throwException('Invalid amount');
|
88 |
+
}
|
89 |
+
|
90 |
+
$helper = Mage::helper('payson');
|
91 |
+
$order_id = $order->getData('increment_id');
|
92 |
+
$api = Mage::helper('payson/api');
|
93 |
+
if ($method == "payson_standard") {
|
94 |
+
$paysonPaymethod = $method;
|
95 |
+
}if ($method == "payson_invoice") {
|
96 |
+
$paysonPaymethod = $method;
|
97 |
+
}
|
98 |
+
$api->PaymentUpdate($order_id, $paysonPaymethod ?
|
99 |
+
Payson_Payson_Helper_Api::UPDATE_ACTION_CREDITORDER :
|
100 |
+
Payson_Payson_Helper_Api::UPDATE_ACTION_REFUNDORDER);
|
101 |
+
|
102 |
+
$order->addStatusHistoryComment($helper->__(
|
103 |
+
'Payment was credited at Payson'));
|
104 |
+
|
105 |
+
return $this;
|
106 |
+
}
|
107 |
+
|
108 |
+
/**
|
109 |
+
* @inheritDoc
|
110 |
+
*/
|
111 |
+
public function void(Varien_Object $payment) {
|
112 |
+
$payment->setTransactionId('auth')
|
113 |
+
->setIsTransactionClosed(0);
|
114 |
+
return $this;
|
115 |
+
}
|
116 |
+
|
117 |
+
/**
|
118 |
+
* @inheritDoc
|
119 |
+
*/
|
120 |
+
public function cancel(Varien_Object $payment) {
|
121 |
+
$order = $payment->getOrder();
|
122 |
+
$order_id = $order->getData('increment_id');
|
123 |
+
|
124 |
+
$api = Mage::helper('payson/api');
|
125 |
+
$helper = Mage::helper('payson');
|
126 |
+
$api->PaymentDetails($order_id);
|
127 |
+
$details = $api->GetResponse();
|
128 |
+
|
129 |
+
|
130 |
+
|
131 |
+
if (($details->type === Payson_Payson_Helper_Api::PAYMENT_METHOD_INVOICE) ||
|
132 |
+
($details->invoiceStatus === Payson_Payson_Helper_Api::INVOICE_STATUS_ORDERCREATED) ||
|
133 |
+
($details->type !== Payson_Payson_Helper_Api::PAYMENT_METHOD_INVOICE && $details->status === Payson_Payson_Helper_Api::STATUS_CREATED) ||
|
134 |
+
$order->getState() === Mage_Sales_Model_Order::STATE_PROCESSING) {
|
135 |
+
$api->PaymentUpdate($order_id, Payson_Payson_Helper_Api::UPDATE_ACTION_CANCELORDER);
|
136 |
+
|
137 |
+
$order->addStatusHistoryComment($helper->__(
|
138 |
+
'Order was canceled at Payson'));
|
139 |
+
|
140 |
+
$payment->setTransactionId('auth')
|
141 |
+
->setIsTransactionClosed(1);
|
142 |
+
} else {
|
143 |
+
Mage::throwException($helper->__('Payson is not ready to cancel the order. Please try again later.'));
|
144 |
+
}
|
145 |
+
return $this;
|
146 |
+
}
|
147 |
+
|
148 |
+
}
|
app/code/community/Payson/Payson/Model/Method/Invoice.php
CHANGED
@@ -1,65 +1,65 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class Payson_Payson_Model_Method_Invoice extends Payson_Payson_Model_Method_Abstract {
|
4 |
-
/*
|
5 |
-
* Protected properties
|
6 |
-
*/
|
7 |
-
|
8 |
-
/**
|
9 |
-
* @inheritDoc
|
10 |
-
*/
|
11 |
-
protected $_code = 'payson_invoice';
|
12 |
-
|
13 |
-
/**
|
14 |
-
* @inheritDoc
|
15 |
-
*/
|
16 |
-
protected $_canCapture = true;
|
17 |
-
protected $_canRefund = true;
|
18 |
-
protected $_canVoid = true;
|
19 |
-
protected $_canUseCheckout = false;
|
20 |
-
protected $_canCancelInvoice = true;
|
21 |
-
|
22 |
-
/*
|
23 |
-
* Public methods
|
24 |
-
*/
|
25 |
-
|
26 |
-
/**
|
27 |
-
* @inheritDoc
|
28 |
-
*/
|
29 |
-
public function capture(Varien_Object $payment, $amount) {
|
30 |
-
$order = $payment->getOrder();
|
31 |
-
$method = $order->getPayment()->getMethod();
|
32 |
-
if (($method !== 'payson_standard') || ($method == "payson_invoice")) {
|
33 |
-
return $this;
|
34 |
-
}
|
35 |
-
$order_id = $order->getData('increment_id');
|
36 |
-
|
37 |
-
$api = Mage::helper('payson/api');
|
38 |
-
$helper = Mage::helper('payson');
|
39 |
-
$api->PaymentDetails($order_id);
|
40 |
-
$details = $api->GetResponse();
|
41 |
-
|
42 |
-
if (($details->type ===
|
43 |
-
Payson_Payson_Helper_Api::PAYMENT_METHOD_INVOICE) ||
|
44 |
-
($details->invoiceStatus ===
|
45 |
-
Payson_Payson_Helper_Api::INVOICE_STATUS_ORDERCREATED)) {
|
46 |
-
$api->PaymentUpdate($order_id, Payson_Payson_Helper_Api::UPDATE_ACTION_SHIPORDER);
|
47 |
-
|
48 |
-
$order->addStatusHistoryComment($helper->__(
|
49 |
-
'Order was activated at Payson'));
|
50 |
-
} else {
|
51 |
-
Mage::throwException($helper->__('Payson is not ready to create an invoice. Please try again later.'));
|
52 |
-
}
|
53 |
-
return $this;
|
54 |
-
}
|
55 |
-
|
56 |
-
public function authorize(Varien_Object $payment, $amount) {
|
57 |
-
$order = $payment->getOrder();
|
58 |
-
$method = $order->getPayment()->getMethod();
|
59 |
-
if (($method !== 'payson_standard') || ($method == "payson_invoice")) {
|
60 |
-
return $this;
|
61 |
-
}
|
62 |
-
$payment->setTransactionId('auth')->setIsTransactionClosed(0);
|
63 |
-
return $this;
|
64 |
-
}
|
65 |
-
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Payson_Payson_Model_Method_Invoice extends Payson_Payson_Model_Method_Abstract {
|
4 |
+
/*
|
5 |
+
* Protected properties
|
6 |
+
*/
|
7 |
+
|
8 |
+
/**
|
9 |
+
* @inheritDoc
|
10 |
+
*/
|
11 |
+
protected $_code = 'payson_invoice';
|
12 |
+
|
13 |
+
/**
|
14 |
+
* @inheritDoc
|
15 |
+
*/
|
16 |
+
protected $_canCapture = true;
|
17 |
+
protected $_canRefund = true;
|
18 |
+
protected $_canVoid = true;
|
19 |
+
protected $_canUseCheckout = false;
|
20 |
+
protected $_canCancelInvoice = true;
|
21 |
+
|
22 |
+
/*
|
23 |
+
* Public methods
|
24 |
+
*/
|
25 |
+
|
26 |
+
/**
|
27 |
+
* @inheritDoc
|
28 |
+
*/
|
29 |
+
public function capture(Varien_Object $payment, $amount) {
|
30 |
+
$order = $payment->getOrder();
|
31 |
+
$method = $order->getPayment()->getMethod();
|
32 |
+
if (($method !== 'payson_standard') || ($method == "payson_invoice")) {
|
33 |
+
return $this;
|
34 |
+
}
|
35 |
+
$order_id = $order->getData('increment_id');
|
36 |
+
|
37 |
+
$api = Mage::helper('payson/api');
|
38 |
+
$helper = Mage::helper('payson');
|
39 |
+
$api->PaymentDetails($order_id);
|
40 |
+
$details = $api->GetResponse();
|
41 |
+
|
42 |
+
if (($details->type ===
|
43 |
+
Payson_Payson_Helper_Api::PAYMENT_METHOD_INVOICE) ||
|
44 |
+
($details->invoiceStatus ===
|
45 |
+
Payson_Payson_Helper_Api::INVOICE_STATUS_ORDERCREATED)) {
|
46 |
+
$api->PaymentUpdate($order_id, Payson_Payson_Helper_Api::UPDATE_ACTION_SHIPORDER);
|
47 |
+
|
48 |
+
$order->addStatusHistoryComment($helper->__(
|
49 |
+
'Order was activated at Payson'));
|
50 |
+
} else {
|
51 |
+
Mage::throwException($helper->__('Payson is not ready to create an invoice. Please try again later.'));
|
52 |
+
}
|
53 |
+
return $this;
|
54 |
+
}
|
55 |
+
|
56 |
+
public function authorize(Varien_Object $payment, $amount) {
|
57 |
+
$order = $payment->getOrder();
|
58 |
+
$method = $order->getPayment()->getMethod();
|
59 |
+
if (($method !== 'payson_standard') || ($method == "payson_invoice")) {
|
60 |
+
return $this;
|
61 |
+
}
|
62 |
+
$payment->setTransactionId('auth')->setIsTransactionClosed(0);
|
63 |
+
return $this;
|
64 |
+
}
|
65 |
+
}
|
app/code/community/Payson/Payson/Model/Order/Invoice/Total/Invoice.php
CHANGED
@@ -2,9 +2,8 @@
|
|
2 |
|
3 |
class Payson_Payson_Model_Order_Invoice_Total_Invoice extends
|
4 |
Mage_Sales_Model_Order_Invoice_Total_Abstract {
|
5 |
-
|
6 |
protected $_code = 'payson_standard';
|
7 |
-
|
8 |
public function collect(Mage_Sales_Model_Order_Invoice $invoice) {
|
9 |
$order = $invoice->getOrder();
|
10 |
$this->_config = Mage::getModel('payson/config');
|
@@ -12,30 +11,31 @@ Mage_Sales_Model_Order_Invoice_Total_Abstract {
|
|
12 |
return $this;
|
13 |
}
|
14 |
$method = $order->getPayment()->getMethodInstance()->getCode();
|
15 |
-
if (($method !== 'payson_standard')
|
16 |
return $this;
|
17 |
}
|
18 |
-
if ($order->hasInvoices()
|
19 |
return $this;
|
20 |
}
|
|
|
21 |
$base_fee = $order->getBasePaysonInvoiceFee();
|
22 |
$fee = $order->getPaysonInvoiceFee();
|
23 |
|
24 |
if (!$base_fee || !$fee) {
|
25 |
return $this;
|
26 |
}
|
|
|
27 |
$base_grand_total = $invoice->getBaseGrandTotal();
|
28 |
$base_grand_total += $base_fee;
|
29 |
-
|
30 |
$grand_total = $invoice->getGrandTotal();
|
31 |
$grand_total += $fee;
|
32 |
-
|
33 |
$invoice->setBasePaysonInvoiceFee($base_fee);
|
34 |
$invoice->setPaysonInvoiceFee($fee);
|
35 |
-
|
36 |
$invoice->setBaseGrandTotal($base_grand_total);
|
37 |
$invoice->setGrandTotal($grand_total);
|
38 |
-
|
39 |
return $this;
|
40 |
}
|
41 |
|
2 |
|
3 |
class Payson_Payson_Model_Order_Invoice_Total_Invoice extends
|
4 |
Mage_Sales_Model_Order_Invoice_Total_Abstract {
|
5 |
+
|
6 |
protected $_code = 'payson_standard';
|
|
|
7 |
public function collect(Mage_Sales_Model_Order_Invoice $invoice) {
|
8 |
$order = $invoice->getOrder();
|
9 |
$this->_config = Mage::getModel('payson/config');
|
11 |
return $this;
|
12 |
}
|
13 |
$method = $order->getPayment()->getMethodInstance()->getCode();
|
14 |
+
if (($method !== 'payson_standard')||($method == "payson_invoice")) {
|
15 |
return $this;
|
16 |
}
|
17 |
+
if ($order->hasInvoices() == 0) {
|
18 |
return $this;
|
19 |
}
|
20 |
+
|
21 |
$base_fee = $order->getBasePaysonInvoiceFee();
|
22 |
$fee = $order->getPaysonInvoiceFee();
|
23 |
|
24 |
if (!$base_fee || !$fee) {
|
25 |
return $this;
|
26 |
}
|
27 |
+
|
28 |
$base_grand_total = $invoice->getBaseGrandTotal();
|
29 |
$base_grand_total += $base_fee;
|
|
|
30 |
$grand_total = $invoice->getGrandTotal();
|
31 |
$grand_total += $fee;
|
32 |
+
|
33 |
$invoice->setBasePaysonInvoiceFee($base_fee);
|
34 |
$invoice->setPaysonInvoiceFee($fee);
|
35 |
+
|
36 |
$invoice->setBaseGrandTotal($base_grand_total);
|
37 |
$invoice->setGrandTotal($grand_total);
|
38 |
+
|
39 |
return $this;
|
40 |
}
|
41 |
|
app/code/community/Payson/Payson/Model/Order/Invoice/Total/Invoice.php.bak
DELETED
@@ -1,48 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class Payson_Payson_Model_Order_Invoice_Total_Invoice extends
|
4 |
-
Mage_Sales_Model_Order_Invoice_Total_Abstract {
|
5 |
-
|
6 |
-
protected $_code = 'payson_standard';
|
7 |
-
|
8 |
-
public function collect(Mage_Sales_Model_Order_Invoice $invoice) {
|
9 |
-
$order = $invoice->getOrder();
|
10 |
-
$this->_config = Mage::getModel('payson/config');
|
11 |
-
if (!$this->_config->CanInvoicePayment()) {
|
12 |
-
return $this;
|
13 |
-
}
|
14 |
-
$method = $order->getPayment()->getMethodInstance()->getCode();
|
15 |
-
if (($method !== 'payson_standard') || ($method == "payson_invoice")) {
|
16 |
-
return $this;
|
17 |
-
}
|
18 |
-
/*if ($order->hasInvoices() == 0) {
|
19 |
-
return $this;
|
20 |
-
}*/
|
21 |
-
$base_fee = $order->getBasePaysonInvoiceFee();
|
22 |
-
$fee = $order->getPaysonInvoiceFee();
|
23 |
-
if (!$base_fee || !$fee) {
|
24 |
-
return $this;
|
25 |
-
}
|
26 |
-
$base_grand_total = $invoice->getBaseGrandTotal();
|
27 |
-
$base_grand_total += $base_fee;
|
28 |
-
|
29 |
-
$grand_total = $invoice->getGrandTotal();
|
30 |
-
$grand_total += $fee;
|
31 |
-
|
32 |
-
$invoice->setBasePaysonInvoiceFee($base_fee);
|
33 |
-
$invoice->setPaysonInvoiceFee($fee);
|
34 |
-
|
35 |
-
$invoice->setBaseGrandTotal($base_grand_total);
|
36 |
-
$invoice->setGrandTotal($grand_total);
|
37 |
-
|
38 |
-
/*$invoice->setPaysonInvoiceFee($order->payson_invoice_fee);
|
39 |
-
$invoice->setBaseGrandTotal($order->base_total_due);
|
40 |
-
$invoice->setGrandTotal($order->total_due);*/
|
41 |
-
|
42 |
-
if ($order->hasInvoices() == 0) {
|
43 |
-
return $this;
|
44 |
-
}
|
45 |
-
return $this;
|
46 |
-
}
|
47 |
-
|
48 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Payson/Payson/controllers/Adminhtml/Sales/Order/ShipmentController.php
CHANGED
@@ -12,12 +12,10 @@ class Payson_Payson_Adminhtml_Sales_Order_ShipmentController extends Mage_Adminh
|
|
12 |
$invoice = Mage::getModel('sales/service_order', $order)->prepareInvoice();
|
13 |
$invoice->setRequestedCaptureCase(Mage_Sales_Model_Order_Invoice::CAPTURE_ONLINE);
|
14 |
$invoice->register();
|
15 |
-
|
16 |
$transactionSave = Mage::getModel('core/resource_transaction')
|
17 |
->addObject($invoice)
|
18 |
->addObject($invoice->getOrder());
|
19 |
-
$transactionSave->save();
|
20 |
-
|
21 |
}
|
22 |
parent::saveAction();
|
23 |
}
|
12 |
$invoice = Mage::getModel('sales/service_order', $order)->prepareInvoice();
|
13 |
$invoice->setRequestedCaptureCase(Mage_Sales_Model_Order_Invoice::CAPTURE_ONLINE);
|
14 |
$invoice->register();
|
|
|
15 |
$transactionSave = Mage::getModel('core/resource_transaction')
|
16 |
->addObject($invoice)
|
17 |
->addObject($invoice->getOrder());
|
18 |
+
$transactionSave->save();
|
|
|
19 |
}
|
20 |
parent::saveAction();
|
21 |
}
|
app/code/community/Payson/Payson/controllers/CheckoutController.php
CHANGED
@@ -1,240 +1,238 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class Payson_Payson_CheckoutController extends Mage_Core_Controller_Front_Action {
|
4 |
-
/*
|
5 |
-
* Private properties
|
6 |
-
*/
|
7 |
-
|
8 |
-
private $_session;
|
9 |
-
private $_order = null;
|
10 |
-
/* @var $_config Payson_Payson_Model_Config */
|
11 |
-
private $_config;
|
12 |
-
/* @var $_helper Payson_Payson_Helper_Data */
|
13 |
-
private $_helper;
|
14 |
-
|
15 |
-
/*
|
16 |
-
* Private methods
|
17 |
-
*/
|
18 |
-
|
19 |
-
public function _construct() {
|
20 |
-
$this->_config = Mage::getModel('payson/config');
|
21 |
-
$this->_helper = Mage::helper('payson');
|
22 |
-
}
|
23 |
-
|
24 |
-
/*
|
25 |
-
* Private methods
|
26 |
-
*/
|
27 |
-
|
28 |
-
private function getSession() {
|
29 |
-
if (!isset($this->_session)) {
|
30 |
-
$this->_session = Mage::getSingleton('checkout/session');
|
31 |
-
}
|
32 |
-
|
33 |
-
return $this->_session;
|
34 |
-
}
|
35 |
-
|
36 |
-
/**
|
37 |
-
*
|
38 |
-
* @return Mage_Sales_Model_Order
|
39 |
-
*/
|
40 |
-
private function getOrder() {
|
41 |
-
if (!isset($this->_order)) {
|
42 |
-
$increment_id = $this->getSession()->getData('last_real_order_id');
|
43 |
-
|
44 |
-
if ($increment_id) {
|
45 |
-
$this->_order = Mage::getModel('sales/order')
|
46 |
-
->loadByIncrementId($increment_id);
|
47 |
-
|
48 |
-
if (is_null($this->_order->getId())) {
|
49 |
-
$this->_order = null;
|
50 |
-
}
|
51 |
-
}
|
52 |
-
}
|
53 |
-
|
54 |
-
return $this->_order;
|
55 |
-
}
|
56 |
-
|
57 |
-
private function cancelOrder($message = '') {
|
58 |
-
|
59 |
-
$order = $this->getOrder();
|
60 |
-
|
61 |
-
if (!is_null($order = $this->getOrder())) {
|
62 |
-
$order->cancel();
|
63 |
-
|
64 |
-
if ($message != '') {
|
65 |
-
$order->addStatusHistoryComment($message);
|
66 |
-
}
|
67 |
-
}
|
68 |
-
|
69 |
-
$order->save();
|
70 |
-
return $this;
|
71 |
-
}
|
72 |
-
|
73 |
-
public function redirectAction() {
|
74 |
-
|
75 |
-
$order = $this->getOrder();
|
76 |
-
|
77 |
-
if (is_null($order)) {
|
78 |
-
$this->_redirect('checkout/cart');
|
79 |
-
|
80 |
-
return;
|
81 |
-
}
|
82 |
-
|
83 |
-
try {
|
84 |
-
$api = Mage::helper('payson/api')->Pay($order);
|
85 |
-
|
86 |
-
$order->addStatusHistoryComment(Mage::helper('payson')->__(
|
87 |
-
'The customer was redirected to Payson'))
|
88 |
-
->save();
|
89 |
-
|
90 |
-
$this->GetResponse()->setRedirect($api->GetPayForwardUrl());
|
91 |
-
} catch (Exception $e) {
|
92 |
-
$this->cancelOrder($e->getMessage());
|
93 |
-
|
94 |
-
if ($this->_config->restoreCartOnError()) {
|
95 |
-
$this->restoreCart();
|
96 |
-
}
|
97 |
-
|
98 |
-
Mage::logException($e);
|
99 |
-
|
100 |
-
Mage::getSingleton('core/session')->addError($e->getMessage());
|
101 |
-
$this->_redirect('checkout/cart');
|
102 |
-
}
|
103 |
-
}
|
104 |
-
|
105 |
-
public function returnAction() {
|
106 |
-
$api = Mage::helper('payson/api');
|
107 |
-
$order = $this->getOrder();
|
108 |
-
$paymentDetailsResponse = Mage::helper('payson/api')->PaymentDetails(Mage::getSingleton('checkout/session')->getLastRealOrderId())->getResponse();
|
109 |
-
$paymentStatus = $paymentDetailsResponse->status;
|
110 |
-
$InvoiceStatus = $paymentDetailsResponse->invoiceStatus;
|
111 |
-
isset($InvoiceStatus) ? $InvoiceStatus : 'NONE';
|
112 |
-
|
113 |
-
$
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
$
|
123 |
-
$
|
124 |
-
$
|
125 |
-
|
126 |
-
|
127 |
-
case '
|
128 |
-
case '
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
$order
|
139 |
-
|
140 |
-
|
141 |
-
$
|
142 |
-
|
143 |
-
$invoice
|
144 |
-
$
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
$order
|
156 |
-
|
157 |
-
$
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
$order
|
165 |
-
$
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
$order->
|
182 |
-
|
183 |
-
$order->
|
184 |
-
$order->
|
185 |
-
$order->
|
186 |
-
$
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
$
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
$
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
$
|
223 |
-
|
224 |
-
$this->
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
$
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Payson_Payson_CheckoutController extends Mage_Core_Controller_Front_Action {
|
4 |
+
/*
|
5 |
+
* Private properties
|
6 |
+
*/
|
7 |
+
|
8 |
+
private $_session;
|
9 |
+
private $_order = null;
|
10 |
+
/* @var $_config Payson_Payson_Model_Config */
|
11 |
+
private $_config;
|
12 |
+
/* @var $_helper Payson_Payson_Helper_Data */
|
13 |
+
private $_helper;
|
14 |
+
|
15 |
+
/*
|
16 |
+
* Private methods
|
17 |
+
*/
|
18 |
+
|
19 |
+
public function _construct() {
|
20 |
+
$this->_config = Mage::getModel('payson/config');
|
21 |
+
$this->_helper = Mage::helper('payson');
|
22 |
+
}
|
23 |
+
|
24 |
+
/*
|
25 |
+
* Private methods
|
26 |
+
*/
|
27 |
+
|
28 |
+
private function getSession() {
|
29 |
+
if (!isset($this->_session)) {
|
30 |
+
$this->_session = Mage::getSingleton('checkout/session');
|
31 |
+
}
|
32 |
+
|
33 |
+
return $this->_session;
|
34 |
+
}
|
35 |
+
|
36 |
+
/**
|
37 |
+
*
|
38 |
+
* @return Mage_Sales_Model_Order
|
39 |
+
*/
|
40 |
+
private function getOrder() {
|
41 |
+
if (!isset($this->_order)) {
|
42 |
+
$increment_id = $this->getSession()->getData('last_real_order_id');
|
43 |
+
|
44 |
+
if ($increment_id) {
|
45 |
+
$this->_order = Mage::getModel('sales/order')
|
46 |
+
->loadByIncrementId($increment_id);
|
47 |
+
|
48 |
+
if (is_null($this->_order->getId())) {
|
49 |
+
$this->_order = null;
|
50 |
+
}
|
51 |
+
}
|
52 |
+
}
|
53 |
+
|
54 |
+
return $this->_order;
|
55 |
+
}
|
56 |
+
|
57 |
+
private function cancelOrder($message = '') {
|
58 |
+
|
59 |
+
$order = $this->getOrder();
|
60 |
+
|
61 |
+
if (!is_null($order = $this->getOrder())) {
|
62 |
+
$order->cancel();
|
63 |
+
|
64 |
+
if ($message != '') {
|
65 |
+
$order->addStatusHistoryComment($message);
|
66 |
+
}
|
67 |
+
}
|
68 |
+
|
69 |
+
$order->save();
|
70 |
+
return $this;
|
71 |
+
}
|
72 |
+
|
73 |
+
public function redirectAction() {
|
74 |
+
|
75 |
+
$order = $this->getOrder();
|
76 |
+
|
77 |
+
if (is_null($order)) {
|
78 |
+
$this->_redirect('checkout/cart');
|
79 |
+
|
80 |
+
return;
|
81 |
+
}
|
82 |
+
|
83 |
+
try {
|
84 |
+
$api = Mage::helper('payson/api')->Pay($order);
|
85 |
+
|
86 |
+
$order->addStatusHistoryComment(Mage::helper('payson')->__(
|
87 |
+
'The customer was redirected to Payson'))
|
88 |
+
->save();
|
89 |
+
|
90 |
+
$this->GetResponse()->setRedirect($api->GetPayForwardUrl());
|
91 |
+
} catch (Exception $e) {
|
92 |
+
$this->cancelOrder($e->getMessage());
|
93 |
+
|
94 |
+
if ($this->_config->restoreCartOnError()) {
|
95 |
+
$this->restoreCart();
|
96 |
+
}
|
97 |
+
|
98 |
+
Mage::logException($e);
|
99 |
+
|
100 |
+
Mage::getSingleton('core/session')->addError($e->getMessage());
|
101 |
+
$this->_redirect('checkout/cart');
|
102 |
+
}
|
103 |
+
}
|
104 |
+
|
105 |
+
public function returnAction() {
|
106 |
+
$api = Mage::helper('payson/api');
|
107 |
+
$order = $this->getOrder();
|
108 |
+
$paymentDetailsResponse = Mage::helper('payson/api')->PaymentDetails(Mage::getSingleton('checkout/session')->getLastRealOrderId())->getResponse();
|
109 |
+
$paymentStatus = $paymentDetailsResponse->status;
|
110 |
+
$InvoiceStatus = $paymentDetailsResponse->invoiceStatus;
|
111 |
+
isset($InvoiceStatus) ? $InvoiceStatus : 'NONE';
|
112 |
+
$paymentDetails = $paymentDetailsResponse->receiverList->receiver->ToArray();
|
113 |
+
$new_paymentDetails = array();
|
114 |
+
foreach ($paymentDetails as $item) {
|
115 |
+
foreach ($item as $key => $value) {
|
116 |
+
$new_paymentDetails[$key] = $value;
|
117 |
+
}
|
118 |
+
}
|
119 |
+
|
120 |
+
$sendEmail = $api->confirmationEmail($order->getEntityId());
|
121 |
+
$investigatefee = $order['base_payson_invoice_fee'];
|
122 |
+
$currentAmount = $new_paymentDetails['amount'];
|
123 |
+
$newAmount = $currentAmount += $investigatefee;
|
124 |
+
switch ($paymentStatus) {
|
125 |
+
case 'COMPLETED':
|
126 |
+
case 'PENDING':
|
127 |
+
case 'PROCESSING':
|
128 |
+
case 'CREDITED': {
|
129 |
+
|
130 |
+
|
131 |
+
if ($paymentDetailsResponse->type !== 'INVOICE' && $paymentDetailsResponse->status === 'COMPLETED') {
|
132 |
+
if ($sendEmail['status'] == 'pending_payment') {
|
133 |
+
$order->sendNewOrderEmail()->save();
|
134 |
+
}
|
135 |
+
|
136 |
+
$order->setState(Mage_Sales_Model_Order::STATE_PROCESSING, true);
|
137 |
+
Mage::helper('payson')->__('Either an bank, card or SMS payment was choosen as payment method');
|
138 |
+
$order['payson_invoice_fee'] = 0;
|
139 |
+
$order['base_payson_invoice_fee'] = 0;
|
140 |
+
|
141 |
+
$invoice = Mage::getModel('sales/service_order', $order)->prepareInvoice();
|
142 |
+
$invoice->setRequestedCaptureCase(Mage_Sales_Model_Order_Invoice::CAPTURE_ONLINE);
|
143 |
+
$invoice->register();
|
144 |
+
$transactionSave = Mage::getModel('core/resource_transaction')
|
145 |
+
->addObject($invoice)
|
146 |
+
->addObject($invoice->getOrder());
|
147 |
+
|
148 |
+
$transactionSave->save();
|
149 |
+
$this->_redirect('checkout/onepage/success');
|
150 |
+
break;
|
151 |
+
}
|
152 |
+
if ($paymentDetailsResponse->type !== 'INVOICE' && $paymentDetailsResponse->status === 'PROCESSING') {
|
153 |
+
$order->setState(Mage_Sales_Model_Order::STATE_PENDING_PAYMENT, true);
|
154 |
+
Mage::getSingleton('core/session')->addError(sprintf(Mage::helper('payson')->__('Your payment is being processed by Payson')));
|
155 |
+
$order['payson_invoice_fee'] = 0;
|
156 |
+
$order['base_payson_invoice_fee'] = 0;
|
157 |
+
$this->_redirect('checkout/onepage/success');
|
158 |
+
break;
|
159 |
+
}
|
160 |
+
if ($paymentDetailsResponse->type !== 'INVOICE' && $paymentDetailsResponse->status === 'PENDING') {
|
161 |
+
Mage::getSingleton('core/session')->addError(sprintf(Mage::helper('payson')->__('Something went wrong with the payment. Please, try a different payment method')));
|
162 |
+
$order->setState(Mage_Sales_Model_Order::STATE_PENDING_PAYMENT, true);
|
163 |
+
$order['payson_invoice_fee'] = 0;
|
164 |
+
$order['base_payson_invoice_fee'] = 0;
|
165 |
+
$this->_redirect('checkout/onepage/failure');
|
166 |
+
break;
|
167 |
+
}
|
168 |
+
if ($paymentDetailsResponse->type === 'INVOICE' && $InvoiceStatus === 'PENDING') {
|
169 |
+
Mage::getSingleton('core/session')->addError(sprintf(Mage::helper('payson')->__('Your payment is being processed by Payson')));
|
170 |
+
$order->setState(Mage_Sales_Model_Order::STATE_PENDING_PAYMENT, true);
|
171 |
+
$this->_redirect('checkout/onepage/failure');
|
172 |
+
break;
|
173 |
+
}
|
174 |
+
//Update the order with the true amount
|
175 |
+
if ($paymentDetailsResponse->type === 'INVOICE' && $paymentDetailsResponse->type !== 'TRANSFER') {
|
176 |
+
if ($sendEmail['status'] == 'pending_payment') {
|
177 |
+
$order->sendNewOrderEmail()->save();
|
178 |
+
}
|
179 |
+
$order->setState(Mage_Sales_Model_Order::STATE_PROCESSING, true);
|
180 |
+
Mage::helper('payson')->__('Invoice payment was choosen as payment method');
|
181 |
+
$order->sendNewOrderEmail()->save();
|
182 |
+
$order->setBaseGrandTotal($newAmount);
|
183 |
+
$order->setGrandTotal($newAmount);
|
184 |
+
$order->setTotalDue($newAmount);
|
185 |
+
$order->save();
|
186 |
+
$this->_redirect('checkout/onepage/success');
|
187 |
+
break;
|
188 |
+
}
|
189 |
+
}
|
190 |
+
case 'ERROR':
|
191 |
+
case 'DENIED': {
|
192 |
+
$errorMessage = Mage::helper('payson')->__('The payment was denied by Payson. Please, try a different payment method');
|
193 |
+
Mage::getSingleton('core/session')->addError($errorMessage);
|
194 |
+
$this->cancelOrder($errorMessage);
|
195 |
+
$this->_redirect('checkout');
|
196 |
+
break;
|
197 |
+
}
|
198 |
+
case 'ABORTED':
|
199 |
+
case 'CANCELED': {
|
200 |
+
$order->setState(Mage_Sales_Model_Order::STATE_CANCELED, true);
|
201 |
+
$cancelMessage = Mage::helper('payson')->__('Order was canceled at Payson');
|
202 |
+
$this->cancelOrder($cancelMessage);
|
203 |
+
if ($this->_config->restoreCartOnCancel()) {
|
204 |
+
$this->restoreCart();
|
205 |
+
}
|
206 |
+
$this->_redirect('checkout');
|
207 |
+
}
|
208 |
+
|
209 |
+
|
210 |
+
default: {
|
211 |
+
Mage::getSingleton('core/session')->addError(sprintf(Mage::helper('payson')->__('Something went wrong with the payment. Please, try a different payment method')));
|
212 |
+
$this->_redirect('checkout');
|
213 |
+
break;
|
214 |
+
}
|
215 |
+
}
|
216 |
+
}
|
217 |
+
|
218 |
+
public function cancelAction() {
|
219 |
+
|
220 |
+
$cancelMessage = Mage::helper('payson')->__('Order was canceled at Payson');
|
221 |
+
|
222 |
+
$this->cancelOrder($cancelMessage);
|
223 |
+
|
224 |
+
if ($this->_config->restoreCartOnCancel()) {
|
225 |
+
$this->restoreCart();
|
226 |
+
}
|
227 |
+
|
228 |
+
$this->_redirect('checkout');
|
229 |
+
}
|
230 |
+
|
231 |
+
private function restoreCart() {
|
232 |
+
|
233 |
+
$quoteId = $this->getOrder()->getQuoteId();
|
234 |
+
$quote = Mage::getModel('sales/quote')->load($quoteId);
|
235 |
+
$quote->setIsActive(true)->save();
|
236 |
+
}
|
237 |
+
|
238 |
+
}
|
|
|
|
app/code/community/Payson/Payson/etc/config.xml
CHANGED
@@ -1,167 +1,167 @@
|
|
1 |
-
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
-
<config>
|
3 |
-
<modules>
|
4 |
-
<Payson_Payson>
|
5 |
-
<version>1.8.3</version>
|
6 |
-
</Payson_Payson>
|
7 |
-
</modules>
|
8 |
-
<admin>
|
9 |
-
<routers>
|
10 |
-
<adminhtml>
|
11 |
-
<args>
|
12 |
-
<modules>
|
13 |
-
<Payson_Payson before="Mage_Adminhtml">Payson_Payson_Adminhtml</Payson_Payson>
|
14 |
-
</modules>
|
15 |
-
</args>
|
16 |
-
</adminhtml>
|
17 |
-
</routers>
|
18 |
-
</admin>
|
19 |
-
<global>
|
20 |
-
<blocks>
|
21 |
-
<payson>
|
22 |
-
<class>Payson_Payson_Block</class>
|
23 |
-
</payson>
|
24 |
-
</blocks>
|
25 |
-
<models>
|
26 |
-
<payson>
|
27 |
-
<class>Payson_Payson_Model</class>
|
28 |
-
</payson>
|
29 |
-
</models>
|
30 |
-
<helpers>
|
31 |
-
<payson>
|
32 |
-
<class>Payson_Payson_Helper</class>
|
33 |
-
</payson>
|
34 |
-
</helpers>
|
35 |
-
<resources>
|
36 |
-
<payson_setup>
|
37 |
-
<setup>
|
38 |
-
<module>Payson_Payson</module>
|
39 |
-
<class>Payson_Payson_Model_Mysql4_Setup</class>
|
40 |
-
</setup>
|
41 |
-
<connection>
|
42 |
-
<use>core_setup</use>
|
43 |
-
</connection>
|
44 |
-
</payson_setup>
|
45 |
-
<payson_write>
|
46 |
-
<connection>
|
47 |
-
<use>core_write</use>
|
48 |
-
</connection>
|
49 |
-
</payson_write>
|
50 |
-
<payson_read>
|
51 |
-
<connection>
|
52 |
-
<use>core_read</use>
|
53 |
-
</connection>
|
54 |
-
</payson_read>
|
55 |
-
</resources>
|
56 |
-
<sales>
|
57 |
-
<quote>
|
58 |
-
<totals>
|
59 |
-
<payson_invoice>
|
60 |
-
<class>payson/quote_address_total_invoice</class>
|
61 |
-
<after>subtotal,discount,shipping</after>
|
62 |
-
<before>tax,grand_total</before>
|
63 |
-
</payson_invoice>
|
64 |
-
</totals>
|
65 |
-
</quote>
|
66 |
-
<order_invoice>
|
67 |
-
<totals>
|
68 |
-
<payson_invoice>
|
69 |
-
<class>payson/order_invoice_total_invoice</class>
|
70 |
-
<after>subtotal,discount,shipping</after>
|
71 |
-
<before>tax,grand_total</before>
|
72 |
-
</payson_invoice>
|
73 |
-
</totals>
|
74 |
-
</order_invoice>
|
75 |
-
<order_creditmemo>
|
76 |
-
<totals>
|
77 |
-
<payson_invoice>
|
78 |
-
<class>payson/order_creditmemo_total_invoice</class>
|
79 |
-
<after>subtotal,discount,shipping</after>
|
80 |
-
<before>tax,grand_total</before>
|
81 |
-
</payson_invoice>
|
82 |
-
</totals>
|
83 |
-
</order_creditmemo>
|
84 |
-
</sales>
|
85 |
-
<fieldsets>
|
86 |
-
<sales_convert_quote_address>
|
87 |
-
<base_payson_invoice_fee>
|
88 |
-
<to_order>*</to_order>
|
89 |
-
</base_payson_invoice_fee>
|
90 |
-
<payson_invoice_fee>
|
91 |
-
<to_order>*</to_order>
|
92 |
-
</payson_invoice_fee>
|
93 |
-
</sales_convert_quote_address>
|
94 |
-
</fieldsets>
|
95 |
-
</global>
|
96 |
-
<frontend>
|
97 |
-
<secure_url>
|
98 |
-
<payson_checkout>/payson/checkout</payson_checkout>
|
99 |
-
</secure_url>
|
100 |
-
<routers>
|
101 |
-
<payson>
|
102 |
-
<use>standard</use>
|
103 |
-
<args>
|
104 |
-
<module>Payson_Payson</module>
|
105 |
-
<frontName>payson</frontName>
|
106 |
-
</args>
|
107 |
-
</payson>
|
108 |
-
</routers>
|
109 |
-
<translate>
|
110 |
-
<modules>
|
111 |
-
<Payson_Payson>
|
112 |
-
<files>
|
113 |
-
<default>Payson_Payson.csv</default>
|
114 |
-
</files>
|
115 |
-
</Payson_Payson>
|
116 |
-
</modules>
|
117 |
-
</translate>
|
118 |
-
<layout>
|
119 |
-
<updates>
|
120 |
-
<Payson_Payson>
|
121 |
-
<file>Payson.xml</file>
|
122 |
-
</Payson_Payson>
|
123 |
-
</updates>
|
124 |
-
</layout>
|
125 |
-
</frontend>
|
126 |
-
<adminhtml>
|
127 |
-
<translate>
|
128 |
-
<modules>
|
129 |
-
<Payson_Payson>
|
130 |
-
<files>
|
131 |
-
<default>Payson_Payson.csv</default>
|
132 |
-
</files>
|
133 |
-
</Payson_Payson>
|
134 |
-
</modules>
|
135 |
-
</translate>
|
136 |
-
<layout>
|
137 |
-
<updates>
|
138 |
-
<Payson_Payson>
|
139 |
-
<file>Payson.xml</file>
|
140 |
-
</Payson_Payson>
|
141 |
-
</updates>
|
142 |
-
</layout>
|
143 |
-
</adminhtml>
|
144 |
-
<default>
|
145 |
-
<payment>
|
146 |
-
<payson_standard>
|
147 |
-
<test_mode>0</test_mode>
|
148 |
-
<active>0</active>
|
149 |
-
<model>payson/method_standard</model>
|
150 |
-
<payment_action>authorize</payment_action>
|
151 |
-
<order_status>pending_payment</order_status>
|
152 |
-
<payment_guarantee>1</payment_guarantee>
|
153 |
-
<restore_on_cancel>1</restore_on_cancel>
|
154 |
-
<restore_on_error>1</restore_on_error>
|
155 |
-
</payson_standard>
|
156 |
-
<payson_invoice>
|
157 |
-
<active>0</active>
|
158 |
-
<activate_invoice>1</activate_invoice>
|
159 |
-
<model>payson/method_invoice</model>
|
160 |
-
<payment_action>authorize</payment_action>
|
161 |
-
<order_status>pending</order_status>
|
162 |
-
<invoice_fee_sek>0</invoice_fee_sek>
|
163 |
-
</payson_invoice>
|
164 |
-
</payment>
|
165 |
-
</default>
|
166 |
-
</config>
|
167 |
-
|
1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<Payson_Payson>
|
5 |
+
<version>1.8.3</version>
|
6 |
+
</Payson_Payson>
|
7 |
+
</modules>
|
8 |
+
<admin>
|
9 |
+
<routers>
|
10 |
+
<adminhtml>
|
11 |
+
<args>
|
12 |
+
<modules>
|
13 |
+
<Payson_Payson before="Mage_Adminhtml">Payson_Payson_Adminhtml</Payson_Payson>
|
14 |
+
</modules>
|
15 |
+
</args>
|
16 |
+
</adminhtml>
|
17 |
+
</routers>
|
18 |
+
</admin>
|
19 |
+
<global>
|
20 |
+
<blocks>
|
21 |
+
<payson>
|
22 |
+
<class>Payson_Payson_Block</class>
|
23 |
+
</payson>
|
24 |
+
</blocks>
|
25 |
+
<models>
|
26 |
+
<payson>
|
27 |
+
<class>Payson_Payson_Model</class>
|
28 |
+
</payson>
|
29 |
+
</models>
|
30 |
+
<helpers>
|
31 |
+
<payson>
|
32 |
+
<class>Payson_Payson_Helper</class>
|
33 |
+
</payson>
|
34 |
+
</helpers>
|
35 |
+
<resources>
|
36 |
+
<payson_setup>
|
37 |
+
<setup>
|
38 |
+
<module>Payson_Payson</module>
|
39 |
+
<class>Payson_Payson_Model_Mysql4_Setup</class>
|
40 |
+
</setup>
|
41 |
+
<connection>
|
42 |
+
<use>core_setup</use>
|
43 |
+
</connection>
|
44 |
+
</payson_setup>
|
45 |
+
<payson_write>
|
46 |
+
<connection>
|
47 |
+
<use>core_write</use>
|
48 |
+
</connection>
|
49 |
+
</payson_write>
|
50 |
+
<payson_read>
|
51 |
+
<connection>
|
52 |
+
<use>core_read</use>
|
53 |
+
</connection>
|
54 |
+
</payson_read>
|
55 |
+
</resources>
|
56 |
+
<sales>
|
57 |
+
<quote>
|
58 |
+
<totals>
|
59 |
+
<payson_invoice>
|
60 |
+
<class>payson/quote_address_total_invoice</class>
|
61 |
+
<after>subtotal,discount,shipping</after>
|
62 |
+
<before>tax,grand_total</before>
|
63 |
+
</payson_invoice>
|
64 |
+
</totals>
|
65 |
+
</quote>
|
66 |
+
<order_invoice>
|
67 |
+
<totals>
|
68 |
+
<payson_invoice>
|
69 |
+
<class>payson/order_invoice_total_invoice</class>
|
70 |
+
<after>subtotal,discount,shipping</after>
|
71 |
+
<before>tax,grand_total</before>
|
72 |
+
</payson_invoice>
|
73 |
+
</totals>
|
74 |
+
</order_invoice>
|
75 |
+
<order_creditmemo>
|
76 |
+
<totals>
|
77 |
+
<payson_invoice>
|
78 |
+
<class>payson/order_creditmemo_total_invoice</class>
|
79 |
+
<after>subtotal,discount,shipping</after>
|
80 |
+
<before>tax,grand_total</before>
|
81 |
+
</payson_invoice>
|
82 |
+
</totals>
|
83 |
+
</order_creditmemo>
|
84 |
+
</sales>
|
85 |
+
<fieldsets>
|
86 |
+
<sales_convert_quote_address>
|
87 |
+
<base_payson_invoice_fee>
|
88 |
+
<to_order>*</to_order>
|
89 |
+
</base_payson_invoice_fee>
|
90 |
+
<payson_invoice_fee>
|
91 |
+
<to_order>*</to_order>
|
92 |
+
</payson_invoice_fee>
|
93 |
+
</sales_convert_quote_address>
|
94 |
+
</fieldsets>
|
95 |
+
</global>
|
96 |
+
<frontend>
|
97 |
+
<secure_url>
|
98 |
+
<payson_checkout>/payson/checkout</payson_checkout>
|
99 |
+
</secure_url>
|
100 |
+
<routers>
|
101 |
+
<payson>
|
102 |
+
<use>standard</use>
|
103 |
+
<args>
|
104 |
+
<module>Payson_Payson</module>
|
105 |
+
<frontName>payson</frontName>
|
106 |
+
</args>
|
107 |
+
</payson>
|
108 |
+
</routers>
|
109 |
+
<translate>
|
110 |
+
<modules>
|
111 |
+
<Payson_Payson>
|
112 |
+
<files>
|
113 |
+
<default>Payson_Payson.csv</default>
|
114 |
+
</files>
|
115 |
+
</Payson_Payson>
|
116 |
+
</modules>
|
117 |
+
</translate>
|
118 |
+
<layout>
|
119 |
+
<updates>
|
120 |
+
<Payson_Payson>
|
121 |
+
<file>Payson.xml</file>
|
122 |
+
</Payson_Payson>
|
123 |
+
</updates>
|
124 |
+
</layout>
|
125 |
+
</frontend>
|
126 |
+
<adminhtml>
|
127 |
+
<translate>
|
128 |
+
<modules>
|
129 |
+
<Payson_Payson>
|
130 |
+
<files>
|
131 |
+
<default>Payson_Payson.csv</default>
|
132 |
+
</files>
|
133 |
+
</Payson_Payson>
|
134 |
+
</modules>
|
135 |
+
</translate>
|
136 |
+
<layout>
|
137 |
+
<updates>
|
138 |
+
<Payson_Payson>
|
139 |
+
<file>Payson.xml</file>
|
140 |
+
</Payson_Payson>
|
141 |
+
</updates>
|
142 |
+
</layout>
|
143 |
+
</adminhtml>
|
144 |
+
<default>
|
145 |
+
<payment>
|
146 |
+
<payson_standard>
|
147 |
+
<test_mode>0</test_mode>
|
148 |
+
<active>0</active>
|
149 |
+
<model>payson/method_standard</model>
|
150 |
+
<payment_action>authorize</payment_action>
|
151 |
+
<order_status>pending_payment</order_status>
|
152 |
+
<payment_guarantee>1</payment_guarantee>
|
153 |
+
<restore_on_cancel>1</restore_on_cancel>
|
154 |
+
<restore_on_error>1</restore_on_error>
|
155 |
+
</payson_standard>
|
156 |
+
<payson_invoice>
|
157 |
+
<active>0</active>
|
158 |
+
<activate_invoice>1</activate_invoice>
|
159 |
+
<model>payson/method_invoice</model>
|
160 |
+
<payment_action>authorize</payment_action>
|
161 |
+
<order_status>pending</order_status>
|
162 |
+
<invoice_fee_sek>0</invoice_fee_sek>
|
163 |
+
</payson_invoice>
|
164 |
+
</payment>
|
165 |
+
</default>
|
166 |
+
</config>
|
167 |
+
|
app/code/community/Payson/Payson/etc/system.xml
CHANGED
@@ -1,166 +1,166 @@
|
|
1 |
-
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
-
<config>
|
3 |
-
<sections>
|
4 |
-
<payment>
|
5 |
-
<groups>
|
6 |
-
<payson_standard translate="label" module="payson">
|
7 |
-
<label>Payson All in one Payment</label>
|
8 |
-
<comment><![CDATA[Payson Invoice requires a separate contract. Please contact Payson for more information<a href="http://payson.se" target="_blank">Click here</a>]]></comment>
|
9 |
-
<sort_order>-100</sort_order>
|
10 |
-
<show_in_default>1</show_in_default>
|
11 |
-
<show_in_website>1</show_in_website>
|
12 |
-
<show_in_store>1</show_in_store>
|
13 |
-
<fields>
|
14 |
-
<test_mode translate="label,comment">
|
15 |
-
<label>Test mode</label>
|
16 |
-
<comment>Enable/disable test mode.</comment>
|
17 |
-
<frontend_type>select</frontend_type>
|
18 |
-
<source_model>adminhtml/system_config_source_yesno</source_model>
|
19 |
-
<sort_order>5</sort_order>
|
20 |
-
<show_in_default>1</show_in_default>
|
21 |
-
<show_in_website>1</show_in_website>
|
22 |
-
<show_in_store>1</show_in_store>
|
23 |
-
</test_mode>
|
24 |
-
<active translate="label,comment">
|
25 |
-
<label>Enabled</label>
|
26 |
-
<comment>Enable/disable payment with Payson.</comment>
|
27 |
-
<frontend_type>select</frontend_type>
|
28 |
-
<source_model>adminhtml/system_config_source_yesno</source_model>
|
29 |
-
<sort_order>10</sort_order>
|
30 |
-
<show_in_default>1</show_in_default>
|
31 |
-
<show_in_website>1</show_in_website>
|
32 |
-
<show_in_store>1</show_in_store>
|
33 |
-
</active>
|
34 |
-
<email translate="label,comment">
|
35 |
-
<label>Email</label>
|
36 |
-
<comment>Email address bound to your Payson account.</comment>
|
37 |
-
<frontend_type>text</frontend_type>
|
38 |
-
<validate>validate-email</validate>
|
39 |
-
<sort_order>20</sort_order>
|
40 |
-
<show_in_default>1</show_in_default>
|
41 |
-
<show_in_website>0</show_in_website>
|
42 |
-
<show_in_store>0</show_in_store>
|
43 |
-
</email>
|
44 |
-
<agent_id translate="label,comment">
|
45 |
-
<label>Agent ID</label>
|
46 |
-
<comment>Agent ID is found on your Payson profile page.</comment>
|
47 |
-
<frontend_type>text</frontend_type>
|
48 |
-
<sort_order>30</sort_order>
|
49 |
-
<show_in_default>1</show_in_default>
|
50 |
-
<show_in_website>0</show_in_website>
|
51 |
-
<show_in_store>0</show_in_store>
|
52 |
-
</agent_id>
|
53 |
-
<md5_key translate="label,comment">
|
54 |
-
<label>API key</label>
|
55 |
-
<comment>API key is found on your Payson profile page.</comment>
|
56 |
-
<frontend_type>text</frontend_type>
|
57 |
-
<sort_order>40</sort_order>
|
58 |
-
<show_in_default>1</show_in_default>
|
59 |
-
<show_in_website>0</show_in_website>
|
60 |
-
<show_in_store>0</show_in_store>
|
61 |
-
</md5_key>
|
62 |
-
<payson_All_in_one translate="label">
|
63 |
-
<label>Please select the payment method</label>
|
64 |
-
<comment>Choose your prefered Payson payment</comment>
|
65 |
-
<frontend_type>select</frontend_type>
|
66 |
-
<source_model>payson/system_config_source_paysondirectmethod</source_model>
|
67 |
-
<sort_order>45</sort_order>
|
68 |
-
<show_in_default>1</show_in_default>
|
69 |
-
<show_in_website>1</show_in_website>
|
70 |
-
<show_in_store>1</show_in_store>
|
71 |
-
</payson_All_in_one>
|
72 |
-
<payment_guarantee translate="label,comment">
|
73 |
-
<label>Enable payment guarantee</label>
|
74 |
-
<comment>Enable/disable payment guarantee.</comment>
|
75 |
-
<frontend_type>select</frontend_type>
|
76 |
-
<source_model>adminhtml/system_config_source_yesno</source_model>
|
77 |
-
<sort_order>50</sort_order>
|
78 |
-
<show_in_default>0</show_in_default>
|
79 |
-
<show_in_website>0</show_in_website>
|
80 |
-
<show_in_store>0</show_in_store>
|
81 |
-
</payment_guarantee>
|
82 |
-
<restore_on_cancel translate="label,comment">
|
83 |
-
<label>Restore cart on cancel</label>
|
84 |
-
<comment>Restore cart when customer cancel the payment</comment>
|
85 |
-
<frontend_type>select</frontend_type>
|
86 |
-
<source_model>adminhtml/system_config_source_yesno</source_model>
|
87 |
-
<sort_order>100</sort_order>
|
88 |
-
<show_in_default>1</show_in_default>
|
89 |
-
<show_in_website>1</show_in_website>
|
90 |
-
<show_in_store>1</show_in_store>
|
91 |
-
</restore_on_cancel>
|
92 |
-
<restore_on_error translate="label,comment">
|
93 |
-
<label>Restore cart on error</label>
|
94 |
-
<comment>Restore cart when status from Payson is error</comment>
|
95 |
-
<frontend_type>select</frontend_type>
|
96 |
-
<source_model>adminhtml/system_config_source_yesno</source_model>
|
97 |
-
<sort_order>150</sort_order>
|
98 |
-
<show_in_default>1</show_in_default>
|
99 |
-
<show_in_website>1</show_in_website>
|
100 |
-
<show_in_store>1</show_in_store>
|
101 |
-
</restore_on_error>
|
102 |
-
<show_receipt_page translate="label,comment">
|
103 |
-
<label>Show receipt page</label>
|
104 |
-
<comment>Here you can enable or disable our receipt page</comment>
|
105 |
-
<frontend_type>select</frontend_type>
|
106 |
-
<source_model>adminhtml/system_config_source_yesno</source_model>
|
107 |
-
<sort_order>200</sort_order>
|
108 |
-
<show_in_default>1</show_in_default>
|
109 |
-
<show_in_website>0</show_in_website>
|
110 |
-
<show_in_store>0</show_in_store>
|
111 |
-
</show_receipt_page>
|
112 |
-
<vat_discount translate="label,comment">
|
113 |
-
<label>Enable average vat on discount</label>
|
114 |
-
<comment>Enable/disable average vat on discount</comment>
|
115 |
-
<frontend_type>select</frontend_type>
|
116 |
-
<source_model>adminhtml/system_config_source_yesno</source_model>
|
117 |
-
<sort_order>250</sort_order>
|
118 |
-
<show_in_default>1</show_in_default>
|
119 |
-
<show_in_website>0</show_in_website>
|
120 |
-
<show_in_store>0</show_in_store>
|
121 |
-
</vat_discount>
|
122 |
-
</fields>
|
123 |
-
</payson_standard>
|
124 |
-
<payson_invoice translate="label" module="payson">
|
125 |
-
<label>Payson invoice setup</label>
|
126 |
-
<sort_order>-99</sort_order>
|
127 |
-
<show_in_default>1</show_in_default>
|
128 |
-
<show_in_website>1</show_in_website>
|
129 |
-
<show_in_store>1</show_in_store>
|
130 |
-
<comment><![CDATA[Payson Invoice requires a separate contract. Please contact Payson for more information<a href="http://payson.se" target="_blank">Click here</a>]]></comment>
|
131 |
-
<fields>
|
132 |
-
<active_invoice translate="label,comment">
|
133 |
-
<label>Enabled</label>
|
134 |
-
<comment>Enable/disable invoice payment with Payson.</comment>
|
135 |
-
<frontend_type>select</frontend_type>
|
136 |
-
<source_model>adminhtml/system_config_source_yesno</source_model>
|
137 |
-
<sort_order>10</sort_order>
|
138 |
-
<show_in_default>1</show_in_default>
|
139 |
-
<show_in_website>1</show_in_website>
|
140 |
-
<show_in_store>1</show_in_store>
|
141 |
-
</active_invoice>
|
142 |
-
<invoice_fee_tax translate="label,comment">
|
143 |
-
<label>Invoice fee tax</label>
|
144 |
-
<comment>Tax class for invoice fees.</comment>
|
145 |
-
<frontend_type>select</frontend_type>
|
146 |
-
<source_model>adminhtml/system_config_source_shipping_taxclass</source_model>
|
147 |
-
<sort_order>20</sort_order>
|
148 |
-
<show_in_default>1</show_in_default>
|
149 |
-
<show_in_website>1</show_in_website>
|
150 |
-
<show_in_store>1</show_in_store>
|
151 |
-
</invoice_fee_tax>
|
152 |
-
<invoice_fee_sek translate="label,comment">
|
153 |
-
<label>Invoice fee (SEK)</label>
|
154 |
-
<comment>Input an invoice fee within the intervall of 0-40 including Vat.</comment>
|
155 |
-
<frontend_type>text</frontend_type>
|
156 |
-
<sort_order>30</sort_order>
|
157 |
-
<show_in_default>1</show_in_default>
|
158 |
-
<show_in_website>1</show_in_website>
|
159 |
-
<show_in_store>1</show_in_store>
|
160 |
-
</invoice_fee_sek>
|
161 |
-
</fields>
|
162 |
-
</payson_invoice>
|
163 |
-
</groups>
|
164 |
-
</payment>
|
165 |
-
</sections>
|
166 |
-
</config>
|
1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
+
<config>
|
3 |
+
<sections>
|
4 |
+
<payment>
|
5 |
+
<groups>
|
6 |
+
<payson_standard translate="label" module="payson">
|
7 |
+
<label>Payson All in one Payment</label>
|
8 |
+
<comment><![CDATA[Payson Invoice requires a separate contract. Please contact Payson for more information<a href="http://payson.se" target="_blank">Click here</a>]]></comment>
|
9 |
+
<sort_order>-100</sort_order>
|
10 |
+
<show_in_default>1</show_in_default>
|
11 |
+
<show_in_website>1</show_in_website>
|
12 |
+
<show_in_store>1</show_in_store>
|
13 |
+
<fields>
|
14 |
+
<test_mode translate="label,comment">
|
15 |
+
<label>Test mode</label>
|
16 |
+
<comment>Enable/disable test mode.</comment>
|
17 |
+
<frontend_type>select</frontend_type>
|
18 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
19 |
+
<sort_order>5</sort_order>
|
20 |
+
<show_in_default>1</show_in_default>
|
21 |
+
<show_in_website>1</show_in_website>
|
22 |
+
<show_in_store>1</show_in_store>
|
23 |
+
</test_mode>
|
24 |
+
<active translate="label,comment">
|
25 |
+
<label>Enabled</label>
|
26 |
+
<comment>Enable/disable payment with Payson.</comment>
|
27 |
+
<frontend_type>select</frontend_type>
|
28 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
29 |
+
<sort_order>10</sort_order>
|
30 |
+
<show_in_default>1</show_in_default>
|
31 |
+
<show_in_website>1</show_in_website>
|
32 |
+
<show_in_store>1</show_in_store>
|
33 |
+
</active>
|
34 |
+
<email translate="label,comment">
|
35 |
+
<label>Email</label>
|
36 |
+
<comment>Email address bound to your Payson account.</comment>
|
37 |
+
<frontend_type>text</frontend_type>
|
38 |
+
<validate>validate-email</validate>
|
39 |
+
<sort_order>20</sort_order>
|
40 |
+
<show_in_default>1</show_in_default>
|
41 |
+
<show_in_website>0</show_in_website>
|
42 |
+
<show_in_store>0</show_in_store>
|
43 |
+
</email>
|
44 |
+
<agent_id translate="label,comment">
|
45 |
+
<label>Agent ID</label>
|
46 |
+
<comment>Agent ID is found on your Payson profile page.</comment>
|
47 |
+
<frontend_type>text</frontend_type>
|
48 |
+
<sort_order>30</sort_order>
|
49 |
+
<show_in_default>1</show_in_default>
|
50 |
+
<show_in_website>0</show_in_website>
|
51 |
+
<show_in_store>0</show_in_store>
|
52 |
+
</agent_id>
|
53 |
+
<md5_key translate="label,comment">
|
54 |
+
<label>API key</label>
|
55 |
+
<comment>API key is found on your Payson profile page.</comment>
|
56 |
+
<frontend_type>text</frontend_type>
|
57 |
+
<sort_order>40</sort_order>
|
58 |
+
<show_in_default>1</show_in_default>
|
59 |
+
<show_in_website>0</show_in_website>
|
60 |
+
<show_in_store>0</show_in_store>
|
61 |
+
</md5_key>
|
62 |
+
<payson_All_in_one translate="label">
|
63 |
+
<label>Please select the payment method</label>
|
64 |
+
<comment>Choose your prefered Payson payment</comment>
|
65 |
+
<frontend_type>select</frontend_type>
|
66 |
+
<source_model>payson/system_config_source_paysondirectmethod</source_model>
|
67 |
+
<sort_order>45</sort_order>
|
68 |
+
<show_in_default>1</show_in_default>
|
69 |
+
<show_in_website>1</show_in_website>
|
70 |
+
<show_in_store>1</show_in_store>
|
71 |
+
</payson_All_in_one>
|
72 |
+
<payment_guarantee translate="label,comment">
|
73 |
+
<label>Enable payment guarantee</label>
|
74 |
+
<comment>Enable/disable payment guarantee.</comment>
|
75 |
+
<frontend_type>select</frontend_type>
|
76 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
77 |
+
<sort_order>50</sort_order>
|
78 |
+
<show_in_default>0</show_in_default>
|
79 |
+
<show_in_website>0</show_in_website>
|
80 |
+
<show_in_store>0</show_in_store>
|
81 |
+
</payment_guarantee>
|
82 |
+
<restore_on_cancel translate="label,comment">
|
83 |
+
<label>Restore cart on cancel</label>
|
84 |
+
<comment>Restore cart when customer cancel the payment</comment>
|
85 |
+
<frontend_type>select</frontend_type>
|
86 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
87 |
+
<sort_order>100</sort_order>
|
88 |
+
<show_in_default>1</show_in_default>
|
89 |
+
<show_in_website>1</show_in_website>
|
90 |
+
<show_in_store>1</show_in_store>
|
91 |
+
</restore_on_cancel>
|
92 |
+
<restore_on_error translate="label,comment">
|
93 |
+
<label>Restore cart on error</label>
|
94 |
+
<comment>Restore cart when status from Payson is error</comment>
|
95 |
+
<frontend_type>select</frontend_type>
|
96 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
97 |
+
<sort_order>150</sort_order>
|
98 |
+
<show_in_default>1</show_in_default>
|
99 |
+
<show_in_website>1</show_in_website>
|
100 |
+
<show_in_store>1</show_in_store>
|
101 |
+
</restore_on_error>
|
102 |
+
<show_receipt_page translate="label,comment">
|
103 |
+
<label>Show receipt page</label>
|
104 |
+
<comment>Here you can enable or disable our receipt page</comment>
|
105 |
+
<frontend_type>select</frontend_type>
|
106 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
107 |
+
<sort_order>200</sort_order>
|
108 |
+
<show_in_default>1</show_in_default>
|
109 |
+
<show_in_website>0</show_in_website>
|
110 |
+
<show_in_store>0</show_in_store>
|
111 |
+
</show_receipt_page>
|
112 |
+
<vat_discount translate="label,comment">
|
113 |
+
<label>Enable average vat on discount</label>
|
114 |
+
<comment>Enable/disable average vat on discount</comment>
|
115 |
+
<frontend_type>select</frontend_type>
|
116 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
117 |
+
<sort_order>250</sort_order>
|
118 |
+
<show_in_default>1</show_in_default>
|
119 |
+
<show_in_website>0</show_in_website>
|
120 |
+
<show_in_store>0</show_in_store>
|
121 |
+
</vat_discount>
|
122 |
+
</fields>
|
123 |
+
</payson_standard>
|
124 |
+
<payson_invoice translate="label" module="payson">
|
125 |
+
<label>Payson invoice setup</label>
|
126 |
+
<sort_order>-99</sort_order>
|
127 |
+
<show_in_default>1</show_in_default>
|
128 |
+
<show_in_website>1</show_in_website>
|
129 |
+
<show_in_store>1</show_in_store>
|
130 |
+
<comment><![CDATA[Payson Invoice requires a separate contract. Please contact Payson for more information<a href="http://payson.se" target="_blank">Click here</a>]]></comment>
|
131 |
+
<fields>
|
132 |
+
<active_invoice translate="label,comment">
|
133 |
+
<label>Enabled</label>
|
134 |
+
<comment>Enable/disable invoice payment with Payson.</comment>
|
135 |
+
<frontend_type>select</frontend_type>
|
136 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
137 |
+
<sort_order>10</sort_order>
|
138 |
+
<show_in_default>1</show_in_default>
|
139 |
+
<show_in_website>1</show_in_website>
|
140 |
+
<show_in_store>1</show_in_store>
|
141 |
+
</active_invoice>
|
142 |
+
<invoice_fee_tax translate="label,comment">
|
143 |
+
<label>Invoice fee tax</label>
|
144 |
+
<comment>Tax class for invoice fees.</comment>
|
145 |
+
<frontend_type>select</frontend_type>
|
146 |
+
<source_model>adminhtml/system_config_source_shipping_taxclass</source_model>
|
147 |
+
<sort_order>20</sort_order>
|
148 |
+
<show_in_default>1</show_in_default>
|
149 |
+
<show_in_website>1</show_in_website>
|
150 |
+
<show_in_store>1</show_in_store>
|
151 |
+
</invoice_fee_tax>
|
152 |
+
<invoice_fee_sek translate="label,comment">
|
153 |
+
<label>Invoice fee (SEK)</label>
|
154 |
+
<comment>Input an invoice fee within the intervall of 0-40 including Vat.</comment>
|
155 |
+
<frontend_type>text</frontend_type>
|
156 |
+
<sort_order>30</sort_order>
|
157 |
+
<show_in_default>1</show_in_default>
|
158 |
+
<show_in_website>1</show_in_website>
|
159 |
+
<show_in_store>1</show_in_store>
|
160 |
+
</invoice_fee_sek>
|
161 |
+
</fields>
|
162 |
+
</payson_invoice>
|
163 |
+
</groups>
|
164 |
+
</payment>
|
165 |
+
</sections>
|
166 |
+
</config>
|
app/design/adminhtml/default/default/template/Payson/Payson/total.phtml
CHANGED
@@ -1,11 +1,11 @@
|
|
1 |
-
<tr>
|
2 |
-
<td class="label"><?php echo($this->__('Invoice fee')); ?></td>
|
3 |
-
<td><?php
|
4 |
-
$this->_config = Mage::getModel('payson/config');
|
5 |
-
if($this->_config->CanInvoicePayment()){
|
6 |
-
echo($this->displayPriceAttribute('payson_invoice_fee'));
|
7 |
-
|
8 |
-
}
|
9 |
-
?></td>
|
10 |
-
</tr>
|
11 |
-
|
1 |
+
<tr>
|
2 |
+
<td class="label"><?php echo($this->__('Invoice fee')); ?></td>
|
3 |
+
<td><?php
|
4 |
+
$this->_config = Mage::getModel('payson/config');
|
5 |
+
if($this->_config->CanInvoicePayment()){
|
6 |
+
echo($this->displayPriceAttribute('payson_invoice_fee'));
|
7 |
+
|
8 |
+
}
|
9 |
+
?></td>
|
10 |
+
</tr>
|
11 |
+
|
app/design/frontend/base/default/layout/Payson.xml
CHANGED
@@ -1,45 +1,45 @@
|
|
1 |
-
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
-
<layout version="0.1.0">
|
3 |
-
<sales_order_print>
|
4 |
-
<reference name="order_totals">
|
5 |
-
<block type="payson/order_totals_fee" name="payson_invoice_fee" />
|
6 |
-
</reference>
|
7 |
-
</sales_order_print>
|
8 |
-
<sales_order_view>
|
9 |
-
<reference name="order_totals">
|
10 |
-
<block type="payson/order_totals_fee" name="payson_invoice_fee" />
|
11 |
-
</reference>
|
12 |
-
</sales_order_view>
|
13 |
-
<sales_order_invoice>
|
14 |
-
<reference name="invoice_totals">
|
15 |
-
<block type="payson/order_totals_fee" name="payson_invoice_fee" />
|
16 |
-
</reference>
|
17 |
-
</sales_order_invoice>
|
18 |
-
<sales_order_printinvoice>
|
19 |
-
<reference name="invoice_totals">
|
20 |
-
<block type="payson/order_totals_fee" name="payson_invoice_fee" />
|
21 |
-
</reference>
|
22 |
-
</sales_order_printinvoice>
|
23 |
-
<sales_order_creditmemo>
|
24 |
-
<reference name="creditmemo_totals">
|
25 |
-
<block type="payson/order_totals_fee" name="payson_invoice_fee" />
|
26 |
-
</reference>
|
27 |
-
</sales_order_creditmemo>
|
28 |
-
<sales_order_printcreditmemo>
|
29 |
-
<reference name="creditmemo_totals">
|
30 |
-
<block type="payson/order_totals_fee" name="payson_invoice_fee" />
|
31 |
-
</reference>
|
32 |
-
</sales_order_printcreditmemo>
|
33 |
-
<sales_email_order_items>
|
34 |
-
<reference name="order_totals">
|
35 |
-
<block type="payson/order_totals_fee" name="payson_invoice_fee" />
|
36 |
-
</reference>
|
37 |
-
</sales_email_order_items>
|
38 |
-
<sales_email_order_invoice_items>
|
39 |
-
<reference name="invoice_totals">
|
40 |
-
<block type="payson/order_totals_fee" name="payson_invoice_fee" />
|
41 |
-
</reference>
|
42 |
-
</sales_email_order_invoice_items>
|
43 |
-
<!-- sales_email_order_shipment_items sales_email_order_creditmemo_items -->
|
44 |
-
</layout>
|
45 |
-
|
1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
+
<layout version="0.1.0">
|
3 |
+
<sales_order_print>
|
4 |
+
<reference name="order_totals">
|
5 |
+
<block type="payson/order_totals_fee" name="payson_invoice_fee" />
|
6 |
+
</reference>
|
7 |
+
</sales_order_print>
|
8 |
+
<sales_order_view>
|
9 |
+
<reference name="order_totals">
|
10 |
+
<block type="payson/order_totals_fee" name="payson_invoice_fee" />
|
11 |
+
</reference>
|
12 |
+
</sales_order_view>
|
13 |
+
<sales_order_invoice>
|
14 |
+
<reference name="invoice_totals">
|
15 |
+
<block type="payson/order_totals_fee" name="payson_invoice_fee" />
|
16 |
+
</reference>
|
17 |
+
</sales_order_invoice>
|
18 |
+
<sales_order_printinvoice>
|
19 |
+
<reference name="invoice_totals">
|
20 |
+
<block type="payson/order_totals_fee" name="payson_invoice_fee" />
|
21 |
+
</reference>
|
22 |
+
</sales_order_printinvoice>
|
23 |
+
<sales_order_creditmemo>
|
24 |
+
<reference name="creditmemo_totals">
|
25 |
+
<block type="payson/order_totals_fee" name="payson_invoice_fee" />
|
26 |
+
</reference>
|
27 |
+
</sales_order_creditmemo>
|
28 |
+
<sales_order_printcreditmemo>
|
29 |
+
<reference name="creditmemo_totals">
|
30 |
+
<block type="payson/order_totals_fee" name="payson_invoice_fee" />
|
31 |
+
</reference>
|
32 |
+
</sales_order_printcreditmemo>
|
33 |
+
<sales_email_order_items>
|
34 |
+
<reference name="order_totals">
|
35 |
+
<block type="payson/order_totals_fee" name="payson_invoice_fee" />
|
36 |
+
</reference>
|
37 |
+
</sales_email_order_items>
|
38 |
+
<sales_email_order_invoice_items>
|
39 |
+
<reference name="invoice_totals">
|
40 |
+
<block type="payson/order_totals_fee" name="payson_invoice_fee" />
|
41 |
+
</reference>
|
42 |
+
</sales_email_order_invoice_items>
|
43 |
+
<!-- sales_email_order_shipment_items sales_email_order_creditmemo_items -->
|
44 |
+
</layout>
|
45 |
+
|
app/etc/modules/Payson_Payson.xml
CHANGED
@@ -1,14 +1,14 @@
|
|
1 |
-
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
-
<config>
|
3 |
-
<modules>
|
4 |
-
<Payson_Payson>
|
5 |
-
<active>true</active>
|
6 |
-
<codePool>community</codePool>
|
7 |
-
<version>1.8.3.2</version>
|
8 |
-
<depends>
|
9 |
-
<Mage_Payment />
|
10 |
-
</depends>
|
11 |
-
</Payson_Payson>
|
12 |
-
</modules>
|
13 |
-
</config>
|
14 |
-
|
1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<Payson_Payson>
|
5 |
+
<active>true</active>
|
6 |
+
<codePool>community</codePool>
|
7 |
+
<version>1.8.3.2</version>
|
8 |
+
<depends>
|
9 |
+
<Mage_Payment />
|
10 |
+
</depends>
|
11 |
+
</Payson_Payson>
|
12 |
+
</modules>
|
13 |
+
</config>
|
14 |
+
|
package.xml
CHANGED
@@ -1,18 +1,18 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Payson</name>
|
4 |
-
<version>1.8.3.
|
5 |
<stability>stable</stability>
|
6 |
-
<license uri="http://
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
-
<summary>Official Payson module for Magento
|
10 |
<description>This module integrates with Payson and allows you to charge your customers via Invoice, Card and direct bank transfers.</description>
|
11 |
-
<notes>Resolved
|
12 |
-
<authors><author><name>
|
13 |
-
<date>2016-
|
14 |
-
<time>
|
15 |
-
<contents><target name="magecommunity"><dir name="Payson"><dir name="Payson"><dir name="Block"><file name="Form.php" hash="74a8967879fbb6af999f0e513bc91323"/><dir name="Invoice"><file name="Form.php" hash="88a008948e1231b135ba8a798eeb1c66"/></dir><dir name="Order"><dir name="Totals"><file name="Fee.php" hash="3e8566e634d68d8df9bb70f597916980"/></dir></dir><dir name="Standard"><file name="Form.php" hash="c715cbec95494a9a26d261992429dff0"/></dir></dir><dir name="Helper"><dir name="Api"><dir name="Response"><file name="Interface.php" hash="51d0ffe7eefaa12eb9b4f2551e9f4259"/><dir name="Standard"><file name="Parameters.php" hash="6965b8259867c23a5e1e682e14491eb2"/></dir><file name="Standard.php" hash="cef827896629364fee49671af879adc3"/><file name="Validate.php" hash="34fb6626af3a6ac06e987c9e10a95796"/></dir></dir><file name="Api.php" hash="
|
16 |
<compatible/>
|
17 |
-
<dependencies><required><php><min>5.3.0</min><max>
|
18 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Payson</name>
|
4 |
+
<version>1.8.3.4</version>
|
5 |
<stability>stable</stability>
|
6 |
+
<license uri="http://opnesource.org/licenses/bsd-license.php">BSD licence</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
+
<summary>Official Payson module for Magento.</summary>
|
10 |
<description>This module integrates with Payson and allows you to charge your customers via Invoice, Card and direct bank transfers.</description>
|
11 |
+
<notes> Resolved issue with PHP-version.</notes>
|
12 |
+
<authors><author><name>Oscar Villegas</name><user>PaysonAB</user><email>integration@payson.se</email></author></authors>
|
13 |
+
<date>2016-07-20</date>
|
14 |
+
<time>07:18:17</time>
|
15 |
+
<contents><target name="magecommunity"><dir name="Payson"><dir name="Payson"><dir name="Block"><file name="Form.php" hash="74a8967879fbb6af999f0e513bc91323"/><dir name="Invoice"><file name="Form.php" hash="88a008948e1231b135ba8a798eeb1c66"/></dir><dir name="Order"><dir name="Totals"><file name="Fee.php" hash="3e8566e634d68d8df9bb70f597916980"/></dir></dir><dir name="Standard"><file name="Form.php" hash="c715cbec95494a9a26d261992429dff0"/></dir></dir><dir name="Helper"><dir name="Api"><dir name="Response"><file name="Interface.php" hash="51d0ffe7eefaa12eb9b4f2551e9f4259"/><dir name="Standard"><file name="Parameters.php" hash="6965b8259867c23a5e1e682e14491eb2"/></dir><file name="Standard.php" hash="cef827896629364fee49671af879adc3"/><file name="Validate.php" hash="34fb6626af3a6ac06e987c9e10a95796"/></dir></dir><file name="Api.php" hash="92d122867e4c7940dfc52e2cdc3ff6d9"/><file name="Data.php" hash="83ff59b1588c0b0ff8d2f7341589ea59"/><file name="FundingConstraint.php" hash="64cb684a5d30dd237e90d5e835ccddd3"/></dir><dir name="Model"><file name="Config.php" hash="7de7a2257df64a5e039de977edbc5492"/><dir name="Method"><file name="Abstract.php" hash="dadd8d3120cd0a187af661f54ecae0f7"/><file name="Invoice.php" hash="d3825c5f72d355d0ac0798c89e2087fa"/><file name="Standard.php" hash="136579912fb4971ebd2279d29a85afc3"/></dir><dir name="Mysql4"><file name="Setup.php" hash="3075fa047af3d56d6eac609004e6e1cc"/></dir><dir name="Order"><dir name="Creditmemo"><dir name="Total"><file name="Invoice.php" hash="19fadd6df40cd03528fb9c211c34a8bc"/></dir></dir><dir name="Invoice"><dir name="Total"><file name="Invoice.php" hash="87899d88d04362bc148eb51a0a9a076e"/></dir></dir></dir><dir name="Quote"><dir name="Address"><dir name="Total"><file name="Invoice.php" hash="44eef552e2dd3869c3181f3f939ac355"/></dir></dir></dir><file name="Standard.php" hash="233cf9d7ebe15137d98a8e1b23125a51"/><dir name="System"><dir name="Config"><dir name="Source"><file name="Paysondirectmethod.php" hash="5f0a8584217204a638d11dbf61891779"/></dir></dir></dir></dir><dir name="controllers"><dir name="Adminhtml"><dir name="Sales"><dir name="Order"><file name="ShipmentController.php" hash="068143a443700a95395bdb28ae39f170"/></dir></dir></dir><file name="CheckoutController.php" hash="18506fb22bc53d40869349a292d10eda"/><file name="IpnController.php" hash="e7b092cdd0011a3a1359a084bbaf14ad"/></dir><dir name="etc"><file name="config.xml" hash="c3a06f230d79b12d3d57f4c7404dfef0"/><file name="system.xml" hash="8f0a4d417de513c9f37a5feb993b4c46"/></dir><dir name="sql"><dir name="payson_setup"><file name="mysql4-install-0.1.0.php" hash="21cd9fd3436ba1eb2fc20eaaadb42106"/><file name="mysql4-upgrade-0.1.0-0.1.2.php" hash="5bbcb930748e3a87a220c0e9f8448a15"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="Payson.xml" hash="1ace2a646cd9a33521e7b392b6c5f3f1"/></dir><dir name="template"><dir name="Payson"><dir name="Payson"><file name="total.phtml" hash="e5e5ccdb4882fcfeaf7f6d5dfd9f27f7"/></dir></dir></dir><dir name="Payson"><dir name="Payson"><file name="total.phtml" hash="e05160dad39cd2cbf86decc34fb8d225"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="Payson.xml" hash="10c9f39b4f4353f66dc686f4a7d89bdb"/></dir><dir name="template"><dir name="Payson"><dir name="Payson"><file name="standard_form.phtml" hash="23c387ef94322de355e00f1a49e243d4"/></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Payson_Payson.xml" hash="f184ee78b6d8f4c48a99a028edcbd9c8"/></dir></target><target name="magelocale"><dir name="sv_SE"><file name="Payson_Payson.csv" hash="a83325bfdbfd4bdf330deb2a77c6ed9f"/></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="Payson"><dir name="Payson"><file name="Allinone.png" hash="98f586ec9a3e706d86662796bd776685"/><file name="Allinone3.png" hash="f9a4240a702838136584dc1256104ce5"/><file name="payson.gif" hash="638d0055cbc1a4bdc32e9fa1156b722a"/><file name="payson.png" hash="308916345711a4520313c94218c5bda7"/><file name="payson_faktura.png" hash="fa218c9949c05c6f3452d9f4c541da2c"/></dir></dir></dir></dir></dir></target></contents>
|
16 |
<compatible/>
|
17 |
+
<dependencies><required><php><min>5.3.0</min><max>6.0.0</max></php></required></dependencies>
|
18 |
</package>
|
skin/frontend/base/default/Payson/Payson/Allinone.png
CHANGED
Binary file
|
skin/frontend/base/default/Payson/Payson/Allinone3.png
CHANGED
Binary file
|
skin/frontend/base/default/Payson/Payson/payson.png
CHANGED
Binary file
|