Version Notes
Modifications to accommodate new code changes in CE 1.9/EE 1.14
Download this release
Release Info
Developer | Classy Llama |
Extension | CLS_Paypal_Credit_Card_Tokenization |
Version | 1.1.3 |
Comparing to | |
See all releases |
Code changes from version 1.1.2 to 1.1.3
- app/code/community/CLS/Paypal/Block/Paypal/Adminhtml/System/Config/Fieldset/Location.php +32 -0
- app/code/community/CLS/Paypal/CHANGELOG.txt +4 -0
- app/code/community/CLS/Paypal/README.md +9 -9
- app/code/community/CLS/Paypal/controllers/Paypal/ExpressController.php +61 -4
- app/code/community/CLS/Paypal/controllers/PaypalUk/ExpressController.php +61 -4
- app/code/community/CLS/Paypal/etc/config.xml +1 -1
- package.xml +5 -5
app/code/community/CLS/Paypal/Block/Paypal/Adminhtml/System/Config/Fieldset/Location.php
CHANGED
@@ -252,6 +252,27 @@ class CLS_Paypal_Block_Paypal_Adminhtml_System_Config_Fieldset_Location extends
|
|
252 |
}
|
253 |
paypalConflictsObject.ecCheckAvailability();
|
254 |
paypalConflictsObject.sharePayflowEnabling(enabler, isEvent);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
255 |
}
|
256 |
};
|
257 |
|
@@ -307,8 +328,19 @@ class CLS_Paypal_Block_Paypal_Adminhtml_System_Config_Fieldset_Location extends
|
|
307 |
}
|
308 |
}
|
309 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
310 |
$$(".paypal-enabler").each(function(enablerElement) {
|
311 |
paypalConflictsObject.checkPaymentConflicts(enablerElement, "initial");
|
|
|
312 |
});
|
313 |
if (paypalConflictsObject.isConflict || paypalConflictsObject.ecMissed) {
|
314 |
var notification = \'' . $this->helper('core')->jsQuoteEscape($this->__('The following error(s) occured:')) . '\';
|
252 |
}
|
253 |
paypalConflictsObject.ecCheckAvailability();
|
254 |
paypalConflictsObject.sharePayflowEnabling(enabler, isEvent);
|
255 |
+
},
|
256 |
+
|
257 |
+
handleBmlEnabler: function(event) {
|
258 |
+
required = Event.element(event);
|
259 |
+
var bml = $(required).bmlEnabler;
|
260 |
+
if (required.value == "1") {
|
261 |
+
bml.value = "1";
|
262 |
+
}
|
263 |
+
paypalConflictsObject.toggleBmlEnabler(required);
|
264 |
+
},
|
265 |
+
|
266 |
+
toggleBmlEnabler: function(required) {
|
267 |
+
var bml = $(required).bmlEnabler;
|
268 |
+
if (!bml) {
|
269 |
+
return;
|
270 |
+
}
|
271 |
+
if (required.value != "1") {
|
272 |
+
bml.value = "0";
|
273 |
+
$(bml).disable();
|
274 |
+
}
|
275 |
+
$(bml).requiresObj.indicateEnabled();
|
276 |
}
|
277 |
};
|
278 |
|
328 |
}
|
329 |
}
|
330 |
|
331 |
+
$$(".paypal-bml").each(function(bmlEnabler) {
|
332 |
+
$(bmlEnabler).classNames().each(function(className) {
|
333 |
+
if (className.indexOf("requires-") !== -1) {
|
334 |
+
var required = $(className.replace("requires-", ""));
|
335 |
+
required.bmlEnabler = bmlEnabler;
|
336 |
+
Event.observe(required, "change", paypalConflictsObject.handleBmlEnabler);
|
337 |
+
}
|
338 |
+
});
|
339 |
+
});
|
340 |
+
|
341 |
$$(".paypal-enabler").each(function(enablerElement) {
|
342 |
paypalConflictsObject.checkPaymentConflicts(enablerElement, "initial");
|
343 |
+
paypalConflictsObject.toggleBmlEnabler(enablerElement);
|
344 |
});
|
345 |
if (paypalConflictsObject.isConflict || paypalConflictsObject.ecMissed) {
|
346 |
var notification = \'' . $this->helper('core')->jsQuoteEscape($this->__('The following error(s) occured:')) . '\';
|
app/code/community/CLS/Paypal/CHANGELOG.txt
CHANGED
@@ -1,3 +1,7 @@
|
|
|
|
|
|
|
|
|
|
1 |
CLS_Paypal 1.1.2 (4/18/2013)
|
2 |
=======================================
|
3 |
[FIXED] Fixed system.xml verisign node, which was causing config to vanish for certain countries
|
1 |
+
CLS_Paypal 1.1.3 (5/12/2014)
|
2 |
+
=======================================
|
3 |
+
[CHANGED] Modifications to accommodate new code changes in CE 1.9/EE 1.14
|
4 |
+
|
5 |
CLS_Paypal 1.1.2 (4/18/2013)
|
6 |
=======================================
|
7 |
[FIXED] Fixed system.xml verisign node, which was causing config to vanish for certain countries
|
app/code/community/CLS/Paypal/README.md
CHANGED
@@ -1,25 +1,25 @@
|
|
1 |
-
CLS_Paypal Module Features
|
2 |
-
|
3 |
PCI Compliant saved credit cards with Paypal reference transactions.
|
4 |
|
5 |
-
|
6 |
|
7 |
* Customers can save their credit card information during the checkout process and then use the same credit card on future orders.
|
8 |
* Our solution is fully PCI Compliant since it stores a secure token as a reference transaction to the credit card data. Credit card data is not actually stored on the web site.
|
9 |
|
10 |
-
|
11 |
|
12 |
* Billing agreements are now available with Payflow Pro integration.
|
13 |
* Billing agreements can be created during Express Checkout even for guest or registering customers, for use with the new admin order management features.
|
14 |
|
15 |
-
|
16 |
|
17 |
* When viewing an order, admins have the option to select "New Order from this Payment." This option allows the same PayPal billing agreement or credit card used on the previous order to be charged on the new order.
|
18 |
* The ability to re-charge the previous PayPal billing agreement or credit card is also available when performing a re-order or editing an order.
|
19 |
* To better facilitate the use of the "New Order from this Payment" feature, the admin interface can now be used to create guest orders.
|
20 |
|
21 |
|
22 |
-
|
23 |
|
24 |
Billing Agreements allow you to bill customers at regular intervals.
|
25 |
|
@@ -30,7 +30,7 @@ Set up payments for dues, subscriptions, installments, and more.
|
|
30 |
* Customers can complete transactions without leaving your app, game, or website.
|
31 |
|
32 |
|
33 |
-
|
34 |
|
35 |
The features of this module are available for Magento integrations with the following PayPal solutions:
|
36 |
|
@@ -41,14 +41,14 @@ The features of this module are available for Magento integrations with the foll
|
|
41 |
* Express Checkout
|
42 |
|
43 |
|
44 |
-
|
45 |
|
46 |
* Community 1.5.0.1 and up
|
47 |
* Enterprise 1.10.0.1 and up
|
48 |
|
49 |
_NOTE:_ PayFlow Link compatibility is un-tested in Community 1.5.0.1 and Enterprise 1.10.0.1, because the core Magento codebase in these versions is no longer compatible with this PayPal solution.
|
50 |
|
51 |
-
|
52 |
|
53 |
Settings for this module's features can be found in System Configuration,
|
54 |
under the various existing PayPal configuration groups. In the Payment Methods
|
1 |
+
# CLS_Paypal Module Features
|
2 |
+
|
3 |
PCI Compliant saved credit cards with Paypal reference transactions.
|
4 |
|
5 |
+
### Saved Credit Card
|
6 |
|
7 |
* Customers can save their credit card information during the checkout process and then use the same credit card on future orders.
|
8 |
* Our solution is fully PCI Compliant since it stores a secure token as a reference transaction to the credit card data. Credit card data is not actually stored on the web site.
|
9 |
|
10 |
+
### Billing Agreements
|
11 |
|
12 |
* Billing agreements are now available with Payflow Pro integration.
|
13 |
* Billing agreements can be created during Express Checkout even for guest or registering customers, for use with the new admin order management features.
|
14 |
|
15 |
+
### Admin Order Management
|
16 |
|
17 |
* When viewing an order, admins have the option to select "New Order from this Payment." This option allows the same PayPal billing agreement or credit card used on the previous order to be charged on the new order.
|
18 |
* The ability to re-charge the previous PayPal billing agreement or credit card is also available when performing a re-order or editing an order.
|
19 |
* To better facilitate the use of the "New Order from this Payment" feature, the admin interface can now be used to create guest orders.
|
20 |
|
21 |
|
22 |
+
## What are PayPal Billing Agreements?
|
23 |
|
24 |
Billing Agreements allow you to bill customers at regular intervals.
|
25 |
|
30 |
* Customers can complete transactions without leaving your app, game, or website.
|
31 |
|
32 |
|
33 |
+
## Supported PayPal Solutions
|
34 |
|
35 |
The features of this module are available for Magento integrations with the following PayPal solutions:
|
36 |
|
41 |
* Express Checkout
|
42 |
|
43 |
|
44 |
+
## Magento Compatibility
|
45 |
|
46 |
* Community 1.5.0.1 and up
|
47 |
* Enterprise 1.10.0.1 and up
|
48 |
|
49 |
_NOTE:_ PayFlow Link compatibility is un-tested in Community 1.5.0.1 and Enterprise 1.10.0.1, because the core Magento codebase in these versions is no longer compatible with this PayPal solution.
|
50 |
|
51 |
+
## Configuration Instructions
|
52 |
|
53 |
Settings for this module's features can be found in System Configuration,
|
54 |
under the various existing PayPal configuration groups. In the Payment Methods
|
app/code/community/CLS/Paypal/controllers/Paypal/ExpressController.php
CHANGED
@@ -47,20 +47,38 @@ class CLS_Paypal_Paypal_ExpressController extends Mage_Paypal_ExpressController
|
|
47 |
}
|
48 |
|
49 |
$customer = Mage::getSingleton('customer/session')->getCustomer();
|
|
|
50 |
if ($customer && $customer->getId()) {
|
51 |
$this->_checkout->setCustomerWithAddressChange(
|
52 |
$customer, $this->_getQuote()->getBillingAddress(), $this->_getQuote()->getShippingAddress()
|
53 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
54 |
}
|
55 |
|
56 |
// billing agreement
|
57 |
$isBARequested = (bool)$this->getRequest()
|
58 |
->getParam(Mage_Paypal_Model_Express_Checkout::PAYMENT_INFO_TRANSPORT_BILLING_AGREEMENT);
|
59 |
-
|
60 |
if ($isBARequested) {
|
61 |
$this->_checkout->setIsBillingAgreementRequested($isBARequested);
|
62 |
}
|
63 |
|
|
|
|
|
|
|
|
|
|
|
64 |
// giropay
|
65 |
$this->_checkout->prepareGiropayUrls(
|
66 |
Mage::getUrl('checkout/onepage/success'),
|
@@ -68,7 +86,20 @@ class CLS_Paypal_Paypal_ExpressController extends Mage_Paypal_ExpressController
|
|
68 |
Mage::getUrl('checkout/onepage/success')
|
69 |
);
|
70 |
|
71 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
72 |
if ($token && $url = $this->_checkout->getRedirectUrl()) {
|
73 |
$this->_initToken($token);
|
74 |
$this->getResponse()->setRedirect($url);
|
@@ -92,8 +123,20 @@ class CLS_Paypal_Paypal_ExpressController extends Mage_Paypal_ExpressController
|
|
92 |
*
|
93 |
* @throws Mage_Core_Exception
|
94 |
*/
|
95 |
-
|
96 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
97 |
$quote = $this->_getQuote();
|
98 |
if (!$quote->hasItems() || $quote->getHasError()) {
|
99 |
$this->getResponse()->setHeader('HTTP/1.1','403 Forbidden');
|
@@ -103,6 +146,8 @@ class CLS_Paypal_Paypal_ExpressController extends Mage_Paypal_ExpressController
|
|
103 |
'config' => $this->_config,
|
104 |
'quote' => $quote,
|
105 |
));
|
|
|
|
|
106 |
}
|
107 |
|
108 |
/**
|
@@ -110,8 +155,20 @@ class CLS_Paypal_Paypal_ExpressController extends Mage_Paypal_ExpressController
|
|
110 |
*
|
111 |
* @return Mage_Checkout_Model_Session
|
112 |
*/
|
113 |
-
|
114 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
115 |
return Mage::getSingleton('checkout/session');
|
116 |
}
|
117 |
|
47 |
}
|
48 |
|
49 |
$customer = Mage::getSingleton('customer/session')->getCustomer();
|
50 |
+
$quoteCheckoutMethod = $this->_getQuote()->getCheckoutMethod();
|
51 |
if ($customer && $customer->getId()) {
|
52 |
$this->_checkout->setCustomerWithAddressChange(
|
53 |
$customer, $this->_getQuote()->getBillingAddress(), $this->_getQuote()->getShippingAddress()
|
54 |
);
|
55 |
+
} elseif ((!$quoteCheckoutMethod
|
56 |
+
|| $quoteCheckoutMethod != Mage_Checkout_Model_Type_Onepage::METHOD_REGISTER)
|
57 |
+
&& !Mage::helper('checkout')->isAllowedGuestCheckout(
|
58 |
+
$this->_getQuote(),
|
59 |
+
$this->_getQuote()->getStoreId()
|
60 |
+
)) {
|
61 |
+
Mage::getSingleton('core/session')->addNotice(
|
62 |
+
Mage::helper('paypal')->__('To proceed to Checkout, please log in using your email address.')
|
63 |
+
);
|
64 |
+
$this->redirectLogin();
|
65 |
+
Mage::getSingleton('customer/session')
|
66 |
+
->setBeforeAuthUrl(Mage::getUrl('*/*/*', array('_current' => true)));
|
67 |
+
return;
|
68 |
}
|
69 |
|
70 |
// billing agreement
|
71 |
$isBARequested = (bool)$this->getRequest()
|
72 |
->getParam(Mage_Paypal_Model_Express_Checkout::PAYMENT_INFO_TRANSPORT_BILLING_AGREEMENT);
|
|
|
73 |
if ($isBARequested) {
|
74 |
$this->_checkout->setIsBillingAgreementRequested($isBARequested);
|
75 |
}
|
76 |
|
77 |
+
// Bill Me Later
|
78 |
+
if (method_exists($this->_checkout, 'setIsBml')) { // This method only exists in later versions
|
79 |
+
$this->_checkout->setIsBml((bool)$this->getRequest()->getParam('bml'));
|
80 |
+
}
|
81 |
+
|
82 |
// giropay
|
83 |
$this->_checkout->prepareGiropayUrls(
|
84 |
Mage::getUrl('checkout/onepage/success'),
|
86 |
Mage::getUrl('checkout/onepage/success')
|
87 |
);
|
88 |
|
89 |
+
// Third parameter of the start method is only supported in later versions
|
90 |
+
if ((version_compare(Mage::getVersion(), '1.14.0.0', '>=') &&
|
91 |
+
method_exists('Mage', 'getEdition') &&
|
92 |
+
Mage::getEdition() == Mage::EDITION_ENTERPRISE) ||
|
93 |
+
(version_compare(Mage::getVersion(), '1.9.0.0', '>=') &&
|
94 |
+
method_exists('Mage', 'getEdition') &&
|
95 |
+
Mage::getEdition() == Mage::EDITION_COMMUNITY)) {
|
96 |
+
|
97 |
+
$button = (bool)$this->getRequest()->getParam(Mage_Paypal_Model_Express_Checkout::PAYMENT_INFO_BUTTON);
|
98 |
+
$token = $this->_checkout->start(Mage::getUrl('*/*/return'), Mage::getUrl('*/*/cancel'), $button);
|
99 |
+
} else {
|
100 |
+
$token = $this->_checkout->start(Mage::getUrl('*/*/return'), Mage::getUrl('*/*/cancel'));
|
101 |
+
}
|
102 |
+
|
103 |
if ($token && $url = $this->_checkout->getRedirectUrl()) {
|
104 |
$this->_initToken($token);
|
105 |
$this->getResponse()->setRedirect($url);
|
123 |
*
|
124 |
* @throws Mage_Core_Exception
|
125 |
*/
|
126 |
+
protected function _initCheckout()
|
127 |
{
|
128 |
+
// This method override only exists because the method was private
|
129 |
+
// in previous versions. Later versions re-defined it as protected,
|
130 |
+
// so in those versions we can just call parent
|
131 |
+
if ((version_compare(Mage::getVersion(), '1.14.0.0', '>=') &&
|
132 |
+
method_exists('Mage', 'getEdition') &&
|
133 |
+
Mage::getEdition() == Mage::EDITION_ENTERPRISE) ||
|
134 |
+
(version_compare(Mage::getVersion(), '1.9.0.0', '>=') &&
|
135 |
+
method_exists('Mage', 'getEdition') &&
|
136 |
+
Mage::getEdition() == Mage::EDITION_COMMUNITY)) {
|
137 |
+
return parent::_initCheckout();
|
138 |
+
}
|
139 |
+
|
140 |
$quote = $this->_getQuote();
|
141 |
if (!$quote->hasItems() || $quote->getHasError()) {
|
142 |
$this->getResponse()->setHeader('HTTP/1.1','403 Forbidden');
|
146 |
'config' => $this->_config,
|
147 |
'quote' => $quote,
|
148 |
));
|
149 |
+
|
150 |
+
return $this->_checkout;
|
151 |
}
|
152 |
|
153 |
/**
|
155 |
*
|
156 |
* @return Mage_Checkout_Model_Session
|
157 |
*/
|
158 |
+
protected function _getCheckoutSession()
|
159 |
{
|
160 |
+
// This method override only exists because the method was private
|
161 |
+
// in previous versions. Later versions re-defined it as protected,
|
162 |
+
// so in those versions we can just call parent
|
163 |
+
if ((version_compare(Mage::getVersion(), '1.14.0.0', '>=') &&
|
164 |
+
method_exists('Mage', 'getEdition') &&
|
165 |
+
Mage::getEdition() == Mage::EDITION_ENTERPRISE) ||
|
166 |
+
(version_compare(Mage::getVersion(), '1.9.0.0', '>=') &&
|
167 |
+
method_exists('Mage', 'getEdition') &&
|
168 |
+
Mage::getEdition() == Mage::EDITION_COMMUNITY)) {
|
169 |
+
return parent::_getCheckoutSession();
|
170 |
+
}
|
171 |
+
|
172 |
return Mage::getSingleton('checkout/session');
|
173 |
}
|
174 |
|
app/code/community/CLS/Paypal/controllers/PaypalUk/ExpressController.php
CHANGED
@@ -48,20 +48,38 @@ class CLS_Paypal_PaypalUk_ExpressController extends Mage_PaypalUk_ExpressControl
|
|
48 |
}
|
49 |
|
50 |
$customer = Mage::getSingleton('customer/session')->getCustomer();
|
|
|
51 |
if ($customer && $customer->getId()) {
|
52 |
$this->_checkout->setCustomerWithAddressChange(
|
53 |
$customer, $this->_getQuote()->getBillingAddress(), $this->_getQuote()->getShippingAddress()
|
54 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
55 |
}
|
56 |
|
57 |
// billing agreement
|
58 |
$isBARequested = (bool)$this->getRequest()
|
59 |
->getParam(Mage_Paypal_Model_Express_Checkout::PAYMENT_INFO_TRANSPORT_BILLING_AGREEMENT);
|
60 |
-
|
61 |
if ($isBARequested) {
|
62 |
$this->_checkout->setIsBillingAgreementRequested($isBARequested);
|
63 |
}
|
64 |
|
|
|
|
|
|
|
|
|
|
|
65 |
// giropay
|
66 |
$this->_checkout->prepareGiropayUrls(
|
67 |
Mage::getUrl('checkout/onepage/success'),
|
@@ -69,7 +87,20 @@ class CLS_Paypal_PaypalUk_ExpressController extends Mage_PaypalUk_ExpressControl
|
|
69 |
Mage::getUrl('checkout/onepage/success')
|
70 |
);
|
71 |
|
72 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
73 |
if ($token && $url = $this->_checkout->getRedirectUrl()) {
|
74 |
$this->_initToken($token);
|
75 |
$this->getResponse()->setRedirect($url);
|
@@ -93,8 +124,20 @@ class CLS_Paypal_PaypalUk_ExpressController extends Mage_PaypalUk_ExpressControl
|
|
93 |
*
|
94 |
* @throws Mage_Core_Exception
|
95 |
*/
|
96 |
-
|
97 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
98 |
$quote = $this->_getQuote();
|
99 |
if (!$quote->hasItems() || $quote->getHasError()) {
|
100 |
$this->getResponse()->setHeader('HTTP/1.1','403 Forbidden');
|
@@ -104,6 +147,8 @@ class CLS_Paypal_PaypalUk_ExpressController extends Mage_PaypalUk_ExpressControl
|
|
104 |
'config' => $this->_config,
|
105 |
'quote' => $quote,
|
106 |
));
|
|
|
|
|
107 |
}
|
108 |
|
109 |
/**
|
@@ -111,8 +156,20 @@ class CLS_Paypal_PaypalUk_ExpressController extends Mage_PaypalUk_ExpressControl
|
|
111 |
*
|
112 |
* @return Mage_Checkout_Model_Session
|
113 |
*/
|
114 |
-
|
115 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
116 |
return Mage::getSingleton('checkout/session');
|
117 |
}
|
118 |
|
48 |
}
|
49 |
|
50 |
$customer = Mage::getSingleton('customer/session')->getCustomer();
|
51 |
+
$quoteCheckoutMethod = $this->_getQuote()->getCheckoutMethod();
|
52 |
if ($customer && $customer->getId()) {
|
53 |
$this->_checkout->setCustomerWithAddressChange(
|
54 |
$customer, $this->_getQuote()->getBillingAddress(), $this->_getQuote()->getShippingAddress()
|
55 |
);
|
56 |
+
} elseif ((!$quoteCheckoutMethod
|
57 |
+
|| $quoteCheckoutMethod != Mage_Checkout_Model_Type_Onepage::METHOD_REGISTER)
|
58 |
+
&& !Mage::helper('checkout')->isAllowedGuestCheckout(
|
59 |
+
$this->_getQuote(),
|
60 |
+
$this->_getQuote()->getStoreId()
|
61 |
+
)) {
|
62 |
+
Mage::getSingleton('core/session')->addNotice(
|
63 |
+
Mage::helper('paypal')->__('To proceed to Checkout, please log in using your email address.')
|
64 |
+
);
|
65 |
+
$this->redirectLogin();
|
66 |
+
Mage::getSingleton('customer/session')
|
67 |
+
->setBeforeAuthUrl(Mage::getUrl('*/*/*', array('_current' => true)));
|
68 |
+
return;
|
69 |
}
|
70 |
|
71 |
// billing agreement
|
72 |
$isBARequested = (bool)$this->getRequest()
|
73 |
->getParam(Mage_Paypal_Model_Express_Checkout::PAYMENT_INFO_TRANSPORT_BILLING_AGREEMENT);
|
|
|
74 |
if ($isBARequested) {
|
75 |
$this->_checkout->setIsBillingAgreementRequested($isBARequested);
|
76 |
}
|
77 |
|
78 |
+
// Bill Me Later
|
79 |
+
if (method_exists($this->_checkout, 'setIsBml')) { // This method only exists in later versions
|
80 |
+
$this->_checkout->setIsBml((bool)$this->getRequest()->getParam('bml'));
|
81 |
+
}
|
82 |
+
|
83 |
// giropay
|
84 |
$this->_checkout->prepareGiropayUrls(
|
85 |
Mage::getUrl('checkout/onepage/success'),
|
87 |
Mage::getUrl('checkout/onepage/success')
|
88 |
);
|
89 |
|
90 |
+
// Third parameter of the start method is only supported in later versions
|
91 |
+
if ((version_compare(Mage::getVersion(), '1.14.0.0', '>=') &&
|
92 |
+
method_exists('Mage', 'getEdition') &&
|
93 |
+
Mage::getEdition() == Mage::EDITION_ENTERPRISE) ||
|
94 |
+
(version_compare(Mage::getVersion(), '1.9.0.0', '>=') &&
|
95 |
+
method_exists('Mage', 'getEdition') &&
|
96 |
+
Mage::getEdition() == Mage::EDITION_COMMUNITY)) {
|
97 |
+
|
98 |
+
$button = (bool)$this->getRequest()->getParam(Mage_Paypal_Model_Express_Checkout::PAYMENT_INFO_BUTTON);
|
99 |
+
$token = $this->_checkout->start(Mage::getUrl('*/*/return'), Mage::getUrl('*/*/cancel'), $button);
|
100 |
+
} else {
|
101 |
+
$token = $this->_checkout->start(Mage::getUrl('*/*/return'), Mage::getUrl('*/*/cancel'));
|
102 |
+
}
|
103 |
+
|
104 |
if ($token && $url = $this->_checkout->getRedirectUrl()) {
|
105 |
$this->_initToken($token);
|
106 |
$this->getResponse()->setRedirect($url);
|
124 |
*
|
125 |
* @throws Mage_Core_Exception
|
126 |
*/
|
127 |
+
protected function _initCheckout()
|
128 |
{
|
129 |
+
// This method override only exists because the method was private
|
130 |
+
// in previous versions. Later versions re-defined it as protected,
|
131 |
+
// so in those versions we can just call parent
|
132 |
+
if ((version_compare(Mage::getVersion(), '1.14.0.0', '>=') &&
|
133 |
+
method_exists('Mage', 'getEdition') &&
|
134 |
+
Mage::getEdition() == Mage::EDITION_ENTERPRISE) ||
|
135 |
+
(version_compare(Mage::getVersion(), '1.9.0.0', '>=') &&
|
136 |
+
method_exists('Mage', 'getEdition') &&
|
137 |
+
Mage::getEdition() == Mage::EDITION_COMMUNITY)) {
|
138 |
+
return parent::_initCheckout();
|
139 |
+
}
|
140 |
+
|
141 |
$quote = $this->_getQuote();
|
142 |
if (!$quote->hasItems() || $quote->getHasError()) {
|
143 |
$this->getResponse()->setHeader('HTTP/1.1','403 Forbidden');
|
147 |
'config' => $this->_config,
|
148 |
'quote' => $quote,
|
149 |
));
|
150 |
+
|
151 |
+
return $this->_checkout;
|
152 |
}
|
153 |
|
154 |
/**
|
156 |
*
|
157 |
* @return Mage_Checkout_Model_Session
|
158 |
*/
|
159 |
+
protected function _getCheckoutSession()
|
160 |
{
|
161 |
+
// This method override only exists because the method was private
|
162 |
+
// in previous versions. Later versions re-defined it as protected,
|
163 |
+
// so in those versions we can just call parent
|
164 |
+
if ((version_compare(Mage::getVersion(), '1.14.0.0', '>=') &&
|
165 |
+
method_exists('Mage', 'getEdition') &&
|
166 |
+
Mage::getEdition() == Mage::EDITION_ENTERPRISE) ||
|
167 |
+
(version_compare(Mage::getVersion(), '1.9.0.0', '>=') &&
|
168 |
+
method_exists('Mage', 'getEdition') &&
|
169 |
+
Mage::getEdition() == Mage::EDITION_COMMUNITY)) {
|
170 |
+
return parent::_getCheckoutSession();
|
171 |
+
}
|
172 |
+
|
173 |
return Mage::getSingleton('checkout/session');
|
174 |
}
|
175 |
|
app/code/community/CLS/Paypal/etc/config.xml
CHANGED
@@ -30,7 +30,7 @@
|
|
30 |
<config>
|
31 |
<modules>
|
32 |
<CLS_Paypal>
|
33 |
-
<version>1.1.
|
34 |
</CLS_Paypal>
|
35 |
</modules>
|
36 |
|
30 |
<config>
|
31 |
<modules>
|
32 |
<CLS_Paypal>
|
33 |
+
<version>1.1.3</version>
|
34 |
</CLS_Paypal>
|
35 |
</modules>
|
36 |
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>CLS_Paypal_Credit_Card_Tokenization</name>
|
4 |
-
<version>1.1.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/osl-3.0.php">Open Software License (OSL)</license>
|
7 |
<channel>community</channel>
|
@@ -75,11 +75,11 @@ Enable the module's various features from these groups, as well as setting
|
|
75 |
their configuration options independently of the standard credit card
|
76 |
and billing agreement configurations.
|
77 |
</description>
|
78 |
-
<notes>
|
79 |
<authors><author><name>Classy Llama</name><user>classyllama</user><email>info@classyllama.com</email></author></authors>
|
80 |
-
<date>2014-
|
81 |
-
<time>
|
82 |
-
<contents><target name="magecommunity"><dir name="CLS"><dir name="Paypal"><dir name="Block"><dir name="Adminhtml"><dir name="Sales"><dir name="Order"><dir name="Create"><file name="Customer.php" hash="4217b90d94215a6652dcc698ae348f6c"/></dir></dir></dir></dir><dir name="Customer"><file name="Storedcard.php" hash="1f19b685983a801be9a0e3a5224df987"/></dir><dir name="Payment"><dir name="Form"><file name="Cc.php" hash="4a6046c29e70e5d3668ee9840c642c57"/></dir></dir><dir name="Paypal"><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Fieldset"><file name="Location.php" hash="
|
83 |
<compatible/>
|
84 |
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
|
85 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>CLS_Paypal_Credit_Card_Tokenization</name>
|
4 |
+
<version>1.1.3</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/osl-3.0.php">Open Software License (OSL)</license>
|
7 |
<channel>community</channel>
|
75 |
their configuration options independently of the standard credit card
|
76 |
and billing agreement configurations.
|
77 |
</description>
|
78 |
+
<notes>Modifications to accommodate new code changes in CE 1.9/EE 1.14</notes>
|
79 |
<authors><author><name>Classy Llama</name><user>classyllama</user><email>info@classyllama.com</email></author></authors>
|
80 |
+
<date>2014-05-12</date>
|
81 |
+
<time>17:07:22</time>
|
82 |
+
<contents><target name="magecommunity"><dir name="CLS"><dir name="Paypal"><dir name="Block"><dir name="Adminhtml"><dir name="Sales"><dir name="Order"><dir name="Create"><file name="Customer.php" hash="4217b90d94215a6652dcc698ae348f6c"/></dir></dir></dir></dir><dir name="Customer"><file name="Storedcard.php" hash="1f19b685983a801be9a0e3a5224df987"/></dir><dir name="Payment"><dir name="Form"><file name="Cc.php" hash="4a6046c29e70e5d3668ee9840c642c57"/></dir></dir><dir name="Paypal"><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Fieldset"><file name="Location.php" hash="2730278f26f00678f7effaee7fabafae"/></dir></dir></dir></dir><dir name="Payflow"><dir name="Advanced"><file name="Form.php" hash="ab4f2b5d5b90d3d9c59793a44bcd3106"/></dir><dir name="Link"><file name="Form.php" hash="2078d80e9d02f4410ad521d669131f8c"/></dir></dir><dir name="Payment"><dir name="Form"><file name="Customerstored.php" hash="bf998008e870864c4af7f4da7b1f3776"/><dir name="Orderstored"><file name="Agreement.php" hash="96d1322d1ee4aaa1bfb1a29705ad3693"/></dir><file name="Orderstored.php" hash="ad8641f36a240b3582f9c2df872f1e7a"/></dir></dir></dir><dir name="Paypaluk"><dir name="Payment"><dir name="Form"><dir name="Orderstored"><file name="Agreement.php" hash="df2393007cedf8f07a9f5c075875287c"/></dir></dir></dir></dir></dir><file name="CHANGELOG.txt" hash="bde19ac07e76dce0f5b31ef8bc01ebc9"/><dir name="Helper"><file name="Data.php" hash="bde8720064fa1918b65d5ad6453202e5"/><dir name="Orderstored"><file name="Agreement.php" hash="87bc057e438e2364bfef6c8aaf298b72"/></dir><dir name="Paypal"><file name="Data.php" hash="334a4067ea02a750ad92d6ef228e5620"/></dir><file name="Storedcard.php" hash="d1dcbd3169146a8be0b0f743e780219b"/></dir><file name="LICENSE.txt" hash="71db18446bebc23ced8dd62644d16b5f"/><dir name="Model"><dir name="Adminhtml"><dir name="Sales"><dir name="Order"><file name="Create.php" hash="c4495227ebcf57985c76aee3484fdda8"/></dir></dir></dir><file name="Customerstored.php" hash="b665668e2dea947732e15b807d0ac0d9"/><file name="Observer.php" hash="adc978c7f0d89bc4bfb07a41d4ca1749"/><dir name="Paypal"><dir name="Api"><file name="Nvp.php" hash="1a39867d97056840b3b7220f21e7d8a8"/></dir><file name="Config.php" hash="4c94e4720c26c36373ee60b95fa4f855"/><file name="Direct.php" hash="ef3b0556bf0a42e06540918f6a199c89"/><dir name="Express"><file name="Checkout.php" hash="0089b290510d6558f405837c04b0d28d"/></dir><file name="Express.php" hash="01df608f519c2686f2b92bb29f0d710b"/><file name="Info.php" hash="e9e62f9a4de192ad2e4475cd329239ac"/><dir name="Method"><dir name="Orderstored"><file name="Agreement.php" hash="4e835c3ced7234f1fa85a9ac2135d159"/></dir></dir><file name="Payflowadvanced.php" hash="0c1b29ae87e3d99bc9213c98cd6fce62"/><file name="Payflowlink.php" hash="43d11dce5912b1065c09fc1deb1b8a55"/><file name="Payflowpro.php" hash="6d9dcd5593184acd546ead60988f7b9c"/><dir name="Stored"><file name="Abstract.php" hash="d3d462fdec47a0c7a9fbe400f3db7570"/><dir name="Customerstored"><file name="Direct.php" hash="4d8c9ca1bd51387e30020a5ab7cf18e0"/><file name="Payflow.php" hash="8f7bc5a7711c090c99e368269dff0256"/><file name="Payflowadvanced.php" hash="140b8ce3772c1b1e7eba27fda3621b40"/><file name="Payflowlink.php" hash="ec10930f8e13759b7eee19eca2a1a402"/><file name="Payflowpro.php" hash="e3e9106c86b2121d5bc22346cedb5e70"/></dir><file name="Customerstored.php" hash="b23a5792ec29617d5a67dc2b46eec014"/><dir name="Orderstored"><file name="Direct.php" hash="b5e43e468696da57104d14558cbf6796"/><file name="Payflow.php" hash="39d2b02a4ca5f21966d3733800edeb74"/><file name="Payflowadvanced.php" hash="81983792d914701ff5853e2372c62e87"/><file name="Payflowlink.php" hash="b2a23f8f793d4791207580eec2a1614c"/><file name="Payflowpro.php" hash="e740ceaeb6b6eabb7bf69d91c802248c"/></dir><file name="Orderstored.php" hash="da3695a5c11bc9692c44985682faf763"/><file name="Payflow.php" hash="cf8395c60cd48a890366932e0b771a2b"/></dir></dir><dir name="Paypaluk"><dir name="Api"><dir name="Express"><file name="Nvp.php" hash="e7f2f3d43460963e0c03be0e2570b945"/></dir><dir name="Nvp"><file name="Common.php" hash="61d14420b595f41ee05dcac38e7b6a30"/></dir><file name="Nvp.php" hash="cd91e35953728ec23cc3d12d370b3d01"/></dir><dir name="Express"><file name="Checkout.php" hash="30be50f4f37c4dd86a030ef8d8e746ab"/></dir><file name="Express.php" hash="3bd2447989120a23637112e83440bc34"/><dir name="Method"><file name="Agreement.php" hash="6130d3dd630e45822af00c03e43d2fdd"/><dir name="Orderstored"><file name="Agreement.php" hash="128ebc81894ff25ba713b4d4817dfda3"/></dir></dir></dir><dir name="Resource"><dir name="Customerstored"><file name="Collection.php" hash="c4005ceb547f913b6045ec83176d1183"/></dir><file name="Customerstored.php" hash="4817d0cc17fd7878db7635bdaf4d28ca"/></dir><dir name="System"><dir name="Config"><dir name="Backend"><file name="Payflowbaenabled.php" hash="01eea301e74636cfb3446a32875696f8"/></dir></dir></dir></dir><file name="README.md" hash="dea312ebc09b8818193ad889c9f90ac8"/><dir name="controllers"><dir name="Adminhtml"><dir name="Sales"><dir name="Order"><file name="CreateController.php" hash="7f38863fd347676405af75c90fce8eff"/></dir></dir></dir><dir name="Customer"><file name="StoredcardController.php" hash="265534f272fb6fc7a8c6198db29d0bbe"/></dir><dir name="Paypal"><file name="ExpressController.php" hash="3ee6219c5bc5bc126b96de6089fc5344"/></dir><dir name="PaypalUk"><file name="ExpressController.php" hash="630f0fae3d9a84e7fa0f8242f7e715d1"/></dir></dir><dir name="etc"><file name="config.xml" hash="96b2a2624631146340dbaf3bdef792f8"/><file name="system.xml" hash="ca0b09ccdfc71097e537e28188fb29d6"/></dir><dir name="sql"><dir name="cls_paypal_setup"><file name="mysql4-install-0.0.1.php" hash="11c35e801f758a3ce8b72cdeb8582ca1"/><file name="mysql4-upgrade-0.3.0-0.3.1.php" hash="238220d8673832b5c6bdc6904cd616b5"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="cls_paypal.xml" hash="79f01d08391f43d036eda62b7e065ab0"/></dir><dir name="template"><dir name="cls_paypal"><dir name="payment"><dir name="form"><file name="cc.phtml" hash="18374f975a2b4a2ff54d4694be4a994c"/><file name="customer_stored.phtml" hash="12522cb9f7acd46b1ffb61d1537994da"/><file name="order_stored.phtml" hash="b621f2c672d66cf418737cf68669976c"/></dir></dir><dir name="sales"><dir name="order"><dir name="create"><dir name="form"><file name="address.phtml" hash="1c6b60a4758aac055e935dfd56f468ae"/></dir></dir></dir><dir name="payment"><dir name="form"><dir name="orderstored"><file name="agreement.phtml" hash="a7c7568b9a7dda44673c1c195906f611"/></dir></dir></dir></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="cls_paypal.xml" hash="4c37fcb580cbcaa1a01a897045758728"/></dir><dir name="template"><dir name="cls_paypal"><dir name="customer"><file name="storedcard.phtml" hash="0561300c7a3185739f42a60d4afe0c6d"/></dir><dir name="payment"><dir name="form"><file name="cc.phtml" hash="3980e7d249cfd0990ec2a1b9a26d6f5c"/><file name="customer_stored.phtml" hash="71a894688d69f295f24e79239b2735c0"/></dir></dir><dir name="paypal"><dir name="payflow"><file name="info.phtml" hash="634070bc37d37dcb5a434f388d8a303c"/></dir></dir></dir></dir></dir></dir><dir name="enterprise"><dir name="default"><dir name="template"><file name="cls_paypal" hash="d41d8cd98f00b204e9800998ecf8427e"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="CLS_Paypal.xml" hash="9e629aac18f2e5f2c9feb266985c912f"/></dir></target><target name="magelocale"><dir name="en_US"><file name="CLS_Paypal.csv" hash="ab57482877d914bb1d02021d95c65520"/></dir></target></contents>
|
83 |
<compatible/>
|
84 |
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
|
85 |
</package>
|