Version Notes
Shopgate Modul
Download this release
Release Info
Developer | Stephan Recknagel |
Extension | shopgate_module |
Version | 2.9.29 |
Comparing to | |
See all releases |
Code changes from version 2.9.28 to 2.9.29
- app/code/community/Shopgate/Framework/Model/Carrier/Fix.php +3 -0
- app/code/community/Shopgate/Framework/Model/Export/Product/Csv.php +1 -1
- app/code/community/Shopgate/Framework/Model/Export/Product/Xml.php +1 -1
- app/code/community/Shopgate/Framework/Model/Mobile/Redirect.php +49 -34
- app/code/community/Shopgate/Framework/Model/Payment/Abstract.php +1 -1
- app/code/community/Shopgate/Framework/Model/Payment/Amazon.php +3 -3
- app/code/community/Shopgate/Framework/Model/Payment/Authorize.php +1 -1
- app/code/community/Shopgate/Framework/Model/Payment/Billsafe.php +1 -1
- app/code/community/Shopgate/Framework/Model/Payment/Cc.php +2 -2
- app/code/community/Shopgate/Framework/Model/Payment/Express.php +3 -3
- app/code/community/Shopgate/Framework/Model/Payment/Factory.php +2 -2
- app/code/community/Shopgate/Framework/Model/Payment/Payone/Abstract.php +17 -15
- app/code/community/Shopgate/Framework/Model/Payment/Payone/Cc.php +0 -2
- app/code/community/Shopgate/Framework/Model/Payment/Router.php +5 -6
- app/code/community/Shopgate/Framework/Model/Payment/Simple/Cod.php +5 -2
- app/code/community/Shopgate/Framework/Model/Payment/Simple/Cod/Msp.php +4 -4
- app/code/community/Shopgate/Framework/Model/Payment/Simple/Cod/Native.php +1 -1
- app/code/community/Shopgate/Framework/Model/Payment/Simple/Cod/Phoenix107.php +1 -1
- app/code/community/Shopgate/Framework/Model/Payment/Simple/Cod/Phoenix108.php +1 -1
- app/code/community/Shopgate/Framework/Model/Payment/Simple/Mws/Abstract.php +1 -2
- app/code/community/Shopgate/Framework/Model/Payment/Simple/Paypal.php +1 -1
- app/code/community/Shopgate/Framework/Model/Payment/Simple/Prepay.php +3 -3
- app/code/community/Shopgate/Framework/Model/Payment/Usaepay.php +1 -1
- app/code/community/Shopgate/Framework/Model/Payment/Wspp.php +3 -3
- app/code/community/Shopgate/Framework/Model/Shopgate/Plugin.php +20 -5
- app/code/community/Shopgate/Framework/Test/Helper/Data.php +5 -3
- app/code/community/Shopgate/Framework/Test/Helper/Payment/Wspp.php +114 -0
- app/code/community/Shopgate/Framework/Test/Helper/Payment/Wspp/providers/testGetActionByStatus.yaml +12 -0
- app/code/community/Shopgate/Framework/Test/Helper/Payment/Wspp/providers/testGetPaypalStatus.yaml +6 -0
- app/code/community/Shopgate/Framework/Test/Model/Payment/Abstract.php +253 -0
- app/code/community/Shopgate/Framework/Test/Model/Payment/Abstract/fixtures/testIsDisabled.yaml +1 -0
- app/code/community/Shopgate/Framework/Test/Model/Payment/Abstract/fixtures/testIsEnabled.yaml +1 -0
- app/code/community/Shopgate/Framework/Test/Model/Payment/Cc.php +146 -0
- app/code/community/Shopgate/Framework/Test/Model/Payment/Cc/Abstract.php +58 -0
- app/code/community/Shopgate/Framework/Test/Model/Payment/Cc/Abstract/providers/testGetCcTypeName.yaml +24 -0
- app/code/community/Shopgate/Framework/Test/Model/Payment/Cc/Authn.php +112 -0
- app/code/community/Shopgate/Framework/Test/Model/Payment/Cc/AuthnAbstract.php +243 -0
- app/code/community/Shopgate/Framework/Test/Model/Payment/Router.php +111 -0
- app/code/community/Shopgate/Framework/Test/Model/Payment/Router/Exception.php +26 -0
- app/code/community/Shopgate/Framework/Test/Model/Payment/Router/providers/testGetModelCombinations.yaml +29 -0
- app/code/community/Shopgate/Framework/Test/Model/Payment/Router/providers/testMethodPart.yaml +40 -0
- app/code/community/Shopgate/Framework/Test/Model/Payment/RouterAbstract.php +78 -0
- app/code/community/Shopgate/Framework/Test/Model/Payment/Simple.php +51 -0
- app/code/community/Shopgate/Framework/Test/Model/Payment/Simple/Billsafe.php +34 -0
- app/code/community/Shopgate/Framework/Test/Model/Payment/Simple/Cod.php +169 -0
- app/code/community/Shopgate/Framework/Test/Model/Payment/Simple/Cod/Msp.php +50 -0
- app/code/community/Shopgate/Framework/Test/Model/Payment/Simple/Cod/Native.php +50 -0
- app/code/community/Shopgate/Framework/Test/Model/Payment/Simple/Cod/Phoenix107.php +50 -0
- app/code/community/Shopgate/Framework/Test/Model/Payment/Simple/Cod/Phoenix108.php +50 -0
- app/code/community/Shopgate/Framework/Test/Model/Payment/Simple/Cod/fixtures/testGetCodMspMethod.yaml +4 -0
- app/code/community/Shopgate/Framework/Test/Model/Payment/Simple/Cod/fixtures/testGetCodNativeMethod.yaml +2 -0
- app/code/community/Shopgate/Framework/Test/Model/Payment/Simple/Cod/fixtures/testGetCodPhoenixMethod.yaml +4 -0
- app/code/community/Shopgate/Framework/Test/Model/Payment/Simple/Cod/fixtures/testGetNoCodMethod.yaml +4 -0
- app/code/community/Shopgate/Framework/Test/Model/Payment/Simple/Invoice.php +44 -0
- app/code/community/Shopgate/Framework/Test/Model/Payment/Simple/Mws.php +63 -0
- app/code/community/Shopgate/Framework/Test/Model/Payment/Simple/Mws/Mws.php +74 -0
- app/code/community/Shopgate/Framework/Test/Model/Payment/Simple/Mws/Mws15.php +70 -0
- app/code/community/Shopgate/Framework/Test/Model/Payment/Simple/Paypal.php +90 -0
- app/code/community/Shopgate/Framework/Test/Model/Payment/Simple/Paypal/Express.php +120 -0
- app/code/community/Shopgate/Framework/Test/Model/Payment/Simple/Paypal/fixtures/testGetPpExpressMethod.yaml +3 -0
- app/code/community/Shopgate/Framework/Test/Model/Payment/Simple/Paypal/fixtures/testGetPpStandardMethod.yaml +2 -0
- app/code/community/Shopgate/Framework/Test/Model/Payment/Simple/Prepay.php +131 -0
- app/code/community/Shopgate/Framework/Test/Model/Payment/Simple/Prepay/Checkmo.php +59 -0
- app/code/community/Shopgate/Framework/Test/Model/Payment/Simple/Prepay/Native.php +60 -0
- app/code/community/Shopgate/Framework/Test/Model/Payment/Simple/Prepay/Phoenix.php +60 -0
- app/code/community/Shopgate/Framework/Test/Model/Payment/Simple/Prepay/fixtures/testGetAllPrepayEnabled.yaml +4 -0
- app/code/community/Shopgate/Framework/Test/Model/Payment/Simple/Prepay/fixtures/testGetPrepayNativeMethod.yaml +3 -0
- app/code/community/Shopgate/Framework/Test/Model/Payment/Simple/Prepay/fixtures/testGetPrepayPhoenixMethod.yaml +2 -0
- app/code/community/Shopgate/Framework/Test/Model/Payment/Simple/Shopgate.php +101 -0
- app/code/community/Shopgate/Framework/Test/Model/Payment/Simple/Sue.php +63 -0
- app/code/community/Shopgate/Framework/Test/Model/Payment/Simple/Sue/Sue118.php +34 -0
- app/code/community/Shopgate/Framework/Test/Model/Payment/Simple/Sue/Sue300.php +93 -0
- app/code/community/Shopgate/Framework/Test/Model/Utility.php +140 -0
- app/code/community/Shopgate/Framework/changelog.txt +7 -0
- app/code/community/Shopgate/Framework/etc/config.xml +1 -5
- lib/Shopgate/changelog.txt +10 -0
- lib/Shopgate/classes/apis.php +2 -2
- lib/Shopgate/classes/configuration.php +104 -104
- lib/Shopgate/classes/core.php +3 -3
- lib/Shopgate/classes/customers.php +13 -13
- lib/Shopgate/classes/external_orders.php +6 -6
- lib/Shopgate/classes/helper/redirect/TemplateParser.php +2 -2
- lib/Shopgate/classes/items.php +32 -32
- lib/Shopgate/classes/orders.php +46 -31
- lib/Shopgate/tests/classes/helper/redirect/TemplateParserTest.php +137 -0
- package.xml +4 -4
app/code/community/Shopgate/Framework/Model/Carrier/Fix.php
CHANGED
@@ -96,6 +96,9 @@ class Shopgate_Framework_Model_Carrier_Fix
|
|
96 |
|
97 |
$storeViewId = Mage::helper("shopgate/config")->getConfig()->getStoreViewId();
|
98 |
$shippingIncludesTax = Mage::helper("tax")->shippingPriceIncludesTax($storeViewId);
|
|
|
|
|
|
|
99 |
|
100 |
$amount['shipping'] = $shippingIncludesTax ? $shippingInfo->getAmountGross() : $shippingInfo->getAmountNet();
|
101 |
|
96 |
|
97 |
$storeViewId = Mage::helper("shopgate/config")->getConfig()->getStoreViewId();
|
98 |
$shippingIncludesTax = Mage::helper("tax")->shippingPriceIncludesTax($storeViewId);
|
99 |
+
if (Mage::helper("tax")->getShippingTaxClass($storeViewId) == 0) {
|
100 |
+
$shippingIncludesTax = true;
|
101 |
+
};
|
102 |
|
103 |
$amount['shipping'] = $shippingIncludesTax ? $shippingInfo->getAmountGross() : $shippingInfo->getAmountNet();
|
104 |
|
app/code/community/Shopgate/Framework/Model/Export/Product/Csv.php
CHANGED
@@ -570,7 +570,7 @@ class Shopgate_Framework_Model_Export_Product_Csv extends Shopgate_Framework_Mod
|
|
570 |
protected function _setMsrp($product)
|
571 |
{
|
572 |
if ($msrp = $this->getMsrp($product)) {
|
573 |
-
$this->_defaultRow['msrp'] = $msrp;
|
574 |
}
|
575 |
}
|
576 |
|
570 |
protected function _setMsrp($product)
|
571 |
{
|
572 |
if ($msrp = $this->getMsrp($product)) {
|
573 |
+
$this->_defaultRow['msrp'] = round($msrp,2);
|
574 |
}
|
575 |
}
|
576 |
|
app/code/community/Shopgate/Framework/Model/Export/Product/Xml.php
CHANGED
@@ -525,7 +525,7 @@ class Shopgate_Framework_Model_Export_Product_Xml
|
|
525 |
$priceModel->setPrice($this->_formatPrice($price));
|
526 |
$priceModel->setCost($this->_formatPrice($this->item->getCost()));
|
527 |
$priceModel->setSalePrice($this->_formatPrice($finalPrice));
|
528 |
-
$priceModel->setMsrp($this->_formatPrice($this->item->getMsrp()));
|
529 |
|
530 |
|
531 |
if ($isGross) {
|
525 |
$priceModel->setPrice($this->_formatPrice($price));
|
526 |
$priceModel->setCost($this->_formatPrice($this->item->getCost()));
|
527 |
$priceModel->setSalePrice($this->_formatPrice($finalPrice));
|
528 |
+
$priceModel->setMsrp(round($this->_formatPrice($this->item->getMsrp()),2));
|
529 |
|
530 |
|
531 |
if ($isGross) {
|
app/code/community/Shopgate/Framework/Model/Mobile/Redirect.php
CHANGED
@@ -339,14 +339,12 @@ class Shopgate_Framework_Model_Mobile_Redirect extends Mage_Core_Model_Abstract
|
|
339 |
*
|
340 |
* @param $type string
|
341 |
* @param $objId string|int
|
342 |
-
*
|
343 |
-
* @return
|
344 |
*/
|
345 |
protected function _createMobileRedirect($type, $objId)
|
346 |
{
|
347 |
-
$
|
348 |
-
$redirectObj = $builder->buildMobileRedirect($_SERVER['HTTP_USER_AGENT'], $_GET, $_COOKIE);
|
349 |
-
|
350 |
try {
|
351 |
$storeId = $this->_config->getStoreViewId();
|
352 |
$siteName = Mage::app()->getWebsite()->getName();
|
@@ -371,17 +369,16 @@ class Shopgate_Framework_Model_Mobile_Redirect extends Mage_Core_Model_Abstract
|
|
371 |
$pageTitle = $siteName;
|
372 |
}
|
373 |
|
374 |
-
|
375 |
-
Shopgate_Helper_Redirect_TagsGenerator::SITE_PARAMETER_SITENAME
|
376 |
-
|
377 |
-
Shopgate_Helper_Redirect_TagsGenerator::
|
378 |
-
|
379 |
-
|
380 |
-
empty($pageTitle) ?: $redirectObj->addSiteParameter(
|
381 |
-
Shopgate_Helper_Redirect_TagsGenerator::SITE_PARAMETER_TITLE, $pageTitle);
|
382 |
|
383 |
if ($type == self::PRODUCT) {
|
384 |
-
|
|
|
385 |
/** @var Mage_Catalog_Model_Product $product */
|
386 |
$product = Mage::getModel('catalog/product')->setStoreId($storeId)->load($objId);
|
387 |
|
@@ -436,32 +433,50 @@ class Shopgate_Framework_Model_Mobile_Redirect extends Mage_Core_Model_Abstract
|
|
436 |
$priceGross = round($price * (1 + $taxRate), 2);
|
437 |
}
|
438 |
|
439 |
-
|
440 |
-
Shopgate_Helper_Redirect_TagsGenerator::SITE_PARAMETER_PRODUCT_IMAGE
|
441 |
-
|
442 |
-
Shopgate_Helper_Redirect_TagsGenerator::
|
443 |
-
|
444 |
-
Shopgate_Helper_Redirect_TagsGenerator::
|
445 |
-
|
446 |
-
Shopgate_Helper_Redirect_TagsGenerator::
|
447 |
-
|
448 |
-
|
449 |
-
empty($categoryName) ?: $redirectObj->addSiteParameter(
|
450 |
-
Shopgate_Helper_Redirect_TagsGenerator::SITE_PARAMETER_PRODUCT_CATEGORY, $categoryName);
|
451 |
-
empty($priceGross) ?: $redirectObj->addSiteParameter(
|
452 |
-
Shopgate_Helper_Redirect_TagsGenerator::SITE_PARAMETER_PRODUCT_PRICE, $priceGross);
|
453 |
-
empty($priceGross) ?: $redirectObj->addSiteParameter(
|
454 |
-
Shopgate_Helper_Redirect_TagsGenerator::SITE_PARAMETER_PRODUCT_CURRENCY, $defaultCurrency);
|
455 |
-
empty($priceNet) ?: $redirectObj->addSiteParameter(
|
456 |
-
Shopgate_Helper_Redirect_TagsGenerator::SITE_PARAMETER_PRODUCT_PRETAX_PRICE, $priceNet);
|
457 |
-
empty($priceNet) ?: $redirectObj->addSiteParameter(
|
458 |
-
Shopgate_Helper_Redirect_TagsGenerator::SITE_PARAMETER_PRODUCT_PRETAX_CURRENCY, $defaultCurrency);
|
459 |
|
|
|
|
|
|
|
|
|
|
|
|
|
460 |
}
|
|
|
461 |
} catch (Exception $e) {
|
462 |
ShopgateLogger::getInstance()->log('error on tag creation for type:' . $type . ' object ID:' . $objId);
|
463 |
}
|
464 |
|
465 |
return $redirectObj;
|
466 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
467 |
}
|
339 |
*
|
340 |
* @param $type string
|
341 |
* @param $objId string|int
|
342 |
+
*
|
343 |
+
* @return Shopgate_Helper_Redirect_MobileRedirect|null
|
344 |
*/
|
345 |
protected function _createMobileRedirect($type, $objId)
|
346 |
{
|
347 |
+
$redirectObj = null;
|
|
|
|
|
348 |
try {
|
349 |
$storeId = $this->_config->getStoreViewId();
|
350 |
$siteName = Mage::app()->getWebsite()->getName();
|
369 |
$pageTitle = $siteName;
|
370 |
}
|
371 |
|
372 |
+
$redirectVars = array(
|
373 |
+
Shopgate_Helper_Redirect_TagsGenerator::SITE_PARAMETER_SITENAME => $siteName,
|
374 |
+
Shopgate_Helper_Redirect_TagsGenerator::SITE_PARAMETER_DESKTOP_URL => $shopUrl,
|
375 |
+
Shopgate_Helper_Redirect_TagsGenerator::SITE_PARAMETER_MOBILE_WEB_URL => $mobileUrl,
|
376 |
+
Shopgate_Helper_Redirect_TagsGenerator::SITE_PARAMETER_TITLE => $pageTitle
|
377 |
+
);
|
|
|
|
|
378 |
|
379 |
if ($type == self::PRODUCT) {
|
380 |
+
$imageUrl = $ean = $categoryName = '';
|
381 |
+
|
382 |
/** @var Mage_Catalog_Model_Product $product */
|
383 |
$product = Mage::getModel('catalog/product')->setStoreId($storeId)->load($objId);
|
384 |
|
433 |
$priceGross = round($price * (1 + $taxRate), 2);
|
434 |
}
|
435 |
|
436 |
+
$varTemp = array(
|
437 |
+
Shopgate_Helper_Redirect_TagsGenerator::SITE_PARAMETER_PRODUCT_IMAGE => $imageUrl,
|
438 |
+
Shopgate_Helper_Redirect_TagsGenerator::SITE_PARAMETER_PRODUCT_NAME => $name,
|
439 |
+
Shopgate_Helper_Redirect_TagsGenerator::SITE_PARAMETER_PRODUCT_DESCRIPTION_SHORT => $description,
|
440 |
+
Shopgate_Helper_Redirect_TagsGenerator::SITE_PARAMETER_PRODUCT_EAN => $ean,
|
441 |
+
Shopgate_Helper_Redirect_TagsGenerator::SITE_PARAMETER_PRODUCT_AVAILABILITY => $availableText,
|
442 |
+
Shopgate_Helper_Redirect_TagsGenerator::SITE_PARAMETER_PRODUCT_CATEGORY => $categoryName,
|
443 |
+
Shopgate_Helper_Redirect_TagsGenerator::SITE_PARAMETER_PRODUCT_PRICE => $priceGross,
|
444 |
+
Shopgate_Helper_Redirect_TagsGenerator::SITE_PARAMETER_PRODUCT_PRETAX_PRICE => $priceNet
|
445 |
+
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
446 |
|
447 |
+
if ($price) {
|
448 |
+
$varTemp[Shopgate_Helper_Redirect_TagsGenerator::SITE_PARAMETER_PRODUCT_CURRENCY] = $defaultCurrency;
|
449 |
+
$varTemp[Shopgate_Helper_Redirect_TagsGenerator::SITE_PARAMETER_PRODUCT_PRETAX_CURRENCY] = $defaultCurrency;
|
450 |
+
}
|
451 |
+
|
452 |
+
$redirectVars = array_merge($redirectVars, $varTemp);
|
453 |
}
|
454 |
+
$redirectObj = $this->parseRedirectValues($redirectVars);
|
455 |
} catch (Exception $e) {
|
456 |
ShopgateLogger::getInstance()->log('error on tag creation for type:' . $type . ' object ID:' . $objId);
|
457 |
}
|
458 |
|
459 |
return $redirectObj;
|
460 |
}
|
461 |
+
|
462 |
+
/**
|
463 |
+
* Parses key values and adds them as site
|
464 |
+
* parameters to the mobile redirect object
|
465 |
+
*
|
466 |
+
* @param $redirectList
|
467 |
+
* @return Shopgate_Helper_Redirect_MobileRedirect
|
468 |
+
*/
|
469 |
+
private function parseRedirectValues($redirectList)
|
470 |
+
{
|
471 |
+
$builder = new ShopgateBuilder($this->_config);
|
472 |
+
$redirectObj = $builder->buildMobileRedirect($_SERVER['HTTP_USER_AGENT'], $_GET, $_COOKIE);
|
473 |
+
|
474 |
+
foreach ($redirectList as $redirectKey => $redirectValue) {
|
475 |
+
if ($redirectValue) {
|
476 |
+
$redirectObj->addSiteParameter($redirectKey, $redirectValue);
|
477 |
+
}
|
478 |
+
}
|
479 |
+
|
480 |
+
return $redirectObj;
|
481 |
+
}
|
482 |
}
|
app/code/community/Shopgate/Framework/Model/Payment/Abstract.php
CHANGED
@@ -90,7 +90,7 @@ class Shopgate_Framework_Model_Payment_Abstract extends Mage_Core_Model_Abstract
|
|
90 |
return $this->_shopgate_order;
|
91 |
}
|
92 |
|
93 |
-
$shopgateOrder = $this->_data;
|
94 |
if (!$shopgateOrder instanceof ShopgateOrder) {
|
95 |
$error = $this->_getHelper()->__('Incorrect class provided to: %s::_constructor()', get_class($this));
|
96 |
ShopgateLogger::getInstance()->log($error, ShopgateLogger::LOGTYPE_ERROR);
|
90 |
return $this->_shopgate_order;
|
91 |
}
|
92 |
|
93 |
+
$shopgateOrder = current($this->_data);
|
94 |
if (!$shopgateOrder instanceof ShopgateOrder) {
|
95 |
$error = $this->_getHelper()->__('Incorrect class provided to: %s::_constructor()', get_class($this));
|
96 |
ShopgateLogger::getInstance()->log($error, ShopgateLogger::LOGTYPE_ERROR);
|
app/code/community/Shopgate/Framework/Model/Payment/Amazon.php
CHANGED
@@ -26,7 +26,7 @@ class Shopgate_Framework_Model_Payment_Amazon
|
|
26 |
*/
|
27 |
public function createNewOrder($quote)
|
28 |
{
|
29 |
-
return Mage::getModel('shopgate/payment_simple_mws', new ShopgateOrder())->createNewOrder($quote);
|
30 |
}
|
31 |
|
32 |
/**
|
@@ -38,7 +38,7 @@ class Shopgate_Framework_Model_Payment_Amazon
|
|
38 |
*/
|
39 |
public function manipulateOrderWithPaymentData($order, $shopgateOrder)
|
40 |
{
|
41 |
-
return Mage::getModel('shopgate/payment_simple_mws', $shopgateOrder)->manipulateOrderWithPaymentData($order);
|
42 |
}
|
43 |
|
44 |
/**
|
@@ -52,7 +52,7 @@ class Shopgate_Framework_Model_Payment_Amazon
|
|
52 |
*/
|
53 |
public function prepareQuote($quote, $payment, $info)
|
54 |
{
|
55 |
-
return Mage::getModel('shopgate/payment_simple_mws', new ShopgateOrder())->prepareQuote($quote, $info);
|
56 |
}
|
57 |
}
|
58 |
|
26 |
*/
|
27 |
public function createNewOrder($quote)
|
28 |
{
|
29 |
+
return Mage::getModel('shopgate/payment_simple_mws', array(new ShopgateOrder()))->createNewOrder($quote);
|
30 |
}
|
31 |
|
32 |
/**
|
38 |
*/
|
39 |
public function manipulateOrderWithPaymentData($order, $shopgateOrder)
|
40 |
{
|
41 |
+
return Mage::getModel('shopgate/payment_simple_mws', array($shopgateOrder))->manipulateOrderWithPaymentData($order);
|
42 |
}
|
43 |
|
44 |
/**
|
52 |
*/
|
53 |
public function prepareQuote($quote, $payment, $info)
|
54 |
{
|
55 |
+
return Mage::getModel('shopgate/payment_simple_mws', array(new ShopgateOrder()))->prepareQuote($quote, $info);
|
56 |
}
|
57 |
}
|
58 |
|
app/code/community/Shopgate/Framework/Model/Payment/Authorize.php
CHANGED
@@ -39,6 +39,6 @@ class Shopgate_Framework_Model_Payment_Authorize
|
|
39 |
*/
|
40 |
public function manipulateOrderWithPaymentData($order, $shopgateOrder)
|
41 |
{
|
42 |
-
return Mage::getModel('shopgate/payment_cc_authn', $shopgateOrder)->manipulateOrderWithPaymentData($order);
|
43 |
}
|
44 |
}
|
39 |
*/
|
40 |
public function manipulateOrderWithPaymentData($order, $shopgateOrder)
|
41 |
{
|
42 |
+
return Mage::getModel('shopgate/payment_cc_authn', array($shopgateOrder))->manipulateOrderWithPaymentData($order);
|
43 |
}
|
44 |
}
|
app/code/community/Shopgate/Framework/Model/Payment/Billsafe.php
CHANGED
@@ -40,7 +40,7 @@ class Shopgate_Framework_Model_Payment_Billsafe extends Shopgate_Framework_Model
|
|
40 |
*/
|
41 |
public function manipulateOrderWithPaymentData($order, $shopgateOrder)
|
42 |
{
|
43 |
-
return Mage::getModel('shopgate/payment_simple_billsafe', $shopgateOrder)
|
44 |
->manipulateOrderWithPaymentData($order);
|
45 |
}
|
46 |
}
|
40 |
*/
|
41 |
public function manipulateOrderWithPaymentData($order, $shopgateOrder)
|
42 |
{
|
43 |
+
return Mage::getModel('shopgate/payment_simple_billsafe', array($shopgateOrder))
|
44 |
->manipulateOrderWithPaymentData($order);
|
45 |
}
|
46 |
}
|
app/code/community/Shopgate/Framework/Model/Payment/Cc.php
CHANGED
@@ -41,9 +41,9 @@ class Shopgate_Framework_Model_Payment_Cc extends Shopgate_Framework_Model_Payme
|
|
41 |
*/
|
42 |
public function getModelByPaymentMethod()
|
43 |
{
|
44 |
-
if (Mage::getModel('shopgate/payment_cc_authncim', $this->getShopgateOrder())->isValid()) {
|
45 |
$this->setPaymentMethod('AUTHNCIM_CC');
|
46 |
-
} elseif (Mage::getModel('shopgate/payment_cc_chargeitpro', $this->getShopgateOrder())->isValid()) {
|
47 |
$this->setPaymentMethod('CHARGEITPRO_CC');
|
48 |
}
|
49 |
|
41 |
*/
|
42 |
public function getModelByPaymentMethod()
|
43 |
{
|
44 |
+
if (Mage::getModel('shopgate/payment_cc_authncim', array($this->getShopgateOrder()))->isValid()) {
|
45 |
$this->setPaymentMethod('AUTHNCIM_CC');
|
46 |
+
} elseif (Mage::getModel('shopgate/payment_cc_chargeitpro', array($this->getShopgateOrder()))->isValid()) {
|
47 |
$this->setPaymentMethod('CHARGEITPRO_CC');
|
48 |
}
|
49 |
|
app/code/community/Shopgate/Framework/Model/Payment/Express.php
CHANGED
@@ -46,7 +46,7 @@ class Shopgate_Framework_Model_Payment_Express
|
|
46 |
*/
|
47 |
public function createNewOrder($quote)
|
48 |
{
|
49 |
-
return Mage::getModel('shopgate/payment_simple_paypal_express', new ShopgateOrder())->createNewOrder($quote);
|
50 |
}
|
51 |
|
52 |
/**
|
@@ -59,7 +59,7 @@ class Shopgate_Framework_Model_Payment_Express
|
|
59 |
*/
|
60 |
public function manipulateOrderWithPaymentData($order, $shopgateOrder)
|
61 |
{
|
62 |
-
return Mage::getModel('shopgate/payment_simple_paypal_express', $shopgateOrder)->manipulateOrderWithPaymentData($order);
|
63 |
}
|
64 |
|
65 |
/**
|
@@ -72,7 +72,7 @@ class Shopgate_Framework_Model_Payment_Express
|
|
72 |
*/
|
73 |
public function prepareQuote($quote, $data)
|
74 |
{
|
75 |
-
return Mage::getModel('shopgate/payment_simple_paypal_express', new ShopgateOrder())->prepareQuote($quote, $data);
|
76 |
}
|
77 |
|
78 |
/**
|
46 |
*/
|
47 |
public function createNewOrder($quote)
|
48 |
{
|
49 |
+
return Mage::getModel('shopgate/payment_simple_paypal_express', array(new ShopgateOrder()))->createNewOrder($quote);
|
50 |
}
|
51 |
|
52 |
/**
|
59 |
*/
|
60 |
public function manipulateOrderWithPaymentData($order, $shopgateOrder)
|
61 |
{
|
62 |
+
return Mage::getModel('shopgate/payment_simple_paypal_express', array($shopgateOrder))->manipulateOrderWithPaymentData($order);
|
63 |
}
|
64 |
|
65 |
/**
|
72 |
*/
|
73 |
public function prepareQuote($quote, $data)
|
74 |
{
|
75 |
+
return Mage::getModel('shopgate/payment_simple_paypal_express', array(new ShopgateOrder()))->prepareQuote($quote, $data);
|
76 |
}
|
77 |
|
78 |
/**
|
app/code/community/Shopgate/Framework/Model/Payment/Factory.php
CHANGED
@@ -61,9 +61,9 @@ class Shopgate_Framework_Model_Payment_Factory extends Shopgate_Framework_Model_
|
|
61 |
public function calculatePaymentClass()
|
62 |
{
|
63 |
if ($this->isSimpleClass()):
|
64 |
-
return Mage::getModel('shopgate/payment_simple', $this->getShopgateOrder())->getMethodModel();
|
65 |
elseif ($this->isComplexClass()):
|
66 |
-
return Mage::getModel('shopgate/payment_router', $this->getShopgateOrder())->getMethodModel();
|
67 |
else:
|
68 |
return false;
|
69 |
endif;
|
61 |
public function calculatePaymentClass()
|
62 |
{
|
63 |
if ($this->isSimpleClass()):
|
64 |
+
return Mage::getModel('shopgate/payment_simple', array($this->getShopgateOrder()))->getMethodModel();
|
65 |
elseif ($this->isComplexClass()):
|
66 |
+
return Mage::getModel('shopgate/payment_router', array($this->getShopgateOrder()))->getMethodModel();
|
67 |
else:
|
68 |
return false;
|
69 |
endif;
|
app/code/community/Shopgate/Framework/Model/Payment/Payone/Abstract.php
CHANGED
@@ -486,25 +486,27 @@ class Shopgate_Framework_Model_Payment_Payone_Abstract extends Shopgate_Framewor
|
|
486 |
*/
|
487 |
protected function _getPayoneTransactionExist()
|
488 |
{
|
489 |
-
if ($this->_transExists
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
$debug = $this->_getHelper()->__('Either "txid" or PayOne: Factory cannot be loaded');
|
502 |
ShopgateLogger::getInstance()->log($debug, ShopgateLogger::LOGTYPE_DEBUG);
|
|
|
503 |
}
|
504 |
} else {
|
505 |
-
|
|
|
506 |
}
|
507 |
-
|
|
|
508 |
}
|
509 |
|
510 |
/**
|
486 |
*/
|
487 |
protected function _getPayoneTransactionExist()
|
488 |
{
|
489 |
+
if (!is_null($this->_transExists)) {
|
490 |
+
return $this->_transExists;
|
491 |
+
}
|
492 |
+
|
493 |
+
$info = $this->getShopgateOrder()->getPaymentInfos();
|
494 |
+
$factory = Mage::getModel('payone_core/factory');
|
495 |
+
$this->_transExists = false;
|
496 |
+
|
497 |
+
if (isset($info['txid']) && $factory) {
|
498 |
+
$transaction = $factory->getModelTransaction();
|
499 |
+
if ($transaction->load($info['txid'], 'txid')->hasData()) {
|
500 |
+
$debug = $this->_getHelper()->__('PayOne transaction "%s" already exists', $transaction->getTxid());
|
|
|
501 |
ShopgateLogger::getInstance()->log($debug, ShopgateLogger::LOGTYPE_DEBUG);
|
502 |
+
return $this->_transExists = true;
|
503 |
}
|
504 |
} else {
|
505 |
+
$debug = $this->_getHelper()->__('Either "txid" or PayOne: Factory cannot be loaded');
|
506 |
+
ShopgateLogger::getInstance()->log($debug, ShopgateLogger::LOGTYPE_DEBUG);
|
507 |
}
|
508 |
+
|
509 |
+
return $this->_transExists;
|
510 |
}
|
511 |
|
512 |
/**
|
app/code/community/Shopgate/Framework/Model/Payment/Payone/Cc.php
CHANGED
@@ -65,8 +65,6 @@ class Shopgate_Framework_Model_Payment_Payone_Cc
|
|
65 |
/**
|
66 |
* @var string $key
|
67 |
* @var string $value
|
68 |
-
*
|
69 |
-
* @todo check mapping
|
70 |
*/
|
71 |
foreach ($this->getSystemConfig()->toSelectArray() as $key => $value) {
|
72 |
if (strtolower($value) == $paymentInfo['credit_card']['type']) {
|
65 |
/**
|
66 |
* @var string $key
|
67 |
* @var string $value
|
|
|
|
|
68 |
*/
|
69 |
foreach ($this->getSystemConfig()->toSelectArray() as $key => $value) {
|
70 |
if (strtolower($value) == $paymentInfo['credit_card']['type']) {
|
app/code/community/Shopgate/Framework/Model/Payment/Router.php
CHANGED
@@ -25,8 +25,6 @@
|
|
25 |
* Handles all payment routing for Multi-Payment implementations like PayOne & PayPal.
|
26 |
* It helps figure out which class model to use based on payment_method provided.
|
27 |
*
|
28 |
-
* Class Shopgate_Framework_Model_Payment_Router
|
29 |
-
*
|
30 |
* @author Konstantin Kiritsenko <konstantin@kiritsenko.com>
|
31 |
*/
|
32 |
class Shopgate_Framework_Model_Payment_Router extends Shopgate_Framework_Model_Payment_Abstract
|
@@ -48,7 +46,7 @@ class Shopgate_Framework_Model_Payment_Router extends Shopgate_Framework_Model_P
|
|
48 |
public function getModelByPaymentMethod()
|
49 |
{
|
50 |
$class = $this->getClassFromMethod();
|
51 |
-
$model = Mage::getModel($class, $this->getShopgateOrder());
|
52 |
|
53 |
if ($model) {
|
54 |
if ($model instanceof Shopgate_Framework_Model_Payment_Interface) {
|
@@ -105,8 +103,9 @@ class Shopgate_Framework_Model_Payment_Router extends Shopgate_Framework_Model_P
|
|
105 |
{
|
106 |
//user friendly, first part (1) == 0 for array
|
107 |
$index = $this->_payment_method_part;
|
|
|
108 |
$parts = explode('_', $this->getPaymentMethod());
|
109 |
-
return $parts[
|
110 |
}
|
111 |
|
112 |
/** ======= Fallback Functionality ======== */
|
@@ -123,7 +122,7 @@ class Shopgate_Framework_Model_Payment_Router extends Shopgate_Framework_Model_P
|
|
123 |
$class = $this->getCurrentClassShortName();
|
124 |
foreach ($combinations as $combination) {
|
125 |
$className = $class . $combination;
|
126 |
-
$model = Mage::getModel($className, $this->getShopgateOrder());
|
127 |
if ($model instanceof Shopgate_Framework_Model_Payment_Interface) {
|
128 |
return $model;
|
129 |
} elseif ($model instanceof Shopgate_Framework_Model_Payment_Router) {
|
@@ -158,7 +157,7 @@ class Shopgate_Framework_Model_Payment_Router extends Shopgate_Framework_Model_P
|
|
158 |
* @param $temp_string
|
159 |
* @param $collect
|
160 |
*/
|
161 |
-
function depthPicker($arr, $temp_string, &$collect)
|
162 |
{
|
163 |
if ($temp_string != "") {
|
164 |
$collect [] = $temp_string;
|
25 |
* Handles all payment routing for Multi-Payment implementations like PayOne & PayPal.
|
26 |
* It helps figure out which class model to use based on payment_method provided.
|
27 |
*
|
|
|
|
|
28 |
* @author Konstantin Kiritsenko <konstantin@kiritsenko.com>
|
29 |
*/
|
30 |
class Shopgate_Framework_Model_Payment_Router extends Shopgate_Framework_Model_Payment_Abstract
|
46 |
public function getModelByPaymentMethod()
|
47 |
{
|
48 |
$class = $this->getClassFromMethod();
|
49 |
+
$model = Mage::getModel($class, array($this->getShopgateOrder()));
|
50 |
|
51 |
if ($model) {
|
52 |
if ($model instanceof Shopgate_Framework_Model_Payment_Interface) {
|
103 |
{
|
104 |
//user friendly, first part (1) == 0 for array
|
105 |
$index = $this->_payment_method_part;
|
106 |
+
$index--;
|
107 |
$parts = explode('_', $this->getPaymentMethod());
|
108 |
+
return isset($parts[$index]) ? $parts[$index] : $parts[0];
|
109 |
}
|
110 |
|
111 |
/** ======= Fallback Functionality ======== */
|
122 |
$class = $this->getCurrentClassShortName();
|
123 |
foreach ($combinations as $combination) {
|
124 |
$className = $class . $combination;
|
125 |
+
$model = Mage::getModel($className, array($this->getShopgateOrder()));
|
126 |
if ($model instanceof Shopgate_Framework_Model_Payment_Interface) {
|
127 |
return $model;
|
128 |
} elseif ($model instanceof Shopgate_Framework_Model_Payment_Router) {
|
157 |
* @param $temp_string
|
158 |
* @param $collect
|
159 |
*/
|
160 |
+
private function depthPicker($arr, $temp_string, &$collect)
|
161 |
{
|
162 |
if ($temp_string != "") {
|
163 |
$collect [] = $temp_string;
|
app/code/community/Shopgate/Framework/Model/Payment/Simple/Cod.php
CHANGED
@@ -28,6 +28,9 @@
|
|
28 |
*/
|
29 |
class Shopgate_Framework_Model_Payment_Simple_Cod extends Shopgate_Framework_Model_Payment_Simple
|
30 |
{
|
|
|
|
|
|
|
31 |
const MODULE_CONFIG = 'Phoenix_CashOnDelivery';
|
32 |
|
33 |
/**
|
@@ -39,7 +42,7 @@ class Shopgate_Framework_Model_Payment_Simple_Cod extends Shopgate_Framework_Mod
|
|
39 |
public function getModelByPaymentMethod()
|
40 |
{
|
41 |
if ($this->_getConfigHelper()->getIsMagentoVersionLower1700() === false) {
|
42 |
-
$class = Mage::getModel('shopgate/payment_simple_cod_native', $this->getShopgateOrder());
|
43 |
if ($class instanceof Shopgate_Framework_Model_Payment_Interface && $class->isValid()) {
|
44 |
$this->setPaymentMethod('Native');
|
45 |
}
|
@@ -53,7 +56,7 @@ class Shopgate_Framework_Model_Payment_Simple_Cod extends Shopgate_Framework_Mod
|
|
53 |
}
|
54 |
}
|
55 |
|
56 |
-
$msp = Mage::getModel('shopgate/payment_simple_cod_msp', $this->getShopgateOrder());
|
57 |
if ($msp instanceof Shopgate_Framework_Model_Payment_Interface && $msp->isValid()) {
|
58 |
$this->setPaymentMethod('Msp');
|
59 |
}
|
28 |
*/
|
29 |
class Shopgate_Framework_Model_Payment_Simple_Cod extends Shopgate_Framework_Model_Payment_Simple
|
30 |
{
|
31 |
+
/**
|
32 |
+
* Necessary for isModuleActive() call
|
33 |
+
*/
|
34 |
const MODULE_CONFIG = 'Phoenix_CashOnDelivery';
|
35 |
|
36 |
/**
|
42 |
public function getModelByPaymentMethod()
|
43 |
{
|
44 |
if ($this->_getConfigHelper()->getIsMagentoVersionLower1700() === false) {
|
45 |
+
$class = Mage::getModel('shopgate/payment_simple_cod_native', array($this->getShopgateOrder()));
|
46 |
if ($class instanceof Shopgate_Framework_Model_Payment_Interface && $class->isValid()) {
|
47 |
$this->setPaymentMethod('Native');
|
48 |
}
|
56 |
}
|
57 |
}
|
58 |
|
59 |
+
$msp = Mage::getModel('shopgate/payment_simple_cod_msp', array($this->getShopgateOrder()));
|
60 |
if ($msp instanceof Shopgate_Framework_Model_Payment_Interface && $msp->isValid()) {
|
61 |
$this->setPaymentMethod('Msp');
|
62 |
}
|
app/code/community/Shopgate/Framework/Model/Payment/Simple/Cod/Msp.php
CHANGED
@@ -23,14 +23,14 @@
|
|
23 |
|
24 |
/**
|
25 |
* Support for MSP_COD plugin added v1.2.5 and up
|
26 |
-
*
|
27 |
* @author Konstantin Kiritsenko <konstantin@kiritsenko.com>
|
28 |
*/
|
29 |
class Shopgate_Framework_Model_Payment_Simple_Cod_Msp
|
30 |
extends Shopgate_Framework_Model_Payment_Simple_Cod_Abstract
|
31 |
implements Shopgate_Framework_Model_Payment_Interface
|
32 |
{
|
33 |
-
const MODULE_CONFIG
|
34 |
-
const
|
35 |
-
const
|
36 |
}
|
23 |
|
24 |
/**
|
25 |
* Support for MSP_COD plugin added v1.2.5 and up
|
26 |
+
*
|
27 |
* @author Konstantin Kiritsenko <konstantin@kiritsenko.com>
|
28 |
*/
|
29 |
class Shopgate_Framework_Model_Payment_Simple_Cod_Msp
|
30 |
extends Shopgate_Framework_Model_Payment_Simple_Cod_Abstract
|
31 |
implements Shopgate_Framework_Model_Payment_Interface
|
32 |
{
|
33 |
+
const MODULE_CONFIG = 'MSP_CashOnDelivery';
|
34 |
+
const PAYMENT_MODEL = 'msp_cashondelivery/cashondelivery';
|
35 |
+
const XML_CONFIG_ENABLED = 'payment/msp_cashondelivery/active';
|
36 |
}
|
app/code/community/Shopgate/Framework/Model/Payment/Simple/Cod/Native.php
CHANGED
@@ -30,7 +30,7 @@ class Shopgate_Framework_Model_Payment_Simple_Cod_Native
|
|
30 |
extends Shopgate_Framework_Model_Payment_Simple_Cod_Abstract
|
31 |
implements Shopgate_Framework_Model_Payment_Interface
|
32 |
{
|
33 |
-
const XML_CONFIG_ENABLED = 'payment/cashondelivery/active';
|
34 |
const MODULE_CONFIG = 'Mage_Payment';
|
35 |
const PAYMENT_MODEL = 'payment/method_cashondelivery';
|
|
|
36 |
}
|
30 |
extends Shopgate_Framework_Model_Payment_Simple_Cod_Abstract
|
31 |
implements Shopgate_Framework_Model_Payment_Interface
|
32 |
{
|
|
|
33 |
const MODULE_CONFIG = 'Mage_Payment';
|
34 |
const PAYMENT_MODEL = 'payment/method_cashondelivery';
|
35 |
+
const XML_CONFIG_ENABLED = 'payment/cashondelivery/active';
|
36 |
}
|
app/code/community/Shopgate/Framework/Model/Payment/Simple/Cod/Phoenix107.php
CHANGED
@@ -22,7 +22,7 @@
|
|
22 |
*/
|
23 |
|
24 |
/**
|
25 |
-
* Support for Phoenix_CashOnDelivery younger than v1.8
|
26 |
*
|
27 |
* @author Konstantin Kiritsenko <konstantin@kiritsenko.com>
|
28 |
*/
|
22 |
*/
|
23 |
|
24 |
/**
|
25 |
+
* Support for Phoenix_CashOnDelivery younger than v1.0.8 (not inclusive)
|
26 |
*
|
27 |
* @author Konstantin Kiritsenko <konstantin@kiritsenko.com>
|
28 |
*/
|
app/code/community/Shopgate/Framework/Model/Payment/Simple/Cod/Phoenix108.php
CHANGED
@@ -22,7 +22,7 @@
|
|
22 |
*/
|
23 |
|
24 |
/**
|
25 |
-
* Support for Phoenix_CashOnDelivery v1.8
|
26 |
*
|
27 |
* @author Konstantin Kiritsenko <konstantin@kiritsenko.com>
|
28 |
*/
|
22 |
*/
|
23 |
|
24 |
/**
|
25 |
+
* Support for Phoenix_CashOnDelivery v1.0.8 and older
|
26 |
*
|
27 |
* @author Konstantin Kiritsenko <konstantin@kiritsenko.com>
|
28 |
*/
|
app/code/community/Shopgate/Framework/Model/Payment/Simple/Mws/Abstract.php
CHANGED
@@ -219,7 +219,6 @@ class Shopgate_Framework_Model_Payment_Simple_Mws_Abstract
|
|
219 |
//backup for potential plugin lower version malfunctions
|
220 |
if (!$magentoOrder->getState()) {
|
221 |
$magentoOrder->setState(
|
222 |
-
Mage_Sales_Model_Order::STATE_PROCESSING,
|
223 |
Mage_Sales_Model_Order::STATE_PROCESSING
|
224 |
);
|
225 |
}
|
@@ -231,7 +230,7 @@ class Shopgate_Framework_Model_Payment_Simple_Mws_Abstract
|
|
231 |
/**
|
232 |
* Gets a payment type that is supported in
|
233 |
* higher versions of magento only
|
234 |
-
* @see fallback in
|
235 |
*
|
236 |
* @return mixed
|
237 |
*/
|
219 |
//backup for potential plugin lower version malfunctions
|
220 |
if (!$magentoOrder->getState()) {
|
221 |
$magentoOrder->setState(
|
|
|
222 |
Mage_Sales_Model_Order::STATE_PROCESSING
|
223 |
);
|
224 |
}
|
230 |
/**
|
231 |
* Gets a payment type that is supported in
|
232 |
* higher versions of magento only
|
233 |
+
* @see fallback in Mws15.php
|
234 |
*
|
235 |
* @return mixed
|
236 |
*/
|
app/code/community/Shopgate/Framework/Model/Payment/Simple/Paypal.php
CHANGED
@@ -37,7 +37,7 @@ class Shopgate_Framework_Model_Payment_Simple_Paypal extends Shopgate_Framework_
|
|
37 |
*/
|
38 |
public function getModelByPaymentMethod()
|
39 |
{
|
40 |
-
$standard = Mage::getModel('shopgate/payment_simple_paypal_standard', $this->getShopgateOrder());
|
41 |
|
42 |
if ($standard instanceof Shopgate_Framework_Model_Payment_Interface && $standard->isValid()) {
|
43 |
if ($this->_getConfigHelper()->getIsMagentoVersionLower1410()) {
|
37 |
*/
|
38 |
public function getModelByPaymentMethod()
|
39 |
{
|
40 |
+
$standard = Mage::getModel('shopgate/payment_simple_paypal_standard', array($this->getShopgateOrder()));
|
41 |
|
42 |
if ($standard instanceof Shopgate_Framework_Model_Payment_Interface && $standard->isValid()) {
|
43 |
if ($this->_getConfigHelper()->getIsMagentoVersionLower1410()) {
|
app/code/community/Shopgate/Framework/Model/Payment/Simple/Prepay.php
CHANGED
@@ -38,18 +38,18 @@ class Shopgate_Framework_Model_Payment_Simple_Prepay extends Shopgate_Framework_
|
|
38 |
public function getModelByPaymentMethod()
|
39 |
{
|
40 |
if ($this->_getConfigHelper()->getIsMagentoVersionLower1700() === false) {
|
41 |
-
$native = Mage::getModel('shopgate/payment_simple_prepay_native', $this->getShopgateOrder());
|
42 |
if ($native instanceof Shopgate_Framework_Model_Payment_Interface && $native->isValid()) {
|
43 |
$this->setPaymentMethod('Native');
|
44 |
}
|
45 |
} else {
|
46 |
-
$checkmo = Mage::getModel('shopgate/payment_simple_prepay_checkmo', $this->getShopgateOrder());
|
47 |
if ($checkmo instanceof Shopgate_Framework_Model_Payment_Interface && $checkmo->isValid()) {
|
48 |
$this->setPaymentMethod('Checkmo');
|
49 |
}
|
50 |
}
|
51 |
|
52 |
-
$phoenix = Mage::getModel('shopgate/payment_simple_prepay_phoenix', $this->getShopgateOrder());
|
53 |
if ($phoenix instanceof Shopgate_Framework_Model_Payment_Interface && $phoenix->isValid()) {
|
54 |
$this->setPaymentMethod('Phoenix');
|
55 |
}
|
38 |
public function getModelByPaymentMethod()
|
39 |
{
|
40 |
if ($this->_getConfigHelper()->getIsMagentoVersionLower1700() === false) {
|
41 |
+
$native = Mage::getModel('shopgate/payment_simple_prepay_native', array($this->getShopgateOrder()));
|
42 |
if ($native instanceof Shopgate_Framework_Model_Payment_Interface && $native->isValid()) {
|
43 |
$this->setPaymentMethod('Native');
|
44 |
}
|
45 |
} else {
|
46 |
+
$checkmo = Mage::getModel('shopgate/payment_simple_prepay_checkmo', array($this->getShopgateOrder()));
|
47 |
if ($checkmo instanceof Shopgate_Framework_Model_Payment_Interface && $checkmo->isValid()) {
|
48 |
$this->setPaymentMethod('Checkmo');
|
49 |
}
|
50 |
}
|
51 |
|
52 |
+
$phoenix = Mage::getModel('shopgate/payment_simple_prepay_phoenix', array($this->getShopgateOrder()));
|
53 |
if ($phoenix instanceof Shopgate_Framework_Model_Payment_Interface && $phoenix->isValid()) {
|
54 |
$this->setPaymentMethod('Phoenix');
|
55 |
}
|
app/code/community/Shopgate/Framework/Model/Payment/Usaepay.php
CHANGED
@@ -40,7 +40,7 @@ class Shopgate_Framework_Model_Payment_Usaepay
|
|
40 |
*/
|
41 |
public function manipulateOrderWithPaymentData($order, $shopgateOrder)
|
42 |
{
|
43 |
-
return Mage::getModel('shopgate/payment_cc_usaepay', $shopgateOrder)->manipulateOrderWithPaymentData($order);
|
44 |
}
|
45 |
|
46 |
}
|
40 |
*/
|
41 |
public function manipulateOrderWithPaymentData($order, $shopgateOrder)
|
42 |
{
|
43 |
+
return Mage::getModel('shopgate/payment_cc_usaepay', array($shopgateOrder))->manipulateOrderWithPaymentData($order);
|
44 |
}
|
45 |
|
46 |
}
|
app/code/community/Shopgate/Framework/Model/Payment/Wspp.php
CHANGED
@@ -41,7 +41,7 @@ class Shopgate_Framework_Model_Payment_Wspp
|
|
41 |
*/
|
42 |
public function createNewOrder($quote)
|
43 |
{
|
44 |
-
return Mage::getModel('shopgate/payment_pp_wspp', new ShopgateOrder())->createNewOrder($quote);
|
45 |
}
|
46 |
|
47 |
/**
|
@@ -53,7 +53,7 @@ class Shopgate_Framework_Model_Payment_Wspp
|
|
53 |
*/
|
54 |
public function manipulateOrderWithPaymentData($order, $shopgateOrder)
|
55 |
{
|
56 |
-
return Mage::getModel('shopgate/payment_pp_wspp', $shopgateOrder)->manipulateOrderWithPaymentData($order);
|
57 |
}
|
58 |
|
59 |
/**
|
@@ -64,7 +64,7 @@ class Shopgate_Framework_Model_Payment_Wspp
|
|
64 |
*/
|
65 |
public function prepareQuote($quote, $data)
|
66 |
{
|
67 |
-
return Mage::getModel('shopgate/payment_pp_wspp', new ShopgateOrder())->prepareQuote($quote, $data);
|
68 |
}
|
69 |
|
70 |
/**
|
41 |
*/
|
42 |
public function createNewOrder($quote)
|
43 |
{
|
44 |
+
return Mage::getModel('shopgate/payment_pp_wspp', array(new ShopgateOrder()))->createNewOrder($quote);
|
45 |
}
|
46 |
|
47 |
/**
|
53 |
*/
|
54 |
public function manipulateOrderWithPaymentData($order, $shopgateOrder)
|
55 |
{
|
56 |
+
return Mage::getModel('shopgate/payment_pp_wspp', array($shopgateOrder))->manipulateOrderWithPaymentData($order);
|
57 |
}
|
58 |
|
59 |
/**
|
64 |
*/
|
65 |
public function prepareQuote($quote, $data)
|
66 |
{
|
67 |
+
return Mage::getModel('shopgate/payment_pp_wspp', array(new ShopgateOrder()))->prepareQuote($quote, $data);
|
68 |
}
|
69 |
|
70 |
/**
|
app/code/community/Shopgate/Framework/Model/Shopgate/Plugin.php
CHANGED
@@ -120,7 +120,7 @@ class Shopgate_Framework_Model_Shopgate_Plugin extends ShopgatePlugin
|
|
120 |
{
|
121 |
if (!$this->_factory) {
|
122 |
$shopgateOrder = Mage::getModel('core/session')->getShopgateOrder();
|
123 |
-
$factory = Mage::getModel('shopgate/payment_factory', $shopgateOrder);
|
124 |
$this->_setFactory($factory);
|
125 |
}
|
126 |
return $this->_factory;
|
@@ -1032,7 +1032,8 @@ class Shopgate_Framework_Model_Shopgate_Plugin extends ShopgatePlugin
|
|
1032 |
);
|
1033 |
|
1034 |
$quote->setIsActive('0');
|
1035 |
-
$
|
|
|
1036 |
$quote->save();
|
1037 |
if (empty($externalCustomerId)) {
|
1038 |
$quote->getBillingAddress()->isObjectNew(false);
|
@@ -1425,7 +1426,10 @@ class Shopgate_Framework_Model_Shopgate_Plugin extends ShopgatePlugin
|
|
1425 |
} else {
|
1426 |
$stateObject = new Varien_Object();
|
1427 |
$methodInstance = $magentoOrder->getPayment()->getMethodInstance();
|
1428 |
-
|
|
|
|
|
|
|
1429 |
|
1430 |
if (!$stateObject->getState()) {
|
1431 |
$status = $methodInstance->getConfigData("order_status");
|
@@ -1434,8 +1438,10 @@ class Shopgate_Framework_Model_Shopgate_Plugin extends ShopgatePlugin
|
|
1434 |
&& Mage::getConfig()->getModuleConfig('Phoenix_CashOnDelivery')->is('active', 'true')
|
1435 |
) {
|
1436 |
$stateObject->setState(Mage_Sales_Model_Order::STATE_NEW);
|
1437 |
-
}
|
1438 |
$stateObject->setState($this->_getHelper()->getStateForStatus($status));
|
|
|
|
|
1439 |
}
|
1440 |
|
1441 |
$stateObject->setStatus($status);
|
@@ -2090,7 +2096,14 @@ class Shopgate_Framework_Model_Shopgate_Plugin extends ShopgatePlugin
|
|
2090 |
} else {
|
2091 |
$ids = $collection->getAllIds();
|
2092 |
}
|
2093 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2094 |
return $ids;
|
2095 |
}
|
2096 |
|
@@ -2136,6 +2149,8 @@ class Shopgate_Framework_Model_Shopgate_Plugin extends ShopgatePlugin
|
|
2136 |
}
|
2137 |
|
2138 |
/**
|
|
|
|
|
2139 |
* @param int $limit
|
2140 |
* @param int $offset
|
2141 |
* @param array $uids
|
120 |
{
|
121 |
if (!$this->_factory) {
|
122 |
$shopgateOrder = Mage::getModel('core/session')->getShopgateOrder();
|
123 |
+
$factory = Mage::getModel('shopgate/payment_factory', array($shopgateOrder));
|
124 |
$this->_setFactory($factory);
|
125 |
}
|
126 |
return $this->_factory;
|
1032 |
);
|
1033 |
|
1034 |
$quote->setIsActive('0');
|
1035 |
+
$ip = $order->getCustomerIp() ? $order->getCustomerIp() : 'shopgate.com';
|
1036 |
+
$quote->setRemoteIp($ip);
|
1037 |
$quote->save();
|
1038 |
if (empty($externalCustomerId)) {
|
1039 |
$quote->getBillingAddress()->isObjectNew(false);
|
1426 |
} else {
|
1427 |
$stateObject = new Varien_Object();
|
1428 |
$methodInstance = $magentoOrder->getPayment()->getMethodInstance();
|
1429 |
+
if (strpos($shopgateOrder->getPaymentMethod(), 'PAYONE') === false) {
|
1430 |
+
// avoid calling Payone again. Initialization will be removed from here in the nearest future
|
1431 |
+
$methodInstance->initialize($methodInstance->getConfigData('payment_action'), $stateObject);
|
1432 |
+
}
|
1433 |
|
1434 |
if (!$stateObject->getState()) {
|
1435 |
$status = $methodInstance->getConfigData("order_status");
|
1438 |
&& Mage::getConfig()->getModuleConfig('Phoenix_CashOnDelivery')->is('active', 'true')
|
1439 |
) {
|
1440 |
$stateObject->setState(Mage_Sales_Model_Order::STATE_NEW);
|
1441 |
+
} elseif ($status) {
|
1442 |
$stateObject->setState($this->_getHelper()->getStateForStatus($status));
|
1443 |
+
} else {
|
1444 |
+
$stateObject->setState(Mage_Sales_Model_Order::STATE_PROCESSING);
|
1445 |
}
|
1446 |
|
1447 |
$stateObject->setStatus($status);
|
2096 |
} else {
|
2097 |
$ids = $collection->getAllIds();
|
2098 |
}
|
2099 |
+
|
2100 |
+
if (empty($ids) || count($ids) == 1) {
|
2101 |
+
$this->log(
|
2102 |
+
"Warning! Low amount of items to export, id's: " . print_r($ids),
|
2103 |
+
ShopgateLogger::LOGTYPE_DEBUG
|
2104 |
+
);
|
2105 |
+
}
|
2106 |
+
|
2107 |
return $ids;
|
2108 |
}
|
2109 |
|
2149 |
}
|
2150 |
|
2151 |
/**
|
2152 |
+
* Item XML export function
|
2153 |
+
*
|
2154 |
* @param int $limit
|
2155 |
* @param int $offset
|
2156 |
* @param array $uids
|
app/code/community/Shopgate/Framework/Test/Helper/Data.php
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
<?php
|
|
|
2 |
/**
|
3 |
* Shopgate GmbH
|
4 |
*
|
@@ -18,17 +19,18 @@
|
|
18 |
* transfer to third parties is only permitted where we previously consented thereto in writing. The provisions
|
19 |
* of paragraph 69 d, sub-paragraphs 2, 3 and paragraph 69, sub-paragraph e of the German Copyright Act shall remain unaffected.
|
20 |
*
|
21 |
-
* @author
|
|
|
|
|
22 |
*/
|
23 |
-
|
24 |
class Shopgate_Framework_Test_Helper_Data extends EcomDev_PHPUnit_Test_Case
|
25 |
{
|
26 |
/**
|
27 |
* @param float $amount
|
28 |
* @param float $taxAmount
|
29 |
* @param float $expectedTaxRate
|
|
|
30 |
*
|
31 |
-
* @test
|
32 |
* @dataProvider dataProvider
|
33 |
*/
|
34 |
public function testCalculateTaxRate($amount, $taxAmount, $expectedTaxRate)
|
1 |
<?php
|
2 |
+
|
3 |
/**
|
4 |
* Shopgate GmbH
|
5 |
*
|
19 |
* transfer to third parties is only permitted where we previously consented thereto in writing. The provisions
|
20 |
* of paragraph 69 d, sub-paragraphs 2, 3 and paragraph 69, sub-paragraph e of the German Copyright Act shall remain unaffected.
|
21 |
*
|
22 |
+
* @author Shopgate GmbH <interfaces@shopgate.com>
|
23 |
+
*
|
24 |
+
* @coversDefaultClass Shopgate_Framework_Helper_Data
|
25 |
*/
|
|
|
26 |
class Shopgate_Framework_Test_Helper_Data extends EcomDev_PHPUnit_Test_Case
|
27 |
{
|
28 |
/**
|
29 |
* @param float $amount
|
30 |
* @param float $taxAmount
|
31 |
* @param float $expectedTaxRate
|
32 |
+
* @covers ::calculateTaxRate
|
33 |
*
|
|
|
34 |
* @dataProvider dataProvider
|
35 |
*/
|
36 |
public function testCalculateTaxRate($amount, $taxAmount, $expectedTaxRate)
|
app/code/community/Shopgate/Framework/Test/Helper/Payment/Wspp.php
ADDED
@@ -0,0 +1,114 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Shopgate GmbH
|
5 |
+
*
|
6 |
+
* URHEBERRECHTSHINWEIS
|
7 |
+
*
|
8 |
+
* Dieses Plugin ist urheberrechtlich geschützt. Es darf ausschließlich von Kunden der Shopgate GmbH
|
9 |
+
* zum Zwecke der eigenen Kommunikation zwischen dem IT-System des Kunden mit dem IT-System der
|
10 |
+
* Shopgate GmbH über www.shopgate.com verwendet werden. Eine darüber hinausgehende Vervielfältigung, Verbreitung,
|
11 |
+
* öffentliche Zugänglichmachung, Bearbeitung oder Weitergabe an Dritte ist nur mit unserer vorherigen
|
12 |
+
* schriftlichen Zustimmung zulässig. Die Regelungen der §§ 69 d Abs. 2, 3 und 69 e UrhG bleiben hiervon unberührt.
|
13 |
+
*
|
14 |
+
* COPYRIGHT NOTICE
|
15 |
+
*
|
16 |
+
* This plugin is the subject of copyright protection. It is only for the use of Shopgate GmbH customers,
|
17 |
+
* for the purpose of facilitating communication between the IT system of the customer and the IT system
|
18 |
+
* of Shopgate GmbH via www.shopgate.com. Any reproduction, dissemination, public propagation, processing or
|
19 |
+
* transfer to third parties is only permitted where we previously consented thereto in writing. The provisions
|
20 |
+
* of paragraph 69 d, sub-paragraphs 2, 3 and paragraph 69, sub-paragraph e of the German Copyright Act shall remain unaffected.
|
21 |
+
*
|
22 |
+
* @author Shopgate GmbH <interfaces@shopgate.com>
|
23 |
+
* @author Konstantin Kiritsenko <konstantin.kiritsenko@shopgate.com>
|
24 |
+
*
|
25 |
+
* @coversDefaultClass Shopgate_Framework_Helper_Payment_Wspp
|
26 |
+
*/
|
27 |
+
class Shopgate_Framework_Test_Helper_Payment_Wspp extends EcomDev_PHPUnit_Test_Case
|
28 |
+
{
|
29 |
+
/** @var Shopgate_Framework_Helper_Payment_Wspp $helper */
|
30 |
+
protected $helper;
|
31 |
+
|
32 |
+
/**
|
33 |
+
* Sets up the express class on unit load
|
34 |
+
*/
|
35 |
+
public function setUp()
|
36 |
+
{
|
37 |
+
$this->helper = Mage::helper('shopgate/payment_wspp');
|
38 |
+
}
|
39 |
+
|
40 |
+
/**
|
41 |
+
* Tests just the necessary status settings. Other parts of
|
42 |
+
* the method will be tested in other functions.
|
43 |
+
*
|
44 |
+
* @param bool $pending - whether order is pending
|
45 |
+
* @param bool $fraud - whether order is fraud
|
46 |
+
* @param string $expected - expected state of order
|
47 |
+
*
|
48 |
+
* @covers ::orderStatusManager
|
49 |
+
* @dataProvider statusProvider
|
50 |
+
*/
|
51 |
+
public function testOrderStatusManager($pending, $fraud, $expected)
|
52 |
+
{
|
53 |
+
$mageOrder = Mage::getModel('sales/order');
|
54 |
+
$payment = Mage::getModel('sales/order_payment');
|
55 |
+
|
56 |
+
$payment->setIsTransactionPending($pending);
|
57 |
+
$payment->setIsFraudDetected($fraud);
|
58 |
+
$mageOrder->setPayment($payment);
|
59 |
+
$this->helper->orderStatusManager($mageOrder);
|
60 |
+
|
61 |
+
$this->assertEquals($expected, $mageOrder->getState());
|
62 |
+
}
|
63 |
+
|
64 |
+
/**
|
65 |
+
* @see testOrderStatusManager for details
|
66 |
+
* @return array
|
67 |
+
*/
|
68 |
+
public function statusProvider()
|
69 |
+
{
|
70 |
+
return array(
|
71 |
+
array(true, false, Mage_Sales_Model_Order::STATE_PAYMENT_REVIEW),
|
72 |
+
array(false, false, Mage_Sales_Model_Order::STATE_PROCESSING),
|
73 |
+
array(true, true, Mage_Sales_Model_Order::STATE_PAYMENT_REVIEW),
|
74 |
+
array(false, true, Mage_Sales_Model_Order::STATE_PAYMENT_REVIEW),
|
75 |
+
);
|
76 |
+
}
|
77 |
+
|
78 |
+
/**
|
79 |
+
* Retrieves the verbiage to use in order history.
|
80 |
+
*
|
81 |
+
* @param string $status - PayPal status
|
82 |
+
* @param string $expected - expected output
|
83 |
+
*
|
84 |
+
* @covers ::getActionByStatus
|
85 |
+
* @dataProvider dataProvider
|
86 |
+
*/
|
87 |
+
public function testGetActionByStatus($status, $expected)
|
88 |
+
{
|
89 |
+
$action = $this->helper->getActionByStatus($status);
|
90 |
+
|
91 |
+
$this->assertEquals($expected, $action);
|
92 |
+
}
|
93 |
+
|
94 |
+
/**
|
95 |
+
* @param $expectedStatus
|
96 |
+
*
|
97 |
+
* @dataProvider dataProvider
|
98 |
+
*/
|
99 |
+
public function testGetPaypalStatus($expectedStatus)
|
100 |
+
{
|
101 |
+
$function = 'getPaypal' . ucfirst($expectedStatus) . 'Status';
|
102 |
+
$newStatus = $this->helper->$function();
|
103 |
+
|
104 |
+
$this->assertEquals($expectedStatus, $newStatus);
|
105 |
+
}
|
106 |
+
|
107 |
+
/**
|
108 |
+
* Garbage collection prep
|
109 |
+
*/
|
110 |
+
public function tearDown()
|
111 |
+
{
|
112 |
+
unset($this->helper);
|
113 |
+
}
|
114 |
+
}
|
app/code/community/Shopgate/Framework/Test/Helper/Payment/Wspp/providers/testGetActionByStatus.yaml
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
-
|
2 |
+
- 'completed'
|
3 |
+
- 'Captur'
|
4 |
+
-
|
5 |
+
- 'pending'
|
6 |
+
- 'Authoriz'
|
7 |
+
-
|
8 |
+
- 'test'
|
9 |
+
- 'Authoriz'
|
10 |
+
-
|
11 |
+
- ''
|
12 |
+
- 'Authoriz'
|
app/code/community/Shopgate/Framework/Test/Helper/Payment/Wspp/providers/testGetPaypalStatus.yaml
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
-
|
2 |
+
- refunded
|
3 |
+
-
|
4 |
+
- completed
|
5 |
+
-
|
6 |
+
- pending
|
app/code/community/Shopgate/Framework/Test/Model/Payment/Abstract.php
ADDED
@@ -0,0 +1,253 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Shopgate GmbH
|
5 |
+
*
|
6 |
+
* URHEBERRECHTSHINWEIS
|
7 |
+
*
|
8 |
+
* Dieses Plugin ist urheberrechtlich geschützt. Es darf ausschließlich von Kunden der Shopgate GmbH
|
9 |
+
* zum Zwecke der eigenen Kommunikation zwischen dem IT-System des Kunden mit dem IT-System der
|
10 |
+
* Shopgate GmbH über www.shopgate.com verwendet werden. Eine darüber hinausgehende Vervielfältigung, Verbreitung,
|
11 |
+
* öffentliche Zugänglichmachung, Bearbeitung oder Weitergabe an Dritte ist nur mit unserer vorherigen
|
12 |
+
* schriftlichen Zustimmung zulässig. Die Regelungen der §§ 69 d Abs. 2, 3 und 69 e UrhG bleiben hiervon unberührt.
|
13 |
+
*
|
14 |
+
* COPYRIGHT NOTICE
|
15 |
+
*
|
16 |
+
* This plugin is the subject of copyright protection. It is only for the use of Shopgate GmbH customers,
|
17 |
+
* for the purpose of facilitating communication between the IT system of the customer and the IT system
|
18 |
+
* of Shopgate GmbH via www.shopgate.com. Any reproduction, dissemination, public propagation, processing or
|
19 |
+
* transfer to third parties is only permitted where we previously consented thereto in writing. The provisions
|
20 |
+
* of paragraph 69 d, sub-paragraphs 2, 3 and paragraph 69, sub-paragraph e of the German Copyright Act shall remain unaffected.
|
21 |
+
*
|
22 |
+
* @author Shopgate GmbH <interfaces@shopgate.com>
|
23 |
+
* @author Konstantin Kiritsenko <konstantin.kiritsenko@shopgate.com>
|
24 |
+
*
|
25 |
+
* @group Shopgate_Payment
|
26 |
+
*/
|
27 |
+
class Shopgate_Framework_Test_Model_Payment_Abstract extends Shopgate_Framework_Test_Model_Utility
|
28 |
+
{
|
29 |
+
/**
|
30 |
+
* Object of initialized CLASS_SHORT_NAME
|
31 |
+
*
|
32 |
+
* @var Shopgate_Framework_Model_Payment_Abstract $class
|
33 |
+
*/
|
34 |
+
protected $class;
|
35 |
+
|
36 |
+
/**
|
37 |
+
* Module config value as defined
|
38 |
+
* in the etc/modules/Module.xml
|
39 |
+
* e.g. Mage_Paypal
|
40 |
+
*/
|
41 |
+
const MODULE_CONFIG = '';
|
42 |
+
|
43 |
+
/**
|
44 |
+
* Config_data module enabled path
|
45 |
+
*/
|
46 |
+
const XML_CONFIG_ENABLED = '';
|
47 |
+
|
48 |
+
/**
|
49 |
+
* Sets up a class on unit load
|
50 |
+
*/
|
51 |
+
public function setUp()
|
52 |
+
{
|
53 |
+
$classShortName = $this->getConstant('CLASS_SHORT_NAME');
|
54 |
+
|
55 |
+
if (null === $this->class && $classShortName) {
|
56 |
+
$this->class = Mage::getModel($classShortName, array(new ShopgateOrder()));
|
57 |
+
}
|
58 |
+
}
|
59 |
+
|
60 |
+
/**
|
61 |
+
* Test moduleName <active> node check, e.g. <Mage_Paypal><active>true</..>
|
62 |
+
* NOTE: the tests won't run if the module is not installed
|
63 |
+
*
|
64 |
+
* Had issues setting up a data provider for this one,
|
65 |
+
* config refused to be re-written on the second iteration.
|
66 |
+
*
|
67 |
+
* @uses Shopgate_Framework_Test_Model_Payment_Abstract::isAbstractTest
|
68 |
+
* @uses Shopgate_Framework_Test_Model_Utility::getConstant
|
69 |
+
* @uses Shopgate_Framework_Test_Model_Utility::activateModule
|
70 |
+
* @uses Shopgate_Framework_Test_Model_Utility::deactivateModule
|
71 |
+
*/
|
72 |
+
public function testIsActive()
|
73 |
+
{
|
74 |
+
if ($this->isAbstractTest()) {
|
75 |
+
return;
|
76 |
+
}
|
77 |
+
|
78 |
+
$moduleName = $this->getConstant('MODULE_CONFIG');
|
79 |
+
$this->activateModule($moduleName);
|
80 |
+
$this->assertTrue($this->class->isModuleActive());
|
81 |
+
|
82 |
+
$this->deactivateModule($moduleName);
|
83 |
+
$this->assertFalse($this->class->isModuleActive());
|
84 |
+
}
|
85 |
+
|
86 |
+
/**
|
87 |
+
* Checks if module is enabled in config_data.
|
88 |
+
* Not using fixtures as we will have to create
|
89 |
+
* two files for every payment class
|
90 |
+
*
|
91 |
+
* @uses Shopgate_Framework_Test_Model_Payment_Abstract::isAbstractTest
|
92 |
+
* @uses Shopgate_Framework_Test_Model_Utility::getConstant
|
93 |
+
*/
|
94 |
+
public function testIsEnabled()
|
95 |
+
{
|
96 |
+
if ($this->isAbstractTest()) {
|
97 |
+
return;
|
98 |
+
}
|
99 |
+
|
100 |
+
$xmlPath = $this->getConstant('XML_CONFIG_ENABLED');
|
101 |
+
$this->enableModule($xmlPath);
|
102 |
+
|
103 |
+
$this->assertTrue($this->class->isEnabled());
|
104 |
+
}
|
105 |
+
|
106 |
+
/**
|
107 |
+
* Checks if module is disabled in config_data
|
108 |
+
*
|
109 |
+
* @uses Shopgate_Framework_Test_Model_Payment_Abstract::isAbstractTest
|
110 |
+
* @uses Shopgate_Framework_Test_Model_Utility::getConstant
|
111 |
+
*/
|
112 |
+
public function testIsDisabled()
|
113 |
+
{
|
114 |
+
if ($this->isAbstractTest()) {
|
115 |
+
return;
|
116 |
+
}
|
117 |
+
|
118 |
+
$xmlPath = $this->getConstant('XML_CONFIG_ENABLED');
|
119 |
+
$this->disableModule($xmlPath);
|
120 |
+
|
121 |
+
$this->assertFalse($this->class->isEnabled());
|
122 |
+
}
|
123 |
+
|
124 |
+
/**
|
125 |
+
* Checks the generic set function in case it was overwritten
|
126 |
+
*
|
127 |
+
* @uses Shopgate_Framework_Test_Model_Payment_Abstract::isAbstractTest
|
128 |
+
*/
|
129 |
+
public function testCheckGeneric()
|
130 |
+
{
|
131 |
+
if ($this->isAbstractTest()) {
|
132 |
+
return;
|
133 |
+
}
|
134 |
+
|
135 |
+
$this->assertTrue($this->class->checkGenericValid());
|
136 |
+
}
|
137 |
+
|
138 |
+
/**
|
139 |
+
* Tests that payment methods are using new status
|
140 |
+
* setting functionality
|
141 |
+
*
|
142 |
+
* @uses Shopgate_Framework_Test_Model_Payment_Abstract::isAbstractTest
|
143 |
+
*/
|
144 |
+
public function testShopgateStatusSet()
|
145 |
+
{
|
146 |
+
if ($this->isAbstractTest()) {
|
147 |
+
return;
|
148 |
+
}
|
149 |
+
|
150 |
+
$this->setPaidStatusFixture('processing');
|
151 |
+
$order = Mage::getModel('sales/order');
|
152 |
+
$this->class->setOrderStatus($order);
|
153 |
+
|
154 |
+
$this->assertTrue($order->getShopgateStatusSet());
|
155 |
+
}
|
156 |
+
|
157 |
+
/**
|
158 |
+
* Tests that payment methods are using new status
|
159 |
+
* setting functionality.
|
160 |
+
* Ignored payment method if the paid status
|
161 |
+
* constant is empty, those classes just do not have
|
162 |
+
* it implemented.
|
163 |
+
*
|
164 |
+
* @param string $state - state from data provider
|
165 |
+
*
|
166 |
+
* @uses Shopgate_Framework_Test_Model_Payment_Abstract::isAbstractTest
|
167 |
+
* @uses Shopgate_Framework_Test_Model_Payment_Abstract::setPaidStatusFixture
|
168 |
+
* @uses Shopgate_Framework_Test_Model_Utility::activateModule
|
169 |
+
*
|
170 |
+
* @dataProvider allStateProvider
|
171 |
+
*/
|
172 |
+
public function testSetOrderStatus($state)
|
173 |
+
{
|
174 |
+
if ($this->isAbstractTest() || !$this->setPaidStatusFixture($state)) {
|
175 |
+
return;
|
176 |
+
}
|
177 |
+
|
178 |
+
$this->activateModule(self::MODULE_CONFIG);
|
179 |
+
|
180 |
+
$order = Mage::getModel('sales/order');
|
181 |
+
$this->class->setOrderStatus($order);
|
182 |
+
|
183 |
+
$this->assertEquals($state, $order->getState());
|
184 |
+
}
|
185 |
+
|
186 |
+
/**
|
187 |
+
* Sets up config status paid fixture
|
188 |
+
*
|
189 |
+
* @param $state - magento order state
|
190 |
+
* @return bool
|
191 |
+
*/
|
192 |
+
protected function setPaidStatusFixture($state)
|
193 |
+
{
|
194 |
+
$reflection = new ReflectionClass($this->class);
|
195 |
+
$constant = $reflection->getConstant('XML_CONFIG_STATUS_PAID');
|
196 |
+
Mage::app()->getStore(0)->setConfig($constant, $state);
|
197 |
+
|
198 |
+
return !empty($constant);
|
199 |
+
}
|
200 |
+
|
201 |
+
/**
|
202 |
+
* Sets up config status not paid fixture
|
203 |
+
*
|
204 |
+
* @param $state - magento order state
|
205 |
+
* @return bool
|
206 |
+
*/
|
207 |
+
protected function setNotPaidStatusFixture($state)
|
208 |
+
{
|
209 |
+
$reflection = new ReflectionClass($this->class);
|
210 |
+
$constant = $reflection->getConstant('XML_CONFIG_STATUS_NOT_PAID');
|
211 |
+
Mage::app()->getStore(0)->setConfig($constant, $state);
|
212 |
+
|
213 |
+
return !empty($constant);
|
214 |
+
}
|
215 |
+
|
216 |
+
/**
|
217 |
+
* In case Abstract class is called by itself
|
218 |
+
* we want to skip running the test as it
|
219 |
+
* will fail
|
220 |
+
*
|
221 |
+
* @return bool
|
222 |
+
*/
|
223 |
+
private function isAbstractTest()
|
224 |
+
{
|
225 |
+
$moduleName = $this->getConstant('MODULE_CONFIG');
|
226 |
+
return empty($this->class) || empty($moduleName);
|
227 |
+
}
|
228 |
+
|
229 |
+
/**
|
230 |
+
* Excluded states complete and closed as
|
231 |
+
* they cannot be overwritten
|
232 |
+
*
|
233 |
+
* @return array
|
234 |
+
*/
|
235 |
+
public function allStateProvider()
|
236 |
+
{
|
237 |
+
return array(
|
238 |
+
'Processing' => array(Mage_Sales_Model_Order::STATE_PROCESSING),
|
239 |
+
'Canceled' => array(Mage_Sales_Model_Order::STATE_CANCELED),
|
240 |
+
'On Hold' => array(Mage_Sales_Model_Order::STATE_HOLDED),
|
241 |
+
'Payment Review' => array(Mage_Sales_Model_Order::STATE_PAYMENT_REVIEW),
|
242 |
+
'Pending Payment' => array(Mage_Sales_Model_Order::STATE_PENDING_PAYMENT),
|
243 |
+
);
|
244 |
+
}
|
245 |
+
|
246 |
+
/**
|
247 |
+
* Garbage collection prep
|
248 |
+
*/
|
249 |
+
public function tearDown()
|
250 |
+
{
|
251 |
+
unset($this->class);
|
252 |
+
}
|
253 |
+
}
|
app/code/community/Shopgate/Framework/Test/Model/Payment/Abstract/fixtures/testIsDisabled.yaml
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
#intentionally empty, abstract class should not run these
|
app/code/community/Shopgate/Framework/Test/Model/Payment/Abstract/fixtures/testIsEnabled.yaml
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
#intentionally empty, abstract class should not run these
|
app/code/community/Shopgate/Framework/Test/Model/Payment/Cc.php
ADDED
@@ -0,0 +1,146 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Shopgate GmbH
|
5 |
+
*
|
6 |
+
* URHEBERRECHTSHINWEIS
|
7 |
+
*
|
8 |
+
* Dieses Plugin ist urheberrechtlich geschützt. Es darf ausschließlich von Kunden der Shopgate GmbH
|
9 |
+
* zum Zwecke der eigenen Kommunikation zwischen dem IT-System des Kunden mit dem IT-System der
|
10 |
+
* Shopgate GmbH über www.shopgate.com verwendet werden. Eine darüber hinausgehende Vervielfältigung, Verbreitung,
|
11 |
+
* öffentliche Zugänglichmachung, Bearbeitung oder Weitergabe an Dritte ist nur mit unserer vorherigen
|
12 |
+
* schriftlichen Zustimmung zulässig. Die Regelungen der §§ 69 d Abs. 2, 3 und 69 e UrhG bleiben hiervon unberührt.
|
13 |
+
*
|
14 |
+
* COPYRIGHT NOTICE
|
15 |
+
*
|
16 |
+
* This plugin is the subject of copyright protection. It is only for the use of Shopgate GmbH customers,
|
17 |
+
* for the purpose of facilitating communication between the IT system of the customer and the IT system
|
18 |
+
* of Shopgate GmbH via www.shopgate.com. Any reproduction, dissemination, public propagation, processing or
|
19 |
+
* transfer to third parties is only permitted where we previously consented thereto in writing. The provisions
|
20 |
+
* of paragraph 69 d, sub-paragraphs 2, 3 and paragraph 69, sub-paragraph e of the German Copyright Act shall remain unaffected.
|
21 |
+
*
|
22 |
+
* @author Shopgate GmbH <interfaces@shopgate.com>
|
23 |
+
* @author Konstantin Kiritsenko <konstantin.kiritsenko@shopgate.com>
|
24 |
+
* @group Shopgate_Payment
|
25 |
+
* @group Shopgate_Payment_Router
|
26 |
+
* @group Shopgate_Payment_Cc
|
27 |
+
*
|
28 |
+
* @coversDefaultClass Shopgate_Framework_Model_Payment_Cc
|
29 |
+
*/
|
30 |
+
class Shopgate_Framework_Test_Model_Payment_Cc extends Shopgate_Framework_Test_Model_Payment_RouterAbstract
|
31 |
+
{
|
32 |
+
const CLASS_SHORT_NAME = 'shopgate/payment_cc';
|
33 |
+
|
34 |
+
/**
|
35 |
+
* @var Shopgate_Framework_Model_Payment_Cc $router
|
36 |
+
*/
|
37 |
+
protected $router;
|
38 |
+
|
39 |
+
/**
|
40 |
+
* Check that regular Authorize will run when the other authorize
|
41 |
+
* plugins are disabled
|
42 |
+
*
|
43 |
+
* @uses ShopgateOrder::setPaymentMethod
|
44 |
+
* @uses Shopgate_Framework_Test_Model_Utility::activateModule
|
45 |
+
* @uses Shopgate_Framework_Test_Model_Utility::deactivateModule
|
46 |
+
* @uses Shopgate_Framework_Model_Payment_Cc::getShopgateOrder
|
47 |
+
* @uses Shopgate_Framework_Model_Payment_Cc::getPaymentMethod
|
48 |
+
*
|
49 |
+
* @covers ::getModelByPaymentMethod
|
50 |
+
*/
|
51 |
+
public function testGetAuthnCcPaymentMethod()
|
52 |
+
{
|
53 |
+
$this->activateModule(Shopgate_Framework_Model_Payment_Cc_Authn::MODULE_CONFIG);
|
54 |
+
$this->deactivateModule(Shopgate_Framework_Model_Payment_Cc_Authncim::MODULE_CONFIG);
|
55 |
+
$this->deactivateModule(Shopgate_Framework_Model_Payment_Cc_Chargeitpro::MODULE_CONFIG);
|
56 |
+
|
57 |
+
$this->router->getShopgateOrder()->setPaymentMethod(ShopgateCartBase::AUTHN_CC);
|
58 |
+
$this->router->getModelByPaymentMethod();
|
59 |
+
|
60 |
+
$this->assertEquals(ShopgateCartBase::AUTHN_CC, $this->router->getPaymentMethod());
|
61 |
+
}
|
62 |
+
|
63 |
+
/**
|
64 |
+
* Checks that we route to Autorize CIM when it's enabled and API returns true.
|
65 |
+
* API calls is mocked and forced to return true.
|
66 |
+
*
|
67 |
+
* @uses ShopgateOrder::setPaymentMethod
|
68 |
+
* @uses Shopgate_Framework_Test_Model_Utility::activateModule
|
69 |
+
* @uses Shopgate_Framework_Test_Model_Utility::deactivateModule
|
70 |
+
* @uses Shopgate_Framework_Test_Model_Utility::enableModule
|
71 |
+
* @uses Shopgate_Framework_Model_Payment_Cc::getShopgateOrder
|
72 |
+
* @uses Shopgate_Framework_Model_Payment_Cc::getPaymentMethod
|
73 |
+
*
|
74 |
+
* @covers ::getModelByPaymentMethod
|
75 |
+
*/
|
76 |
+
public function testGetAuthCimPaymentMethod()
|
77 |
+
{
|
78 |
+
$this->router->getShopgateOrder()->setPaymentMethod(ShopgateCartBase::AUTHN_CC);
|
79 |
+
$this->activateModule(Shopgate_Framework_Model_Payment_Cc_Authn::MODULE_CONFIG);
|
80 |
+
$this->activateModule(Shopgate_Framework_Model_Payment_Cc_Authncim::MODULE_CONFIG);
|
81 |
+
$this->deactivateModule(Shopgate_Framework_Model_Payment_Cc_Chargeitpro::MODULE_CONFIG);
|
82 |
+
$this->enableModule(Shopgate_Framework_Model_Payment_Cc_Authncim::XML_CONFIG_ENABLED);
|
83 |
+
|
84 |
+
$mock = $this->getModelMock(
|
85 |
+
'shopgate/payment_cc_authncim',
|
86 |
+
array('checkGenericValid'),
|
87 |
+
false,
|
88 |
+
array(array($this->router->getShopgateOrder()))
|
89 |
+
);
|
90 |
+
$mock->expects($this->once())
|
91 |
+
->method('checkGenericValid')
|
92 |
+
->will($this->returnValue(true));
|
93 |
+
|
94 |
+
$this->replaceByMock('model', 'shopgate/payment_cc_authncim', $mock);
|
95 |
+
$this->router->getModelByPaymentMethod();
|
96 |
+
|
97 |
+
$this->assertEquals('AUTHNCIM_CC', $this->router->getPaymentMethod());
|
98 |
+
}
|
99 |
+
|
100 |
+
/**
|
101 |
+
* When ChargeItPro is disabled, we default to USAePay
|
102 |
+
*
|
103 |
+
* @uses ShopgateOrder::setPaymentMethod
|
104 |
+
* @uses Shopgate_Framework_Test_Model_Utility::activateModule
|
105 |
+
* @uses Shopgate_Framework_Test_Model_Utility::deactivateModule
|
106 |
+
* @uses Shopgate_Framework_Test_Model_Utility::enableModule
|
107 |
+
* @uses Shopgate_Framework_Model_Payment_Cc::getShopgateOrder
|
108 |
+
* @uses Shopgate_Framework_Model_Payment_Cc::getPaymentMethod
|
109 |
+
*
|
110 |
+
* @covers ::getModelByPaymentMethod
|
111 |
+
*/
|
112 |
+
public function testGetUsaEpayPaymentMethod()
|
113 |
+
{
|
114 |
+
$this->activateModule(Shopgate_Framework_Model_Payment_Cc_Usaepay::MODULE_CONFIG);
|
115 |
+
$this->enableModule(Shopgate_Framework_Model_Payment_Cc_Usaepay::XML_CONFIG_ENABLED);
|
116 |
+
$this->deactivateModule(Shopgate_Framework_Model_Payment_Cc_Chargeitpro::MODULE_CONFIG);
|
117 |
+
$this->router->getShopgateOrder()->setPaymentMethod(ShopgateCartBase::USAEPAY_CC);
|
118 |
+
$this->router->getModelByPaymentMethod();
|
119 |
+
|
120 |
+
$this->assertEquals(ShopgateCartBase::USAEPAY_CC, $this->router->getPaymentMethod());
|
121 |
+
}
|
122 |
+
|
123 |
+
/**
|
124 |
+
* Even if Mage_USAePay is enabled, ignore it and redirect to ChargeItPro
|
125 |
+
*
|
126 |
+
* @uses ShopgateOrder::setPaymentMethod
|
127 |
+
* @uses Shopgate_Framework_Test_Model_Utility::activateModule
|
128 |
+
* @uses Shopgate_Framework_Test_Model_Utility::deactivateModule
|
129 |
+
* @uses Shopgate_Framework_Test_Model_Utility::enableModule
|
130 |
+
* @uses Shopgate_Framework_Model_Payment_Cc::getShopgateOrder
|
131 |
+
* @uses Shopgate_Framework_Model_Payment_Cc::getPaymentMethod
|
132 |
+
*
|
133 |
+
* @covers ::getModelByPaymentMethod
|
134 |
+
*/
|
135 |
+
public function testGetChargeItProPaymentMethod()
|
136 |
+
{
|
137 |
+
$this->activateModule(Shopgate_Framework_Model_Payment_Cc_Usaepay::MODULE_CONFIG);
|
138 |
+
$this->enableModule(Shopgate_Framework_Model_Payment_Cc_Usaepay::XML_CONFIG_ENABLED);
|
139 |
+
$this->activateModule(Shopgate_Framework_Model_Payment_Cc_Chargeitpro::MODULE_CONFIG);
|
140 |
+
$this->enableModule(Shopgate_Framework_Model_Payment_Cc_Chargeitpro::XML_CONFIG_ENABLED);
|
141 |
+
$this->router->getShopgateOrder()->setPaymentMethod(ShopgateCartBase::USAEPAY_CC);
|
142 |
+
$this->router->getModelByPaymentMethod();
|
143 |
+
|
144 |
+
$this->assertEquals('CHARGEITPRO_CC', $this->router->getPaymentMethod());
|
145 |
+
}
|
146 |
+
}
|
app/code/community/Shopgate/Framework/Test/Model/Payment/Cc/Abstract.php
ADDED
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Shopgate GmbH
|
5 |
+
*
|
6 |
+
* URHEBERRECHTSHINWEIS
|
7 |
+
*
|
8 |
+
* Dieses Plugin ist urheberrechtlich geschützt. Es darf ausschließlich von Kunden der Shopgate GmbH
|
9 |
+
* zum Zwecke der eigenen Kommunikation zwischen dem IT-System des Kunden mit dem IT-System der
|
10 |
+
* Shopgate GmbH über www.shopgate.com verwendet werden. Eine darüber hinausgehende Vervielfältigung, Verbreitung,
|
11 |
+
* öffentliche Zugänglichmachung, Bearbeitung oder Weitergabe an Dritte ist nur mit unserer vorherigen
|
12 |
+
* schriftlichen Zustimmung zulässig. Die Regelungen der §§ 69 d Abs. 2, 3 und 69 e UrhG bleiben hiervon unberührt.
|
13 |
+
*
|
14 |
+
* COPYRIGHT NOTICE
|
15 |
+
*
|
16 |
+
* This plugin is the subject of copyright protection. It is only for the use of Shopgate GmbH customers,
|
17 |
+
* for the purpose of facilitating communication between the IT system of the customer and the IT system
|
18 |
+
* of Shopgate GmbH via www.shopgate.com. Any reproduction, dissemination, public propagation, processing or
|
19 |
+
* transfer to third parties is only permitted where we previously consented thereto in writing. The provisions
|
20 |
+
* of paragraph 69 d, sub-paragraphs 2, 3 and paragraph 69, sub-paragraph e of the German Copyright Act shall remain unaffected.
|
21 |
+
*
|
22 |
+
* @author Shopgate GmbH <interfaces@shopgate.com>
|
23 |
+
* @author Konstantin Kiritsenko <konstantin.kiritsenko@shopgate.com>
|
24 |
+
* @group Shopgat_Payment
|
25 |
+
* @group Shopgat_Payment_Cc
|
26 |
+
*
|
27 |
+
* @coversDefaultClass Shopgate_Framework_Model_Payment_Cc_Abstract
|
28 |
+
*/
|
29 |
+
class Shopgate_Framework_Test_Model_Payment_Cc_Abstract extends EcomDev_PHPUnit_Test_Case
|
30 |
+
{
|
31 |
+
/** @var Shopgate_Framework_Test_Model_Payment_Cc_Abstract $class */
|
32 |
+
protected $class;
|
33 |
+
|
34 |
+
public function setUp()
|
35 |
+
{
|
36 |
+
$this->class = Mage::getModel('shopgate/payment_cc_abstract', array(new ShopgateOrder()));
|
37 |
+
}
|
38 |
+
|
39 |
+
/**
|
40 |
+
* Get type by name
|
41 |
+
*
|
42 |
+
* @param $value
|
43 |
+
* @param $expected
|
44 |
+
*
|
45 |
+
* @uses ReflectionClass::getMethod
|
46 |
+
* @covers ::_getCcTypeName
|
47 |
+
*
|
48 |
+
* @dataProvider dataProvider
|
49 |
+
*/
|
50 |
+
public function testGetCcTypeName($value, $expected)
|
51 |
+
{
|
52 |
+
$reflection = new ReflectionClass($this->class);
|
53 |
+
$method = $reflection->getMethod('_getCcTypeName');
|
54 |
+
$method->setAccessible(true);
|
55 |
+
$result = $method->invoke($this->class, $value);
|
56 |
+
$this->assertEquals($expected, $result);
|
57 |
+
}
|
58 |
+
}
|
app/code/community/Shopgate/Framework/Test/Model/Payment/Cc/Abstract/providers/testGetCcTypeName.yaml
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
-
|
2 |
+
- 'visa'
|
3 |
+
- 'VI'
|
4 |
+
-
|
5 |
+
- 'mastercard'
|
6 |
+
- 'MC'
|
7 |
+
-
|
8 |
+
- 'american_express'
|
9 |
+
- 'AE'
|
10 |
+
-
|
11 |
+
- 'discover'
|
12 |
+
- 'DI'
|
13 |
+
-
|
14 |
+
- 'jcb'
|
15 |
+
- 'JCB'
|
16 |
+
-
|
17 |
+
- 'maestro'
|
18 |
+
- 'SM'
|
19 |
+
-
|
20 |
+
- 'custom'
|
21 |
+
- 'OT'
|
22 |
+
-
|
23 |
+
- ''
|
24 |
+
- 'OT'
|
app/code/community/Shopgate/Framework/Test/Model/Payment/Cc/Authn.php
ADDED
@@ -0,0 +1,112 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Shopgate GmbH
|
5 |
+
*
|
6 |
+
* URHEBERRECHTSHINWEIS
|
7 |
+
*
|
8 |
+
* Dieses Plugin ist urheberrechtlich geschützt. Es darf ausschließlich von Kunden der Shopgate GmbH
|
9 |
+
* zum Zwecke der eigenen Kommunikation zwischen dem IT-System des Kunden mit dem IT-System der
|
10 |
+
* Shopgate GmbH über www.shopgate.com verwendet werden. Eine darüber hinausgehende Vervielfältigung, Verbreitung,
|
11 |
+
* öffentliche Zugänglichmachung, Bearbeitung oder Weitergabe an Dritte ist nur mit unserer vorherigen
|
12 |
+
* schriftlichen Zustimmung zulässig. Die Regelungen der §§ 69 d Abs. 2, 3 und 69 e UrhG bleiben hiervon unberührt.
|
13 |
+
*
|
14 |
+
* COPYRIGHT NOTICE
|
15 |
+
*
|
16 |
+
* This plugin is the subject of copyright protection. It is only for the use of Shopgate GmbH customers,
|
17 |
+
* for the purpose of facilitating communication between the IT system of the customer and the IT system
|
18 |
+
* of Shopgate GmbH via www.shopgate.com. Any reproduction, dissemination, public propagation, processing or
|
19 |
+
* transfer to third parties is only permitted where we previously consented thereto in writing. The provisions
|
20 |
+
* of paragraph 69 d, sub-paragraphs 2, 3 and paragraph 69, sub-paragraph e of the German Copyright Act shall remain unaffected.
|
21 |
+
*
|
22 |
+
* @author Shopgate GmbH <interfaces@shopgate.com>
|
23 |
+
* @author Konstantin Kiritsenko <konstantin.kiritsenko@shopgate.com>
|
24 |
+
* @group Shopgate_Payment
|
25 |
+
* @group Shopgate_Payment_Cc
|
26 |
+
*
|
27 |
+
* @coversDefaultClass Shopgate_Framework_Model_Payment_Cc_Authn
|
28 |
+
*/
|
29 |
+
class Shopgate_Framework_Test_Model_Payment_Cc_Authn extends Shopgate_Framework_Test_Model_Payment_Abstract
|
30 |
+
{
|
31 |
+
const CLASS_SHORT_NAME = 'shopgate/payment_cc_authn';
|
32 |
+
const MODULE_CONFIG = 'Mage_Paygate';
|
33 |
+
const XML_CONFIG_ENABLED = 'payment/authorizenet/active';
|
34 |
+
|
35 |
+
/** @var Shopgate_Framework_Model_Payment_Cc_Authn $class */
|
36 |
+
protected $class;
|
37 |
+
|
38 |
+
/**
|
39 |
+
* Blank rewrite, we will test this in abstract class
|
40 |
+
*
|
41 |
+
* @coversNothing
|
42 |
+
*/
|
43 |
+
public function testShopgateStatusSet() { }
|
44 |
+
|
45 |
+
/**
|
46 |
+
* @uses ReflectionClass::getProperty
|
47 |
+
* @covers ::_initVariables()
|
48 |
+
*/
|
49 |
+
public function testInitVariables()
|
50 |
+
{
|
51 |
+
$order = new ShopgateOrder();
|
52 |
+
$order->setPaymentInfos(
|
53 |
+
array(
|
54 |
+
'transaction_type' => 'test_type',
|
55 |
+
'response_code' => 'test_response',
|
56 |
+
)
|
57 |
+
);
|
58 |
+
$this->class->setShopgateOrder($order);
|
59 |
+
$reflection = new ReflectionClass($this->class);
|
60 |
+
$method = $reflection->getMethod('_initVariables');
|
61 |
+
$method->setAccessible(true);
|
62 |
+
$method->invoke($this->class, null);
|
63 |
+
$type = $reflection->getProperty('_transactionType');
|
64 |
+
$type->setAccessible(true);
|
65 |
+
$response = $reflection->getProperty('_responseCode');
|
66 |
+
$response->setAccessible(true);
|
67 |
+
|
68 |
+
$this->assertEquals('test_type', $type->getValue($this->class));
|
69 |
+
$this->assertEquals('test_response', $response->getValue($this->class));
|
70 |
+
}
|
71 |
+
|
72 |
+
/**
|
73 |
+
* @uses Shopgate_Framework_Model_Payment_Cc_Authn::setOrder
|
74 |
+
* @covers ::_createTransaction
|
75 |
+
*/
|
76 |
+
public function testCreateTransactions()
|
77 |
+
{
|
78 |
+
/**
|
79 |
+
* Setup
|
80 |
+
*/
|
81 |
+
$transId = '123';
|
82 |
+
$transKey = 'payment';
|
83 |
+
|
84 |
+
$mock = $this->getModelMock('sales/order_payment_transaction', array('save'));
|
85 |
+
$mock->method('save')
|
86 |
+
->will($this->returnSelf());
|
87 |
+
$this->replaceByMock('model', 'sales/order_payment_transaction', $mock);
|
88 |
+
|
89 |
+
$order = Mage::getModel('sales/order');
|
90 |
+
$payment = Mage::getModel('sales/order_payment');
|
91 |
+
$payment->setCcTransId($transId);
|
92 |
+
$order->setPayment($payment);
|
93 |
+
$this->class->setOrder($order);
|
94 |
+
|
95 |
+
/**
|
96 |
+
* Invoke
|
97 |
+
*
|
98 |
+
* @var Mage_Sales_Model_Order_Payment_Transaction $mock
|
99 |
+
*/
|
100 |
+
$reflection = new ReflectionClass($this->class);
|
101 |
+
$method = $reflection->getMethod('_createTransaction');
|
102 |
+
$method->setAccessible(true);
|
103 |
+
$method->invoke($this->class, $transKey, array('additional1' => 'Rnd'));
|
104 |
+
$info = $mock->getAdditionalInformation();
|
105 |
+
|
106 |
+
$this->assertEquals($transId, $mock->getTxnId());
|
107 |
+
$this->assertEquals($transKey, $mock->getTxnType());
|
108 |
+
$this->assertEquals(0, $mock->getIsClosed());
|
109 |
+
$this->assertEquals($transId, $info['real_transaction_id']);
|
110 |
+
$this->assertArrayHasKey('additional1', $info);
|
111 |
+
}
|
112 |
+
}
|
app/code/community/Shopgate/Framework/Test/Model/Payment/Cc/AuthnAbstract.php
ADDED
@@ -0,0 +1,243 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Shopgate GmbH
|
5 |
+
*
|
6 |
+
* URHEBERRECHTSHINWEIS
|
7 |
+
*
|
8 |
+
* Dieses Plugin ist urheberrechtlich geschützt. Es darf ausschließlich von Kunden der Shopgate GmbH
|
9 |
+
* zum Zwecke der eigenen Kommunikation zwischen dem IT-System des Kunden mit dem IT-System der
|
10 |
+
* Shopgate GmbH über www.shopgate.com verwendet werden. Eine darüber hinausgehende Vervielfältigung, Verbreitung,
|
11 |
+
* öffentliche Zugänglichmachung, Bearbeitung oder Weitergabe an Dritte ist nur mit unserer vorherigen
|
12 |
+
* schriftlichen Zustimmung zulässig. Die Regelungen der §§ 69 d Abs. 2, 3 und 69 e UrhG bleiben hiervon unberührt.
|
13 |
+
*
|
14 |
+
* COPYRIGHT NOTICE
|
15 |
+
*
|
16 |
+
* This plugin is the subject of copyright protection. It is only for the use of Shopgate GmbH customers,
|
17 |
+
* for the purpose of facilitating communication between the IT system of the customer and the IT system
|
18 |
+
* of Shopgate GmbH via www.shopgate.com. Any reproduction, dissemination, public propagation, processing or
|
19 |
+
* transfer to third parties is only permitted where we previously consented thereto in writing. The provisions
|
20 |
+
* of paragraph 69 d, sub-paragraphs 2, 3 and paragraph 69, sub-paragraph e of the German Copyright Act shall remain unaffected.
|
21 |
+
*
|
22 |
+
* @author Shopgate GmbH <interfaces@shopgate.com>
|
23 |
+
* @author Konstantin Kiritsenko <konstantin.kiritsenko@shopgate.com>
|
24 |
+
*
|
25 |
+
* @coversDefaultClass Shopgate_Framework_Model_Payment_Cc_AuthnAbstract
|
26 |
+
*/
|
27 |
+
class Shopgate_Framework_Test_Model_Payment_Cc_AuthnAbstract extends EcomDev_PHPUnit_Test_Case
|
28 |
+
{
|
29 |
+
/** @var Shopgate_Framework_Model_Payment_Cc_AuthnAbstract $class */
|
30 |
+
protected $class;
|
31 |
+
|
32 |
+
/**
|
33 |
+
* Init coverable class mock
|
34 |
+
*/
|
35 |
+
public function setUp()
|
36 |
+
{
|
37 |
+
$this->class = Mage::getModel('shopgate/payment_cc_authnAbstract', array(new ShopgateOrder()));
|
38 |
+
}
|
39 |
+
|
40 |
+
/**
|
41 |
+
* Tests capture and hold scenarios when invoice is created
|
42 |
+
*
|
43 |
+
* @uses ShopgateOrder::getPaymentInfos
|
44 |
+
* @uses Shopgate_Framework_Model_Payment_Cc_AuthnAbstract::_isOrderPendingReview
|
45 |
+
* @uses Shopgate_Framework_Helper_Payment_Abstract::createOrderInvoice
|
46 |
+
* @uses Shopgate_Framework_Model_Payment_Cc_AuthnAbstract::getShopgateOrder
|
47 |
+
* @covers ::_createInvoice
|
48 |
+
*
|
49 |
+
* @after testOrderPendingReview
|
50 |
+
*/
|
51 |
+
public function testCreateInvoice()
|
52 |
+
{
|
53 |
+
$transactionId = '123';
|
54 |
+
$covered = $this->getModelMock(
|
55 |
+
'shopgate/payment_cc_authnAbstract',
|
56 |
+
array('_isOrderPendingReview'),
|
57 |
+
false,
|
58 |
+
array(array(new ShopgateOrder()))
|
59 |
+
);
|
60 |
+
$covered->method('_isOrderPendingReview')
|
61 |
+
->willReturn(true);
|
62 |
+
|
63 |
+
$order = $this->getModelMock('sales/order', array('addRelatedObject'));
|
64 |
+
$this->replaceByMock('model', 'sales/order', $order);
|
65 |
+
$payment = Mage::getModel('sales/order_payment');
|
66 |
+
|
67 |
+
/**
|
68 |
+
* @var Shopgate_Framework_Model_Payment_Cc_AuthnAbstract $covered
|
69 |
+
* @var Mage_Sales_Model_Order $order
|
70 |
+
*/
|
71 |
+
$order->setPayment($payment);
|
72 |
+
$covered->setOrder($order);
|
73 |
+
$covered->getShopgateOrder()->setPaymentInfos(array('transaction_id' => $transactionId));
|
74 |
+
|
75 |
+
$invoice = $this->mockModel('sales/order_invoice', array('pay', 'save'));
|
76 |
+
$this->replaceByMock('model', 'sales/order_invoice', $invoice);
|
77 |
+
|
78 |
+
$helper = $this->mockHelper('shopgate/payment_abstract', array('createOrderInvoice'));
|
79 |
+
$helper->method('createOrderInvoice')->willReturn($invoice->getMockInstance());
|
80 |
+
$this->replaceByMock('helper', 'shopgate/payment_abstract', $helper);
|
81 |
+
|
82 |
+
$reflection = new ReflectionClass($covered);
|
83 |
+
$response = $reflection->getProperty('_responseCode');
|
84 |
+
$response->setAccessible(true);
|
85 |
+
$txnType = $reflection->getProperty('_transactionType');
|
86 |
+
$txnType->setAccessible(true);
|
87 |
+
$method = $reflection->getMethod('_createInvoice');
|
88 |
+
$method->setAccessible(true);
|
89 |
+
|
90 |
+
/**
|
91 |
+
* Invoke scenario 1, code approved, status auth_capture
|
92 |
+
*
|
93 |
+
* @var Mage_Sales_Model_Order_Invoice $invoice
|
94 |
+
*/
|
95 |
+
$response->setValue($covered, $reflection->getConstant('RESPONSE_CODE_APPROVED'));
|
96 |
+
$txnType->setValue($covered, $reflection->getConstant('SHOPGATE_PAYMENT_STATUS_AUTH_CAPTURE'));
|
97 |
+
$method->invoke($covered, null);
|
98 |
+
|
99 |
+
$this->assertTrue($invoice->getIsPaid());
|
100 |
+
$this->assertEquals($transactionId, $invoice->getTransactionId());
|
101 |
+
|
102 |
+
/**
|
103 |
+
* Invoke scenario 2, code held, status pending review on gate
|
104 |
+
*/
|
105 |
+
$response->setValue($covered, $reflection->getConstant('RESPONSE_CODE_HELD'));
|
106 |
+
$method->invoke($covered, null);
|
107 |
+
|
108 |
+
$this->assertFalse($invoice->getIsPaid());
|
109 |
+
$this->assertEquals($transactionId, $invoice->getTransactionId());
|
110 |
+
}
|
111 |
+
|
112 |
+
|
113 |
+
/**
|
114 |
+
* Testing order message setter & state
|
115 |
+
*
|
116 |
+
* @uses Shopgate_Framework_Model_Payment_Cc_AuthnAbstract::_isOrderPendingReview
|
117 |
+
* @covers ::setOrderStatus
|
118 |
+
*
|
119 |
+
* @after testOrderPendingReview
|
120 |
+
*/
|
121 |
+
public function testSetOrderStatus()
|
122 |
+
{
|
123 |
+
$order = $this->getModelMock('sales/order', array('setState'));
|
124 |
+
$this->replaceByMock('model', 'sales/order', $order);
|
125 |
+
$order->method('setState')
|
126 |
+
->will(
|
127 |
+
$this->returnCallback(
|
128 |
+
function ($state, $status, $message) use (&$msg) {
|
129 |
+
$msg = array('state' => $state, 'message' => $message);
|
130 |
+
}
|
131 |
+
)
|
132 |
+
);
|
133 |
+
$covered = $this->getModelMock(
|
134 |
+
'shopgate/payment_cc_authnAbstract',
|
135 |
+
array('_isOrderPendingReview'),
|
136 |
+
false,
|
137 |
+
array(array(new ShopgateOrder()))
|
138 |
+
);
|
139 |
+
$covered->method('_isOrderPendingReview')
|
140 |
+
->willReturnOnConsecutiveCalls(
|
141 |
+
array(true, false)
|
142 |
+
);
|
143 |
+
|
144 |
+
$reflection = new ReflectionClass($covered);
|
145 |
+
$response = $reflection->getProperty('_responseCode');
|
146 |
+
$response->setAccessible(true);
|
147 |
+
$txnType = $reflection->getProperty('_transactionType');
|
148 |
+
$txnType->setAccessible(true);
|
149 |
+
|
150 |
+
/**
|
151 |
+
* @var Shopgate_Framework_Model_Payment_Cc_AuthnAbstract $covered
|
152 |
+
* @var Mage_Sales_Model_Order $order
|
153 |
+
*
|
154 |
+
* Response approved, but not yet captured
|
155 |
+
*/
|
156 |
+
$covered->setOrder($order);
|
157 |
+
$response->setValue($covered, $reflection->getConstant('RESPONSE_CODE_APPROVED'));
|
158 |
+
$covered->setOrderStatus($order);
|
159 |
+
$this->assertContains('Authorized', $msg['message']);
|
160 |
+
|
161 |
+
/**
|
162 |
+
* Response approved & captured
|
163 |
+
*/
|
164 |
+
$txnType->setValue($covered, $reflection->getConstant('SHOPGATE_PAYMENT_STATUS_AUTH_CAPTURE'));
|
165 |
+
$covered->setOrderStatus($order);
|
166 |
+
$this->assertContains('Captured', $msg['message']);
|
167 |
+
|
168 |
+
/**
|
169 |
+
* Response on hold, is pending review
|
170 |
+
*/
|
171 |
+
$response->setValue($covered, $reflection->getConstant('RESPONSE_CODE_HELD'));
|
172 |
+
$covered->setOrderStatus($order);
|
173 |
+
$this->assertContains('Capturing', $msg['message']);
|
174 |
+
|
175 |
+
/**
|
176 |
+
* Response on hold, but does not have a reason code
|
177 |
+
*/
|
178 |
+
$covered->setOrderStatus($order);
|
179 |
+
$this->assertEmpty($msg['message']);
|
180 |
+
|
181 |
+
/**
|
182 |
+
* Response held on gateway, error code provided
|
183 |
+
*/
|
184 |
+
$covered->getShopgateOrder()->setPaymentInfos(array('response_reason_code' => 'code'));
|
185 |
+
$covered->setOrderStatus($order);
|
186 |
+
$this->assertContains('response reason', $msg['message']);
|
187 |
+
|
188 |
+
/**
|
189 |
+
* No response
|
190 |
+
*/
|
191 |
+
$response->setValue($covered, '');
|
192 |
+
$covered->setOrderStatus($order);
|
193 |
+
$this->assertContains('response code', $msg['message']);
|
194 |
+
|
195 |
+
/**
|
196 |
+
* State always 'processing'
|
197 |
+
*/
|
198 |
+
$this->assertEquals('processing', $msg['state']);
|
199 |
+
}
|
200 |
+
|
201 |
+
/**
|
202 |
+
* Tests whether response on gateway is pending
|
203 |
+
* by testing the code provided
|
204 |
+
*
|
205 |
+
* @uses ShopgateOrder::setPaymentInfos
|
206 |
+
* @covers ::_isOrderPendingReview
|
207 |
+
*/
|
208 |
+
public function testOrderPendingReview()
|
209 |
+
{
|
210 |
+
$order = new ShopgateOrder();
|
211 |
+
$this->class->setShopgateOrder($order);
|
212 |
+
|
213 |
+
$reflection = new ReflectionClass($this->class);
|
214 |
+
$method = $reflection->getMethod('_isOrderPendingReview');
|
215 |
+
$method->setAccessible(true);
|
216 |
+
|
217 |
+
/**
|
218 |
+
* Pending Authorization on gateway
|
219 |
+
*/
|
220 |
+
$code = $reflection->getConstant('RESPONSE_REASON_CODE_PENDING_REVIEW_AUTHORIZED');
|
221 |
+
$order->setPaymentInfos(array('response_reason_code' => $code));
|
222 |
+
$this->assertTrue($method->invoke($this->class, null));
|
223 |
+
|
224 |
+
/**
|
225 |
+
* Pending review on gateway
|
226 |
+
*/
|
227 |
+
$code = $reflection->getConstant('RESPONSE_REASON_CODE_PENDING_REVIEW');
|
228 |
+
$order->setPaymentInfos(array('response_reason_code' => $code));
|
229 |
+
$this->assertTrue($method->invoke($this->class, null));
|
230 |
+
|
231 |
+
/**
|
232 |
+
* Unknown code
|
233 |
+
*/
|
234 |
+
$order->setPaymentInfos(array('response_reason_code' => 123));
|
235 |
+
$this->assertFalse($method->invoke($this->class, null));
|
236 |
+
|
237 |
+
/**
|
238 |
+
* No conditions
|
239 |
+
*/
|
240 |
+
$order->setPaymentInfos(array());
|
241 |
+
$this->assertFalse($method->invoke($this->class, null));
|
242 |
+
}
|
243 |
+
}
|
app/code/community/Shopgate/Framework/Test/Model/Payment/Router.php
ADDED
@@ -0,0 +1,111 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Shopgate GmbH
|
5 |
+
*
|
6 |
+
* URHEBERRECHTSHINWEIS
|
7 |
+
*
|
8 |
+
* Dieses Plugin ist urheberrechtlich geschützt. Es darf ausschließlich von Kunden der Shopgate GmbH
|
9 |
+
* zum Zwecke der eigenen Kommunikation zwischen dem IT-System des Kunden mit dem IT-System der
|
10 |
+
* Shopgate GmbH über www.shopgate.com verwendet werden. Eine darüber hinausgehende Vervielfältigung, Verbreitung,
|
11 |
+
* öffentliche Zugänglichmachung, Bearbeitung oder Weitergabe an Dritte ist nur mit unserer vorherigen
|
12 |
+
* schriftlichen Zustimmung zulässig. Die Regelungen der §§ 69 d Abs. 2, 3 und 69 e UrhG bleiben hiervon unberührt.
|
13 |
+
*
|
14 |
+
* COPYRIGHT NOTICE
|
15 |
+
*
|
16 |
+
* This plugin is the subject of copyright protection. It is only for the use of Shopgate GmbH customers,
|
17 |
+
* for the purpose of facilitating communication between the IT system of the customer and the IT system
|
18 |
+
* of Shopgate GmbH via www.shopgate.com. Any reproduction, dissemination, public propagation, processing or
|
19 |
+
* transfer to third parties is only permitted where we previously consented thereto in writing. The provisions
|
20 |
+
* of paragraph 69 d, sub-paragraphs 2, 3 and paragraph 69, sub-paragraph e of the German Copyright Act shall remain unaffected.
|
21 |
+
*
|
22 |
+
* @author Shopgate GmbH <interfaces@shopgate.com>
|
23 |
+
* @author Konstantin Kiritsenko <konstantin.kiritsenko@shopgate.com>
|
24 |
+
* @group Shopgate_Payment
|
25 |
+
* @group Shopgate_Payment_Router
|
26 |
+
*
|
27 |
+
* @coversDefaultClass Shopgate_Framework_Model_Payment_Router
|
28 |
+
*/
|
29 |
+
class Shopgate_Framework_Test_Model_Payment_Router extends Shopgate_Framework_Test_Model_Payment_RouterAbstract
|
30 |
+
{
|
31 |
+
const CLASS_SHORT_NAME = 'shopgate/payment_router';
|
32 |
+
|
33 |
+
/** @var Shopgate_Framework_Model_Payment_Router $router */
|
34 |
+
protected $router;
|
35 |
+
|
36 |
+
/**
|
37 |
+
* Check that constructor cannot be
|
38 |
+
* initialized without a Shopgate object
|
39 |
+
*
|
40 |
+
* @expectedException Exception
|
41 |
+
* @expectedExceptionMessage Incorrect class provided to: Shopgate_Framework_Model_Payment_Abstract::_constructor()
|
42 |
+
*/
|
43 |
+
public function testConstructor()
|
44 |
+
{
|
45 |
+
Mage::getModel('shopgate/payment_abstract');
|
46 |
+
}
|
47 |
+
|
48 |
+
/**
|
49 |
+
* Test getting parts of a payment method
|
50 |
+
*
|
51 |
+
* @param int $partNumber - part number to grab from paymentMethod, .e.g "PP"
|
52 |
+
* @param string $paymentMethod - arrives from Shopgate API, e.g. PP_WSPP_CC
|
53 |
+
* @param string $expected - expected payment method part returned
|
54 |
+
*
|
55 |
+
* @uses ShopgateOrder::setPaymentMethod
|
56 |
+
* @uses Shopgate_Framework_Model_Payment_Router::getShopgateOrder
|
57 |
+
* @uses Shopgate_Framework_Model_Payment_Router::getClassFromMethod
|
58 |
+
* @covers ::_getMethodPart
|
59 |
+
*
|
60 |
+
* @dataProvider dataProvider
|
61 |
+
*/
|
62 |
+
public function testMethodPart($partNumber, $paymentMethod, $expected)
|
63 |
+
{
|
64 |
+
$this->router->getShopgateOrder()->setPaymentMethod($paymentMethod);
|
65 |
+
$reflection = new ReflectionClass($this->router);
|
66 |
+
$property = $reflection->getProperty('_payment_method_part');
|
67 |
+
$property->setAccessible(true);
|
68 |
+
$property->setValue($this->router, $partNumber);
|
69 |
+
$method = $reflection->getMethod('_getMethodPart');
|
70 |
+
$method->setAccessible(true);
|
71 |
+
$part = $method->invoke($this->router, null);
|
72 |
+
|
73 |
+
$this->assertEquals($expected, $part);
|
74 |
+
}
|
75 |
+
|
76 |
+
/**
|
77 |
+
* Should return the correct truncated class short name
|
78 |
+
*
|
79 |
+
* @covers ::getCurrentClassShortName
|
80 |
+
*/
|
81 |
+
public function testGetClassShortName()
|
82 |
+
{
|
83 |
+
$reflection = new ReflectionClass($this->router);
|
84 |
+
$method = $reflection->getMethod('getCurrentClassShortName');
|
85 |
+
$method->setAccessible(true);
|
86 |
+
$className = $method->invoke($this->router, null);
|
87 |
+
|
88 |
+
$this->assertEquals('shopgate/payment', $className);
|
89 |
+
}
|
90 |
+
|
91 |
+
/**
|
92 |
+
* Tests backup class name path generator
|
93 |
+
*
|
94 |
+
* @param string $paymentMethod - e.g AUTHN_CC
|
95 |
+
* @param array $expected - array of expected combinations. Has to match exactly.
|
96 |
+
*
|
97 |
+
* @uses Shopgate_Framework_Model_Payment_Router::setPaymentMethod
|
98 |
+
* @covers ::_getModelCombinations
|
99 |
+
*
|
100 |
+
* @dataProvider dataProvider
|
101 |
+
*/
|
102 |
+
public function testGetModelCombinations($paymentMethod, $expected)
|
103 |
+
{
|
104 |
+
$this->router->setPaymentMethod($paymentMethod);
|
105 |
+
$reflection = new ReflectionClass($this->router);
|
106 |
+
$method = $reflection->getMethod('_getModelCombinations');
|
107 |
+
$method->setAccessible(true);
|
108 |
+
$combinations = $method->invoke($this->router, null);
|
109 |
+
$this->assertArraySubset($expected, $combinations);
|
110 |
+
}
|
111 |
+
}
|
app/code/community/Shopgate/Framework/Test/Model/Payment/Router/Exception.php
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Shopgate GmbH
|
5 |
+
*
|
6 |
+
* URHEBERRECHTSHINWEIS
|
7 |
+
*
|
8 |
+
* Dieses Plugin ist urheberrechtlich geschützt. Es darf ausschließlich von Kunden der Shopgate GmbH
|
9 |
+
* zum Zwecke der eigenen Kommunikation zwischen dem IT-System des Kunden mit dem IT-System der
|
10 |
+
* Shopgate GmbH über www.shopgate.com verwendet werden. Eine darüber hinausgehende Vervielfältigung, Verbreitung,
|
11 |
+
* öffentliche Zugänglichmachung, Bearbeitung oder Weitergabe an Dritte ist nur mit unserer vorherigen
|
12 |
+
* schriftlichen Zustimmung zulässig. Die Regelungen der §§ 69 d Abs. 2, 3 und 69 e UrhG bleiben hiervon unberührt.
|
13 |
+
*
|
14 |
+
* COPYRIGHT NOTICE
|
15 |
+
*
|
16 |
+
* This plugin is the subject of copyright protection. It is only for the use of Shopgate GmbH customers,
|
17 |
+
* for the purpose of facilitating communication between the IT system of the customer and the IT system
|
18 |
+
* of Shopgate GmbH via www.shopgate.com. Any reproduction, dissemination, public propagation, processing or
|
19 |
+
* transfer to third parties is only permitted where we previously consented thereto in writing. The provisions
|
20 |
+
* of paragraph 69 d, sub-paragraphs 2, 3 and paragraph 69, sub-paragraph e of the German Copyright Act shall remain unaffected.
|
21 |
+
*
|
22 |
+
* @author Shopgate GmbH <interfaces@shopgate.com>
|
23 |
+
*/
|
24 |
+
class Shopgate_Framework_Test_Model_Payment_Router_Exception extends Exception
|
25 |
+
{
|
26 |
+
}
|
app/code/community/Shopgate/Framework/Test/Model/Payment/Router/providers/testGetModelCombinations.yaml
ADDED
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
-
|
2 |
+
- PAYPAL
|
3 |
+
-
|
4 |
+
- _paypal
|
5 |
+
- # calculates all possible paths for this payment method, e.g. 'shopgate/payment' . '_payone'
|
6 |
+
- PAYONE_CC
|
7 |
+
-
|
8 |
+
- _payone
|
9 |
+
- _payone_cc
|
10 |
+
- _cc
|
11 |
+
- _cc_payone
|
12 |
+
-
|
13 |
+
- PP_WSPP_CC
|
14 |
+
-
|
15 |
+
- _pp
|
16 |
+
- _pp_wspp
|
17 |
+
- _pp_wspp_cc
|
18 |
+
- _pp_cc
|
19 |
+
- _pp_cc_wspp
|
20 |
+
- _wspp
|
21 |
+
- _wspp_pp
|
22 |
+
- _wspp_pp_cc
|
23 |
+
- _wspp_cc
|
24 |
+
- _wspp_cc_pp
|
25 |
+
- _cc
|
26 |
+
- _cc_pp
|
27 |
+
- _cc_pp_wspp
|
28 |
+
- _cc_wspp
|
29 |
+
- _cc_wspp_pp
|
app/code/community/Shopgate/Framework/Test/Model/Payment/Router/providers/testMethodPart.yaml
ADDED
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
-
|
2 |
+
- 1
|
3 |
+
- AA
|
4 |
+
- AA
|
5 |
+
-
|
6 |
+
- 2
|
7 |
+
- AA
|
8 |
+
- AA
|
9 |
+
-
|
10 |
+
- 3
|
11 |
+
- AA
|
12 |
+
- AA
|
13 |
+
-
|
14 |
+
- 1
|
15 |
+
- AA_BB
|
16 |
+
- AA
|
17 |
+
-
|
18 |
+
- 2
|
19 |
+
- AA_BB
|
20 |
+
- BB
|
21 |
+
-
|
22 |
+
- 3
|
23 |
+
- AA_BB
|
24 |
+
- AA
|
25 |
+
- #testing getting first part of 'AA_BB_CC', which is 'AA'
|
26 |
+
- 1
|
27 |
+
- AA_BB_CC
|
28 |
+
- AA
|
29 |
+
- #testing getting second part of 'AA_BB_CC', which is 'BB'
|
30 |
+
- 2
|
31 |
+
- AA_BB_CC
|
32 |
+
- BB
|
33 |
+
- #testing getting third part of 'AA_BB_CC', which is 'CC'
|
34 |
+
- 3
|
35 |
+
- AA_BB_CC
|
36 |
+
- CC
|
37 |
+
- #testing getting fourth part of 'AA_BB_CC', doesn't exist, defaults to first part 'AA'
|
38 |
+
- 4
|
39 |
+
- AA_BB_CC
|
40 |
+
- AA
|
app/code/community/Shopgate/Framework/Test/Model/Payment/RouterAbstract.php
ADDED
@@ -0,0 +1,78 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Shopgate GmbH
|
5 |
+
*
|
6 |
+
* URHEBERRECHTSHINWEIS
|
7 |
+
*
|
8 |
+
* Dieses Plugin ist urheberrechtlich geschützt. Es darf ausschließlich von Kunden der Shopgate GmbH
|
9 |
+
* zum Zwecke der eigenen Kommunikation zwischen dem IT-System des Kunden mit dem IT-System der
|
10 |
+
* Shopgate GmbH über www.shopgate.com verwendet werden. Eine darüber hinausgehende Vervielfältigung, Verbreitung,
|
11 |
+
* öffentliche Zugänglichmachung, Bearbeitung oder Weitergabe an Dritte ist nur mit unserer vorherigen
|
12 |
+
* schriftlichen Zustimmung zulässig. Die Regelungen der §§ 69 d Abs. 2, 3 und 69 e UrhG bleiben hiervon unberührt.
|
13 |
+
*
|
14 |
+
* COPYRIGHT NOTICE
|
15 |
+
*
|
16 |
+
* This plugin is the subject of copyright protection. It is only for the use of Shopgate GmbH customers,
|
17 |
+
* for the purpose of facilitating communication between the IT system of the customer and the IT system
|
18 |
+
* of Shopgate GmbH via www.shopgate.com. Any reproduction, dissemination, public propagation, processing or
|
19 |
+
* transfer to third parties is only permitted where we previously consented thereto in writing. The provisions
|
20 |
+
* of paragraph 69 d, sub-paragraphs 2, 3 and paragraph 69, sub-paragraph e of the German Copyright Act shall remain unaffected.
|
21 |
+
*
|
22 |
+
* @author Shopgate GmbH <interfaces@shopgate.com>
|
23 |
+
* @author Konstantin Kiritsenko <konstantin.kiritsenko@shopgate.com>
|
24 |
+
*/
|
25 |
+
class Shopgate_Framework_Test_Model_Payment_RouterAbstract extends Shopgate_Framework_Test_Model_Utility
|
26 |
+
{
|
27 |
+
/**
|
28 |
+
* @var Shopgate_Framework_Model_Payment_Router $router
|
29 |
+
*/
|
30 |
+
protected $router;
|
31 |
+
|
32 |
+
/**
|
33 |
+
* Exclude group 'empty' to avoid
|
34 |
+
* inflating the test number
|
35 |
+
*
|
36 |
+
* @coversNothing
|
37 |
+
* @group empty
|
38 |
+
*/
|
39 |
+
public function testEmpty() { }
|
40 |
+
|
41 |
+
/**
|
42 |
+
* Default setup for routers
|
43 |
+
* Avoids throwing exception when the setup
|
44 |
+
* is ran from this class.
|
45 |
+
*
|
46 |
+
* @throws Shopgate_Framework_Test_Model_Payment_Router_Exception
|
47 |
+
*/
|
48 |
+
public function setUp()
|
49 |
+
{
|
50 |
+
$order = new ShopgateOrder();
|
51 |
+
$shortName = $this->getConstant('CLASS_SHORT_NAME');
|
52 |
+
if (!$shortName && !$this->currentClass()) {
|
53 |
+
throw new Shopgate_Framework_Test_Model_Payment_Router_Exception(
|
54 |
+
"'A router's short name variable needs to be provided"
|
55 |
+
);
|
56 |
+
}
|
57 |
+
$this->router = Mage::getModel($shortName, array($order));
|
58 |
+
}
|
59 |
+
|
60 |
+
/**
|
61 |
+
* Checks if we are calling
|
62 |
+
* this class directly
|
63 |
+
*
|
64 |
+
* @return bool
|
65 |
+
*/
|
66 |
+
private function currentClass()
|
67 |
+
{
|
68 |
+
return $this instanceof self;
|
69 |
+
}
|
70 |
+
|
71 |
+
/**
|
72 |
+
* Garbage collection prep
|
73 |
+
*/
|
74 |
+
public function tearDown()
|
75 |
+
{
|
76 |
+
unset($this->router);
|
77 |
+
}
|
78 |
+
}
|
app/code/community/Shopgate/Framework/Test/Model/Payment/Simple.php
ADDED
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Shopgate GmbH
|
5 |
+
*
|
6 |
+
* URHEBERRECHTSHINWEIS
|
7 |
+
*
|
8 |
+
* Dieses Plugin ist urheberrechtlich geschützt. Es darf ausschließlich von Kunden der Shopgate GmbH
|
9 |
+
* zum Zwecke der eigenen Kommunikation zwischen dem IT-System des Kunden mit dem IT-System der
|
10 |
+
* Shopgate GmbH über www.shopgate.com verwendet werden. Eine darüber hinausgehende Vervielfältigung, Verbreitung,
|
11 |
+
* öffentliche Zugänglichmachung, Bearbeitung oder Weitergabe an Dritte ist nur mit unserer vorherigen
|
12 |
+
* schriftlichen Zustimmung zulässig. Die Regelungen der §§ 69 d Abs. 2, 3 und 69 e UrhG bleiben hiervon unberührt.
|
13 |
+
*
|
14 |
+
* COPYRIGHT NOTICE
|
15 |
+
*
|
16 |
+
* This plugin is the subject of copyright protection. It is only for the use of Shopgate GmbH customers,
|
17 |
+
* for the purpose of facilitating communication between the IT system of the customer and the IT system
|
18 |
+
* of Shopgate GmbH via www.shopgate.com. Any reproduction, dissemination, public propagation, processing or
|
19 |
+
* transfer to third parties is only permitted where we previously consented thereto in writing. The provisions
|
20 |
+
* of paragraph 69 d, sub-paragraphs 2, 3 and paragraph 69, sub-paragraph e of the German Copyright Act shall remain unaffected.
|
21 |
+
*
|
22 |
+
* @author Shopgate GmbH <interfaces@shopgate.com
|
23 |
+
* @author Konstantin Kiritsenko <konstantin.kiritsenko@shopgate.com>
|
24 |
+
* @group Shopgate_Payment
|
25 |
+
* @group Shopgate_Payment_Router
|
26 |
+
*
|
27 |
+
* @coversDefaultClass Shopgate_Framework_Model_Payment_Simple
|
28 |
+
*/
|
29 |
+
class Shopgate_Framework_Test_Model_Payment_Simple extends Shopgate_Framework_Test_Model_Payment_RouterAbstract
|
30 |
+
{
|
31 |
+
const CLASS_SHORT_NAME = 'shopgate/payment_simple';
|
32 |
+
|
33 |
+
/** @var Shopgate_Framework_Model_Payment_Simple $router */
|
34 |
+
protected $router;
|
35 |
+
|
36 |
+
/**
|
37 |
+
* Checks that the simple router shortener
|
38 |
+
* returns the right short class name
|
39 |
+
*
|
40 |
+
* @covers ::getCurrentClassShortName
|
41 |
+
*/
|
42 |
+
public function testGetClassShortName()
|
43 |
+
{
|
44 |
+
$reflection = new ReflectionClass($this->router);
|
45 |
+
$method = $reflection->getMethod('getCurrentClassShortName');
|
46 |
+
$method->setAccessible(true);
|
47 |
+
$className = $method->invoke($this->router, null);
|
48 |
+
|
49 |
+
$this->assertEquals(self::CLASS_SHORT_NAME, $className);
|
50 |
+
}
|
51 |
+
}
|
app/code/community/Shopgate/Framework/Test/Model/Payment/Simple/Billsafe.php
ADDED
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Shopgate GmbH
|
5 |
+
*
|
6 |
+
* URHEBERRECHTSHINWEIS
|
7 |
+
*
|
8 |
+
* Dieses Plugin ist urheberrechtlich geschützt. Es darf ausschließlich von Kunden der Shopgate GmbH
|
9 |
+
* zum Zwecke der eigenen Kommunikation zwischen dem IT-System des Kunden mit dem IT-System der
|
10 |
+
* Shopgate GmbH über www.shopgate.com verwendet werden. Eine darüber hinausgehende Vervielfältigung, Verbreitung,
|
11 |
+
* öffentliche Zugänglichmachung, Bearbeitung oder Weitergabe an Dritte ist nur mit unserer vorherigen
|
12 |
+
* schriftlichen Zustimmung zulässig. Die Regelungen der §§ 69 d Abs. 2, 3 und 69 e UrhG bleiben hiervon unberührt.
|
13 |
+
*
|
14 |
+
* COPYRIGHT NOTICE
|
15 |
+
*
|
16 |
+
* This plugin is the subject of copyright protection. It is only for the use of Shopgate GmbH customers,
|
17 |
+
* for the purpose of facilitating communication between the IT system of the customer and the IT system
|
18 |
+
* of Shopgate GmbH via www.shopgate.com. Any reproduction, dissemination, public propagation, processing or
|
19 |
+
* transfer to third parties is only permitted where we previously consented thereto in writing. The provisions
|
20 |
+
* of paragraph 69 d, sub-paragraphs 2, 3 and paragraph 69, sub-paragraph e of the German Copyright Act shall remain unaffected.
|
21 |
+
*
|
22 |
+
* @author Shopgate GmbH <interfaces@shopgate.com>
|
23 |
+
* @author Konstantin Kiritsenko <konstantin.kiritsenko@shopgate.com>
|
24 |
+
* @group Shopgate_Payment
|
25 |
+
* @group Shopgate_Payment_Billsafe
|
26 |
+
*
|
27 |
+
* @coversDefaultClass Shopgate_Framework_Model_Payment_Simple_Billsafe
|
28 |
+
*/
|
29 |
+
class Shopgate_Framework_Test_Model_Payment_Simple_Billsafe extends Shopgate_Framework_Test_Model_Payment_Abstract
|
30 |
+
{
|
31 |
+
const MODULE_CONFIG = 'Netresearch_Billsafe';
|
32 |
+
const CLASS_SHORT_NAME = 'shopgate/payment_simple_billsafe';
|
33 |
+
const XML_CONFIG_ENABLED = 'payment/billsafe/active';
|
34 |
+
}
|
app/code/community/Shopgate/Framework/Test/Model/Payment/Simple/Cod.php
ADDED
@@ -0,0 +1,169 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Shopgate GmbH
|
5 |
+
*
|
6 |
+
* URHEBERRECHTSHINWEIS
|
7 |
+
*
|
8 |
+
* Dieses Plugin ist urheberrechtlich geschützt. Es darf ausschließlich von Kunden der Shopgate GmbH
|
9 |
+
* zum Zwecke der eigenen Kommunikation zwischen dem IT-System des Kunden mit dem IT-System der
|
10 |
+
* Shopgate GmbH über www.shopgate.com verwendet werden. Eine darüber hinausgehende Vervielfältigung, Verbreitung,
|
11 |
+
* öffentliche Zugänglichmachung, Bearbeitung oder Weitergabe an Dritte ist nur mit unserer vorherigen
|
12 |
+
* schriftlichen Zustimmung zulässig. Die Regelungen der §§ 69 d Abs. 2, 3 und 69 e UrhG bleiben hiervon unberührt.
|
13 |
+
*
|
14 |
+
* COPYRIGHT NOTICE
|
15 |
+
*
|
16 |
+
* This plugin is the subject of copyright protection. It is only for the use of Shopgate GmbH customers,
|
17 |
+
* for the purpose of facilitating communication between the IT system of the customer and the IT system
|
18 |
+
* of Shopgate GmbH via www.shopgate.com. Any reproduction, dissemination, public propagation, processing or
|
19 |
+
* transfer to third parties is only permitted where we previously consented thereto in writing. The provisions
|
20 |
+
* of paragraph 69 d, sub-paragraphs 2, 3 and paragraph 69, sub-paragraph e of the German Copyright Act shall remain unaffected.
|
21 |
+
*
|
22 |
+
* @author Shopgate GmbH <interfaces@shopgate.com>
|
23 |
+
* @author Konstantin Kiritsenko <konstantin.kiritsenko@shopgate.com>
|
24 |
+
* @group Shopgate_Payment
|
25 |
+
* @group Shopgate_Payment_Router
|
26 |
+
* @group Shopgate_Payment_Cod
|
27 |
+
*
|
28 |
+
* @coversDefaultClass Shopgate_Framework_Model_Payment_Simple_Cod
|
29 |
+
*/
|
30 |
+
class Shopgate_Framework_Test_Model_Payment_Simple_Cod extends Shopgate_Framework_Test_Model_Payment_RouterAbstract
|
31 |
+
{
|
32 |
+
const CLASS_SHORT_NAME = 'shopgate/payment_simple_cod';
|
33 |
+
|
34 |
+
/**
|
35 |
+
* @var Shopgate_Framework_Model_Payment_Simple_Cod $router
|
36 |
+
*/
|
37 |
+
protected $router;
|
38 |
+
|
39 |
+
/**
|
40 |
+
* Adding a payment method
|
41 |
+
*/
|
42 |
+
public function setUp()
|
43 |
+
{
|
44 |
+
parent::setUp();
|
45 |
+
$this->router->getShopgateOrder()->setPaymentMethod(ShopgateCartBase::COD);
|
46 |
+
}
|
47 |
+
|
48 |
+
/**
|
49 |
+
* Native method can only be ran if magento is v1.7.0.0+
|
50 |
+
* and all the other modules are disabled
|
51 |
+
*
|
52 |
+
* @uses Mage::getVersion
|
53 |
+
* @uses Shopgate_Framework_Test_Model_Utility::activateModule
|
54 |
+
* @uses Shopgate_Framework_Test_Model_Utility::deactivateModule
|
55 |
+
* @uses Shopgate_Framework_Model_Payment_Simple_Cod::setPaymentMethod
|
56 |
+
* @uses Shopgate_Framework_Model_Payment_Simple_Cod::getPaymentMethod
|
57 |
+
* @covers Shopgate_Framework_Model_Payment_Simple_Cod::getModelByPaymentMethod
|
58 |
+
*
|
59 |
+
* @loadFixture
|
60 |
+
*/
|
61 |
+
public function testGetCodNativeMethod()
|
62 |
+
{
|
63 |
+
$configMock = $this->getHelperMock('shopgate/config', array('getIsMagentoVersionLower1700'));
|
64 |
+
$configMock->expects($this->exactly(2))
|
65 |
+
->method('getIsMagentoVersionLower1700')
|
66 |
+
->willReturnOnConsecutiveCalls(
|
67 |
+
false,
|
68 |
+
true
|
69 |
+
);
|
70 |
+
$this->replaceByMock('helper', 'shopgate/config', $configMock);
|
71 |
+
|
72 |
+
$this->deactivateModule(Shopgate_Framework_Model_Payment_Simple_Cod_Phoenix108::MODULE_CONFIG);
|
73 |
+
$this->deactivateModule(Shopgate_Framework_Model_Payment_Simple_Cod_Msp::MODULE_CONFIG);
|
74 |
+
$this->activateModule(Shopgate_Framework_Model_Payment_Simple_Cod_Native::MODULE_CONFIG);
|
75 |
+
|
76 |
+
$this->router->getModelByPaymentMethod();
|
77 |
+
$this->assertEquals('Native', $this->router->getPaymentMethod());
|
78 |
+
|
79 |
+
$this->router->setPaymentMethod('');
|
80 |
+
$this->router->getModelByPaymentMethod();
|
81 |
+
$this->assertEquals(ShopgateCartBase::COD, $this->router->getPaymentMethod());
|
82 |
+
}
|
83 |
+
|
84 |
+
/**
|
85 |
+
* Checks if phoenix module redirect works.
|
86 |
+
*
|
87 |
+
* Intentionally left COD Native to be enabled
|
88 |
+
*
|
89 |
+
* @uses Shopgate_Framework_Test_Model_Utility::activateModule
|
90 |
+
* @uses Shopgate_Framework_Model_Payment_Simple_Cod::getPaymentMethod
|
91 |
+
* @uses Shopgate_Framework_Model_Payment_Simple_Cod::setPaymentMethod
|
92 |
+
* @covers Shopgate_Framework_Model_Payment_Simple_Cod::getModelByPaymentMethod
|
93 |
+
*
|
94 |
+
* @loadFixture
|
95 |
+
*/
|
96 |
+
public function testGetCodPhoenixMethod()
|
97 |
+
{
|
98 |
+
$routerMock = $this->getModelMock(
|
99 |
+
self::CLASS_SHORT_NAME,
|
100 |
+
array('_getVersion'),
|
101 |
+
false,
|
102 |
+
array(array(new ShopgateOrder()))
|
103 |
+
);
|
104 |
+
$routerMock->expects($this->exactly(2))
|
105 |
+
->method('_getVersion')
|
106 |
+
->willReturnOnConsecutiveCalls(
|
107 |
+
'1.0.7',
|
108 |
+
'1.0.8'
|
109 |
+
);
|
110 |
+
|
111 |
+
$this->activateModule(Shopgate_Framework_Model_Payment_Simple_Cod_Native::MODULE_CONFIG);
|
112 |
+
$this->activateModule(Shopgate_Framework_Model_Payment_Simple_Cod_Phoenix108::MODULE_CONFIG);
|
113 |
+
|
114 |
+
/** @var Shopgate_Framework_Model_Payment_Simple_Cod $routerMock */
|
115 |
+
$routerMock->setPaymentMethod('');
|
116 |
+
$routerMock->getModelByPaymentMethod();
|
117 |
+
$this->assertContains('Phoenix107', $routerMock->getPaymentMethod());
|
118 |
+
|
119 |
+
$routerMock->setPaymentMethod('');
|
120 |
+
$routerMock->getModelByPaymentMethod();
|
121 |
+
$this->assertContains('Phoenix108', $routerMock->getPaymentMethod());
|
122 |
+
}
|
123 |
+
|
124 |
+
/**
|
125 |
+
* MSP takes priority over others even when all others are enabled
|
126 |
+
*
|
127 |
+
* @uses Shopgate_Framework_Test_Model_Utility::activateModule
|
128 |
+
* @uses Shopgate_Framework_Model_Payment_Simple_Cod::getPaymentMethod
|
129 |
+
* @covers Shopgate_Framework_Model_Payment_Simple_Cod::getModelByPaymentMethod
|
130 |
+
*
|
131 |
+
* @loadFixture
|
132 |
+
*/
|
133 |
+
public function testGetCodMspMethod()
|
134 |
+
{
|
135 |
+
$this->activateModule(Shopgate_Framework_Model_Payment_Simple_Cod_Msp::MODULE_CONFIG);
|
136 |
+
$this->activateModule(Shopgate_Framework_Model_Payment_Simple_Cod_Native::MODULE_CONFIG);
|
137 |
+
$this->activateModule(Shopgate_Framework_Model_Payment_Simple_Cod_Phoenix108::MODULE_CONFIG);
|
138 |
+
$this->router->getModelByPaymentMethod();
|
139 |
+
|
140 |
+
$this->assertEquals('Msp', $this->router->getPaymentMethod());
|
141 |
+
}
|
142 |
+
|
143 |
+
/**
|
144 |
+
* Test if all are disabled, routes to COD.
|
145 |
+
*
|
146 |
+
* @uses Shopgate_Framework_Test_Model_Utility::deactivateModule
|
147 |
+
* @uses Shopgate_Framework_Model_Payment_Simple_Cod::getPaymentMethod
|
148 |
+
* @covers Shopgate_Framework_Model_Payment_Simple_Cod::getModelByPaymentMethod
|
149 |
+
*
|
150 |
+
* @loadFixture
|
151 |
+
*/
|
152 |
+
public function testGetNoCodMethod()
|
153 |
+
{
|
154 |
+
/** @var Shopgate_Framework_Model_Payment_Simple_Cod | EcomDev_PHPUnit_Mock_Proxy $mock */
|
155 |
+
$mock = $this->getModelMock(
|
156 |
+
'shopgate/payment_simple_cod',
|
157 |
+
array('isModuleActive'),
|
158 |
+
false,
|
159 |
+
array(array($this->router->getShopgateOrder()))
|
160 |
+
);
|
161 |
+
$mock->expects($this->once())
|
162 |
+
->method('isModuleActive')
|
163 |
+
->will($this->returnValue(false));
|
164 |
+
|
165 |
+
$mock->getModelByPaymentMethod();
|
166 |
+
|
167 |
+
$this->assertEquals(ShopgateCartBase::COD, $mock->getPaymentMethod());
|
168 |
+
}
|
169 |
+
}
|
app/code/community/Shopgate/Framework/Test/Model/Payment/Simple/Cod/Msp.php
ADDED
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Shopgate GmbH
|
5 |
+
*
|
6 |
+
* URHEBERRECHTSHINWEIS
|
7 |
+
*
|
8 |
+
* Dieses Plugin ist urheberrechtlich geschützt. Es darf ausschließlich von Kunden der Shopgate GmbH
|
9 |
+
* zum Zwecke der eigenen Kommunikation zwischen dem IT-System des Kunden mit dem IT-System der
|
10 |
+
* Shopgate GmbH über www.shopgate.com verwendet werden. Eine darüber hinausgehende Vervielfältigung, Verbreitung,
|
11 |
+
* öffentliche Zugänglichmachung, Bearbeitung oder Weitergabe an Dritte ist nur mit unserer vorherigen
|
12 |
+
* schriftlichen Zustimmung zulässig. Die Regelungen der §§ 69 d Abs. 2, 3 und 69 e UrhG bleiben hiervon unberührt.
|
13 |
+
*
|
14 |
+
* COPYRIGHT NOTICE
|
15 |
+
*
|
16 |
+
* This plugin is the subject of copyright protection. It is only for the use of Shopgate GmbH customers,
|
17 |
+
* for the purpose of facilitating communication between the IT system of the customer and the IT system
|
18 |
+
* of Shopgate GmbH via www.shopgate.com. Any reproduction, dissemination, public propagation, processing or
|
19 |
+
* transfer to third parties is only permitted where we previously consented thereto in writing. The provisions
|
20 |
+
* of paragraph 69 d, sub-paragraphs 2, 3 and paragraph 69, sub-paragraph e of the German Copyright Act shall remain unaffected.
|
21 |
+
*
|
22 |
+
* @author Shopgate GmbH <interfaces@shopgate.com>
|
23 |
+
* @author Konstantin Kiritsenko <konstantin.kiritsenko@shopgate.com>
|
24 |
+
* @group Shopgate_Payment
|
25 |
+
* @group Shopgate_Payment_Cod
|
26 |
+
*
|
27 |
+
* @coversDefaultClass Shopgate_Framework_Model_Payment_Simple_Cod_Msp
|
28 |
+
*/
|
29 |
+
class Shopgate_Framework_Test_Model_Payment_Simple_Cod_Msp extends Shopgate_Framework_Test_Model_Payment_Abstract
|
30 |
+
{
|
31 |
+
const MODULE_CONFIG = 'MSP_CashOnDelivery';
|
32 |
+
const CLASS_SHORT_NAME = 'shopgate/payment_simple_cod_msp';
|
33 |
+
const XML_CONFIG_ENABLED = 'payment/msp_cashondelivery/active';
|
34 |
+
|
35 |
+
/** @var Shopgate_Framework_Model_Payment_Simple_Cod_Msp $class */
|
36 |
+
protected $class;
|
37 |
+
|
38 |
+
/**
|
39 |
+
* We default to use magento's config
|
40 |
+
*
|
41 |
+
* @covers ::setOrderStatus
|
42 |
+
*/
|
43 |
+
public function testSetOrderStatus()
|
44 |
+
{
|
45 |
+
$order = Mage::getModel('sales/order');
|
46 |
+
$this->class->setOrderStatus($order);
|
47 |
+
|
48 |
+
$this->assertNull($order->getState());
|
49 |
+
}
|
50 |
+
}
|
app/code/community/Shopgate/Framework/Test/Model/Payment/Simple/Cod/Native.php
ADDED
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Shopgate GmbH
|
5 |
+
*
|
6 |
+
* URHEBERRECHTSHINWEIS
|
7 |
+
*
|
8 |
+
* Dieses Plugin ist urheberrechtlich geschützt. Es darf ausschließlich von Kunden der Shopgate GmbH
|
9 |
+
* zum Zwecke der eigenen Kommunikation zwischen dem IT-System des Kunden mit dem IT-System der
|
10 |
+
* Shopgate GmbH über www.shopgate.com verwendet werden. Eine darüber hinausgehende Vervielfältigung, Verbreitung,
|
11 |
+
* öffentliche Zugänglichmachung, Bearbeitung oder Weitergabe an Dritte ist nur mit unserer vorherigen
|
12 |
+
* schriftlichen Zustimmung zulässig. Die Regelungen der §§ 69 d Abs. 2, 3 und 69 e UrhG bleiben hiervon unberührt.
|
13 |
+
*
|
14 |
+
* COPYRIGHT NOTICE
|
15 |
+
*
|
16 |
+
* This plugin is the subject of copyright protection. It is only for the use of Shopgate GmbH customers,
|
17 |
+
* for the purpose of facilitating communication between the IT system of the customer and the IT system
|
18 |
+
* of Shopgate GmbH via www.shopgate.com. Any reproduction, dissemination, public propagation, processing or
|
19 |
+
* transfer to third parties is only permitted where we previously consented thereto in writing. The provisions
|
20 |
+
* of paragraph 69 d, sub-paragraphs 2, 3 and paragraph 69, sub-paragraph e of the German Copyright Act shall remain unaffected.
|
21 |
+
*
|
22 |
+
* @author Shopgate GmbH <interfaces@shopgate.com>
|
23 |
+
* @author Konstantin Kiritsenko <konstantin.kiritsenko@shopgate.com>
|
24 |
+
* @group Shopgate_Payment
|
25 |
+
* @group Shopgate_Payment_Cod
|
26 |
+
*
|
27 |
+
* @coversDefaultClass Shopgate_Framework_Model_Payment_Simple_Cod_Native
|
28 |
+
*/
|
29 |
+
class Shopgate_Framework_Test_Model_Payment_Simple_Cod_Native extends Shopgate_Framework_Test_Model_Payment_Abstract
|
30 |
+
{
|
31 |
+
const MODULE_CONFIG = 'Mage_Payment';
|
32 |
+
const CLASS_SHORT_NAME = 'shopgate/payment_simple_cod_native';
|
33 |
+
const XML_CONFIG_ENABLED = 'payment/cashondelivery/active';
|
34 |
+
|
35 |
+
/** @var Shopgate_Framework_Model_Payment_Simple_Cod_Native $class */
|
36 |
+
protected $class;
|
37 |
+
|
38 |
+
/**
|
39 |
+
* We default to use magento's config
|
40 |
+
*
|
41 |
+
* @covers ::setOrderStatus
|
42 |
+
*/
|
43 |
+
public function testSetOrderStatus()
|
44 |
+
{
|
45 |
+
$order = Mage::getModel('sales/order');
|
46 |
+
$this->class->setOrderStatus($order);
|
47 |
+
|
48 |
+
$this->assertNull($order->getState());
|
49 |
+
}
|
50 |
+
}
|
app/code/community/Shopgate/Framework/Test/Model/Payment/Simple/Cod/Phoenix107.php
ADDED
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Shopgate GmbH
|
5 |
+
*
|
6 |
+
* URHEBERRECHTSHINWEIS
|
7 |
+
*
|
8 |
+
* Dieses Plugin ist urheberrechtlich geschützt. Es darf ausschließlich von Kunden der Shopgate GmbH
|
9 |
+
* zum Zwecke der eigenen Kommunikation zwischen dem IT-System des Kunden mit dem IT-System der
|
10 |
+
* Shopgate GmbH über www.shopgate.com verwendet werden. Eine darüber hinausgehende Vervielfältigung, Verbreitung,
|
11 |
+
* öffentliche Zugänglichmachung, Bearbeitung oder Weitergabe an Dritte ist nur mit unserer vorherigen
|
12 |
+
* schriftlichen Zustimmung zulässig. Die Regelungen der §§ 69 d Abs. 2, 3 und 69 e UrhG bleiben hiervon unberührt.
|
13 |
+
*
|
14 |
+
* COPYRIGHT NOTICE
|
15 |
+
*
|
16 |
+
* This plugin is the subject of copyright protection. It is only for the use of Shopgate GmbH customers,
|
17 |
+
* for the purpose of facilitating communication between the IT system of the customer and the IT system
|
18 |
+
* of Shopgate GmbH via www.shopgate.com. Any reproduction, dissemination, public propagation, processing or
|
19 |
+
* transfer to third parties is only permitted where we previously consented thereto in writing. The provisions
|
20 |
+
* of paragraph 69 d, sub-paragraphs 2, 3 and paragraph 69, sub-paragraph e of the German Copyright Act shall remain unaffected.
|
21 |
+
*
|
22 |
+
* @author Shopgate GmbH <interfaces@shopgate.com>
|
23 |
+
* @author Konstantin Kiritsenko <konstantin.kiritsenko@shopgate.com>
|
24 |
+
* @group Shopgate_Payment
|
25 |
+
* @group Shopgate_Payment_Cod
|
26 |
+
*
|
27 |
+
* @coversDefaultClass Shopgate_Framework_Model_Payment_Simple_Cod_Phoenix107
|
28 |
+
*/
|
29 |
+
class Shopgate_Framework_Test_Model_Payment_Simple_Cod_Phoenix107 extends Shopgate_Framework_Test_Model_Payment_Abstract
|
30 |
+
{
|
31 |
+
const MODULE_CONFIG = 'Phoenix_CashOnDelivery';
|
32 |
+
const CLASS_SHORT_NAME = 'shopgate/payment_simple_cod_phoenix107';
|
33 |
+
const XML_CONFIG_ENABLED = 'payment/cashondelivery/active';
|
34 |
+
|
35 |
+
/** @var Shopgate_Framework_Model_Payment_Simple_Cod_Phoenix107 $class */
|
36 |
+
protected $class;
|
37 |
+
|
38 |
+
/**
|
39 |
+
* We default to use magento's config
|
40 |
+
*
|
41 |
+
* @covers ::setOrderStatus
|
42 |
+
*/
|
43 |
+
public function testSetOrderStatus()
|
44 |
+
{
|
45 |
+
$order = Mage::getModel('sales/order');
|
46 |
+
$this->class->setOrderStatus($order);
|
47 |
+
|
48 |
+
$this->assertNull($order->getState());
|
49 |
+
}
|
50 |
+
}
|
app/code/community/Shopgate/Framework/Test/Model/Payment/Simple/Cod/Phoenix108.php
ADDED
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Shopgate GmbH
|
5 |
+
*
|
6 |
+
* URHEBERRECHTSHINWEIS
|
7 |
+
*
|
8 |
+
* Dieses Plugin ist urheberrechtlich geschützt. Es darf ausschließlich von Kunden der Shopgate GmbH
|
9 |
+
* zum Zwecke der eigenen Kommunikation zwischen dem IT-System des Kunden mit dem IT-System der
|
10 |
+
* Shopgate GmbH über www.shopgate.com verwendet werden. Eine darüber hinausgehende Vervielfältigung, Verbreitung,
|
11 |
+
* öffentliche Zugänglichmachung, Bearbeitung oder Weitergabe an Dritte ist nur mit unserer vorherigen
|
12 |
+
* schriftlichen Zustimmung zulässig. Die Regelungen der §§ 69 d Abs. 2, 3 und 69 e UrhG bleiben hiervon unberührt.
|
13 |
+
*
|
14 |
+
* COPYRIGHT NOTICE
|
15 |
+
*
|
16 |
+
* This plugin is the subject of copyright protection. It is only for the use of Shopgate GmbH customers,
|
17 |
+
* for the purpose of facilitating communication between the IT system of the customer and the IT system
|
18 |
+
* of Shopgate GmbH via www.shopgate.com. Any reproduction, dissemination, public propagation, processing or
|
19 |
+
* transfer to third parties is only permitted where we previously consented thereto in writing. The provisions
|
20 |
+
* of paragraph 69 d, sub-paragraphs 2, 3 and paragraph 69, sub-paragraph e of the German Copyright Act shall remain unaffected.
|
21 |
+
*
|
22 |
+
* @author Shopgate GmbH <interfaces@shopgate.com>
|
23 |
+
* @author Konstantin Kiritsenko <konstantin.kiritsenko@shopgate.com>
|
24 |
+
* @group Shopgate_Payment
|
25 |
+
* @group Shopgate_Payment_Cod
|
26 |
+
*
|
27 |
+
* @coversDefaultClass Shopgate_Framework_Model_Payment_Simple_Cod_Phoenix108
|
28 |
+
*/
|
29 |
+
class Shopgate_Framework_Test_Model_Payment_Simple_Cod_Phoenix108 extends Shopgate_Framework_Test_Model_Payment_Abstract
|
30 |
+
{
|
31 |
+
const MODULE_CONFIG = 'Phoenix_CashOnDelivery';
|
32 |
+
const CLASS_SHORT_NAME = 'shopgate/payment_simple_cod_phoenix108';
|
33 |
+
const XML_CONFIG_ENABLED = 'payment/phoenix_cashondelivery/active';
|
34 |
+
|
35 |
+
/** @var Shopgate_Framework_Model_Payment_Simple_Cod_Phoenix108 $class */
|
36 |
+
protected $class;
|
37 |
+
|
38 |
+
/**
|
39 |
+
* We default to use magento's config
|
40 |
+
*
|
41 |
+
* @covers ::setOrderStatus
|
42 |
+
*/
|
43 |
+
public function testSetOrderStatus()
|
44 |
+
{
|
45 |
+
$order = Mage::getModel('sales/order');
|
46 |
+
$this->class->setOrderStatus($order);
|
47 |
+
|
48 |
+
$this->assertNull($order->getState());
|
49 |
+
}
|
50 |
+
}
|
app/code/community/Shopgate/Framework/Test/Model/Payment/Simple/Cod/fixtures/testGetCodMspMethod.yaml
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
1 |
+
config:
|
2 |
+
default/payment/msp_cashondelivery/active: 1
|
3 |
+
default/payment/cashondelivery/active: 1
|
4 |
+
default/payment/phoenix_cashondelivery/active: 1
|
app/code/community/Shopgate/Framework/Test/Model/Payment/Simple/Cod/fixtures/testGetCodNativeMethod.yaml
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
1 |
+
config:
|
2 |
+
default/payment/cashondelivery/active: 1
|
app/code/community/Shopgate/Framework/Test/Model/Payment/Simple/Cod/fixtures/testGetCodPhoenixMethod.yaml
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
1 |
+
config:
|
2 |
+
default/payment/cashondelivery/active: 1
|
3 |
+
default/payment/phoenix_cashondelivery/active: 1
|
4 |
+
default/payment/msp_cashondelivery/active: 0
|
app/code/community/Shopgate/Framework/Test/Model/Payment/Simple/Cod/fixtures/testGetNoCodMethod.yaml
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
1 |
+
config:
|
2 |
+
default/payment/cashondelivery/active: 0
|
3 |
+
default/payment/phoenix_cashondelivery/active: 0
|
4 |
+
default/payment/msp_cashondelivery/active: 0
|
app/code/community/Shopgate/Framework/Test/Model/Payment/Simple/Invoice.php
ADDED
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Shopgate GmbH
|
5 |
+
*
|
6 |
+
* URHEBERRECHTSHINWEIS
|
7 |
+
*
|
8 |
+
* Dieses Plugin ist urheberrechtlich geschützt. Es darf ausschließlich von Kunden der Shopgate GmbH
|
9 |
+
* zum Zwecke der eigenen Kommunikation zwischen dem IT-System des Kunden mit dem IT-System der
|
10 |
+
* Shopgate GmbH über www.shopgate.com verwendet werden. Eine darüber hinausgehende Vervielfältigung, Verbreitung,
|
11 |
+
* öffentliche Zugänglichmachung, Bearbeitung oder Weitergabe an Dritte ist nur mit unserer vorherigen
|
12 |
+
* schriftlichen Zustimmung zulässig. Die Regelungen der §§ 69 d Abs. 2, 3 und 69 e UrhG bleiben hiervon unberührt.
|
13 |
+
*
|
14 |
+
* COPYRIGHT NOTICE
|
15 |
+
*
|
16 |
+
* This plugin is the subject of copyright protection. It is only for the use of Shopgate GmbH customers,
|
17 |
+
* for the purpose of facilitating communication between the IT system of the customer and the IT system
|
18 |
+
* of Shopgate GmbH via www.shopgate.com. Any reproduction, dissemination, public propagation, processing or
|
19 |
+
* transfer to third parties is only permitted where we previously consented thereto in writing. The provisions
|
20 |
+
* of paragraph 69 d, sub-paragraphs 2, 3 and paragraph 69, sub-paragraph e of the German Copyright Act shall remain unaffected.
|
21 |
+
*
|
22 |
+
* @author Shopgate GmbH <interfaces@shopgate.com>
|
23 |
+
* @author Konstantin Kiritsenko <konstantin.kiritsenko@shopgate.com>
|
24 |
+
* @group Shopgate_Payment
|
25 |
+
* @group Shopgate_Payment_Invoice
|
26 |
+
*
|
27 |
+
* @coversDefaultClass Shopgate_Framework_Model_Payment_Simple_Invoice
|
28 |
+
*/
|
29 |
+
class Shopgate_Framework_Test_Model_Payment_Simple_Invoice extends Shopgate_Framework_Test_Model_Payment_Abstract
|
30 |
+
{
|
31 |
+
const MODULE_CONFIG = 'Mage_Payment';
|
32 |
+
const CLASS_SHORT_NAME = 'shopgate/payment_simple_invoice';
|
33 |
+
const XML_CONFIG_ENABLED = 'payment/purchaseorder/active';
|
34 |
+
|
35 |
+
/**
|
36 |
+
* @covers ::setOrderStatus
|
37 |
+
*
|
38 |
+
* @dataProvider allStateProvider
|
39 |
+
*/
|
40 |
+
public function testSetOrderStatus($state)
|
41 |
+
{
|
42 |
+
parent::testSetOrderStatus($state);
|
43 |
+
}
|
44 |
+
}
|
app/code/community/Shopgate/Framework/Test/Model/Payment/Simple/Mws.php
ADDED
@@ -0,0 +1,63 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Shopgate GmbH
|
5 |
+
*
|
6 |
+
* URHEBERRECHTSHINWEIS
|
7 |
+
*
|
8 |
+
* Dieses Plugin ist urheberrechtlich geschützt. Es darf ausschließlich von Kunden der Shopgate GmbH
|
9 |
+
* zum Zwecke der eigenen Kommunikation zwischen dem IT-System des Kunden mit dem IT-System der
|
10 |
+
* Shopgate GmbH über www.shopgate.com verwendet werden. Eine darüber hinausgehende Vervielfältigung, Verbreitung,
|
11 |
+
* öffentliche Zugänglichmachung, Bearbeitung oder Weitergabe an Dritte ist nur mit unserer vorherigen
|
12 |
+
* schriftlichen Zustimmung zulässig. Die Regelungen der §§ 69 d Abs. 2, 3 und 69 e UrhG bleiben hiervon unberührt.
|
13 |
+
*
|
14 |
+
* COPYRIGHT NOTICE
|
15 |
+
*
|
16 |
+
* This plugin is the subject of copyright protection. It is only for the use of Shopgate GmbH customers,
|
17 |
+
* for the purpose of facilitating communication between the IT system of the customer and the IT system
|
18 |
+
* of Shopgate GmbH via www.shopgate.com. Any reproduction, dissemination, public propagation, processing or
|
19 |
+
* transfer to third parties is only permitted where we previously consented thereto in writing. The provisions
|
20 |
+
* of paragraph 69 d, sub-paragraphs 2, 3 and paragraph 69, sub-paragraph e of the German Copyright Act shall remain unaffected.
|
21 |
+
*
|
22 |
+
* @author Shopgate GmbH <interfaces@shopgate.com>
|
23 |
+
* @author Konstantin Kiritsenko <konstantin.kiritsenko@shopgate.com>
|
24 |
+
* @group Shopgate_Payment
|
25 |
+
* @group Shopgate_Payment_Router
|
26 |
+
* @group Shopgate_Payment_Mws
|
27 |
+
*
|
28 |
+
* @coversDefaultClass Shopgate_Framework_Model_Payment_Simple_Mws
|
29 |
+
*/
|
30 |
+
class Shopgate_Framework_Test_Model_Payment_Simple_Mws extends Shopgate_Framework_Test_Model_Payment_RouterAbstract
|
31 |
+
{
|
32 |
+
const CLASS_SHORT_NAME = 'shopgate/payment_simple_mws';
|
33 |
+
|
34 |
+
/** @var Shopgate_Framework_Model_Payment_Simple_Mws $router */
|
35 |
+
protected $router;
|
36 |
+
|
37 |
+
/**
|
38 |
+
* Check for mage < v1.6 re-route
|
39 |
+
*
|
40 |
+
* @uses ShopgateOrder::setPaymentMethod
|
41 |
+
* @uses Shopgate_Framework_Model_Payment_Simple_Mws::getShopgateOrder
|
42 |
+
* @uses Shopgate_Framework_Model_Payment_Simple_Mws::getPaymentMethod
|
43 |
+
* @uses Shopgate_Framework_Model_Payment_Simple_Mws::setPaymentMethod
|
44 |
+
*
|
45 |
+
* @covers ::getModelByPaymentMethod
|
46 |
+
*/
|
47 |
+
public function testGetMwsBelowMage16Method()
|
48 |
+
{
|
49 |
+
$configMock = $this->getHelperMock('shopgate/config', array('getIsMagentoVersionLower16'));
|
50 |
+
$configMock->expects($this->exactly(2))
|
51 |
+
->method('getIsMagentoVersionLower16')
|
52 |
+
->willReturnOnConsecutiveCalls(false, true);
|
53 |
+
$this->replaceByMock('helper', 'shopgate/config', $configMock);
|
54 |
+
|
55 |
+
$this->router->getShopgateOrder()->setPaymentMethod(ShopgateCartBase::AMAZON_PAYMENT);
|
56 |
+
$this->router->getModelByPaymentMethod();
|
57 |
+
$this->assertEquals('MWS', $this->router->getPaymentMethod());
|
58 |
+
|
59 |
+
$this->router->setPaymentMethod('');
|
60 |
+
$this->router->getModelByPaymentMethod();
|
61 |
+
$this->assertEquals('MWS15', $this->router->getPaymentMethod());
|
62 |
+
}
|
63 |
+
}
|
app/code/community/Shopgate/Framework/Test/Model/Payment/Simple/Mws/Mws.php
ADDED
@@ -0,0 +1,74 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Shopgate GmbH
|
5 |
+
*
|
6 |
+
* URHEBERRECHTSHINWEIS
|
7 |
+
*
|
8 |
+
* Dieses Plugin ist urheberrechtlich geschützt. Es darf ausschließlich von Kunden der Shopgate GmbH
|
9 |
+
* zum Zwecke der eigenen Kommunikation zwischen dem IT-System des Kunden mit dem IT-System der
|
10 |
+
* Shopgate GmbH über www.shopgate.com verwendet werden. Eine darüber hinausgehende Vervielfältigung, Verbreitung,
|
11 |
+
* öffentliche Zugänglichmachung, Bearbeitung oder Weitergabe an Dritte ist nur mit unserer vorherigen
|
12 |
+
* schriftlichen Zustimmung zulässig. Die Regelungen der §§ 69 d Abs. 2, 3 und 69 e UrhG bleiben hiervon unberührt.
|
13 |
+
*
|
14 |
+
* COPYRIGHT NOTICE
|
15 |
+
*
|
16 |
+
* This plugin is the subject of copyright protection. It is only for the use of Shopgate GmbH customers,
|
17 |
+
* for the purpose of facilitating communication between the IT system of the customer and the IT system
|
18 |
+
* of Shopgate GmbH via www.shopgate.com. Any reproduction, dissemination, public propagation, processing or
|
19 |
+
* transfer to third parties is only permitted where we previously consented thereto in writing. The provisions
|
20 |
+
* of paragraph 69 d, sub-paragraphs 2, 3 and paragraph 69, sub-paragraph e of the German Copyright Act shall remain unaffected.
|
21 |
+
*
|
22 |
+
* @author Shopgate GmbH <interfaces@shopgate.com>
|
23 |
+
* @author Konstantin Kiritsenko <konstantin.kiritsenko@shopgate.com>
|
24 |
+
* @group Shopgate_Payment
|
25 |
+
* @group Shopgate_Payment_Mws
|
26 |
+
*
|
27 |
+
* @coversDefaultClass Shopgate_Framework_Model_Payment_Simple_Mws_Mws
|
28 |
+
*/
|
29 |
+
class Shopgate_Framework_Test_Model_Payment_Simple_Mws_Mws extends Shopgate_Framework_Test_Model_Payment_Abstract
|
30 |
+
{
|
31 |
+
const MODULE_CONFIG = 'Creativestyle_AmazonPayments';
|
32 |
+
const CLASS_SHORT_NAME = 'shopgate/payment_simple_mws_mws';
|
33 |
+
const XML_CONFIG_ENABLED = 'amazonpayments/general/active';
|
34 |
+
|
35 |
+
/** @var Shopgate_Framework_Model_Payment_Simple_Mws_Mws $class */
|
36 |
+
protected $class;
|
37 |
+
|
38 |
+
/**
|
39 |
+
* Tests getting the correct transaction type
|
40 |
+
* in Magento 1.6 >=
|
41 |
+
*
|
42 |
+
* @covers ::_getTransactionType
|
43 |
+
*/
|
44 |
+
public function testGetTransactionType()
|
45 |
+
{
|
46 |
+
$reflection = new ReflectionClass($this->class);
|
47 |
+
$method = $reflection->getMethod('_getTransactionType');
|
48 |
+
$method->setAccessible(true);
|
49 |
+
$result = $method->invoke($this->class, null);
|
50 |
+
|
51 |
+
$this->assertEquals($result, 'order');
|
52 |
+
}
|
53 |
+
|
54 |
+
/**
|
55 |
+
* Tests the following:
|
56 |
+
* When state not set - set to 'processing'
|
57 |
+
* When state is set, do nothing with the state
|
58 |
+
*
|
59 |
+
* @covers ::setOrderStatus
|
60 |
+
*/
|
61 |
+
public function testSetOrderStatus()
|
62 |
+
{
|
63 |
+
$order = Mage::getModel('sales/order');
|
64 |
+
$this->class->setOrderStatus($order);
|
65 |
+
|
66 |
+
$this->assertEquals(Mage_Sales_Model_Order::STATE_PROCESSING, $order->getState());
|
67 |
+
|
68 |
+
$order->setState(Mage_Sales_Model_Order::STATE_PAYMENT_REVIEW);
|
69 |
+
$this->class->setOrderStatus($order);
|
70 |
+
|
71 |
+
$this->assertEquals(Mage_Sales_Model_Order::STATE_PAYMENT_REVIEW, $order->getState());
|
72 |
+
}
|
73 |
+
|
74 |
+
}
|
app/code/community/Shopgate/Framework/Test/Model/Payment/Simple/Mws/Mws15.php
ADDED
@@ -0,0 +1,70 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Shopgate GmbH
|
5 |
+
*
|
6 |
+
* URHEBERRECHTSHINWEIS
|
7 |
+
*
|
8 |
+
* Dieses Plugin ist urheberrechtlich geschützt. Es darf ausschließlich von Kunden der Shopgate GmbH
|
9 |
+
* zum Zwecke der eigenen Kommunikation zwischen dem IT-System des Kunden mit dem IT-System der
|
10 |
+
* Shopgate GmbH über www.shopgate.com verwendet werden. Eine darüber hinausgehende Vervielfältigung, Verbreitung,
|
11 |
+
* öffentliche Zugänglichmachung, Bearbeitung oder Weitergabe an Dritte ist nur mit unserer vorherigen
|
12 |
+
* schriftlichen Zustimmung zulässig. Die Regelungen der §§ 69 d Abs. 2, 3 und 69 e UrhG bleiben hiervon unberührt.
|
13 |
+
*
|
14 |
+
* COPYRIGHT NOTICE
|
15 |
+
*
|
16 |
+
* This plugin is the subject of copyright protection. It is only for the use of Shopgate GmbH customers,
|
17 |
+
* for the purpose of facilitating communication between the IT system of the customer and the IT system
|
18 |
+
* of Shopgate GmbH via www.shopgate.com. Any reproduction, dissemination, public propagation, processing or
|
19 |
+
* transfer to third parties is only permitted where we previously consented thereto in writing. The provisions
|
20 |
+
* of paragraph 69 d, sub-paragraphs 2, 3 and paragraph 69, sub-paragraph e of the German Copyright Act shall remain unaffected.
|
21 |
+
*
|
22 |
+
* @author Shopgate GmbH <interfaces@shopgate.com>
|
23 |
+
* @author Konstantin Kiritsenko <konstantin.kiritsenko@shopgate.com>
|
24 |
+
* @group Shopgate_Payment
|
25 |
+
* @group Shopgate_Payment_Mws
|
26 |
+
*
|
27 |
+
* @coversDefaultClass Shopgate_Framework_Model_Payment_Simple_Mws_Mws15
|
28 |
+
*/
|
29 |
+
class Shopgate_Framework_Test_Model_Payment_Simple_Mws_Mws15 extends Shopgate_Framework_Test_Model_Payment_Abstract
|
30 |
+
{
|
31 |
+
const MODULE_CONFIG = 'Creativestyle_AmazonPayments';
|
32 |
+
const CLASS_SHORT_NAME = 'shopgate/payment_simple_mws_mws15';
|
33 |
+
const XML_CONFIG_ENABLED = 'amazonpayments/general/active';
|
34 |
+
|
35 |
+
/** @var Shopgate_Framework_Model_Payment_Simple_Mws_Mws15 $class */
|
36 |
+
protected $class;
|
37 |
+
|
38 |
+
/**
|
39 |
+
* Test if transaction of mws15 returns const 'payment'
|
40 |
+
*
|
41 |
+
* @covers ::_getTransactionType
|
42 |
+
*/
|
43 |
+
public function testGetTransactionType()
|
44 |
+
{
|
45 |
+
$reflection = new ReflectionClass($this->class);
|
46 |
+
$method = $reflection->getMethod('_getTransactionType');
|
47 |
+
$method->setAccessible(true);
|
48 |
+
$result = $method->invoke($this->class, null);
|
49 |
+
|
50 |
+
$this->assertEquals($result, 'payment');
|
51 |
+
}
|
52 |
+
|
53 |
+
/**
|
54 |
+
* Rewrite to avoid issues with setOrderStatus method
|
55 |
+
*
|
56 |
+
* @param string $state
|
57 |
+
*
|
58 |
+
* @uses Shopgate_Framework_Test_Model_Payment_Simple_Mws_Mws15::setPaidStatusFixture
|
59 |
+
* @covers ::setOrderStatus
|
60 |
+
*
|
61 |
+
* @dataProvider allStateProvider
|
62 |
+
*/
|
63 |
+
public function testSetOrderStatus($state)
|
64 |
+
{
|
65 |
+
$this->setPaidStatusFixture($state);
|
66 |
+
$order = Mage::getModel('sales/order');
|
67 |
+
$this->class->setOrderStatus($order);
|
68 |
+
$this->assertEquals(Mage_Sales_Model_Order::STATE_PROCESSING, $order->getState());
|
69 |
+
}
|
70 |
+
}
|
app/code/community/Shopgate/Framework/Test/Model/Payment/Simple/Paypal.php
ADDED
@@ -0,0 +1,90 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Shopgate GmbH
|
5 |
+
*
|
6 |
+
* URHEBERRECHTSHINWEIS
|
7 |
+
*
|
8 |
+
* Dieses Plugin ist urheberrechtlich geschützt. Es darf ausschließlich von Kunden der Shopgate GmbH
|
9 |
+
* zum Zwecke der eigenen Kommunikation zwischen dem IT-System des Kunden mit dem IT-System der
|
10 |
+
* Shopgate GmbH über www.shopgate.com verwendet werden. Eine darüber hinausgehende Vervielfältigung, Verbreitung,
|
11 |
+
* öffentliche Zugänglichmachung, Bearbeitung oder Weitergabe an Dritte ist nur mit unserer vorherigen
|
12 |
+
* schriftlichen Zustimmung zulässig. Die Regelungen der §§ 69 d Abs. 2, 3 und 69 e UrhG bleiben hiervon unberührt.
|
13 |
+
*
|
14 |
+
* COPYRIGHT NOTICE
|
15 |
+
*
|
16 |
+
* This plugin is the subject of copyright protection. It is only for the use of Shopgate GmbH customers,
|
17 |
+
* for the purpose of facilitating communication between the IT system of the customer and the IT system
|
18 |
+
* of Shopgate GmbH via www.shopgate.com. Any reproduction, dissemination, public propagation, processing or
|
19 |
+
* transfer to third parties is only permitted where we previously consented thereto in writing. The provisions
|
20 |
+
* of paragraph 69 d, sub-paragraphs 2, 3 and paragraph 69, sub-paragraph e of the German Copyright Act shall remain unaffected.
|
21 |
+
*
|
22 |
+
* @author Shopgate GmbH <interfaces@shopgate.com>
|
23 |
+
* @author Konstantin Kiritsenko <konstantin.kiritsenko@shopgate.com>
|
24 |
+
* @group Shopgate_Payment
|
25 |
+
* @group Shopgate_Payment_Router
|
26 |
+
* @group Shopgate_Payment_Paypal
|
27 |
+
*
|
28 |
+
* @coversDefaultClass Shopgate_Framework_Model_Payment_Simple_Paypal
|
29 |
+
*/
|
30 |
+
class Shopgate_Framework_Test_Model_Payment_Simple_Paypal extends Shopgate_Framework_Test_Model_Payment_RouterAbstract
|
31 |
+
{
|
32 |
+
const CLASS_SHORT_NAME = 'shopgate/payment_simple_paypal';
|
33 |
+
|
34 |
+
/** @var Shopgate_Framework_Model_Payment_Simple_Paypal $router */
|
35 |
+
protected $router;
|
36 |
+
|
37 |
+
/**
|
38 |
+
* Adding a payment method
|
39 |
+
*/
|
40 |
+
public function setUp()
|
41 |
+
{
|
42 |
+
parent::setUp();
|
43 |
+
$this->router->getShopgateOrder()->setPaymentMethod(ShopgateCartBase::PAYPAL);
|
44 |
+
}
|
45 |
+
|
46 |
+
/**
|
47 |
+
* Test Simple that router directs to Standard Pp when it's
|
48 |
+
* enabled in the database & module is enabled as well
|
49 |
+
*
|
50 |
+
* @uses Shopgate_Framework_Model_Payment_Simple_Paypal::getPaymentMethod
|
51 |
+
* @covers ::getModelByPaymentMethod
|
52 |
+
*
|
53 |
+
* @loadFixture
|
54 |
+
*/
|
55 |
+
public function testGetPpStandardMethod()
|
56 |
+
{
|
57 |
+
$configMock = $this->getHelperMock('shopgate/config', array('getIsMagentoVersionLower1410'));
|
58 |
+
$configMock->expects($this->exactly(2))
|
59 |
+
->method('getIsMagentoVersionLower1410')
|
60 |
+
->willReturnOnConsecutiveCalls(
|
61 |
+
false,
|
62 |
+
true
|
63 |
+
);
|
64 |
+
$this->replaceByMock('helper', 'shopgate/config', $configMock);
|
65 |
+
$this->activateModule('Mage_Paypal');
|
66 |
+
|
67 |
+
$this->router->setPaymentMethod('');
|
68 |
+
$this->router->getModelByPaymentMethod();
|
69 |
+
$this->assertContains('STANDARD', $this->router->getPaymentMethod());
|
70 |
+
|
71 |
+
$this->router->setPaymentMethod('');
|
72 |
+
$this->router->getModelByPaymentMethod();
|
73 |
+
$this->assertContains('STANDARD1400', $this->router->getPaymentMethod());
|
74 |
+
}
|
75 |
+
|
76 |
+
/**
|
77 |
+
* Simpler router check of express. Defaults to it if
|
78 |
+
* Standard PP is not enabled.
|
79 |
+
*
|
80 |
+
* @uses Shopgate_Framework_Model_Payment_Simple_Paypal::getPaymentMethod
|
81 |
+
* @covers ::getModelByPaymentMethod
|
82 |
+
*
|
83 |
+
* @loadFixture
|
84 |
+
*/
|
85 |
+
public function testGetPpExpressMethod()
|
86 |
+
{
|
87 |
+
$this->router->getModelByPaymentMethod();
|
88 |
+
$this->assertContains('EXPRESS', $this->router->getPaymentMethod());
|
89 |
+
}
|
90 |
+
}
|
app/code/community/Shopgate/Framework/Test/Model/Payment/Simple/Paypal/Express.php
ADDED
@@ -0,0 +1,120 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Shopgate GmbH
|
5 |
+
*
|
6 |
+
* URHEBERRECHTSHINWEIS
|
7 |
+
*
|
8 |
+
* Dieses Plugin ist urheberrechtlich geschützt. Es darf ausschließlich von Kunden der Shopgate GmbH
|
9 |
+
* zum Zwecke der eigenen Kommunikation zwischen dem IT-System des Kunden mit dem IT-System der
|
10 |
+
* Shopgate GmbH über www.shopgate.com verwendet werden. Eine darüber hinausgehende Vervielfältigung, Verbreitung,
|
11 |
+
* öffentliche Zugänglichmachung, Bearbeitung oder Weitergabe an Dritte ist nur mit unserer vorherigen
|
12 |
+
* schriftlichen Zustimmung zulässig. Die Regelungen der §§ 69 d Abs. 2, 3 und 69 e UrhG bleiben hiervon unberührt.
|
13 |
+
*
|
14 |
+
* COPYRIGHT NOTICE
|
15 |
+
*
|
16 |
+
* This plugin is the subject of copyright protection. It is only for the use of Shopgate GmbH customers,
|
17 |
+
* for the purpose of facilitating communication between the IT system of the customer and the IT system
|
18 |
+
* of Shopgate GmbH via www.shopgate.com. Any reproduction, dissemination, public propagation, processing or
|
19 |
+
* transfer to third parties is only permitted where we previously consented thereto in writing. The provisions
|
20 |
+
* of paragraph 69 d, sub-paragraphs 2, 3 and paragraph 69, sub-paragraph e of the German Copyright Act shall remain unaffected.
|
21 |
+
*
|
22 |
+
* @author Shopgate GmbH <interfaces@shopgate.com>
|
23 |
+
* @author Konstantin Kiritsenko <konstantin.kiritsenko@shopgate.com>
|
24 |
+
* @group Shopgate_Payment
|
25 |
+
* @group Shopgate_Payment_Paypal
|
26 |
+
*
|
27 |
+
* @coversDefaultClass Shopgate_Framework_Model_Payment_Simple_Paypal_Express
|
28 |
+
*/
|
29 |
+
class Shopgate_Framework_Test_Model_Payment_Simple_Paypal_Express extends Shopgate_Framework_Test_Model_Payment_Abstract
|
30 |
+
{
|
31 |
+
const MODULE_CONFIG = 'Mage_Paypal';
|
32 |
+
const CLASS_SHORT_NAME = 'shopgate/payment_simple_paypal_express';
|
33 |
+
const XML_CONFIG_ENABLED = 'payment/paypal_express/active';
|
34 |
+
|
35 |
+
/**
|
36 |
+
* @var Shopgate_Framework_Model_Payment_Simple_Paypal_Express $class
|
37 |
+
*/
|
38 |
+
protected $class;
|
39 |
+
|
40 |
+
/**
|
41 |
+
* Checks only the status of that function,
|
42 |
+
* not the parent. The response should always be true
|
43 |
+
* when order is_paid flag is true
|
44 |
+
*
|
45 |
+
* @param string $state - magento sale order state
|
46 |
+
*
|
47 |
+
* @uses ShopgateOrder::setIsPaid
|
48 |
+
* @uses Shopgate_Framework_Model_Payment_Simple_Paypal_Express::getShopgateOrder
|
49 |
+
*
|
50 |
+
* @covers ::setOrderStatus
|
51 |
+
* @dataProvider allStateProvider
|
52 |
+
*/
|
53 |
+
public function testSetOrderStatus($state)
|
54 |
+
{
|
55 |
+
$this->class->getShopgateOrder()->setIsPaid(true);
|
56 |
+
$mageOrder = Mage::getModel('sales/order');
|
57 |
+
$payment = Mage::getModel('sales/order_payment');
|
58 |
+
$payment->setTransactionAdditionalInfo('raw_details_info', array('payment_status' => 'completed'));
|
59 |
+
$mageOrder->setPayment($payment);
|
60 |
+
$mageOrder->setState($state);
|
61 |
+
$this->class->setOrderStatus($mageOrder);
|
62 |
+
|
63 |
+
$this->assertEquals(Mage_Sales_Model_Order::STATE_PROCESSING, $mageOrder->getState());
|
64 |
+
}
|
65 |
+
|
66 |
+
/**
|
67 |
+
* Rewrites the default method to include
|
68 |
+
* the payment data checks
|
69 |
+
*
|
70 |
+
* @uses Shopgate_Framework_Test_Model_Payment_Simple_Paypal_Express::setPaidStatusFixture
|
71 |
+
*
|
72 |
+
* @covers ::setOrderStatus
|
73 |
+
*/
|
74 |
+
public function testShopgateStatusSet()
|
75 |
+
{
|
76 |
+
$this->setPaidStatusFixture('processing');
|
77 |
+
$order = Mage::getModel('sales/order');
|
78 |
+
$payment = Mage::getModel('sales/order_payment');
|
79 |
+
$payment->setTransactionAdditionalInfo('raw_details_info', array('payment_status' => 'completed'));
|
80 |
+
$order->setPayment($payment);
|
81 |
+
$this->class->setOrderStatus($order);
|
82 |
+
$this->assertTrue($order->getShopgateStatusSet());
|
83 |
+
}
|
84 |
+
|
85 |
+
/**
|
86 |
+
* Makes sure we are loading express class
|
87 |
+
* if Standard is not enabled
|
88 |
+
*
|
89 |
+
* @uses ShopgateOrder::setPaymentMethod
|
90 |
+
*
|
91 |
+
* @covers Shopgate_Framework_Model_Payment_Factory::calculatePaymentClass
|
92 |
+
*/
|
93 |
+
public function testModelLoad()
|
94 |
+
{
|
95 |
+
Mage::app()->getStore(0)->setConfig('payment/paypal_standard/active', 0);
|
96 |
+
$order = new ShopgateOrder();
|
97 |
+
$order->setPaymentMethod(ShopgateCartBase::PAYPAL);
|
98 |
+
/** @var Shopgate_Framework_Model_Payment_Factory $factory */
|
99 |
+
$factory = Mage::getModel('shopgate/payment_factory', array($order));
|
100 |
+
$model = $factory->calculatePaymentClass();
|
101 |
+
|
102 |
+
$this->assertInstanceOf('Shopgate_Framework_Model_Payment_Simple_Paypal_Express', $model);
|
103 |
+
}
|
104 |
+
|
105 |
+
/**
|
106 |
+
* Checks if helper returns WSPP's helper.
|
107 |
+
* We use a reflector class to access a protected method.
|
108 |
+
*
|
109 |
+
* @covers ::_getPaymentHelper
|
110 |
+
*/
|
111 |
+
public function testGetHelper()
|
112 |
+
{
|
113 |
+
$reflection = new ReflectionClass($this->class);
|
114 |
+
$method = $reflection->getMethod('_getPaymentHelper');
|
115 |
+
$method->setAccessible(true);
|
116 |
+
$helper = $method->invoke($this->class, null);
|
117 |
+
|
118 |
+
$this->assertInstanceOf('Shopgate_Framework_Helper_Payment_Wspp', $helper);
|
119 |
+
}
|
120 |
+
}
|
app/code/community/Shopgate/Framework/Test/Model/Payment/Simple/Paypal/fixtures/testGetPpExpressMethod.yaml
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
1 |
+
config:
|
2 |
+
default/payment/paypal_express/active: 1
|
3 |
+
default/payment/paypal_standard/active: 0
|
app/code/community/Shopgate/Framework/Test/Model/Payment/Simple/Paypal/fixtures/testGetPpStandardMethod.yaml
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
1 |
+
config:
|
2 |
+
default/payment/paypal_standard/active: 1
|
app/code/community/Shopgate/Framework/Test/Model/Payment/Simple/Prepay.php
ADDED
@@ -0,0 +1,131 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Shopgate GmbH
|
5 |
+
*
|
6 |
+
* URHEBERRECHTSHINWEIS
|
7 |
+
*
|
8 |
+
* Dieses Plugin ist urheberrechtlich geschützt. Es darf ausschließlich von Kunden der Shopgate GmbH
|
9 |
+
* zum Zwecke der eigenen Kommunikation zwischen dem IT-System des Kunden mit dem IT-System der
|
10 |
+
* Shopgate GmbH über www.shopgate.com verwendet werden. Eine darüber hinausgehende Vervielfältigung, Verbreitung,
|
11 |
+
* öffentliche Zugänglichmachung, Bearbeitung oder Weitergabe an Dritte ist nur mit unserer vorherigen
|
12 |
+
* schriftlichen Zustimmung zulässig. Die Regelungen der §§ 69 d Abs. 2, 3 und 69 e UrhG bleiben hiervon unberührt.
|
13 |
+
*
|
14 |
+
* COPYRIGHT NOTICE
|
15 |
+
*
|
16 |
+
* This plugin is the subject of copyright protection. It is only for the use of Shopgate GmbH customers,
|
17 |
+
* for the purpose of facilitating communication between the IT system of the customer and the IT system
|
18 |
+
* of Shopgate GmbH via www.shopgate.com. Any reproduction, dissemination, public propagation, processing or
|
19 |
+
* transfer to third parties is only permitted where we previously consented thereto in writing. The provisions
|
20 |
+
* of paragraph 69 d, sub-paragraphs 2, 3 and paragraph 69, sub-paragraph e of the German Copyright Act shall remain unaffected.
|
21 |
+
*
|
22 |
+
* @author Shopgate GmbH <interfaces@shopgate.com>
|
23 |
+
* @author Konstantin Kiritsenko <konstantin.kiritsenko@shopgate.com>
|
24 |
+
* @group Shopgate_Payment
|
25 |
+
* @group Shopgate_Payment_Router
|
26 |
+
* @group Shopgate_Payment_Prepay
|
27 |
+
*
|
28 |
+
* @coversDefaultClass Shopgate_Framework_Model_Payment_Simple_Prepay
|
29 |
+
*/
|
30 |
+
class Shopgate_Framework_Test_Model_Payment_Simple_Prepay extends Shopgate_Framework_Test_Model_Payment_RouterAbstract
|
31 |
+
{
|
32 |
+
const CLASS_SHORT_NAME = 'shopgate/payment_simple_prepay';
|
33 |
+
|
34 |
+
/** @var Shopgate_Framework_Model_Payment_Simple_Prepay $router */
|
35 |
+
protected $router;
|
36 |
+
|
37 |
+
/**
|
38 |
+
* Adding a payment method
|
39 |
+
*/
|
40 |
+
public function setUp()
|
41 |
+
{
|
42 |
+
parent::setUp();
|
43 |
+
$this->router->getShopgateOrder()->setPaymentMethod(ShopgateCartBase::PREPAY);
|
44 |
+
}
|
45 |
+
|
46 |
+
/**
|
47 |
+
* Test that router redirects to Native when it's
|
48 |
+
* enabled in the database & mage v1.7+, else defaults
|
49 |
+
* to CheckMoneyOrder if magento is lower than 1.7
|
50 |
+
*
|
51 |
+
* @uses Mage::getVersion
|
52 |
+
* @uses Shopgate_Framework_Test_Model_Utility::activateModule
|
53 |
+
* @uses Shopgate_Framework_Test_Model_Utility::deactivateModule
|
54 |
+
* @uses Shopgate_Framework_Model_Payment_Simple_Prepay::getPaymentMethod
|
55 |
+
* @covers ::getModelByPaymentMethod
|
56 |
+
*
|
57 |
+
* @loadFixture
|
58 |
+
*/
|
59 |
+
public function testGetPrepayNativeMethod()
|
60 |
+
{
|
61 |
+
$configMock = $this->getHelperMock('shopgate/config', array('getIsMagentoVersionLower1700'));
|
62 |
+
$configMock->expects($this->exactly(2))
|
63 |
+
->method('getIsMagentoVersionLower1700')
|
64 |
+
->willReturnOnConsecutiveCalls(
|
65 |
+
false, true
|
66 |
+
);
|
67 |
+
$this->replaceByMock('helper', 'shopgate/config', $configMock);
|
68 |
+
|
69 |
+
$this->deactivateModule(Shopgate_Framework_Model_Payment_Simple_Prepay_Phoenix::MODULE_CONFIG);
|
70 |
+
$this->activateModule(Shopgate_Framework_Model_Payment_Simple_Prepay_Native::MODULE_CONFIG);
|
71 |
+
|
72 |
+
$this->router->getModelByPaymentMethod();
|
73 |
+
$this->assertEquals('Native', $this->router->getPaymentMethod());
|
74 |
+
|
75 |
+
$this->router->getModelByPaymentMethod();
|
76 |
+
$this->assertEquals('Checkmo', $this->router->getPaymentMethod());
|
77 |
+
}
|
78 |
+
|
79 |
+
/**
|
80 |
+
* Checks if phoenix module redirect works. No need for other Bank
|
81 |
+
* modules to be disabled as it takes over.
|
82 |
+
*
|
83 |
+
* @uses Shopgate_Framework_Test_Model_Utility::activateModule
|
84 |
+
* @uses Shopgate_Framework_Model_Payment_Simple_Prepay::getPaymentMethod
|
85 |
+
* @covers ::getModelByPaymentMethod
|
86 |
+
*
|
87 |
+
* @loadFixture
|
88 |
+
*/
|
89 |
+
public function testGetPrepayPhoenixMethod()
|
90 |
+
{
|
91 |
+
$this->activateModule(Shopgate_Framework_Model_Payment_Simple_Prepay_Phoenix::MODULE_CONFIG);
|
92 |
+
$this->router->getModelByPaymentMethod();
|
93 |
+
|
94 |
+
$this->assertContains('Phoenix', $this->router->getPaymentMethod());
|
95 |
+
}
|
96 |
+
|
97 |
+
/**
|
98 |
+
* Test if all are enabled and Phoenix comes on top
|
99 |
+
*
|
100 |
+
* @uses Shopgate_Framework_Test_Model_Utility::activateModule
|
101 |
+
* @uses Shopgate_Framework_Model_Payment_Simple_Prepay::getPaymentMethod
|
102 |
+
* @covers ::getModelByPaymentMethod
|
103 |
+
*
|
104 |
+
* @loadFixture
|
105 |
+
*/
|
106 |
+
public function testGetAllPrepayEnabled()
|
107 |
+
{
|
108 |
+
$this->activateModule(Shopgate_Framework_Model_Payment_Simple_Prepay_Phoenix::MODULE_CONFIG);
|
109 |
+
$this->activateModule(Shopgate_Framework_Model_Payment_Simple_Prepay_Native::MODULE_CONFIG);
|
110 |
+
|
111 |
+
$this->router->getModelByPaymentMethod();
|
112 |
+
|
113 |
+
$this->assertContains('Phoenix', $this->router->getPaymentMethod());
|
114 |
+
}
|
115 |
+
|
116 |
+
/**
|
117 |
+
* Test if all are disabled, routes to Prepay by default
|
118 |
+
*
|
119 |
+
* @uses Shopgate_Framework_Test_Model_Utility::deactivateModule
|
120 |
+
* @uses Shopgate_Framework_Model_Payment_Simple_Prepay::getPaymentMethod
|
121 |
+
* @covers ::getModelByPaymentMethod
|
122 |
+
*/
|
123 |
+
public function testGetNoPrepayMethod()
|
124 |
+
{
|
125 |
+
$this->deactivateModule(Shopgate_Framework_Model_Payment_Simple_Prepay_Phoenix::MODULE_CONFIG);
|
126 |
+
$this->deactivateModule(Shopgate_Framework_Model_Payment_Simple_Prepay_Native::MODULE_CONFIG);
|
127 |
+
$this->router->getModelByPaymentMethod();
|
128 |
+
|
129 |
+
$this->assertEquals(ShopgateCartBase::PREPAY, $this->router->getPaymentMethod());
|
130 |
+
}
|
131 |
+
}
|
app/code/community/Shopgate/Framework/Test/Model/Payment/Simple/Prepay/Checkmo.php
ADDED
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Shopgate GmbH
|
5 |
+
*
|
6 |
+
* URHEBERRECHTSHINWEIS
|
7 |
+
*
|
8 |
+
* Dieses Plugin ist urheberrechtlich geschützt. Es darf ausschließlich von Kunden der Shopgate GmbH
|
9 |
+
* zum Zwecke der eigenen Kommunikation zwischen dem IT-System des Kunden mit dem IT-System der
|
10 |
+
* Shopgate GmbH über www.shopgate.com verwendet werden. Eine darüber hinausgehende Vervielfältigung, Verbreitung,
|
11 |
+
* öffentliche Zugänglichmachung, Bearbeitung oder Weitergabe an Dritte ist nur mit unserer vorherigen
|
12 |
+
* schriftlichen Zustimmung zulässig. Die Regelungen der §§ 69 d Abs. 2, 3 und 69 e UrhG bleiben hiervon unberührt.
|
13 |
+
*
|
14 |
+
* COPYRIGHT NOTICE
|
15 |
+
*
|
16 |
+
* This plugin is the subject of copyright protection. It is only for the use of Shopgate GmbH customers,
|
17 |
+
* for the purpose of facilitating communication between the IT system of the customer and the IT system
|
18 |
+
* of Shopgate GmbH via www.shopgate.com. Any reproduction, dissemination, public propagation, processing or
|
19 |
+
* transfer to third parties is only permitted where we previously consented thereto in writing. The provisions
|
20 |
+
* of paragraph 69 d, sub-paragraphs 2, 3 and paragraph 69, sub-paragraph e of the German Copyright Act shall remain unaffected.
|
21 |
+
*
|
22 |
+
* @author Shopgate GmbH <interfaces@shopgate.com>
|
23 |
+
* @author Konstantin Kiritsenko <konstantin.kiritsenko@shopgate.com>
|
24 |
+
* @group Shopgate_Payment
|
25 |
+
* @group Shopgate_Payment_Prepay
|
26 |
+
*
|
27 |
+
* @coversDefaultClass Shopgate_Framework_Model_Payment_Simple_Prepay_Checkmo
|
28 |
+
*/
|
29 |
+
class Shopgate_Framework_Test_Model_Payment_Simple_Prepay_Checkmo extends Shopgate_Framework_Test_Model_Payment_Abstract
|
30 |
+
{
|
31 |
+
const MODULE_CONFIG = 'Mage_Payment';
|
32 |
+
const CLASS_SHORT_NAME = 'shopgate/payment_simple_prepay_checkmo';
|
33 |
+
const XML_CONFIG_ENABLED = 'payment/checkmo/active';
|
34 |
+
|
35 |
+
/** @var Shopgate_Framework_Model_Payment_Simple_Prepay_Checkmo $class */
|
36 |
+
protected $class;
|
37 |
+
|
38 |
+
/**
|
39 |
+
* We default to use magento's config
|
40 |
+
*
|
41 |
+
* @covers ::setOrderStatus
|
42 |
+
*/
|
43 |
+
public function testSetOrderStatus()
|
44 |
+
{
|
45 |
+
$order = Mage::getModel('sales/order');
|
46 |
+
$this->class->setOrderStatus($order);
|
47 |
+
|
48 |
+
$this->assertNull($order->getState());
|
49 |
+
}
|
50 |
+
|
51 |
+
/**
|
52 |
+
* Allow fallthrough so that old
|
53 |
+
* status setter can assign status
|
54 |
+
*
|
55 |
+
* @group empty
|
56 |
+
* @coversNothing
|
57 |
+
*/
|
58 |
+
public function testShopgateStatusSet() { }
|
59 |
+
}
|
app/code/community/Shopgate/Framework/Test/Model/Payment/Simple/Prepay/Native.php
ADDED
@@ -0,0 +1,60 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Shopgate GmbH
|
5 |
+
*
|
6 |
+
* URHEBERRECHTSHINWEIS
|
7 |
+
*
|
8 |
+
* Dieses Plugin ist urheberrechtlich geschützt. Es darf ausschließlich von Kunden der Shopgate GmbH
|
9 |
+
* zum Zwecke der eigenen Kommunikation zwischen dem IT-System des Kunden mit dem IT-System der
|
10 |
+
* Shopgate GmbH über www.shopgate.com verwendet werden. Eine darüber hinausgehende Vervielfältigung, Verbreitung,
|
11 |
+
* öffentliche Zugänglichmachung, Bearbeitung oder Weitergabe an Dritte ist nur mit unserer vorherigen
|
12 |
+
* schriftlichen Zustimmung zulässig. Die Regelungen der §§ 69 d Abs. 2, 3 und 69 e UrhG bleiben hiervon unberührt.
|
13 |
+
*
|
14 |
+
* COPYRIGHT NOTICE
|
15 |
+
*
|
16 |
+
* This plugin is the subject of copyright protection. It is only for the use of Shopgate GmbH customers,
|
17 |
+
* for the purpose of facilitating communication between the IT system of the customer and the IT system
|
18 |
+
* of Shopgate GmbH via www.shopgate.com. Any reproduction, dissemination, public propagation, processing or
|
19 |
+
* transfer to third parties is only permitted where we previously consented thereto in writing. The provisions
|
20 |
+
* of paragraph 69 d, sub-paragraphs 2, 3 and paragraph 69, sub-paragraph e of the German Copyright Act shall remain unaffected.
|
21 |
+
*
|
22 |
+
* @author Shopgate GmbH <interfaces@shopgate.com>
|
23 |
+
* @author Konstantin Kiritsenko <konstantin.kiritsenko@shopgate.com>
|
24 |
+
* @group Shopgate_Payment
|
25 |
+
* @group Shopgate_Payment_Prepay
|
26 |
+
*
|
27 |
+
* @coversDefaultClass Shopgate_Framework_Model_Payment_Simple_Prepay_Native
|
28 |
+
*/
|
29 |
+
class Shopgate_Framework_Test_Model_Payment_Simple_Prepay_Native extends Shopgate_Framework_Test_Model_Payment_Abstract
|
30 |
+
{
|
31 |
+
const MODULE_CONFIG = 'Mage_Payment';
|
32 |
+
const CLASS_SHORT_NAME = 'shopgate/payment_simple_prepay_native';
|
33 |
+
const XML_CONFIG_ENABLED = 'payment/banktransfer/active';
|
34 |
+
|
35 |
+
/** @var Shopgate_Framework_Model_Payment_Simple_Prepay_Native $class */
|
36 |
+
protected $class;
|
37 |
+
|
38 |
+
/**
|
39 |
+
* We default to use magento's config
|
40 |
+
*
|
41 |
+
* @uses Mage::getModel
|
42 |
+
* @covers ::setOrderStatus
|
43 |
+
*/
|
44 |
+
public function testSetOrderStatus()
|
45 |
+
{
|
46 |
+
$order = Mage::getModel('sales/order');
|
47 |
+
$this->class->setOrderStatus($order);
|
48 |
+
|
49 |
+
$this->assertNull($order->getState());
|
50 |
+
}
|
51 |
+
|
52 |
+
/**
|
53 |
+
* Allow fallthrough so that old
|
54 |
+
* status setter can assign status
|
55 |
+
*
|
56 |
+
* @group empty
|
57 |
+
* @coversNothing
|
58 |
+
*/
|
59 |
+
public function testShopgateStatusSet() { }
|
60 |
+
}
|
app/code/community/Shopgate/Framework/Test/Model/Payment/Simple/Prepay/Phoenix.php
ADDED
@@ -0,0 +1,60 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Shopgate GmbH
|
5 |
+
*
|
6 |
+
* URHEBERRECHTSHINWEIS
|
7 |
+
*
|
8 |
+
* Dieses Plugin ist urheberrechtlich geschützt. Es darf ausschließlich von Kunden der Shopgate GmbH
|
9 |
+
* zum Zwecke der eigenen Kommunikation zwischen dem IT-System des Kunden mit dem IT-System der
|
10 |
+
* Shopgate GmbH über www.shopgate.com verwendet werden. Eine darüber hinausgehende Vervielfältigung, Verbreitung,
|
11 |
+
* öffentliche Zugänglichmachung, Bearbeitung oder Weitergabe an Dritte ist nur mit unserer vorherigen
|
12 |
+
* schriftlichen Zustimmung zulässig. Die Regelungen der §§ 69 d Abs. 2, 3 und 69 e UrhG bleiben hiervon unberührt.
|
13 |
+
*
|
14 |
+
* COPYRIGHT NOTICE
|
15 |
+
*
|
16 |
+
* This plugin is the subject of copyright protection. It is only for the use of Shopgate GmbH customers,
|
17 |
+
* for the purpose of facilitating communication between the IT system of the customer and the IT system
|
18 |
+
* of Shopgate GmbH via www.shopgate.com. Any reproduction, dissemination, public propagation, processing or
|
19 |
+
* transfer to third parties is only permitted where we previously consented thereto in writing. The provisions
|
20 |
+
* of paragraph 69 d, sub-paragraphs 2, 3 and paragraph 69, sub-paragraph e of the German Copyright Act shall remain unaffected.
|
21 |
+
*
|
22 |
+
* @author Shopgate GmbH <interfaces@shopgate.com>
|
23 |
+
* @author Konstantin Kiritsenko <konstantin.kiritsenko@shopgate.com>
|
24 |
+
* @group Shopgate_Payment
|
25 |
+
* @group Shopgate_Payment_Prepay
|
26 |
+
*
|
27 |
+
* @coversDefaultClass Shopgate_Framework_Model_Payment_Simple_Prepay_Phoenix
|
28 |
+
*/
|
29 |
+
class Shopgate_Framework_Test_Model_Payment_Simple_Prepay_Phoenix extends Shopgate_Framework_Test_Model_Payment_Abstract
|
30 |
+
{
|
31 |
+
const MODULE_CONFIG = 'Phoenix_BankPayment';
|
32 |
+
const CLASS_SHORT_NAME = 'shopgate/payment_simple_prepay_phoenix';
|
33 |
+
const XML_CONFIG_ENABLED = 'payment/bankpayment/active';
|
34 |
+
|
35 |
+
/** @var Shopgate_Framework_Model_Payment_Simple_Prepay_Phoenix $class */
|
36 |
+
protected $class;
|
37 |
+
|
38 |
+
/**
|
39 |
+
* We default to use magento's config
|
40 |
+
*
|
41 |
+
* @uses Mage::getModel
|
42 |
+
* @covers Shopgate_Framework_Model_Payment_Simple_Prepay_Phoenix::setOrderStatus
|
43 |
+
*/
|
44 |
+
public function testSetOrderStatus()
|
45 |
+
{
|
46 |
+
$order = Mage::getModel('sales/order');
|
47 |
+
$this->class->setOrderStatus($order);
|
48 |
+
|
49 |
+
$this->assertNull($order->getState());
|
50 |
+
}
|
51 |
+
|
52 |
+
/**
|
53 |
+
* Allow fallthrough so that old
|
54 |
+
* status setter can assign status
|
55 |
+
*
|
56 |
+
* @group empty
|
57 |
+
* @coversNothing
|
58 |
+
*/
|
59 |
+
public function testShopgateStatusSet() { }
|
60 |
+
}
|
app/code/community/Shopgate/Framework/Test/Model/Payment/Simple/Prepay/fixtures/testGetAllPrepayEnabled.yaml
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
1 |
+
config:
|
2 |
+
default/payment/bankpayment/active: 1
|
3 |
+
default/payment/checkmo/active: 1
|
4 |
+
default/payment/banktransfer/active: 1
|
app/code/community/Shopgate/Framework/Test/Model/Payment/Simple/Prepay/fixtures/testGetPrepayNativeMethod.yaml
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
1 |
+
config:
|
2 |
+
default/payment/banktransfer/active: 1
|
3 |
+
default/payment/checkmo/active: 1
|
app/code/community/Shopgate/Framework/Test/Model/Payment/Simple/Prepay/fixtures/testGetPrepayPhoenixMethod.yaml
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
1 |
+
config:
|
2 |
+
default/payment/bankpayment/active: 1
|
app/code/community/Shopgate/Framework/Test/Model/Payment/Simple/Shopgate.php
ADDED
@@ -0,0 +1,101 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Shopgate GmbH
|
5 |
+
*
|
6 |
+
* URHEBERRECHTSHINWEIS
|
7 |
+
*
|
8 |
+
* Dieses Plugin ist urheberrechtlich geschützt. Es darf ausschließlich von Kunden der Shopgate GmbH
|
9 |
+
* zum Zwecke der eigenen Kommunikation zwischen dem IT-System des Kunden mit dem IT-System der
|
10 |
+
* Shopgate GmbH über www.shopgate.com verwendet werden. Eine darüber hinausgehende Vervielfältigung, Verbreitung,
|
11 |
+
* öffentliche Zugänglichmachung, Bearbeitung oder Weitergabe an Dritte ist nur mit unserer vorherigen
|
12 |
+
* schriftlichen Zustimmung zulässig. Die Regelungen der §§ 69 d Abs. 2, 3 und 69 e UrhG bleiben hiervon unberührt.
|
13 |
+
*
|
14 |
+
* COPYRIGHT NOTICE
|
15 |
+
*
|
16 |
+
* This plugin is the subject of copyright protection. It is only for the use of Shopgate GmbH customers,
|
17 |
+
* for the purpose of facilitating communication between the IT system of the customer and the IT system
|
18 |
+
* of Shopgate GmbH via www.shopgate.com. Any reproduction, dissemination, public propagation, processing or
|
19 |
+
* transfer to third parties is only permitted where we previously consented thereto in writing. The provisions
|
20 |
+
* of paragraph 69 d, sub-paragraphs 2, 3 and paragraph 69, sub-paragraph e of the German Copyright Act shall remain unaffected.
|
21 |
+
*
|
22 |
+
* @author Shopgate GmbH <interfaces@shopgate.com>
|
23 |
+
* @author Konstantin Kiritsenko <konstantin.kiritsenko@shopgate.com>
|
24 |
+
* @group Shopgate_Payment
|
25 |
+
* @group Shopgate_Payment_Shopgate
|
26 |
+
*
|
27 |
+
* @coversDefaultClass Shopgate_Framework_Model_Payment_Simple_Shopgate
|
28 |
+
*/
|
29 |
+
class Shopgate_Framework_Test_Model_Payment_Simple_Shopgate extends Shopgate_Framework_Test_Model_Payment_Abstract
|
30 |
+
{
|
31 |
+
const MODULE_CONFIG = 'Shopgate_Framework';
|
32 |
+
const CLASS_SHORT_NAME = 'shopgate/payment_simple_shopgate';
|
33 |
+
|
34 |
+
/**
|
35 |
+
* @var Shopgate_Framework_Model_Payment_Simple_Shopgate $class
|
36 |
+
*/
|
37 |
+
protected $class;
|
38 |
+
|
39 |
+
/**
|
40 |
+
* Empty rewrite, Shopgate payment active
|
41 |
+
* always returns true
|
42 |
+
*
|
43 |
+
* @group empty
|
44 |
+
* @coversNothing
|
45 |
+
*/
|
46 |
+
public function testIsDisabled() { }
|
47 |
+
|
48 |
+
/**
|
49 |
+
* State set in the database should match
|
50 |
+
* the state that comes into the magento
|
51 |
+
* order class
|
52 |
+
*
|
53 |
+
* @param string $state - mage order state, e.g. 'processing'
|
54 |
+
*
|
55 |
+
* @uses ShopgateOrder::setIsShippingBlocked
|
56 |
+
* @uses Shopgate_Framework_Model_Payment_Simple_Shopgate::getShopgateOrder
|
57 |
+
* @covers ::setOrderStatus
|
58 |
+
*
|
59 |
+
* @dataProvider allStateProvider
|
60 |
+
*/
|
61 |
+
public function testSetOrderStatus($state)
|
62 |
+
{
|
63 |
+
Mage::app()->getStore(0)->setConfig('payment/shopgate/order_status', $state);
|
64 |
+
/** @var Mage_Sales_Model_Order $mageOrder */
|
65 |
+
$mageOrder = Mage::getModel('sales/order');
|
66 |
+
$this->class->getShopgateOrder()->setIsShippingBlocked(true);
|
67 |
+
$this->class->setOrderStatus($mageOrder);
|
68 |
+
|
69 |
+
$this->assertEquals(
|
70 |
+
$state,
|
71 |
+
$mageOrder->getState(),
|
72 |
+
"State should be set to '{$state}, but it was '{$mageOrder->getState()}'"
|
73 |
+
);
|
74 |
+
}
|
75 |
+
|
76 |
+
/**
|
77 |
+
* Check that all order statuses lead to
|
78 |
+
* "processing" when shipping is not blocked
|
79 |
+
*
|
80 |
+
* @param string $state - mage order state, e.g. 'processing'
|
81 |
+
*
|
82 |
+
* @uses ShopgateOrder::setIsShippingBlocked
|
83 |
+
* @uses Shopgate_Framework_Model_Payment_Simple_Shopgate::getShopgateOrder
|
84 |
+
* @covers ::setOrderStatus
|
85 |
+
*
|
86 |
+
* @dataProvider allStateProvider
|
87 |
+
*/
|
88 |
+
public function testGetOrderStatusWhenNotBlocked($state)
|
89 |
+
{
|
90 |
+
$mageOrder = Mage::getModel('sales/order');
|
91 |
+
$mageOrder->setState($state);
|
92 |
+
$this->class->getShopgateOrder()->setIsShippingBlocked(false);
|
93 |
+
$this->class->setOrderStatus($mageOrder);
|
94 |
+
|
95 |
+
$this->assertEquals(
|
96 |
+
Mage_Sales_Model_Order::STATE_PROCESSING,
|
97 |
+
$mageOrder->getState(),
|
98 |
+
'Status should always be "processing" when not blocked'
|
99 |
+
);
|
100 |
+
}
|
101 |
+
}
|
app/code/community/Shopgate/Framework/Test/Model/Payment/Simple/Sue.php
ADDED
@@ -0,0 +1,63 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Shopgate GmbH
|
5 |
+
*
|
6 |
+
* URHEBERRECHTSHINWEIS
|
7 |
+
*
|
8 |
+
* Dieses Plugin ist urheberrechtlich geschützt. Es darf ausschließlich von Kunden der Shopgate GmbH
|
9 |
+
* zum Zwecke der eigenen Kommunikation zwischen dem IT-System des Kunden mit dem IT-System der
|
10 |
+
* Shopgate GmbH über www.shopgate.com verwendet werden. Eine darüber hinausgehende Vervielfältigung, Verbreitung,
|
11 |
+
* öffentliche Zugänglichmachung, Bearbeitung oder Weitergabe an Dritte ist nur mit unserer vorherigen
|
12 |
+
* schriftlichen Zustimmung zulässig. Die Regelungen der §§ 69 d Abs. 2, 3 und 69 e UrhG bleiben hiervon unberührt.
|
13 |
+
*
|
14 |
+
* COPYRIGHT NOTICE
|
15 |
+
*
|
16 |
+
* This plugin is the subject of copyright protection. It is only for the use of Shopgate GmbH customers,
|
17 |
+
* for the purpose of facilitating communication between the IT system of the customer and the IT system
|
18 |
+
* of Shopgate GmbH via www.shopgate.com. Any reproduction, dissemination, public propagation, processing or
|
19 |
+
* transfer to third parties is only permitted where we previously consented thereto in writing. The provisions
|
20 |
+
* of paragraph 69 d, sub-paragraphs 2, 3 and paragraph 69, sub-paragraph e of the German Copyright Act shall remain unaffected.
|
21 |
+
*
|
22 |
+
* @author Shopgate GmbH <interfaces@shopgate.com>
|
23 |
+
* @author Konstantin Kiritsenko <konstantin.kiritsenko@shopgate.com>
|
24 |
+
* @group Shopgate_Payment
|
25 |
+
* @group Shopgate_Payment_Router
|
26 |
+
* @group Shopgate_Payment_Sue
|
27 |
+
*
|
28 |
+
* @coversDefaultClass Shopgate_Framework_Model_Payment_Simple_Sue
|
29 |
+
*/
|
30 |
+
class Shopgate_Framework_Test_Model_Payment_Simple_Sue extends Shopgate_Framework_Test_Model_Payment_RouterAbstract
|
31 |
+
{
|
32 |
+
const CLASS_SHORT_NAME = 'shopgate/payment_simple_sue';
|
33 |
+
const CFG_SUE = 'Paymentnetwork_Pnsofortueberweisung';
|
34 |
+
|
35 |
+
/**
|
36 |
+
* @var Shopgate_Framework_Model_Payment_Simple_Sue $router
|
37 |
+
*/
|
38 |
+
protected $router;
|
39 |
+
|
40 |
+
/**
|
41 |
+
* Adding a payment method
|
42 |
+
*/
|
43 |
+
public function setUp()
|
44 |
+
{
|
45 |
+
parent::setUp();
|
46 |
+
$this->router->getShopgateOrder()->setPaymentMethod(ShopgateCartBase::SUE);
|
47 |
+
}
|
48 |
+
|
49 |
+
/**
|
50 |
+
* Checks if Sue redirects to either SUE188 or SUE300
|
51 |
+
*
|
52 |
+
* @uses Shopgate_Framework_Test_Model_Utility::activateModule
|
53 |
+
* @uses Shopgate_Framework_Model_Payment_Simple_Sue::getPaymentMethod
|
54 |
+
*
|
55 |
+
* @covers ::getModelByPaymentMethod
|
56 |
+
*/
|
57 |
+
public function testGetSueRouterMethod()
|
58 |
+
{
|
59 |
+
$this->activateModule(self::CFG_SUE);
|
60 |
+
$this->router->getModelByPaymentMethod();
|
61 |
+
$this->assertCount(6, str_split($this->router->getPaymentMethod()));
|
62 |
+
}
|
63 |
+
}
|
app/code/community/Shopgate/Framework/Test/Model/Payment/Simple/Sue/Sue118.php
ADDED
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Shopgate GmbH
|
5 |
+
*
|
6 |
+
* URHEBERRECHTSHINWEIS
|
7 |
+
*
|
8 |
+
* Dieses Plugin ist urheberrechtlich geschützt. Es darf ausschließlich von Kunden der Shopgate GmbH
|
9 |
+
* zum Zwecke der eigenen Kommunikation zwischen dem IT-System des Kunden mit dem IT-System der
|
10 |
+
* Shopgate GmbH über www.shopgate.com verwendet werden. Eine darüber hinausgehende Vervielfältigung, Verbreitung,
|
11 |
+
* öffentliche Zugänglichmachung, Bearbeitung oder Weitergabe an Dritte ist nur mit unserer vorherigen
|
12 |
+
* schriftlichen Zustimmung zulässig. Die Regelungen der §§ 69 d Abs. 2, 3 und 69 e UrhG bleiben hiervon unberührt.
|
13 |
+
*
|
14 |
+
* COPYRIGHT NOTICE
|
15 |
+
*
|
16 |
+
* This plugin is the subject of copyright protection. It is only for the use of Shopgate GmbH customers,
|
17 |
+
* for the purpose of facilitating communication between the IT system of the customer and the IT system
|
18 |
+
* of Shopgate GmbH via www.shopgate.com. Any reproduction, dissemination, public propagation, processing or
|
19 |
+
* transfer to third parties is only permitted where we previously consented thereto in writing. The provisions
|
20 |
+
* of paragraph 69 d, sub-paragraphs 2, 3 and paragraph 69, sub-paragraph e of the German Copyright Act shall remain unaffected.
|
21 |
+
*
|
22 |
+
* @author Shopgate GmbH <interfaces@shopgate.com>
|
23 |
+
* @author Konstantin Kiritsenko <konstantin.kiritsenko@shopgate.com>
|
24 |
+
* @group Shopgate_Payment
|
25 |
+
* @group Shopgate_Payment_Sue
|
26 |
+
*
|
27 |
+
* @coversDefaultClass Shopgate_Framework_Model_Payment_Simple_Sue_Sue118
|
28 |
+
*/
|
29 |
+
class Shopgate_Framework_Test_Model_Payment_Simple_Sue_Sue118 extends Shopgate_Framework_Test_Model_Payment_Abstract
|
30 |
+
{
|
31 |
+
const MODULE_CONFIG = 'Paymentnetwork_Pnsofortueberweisung';
|
32 |
+
const CLASS_SHORT_NAME = 'shopgate/payment_simple_sue_sue118';
|
33 |
+
const XML_CONFIG_ENABLED = 'payment/pnsofortueberweisung/active';
|
34 |
+
}
|
app/code/community/Shopgate/Framework/Test/Model/Payment/Simple/Sue/Sue300.php
ADDED
@@ -0,0 +1,93 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Shopgate GmbH
|
5 |
+
*
|
6 |
+
* URHEBERRECHTSHINWEIS
|
7 |
+
*
|
8 |
+
* Dieses Plugin ist urheberrechtlich geschützt. Es darf ausschließlich von Kunden der Shopgate GmbH
|
9 |
+
* zum Zwecke der eigenen Kommunikation zwischen dem IT-System des Kunden mit dem IT-System der
|
10 |
+
* Shopgate GmbH über www.shopgate.com verwendet werden. Eine darüber hinausgehende Vervielfältigung, Verbreitung,
|
11 |
+
* öffentliche Zugänglichmachung, Bearbeitung oder Weitergabe an Dritte ist nur mit unserer vorherigen
|
12 |
+
* schriftlichen Zustimmung zulässig. Die Regelungen der §§ 69 d Abs. 2, 3 und 69 e UrhG bleiben hiervon unberührt.
|
13 |
+
*
|
14 |
+
* COPYRIGHT NOTICE
|
15 |
+
*
|
16 |
+
* This plugin is the subject of copyright protection. It is only for the use of Shopgate GmbH customers,
|
17 |
+
* for the purpose of facilitating communication between the IT system of the customer and the IT system
|
18 |
+
* of Shopgate GmbH via www.shopgate.com. Any reproduction, dissemination, public propagation, processing or
|
19 |
+
* transfer to third parties is only permitted where we previously consented thereto in writing. The provisions
|
20 |
+
* of paragraph 69 d, sub-paragraphs 2, 3 and paragraph 69, sub-paragraph e of the German Copyright Act shall remain unaffected.
|
21 |
+
*
|
22 |
+
* @author Shopgate GmbH <interfaces@shopgate.com>
|
23 |
+
* @author Konstantin Kiritsenko <konstantin.kiritsenko@shopgate.com>
|
24 |
+
* @group Shopgate_Payment
|
25 |
+
* @group Shopgate_Payment_Sue
|
26 |
+
*
|
27 |
+
* @coversDefaultClass Shopgate_Framework_Model_Payment_Simple_Sue_Sue300
|
28 |
+
*/
|
29 |
+
class Shopgate_Framework_Test_Model_Payment_Simple_Sue_Sue300 extends Shopgate_Framework_Test_Model_Payment_Abstract
|
30 |
+
{
|
31 |
+
const MODULE_CONFIG = 'Paymentnetwork_Pnsofortueberweisung';
|
32 |
+
const CLASS_SHORT_NAME = 'shopgate/payment_simple_sue_sue300';
|
33 |
+
const XML_CONFIG_ENABLED = 'payment/paymentnetwork_pnsofortueberweisung/active';
|
34 |
+
|
35 |
+
/** @var Shopgate_Framework_Model_Payment_Simple_Sue_Sue300 $class */
|
36 |
+
protected $class;
|
37 |
+
|
38 |
+
/**
|
39 |
+
* Custom rewrite for when status is paid
|
40 |
+
*
|
41 |
+
* @param string $state - magento order state
|
42 |
+
*
|
43 |
+
* @uses ShopgateOrder::setIsPaid
|
44 |
+
* @uses Shopgate_Framework_Model_Payment_Simple_Sue_Sue300::getShopgateOrder
|
45 |
+
* @uses Shopgate_Framework_Test_Model_Payment_Abstract::setPaidStatusFixture
|
46 |
+
* @covers ::setOrderStatus
|
47 |
+
*
|
48 |
+
* @dataProvider allStateProvider
|
49 |
+
*/
|
50 |
+
public function testSetOrderStatus($state)
|
51 |
+
{
|
52 |
+
$this->class->getShopgateOrder()->setIsPaid(1);
|
53 |
+
|
54 |
+
$this->setPaidStatusFixture($state);
|
55 |
+
$order = Mage::getModel('sales/order');
|
56 |
+
$this->class->setOrderStatus($order);
|
57 |
+
|
58 |
+
//todo-sg: mock it up
|
59 |
+
if (!$order->getShopgateStatusSet()) {
|
60 |
+
$state = Mage_Sales_Model_Order::STATE_PENDING_PAYMENT;
|
61 |
+
}
|
62 |
+
|
63 |
+
$this->assertEquals($state, $order->getState());
|
64 |
+
}
|
65 |
+
|
66 |
+
/**
|
67 |
+
* Custom rewrite for when status is not paid
|
68 |
+
*
|
69 |
+
* @param string $state - magento order state
|
70 |
+
*
|
71 |
+
* @uses ShopgateOrder::setIsPaid
|
72 |
+
* @uses Shopgate_Framework_Model_Payment_Simple_Sue_Sue300::getShopgateOrder
|
73 |
+
* @uses Shopgate_Framework_Test_Model_Payment_Abstract::setNotPaidStatusFixture
|
74 |
+
* @covers ::setOrderStatus
|
75 |
+
*
|
76 |
+
* @dataProvider allStateProvider
|
77 |
+
*/
|
78 |
+
public function testNotPaidStatus($state)
|
79 |
+
{
|
80 |
+
$this->class->getShopgateOrder()->setIsPaid(0);
|
81 |
+
|
82 |
+
$this->setNotPaidStatusFixture($state);
|
83 |
+
$order = Mage::getModel('sales/order');
|
84 |
+
$this->class->setOrderStatus($order);
|
85 |
+
|
86 |
+
//todo-sg: mock it up
|
87 |
+
if (!$order->getShopgateStatusSet()) {
|
88 |
+
$state = Mage_Sales_Model_Order::STATE_PENDING_PAYMENT;
|
89 |
+
}
|
90 |
+
|
91 |
+
$this->assertEquals($state, $order->getState());
|
92 |
+
}
|
93 |
+
}
|
app/code/community/Shopgate/Framework/Test/Model/Utility.php
ADDED
@@ -0,0 +1,140 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Shopgate GmbH
|
5 |
+
*
|
6 |
+
* URHEBERRECHTSHINWEIS
|
7 |
+
*
|
8 |
+
* Dieses Plugin ist urheberrechtlich geschützt. Es darf ausschließlich von Kunden der Shopgate GmbH
|
9 |
+
* zum Zwecke der eigenen Kommunikation zwischen dem IT-System des Kunden mit dem IT-System der
|
10 |
+
* Shopgate GmbH über www.shopgate.com verwendet werden. Eine darüber hinausgehende Vervielfältigung, Verbreitung,
|
11 |
+
* öffentliche Zugänglichmachung, Bearbeitung oder Weitergabe an Dritte ist nur mit unserer vorherigen
|
12 |
+
* schriftlichen Zustimmung zulässig. Die Regelungen der §§ 69 d Abs. 2, 3 und 69 e UrhG bleiben hiervon unberührt.
|
13 |
+
*
|
14 |
+
* COPYRIGHT NOTICE
|
15 |
+
*
|
16 |
+
* This plugin is the subject of copyright protection. It is only for the use of Shopgate GmbH customers,
|
17 |
+
* for the purpose of facilitating communication between the IT system of the customer and the IT system
|
18 |
+
* of Shopgate GmbH via www.shopgate.com. Any reproduction, dissemination, public propagation, processing or
|
19 |
+
* transfer to third parties is only permitted where we previously consented thereto in writing. The provisions
|
20 |
+
* of paragraph 69 d, sub-paragraphs 2, 3 and paragraph 69, sub-paragraph e of the German Copyright Act shall remain unaffected.
|
21 |
+
*
|
22 |
+
* @author Shopgate GmbH <interfaces@shopgate.com>
|
23 |
+
* @author Konstantin Kiritsenko <konstantin.kiritsenko@shopgate.com>
|
24 |
+
*/
|
25 |
+
class Shopgate_Framework_Test_Model_Utility extends EcomDev_PHPUnit_Test_Case
|
26 |
+
{
|
27 |
+
/**
|
28 |
+
* Classes short name to initialize,
|
29 |
+
* this is the class functions you
|
30 |
+
* will be testing by calling $this->class
|
31 |
+
*/
|
32 |
+
const CLASS_SHORT_NAME = '';
|
33 |
+
|
34 |
+
/**
|
35 |
+
* Exclude group 'empty' to avoid
|
36 |
+
* inflating the test number
|
37 |
+
*
|
38 |
+
* @coversNothing
|
39 |
+
* @group empty
|
40 |
+
*/
|
41 |
+
public function testEmpty() { }
|
42 |
+
|
43 |
+
/**
|
44 |
+
* Added support for PHP version 5.2
|
45 |
+
* constant retrieval
|
46 |
+
*
|
47 |
+
* @param string $input
|
48 |
+
*
|
49 |
+
* @return mixed
|
50 |
+
*/
|
51 |
+
protected final function getConstant($input)
|
52 |
+
{
|
53 |
+
$configClass = new ReflectionClass($this);
|
54 |
+
|
55 |
+
return $configClass->getConstant($input);
|
56 |
+
}
|
57 |
+
|
58 |
+
/**
|
59 |
+
* Enable module if it's installed.
|
60 |
+
* Throw a skip if it's not.
|
61 |
+
*
|
62 |
+
* @param string $modulePath - magento module as defined in modules/config.xml
|
63 |
+
*/
|
64 |
+
protected function activateModule($modulePath)
|
65 |
+
{
|
66 |
+
$config = $this->getModuleConfig($modulePath);
|
67 |
+
|
68 |
+
if (!$config) {
|
69 |
+
return;
|
70 |
+
}
|
71 |
+
|
72 |
+
$config->active = 'true';
|
73 |
+
}
|
74 |
+
|
75 |
+
/**
|
76 |
+
* Disable module if it's installed.
|
77 |
+
* Throw a skip if it's not.
|
78 |
+
*
|
79 |
+
* @param string $modulePath - magento module as defined in modules/config.xml
|
80 |
+
*/
|
81 |
+
protected function deactivateModule($modulePath)
|
82 |
+
{
|
83 |
+
$config = $this->getModuleConfig($modulePath);
|
84 |
+
|
85 |
+
if (!$config) {
|
86 |
+
return;
|
87 |
+
}
|
88 |
+
|
89 |
+
$config->active = 'false';
|
90 |
+
}
|
91 |
+
|
92 |
+
/**
|
93 |
+
* Handles grabbing module configuration and
|
94 |
+
* throwing a method skip if nothing is returned
|
95 |
+
*
|
96 |
+
* @param $modulePath
|
97 |
+
* @return Varien_Simplexml_Object
|
98 |
+
*/
|
99 |
+
protected function getModuleConfig($modulePath)
|
100 |
+
{
|
101 |
+
$config = Mage::getConfig()->getModuleConfig($modulePath);
|
102 |
+
|
103 |
+
if (!$config) {
|
104 |
+
$this->markTestSkipped($modulePath . ' plugin is not installed');
|
105 |
+
}
|
106 |
+
|
107 |
+
return $config;
|
108 |
+
}
|
109 |
+
|
110 |
+
/**
|
111 |
+
* Enables module via inline fixture
|
112 |
+
*
|
113 |
+
* @param $xmlPath - core_config_data path to module's activation
|
114 |
+
*/
|
115 |
+
protected function enableModule($xmlPath)
|
116 |
+
{
|
117 |
+
$this->setConfig($xmlPath, 1);
|
118 |
+
}
|
119 |
+
|
120 |
+
/**
|
121 |
+
* Disables module via inline fixture
|
122 |
+
*
|
123 |
+
* @param $xmlPath - core_config_data path to module's activation
|
124 |
+
*/
|
125 |
+
protected function disableModule($xmlPath)
|
126 |
+
{
|
127 |
+
$this->setConfig($xmlPath, 0);
|
128 |
+
}
|
129 |
+
|
130 |
+
/**
|
131 |
+
* Sets the default config fixture for path
|
132 |
+
*
|
133 |
+
* @param $xmlPath - xml path of the fixture of store 0
|
134 |
+
* @param $value - value to set for the fixture
|
135 |
+
*/
|
136 |
+
private function setConfig($xmlPath, $value)
|
137 |
+
{
|
138 |
+
Mage::app()->getStore(0)->setConfig($xmlPath, $value);
|
139 |
+
}
|
140 |
+
}
|
app/code/community/Shopgate/Framework/changelog.txt
CHANGED
@@ -1,3 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
'''Version 2.9.28'''
|
2 |
* Fixed error in get_settings, when setting values from the shopgate plugin config
|
3 |
* Fixed value in default payment configuration
|
1 |
+
'''Version 2.9.29'''
|
2 |
+
* Fixed wrong shipping tax in case that tax class is 'none'
|
3 |
+
* Added support for php5.2 on mobileRedirect
|
4 |
+
* Fix for Payone initialization exception
|
5 |
+
* Bugfix for rounding MRSP in product export
|
6 |
+
* Added a helpful error log entry for empty product XML exports
|
7 |
+
|
8 |
'''Version 2.9.28'''
|
9 |
* Fixed error in get_settings, when setting values from the shopgate plugin config
|
10 |
* Fixed value in default payment configuration
|
app/code/community/Shopgate/Framework/etc/config.xml
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
<config>
|
3 |
<modules>
|
4 |
<Shopgate_Framework>
|
5 |
-
<version>2.9.
|
6 |
</Shopgate_Framework>
|
7 |
</modules>
|
8 |
<phpunit>
|
@@ -10,10 +10,6 @@
|
|
10 |
<modules>
|
11 |
<Shopgate_Framework />
|
12 |
</modules>
|
13 |
-
<groups>
|
14 |
-
<helpers>Helper</helpers>
|
15 |
-
<controllers>Controller</controllers>
|
16 |
-
</groups>
|
17 |
</suite>
|
18 |
</phpunit>
|
19 |
<global>
|
2 |
<config>
|
3 |
<modules>
|
4 |
<Shopgate_Framework>
|
5 |
+
<version>2.9.29</version>
|
6 |
</Shopgate_Framework>
|
7 |
</modules>
|
8 |
<phpunit>
|
10 |
<modules>
|
11 |
<Shopgate_Framework />
|
12 |
</modules>
|
|
|
|
|
|
|
|
|
13 |
</suite>
|
14 |
</phpunit>
|
15 |
<global>
|
lib/Shopgate/changelog.txt
CHANGED
@@ -1,3 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
'''Version 2.9.37'''
|
2 |
* added outputting open graph and other tags with the mobile redirect if activated in the configuration
|
3 |
* added a replacement class tree for ShopgateMobileRedirect
|
1 |
+
'''Version 2.9.40'''
|
2 |
+
* fixed issue with curly brace regex for jsHeader template
|
3 |
+
* started unit test structure
|
4 |
+
|
5 |
+
'''Version 2.9.39'''
|
6 |
+
* adjusted type-hints to API documentations
|
7 |
+
|
8 |
+
'''Version 2.9.38'''
|
9 |
+
* minor bug fixes
|
10 |
+
|
11 |
'''Version 2.9.37'''
|
12 |
* added outputting open graph and other tags with the mobile redirect if activated in the configuration
|
13 |
* added a replacement class tree for ShopgateMobileRedirect
|
lib/Shopgate/classes/apis.php
CHANGED
@@ -437,10 +437,10 @@ class ShopgatePluginApi extends ShopgateObject implements ShopgatePluginApiInter
|
|
437 |
$shipping = 0;
|
438 |
|
439 |
if (isset($this->params['payment'])) {
|
440 |
-
$payment = (
|
441 |
}
|
442 |
if (isset($this->params['shipping'])) {
|
443 |
-
$shipping = (
|
444 |
}
|
445 |
|
446 |
$orders[0]->setUpdatePayment($payment);
|
437 |
$shipping = 0;
|
438 |
|
439 |
if (isset($this->params['payment'])) {
|
440 |
+
$payment = (int) $this->params['payment'];
|
441 |
}
|
442 |
if (isset($this->params['shipping'])) {
|
443 |
+
$shipping = (int) $this->params['shipping'];
|
444 |
}
|
445 |
|
446 |
$orders[0]->setUpdatePayment($payment);
|
lib/Shopgate/classes/configuration.php
CHANGED
@@ -208,132 +208,132 @@ class ShopgateConfig extends ShopgateContainer implements ShopgateConfigInterfac
|
|
208 |
### Indicators to (de)activate Shopgate Plugin API actions ###
|
209 |
##############################################################
|
210 |
/**
|
211 |
-
* @var
|
212 |
*/
|
213 |
protected $enable_ping;
|
214 |
|
215 |
/**
|
216 |
-
* @var
|
217 |
*/
|
218 |
protected $enable_add_order;
|
219 |
|
220 |
/**
|
221 |
-
* @var
|
222 |
*/
|
223 |
protected $enable_update_order;
|
224 |
|
225 |
/**
|
226 |
-
* @var
|
227 |
*/
|
228 |
protected $enable_check_cart;
|
229 |
|
230 |
/**
|
231 |
-
* @var
|
232 |
*/
|
233 |
protected $enable_check_stock;
|
234 |
|
235 |
/**
|
236 |
-
* @var
|
237 |
*/
|
238 |
protected $enable_redeem_coupons;
|
239 |
|
240 |
/**
|
241 |
-
* @var
|
242 |
*/
|
243 |
protected $enable_get_orders;
|
244 |
|
245 |
/**
|
246 |
-
* @var
|
247 |
*/
|
248 |
protected $enable_get_customer;
|
249 |
|
250 |
/**
|
251 |
-
* @var
|
252 |
*/
|
253 |
protected $enable_register_customer;
|
254 |
|
255 |
/**
|
256 |
-
* @var
|
257 |
*/
|
258 |
protected $enable_get_debug_info;
|
259 |
|
260 |
/**
|
261 |
-
* @var
|
262 |
*/
|
263 |
protected $enable_get_items;
|
264 |
|
265 |
/**
|
266 |
-
* @var
|
267 |
*/
|
268 |
protected $enable_get_items_csv;
|
269 |
|
270 |
/**
|
271 |
-
* @var
|
272 |
*/
|
273 |
protected $enable_get_categories_csv;
|
274 |
|
275 |
/**
|
276 |
-
* @var
|
277 |
*/
|
278 |
protected $enable_get_categories;
|
279 |
|
280 |
/**
|
281 |
-
* @var
|
282 |
*/
|
283 |
protected $enable_get_reviews_csv;
|
284 |
|
285 |
/**
|
286 |
-
* @var
|
287 |
*/
|
288 |
protected $enable_get_reviews;
|
289 |
|
290 |
/**
|
291 |
-
* @var
|
292 |
*/
|
293 |
protected $enable_get_media_csv;
|
294 |
|
295 |
/**
|
296 |
-
* @var
|
297 |
*/
|
298 |
protected $enable_get_log_file;
|
299 |
|
300 |
/**
|
301 |
-
* @var
|
302 |
*/
|
303 |
protected $enable_mobile_website;
|
304 |
|
305 |
/**
|
306 |
-
* @var
|
307 |
*/
|
308 |
protected $enable_cron;
|
309 |
|
310 |
/**
|
311 |
-
* @var
|
312 |
*/
|
313 |
protected $enable_clear_log_file;
|
314 |
|
315 |
/**
|
316 |
-
* @var
|
317 |
*/
|
318 |
protected $enable_clear_cache;
|
319 |
|
320 |
/**
|
321 |
-
* @var
|
322 |
*/
|
323 |
protected $enable_get_settings;
|
324 |
|
325 |
/**
|
326 |
-
* @var
|
327 |
*/
|
328 |
protected $enable_set_settings;
|
329 |
|
330 |
/**
|
331 |
-
* @var
|
332 |
*/
|
333 |
protected $enable_sync_favourite_list;
|
334 |
|
335 |
/**
|
336 |
-
* @var
|
337 |
*/
|
338 |
protected $enable_receive_authorization;
|
339 |
|
@@ -1107,107 +1107,107 @@ class ShopgateConfig extends ShopgateContainer implements ShopgateConfigInterfac
|
|
1107 |
}
|
1108 |
|
1109 |
public function getEnablePing() {
|
1110 |
-
return $this->enable_ping;
|
1111 |
}
|
1112 |
|
1113 |
public function getEnableAddOrder() {
|
1114 |
-
return $this->enable_add_order;
|
1115 |
}
|
1116 |
|
1117 |
public function getEnableUpdateOrder() {
|
1118 |
-
return $this->enable_update_order;
|
1119 |
}
|
1120 |
|
1121 |
public function getEnableCheckCart() {
|
1122 |
-
return $this->enable_check_cart;
|
1123 |
}
|
1124 |
|
1125 |
public function getEnableCheckStock() {
|
1126 |
-
return $this->enable_check_stock;
|
1127 |
}
|
1128 |
|
1129 |
public function getEnableRedeemCoupons() {
|
1130 |
-
return $this->enable_redeem_coupons;
|
1131 |
}
|
1132 |
|
1133 |
public function getEnableGetOrders() {
|
1134 |
-
return $this->enable_get_orders;
|
1135 |
}
|
1136 |
|
1137 |
public function getEnableGetCustomer() {
|
1138 |
-
return $this->enable_get_customer;
|
1139 |
}
|
1140 |
|
1141 |
public function getEnableRegisterCustomer() {
|
1142 |
-
return $this->enable_register_customer;
|
1143 |
}
|
1144 |
|
1145 |
public function getEnableGetDebugInfo() {
|
1146 |
-
return $this->enable_get_debug_info;
|
1147 |
}
|
1148 |
|
1149 |
public function getEnableGetItemsCsv() {
|
1150 |
-
return $this->enable_get_items_csv;
|
1151 |
}
|
1152 |
|
1153 |
public function getEnableGetItems() {
|
1154 |
-
return $this->enable_get_items;
|
1155 |
}
|
1156 |
|
1157 |
public function getEnableGetCategoriesCsv() {
|
1158 |
-
return $this->enable_get_categories_csv;
|
1159 |
}
|
1160 |
|
1161 |
public function getEnableGetCategories() {
|
1162 |
-
return $this->enable_get_categories;
|
1163 |
}
|
1164 |
|
1165 |
public function getEnableGetReviewsCsv() {
|
1166 |
-
return $this->enable_get_reviews_csv;
|
1167 |
}
|
1168 |
|
1169 |
public function getEnableGetReviews() {
|
1170 |
-
return $this->enable_get_reviews;
|
1171 |
}
|
1172 |
|
1173 |
public function getEnableGetMediaCsv(){
|
1174 |
-
return $this->enable_get_media_csv;
|
1175 |
}
|
1176 |
|
1177 |
public function getEnableGetLogFile() {
|
1178 |
-
return $this->enable_get_log_file;
|
1179 |
}
|
1180 |
|
1181 |
public function getEnableMobileWebsite() {
|
1182 |
-
return $this->enable_mobile_website;
|
1183 |
}
|
1184 |
|
1185 |
public function getEnableCron() {
|
1186 |
-
return $this->enable_cron;
|
1187 |
}
|
1188 |
|
1189 |
public function getEnableClearLogFile() {
|
1190 |
-
return $this->enable_clear_log_file;
|
1191 |
}
|
1192 |
|
1193 |
public function getEnableClearCache() {
|
1194 |
-
return $this->enable_clear_cache;
|
1195 |
}
|
1196 |
|
1197 |
public function getEnableGetSettings() {
|
1198 |
-
return $this->enable_get_settings;
|
1199 |
}
|
1200 |
|
1201 |
public function getEnableSetSettings() {
|
1202 |
-
return $this->enable_set_settings;
|
1203 |
}
|
1204 |
|
1205 |
public function getEnableSyncFavouriteList() {
|
1206 |
-
return $this->enable_sync_favourite_list;
|
1207 |
}
|
1208 |
|
1209 |
public function getEnableReceiveAuthorization() {
|
1210 |
-
return $this->enable_receive_authorization;
|
1211 |
}
|
1212 |
|
1213 |
public function getCountry() {
|
@@ -2631,132 +2631,132 @@ interface ShopgateConfigInterface {
|
|
2631 |
public function getSupportedMethodsCron();
|
2632 |
|
2633 |
/**
|
2634 |
-
* @return
|
2635 |
*/
|
2636 |
public function getEnablePing();
|
2637 |
|
2638 |
/**
|
2639 |
-
* @return
|
2640 |
*/
|
2641 |
public function getEnableAddOrder();
|
2642 |
|
2643 |
/**
|
2644 |
-
* @return
|
2645 |
*/
|
2646 |
public function getEnableUpdateOrder();
|
2647 |
|
2648 |
/**
|
2649 |
-
* @return
|
2650 |
*/
|
2651 |
public function getEnableCheckCart();
|
2652 |
|
2653 |
/**
|
2654 |
-
* @return
|
2655 |
*/
|
2656 |
public function getEnableCheckStock();
|
2657 |
|
2658 |
/**
|
2659 |
-
* @return
|
2660 |
*/
|
2661 |
public function getEnableRedeemCoupons();
|
2662 |
|
2663 |
/**
|
2664 |
-
* @return
|
2665 |
*/
|
2666 |
public function getEnableGetOrders();
|
2667 |
|
2668 |
/**
|
2669 |
-
* @return
|
2670 |
*/
|
2671 |
public function getEnableGetCustomer();
|
2672 |
|
2673 |
/**
|
2674 |
-
* @return
|
2675 |
*/
|
2676 |
public function getEnableRegisterCustomer();
|
2677 |
|
2678 |
/**
|
2679 |
-
* @return
|
2680 |
*/
|
2681 |
public function getEnableGetDebugInfo();
|
2682 |
|
2683 |
/**
|
2684 |
-
* @return
|
2685 |
*/
|
2686 |
public function getEnableGetItemsCsv();
|
2687 |
|
2688 |
/**
|
2689 |
-
* @return
|
2690 |
*/
|
2691 |
public function getEnableGetItems();
|
2692 |
|
2693 |
/**
|
2694 |
-
* @return
|
2695 |
*/
|
2696 |
public function getEnableGetCategoriesCsv();
|
2697 |
|
2698 |
/**
|
2699 |
-
* @return
|
2700 |
*/
|
2701 |
public function getEnableGetCategories();
|
2702 |
|
2703 |
/**
|
2704 |
-
* @return
|
2705 |
*/
|
2706 |
public function getEnableGetReviewsCsv();
|
2707 |
|
2708 |
/**
|
2709 |
-
* @return
|
2710 |
*/
|
2711 |
public function getEnableGetReviews();
|
2712 |
|
2713 |
/**
|
2714 |
-
* @return
|
2715 |
*/
|
2716 |
public function getEnableGetMediaCsv();
|
2717 |
|
2718 |
/**
|
2719 |
-
* @return
|
2720 |
*/
|
2721 |
public function getEnableGetLogFile();
|
2722 |
|
2723 |
/**
|
2724 |
-
* @return
|
2725 |
*/
|
2726 |
public function getEnableMobileWebsite();
|
2727 |
|
2728 |
/**
|
2729 |
-
* @return
|
2730 |
*/
|
2731 |
public function getEnableCron();
|
2732 |
|
2733 |
/**
|
2734 |
-
* @return
|
2735 |
*/
|
2736 |
public function getEnableClearLogFile();
|
2737 |
|
2738 |
/**
|
2739 |
-
* @return
|
2740 |
*/
|
2741 |
public function getEnableClearCache();
|
2742 |
|
2743 |
/**
|
2744 |
-
* @return
|
2745 |
*/
|
2746 |
public function getEnableGetSettings();
|
2747 |
|
2748 |
/**
|
2749 |
-
* @return
|
2750 |
*/
|
2751 |
public function getEnableSetSettings();
|
2752 |
|
2753 |
/**
|
2754 |
-
* @return
|
2755 |
*/
|
2756 |
public function getEnableSyncFavouriteList();
|
2757 |
|
2758 |
/**
|
2759 |
-
* @return
|
2760 |
*/
|
2761 |
public function getEnableReceiveAuthorization();
|
2762 |
|
@@ -3103,132 +3103,132 @@ interface ShopgateConfigInterface {
|
|
3103 |
public function setSupportedResponseTypes($value);
|
3104 |
|
3105 |
/**
|
3106 |
-
* @param
|
3107 |
*/
|
3108 |
public function setEnablePing($value);
|
3109 |
|
3110 |
/**
|
3111 |
-
* @param
|
3112 |
*/
|
3113 |
public function setEnableAddOrder($value);
|
3114 |
|
3115 |
/**
|
3116 |
-
* @param
|
3117 |
*/
|
3118 |
public function setEnableUpdateOrder($value);
|
3119 |
|
3120 |
/**
|
3121 |
-
* @param
|
3122 |
*/
|
3123 |
public function setEnableCheckCart($value);
|
3124 |
|
3125 |
/**
|
3126 |
-
* @param
|
3127 |
*/
|
3128 |
public function setEnableCheckStock($value);
|
3129 |
|
3130 |
/**
|
3131 |
-
* @param
|
3132 |
*/
|
3133 |
public function setEnableRedeemCoupons($value);
|
3134 |
|
3135 |
/**
|
3136 |
-
* @param
|
3137 |
*/
|
3138 |
public function setEnableGetOrders($value);
|
3139 |
|
3140 |
/**
|
3141 |
-
* @param
|
3142 |
*/
|
3143 |
public function setEnableGetCustomer($value);
|
3144 |
|
3145 |
/**
|
3146 |
-
* @param
|
3147 |
*/
|
3148 |
public function setEnableRegisterCustomer($value);
|
3149 |
|
3150 |
/**
|
3151 |
-
* @param
|
3152 |
*/
|
3153 |
public function setEnableGetDebugInfo($value);
|
3154 |
|
3155 |
/**
|
3156 |
-
* @param
|
3157 |
*/
|
3158 |
public function setEnableGetItemsCsv($value);
|
3159 |
|
3160 |
/**
|
3161 |
-
* @param
|
3162 |
*/
|
3163 |
public function setEnableGetItems($value);
|
3164 |
|
3165 |
/**
|
3166 |
-
* @param
|
3167 |
*/
|
3168 |
public function setEnableGetCategoriesCsv($value);
|
3169 |
|
3170 |
/**
|
3171 |
-
* @param
|
3172 |
*/
|
3173 |
public function setEnableGetCategories($value);
|
3174 |
|
3175 |
/**
|
3176 |
-
* @param
|
3177 |
*/
|
3178 |
public function setEnableGetReviewsCsv($value);
|
3179 |
|
3180 |
/**
|
3181 |
-
* @param
|
3182 |
*/
|
3183 |
public function setEnableGetReviews($value);
|
3184 |
|
3185 |
/**
|
3186 |
-
* @param
|
3187 |
*/
|
3188 |
public function setEnableGetMediaCsv($value);
|
3189 |
|
3190 |
/**
|
3191 |
-
* @param
|
3192 |
*/
|
3193 |
public function setEnableGetLogFile($value);
|
3194 |
|
3195 |
/**
|
3196 |
-
* @param
|
3197 |
*/
|
3198 |
public function setEnableMobileWebsite($value);
|
3199 |
|
3200 |
/**
|
3201 |
-
* @param
|
3202 |
*/
|
3203 |
public function setEnableCron($value);
|
3204 |
|
3205 |
/**
|
3206 |
-
* @param
|
3207 |
*/
|
3208 |
public function setEnableClearLogFile($value);
|
3209 |
|
3210 |
/**
|
3211 |
-
* @param
|
3212 |
*/
|
3213 |
public function setEnableClearCache($value);
|
3214 |
|
3215 |
/**
|
3216 |
-
* @param
|
3217 |
*/
|
3218 |
public function setEnableGetSettings($value);
|
3219 |
|
3220 |
/**
|
3221 |
-
* @param
|
3222 |
*/
|
3223 |
public function setEnableSetSettings($value);
|
3224 |
|
3225 |
/**
|
3226 |
-
* @param
|
3227 |
*/
|
3228 |
public function setEnableSyncFavouriteList($value);
|
3229 |
|
3230 |
/**
|
3231 |
-
* @param
|
3232 |
*/
|
3233 |
public function setEnableReceiveAuthorization($value);
|
3234 |
|
208 |
### Indicators to (de)activate Shopgate Plugin API actions ###
|
209 |
##############################################################
|
210 |
/**
|
211 |
+
* @var int
|
212 |
*/
|
213 |
protected $enable_ping;
|
214 |
|
215 |
/**
|
216 |
+
* @var int
|
217 |
*/
|
218 |
protected $enable_add_order;
|
219 |
|
220 |
/**
|
221 |
+
* @var int
|
222 |
*/
|
223 |
protected $enable_update_order;
|
224 |
|
225 |
/**
|
226 |
+
* @var int
|
227 |
*/
|
228 |
protected $enable_check_cart;
|
229 |
|
230 |
/**
|
231 |
+
* @var int
|
232 |
*/
|
233 |
protected $enable_check_stock;
|
234 |
|
235 |
/**
|
236 |
+
* @var int
|
237 |
*/
|
238 |
protected $enable_redeem_coupons;
|
239 |
|
240 |
/**
|
241 |
+
* @var int
|
242 |
*/
|
243 |
protected $enable_get_orders;
|
244 |
|
245 |
/**
|
246 |
+
* @var int
|
247 |
*/
|
248 |
protected $enable_get_customer;
|
249 |
|
250 |
/**
|
251 |
+
* @var int
|
252 |
*/
|
253 |
protected $enable_register_customer;
|
254 |
|
255 |
/**
|
256 |
+
* @var int
|
257 |
*/
|
258 |
protected $enable_get_debug_info;
|
259 |
|
260 |
/**
|
261 |
+
* @var int
|
262 |
*/
|
263 |
protected $enable_get_items;
|
264 |
|
265 |
/**
|
266 |
+
* @var int
|
267 |
*/
|
268 |
protected $enable_get_items_csv;
|
269 |
|
270 |
/**
|
271 |
+
* @var int
|
272 |
*/
|
273 |
protected $enable_get_categories_csv;
|
274 |
|
275 |
/**
|
276 |
+
* @var int
|
277 |
*/
|
278 |
protected $enable_get_categories;
|
279 |
|
280 |
/**
|
281 |
+
* @var int
|
282 |
*/
|
283 |
protected $enable_get_reviews_csv;
|
284 |
|
285 |
/**
|
286 |
+
* @var int
|
287 |
*/
|
288 |
protected $enable_get_reviews;
|
289 |
|
290 |
/**
|
291 |
+
* @var int
|
292 |
*/
|
293 |
protected $enable_get_media_csv;
|
294 |
|
295 |
/**
|
296 |
+
* @var int
|
297 |
*/
|
298 |
protected $enable_get_log_file;
|
299 |
|
300 |
/**
|
301 |
+
* @var int
|
302 |
*/
|
303 |
protected $enable_mobile_website;
|
304 |
|
305 |
/**
|
306 |
+
* @var int
|
307 |
*/
|
308 |
protected $enable_cron;
|
309 |
|
310 |
/**
|
311 |
+
* @var int
|
312 |
*/
|
313 |
protected $enable_clear_log_file;
|
314 |
|
315 |
/**
|
316 |
+
* @var int
|
317 |
*/
|
318 |
protected $enable_clear_cache;
|
319 |
|
320 |
/**
|
321 |
+
* @var int
|
322 |
*/
|
323 |
protected $enable_get_settings;
|
324 |
|
325 |
/**
|
326 |
+
* @var int
|
327 |
*/
|
328 |
protected $enable_set_settings;
|
329 |
|
330 |
/**
|
331 |
+
* @var int
|
332 |
*/
|
333 |
protected $enable_sync_favourite_list;
|
334 |
|
335 |
/**
|
336 |
+
* @var int
|
337 |
*/
|
338 |
protected $enable_receive_authorization;
|
339 |
|
1107 |
}
|
1108 |
|
1109 |
public function getEnablePing() {
|
1110 |
+
return (int)$this->enable_ping;
|
1111 |
}
|
1112 |
|
1113 |
public function getEnableAddOrder() {
|
1114 |
+
return (int)$this->enable_add_order;
|
1115 |
}
|
1116 |
|
1117 |
public function getEnableUpdateOrder() {
|
1118 |
+
return (int)$this->enable_update_order;
|
1119 |
}
|
1120 |
|
1121 |
public function getEnableCheckCart() {
|
1122 |
+
return (int)$this->enable_check_cart;
|
1123 |
}
|
1124 |
|
1125 |
public function getEnableCheckStock() {
|
1126 |
+
return (int)$this->enable_check_stock;
|
1127 |
}
|
1128 |
|
1129 |
public function getEnableRedeemCoupons() {
|
1130 |
+
return (int)$this->enable_redeem_coupons;
|
1131 |
}
|
1132 |
|
1133 |
public function getEnableGetOrders() {
|
1134 |
+
return (int)$this->enable_get_orders;
|
1135 |
}
|
1136 |
|
1137 |
public function getEnableGetCustomer() {
|
1138 |
+
return (int)$this->enable_get_customer;
|
1139 |
}
|
1140 |
|
1141 |
public function getEnableRegisterCustomer() {
|
1142 |
+
return (int)$this->enable_register_customer;
|
1143 |
}
|
1144 |
|
1145 |
public function getEnableGetDebugInfo() {
|
1146 |
+
return (int)$this->enable_get_debug_info;
|
1147 |
}
|
1148 |
|
1149 |
public function getEnableGetItemsCsv() {
|
1150 |
+
return (int)$this->enable_get_items_csv;
|
1151 |
}
|
1152 |
|
1153 |
public function getEnableGetItems() {
|
1154 |
+
return (int)$this->enable_get_items;
|
1155 |
}
|
1156 |
|
1157 |
public function getEnableGetCategoriesCsv() {
|
1158 |
+
return (int)$this->enable_get_categories_csv;
|
1159 |
}
|
1160 |
|
1161 |
public function getEnableGetCategories() {
|
1162 |
+
return (int)$this->enable_get_categories;
|
1163 |
}
|
1164 |
|
1165 |
public function getEnableGetReviewsCsv() {
|
1166 |
+
return (int)$this->enable_get_reviews_csv;
|
1167 |
}
|
1168 |
|
1169 |
public function getEnableGetReviews() {
|
1170 |
+
return (int)$this->enable_get_reviews;
|
1171 |
}
|
1172 |
|
1173 |
public function getEnableGetMediaCsv(){
|
1174 |
+
return (int)$this->enable_get_media_csv;
|
1175 |
}
|
1176 |
|
1177 |
public function getEnableGetLogFile() {
|
1178 |
+
return (int)$this->enable_get_log_file;
|
1179 |
}
|
1180 |
|
1181 |
public function getEnableMobileWebsite() {
|
1182 |
+
return (int)$this->enable_mobile_website;
|
1183 |
}
|
1184 |
|
1185 |
public function getEnableCron() {
|
1186 |
+
return (int)$this->enable_cron;
|
1187 |
}
|
1188 |
|
1189 |
public function getEnableClearLogFile() {
|
1190 |
+
return (int)$this->enable_clear_log_file;
|
1191 |
}
|
1192 |
|
1193 |
public function getEnableClearCache() {
|
1194 |
+
return (int)$this->enable_clear_cache;
|
1195 |
}
|
1196 |
|
1197 |
public function getEnableGetSettings() {
|
1198 |
+
return (int)$this->enable_get_settings;
|
1199 |
}
|
1200 |
|
1201 |
public function getEnableSetSettings() {
|
1202 |
+
return (int)$this->enable_set_settings;
|
1203 |
}
|
1204 |
|
1205 |
public function getEnableSyncFavouriteList() {
|
1206 |
+
return (int)$this->enable_sync_favourite_list;
|
1207 |
}
|
1208 |
|
1209 |
public function getEnableReceiveAuthorization() {
|
1210 |
+
return (int)$this->enable_receive_authorization;
|
1211 |
}
|
1212 |
|
1213 |
public function getCountry() {
|
2631 |
public function getSupportedMethodsCron();
|
2632 |
|
2633 |
/**
|
2634 |
+
* @return int
|
2635 |
*/
|
2636 |
public function getEnablePing();
|
2637 |
|
2638 |
/**
|
2639 |
+
* @return int
|
2640 |
*/
|
2641 |
public function getEnableAddOrder();
|
2642 |
|
2643 |
/**
|
2644 |
+
* @return int
|
2645 |
*/
|
2646 |
public function getEnableUpdateOrder();
|
2647 |
|
2648 |
/**
|
2649 |
+
* @return int
|
2650 |
*/
|
2651 |
public function getEnableCheckCart();
|
2652 |
|
2653 |
/**
|
2654 |
+
* @return int
|
2655 |
*/
|
2656 |
public function getEnableCheckStock();
|
2657 |
|
2658 |
/**
|
2659 |
+
* @return int
|
2660 |
*/
|
2661 |
public function getEnableRedeemCoupons();
|
2662 |
|
2663 |
/**
|
2664 |
+
* @return int
|
2665 |
*/
|
2666 |
public function getEnableGetOrders();
|
2667 |
|
2668 |
/**
|
2669 |
+
* @return int
|
2670 |
*/
|
2671 |
public function getEnableGetCustomer();
|
2672 |
|
2673 |
/**
|
2674 |
+
* @return int
|
2675 |
*/
|
2676 |
public function getEnableRegisterCustomer();
|
2677 |
|
2678 |
/**
|
2679 |
+
* @return int
|
2680 |
*/
|
2681 |
public function getEnableGetDebugInfo();
|
2682 |
|
2683 |
/**
|
2684 |
+
* @return int
|
2685 |
*/
|
2686 |
public function getEnableGetItemsCsv();
|
2687 |
|
2688 |
/**
|
2689 |
+
* @return int
|
2690 |
*/
|
2691 |
public function getEnableGetItems();
|
2692 |
|
2693 |
/**
|
2694 |
+
* @return int
|
2695 |
*/
|
2696 |
public function getEnableGetCategoriesCsv();
|
2697 |
|
2698 |
/**
|
2699 |
+
* @return int
|
2700 |
*/
|
2701 |
public function getEnableGetCategories();
|
2702 |
|
2703 |
/**
|
2704 |
+
* @return int
|
2705 |
*/
|
2706 |
public function getEnableGetReviewsCsv();
|
2707 |
|
2708 |
/**
|
2709 |
+
* @return int
|
2710 |
*/
|
2711 |
public function getEnableGetReviews();
|
2712 |
|
2713 |
/**
|
2714 |
+
* @return int
|
2715 |
*/
|
2716 |
public function getEnableGetMediaCsv();
|
2717 |
|
2718 |
/**
|
2719 |
+
* @return int
|
2720 |
*/
|
2721 |
public function getEnableGetLogFile();
|
2722 |
|
2723 |
/**
|
2724 |
+
* @return int
|
2725 |
*/
|
2726 |
public function getEnableMobileWebsite();
|
2727 |
|
2728 |
/**
|
2729 |
+
* @return int
|
2730 |
*/
|
2731 |
public function getEnableCron();
|
2732 |
|
2733 |
/**
|
2734 |
+
* @return int
|
2735 |
*/
|
2736 |
public function getEnableClearLogFile();
|
2737 |
|
2738 |
/**
|
2739 |
+
* @return int
|
2740 |
*/
|
2741 |
public function getEnableClearCache();
|
2742 |
|
2743 |
/**
|
2744 |
+
* @return int
|
2745 |
*/
|
2746 |
public function getEnableGetSettings();
|
2747 |
|
2748 |
/**
|
2749 |
+
* @return int
|
2750 |
*/
|
2751 |
public function getEnableSetSettings();
|
2752 |
|
2753 |
/**
|
2754 |
+
* @return int
|
2755 |
*/
|
2756 |
public function getEnableSyncFavouriteList();
|
2757 |
|
2758 |
/**
|
2759 |
+
* @return int
|
2760 |
*/
|
2761 |
public function getEnableReceiveAuthorization();
|
2762 |
|
3103 |
public function setSupportedResponseTypes($value);
|
3104 |
|
3105 |
/**
|
3106 |
+
* @param int $value
|
3107 |
*/
|
3108 |
public function setEnablePing($value);
|
3109 |
|
3110 |
/**
|
3111 |
+
* @param int $value
|
3112 |
*/
|
3113 |
public function setEnableAddOrder($value);
|
3114 |
|
3115 |
/**
|
3116 |
+
* @param int $value
|
3117 |
*/
|
3118 |
public function setEnableUpdateOrder($value);
|
3119 |
|
3120 |
/**
|
3121 |
+
* @param int $value
|
3122 |
*/
|
3123 |
public function setEnableCheckCart($value);
|
3124 |
|
3125 |
/**
|
3126 |
+
* @param int $value
|
3127 |
*/
|
3128 |
public function setEnableCheckStock($value);
|
3129 |
|
3130 |
/**
|
3131 |
+
* @param int $value
|
3132 |
*/
|
3133 |
public function setEnableRedeemCoupons($value);
|
3134 |
|
3135 |
/**
|
3136 |
+
* @param int $value
|
3137 |
*/
|
3138 |
public function setEnableGetOrders($value);
|
3139 |
|
3140 |
/**
|
3141 |
+
* @param int $value
|
3142 |
*/
|
3143 |
public function setEnableGetCustomer($value);
|
3144 |
|
3145 |
/**
|
3146 |
+
* @param int $value
|
3147 |
*/
|
3148 |
public function setEnableRegisterCustomer($value);
|
3149 |
|
3150 |
/**
|
3151 |
+
* @param int $value
|
3152 |
*/
|
3153 |
public function setEnableGetDebugInfo($value);
|
3154 |
|
3155 |
/**
|
3156 |
+
* @param int $value
|
3157 |
*/
|
3158 |
public function setEnableGetItemsCsv($value);
|
3159 |
|
3160 |
/**
|
3161 |
+
* @param int $value
|
3162 |
*/
|
3163 |
public function setEnableGetItems($value);
|
3164 |
|
3165 |
/**
|
3166 |
+
* @param int $value
|
3167 |
*/
|
3168 |
public function setEnableGetCategoriesCsv($value);
|
3169 |
|
3170 |
/**
|
3171 |
+
* @param int $value
|
3172 |
*/
|
3173 |
public function setEnableGetCategories($value);
|
3174 |
|
3175 |
/**
|
3176 |
+
* @param int $value
|
3177 |
*/
|
3178 |
public function setEnableGetReviewsCsv($value);
|
3179 |
|
3180 |
/**
|
3181 |
+
* @param int $value
|
3182 |
*/
|
3183 |
public function setEnableGetReviews($value);
|
3184 |
|
3185 |
/**
|
3186 |
+
* @param int $value
|
3187 |
*/
|
3188 |
public function setEnableGetMediaCsv($value);
|
3189 |
|
3190 |
/**
|
3191 |
+
* @param int $value
|
3192 |
*/
|
3193 |
public function setEnableGetLogFile($value);
|
3194 |
|
3195 |
/**
|
3196 |
+
* @param int $value
|
3197 |
*/
|
3198 |
public function setEnableMobileWebsite($value);
|
3199 |
|
3200 |
/**
|
3201 |
+
* @param int $value
|
3202 |
*/
|
3203 |
public function setEnableCron($value);
|
3204 |
|
3205 |
/**
|
3206 |
+
* @param int $value
|
3207 |
*/
|
3208 |
public function setEnableClearLogFile($value);
|
3209 |
|
3210 |
/**
|
3211 |
+
* @param int $value
|
3212 |
*/
|
3213 |
public function setEnableClearCache($value);
|
3214 |
|
3215 |
/**
|
3216 |
+
* @param int $value
|
3217 |
*/
|
3218 |
public function setEnableGetSettings($value);
|
3219 |
|
3220 |
/**
|
3221 |
+
* @param int $value
|
3222 |
*/
|
3223 |
public function setEnableSetSettings($value);
|
3224 |
|
3225 |
/**
|
3226 |
+
* @param int $value
|
3227 |
*/
|
3228 |
public function setEnableSyncFavouriteList($value);
|
3229 |
|
3230 |
/**
|
3231 |
+
* @param int $value
|
3232 |
*/
|
3233 |
public function setEnableReceiveAuthorization($value);
|
3234 |
|
lib/Shopgate/classes/core.php
CHANGED
@@ -24,7 +24,7 @@
|
|
24 |
###################################################################################
|
25 |
# define constants
|
26 |
###################################################################################
|
27 |
-
define('SHOPGATE_LIBRARY_VERSION', '2.9.
|
28 |
define('SHOPGATE_LIBRARY_ENCODING' , 'UTF-8');
|
29 |
define('SHOPGATE_BASE_DIR', realpath(dirname(__FILE__).'/../'));
|
30 |
|
@@ -89,7 +89,7 @@ function ShopgateShutdownHandler() {
|
|
89 |
* @param string $errfile
|
90 |
* @param int $errline
|
91 |
* @param array $errContext
|
92 |
-
* @return
|
93 |
* @see http://php.net/manual/en/function.set-error-handler.php
|
94 |
*/
|
95 |
function ShopgateErrorHandler($errno, $errstr, $errfile, $errline, $errContext) {
|
@@ -1566,7 +1566,7 @@ abstract class ShopgatePlugin extends ShopgateObject {
|
|
1566 |
|
1567 |
/**
|
1568 |
*
|
1569 |
-
* @var
|
1570 |
*/
|
1571 |
protected $useTaxClasses = false;
|
1572 |
|
24 |
###################################################################################
|
25 |
# define constants
|
26 |
###################################################################################
|
27 |
+
define('SHOPGATE_LIBRARY_VERSION', '2.9.39');
|
28 |
define('SHOPGATE_LIBRARY_ENCODING' , 'UTF-8');
|
29 |
define('SHOPGATE_BASE_DIR', realpath(dirname(__FILE__).'/../'));
|
30 |
|
89 |
* @param string $errfile
|
90 |
* @param int $errline
|
91 |
* @param array $errContext
|
92 |
+
* @return bool
|
93 |
* @see http://php.net/manual/en/function.set-error-handler.php
|
94 |
*/
|
95 |
function ShopgateErrorHandler($errno, $errstr, $errfile, $errline, $errContext) {
|
1566 |
|
1567 |
/**
|
1568 |
*
|
1569 |
+
* @var bool true use tax classes for export
|
1570 |
*/
|
1571 |
protected $useTaxClasses = false;
|
1572 |
|
lib/Shopgate/classes/customers.php
CHANGED
@@ -226,7 +226,7 @@ class ShopgateCustomer extends ShopgateContainer {
|
|
226 |
}
|
227 |
|
228 |
/**
|
229 |
-
* @param
|
230 |
*/
|
231 |
public function setNewsletterSubscription($value) {
|
232 |
$this->newsletter_subscription = $value;
|
@@ -380,10 +380,10 @@ class ShopgateCustomer extends ShopgateContainer {
|
|
380 |
}
|
381 |
|
382 |
/**
|
383 |
-
* @return
|
384 |
*/
|
385 |
public function getNewsletterSubscription() {
|
386 |
-
return (
|
387 |
}
|
388 |
|
389 |
/**
|
@@ -517,22 +517,22 @@ class ShopgateAddress extends ShopgateContainer {
|
|
517 |
* @param int $value ShopgateAddress::BOTH or ShopgateAddress::INVOICE or ShopgateAddress::DELIVERY
|
518 |
*/
|
519 |
public function setAddressType($value) {
|
520 |
-
$this->is_invoice_address = (bool) ($value & self::INVOICE);
|
521 |
-
$this->is_delivery_address = (bool) ($value & self::DELIVERY);
|
522 |
}
|
523 |
|
524 |
/**
|
525 |
-
* @param
|
526 |
*/
|
527 |
public function setIsInvoiceAddress($value) {
|
528 |
-
$this->is_invoice_address = (
|
529 |
}
|
530 |
|
531 |
/**
|
532 |
-
* @param
|
533 |
*/
|
534 |
public function setIsDeliveryAddress($value) {
|
535 |
-
$this->is_delivery_address = (
|
536 |
}
|
537 |
|
538 |
/**
|
@@ -686,14 +686,14 @@ class ShopgateAddress extends ShopgateContainer {
|
|
686 |
}
|
687 |
|
688 |
/**
|
689 |
-
* @return
|
690 |
*/
|
691 |
-
public function getIsInvoiceAddress() { return (
|
692 |
|
693 |
/**
|
694 |
-
* @return
|
695 |
*/
|
696 |
-
public function getIsDeliveryAddress() { return (
|
697 |
|
698 |
/**
|
699 |
* @return int ShopgateAddress::BOTH or ShopgateAddress::INVOICE or ShopgateAddress::DELIVERY
|
226 |
}
|
227 |
|
228 |
/**
|
229 |
+
* @param int $value
|
230 |
*/
|
231 |
public function setNewsletterSubscription($value) {
|
232 |
$this->newsletter_subscription = $value;
|
380 |
}
|
381 |
|
382 |
/**
|
383 |
+
* @return int
|
384 |
*/
|
385 |
public function getNewsletterSubscription() {
|
386 |
+
return (int) $this->newsletter_subscription;
|
387 |
}
|
388 |
|
389 |
/**
|
517 |
* @param int $value ShopgateAddress::BOTH or ShopgateAddress::INVOICE or ShopgateAddress::DELIVERY
|
518 |
*/
|
519 |
public function setAddressType($value) {
|
520 |
+
$this->is_invoice_address = (int) (bool) ($value & self::INVOICE);
|
521 |
+
$this->is_delivery_address = (int) (bool) ($value & self::DELIVERY);
|
522 |
}
|
523 |
|
524 |
/**
|
525 |
+
* @param int $value
|
526 |
*/
|
527 |
public function setIsInvoiceAddress($value) {
|
528 |
+
$this->is_invoice_address = (int) $value;
|
529 |
}
|
530 |
|
531 |
/**
|
532 |
+
* @param int $value
|
533 |
*/
|
534 |
public function setIsDeliveryAddress($value) {
|
535 |
+
$this->is_delivery_address = (int) $value;
|
536 |
}
|
537 |
|
538 |
/**
|
686 |
}
|
687 |
|
688 |
/**
|
689 |
+
* @return int
|
690 |
*/
|
691 |
+
public function getIsInvoiceAddress() { return (int) $this->is_invoice_address; }
|
692 |
|
693 |
/**
|
694 |
+
* @return int
|
695 |
*/
|
696 |
+
public function getIsDeliveryAddress() { return (int) $this->is_delivery_address; }
|
697 |
|
698 |
/**
|
699 |
* @return int ShopgateAddress::BOTH or ShopgateAddress::INVOICE or ShopgateAddress::DELIVERY
|
lib/Shopgate/classes/external_orders.php
CHANGED
@@ -255,7 +255,7 @@ class ShopgateExternalOrder extends ShopgateContainer {
|
|
255 |
}
|
256 |
|
257 |
/**
|
258 |
-
* @param
|
259 |
*/
|
260 |
public function setIsShippingCompleted($value) {
|
261 |
$this->is_shipping_completed = $value;
|
@@ -269,7 +269,7 @@ class ShopgateExternalOrder extends ShopgateContainer {
|
|
269 |
}
|
270 |
|
271 |
/**
|
272 |
-
* @param
|
273 |
*/
|
274 |
public function setIsPaid($value) {
|
275 |
$this->is_paid = $value;
|
@@ -534,10 +534,10 @@ class ShopgateExternalOrder extends ShopgateContainer {
|
|
534 |
}
|
535 |
|
536 |
/**
|
537 |
-
* @return
|
538 |
*/
|
539 |
public function getIsShippingCompleted() {
|
540 |
-
return $this->is_shipping_completed;
|
541 |
}
|
542 |
|
543 |
/**
|
@@ -548,10 +548,10 @@ class ShopgateExternalOrder extends ShopgateContainer {
|
|
548 |
}
|
549 |
|
550 |
/**
|
551 |
-
* @return
|
552 |
*/
|
553 |
public function getIsPaid() {
|
554 |
-
return $this->is_paid;
|
555 |
}
|
556 |
|
557 |
/**
|
255 |
}
|
256 |
|
257 |
/**
|
258 |
+
* @param int $value
|
259 |
*/
|
260 |
public function setIsShippingCompleted($value) {
|
261 |
$this->is_shipping_completed = $value;
|
269 |
}
|
270 |
|
271 |
/**
|
272 |
+
* @param int $value
|
273 |
*/
|
274 |
public function setIsPaid($value) {
|
275 |
$this->is_paid = $value;
|
534 |
}
|
535 |
|
536 |
/**
|
537 |
+
* @return int
|
538 |
*/
|
539 |
public function getIsShippingCompleted() {
|
540 |
+
return (int)$this->is_shipping_completed;
|
541 |
}
|
542 |
|
543 |
/**
|
548 |
}
|
549 |
|
550 |
/**
|
551 |
+
* @return int
|
552 |
*/
|
553 |
public function getIsPaid() {
|
554 |
+
return (int)$this->is_paid;
|
555 |
}
|
556 |
|
557 |
/**
|
lib/Shopgate/classes/helper/redirect/TemplateParser.php
CHANGED
@@ -26,12 +26,12 @@ class Shopgate_Helper_Redirect_TemplateParser implements Shopgate_Helper_Redirec
|
|
26 |
public function getVariables($template)
|
27 |
{
|
28 |
$matches = array();
|
29 |
-
if (!preg_match_all('/{(
|
30 |
return array();
|
31 |
}
|
32 |
|
33 |
$variables = array();
|
34 |
-
foreach ($matches[
|
35 |
$parts = explode(':', $variable);
|
36 |
|
37 |
$variable = new Shopgate_Model_Redirect_HtmlTagVariable();
|
26 |
public function getVariables($template)
|
27 |
{
|
28 |
$matches = array();
|
29 |
+
if (!preg_match_all('/{([^}]+)}*/', $template, $matches)) {
|
30 |
return array();
|
31 |
}
|
32 |
|
33 |
$variables = array();
|
34 |
+
foreach ($matches[1] as $variable) {
|
35 |
$parts = explode(':', $variable);
|
36 |
|
37 |
$variable = new Shopgate_Model_Redirect_HtmlTagVariable();
|
lib/Shopgate/classes/items.php
CHANGED
@@ -74,7 +74,7 @@ class ShopgateCategory extends ShopgateContainer {
|
|
74 |
}
|
75 |
|
76 |
/**
|
77 |
-
* @param
|
78 |
*/
|
79 |
public function setIsActive($value) {
|
80 |
$this->is_active = $value;
|
@@ -121,10 +121,10 @@ class ShopgateCategory extends ShopgateContainer {
|
|
121 |
}
|
122 |
|
123 |
/**
|
124 |
-
* @return
|
125 |
*/
|
126 |
public function getIsActive() {
|
127 |
-
return $this->is_active;
|
128 |
}
|
129 |
}
|
130 |
|
@@ -303,7 +303,7 @@ class ShopgateItem extends ShopgateContainer {
|
|
303 |
}
|
304 |
|
305 |
/**
|
306 |
-
* @param
|
307 |
*/
|
308 |
public function setIsFreeShipping($value) {
|
309 |
$this->is_free_shipping = $value;
|
@@ -373,7 +373,7 @@ class ShopgateItem extends ShopgateContainer {
|
|
373 |
}
|
374 |
|
375 |
/**
|
376 |
-
* @param
|
377 |
*/
|
378 |
public function setUseStock($value) {
|
379 |
$this->use_stock = $value;
|
@@ -387,7 +387,7 @@ class ShopgateItem extends ShopgateContainer {
|
|
387 |
}
|
388 |
|
389 |
/**
|
390 |
-
* @param
|
391 |
*/
|
392 |
public function setIsHighlight($value) {
|
393 |
$this->is_highlight = $value;
|
@@ -401,7 +401,7 @@ class ShopgateItem extends ShopgateContainer {
|
|
401 |
}
|
402 |
|
403 |
/**
|
404 |
-
* @param
|
405 |
*/
|
406 |
public function setIsAvailable($value) {
|
407 |
$this->is_available = $value;
|
@@ -415,7 +415,7 @@ class ShopgateItem extends ShopgateContainer {
|
|
415 |
}
|
416 |
|
417 |
/**
|
418 |
-
* @param
|
419 |
*/
|
420 |
public function setHasImage($value) {
|
421 |
$this->has_image = $value;
|
@@ -429,28 +429,28 @@ class ShopgateItem extends ShopgateContainer {
|
|
429 |
}
|
430 |
|
431 |
/**
|
432 |
-
* @param
|
433 |
*/
|
434 |
public function setIsNotOrderable($value) {
|
435 |
$this->is_not_orderable = $value;
|
436 |
}
|
437 |
|
438 |
/**
|
439 |
-
* @param
|
440 |
*/
|
441 |
public function setIsMarketplace($value) {
|
442 |
$this->is_marketplace = $value;
|
443 |
}
|
444 |
|
445 |
/**
|
446 |
-
* @param
|
447 |
*/
|
448 |
public function setIsActive($value) {
|
449 |
$this->is_active = $value;
|
450 |
}
|
451 |
|
452 |
/**
|
453 |
-
* @param
|
454 |
*/
|
455 |
public function setIsAutoUpdate($value) {
|
456 |
$this->is_auto_update = $value;
|
@@ -716,7 +716,7 @@ class ShopgateItem extends ShopgateContainer {
|
|
716 |
}
|
717 |
|
718 |
/**
|
719 |
-
* @return
|
720 |
*/
|
721 |
public function getIsFreeShipping() {
|
722 |
return $this->is_free_shipping;
|
@@ -786,10 +786,10 @@ class ShopgateItem extends ShopgateContainer {
|
|
786 |
}
|
787 |
|
788 |
/**
|
789 |
-
* @return
|
790 |
*/
|
791 |
public function getUseStock() {
|
792 |
-
return $this->use_stock;
|
793 |
}
|
794 |
|
795 |
/**
|
@@ -800,10 +800,10 @@ class ShopgateItem extends ShopgateContainer {
|
|
800 |
}
|
801 |
|
802 |
/**
|
803 |
-
* @return
|
804 |
*/
|
805 |
public function getIsHighlight() {
|
806 |
-
return $this->is_highlight;
|
807 |
}
|
808 |
|
809 |
/**
|
@@ -814,10 +814,10 @@ class ShopgateItem extends ShopgateContainer {
|
|
814 |
}
|
815 |
|
816 |
/**
|
817 |
-
* @return
|
818 |
*/
|
819 |
public function getIsAvailable() {
|
820 |
-
return $this->is_available;
|
821 |
}
|
822 |
|
823 |
/**
|
@@ -828,10 +828,10 @@ class ShopgateItem extends ShopgateContainer {
|
|
828 |
}
|
829 |
|
830 |
/**
|
831 |
-
* @return
|
832 |
*/
|
833 |
public function getHasImage() {
|
834 |
-
return $this->has_image;
|
835 |
}
|
836 |
|
837 |
/**
|
@@ -842,31 +842,31 @@ class ShopgateItem extends ShopgateContainer {
|
|
842 |
}
|
843 |
|
844 |
/**
|
845 |
-
* @return
|
846 |
*/
|
847 |
public function getIsNotOrderable() {
|
848 |
-
return (
|
849 |
}
|
850 |
|
851 |
/**
|
852 |
-
* @return
|
853 |
*/
|
854 |
public function getIsMarketplace() {
|
855 |
-
return $this->is_marketplace;
|
856 |
}
|
857 |
|
858 |
/**
|
859 |
-
* @return
|
860 |
*/
|
861 |
public function getIsActive() {
|
862 |
-
return $this->is_active;
|
863 |
}
|
864 |
|
865 |
/**
|
866 |
-
* @return
|
867 |
*/
|
868 |
public function getIsAutoUpdate() {
|
869 |
-
return $this->is_auto_update;
|
870 |
}
|
871 |
|
872 |
/**
|
@@ -1211,7 +1211,7 @@ class ShopgateItemInput extends ShopgateContainer {
|
|
1211 |
}
|
1212 |
|
1213 |
/**
|
1214 |
-
* @param
|
1215 |
*/
|
1216 |
public function setIsRequired($value) {
|
1217 |
$this->is_required = $value;
|
@@ -1258,10 +1258,10 @@ class ShopgateItemInput extends ShopgateContainer {
|
|
1258 |
}
|
1259 |
|
1260 |
/**
|
1261 |
-
* @return
|
1262 |
*/
|
1263 |
public function getIsRequired() {
|
1264 |
-
return $this->is_required;
|
1265 |
}
|
1266 |
|
1267 |
public function accept(ShopgateContainerVisitor $v) {
|
74 |
}
|
75 |
|
76 |
/**
|
77 |
+
* @param int $value
|
78 |
*/
|
79 |
public function setIsActive($value) {
|
80 |
$this->is_active = $value;
|
121 |
}
|
122 |
|
123 |
/**
|
124 |
+
* @return int
|
125 |
*/
|
126 |
public function getIsActive() {
|
127 |
+
return (int)$this->is_active;
|
128 |
}
|
129 |
}
|
130 |
|
303 |
}
|
304 |
|
305 |
/**
|
306 |
+
* @param int $value
|
307 |
*/
|
308 |
public function setIsFreeShipping($value) {
|
309 |
$this->is_free_shipping = $value;
|
373 |
}
|
374 |
|
375 |
/**
|
376 |
+
* @param int $value
|
377 |
*/
|
378 |
public function setUseStock($value) {
|
379 |
$this->use_stock = $value;
|
387 |
}
|
388 |
|
389 |
/**
|
390 |
+
* @param int $value
|
391 |
*/
|
392 |
public function setIsHighlight($value) {
|
393 |
$this->is_highlight = $value;
|
401 |
}
|
402 |
|
403 |
/**
|
404 |
+
* @param int $value
|
405 |
*/
|
406 |
public function setIsAvailable($value) {
|
407 |
$this->is_available = $value;
|
415 |
}
|
416 |
|
417 |
/**
|
418 |
+
* @param int $value
|
419 |
*/
|
420 |
public function setHasImage($value) {
|
421 |
$this->has_image = $value;
|
429 |
}
|
430 |
|
431 |
/**
|
432 |
+
* @param int $value
|
433 |
*/
|
434 |
public function setIsNotOrderable($value) {
|
435 |
$this->is_not_orderable = $value;
|
436 |
}
|
437 |
|
438 |
/**
|
439 |
+
* @param int $value
|
440 |
*/
|
441 |
public function setIsMarketplace($value) {
|
442 |
$this->is_marketplace = $value;
|
443 |
}
|
444 |
|
445 |
/**
|
446 |
+
* @param int $value
|
447 |
*/
|
448 |
public function setIsActive($value) {
|
449 |
$this->is_active = $value;
|
450 |
}
|
451 |
|
452 |
/**
|
453 |
+
* @param int $value
|
454 |
*/
|
455 |
public function setIsAutoUpdate($value) {
|
456 |
$this->is_auto_update = $value;
|
716 |
}
|
717 |
|
718 |
/**
|
719 |
+
* @return int
|
720 |
*/
|
721 |
public function getIsFreeShipping() {
|
722 |
return $this->is_free_shipping;
|
786 |
}
|
787 |
|
788 |
/**
|
789 |
+
* @return int
|
790 |
*/
|
791 |
public function getUseStock() {
|
792 |
+
return (int)$this->use_stock;
|
793 |
}
|
794 |
|
795 |
/**
|
800 |
}
|
801 |
|
802 |
/**
|
803 |
+
* @return int
|
804 |
*/
|
805 |
public function getIsHighlight() {
|
806 |
+
return (int)$this->is_highlight;
|
807 |
}
|
808 |
|
809 |
/**
|
814 |
}
|
815 |
|
816 |
/**
|
817 |
+
* @return int
|
818 |
*/
|
819 |
public function getIsAvailable() {
|
820 |
+
return (int)$this->is_available;
|
821 |
}
|
822 |
|
823 |
/**
|
828 |
}
|
829 |
|
830 |
/**
|
831 |
+
* @return int
|
832 |
*/
|
833 |
public function getHasImage() {
|
834 |
+
return (int)$this->has_image;
|
835 |
}
|
836 |
|
837 |
/**
|
842 |
}
|
843 |
|
844 |
/**
|
845 |
+
* @return int
|
846 |
*/
|
847 |
public function getIsNotOrderable() {
|
848 |
+
return (int)$this->is_not_orderable;
|
849 |
}
|
850 |
|
851 |
/**
|
852 |
+
* @return int
|
853 |
*/
|
854 |
public function getIsMarketplace() {
|
855 |
+
return (int)$this->is_marketplace;
|
856 |
}
|
857 |
|
858 |
/**
|
859 |
+
* @return int
|
860 |
*/
|
861 |
public function getIsActive() {
|
862 |
+
return (int)$this->is_active;
|
863 |
}
|
864 |
|
865 |
/**
|
866 |
+
* @return int
|
867 |
*/
|
868 |
public function getIsAutoUpdate() {
|
869 |
+
return (int)$this->is_auto_update;
|
870 |
}
|
871 |
|
872 |
/**
|
1211 |
}
|
1212 |
|
1213 |
/**
|
1214 |
+
* @param int $value
|
1215 |
*/
|
1216 |
public function setIsRequired($value) {
|
1217 |
$this->is_required = $value;
|
1258 |
}
|
1259 |
|
1260 |
/**
|
1261 |
+
* @return int
|
1262 |
*/
|
1263 |
public function getIsRequired() {
|
1264 |
+
return (int)$this->is_required;
|
1265 |
}
|
1266 |
|
1267 |
public function accept(ShopgateContainerVisitor $v) {
|
lib/Shopgate/classes/orders.php
CHANGED
@@ -181,6 +181,7 @@ abstract class ShopgateCartBase extends ShopgateContainer {
|
|
181 |
const AMAZON_PAYMENT = "MWS";
|
182 |
|
183 |
protected $customer_number;
|
|
|
184 |
|
185 |
protected $external_order_number;
|
186 |
protected $external_order_id;
|
@@ -229,6 +230,13 @@ abstract class ShopgateCartBase extends ShopgateContainer {
|
|
229 |
$this->customer_number = $value;
|
230 |
}
|
231 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
232 |
/**
|
233 |
* @param string $value
|
234 |
*/
|
@@ -532,6 +540,13 @@ abstract class ShopgateCartBase extends ShopgateContainer {
|
|
532 |
return $this->customer_number;
|
533 |
}
|
534 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
535 |
/**
|
536 |
* @return string
|
537 |
*/
|
@@ -754,8 +769,8 @@ class ShopgateOrder extends ShopgateCartBase {
|
|
754 |
protected $is_storno;
|
755 |
protected $is_customer_invoice_blocked;
|
756 |
|
757 |
-
protected $update_shipping =
|
758 |
-
protected $update_payment =
|
759 |
|
760 |
protected $delivery_notes = array();
|
761 |
protected $tracking_get_parameters = array();
|
@@ -793,7 +808,7 @@ class ShopgateOrder extends ShopgateCartBase {
|
|
793 |
}
|
794 |
|
795 |
/**
|
796 |
-
* @param
|
797 |
*/
|
798 |
public function setIsPaid($value) {
|
799 |
$this->is_paid = $value;
|
@@ -826,14 +841,14 @@ class ShopgateOrder extends ShopgateCartBase {
|
|
826 |
}
|
827 |
|
828 |
/**
|
829 |
-
* @param
|
830 |
*/
|
831 |
public function setIsShippingBlocked($value) {
|
832 |
$this->is_shipping_blocked = $value;
|
833 |
}
|
834 |
|
835 |
/**
|
836 |
-
* @param
|
837 |
*/
|
838 |
public function setIsShippingCompleted($value) {
|
839 |
$this->is_shipping_completed = $value;
|
@@ -857,35 +872,35 @@ class ShopgateOrder extends ShopgateCartBase {
|
|
857 |
}
|
858 |
|
859 |
/**
|
860 |
-
* @param
|
861 |
*/
|
862 |
public function setIsTest($value) {
|
863 |
$this->is_test = $value;
|
864 |
}
|
865 |
|
866 |
/**
|
867 |
-
* @param
|
868 |
*/
|
869 |
public function setIsStorno($value) {
|
870 |
$this->is_storno = $value;
|
871 |
}
|
872 |
|
873 |
/**
|
874 |
-
* @param
|
875 |
*/
|
876 |
public function setIsCustomerInvoiceBlocked($value) {
|
877 |
$this->is_customer_invoice_blocked = $value;
|
878 |
}
|
879 |
|
880 |
/**
|
881 |
-
* @param
|
882 |
*/
|
883 |
public function setUpdatePayment($value) {
|
884 |
$this->update_payment = $value;
|
885 |
}
|
886 |
|
887 |
/**
|
888 |
-
* @param
|
889 |
*/
|
890 |
public function setUpdateShipping($value) {
|
891 |
$this->update_shipping = $value;
|
@@ -980,10 +995,10 @@ class ShopgateOrder extends ShopgateCartBase {
|
|
980 |
}
|
981 |
|
982 |
/**
|
983 |
-
* @return
|
984 |
*/
|
985 |
public function getIsPaid() {
|
986 |
-
return (
|
987 |
}
|
988 |
|
989 |
/**
|
@@ -1019,17 +1034,17 @@ class ShopgateOrder extends ShopgateCartBase {
|
|
1019 |
}
|
1020 |
|
1021 |
/**
|
1022 |
-
* @return
|
1023 |
*/
|
1024 |
public function getIsShippingBlocked() {
|
1025 |
-
return (
|
1026 |
}
|
1027 |
|
1028 |
/**
|
1029 |
-
* @return
|
1030 |
*/
|
1031 |
public function getIsShippingCompleted() {
|
1032 |
-
return (
|
1033 |
}
|
1034 |
|
1035 |
/**
|
@@ -1058,39 +1073,39 @@ class ShopgateOrder extends ShopgateCartBase {
|
|
1058 |
}
|
1059 |
|
1060 |
/**
|
1061 |
-
* @return
|
1062 |
*/
|
1063 |
public function getIsTest() {
|
1064 |
-
return (
|
1065 |
}
|
1066 |
|
1067 |
|
1068 |
/**
|
1069 |
-
* @return
|
1070 |
*/
|
1071 |
public function getIsStorno() {
|
1072 |
-
return (
|
1073 |
}
|
1074 |
|
1075 |
/**
|
1076 |
-
* @return
|
1077 |
*/
|
1078 |
public function getIsCustomerInvoiceBlocked() {
|
1079 |
-
return (
|
1080 |
}
|
1081 |
|
1082 |
/**
|
1083 |
-
* @return
|
1084 |
*/
|
1085 |
public function getUpdatePayment() {
|
1086 |
-
return (
|
1087 |
}
|
1088 |
|
1089 |
/**
|
1090 |
-
* @return
|
1091 |
*/
|
1092 |
public function getUpdateShipping() {
|
1093 |
-
return (
|
1094 |
}
|
1095 |
|
1096 |
/**
|
@@ -2085,7 +2100,7 @@ abstract class ShopgateCoupon extends ShopgateContainer {
|
|
2085 |
}
|
2086 |
|
2087 |
/**
|
2088 |
-
* @param
|
2089 |
*/
|
2090 |
public function setIsFreeShipping($value) {
|
2091 |
$this->is_free_shipping = $value;
|
@@ -2168,7 +2183,7 @@ abstract class ShopgateCoupon extends ShopgateContainer {
|
|
2168 |
}
|
2169 |
|
2170 |
/**
|
2171 |
-
* @return
|
2172 |
*/
|
2173 |
public function getIsFreeShipping() {
|
2174 |
return $this->is_free_shipping;
|
@@ -2627,7 +2642,7 @@ class ShopgateCartItem extends ShopgateContainer {
|
|
2627 |
}
|
2628 |
|
2629 |
/**
|
2630 |
-
* @param
|
2631 |
*/
|
2632 |
public function setIsBuyable($value) {
|
2633 |
$this->is_buyable = $value;
|
@@ -2765,10 +2780,10 @@ class ShopgateCartItem extends ShopgateContainer {
|
|
2765 |
}
|
2766 |
|
2767 |
/**
|
2768 |
-
* @return
|
2769 |
*/
|
2770 |
public function getIsBuyable() {
|
2771 |
-
return $this->is_buyable;
|
2772 |
}
|
2773 |
|
2774 |
/**
|
181 |
const AMAZON_PAYMENT = "MWS";
|
182 |
|
183 |
protected $customer_number;
|
184 |
+
protected $customer_ip;
|
185 |
|
186 |
protected $external_order_number;
|
187 |
protected $external_order_id;
|
230 |
$this->customer_number = $value;
|
231 |
}
|
232 |
|
233 |
+
/**
|
234 |
+
* @param $ip - ip of the customer
|
235 |
+
*/
|
236 |
+
public function setCustomerIp($ip) {
|
237 |
+
$this->customer_ip = $ip;
|
238 |
+
}
|
239 |
+
|
240 |
/**
|
241 |
* @param string $value
|
242 |
*/
|
540 |
return $this->customer_number;
|
541 |
}
|
542 |
|
543 |
+
/**
|
544 |
+
* @return string|null
|
545 |
+
*/
|
546 |
+
public function getCustomerIp() {
|
547 |
+
return $this->customer_ip;
|
548 |
+
}
|
549 |
+
|
550 |
/**
|
551 |
* @return string
|
552 |
*/
|
769 |
protected $is_storno;
|
770 |
protected $is_customer_invoice_blocked;
|
771 |
|
772 |
+
protected $update_shipping = 0;
|
773 |
+
protected $update_payment = 0;
|
774 |
|
775 |
protected $delivery_notes = array();
|
776 |
protected $tracking_get_parameters = array();
|
808 |
}
|
809 |
|
810 |
/**
|
811 |
+
* @param int $value
|
812 |
*/
|
813 |
public function setIsPaid($value) {
|
814 |
$this->is_paid = $value;
|
841 |
}
|
842 |
|
843 |
/**
|
844 |
+
* @param int $value
|
845 |
*/
|
846 |
public function setIsShippingBlocked($value) {
|
847 |
$this->is_shipping_blocked = $value;
|
848 |
}
|
849 |
|
850 |
/**
|
851 |
+
* @param int $value
|
852 |
*/
|
853 |
public function setIsShippingCompleted($value) {
|
854 |
$this->is_shipping_completed = $value;
|
872 |
}
|
873 |
|
874 |
/**
|
875 |
+
* @param int $value
|
876 |
*/
|
877 |
public function setIsTest($value) {
|
878 |
$this->is_test = $value;
|
879 |
}
|
880 |
|
881 |
/**
|
882 |
+
* @param int $value
|
883 |
*/
|
884 |
public function setIsStorno($value) {
|
885 |
$this->is_storno = $value;
|
886 |
}
|
887 |
|
888 |
/**
|
889 |
+
* @param int $value
|
890 |
*/
|
891 |
public function setIsCustomerInvoiceBlocked($value) {
|
892 |
$this->is_customer_invoice_blocked = $value;
|
893 |
}
|
894 |
|
895 |
/**
|
896 |
+
* @param int $value
|
897 |
*/
|
898 |
public function setUpdatePayment($value) {
|
899 |
$this->update_payment = $value;
|
900 |
}
|
901 |
|
902 |
/**
|
903 |
+
* @param int $value
|
904 |
*/
|
905 |
public function setUpdateShipping($value) {
|
906 |
$this->update_shipping = $value;
|
995 |
}
|
996 |
|
997 |
/**
|
998 |
+
* @return int
|
999 |
*/
|
1000 |
public function getIsPaid() {
|
1001 |
+
return (int)$this->is_paid;
|
1002 |
}
|
1003 |
|
1004 |
/**
|
1034 |
}
|
1035 |
|
1036 |
/**
|
1037 |
+
* @return int
|
1038 |
*/
|
1039 |
public function getIsShippingBlocked() {
|
1040 |
+
return (int)$this->is_shipping_blocked;
|
1041 |
}
|
1042 |
|
1043 |
/**
|
1044 |
+
* @return int
|
1045 |
*/
|
1046 |
public function getIsShippingCompleted() {
|
1047 |
+
return (int)$this->is_shipping_completed;
|
1048 |
}
|
1049 |
|
1050 |
/**
|
1073 |
}
|
1074 |
|
1075 |
/**
|
1076 |
+
* @return int
|
1077 |
*/
|
1078 |
public function getIsTest() {
|
1079 |
+
return (int)$this->is_test;
|
1080 |
}
|
1081 |
|
1082 |
|
1083 |
/**
|
1084 |
+
* @return int
|
1085 |
*/
|
1086 |
public function getIsStorno() {
|
1087 |
+
return (int)$this->is_storno;
|
1088 |
}
|
1089 |
|
1090 |
/**
|
1091 |
+
* @return int
|
1092 |
*/
|
1093 |
public function getIsCustomerInvoiceBlocked() {
|
1094 |
+
return (int)$this->is_customer_invoice_blocked;
|
1095 |
}
|
1096 |
|
1097 |
/**
|
1098 |
+
* @return int
|
1099 |
*/
|
1100 |
public function getUpdatePayment() {
|
1101 |
+
return (int)$this->update_payment;
|
1102 |
}
|
1103 |
|
1104 |
/**
|
1105 |
+
* @return int
|
1106 |
*/
|
1107 |
public function getUpdateShipping() {
|
1108 |
+
return (int)$this->update_shipping;
|
1109 |
}
|
1110 |
|
1111 |
/**
|
2100 |
}
|
2101 |
|
2102 |
/**
|
2103 |
+
* @param int $value
|
2104 |
*/
|
2105 |
public function setIsFreeShipping($value) {
|
2106 |
$this->is_free_shipping = $value;
|
2183 |
}
|
2184 |
|
2185 |
/**
|
2186 |
+
* @return int
|
2187 |
*/
|
2188 |
public function getIsFreeShipping() {
|
2189 |
return $this->is_free_shipping;
|
2642 |
}
|
2643 |
|
2644 |
/**
|
2645 |
+
* @param int $value
|
2646 |
*/
|
2647 |
public function setIsBuyable($value) {
|
2648 |
$this->is_buyable = $value;
|
2780 |
}
|
2781 |
|
2782 |
/**
|
2783 |
+
* @return int
|
2784 |
*/
|
2785 |
public function getIsBuyable() {
|
2786 |
+
return (int)$this->is_buyable;
|
2787 |
}
|
2788 |
|
2789 |
/**
|
lib/Shopgate/tests/classes/helper/redirect/TemplateParserTest.php
ADDED
@@ -0,0 +1,137 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Shopgate GmbH
|
5 |
+
*
|
6 |
+
* URHEBERRECHTSHINWEIS
|
7 |
+
*
|
8 |
+
* Dieses Plugin ist urheberrechtlich geschützt. Es darf ausschließlich von Kunden der Shopgate GmbH
|
9 |
+
* zum Zwecke der eigenen Kommunikation zwischen dem IT-System des Kunden mit dem IT-System der
|
10 |
+
* Shopgate GmbH über www.shopgate.com verwendet werden. Eine darüber hinausgehende Vervielfältigung, Verbreitung,
|
11 |
+
* öffentliche Zugänglichmachung, Bearbeitung oder Weitergabe an Dritte ist nur mit unserer vorherigen
|
12 |
+
* schriftlichen Zustimmung zulässig. Die Regelungen der §§ 69 d Abs. 2, 3 und 69 e UrhG bleiben hiervon unberührt.
|
13 |
+
*
|
14 |
+
* COPYRIGHT NOTICE
|
15 |
+
*
|
16 |
+
* This plugin is the subject of copyright protection. It is only for the use of Shopgate GmbH customers,
|
17 |
+
* for the purpose of facilitating communication between the IT system of the customer and the IT system
|
18 |
+
* of Shopgate GmbH via www.shopgate.com. Any reproduction, dissemination, public propagation, processing or
|
19 |
+
* transfer to third parties is only permitted where we previously consented thereto in writing. The provisions
|
20 |
+
* of paragraph 69 d, sub-paragraphs 2, 3 and paragraph 69, sub-paragraph e of the German Copyright Act shall remain unaffected.
|
21 |
+
*
|
22 |
+
* @author Shopgate GmbH <interfaces@shopgate.com>
|
23 |
+
* @author Konstantin Kiritsenko <konstantin.kiritsenko@shopgate.com>
|
24 |
+
* @group Shopgate_Library
|
25 |
+
* @group Shopgate_Library_Helpers
|
26 |
+
*
|
27 |
+
* @coversDefaultClass Shopgate_Helper_Redirect_TemplateParser
|
28 |
+
*/
|
29 |
+
class Shopgate_Helper_Redirect_TemplateParserTest extends PHPUnit_Framework_TestCase
|
30 |
+
{
|
31 |
+
/** @var Shopgate_Helper_Redirect_TemplateParser $class */
|
32 |
+
protected $class;
|
33 |
+
|
34 |
+
public function setUp()
|
35 |
+
{
|
36 |
+
$this->class = new Shopgate_Helper_Redirect_TemplateParser();
|
37 |
+
}
|
38 |
+
|
39 |
+
/**
|
40 |
+
* Tests the most basic regex check, export {variable} name
|
41 |
+
*
|
42 |
+
* @uses Shopgate_Model_Redirect_HtmlTagVariable::getData
|
43 |
+
*
|
44 |
+
* @covers ::getVariables
|
45 |
+
*/
|
46 |
+
public function testGetVariablesSimple()
|
47 |
+
{
|
48 |
+
$input = '_shopgate.shop_number = "{shop_number}";';
|
49 |
+
$expected = $this->initVariable('shop_number');
|
50 |
+
$variables = $this->class->getVariables($input);
|
51 |
+
$returned = array_shift($variables);
|
52 |
+
|
53 |
+
$this->assertEquals($returned->getData(), $expected->getData());
|
54 |
+
}
|
55 |
+
|
56 |
+
/**
|
57 |
+
* Testing the more complex variable setter
|
58 |
+
*
|
59 |
+
* @uses Shopgate_Model_Redirect_HtmlTagVariable::getData
|
60 |
+
*
|
61 |
+
* @covers ::getVariables
|
62 |
+
*/
|
63 |
+
public function testGetVariablesColon()
|
64 |
+
{
|
65 |
+
$input = '{baseUrl}/brand?q={brand_name:urlencoded}';
|
66 |
+
$variables = $this->class->getVariables($input);
|
67 |
+
|
68 |
+
$expectedOne = $this->initVariable('baseUrl');
|
69 |
+
$returnedOne = array_shift($variables);
|
70 |
+
|
71 |
+
$expectedTwo = $this->initVariable('brand_name', 'urlencoded');
|
72 |
+
$returnedTwo = array_shift($variables);
|
73 |
+
|
74 |
+
$this->assertEquals($returnedOne->getData(), $expectedOne->getData());
|
75 |
+
$this->assertEquals($returnedTwo->getData(), $expectedTwo->getData());
|
76 |
+
}
|
77 |
+
|
78 |
+
/**
|
79 |
+
* Simple empty array return check
|
80 |
+
*
|
81 |
+
* @covers ::getVariables
|
82 |
+
*/
|
83 |
+
public function testEmpty()
|
84 |
+
{
|
85 |
+
$variables = $this->class->getVariables('test string');
|
86 |
+
|
87 |
+
$this->assertEmpty($variables);
|
88 |
+
|
89 |
+
}
|
90 |
+
|
91 |
+
/**
|
92 |
+
* Multi-line template test
|
93 |
+
*
|
94 |
+
* @covers ::getVariables
|
95 |
+
*/
|
96 |
+
public function testGetVariableMultiline()
|
97 |
+
{
|
98 |
+
$template = '{link_tags}
|
99 |
+
<script type="text/javascript">
|
100 |
+
_shopgate.shop_number = "{shop_number}";
|
101 |
+
_shopgate.redirect = "{redirect_code}";
|
102 |
+
_shopgate.host = (("https:" == document.location.protocol) ? "{ssl_url}" : "{non_ssl_url}");
|
103 |
+
</script>
|
104 |
+
<!-- END SHOPGATE -->';
|
105 |
+
$variables = $this->class->getVariables($template);
|
106 |
+
|
107 |
+
$this->assertCount(5, $variables);
|
108 |
+
}
|
109 |
+
|
110 |
+
/**
|
111 |
+
* Helps initializing the variable model
|
112 |
+
*
|
113 |
+
* @param string $name - name to set
|
114 |
+
* @param string $function - function name to set
|
115 |
+
*
|
116 |
+
* @return Shopgate_Model_Redirect_HtmlTagVariable
|
117 |
+
*/
|
118 |
+
private function initVariable($name, $function = '')
|
119 |
+
{
|
120 |
+
$expected = new Shopgate_Model_Redirect_HtmlTagVariable();
|
121 |
+
$expected->setName($name);
|
122 |
+
|
123 |
+
if ($function) {
|
124 |
+
$expected->setFunctionName($function);
|
125 |
+
}
|
126 |
+
|
127 |
+
return $expected;
|
128 |
+
}
|
129 |
+
|
130 |
+
/**
|
131 |
+
* Prep for garbage collect
|
132 |
+
*/
|
133 |
+
public function tearDown()
|
134 |
+
{
|
135 |
+
unset($this->class);
|
136 |
+
}
|
137 |
+
}
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>shopgate_module</name>
|
4 |
-
<version>2.9.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://wiki.shopgate.com/Magento/de">Shopgate Plugin</license>
|
7 |
<channel>community</channel>
|
@@ -10,9 +10,9 @@
|
|
10 |
<description>Shopgate Plugin</description>
|
11 |
<notes>Shopgate Modul</notes>
|
12 |
<authors><author><name>Peter Liebig</name><user>Shopgate</user><email>p.liebig@me.com</email></author><author><name>Stephan Recknagel</name><user>Shopgate</user><email>mail@recknagel.io</email></author><author><name>André Kraus</name><user>Shopgate</user><email>andre.kraus83@googlemail.com</email></author></authors>
|
13 |
-
<date>
|
14 |
-
<time>15:
|
15 |
-
<contents><target name="mageetc"><dir name="modules"><file name="Shopgate_Framework.xml" hash="3fb114204bd038da711122083876f161"/></dir></target><target name="magecommunity"><dir name="Shopgate"><dir name="Framework"><dir name="Block"><dir name="Adminhtml"><dir name="OAuth"><dir name="Config"><file name="Connector.php" hash="890d04b08bf692c12b02f29abf813f83"/></dir><dir name="Connect"><dir name="Add"><file name="Form.php" hash="45685099b41a46919a9900d22c30b711"/></dir><file name="Info.php" hash="ee7bbc837bf3f298791b8496f2d6d565"/><file name="Overlay.php" hash="a6496896dccb5898b36e3e65585650f4"/></dir><file name="Connect.php" hash="cc7e43ba447b6338f6c50ccaa5fd073a"/><file name="Data.php" hash="1903e819d5d16abba4c37d7823909260"/><file name="Disconnect.php" hash="2545e56bca73577ba5f73fce0501624a"/><dir name="Manage"><file name="Grid.php" hash="78357b78fed0e8b3535a7e505c8f6425"/></dir><file name="Manage.php" hash="a99e12333f7c27771ca42a0764108639"/></dir></dir><file name="Info.php" hash="3dd73900370546289a6033942a0c0528"/><dir name="Payment"><file name="MobilePayment.php" hash="7de8af7ec46e107c46a73efaf2a02034"/><file name="Shopgate.php" hash="67af406fa04da70461b3580b8adea89d"/></dir><dir name="Totals"><file name="AbstractPaymentFee.php" hash="5e36647f536d1c6daba33cd6e0a5e302"/><file name="CreditmemoPaymentFee.php" hash="4a287f54554d8d45772db386f54a45e7"/><file name="InvoicePaymentFee.php" hash="818164536fe249016af3046aef73f181"/><file name="OrderPaymentFee.php" hash="55c8f62c4da8014c99414ece9cd125c4"/></dir><file name="Version.php" hash="2f45712bb20635ac17d8bdee213819e5"/></dir><dir name="Helper"><dir name="Billsafe"><file name="Order.php" hash="474c2aa15f352224c11c8ab17e921c9d"/></dir><file name="Config.php" hash="b0e489659332274686965e5e8d200d88"/><file name="Coupon.php" hash="519697b13040ddfbc8f460b6034c8779"/><file name="Customer.php" hash="c68047909c0c6e14977336ab6afe2f6b"/><file name="Data.php" hash="bf2db8a0a2c145cdb50f891f6d45ba85"/><file name="Debug.php" hash="82c85038046fc9b2f994df18b7f202a6"/><file name="Export.php" hash="02c5dbce181e7489b5d75b20c1584aab"/><dir name="Import"><file name="Order.php" hash="e40ed484faf6f9757bee1970bafaed30"/></dir><file name="Install.php" hash="57f42693c9a6ddb18b8a25a2a5da7cf8"/><dir name="Payment"><file name="Abstract.php" hash="207f16aab8224761b7d91802b9fb10ee"/><file name="Payone.php" hash="ddced5955ff55105d8b3c91e0fcb0778"/><file name="Wspp.php" hash="4214f1d3332cd189cee3df48108ebd8d"/></dir><file name="Sales.php" hash="a5dfa9e90343a4da4e0791f62b802484"/></dir><dir name="Model"><dir name="Carrier"><file name="Fix.php" hash="31ccd9b4c8ac725e5b2c1dcee096dea8"/></dir><dir name="Cataloginventory"><file name="Stock.php" hash="42ffccc3d644f8b04358a3e76bda32dd"/></dir><dir name="Compiler"><file name="Process.php" hash="740452b7bc234417788db1f1ee892ef5"/></dir><file name="Config.php" hash="974cb3cdaef40d3b82ca6ae86f55bf58"/><file name="Customer.php" hash="97ed53ca3f69c7a24fb40cce11f58721"/><dir name="DreamRobot"><file name="Observer.php" hash="7b4e8922a46f5974b8edf359c632a9d3"/></dir><dir name="Export"><file name="Abstract.php" hash="9e86667845e8cebd8e0ccb8879b70b6d"/><dir name="Category"><file name="Csv.php" hash="72f4f58345d95f8f621783bedf2a092e"/><file name="Xml.php" hash="12ab046b9a000636ed4ed5eefb770af2"/></dir><file name="Category.php" hash="5a41141ecec85669674ec818c4661cdc"/><dir name="Customer"><file name="Orders.php" hash="30123a6fe3e391fca911fed042b256c8"/></dir><file name="Customer.php" hash="2711476c9538a22242d1511649ec77f1"/><dir name="Product"><file name="Csv.php" hash="50cd5a66e8034f3584140f91b56fe03d"/><file name="Xml.php" hash="5fd5e1326f0ab8ba8dbf78c9884a38d6"/></dir><file name="Product.php" hash="d9c807df57af3f1cced2d9bb433338ec"/><dir name="Review"><file name="Csv.php" hash="5c72f802a2de256ca1ec8dab1b75b291"/><file name="Xml.php" hash="bc16f60d9ed20705422921955a5071fe"/></dir><file name="Review.php" hash="ad6f548035a30da642d2459354acbb40"/><file name="Settings.php" hash="960f3d9991ecca41bd9e8b4ba632e9ea"/></dir><file name="Feed.php" hash="fb99cd7b2b3d94908848b722df666b67"/><dir name="Mobile"><file name="Redirect.php" hash="1721d0372eee3d8d80b5af8629dbf1b9"/></dir><dir name="Mysql4"><dir name="Core"><file name="Core.php" hash="fc129d4d929f83e8389367b9c5d6d5e1"/></dir><dir name="Customer"><file name="Collection.php" hash="89d31997abc3c2145f74e02dd5456a7c"/></dir><file name="Customer.php" hash="d5f460b2d5bfa87b8368a8a6c6b51115"/><file name="Product.php" hash="6a99b3d0de44dfbd132ce9caca19034e"/><dir name="Shopgate"><dir name="Order"><file name="Collection.php" hash="e180ba816be47239828bea65cd5f8445"/></dir><file name="Order.php" hash="c297847e39ad01307dba4a69c13445f2"/></dir></dir><file name="Observer.php" hash="c0437e883a28cf8c67ab67517d0788f3"/><dir name="Payment"><dir name="Abstract"><file name="AbstractPayol.php" hash="0228e80536a7decbbc0a883a4bde0d0d"/></dir><file name="Abstract.php" hash="873534555f767d24d1b0ab378267e8b9"/><file name="Amazon.php" hash="c90003246111cf066270015b41cb7ff9"/><file name="Authorize.php" hash="6f747fb258e59137cc5dadc179664246"/><file name="Billsafe.php" hash="1c97ec04356ae4ed25c1492a317eaaff"/><dir name="Cc"><file name="Abstract.php" hash="2b291ac14d9e1e3120416d6aeb4c3487"/><file name="Authn.php" hash="5c4c0d849d8d22dab1e6bf374dfc6c79"/><file name="AuthnAbstract.php" hash="59c3e39376e695ac161d228fc9a3fabf"/><dir name="Authncim"><file name="Gateway.php" hash="1f8df3fe0e50f4729bebfc1d4763b015"/><file name="Method.php" hash="aa6916548a71848ad7c83e4f053bc27e"/></dir><file name="Authncim.php" hash="89f1c2a0bb59d08c895da84c14c325ff"/><file name="Chargeitpro.php" hash="6fd3a2fd42df00831d6e363a23a414f1"/><file name="Usaepay.php" hash="00bd8969c1eceb13eacbb37ed9a1f714"/></dir><file name="Cc.php" hash="076a0faf0705c821c5479a2ec4a33c8d"/><file name="Express.php" hash="242b1fc3b238b907ac616680aa446401"/><file name="Factory.php" hash="212e33a78fc1e175d778347c4e4cffee"/><file name="Generic.php" hash="666f06186d1bb96b94af287d221e27c5"/><dir name="Ins"><file name="Payol.php" hash="b6961c4ab1fb9a95ab2d470aeaad8d29"/></dir><file name="Interface.php" hash="151002297bcce208b85bd260c7a25b47"/><dir name="Inv"><file name="Payol.php" hash="6d1c28b2ea2fb2fd63e09712f4533c77"/></dir><file name="MobilePayment.php" hash="59554c65e778831f6add450e0f846f42"/><dir name="Payone"><file name="Abstract.php" hash="e4538042b15ce2ba027a189ae2887861"/><file name="BankAbstract.php" hash="fa4ef2c918868001c5f1df97cb4bc400"/><file name="Cc.php" hash="11e68f50ea43bf73b31c53efea0cbc4d"/><file name="Dbt.php" hash="7f098887ba6f12669a18f62d7885de6d"/><file name="Gp.php" hash="7686149aedae93b0d5eef0b06fc08d7e"/><file name="Idl.php" hash="57d144744565ff644db917cab7ef689e"/><file name="Inv.php" hash="91d893ee5eacdc00ff8fbb3f1b750894"/><file name="Klv.php" hash="f82fb0cc874ea8f1121f282372e4e404"/><file name="Pp.php" hash="1165aa67ef8ccdc93a2eb0b7bf03f3d0"/><file name="Prp.php" hash="76079d7e154c3a982b1d117793942c3a"/><file name="Sue.php" hash="31280f2c8abf21f0a582b656fb0d38ad"/></dir><dir name="Pp"><file name="Abstract.php" hash="e6c5afcb0653d2ec3de3bd5d1442b355"/><file name="Wspp.php" hash="42ff0a5d004c82401277dbf00cd9e00f"/></dir><file name="Pp.php" hash="c521bbb32aed313c0170dd6e8361f934"/><dir name="Ppal"><file name="Plus.php" hash="a26adaab47adb3f3b84ff872673b4ed1"/></dir><file name="Router.php" hash="1df390aa58b64090fab972ba5993934b"/><file name="Shopgate.php" hash="f0d59e2a4369f7a22e47cf9c3bb9c44a"/><dir name="Simple"><file name="Billsafe.php" hash="d352d66d5101454f4cfec46e4fcaa88a"/><dir name="Cod"><file name="Abstract.php" hash="7bcb77e2906200f8a7576a24d782d541"/><file name="Msp.php" hash="da63e630e339f73b1047f9be2fc13a80"/><file name="Native.php" hash="a18abef66d98a08e988bafa1564dfaa2"/><file name="Phoenix107.php" hash="958990a7ec99a4c102b335e68db4f563"/><file name="Phoenix108.php" hash="912cb903da51a2056f03d75c566dbc7b"/></dir><file name="Cod.php" hash="0688749cd9110544d01e5c1130be3005"/><file name="Invoice.php" hash="a86d8500a0dee3056e56b0ccfb1fae3d"/><dir name="Mws"><file name="Abstract.php" hash="691b330380b702954526ef356088ed7f"/><file name="Mws.php" hash="e919cd10f5be16e404a2aac43211005b"/><file name="Mws15.php" hash="db272b23821ea5010fe0e19023b9ca81"/></dir><file name="Mws.php" hash="e19cdfee86d84d80a234138a5f86c5af"/><dir name="Paypal"><file name="Express.php" hash="e2d33dbc600503d9a7541ab53df60662"/><file name="Standard.php" hash="5281ddc90f8f560b6cffa2e97fe08304"/><file name="Standard1400.php" hash="d80d26e8189b12c9796929dfad77f6c8"/></dir><file name="Paypal.php" hash="03a7c4b8e193d262aa2dbd51cdac3ab8"/><dir name="Prepay"><file name="Abstract.php" hash="89767868690e40bc3d96f8bee4484880"/><file name="Checkmo.php" hash="781dd32522f7bc97c62313cb76429633"/><file name="Native.php" hash="48542e3e9ad2bafb504a200a6529eccc"/><file name="Phoenix.php" hash="7118e404d6f1755cdab35dbc2c8f058d"/></dir><file name="Prepay.php" hash="eb79f9f8469652e91b11fd5d714db84f"/><file name="Shopgate.php" hash="5fb1a053ac9b69e5d38bc9f6631ee8f1"/><dir name="Sue"><file name="Abstract.php" hash="d07d6b3a5702b458ed4e5f4574e3ced9"/><file name="Sue118.php" hash="759f4a7e103f9f9f4457aa1d0694c26d"/><file name="Sue300.php" hash="c804244222e5fe67ead8916c5c1ffef1"/></dir><file name="Sue.php" hash="6802dc052e2088957329689b003a16f8"/></dir><file name="Simple.php" hash="e4f0b3cd8282c2661cb19eabdb77d075"/><file name="Usaepay.php" hash="50e049e1cae29abbd7027cf842878540"/><file name="Wspp.php" hash="23b0420ff59dc0bfa7940bf0f07562fc"/></dir><dir name="Resource"><dir name="Core"><file name="Config.php" hash="0ee7969070ab0dddfdd3bb2cc404cd3c"/></dir><dir name="Customer"><file name="Collection.php" hash="2ddb7db1355100bc9e86f966f1d4612c"/></dir><file name="Customer.php" hash="69848842d4be07be4d66d700a7b6695b"/><file name="Product.php" hash="5c62ef4cfc3f0ebbbe5a9a46d1c25dfa"/><file name="Setup.php" hash="7b5cc0f99c857e9292638c1fbeb43969"/><dir name="Shopgate"><dir name="Connection"><file name="Collection.php" hash="f294d4239cee276b7e3c5e6e2109de66"/><dir name="Grid"><file name="Collection.php" hash="d499139d50dffbfe1b1e868b5aeeee0f"/></dir></dir><dir name="Order"><file name="Collection.php" hash="2c18a4ca248ca8719e7ead85f0c57619"/></dir><file name="Order.php" hash="1942eeb8268781c499f8cad384081b02"/></dir></dir><dir name="Sales"><dir name="Creditmemo"><dir name="Total"><file name="ShopgatePaymentFee.php" hash="614d1e96cd2c97e0fcd7db86ee3aad89"/></dir></dir><dir name="Invoice"><dir name="Total"><file name="ShopgatePaymentFee.php" hash="c4400832de32367067fd5396bcf7bfc8"/></dir></dir><dir name="Quote"><dir name="Address"><dir name="Total"><file name="ShopgatePaymentFee.php" hash="7a309b69fb20fb6fcae5f3b77f5b7ba9"/></dir></dir></dir></dir><dir name="Search"><dir name="Shopgate"><file name="Order.php" hash="94dcf366528641687b89ab0c9f973ef5"/></dir></dir><dir name="Shopgate"><dir name="Cart"><dir name="Validation"><dir name="Stock"><file name="Bundle.php" hash="7cc03239fbefe3a8e71755a178299944"/><file name="Simple.php" hash="9da9891d52c89e0772af5bcea7581ae8"/></dir><file name="Stock.php" hash="03d8139aa9840d707c8e4cb991bca20f"/></dir></dir><file name="Connection.php" hash="ff0da764d444103f5892ef21e23ba353"/><file name="Order.php" hash="89e0e425fc48282c1b46d3078b294be1"/><file name="Plugin.php" hash="c26b04d93db9c86f1831174845f970f0"/><dir name="Shipping"><dir name="Mapper"><file name="Carrier.php" hash="ef57904070fdf7921e51e88c3991c029"/><dir name="Method"><file name="Abstract.php" hash="bb402c49f3da66f7bd4baf5b215f989e"/><file name="Interface.php" hash="1bab00e6e0356184c3f213acfce601da"/><file name="Shopgate.php" hash="af8e1ade067d1b9fb0e5b493ad814576"/><file name="Usps.php" hash="14969ce8762a7fa5e5e5d6bc64285f52"/></dir></dir><file name="Mapper.php" hash="b93ac160c4c176c77887a23593ab058c"/></dir></dir><dir name="System"><dir name="Config"><dir name="Source"><file name="Attribute.php" hash="8dfc3964b750aebac8db5f584559d5c3"/><dir name="Description"><file name="List.php" hash="c83f37019461ab7adc86a57400f63761"/></dir><file name="Description.php" hash="d0dcebc9d75fdb0bb80f3c3faba6397c"/><file name="Enabledisable.php" hash="7f189c26cd1c2c7f1cd6dc56379798b5"/><dir name="Item"><file name="Sort.php" hash="2dc75f9c1e8baaddbf895945acd2ff19"/></dir><dir name="Product"><file name="Image.php" hash="e9d0e7c5769446290094d2b67e5c468b"/><file name="Names.php" hash="98de8ee7ae9b3c504eb087f5e09d3afd"/><file name="Types.php" hash="007b54c2e095691380c21a5ab62846fc"/></dir><dir name="Redirect"><file name="Types.php" hash="c5d3c44ab1f5ba74224b41836b14afff"/></dir><file name="Server.php" hash="b569e24076ca68c4063729fb708b666a"/><file name="Store.php" hash="cb2998beb43ba8afeeaa5b64a5b5e946"/><dir name="Validation"><file name="Config.php" hash="77382cb829f4b3b50120d7e1359e0051"/></dir><dir name="Variation"><dir name="Export"><file name="Type.php" hash="bb19358c2c2fbee3cb9776f3540faa20"/></dir></dir><dir name="Weight"><file name="Units.php" hash="10af44d670bcfdb559f4196c7006e893"/></dir></dir></dir></dir></dir><dir name="Test"><dir name="Controller"><dir name="FrameworkController"><dir name="fixtures"><file name="testPluginNotActive.yaml" hash="9e25f93814834419e9c83995021860c2"/></dir></dir><file name="FrameworkController.php" hash="32030559addc710d40c99c9fbd0d5856"/></dir><dir name="Helper"><dir name="Data"><dir name="providers"><file name="testCalculateTaxRate.yaml" hash="2b1fb398f41a0d7706ab9701d77ce978"/></dir></dir><file name="Data.php" hash="d641528ef7674e616b6f1ea1d9dea7c6"/></dir></dir><file name="changelog.txt" hash="99f320f71de43abc13d1794e3faa9b67"/><dir name="controllers"><dir name="Adminhtml"><file name="ShopgateController.php" hash="cd2305edb0348a15f956d20d39433778"/></dir><file name="FrameworkController.php" hash="2152205bd372d999a56eb378ed810a8d"/></dir><dir name="etc"><file name="adminhtml.xml" hash="d1f345ca5fc8b0619234f9c270fb84a7"/><file name="config.xml" hash="deb9ef9a3e9aafcdb3c7e35315ded9b0"/><file name="system.xml" hash="b715fdbd76766e347c0f30a8122e58ed"/></dir><file name="licence.txt" hash="dec6ca25c420b36a2e400caf1541c923"/><dir name="sql"><dir name="shopgate_setup"><file name="mysql4-install-0.1.0.php" hash="069abba038757da43b2ca6c5a0c82aba"/><file name="mysql4-install-2.1.45.php" hash="eddddf157e55a87edc77361dde564463"/><file name="mysql4-install-2.2.0.php" hash="eddddf157e55a87edc77361dde564463"/><file name="mysql4-upgrade-0.1.0-0.1.1.php" hash="cc637fc1bc511e745f02a56d0b36e3be"/><file name="mysql4-upgrade-1.0.5-1.0.7.php" hash="1e800d9d235b817bf5be698288bc0129"/><file name="mysql4-upgrade-2.1.44-2.1.45.php" hash="134d0b665746c61d364f6fd93d83f46c"/><file name="mysql4-upgrade-2.1.49-2.1.50.php" hash="e0fd395bb9c25c0e544c455186cfe7c9"/><file name="mysql4-upgrade-2.4.28-2.4.29.php" hash="9c8c868ce90e42b56182b23b78d6fbe7"/><file name="mysql4-upgrade-2.4.29-2.4.30.php" hash="ca3ee1e2f337bcea26264a17f603548e"/><file name="mysql4-upgrade-2.7.5-2.8.0.php" hash="34393a58a0b4ec90b4e618d3ff4cc565"/><file name="mysql4-upgrade-2.9.15-2.9.16.php" hash="980e7cc83f912ef4f630ef8d1cb964d1"/><file name="mysql4-upgrade-2.9.4-2.9.5.php" hash="dc6770e94c31d2f79915528c0993d546"/></dir></dir></dir></dir></target><target name="magelocale"><dir name="de_DE"><file name="Shopgate_Framework.csv" hash="e842a47237b2e613a22e5584108b8b2a"/></dir><dir name="de_CH"><file name="Shopgate_Framework.csv" hash="e842a47237b2e613a22e5584108b8b2a"/></dir><dir name="de_AT"><file name="Shopgate_Framework.csv" hash="664a8dc7470fd9675ca7a67f2bcd1325"/></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="shopgate"><file name="logo.png" hash="b7139047ecc90b15a5710ab0fe77fc81"/><file name="logo_big.png" hash="b98bfcf09766589506a1cca24ca47972"/><file name="logo_small.png" hash="7abf7f774c592eb582c2856e027af798"/><file name="oauth_connect.js" hash="8e5c77d9ad1354f826445f03c91008f4"/><file name="shopgate_admin.css" hash="0fbc07171267b9fb5dba7004a0858f66"/><file name="target.js" hash="80484a4dae515f708c97545d9959673a"/></dir></dir></dir></dir></target><target name="magelib"><dir name="Shopgate"><dir name="assets"><file name="index.php" hash="bfc5021f1ee9b67f78a0fc9fdab6c558"/><file name="js_header.html" hash="7ff2c12f8b7c23542f3ff49b451720a8"/><file name="link_tag.html" hash="f7c53599b55d442fd49f970bd41eb2a4"/><file name="mobile_header.html" hash="17616650e160eaccd24e25729396c5a9"/></dir><file name="changelog.txt" hash="884b4bb189210f5d1fec0beed4b691ce"/><dir name="classes"><file name="apis.php" hash="b5140492d42f2758d4432467052f6404"/><file name="configuration.php" hash="80c04dc5fdbee49fb4a279133f57751d"/><file name="core.php" hash="33aa00679cb2e55fc51c36ad6acd6a41"/><file name="customers.php" hash="3bc00737d0cfd788c24f52b303babd8a"/><file name="external_orders.php" hash="811471d13c2a3c5aa5d1a1eb859f74e6"/><dir name="helper"><file name="DataStructure.php" hash="ece9e9f855756777f543d090f5ecc710"/><file name="Pricing.php" hash="fd4c74999abc3bfa05fd74994a2ce78f"/><file name="String.php" hash="10c9396b2975bf0bde86f171932c3074"/><file name="index.php" hash="bfc5021f1ee9b67f78a0fc9fdab6c558"/><dir name="redirect"><file name="KeywordsManager.php" hash="6cf7278e7aed1a072c9b94fd99e585a5"/><file name="KeywordsManagerInterface.php" hash="32cda83161084b4f5904eeb5f50a6547"/><file name="LinkBuilder.php" hash="8d6c7225dc90fde0c62c65e24e618bd8"/><file name="LinkBuilderInterface.php" hash="a755af7b57fda9b9ff1564a0059529d1"/><file name="MobileRedirect.php" hash="63f2775caac9a2d6004c7908d9be8611"/><file name="MobileRedirectInterface.php" hash="80b8da18c8bf498461c2b8e183bce326"/><file name="Redirector.php" hash="1a06dc19980c8a51ae0cdbed4d04322d"/><file name="RedirectorInterface.php" hash="9a11e4e85b6005029458a035e4295935"/><file name="SettingsManager.php" hash="d1b1722715688da2a095fba8c607f45c"/><file name="SettingsManagerInterface.php" hash="ae16aa5ea4df7f0def80711f8cc14f70"/><file name="TagsGenerator.php" hash="de6e73da61a282d24226065671d67d6b"/><file name="TagsGeneratorInterface.php" hash="1a5c500631331a4ae970d2a442e5d7e2"/><file name="TemplateParser.php" hash="68637447481351705d742c3a7f083fc6"/><file name="TemplateParserInterface.php" hash="d6897cd9e5622d1991bb7aab678e37f8"/></dir></dir><file name="index.php" hash="bfc5021f1ee9b67f78a0fc9fdab6c558"/><file name="items.php" hash="7a361efd0a5327c0ad0f0745c1b74cc0"/><dir name="models"><file name="Abstract.php" hash="a32633283eb403a55a166bbad70b3e2f"/><file name="AbstractExport.php" hash="f265f9e906208e1799994d117582be20"/><file name="XmlEmptyObject.php" hash="d6cfdae3bdd858d4f10fcebdb542f533"/><file name="XmlResultObject.php" hash="340804eb0f2ba6bcb6b05311b8bb1f11"/><dir name="catalog"><file name="Attribute.php" hash="28d8f3bc6c416661d1eaa77726ba7009"/><file name="AttributeGroup.php" hash="0270086ec8006ee8231c6b0baa8d6034"/><file name="Category.php" hash="beba58d2796cf7b4ca08ce68de65415b"/><file name="CategoryPath.php" hash="475869aef74c567c8569ee9953210faa"/><file name="Identifier.php" hash="d9a3b16d1fcdec641ca2b0fd77fbd625"/><file name="Input.php" hash="77df45fd89aec19565a5fae7178205bb"/><file name="Manufacturer.php" hash="e45f534f5f6acad118be24ffc63a0460"/><file name="Option.php" hash="fd95fe72bff985ae0b2861da115e2468"/><file name="Price.php" hash="3cb25372ae58bd0c71b342f9ef2dca73"/><file name="Product.php" hash="7e7c49e10b379eae5d0141efe2c91305"/><file name="Property.php" hash="5967f0403a606a27ea4fec71a8402327"/><file name="Relation.php" hash="263cde539af500af911baec4e354079e"/><file name="Review.php" hash="72c94cb1f2a54bafffdb5672d87ecd4d"/><file name="Shipping.php" hash="1fe425496bd9720dc18bd076e56aca9e"/><file name="Stock.php" hash="4e645877e778ec8d02ae98262bfa9663"/><file name="Tag.php" hash="39e7b845ab157d2f707707576e868d64"/><file name="TierPrice.php" hash="9dd757c9c3d193944a5727fbe5cf4704"/><file name="Validation.php" hash="0be71640c1df60ab809347194ec66457"/><file name="Visibility.php" hash="d60c6b8ec486da4afdc46a00d65ad172"/><file name="index.php" hash="bfc5021f1ee9b67f78a0fc9fdab6c558"/></dir><file name="index.php" hash="bfc5021f1ee9b67f78a0fc9fdab6c558"/><dir name="media"><file name="Attachment.php" hash="c074ef3426c2506350cbf5ff0133c89d"/><file name="Image.php" hash="c9319f2a82811239313e328eaf7e2094"/><file name="index.php" hash="bfc5021f1ee9b67f78a0fc9fdab6c558"/></dir><dir name="redirect"><file name="DeeplinkSuffix.php" hash="e6aebbb49db1b3b1d0bbb3a5f8e52927"/><file name="DeeplinkSuffixValue.php" hash="809684ff8f7d588d39060f5469e2c3b0"/><file name="DeeplinkSuffixValueDisabled.php" hash="83ff30aeeaf40c070f71b29b7f2bbbd8"/><file name="DeeplinkSuffixValueUnset.php" hash="1275996c7d012acfa3fbd6cbe43b08b3"/><file name="HtmlTag.php" hash="e5494a280dd090e3869445431e6c8c2a"/><file name="HtmlTagAttribute.php" hash="368c63b7c3043f7ae0bee107527152de"/><file name="HtmlTagVariable.php" hash="1484f93ec0e69b3f94313e4cac849e0f"/></dir></dir><file name="orders.php" hash="aeb0df3eab7b68d1189dc6851fb96a24"/><file name="redirect.php" hash="5b0c5d5d7115bb0ddc9ab96e6120ad7b"/></dir><dir name="config"><file name="index.php" hash="bfc5021f1ee9b67f78a0fc9fdab6c558"/></dir><file name="index.php" hash="de19abc78063ea9a4112964c79946f1c"/><file name="shopgate.php" hash="248033be19931f7eccdc40d12e59d1bf"/><file name="shopgate_license.txt" hash="21fbb2f00b832416916b27c5e3f5d6d1"/><dir name="temp"><dir name="cache"><file name="index.php" hash="7573387748996e2dd9e02a237056f158"/></dir><file name="index.php" hash="7573387748996e2dd9e02a237056f158"/><dir name="logs"><file name="index.php" hash="7573387748996e2dd9e02a237056f158"/></dir></dir><dir name="vendors"><file name="2d_is.php" hash="087decaca87ee85d548d8caaa43f1212"/><file name="BSD_license.txt" hash="2df4dd93533ca2c19f6f2d601bc3e0d5"/><file name="JSON.php" hash="c8398aeb5c3c71aeb1813389d9a030af"/><file name="index.php" hash="bfc5021f1ee9b67f78a0fc9fdab6c558"/></dir><file name=".htaccess" hash="34479bc8d9df775c38a980ecaf6f3f4b"/></dir></target><target name="mage"><dir name="app"><dir name="design"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="shopgate.xml" hash="608ba89093ef89e1c182cd6085dbf3b1"/></dir><dir name="template"><dir name="shopgate"><file name="mobile_website.phtml" hash="229cbefd12ea77676f8af9c7159528ea"/><dir name="payment"><file name="mobile_payment.phtml" hash="1e18979028fb13e99af7c595c75a5d27"/><file name="shopgate.phtml" hash="1e18979028fb13e99af7c595c75a5d27"/></dir></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="shopgate.xml" hash="8bab300fb25a48cd2c8119ae1942ed54"/></dir><dir name="template"><dir name="shopgate"><dir name="oauth"><dir name="config"><file name="connector.phtml" hash="478c309bdde7834bf20a48b65a4699fb"/></dir><dir name="connect"><file name="info.phtml" hash="4f75dc4311616081873a7d416b96c1c2"/><file name="overlay.phtml" hash="2a17d5b6ff8023568437b194f8a9d482"/></dir><file name="connect.phtml" hash="6956aa22eedf549c4565304b4e4a4ab9"/><file name="data.phtml" hash="09b4c5d83863f104db7a018510cdb315"/><file name="disconnect.phtml" hash="2858cebe9004c9fb5764f79faee46f87"/><file name="manage.phtml" hash="1f99255efbce4dbdc1ee781820d455b8"/></dir><dir name="payment"><file name="mobile_payment.phtml" hash="2892e0dd200db6c0ffa5fa83f87d838c"/><file name="shopgate.phtml" hash="5457030290f8aa08c2711a8bd27c3dee"/></dir></dir></dir></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>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>shopgate_module</name>
|
4 |
+
<version>2.9.29</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://wiki.shopgate.com/Magento/de">Shopgate Plugin</license>
|
7 |
<channel>community</channel>
|
10 |
<description>Shopgate Plugin</description>
|
11 |
<notes>Shopgate Modul</notes>
|
12 |
<authors><author><name>Peter Liebig</name><user>Shopgate</user><email>p.liebig@me.com</email></author><author><name>Stephan Recknagel</name><user>Shopgate</user><email>mail@recknagel.io</email></author><author><name>André Kraus</name><user>Shopgate</user><email>andre.kraus83@googlemail.com</email></author></authors>
|
13 |
+
<date>2016-01-11</date>
|
14 |
+
<time>15:03:18</time>
|
15 |
+
<contents><target name="mageetc"><dir name="modules"><file name="Shopgate_Framework.xml" hash="3fb114204bd038da711122083876f161"/></dir></target><target name="magecommunity"><dir name="Shopgate"><dir name="Framework"><dir name="Block"><dir name="Adminhtml"><dir name="OAuth"><dir name="Config"><file name="Connector.php" hash="890d04b08bf692c12b02f29abf813f83"/></dir><dir name="Connect"><dir name="Add"><file name="Form.php" hash="45685099b41a46919a9900d22c30b711"/></dir><file name="Info.php" hash="ee7bbc837bf3f298791b8496f2d6d565"/><file name="Overlay.php" hash="a6496896dccb5898b36e3e65585650f4"/></dir><file name="Connect.php" hash="cc7e43ba447b6338f6c50ccaa5fd073a"/><file name="Data.php" hash="1903e819d5d16abba4c37d7823909260"/><file name="Disconnect.php" hash="2545e56bca73577ba5f73fce0501624a"/><dir name="Manage"><file name="Grid.php" hash="78357b78fed0e8b3535a7e505c8f6425"/></dir><file name="Manage.php" hash="a99e12333f7c27771ca42a0764108639"/></dir></dir><file name="Info.php" hash="3dd73900370546289a6033942a0c0528"/><dir name="Payment"><file name="MobilePayment.php" hash="7de8af7ec46e107c46a73efaf2a02034"/><file name="Shopgate.php" hash="67af406fa04da70461b3580b8adea89d"/></dir><dir name="Totals"><file name="AbstractPaymentFee.php" hash="5e36647f536d1c6daba33cd6e0a5e302"/><file name="CreditmemoPaymentFee.php" hash="4a287f54554d8d45772db386f54a45e7"/><file name="InvoicePaymentFee.php" hash="818164536fe249016af3046aef73f181"/><file name="OrderPaymentFee.php" hash="55c8f62c4da8014c99414ece9cd125c4"/></dir><file name="Version.php" hash="2f45712bb20635ac17d8bdee213819e5"/></dir><dir name="Helper"><dir name="Billsafe"><file name="Order.php" hash="474c2aa15f352224c11c8ab17e921c9d"/></dir><file name="Config.php" hash="b0e489659332274686965e5e8d200d88"/><file name="Coupon.php" hash="519697b13040ddfbc8f460b6034c8779"/><file name="Customer.php" hash="c68047909c0c6e14977336ab6afe2f6b"/><file name="Data.php" hash="bf2db8a0a2c145cdb50f891f6d45ba85"/><file name="Debug.php" hash="82c85038046fc9b2f994df18b7f202a6"/><file name="Export.php" hash="02c5dbce181e7489b5d75b20c1584aab"/><dir name="Import"><file name="Order.php" hash="e40ed484faf6f9757bee1970bafaed30"/></dir><file name="Install.php" hash="57f42693c9a6ddb18b8a25a2a5da7cf8"/><dir name="Payment"><file name="Abstract.php" hash="207f16aab8224761b7d91802b9fb10ee"/><file name="Payone.php" hash="ddced5955ff55105d8b3c91e0fcb0778"/><file name="Wspp.php" hash="4214f1d3332cd189cee3df48108ebd8d"/></dir><file name="Sales.php" hash="a5dfa9e90343a4da4e0791f62b802484"/></dir><dir name="Model"><dir name="Carrier"><file name="Fix.php" hash="8dc7a12f501e2b5cc9dc6e6394a99b38"/></dir><dir name="Cataloginventory"><file name="Stock.php" hash="42ffccc3d644f8b04358a3e76bda32dd"/></dir><dir name="Compiler"><file name="Process.php" hash="740452b7bc234417788db1f1ee892ef5"/></dir><file name="Config.php" hash="974cb3cdaef40d3b82ca6ae86f55bf58"/><file name="Customer.php" hash="97ed53ca3f69c7a24fb40cce11f58721"/><dir name="DreamRobot"><file name="Observer.php" hash="7b4e8922a46f5974b8edf359c632a9d3"/></dir><dir name="Export"><file name="Abstract.php" hash="9e86667845e8cebd8e0ccb8879b70b6d"/><dir name="Category"><file name="Csv.php" hash="72f4f58345d95f8f621783bedf2a092e"/><file name="Xml.php" hash="12ab046b9a000636ed4ed5eefb770af2"/></dir><file name="Category.php" hash="5a41141ecec85669674ec818c4661cdc"/><dir name="Customer"><file name="Orders.php" hash="30123a6fe3e391fca911fed042b256c8"/></dir><file name="Customer.php" hash="2711476c9538a22242d1511649ec77f1"/><dir name="Product"><file name="Csv.php" hash="cc25a5c6a19233b33b1f1ec37837c404"/><file name="Xml.php" hash="a260258d2f6bc6586dd7dba283b40633"/></dir><file name="Product.php" hash="d9c807df57af3f1cced2d9bb433338ec"/><dir name="Review"><file name="Csv.php" hash="5c72f802a2de256ca1ec8dab1b75b291"/><file name="Xml.php" hash="bc16f60d9ed20705422921955a5071fe"/></dir><file name="Review.php" hash="ad6f548035a30da642d2459354acbb40"/><file name="Settings.php" hash="960f3d9991ecca41bd9e8b4ba632e9ea"/></dir><file name="Feed.php" hash="fb99cd7b2b3d94908848b722df666b67"/><dir name="Mobile"><file name="Redirect.php" hash="a76ea12d338dadd418be4dbfcfe9eeb3"/></dir><dir name="Mysql4"><dir name="Core"><file name="Core.php" hash="fc129d4d929f83e8389367b9c5d6d5e1"/></dir><dir name="Customer"><file name="Collection.php" hash="89d31997abc3c2145f74e02dd5456a7c"/></dir><file name="Customer.php" hash="d5f460b2d5bfa87b8368a8a6c6b51115"/><file name="Product.php" hash="6a99b3d0de44dfbd132ce9caca19034e"/><dir name="Shopgate"><dir name="Order"><file name="Collection.php" hash="e180ba816be47239828bea65cd5f8445"/></dir><file name="Order.php" hash="c297847e39ad01307dba4a69c13445f2"/></dir></dir><file name="Observer.php" hash="c0437e883a28cf8c67ab67517d0788f3"/><dir name="Payment"><dir name="Abstract"><file name="AbstractPayol.php" hash="0228e80536a7decbbc0a883a4bde0d0d"/></dir><file name="Abstract.php" hash="6fdd4edd829d56525c09357fab95c540"/><file name="Amazon.php" hash="908d7f65ae7a0513ff796b49f8b8a556"/><file name="Authorize.php" hash="f51637fcb5058620b359e066fa1a6dd3"/><file name="Billsafe.php" hash="abc7caf1d47a33353b4b575b237fee70"/><dir name="Cc"><file name="Abstract.php" hash="2b291ac14d9e1e3120416d6aeb4c3487"/><file name="Authn.php" hash="5c4c0d849d8d22dab1e6bf374dfc6c79"/><file name="AuthnAbstract.php" hash="59c3e39376e695ac161d228fc9a3fabf"/><dir name="Authncim"><file name="Gateway.php" hash="1f8df3fe0e50f4729bebfc1d4763b015"/><file name="Method.php" hash="aa6916548a71848ad7c83e4f053bc27e"/></dir><file name="Authncim.php" hash="89f1c2a0bb59d08c895da84c14c325ff"/><file name="Chargeitpro.php" hash="6fd3a2fd42df00831d6e363a23a414f1"/><file name="Usaepay.php" hash="00bd8969c1eceb13eacbb37ed9a1f714"/></dir><file name="Cc.php" hash="3b8b092334fd1c72e824f560b9e33405"/><file name="Express.php" hash="6c8a2ea8ef4cebf40fe35b840f0d41d9"/><file name="Factory.php" hash="c31171980613fc74eff0ce727746f9ef"/><file name="Generic.php" hash="666f06186d1bb96b94af287d221e27c5"/><dir name="Ins"><file name="Payol.php" hash="b6961c4ab1fb9a95ab2d470aeaad8d29"/></dir><file name="Interface.php" hash="151002297bcce208b85bd260c7a25b47"/><dir name="Inv"><file name="Payol.php" hash="6d1c28b2ea2fb2fd63e09712f4533c77"/></dir><file name="MobilePayment.php" hash="59554c65e778831f6add450e0f846f42"/><dir name="Payone"><file name="Abstract.php" hash="e6e34d9b64d8669c131f545b88dffae5"/><file name="BankAbstract.php" hash="fa4ef2c918868001c5f1df97cb4bc400"/><file name="Cc.php" hash="f78795e91c1e6cb9c4cb129d61c4d132"/><file name="Dbt.php" hash="7f098887ba6f12669a18f62d7885de6d"/><file name="Gp.php" hash="7686149aedae93b0d5eef0b06fc08d7e"/><file name="Idl.php" hash="57d144744565ff644db917cab7ef689e"/><file name="Inv.php" hash="91d893ee5eacdc00ff8fbb3f1b750894"/><file name="Klv.php" hash="f82fb0cc874ea8f1121f282372e4e404"/><file name="Pp.php" hash="1165aa67ef8ccdc93a2eb0b7bf03f3d0"/><file name="Prp.php" hash="76079d7e154c3a982b1d117793942c3a"/><file name="Sue.php" hash="31280f2c8abf21f0a582b656fb0d38ad"/></dir><dir name="Pp"><file name="Abstract.php" hash="e6c5afcb0653d2ec3de3bd5d1442b355"/><file name="Wspp.php" hash="42ff0a5d004c82401277dbf00cd9e00f"/></dir><file name="Pp.php" hash="c521bbb32aed313c0170dd6e8361f934"/><dir name="Ppal"><file name="Plus.php" hash="a26adaab47adb3f3b84ff872673b4ed1"/></dir><file name="Router.php" hash="8c5c3d698dbddeec2823d8e2ad284b72"/><file name="Shopgate.php" hash="f0d59e2a4369f7a22e47cf9c3bb9c44a"/><dir name="Simple"><file name="Billsafe.php" hash="d352d66d5101454f4cfec46e4fcaa88a"/><dir name="Cod"><file name="Abstract.php" hash="7bcb77e2906200f8a7576a24d782d541"/><file name="Msp.php" hash="0bb90c25c102ea55ead07312793c523b"/><file name="Native.php" hash="ac835fa8062afb1d3c77e67bc7b87b3c"/><file name="Phoenix107.php" hash="0172683522d4aad72e149a896aad757f"/><file name="Phoenix108.php" hash="b2fc93153eb4e11b0fcf567d66ef298d"/></dir><file name="Cod.php" hash="13329a686494412b304364f0707dd024"/><file name="Invoice.php" hash="a86d8500a0dee3056e56b0ccfb1fae3d"/><dir name="Mws"><file name="Abstract.php" hash="b4a90287eafca0d87087f6dede80dd2c"/><file name="Mws.php" hash="e919cd10f5be16e404a2aac43211005b"/><file name="Mws15.php" hash="db272b23821ea5010fe0e19023b9ca81"/></dir><file name="Mws.php" hash="e19cdfee86d84d80a234138a5f86c5af"/><dir name="Paypal"><file name="Express.php" hash="e2d33dbc600503d9a7541ab53df60662"/><file name="Standard.php" hash="5281ddc90f8f560b6cffa2e97fe08304"/><file name="Standard1400.php" hash="d80d26e8189b12c9796929dfad77f6c8"/></dir><file name="Paypal.php" hash="f9d9361711099812b46ac8335efef454"/><dir name="Prepay"><file name="Abstract.php" hash="89767868690e40bc3d96f8bee4484880"/><file name="Checkmo.php" hash="781dd32522f7bc97c62313cb76429633"/><file name="Native.php" hash="48542e3e9ad2bafb504a200a6529eccc"/><file name="Phoenix.php" hash="7118e404d6f1755cdab35dbc2c8f058d"/></dir><file name="Prepay.php" hash="75a238298ab408184e109411a8cc08b0"/><file name="Shopgate.php" hash="5fb1a053ac9b69e5d38bc9f6631ee8f1"/><dir name="Sue"><file name="Abstract.php" hash="d07d6b3a5702b458ed4e5f4574e3ced9"/><file name="Sue118.php" hash="759f4a7e103f9f9f4457aa1d0694c26d"/><file name="Sue300.php" hash="c804244222e5fe67ead8916c5c1ffef1"/></dir><file name="Sue.php" hash="6802dc052e2088957329689b003a16f8"/></dir><file name="Simple.php" hash="e4f0b3cd8282c2661cb19eabdb77d075"/><file name="Usaepay.php" hash="30f17f5a6bf8d0a68b2c14cd1d013885"/><file name="Wspp.php" hash="dbcd289795c112f2f0dbabeda19fbc69"/></dir><dir name="Resource"><dir name="Core"><file name="Config.php" hash="0ee7969070ab0dddfdd3bb2cc404cd3c"/></dir><dir name="Customer"><file name="Collection.php" hash="2ddb7db1355100bc9e86f966f1d4612c"/></dir><file name="Customer.php" hash="69848842d4be07be4d66d700a7b6695b"/><file name="Product.php" hash="5c62ef4cfc3f0ebbbe5a9a46d1c25dfa"/><file name="Setup.php" hash="7b5cc0f99c857e9292638c1fbeb43969"/><dir name="Shopgate"><dir name="Connection"><file name="Collection.php" hash="f294d4239cee276b7e3c5e6e2109de66"/><dir name="Grid"><file name="Collection.php" hash="d499139d50dffbfe1b1e868b5aeeee0f"/></dir></dir><dir name="Order"><file name="Collection.php" hash="2c18a4ca248ca8719e7ead85f0c57619"/></dir><file name="Order.php" hash="1942eeb8268781c499f8cad384081b02"/></dir></dir><dir name="Sales"><dir name="Creditmemo"><dir name="Total"><file name="ShopgatePaymentFee.php" hash="614d1e96cd2c97e0fcd7db86ee3aad89"/></dir></dir><dir name="Invoice"><dir name="Total"><file name="ShopgatePaymentFee.php" hash="c4400832de32367067fd5396bcf7bfc8"/></dir></dir><dir name="Quote"><dir name="Address"><dir name="Total"><file name="ShopgatePaymentFee.php" hash="7a309b69fb20fb6fcae5f3b77f5b7ba9"/></dir></dir></dir></dir><dir name="Search"><dir name="Shopgate"><file name="Order.php" hash="94dcf366528641687b89ab0c9f973ef5"/></dir></dir><dir name="Shopgate"><dir name="Cart"><dir name="Validation"><dir name="Stock"><file name="Bundle.php" hash="7cc03239fbefe3a8e71755a178299944"/><file name="Simple.php" hash="9da9891d52c89e0772af5bcea7581ae8"/></dir><file name="Stock.php" hash="03d8139aa9840d707c8e4cb991bca20f"/></dir></dir><file name="Connection.php" hash="ff0da764d444103f5892ef21e23ba353"/><file name="Order.php" hash="89e0e425fc48282c1b46d3078b294be1"/><file name="Plugin.php" hash="3333a8a1b42f8432f6d48937928182b3"/><dir name="Shipping"><dir name="Mapper"><file name="Carrier.php" hash="ef57904070fdf7921e51e88c3991c029"/><dir name="Method"><file name="Abstract.php" hash="bb402c49f3da66f7bd4baf5b215f989e"/><file name="Interface.php" hash="1bab00e6e0356184c3f213acfce601da"/><file name="Shopgate.php" hash="af8e1ade067d1b9fb0e5b493ad814576"/><file name="Usps.php" hash="14969ce8762a7fa5e5e5d6bc64285f52"/></dir></dir><file name="Mapper.php" hash="b93ac160c4c176c77887a23593ab058c"/></dir></dir><dir name="System"><dir name="Config"><dir name="Source"><file name="Attribute.php" hash="8dfc3964b750aebac8db5f584559d5c3"/><dir name="Description"><file name="List.php" hash="c83f37019461ab7adc86a57400f63761"/></dir><file name="Description.php" hash="d0dcebc9d75fdb0bb80f3c3faba6397c"/><file name="Enabledisable.php" hash="7f189c26cd1c2c7f1cd6dc56379798b5"/><dir name="Item"><file name="Sort.php" hash="2dc75f9c1e8baaddbf895945acd2ff19"/></dir><dir name="Product"><file name="Image.php" hash="e9d0e7c5769446290094d2b67e5c468b"/><file name="Names.php" hash="98de8ee7ae9b3c504eb087f5e09d3afd"/><file name="Types.php" hash="007b54c2e095691380c21a5ab62846fc"/></dir><dir name="Redirect"><file name="Types.php" hash="c5d3c44ab1f5ba74224b41836b14afff"/></dir><file name="Server.php" hash="b569e24076ca68c4063729fb708b666a"/><file name="Store.php" hash="cb2998beb43ba8afeeaa5b64a5b5e946"/><dir name="Validation"><file name="Config.php" hash="77382cb829f4b3b50120d7e1359e0051"/></dir><dir name="Variation"><dir name="Export"><file name="Type.php" hash="bb19358c2c2fbee3cb9776f3540faa20"/></dir></dir><dir name="Weight"><file name="Units.php" hash="10af44d670bcfdb559f4196c7006e893"/></dir></dir></dir></dir></dir><dir name="Test"><dir name="Controller"><dir name="FrameworkController"><dir name="fixtures"><file name="testPluginNotActive.yaml" hash="9e25f93814834419e9c83995021860c2"/></dir></dir><file name="FrameworkController.php" hash="32030559addc710d40c99c9fbd0d5856"/></dir><dir name="Helper"><dir name="Data"><dir name="providers"><file name="testCalculateTaxRate.yaml" hash="2b1fb398f41a0d7706ab9701d77ce978"/></dir></dir><file name="Data.php" hash="e6892cda8a5c0a034657707ae6951317"/><dir name="Payment"><dir name="Wspp"><dir name="providers"><file name="testGetActionByStatus.yaml" hash="7c2d30f7e376da449185e19f3b2a642a"/><file name="testGetPaypalStatus.yaml" hash="8381a01d6d22190b4d1e5c14db984a5d"/></dir></dir><file name="Wspp.php" hash="8bda17bc29a6f006e51ec54063c7b42c"/></dir></dir><dir name="Model"><dir name="Payment"><dir name="Abstract"><dir name="fixtures"><file name="testIsDisabled.yaml" hash="53ed5e65872f20c2328430e0e395e70f"/><file name="testIsEnabled.yaml" hash="53ed5e65872f20c2328430e0e395e70f"/></dir></dir><file name="Abstract.php" hash="7dc37f4b6c2a911a726a0395ae5e49eb"/><dir name="Cc"><dir name="Abstract"><dir name="providers"><file name="testGetCcTypeName.yaml" hash="eaf5dc89060f82581dea1a116c58e5dc"/></dir></dir><file name="Abstract.php" hash="ccf09de30cde5ee26757794e2a509896"/><file name="Authn.php" hash="77306ad6afc450df8a45a1d6a177ff32"/><file name="AuthnAbstract.php" hash="11784c806b9ca43772af538a13dea371"/></dir><file name="Cc.php" hash="8da9d7be59ca374d8d69e587d6c47464"/><dir name="Router"><file name="Exception.php" hash="f7619c0f81e3aec39171687b3fd44185"/><dir name="providers"><file name="testGetModelCombinations.yaml" hash="e74482392a5c0a767903c73628dbfc21"/><file name="testMethodPart.yaml" hash="f9e17d95fba5fed400d4bbfce722212d"/></dir></dir><file name="Router.php" hash="42c755b3d736deb853548db48e2cbe3f"/><file name="RouterAbstract.php" hash="8f3207a8c6db231f72c81d891919cdbd"/><dir name="Simple"><file name="Billsafe.php" hash="82672c2300658c22c6fe0165245b5590"/><dir name="Cod"><file name="Msp.php" hash="d87f920cb0db4267f7246ea5542c2867"/><file name="Native.php" hash="9699b7aa21466cb2014f27d924ac7717"/><file name="Phoenix107.php" hash="c482e1e2a78fc9c5d277d22c3e4271c2"/><file name="Phoenix108.php" hash="f0f6847ea8279388cb12915f7aeb6597"/><dir name="fixtures"><file name="testGetCodMspMethod.yaml" hash="877ac87663c27392723481e813adac94"/><file name="testGetCodNativeMethod.yaml" hash="78dec590236fda34a7baa1681f1f799b"/><file name="testGetCodPhoenixMethod.yaml" hash="d47bddf587fad20d43acec341eb97c55"/><file name="testGetNoCodMethod.yaml" hash="f598847006617b5ed14f83d677739951"/></dir></dir><file name="Cod.php" hash="03391eaa3b2233c8d51a020e09dacde4"/><file name="Invoice.php" hash="08161a51fab47b14b652da12819337bf"/><dir name="Mws"><file name="Mws.php" hash="ec0f5f5b20656367416e505213439819"/><file name="Mws15.php" hash="06b3ada52a543d31bbf877032450368e"/></dir><file name="Mws.php" hash="9645cc9098c989424644de6b2f8bcfbd"/><dir name="Paypal"><file name="Express.php" hash="23da162636ff6ccca1e703b1967c14cf"/><dir name="fixtures"><file name="testGetPpExpressMethod.yaml" hash="304d7be2dcefedfe925695b85ead1ef7"/><file name="testGetPpStandardMethod.yaml" hash="79830109fcd1f32140f97cfd0caf4ab3"/></dir></dir><file name="Paypal.php" hash="cce4b99dcf9ee10621af4c6b24538a8e"/><dir name="Prepay"><file name="Checkmo.php" hash="b4bf41747b9e20c76d22f39fdafe6318"/><file name="Native.php" hash="dd31b6d04518750a1d03a7f9b85510f0"/><file name="Phoenix.php" hash="c8c7a408d8bf13917083826eed369f12"/><dir name="fixtures"><file name="testGetAllPrepayEnabled.yaml" hash="f4fd365d15f4a72a27056abc86254d32"/><file name="testGetPrepayNativeMethod.yaml" hash="10fc3dd5a6ea63187eb11c0f8dfcdce4"/><file name="testGetPrepayPhoenixMethod.yaml" hash="e8e4ab7d7e995aea4e701e2aac72c9c0"/></dir></dir><file name="Prepay.php" hash="410b8d87c6c3c2d726cc3a4dd59e85fb"/><file name="Shopgate.php" hash="744c9424ad4db0917e437140662c6298"/><dir name="Sue"><file name="Sue118.php" hash="25daa525b66855a9c617d68f58818e1f"/><file name="Sue300.php" hash="38e4539f1adb242b67920f43d93a15fc"/></dir><file name="Sue.php" hash="c6b29f00dbf3e4177b1bc7da20c0af5c"/></dir><file name="Simple.php" hash="8f3d015f1f8e32ddef4ae60c681d6280"/></dir><file name="Utility.php" hash="f7b78aefc882670c716cbcf5cac4dc99"/></dir></dir><file name="changelog.txt" hash="ae1d5a88621bb4939899e3ded561dd6d"/><dir name="controllers"><dir name="Adminhtml"><file name="ShopgateController.php" hash="cd2305edb0348a15f956d20d39433778"/></dir><file name="FrameworkController.php" hash="2152205bd372d999a56eb378ed810a8d"/></dir><dir name="etc"><file name="adminhtml.xml" hash="d1f345ca5fc8b0619234f9c270fb84a7"/><file name="config.xml" hash="e71823d21caec8c711b6f629acb6d10b"/><file name="system.xml" hash="b715fdbd76766e347c0f30a8122e58ed"/></dir><file name="licence.txt" hash="dec6ca25c420b36a2e400caf1541c923"/><dir name="sql"><dir name="shopgate_setup"><file name="mysql4-install-0.1.0.php" hash="069abba038757da43b2ca6c5a0c82aba"/><file name="mysql4-install-2.1.45.php" hash="eddddf157e55a87edc77361dde564463"/><file name="mysql4-install-2.2.0.php" hash="eddddf157e55a87edc77361dde564463"/><file name="mysql4-upgrade-0.1.0-0.1.1.php" hash="cc637fc1bc511e745f02a56d0b36e3be"/><file name="mysql4-upgrade-1.0.5-1.0.7.php" hash="1e800d9d235b817bf5be698288bc0129"/><file name="mysql4-upgrade-2.1.44-2.1.45.php" hash="134d0b665746c61d364f6fd93d83f46c"/><file name="mysql4-upgrade-2.1.49-2.1.50.php" hash="e0fd395bb9c25c0e544c455186cfe7c9"/><file name="mysql4-upgrade-2.4.28-2.4.29.php" hash="9c8c868ce90e42b56182b23b78d6fbe7"/><file name="mysql4-upgrade-2.4.29-2.4.30.php" hash="ca3ee1e2f337bcea26264a17f603548e"/><file name="mysql4-upgrade-2.7.5-2.8.0.php" hash="34393a58a0b4ec90b4e618d3ff4cc565"/><file name="mysql4-upgrade-2.9.15-2.9.16.php" hash="980e7cc83f912ef4f630ef8d1cb964d1"/><file name="mysql4-upgrade-2.9.4-2.9.5.php" hash="dc6770e94c31d2f79915528c0993d546"/></dir></dir></dir></dir></target><target name="magelocale"><dir name="de_DE"><file name="Shopgate_Framework.csv" hash="e842a47237b2e613a22e5584108b8b2a"/></dir><dir name="de_CH"><file name="Shopgate_Framework.csv" hash="e842a47237b2e613a22e5584108b8b2a"/></dir><dir name="de_AT"><file name="Shopgate_Framework.csv" hash="664a8dc7470fd9675ca7a67f2bcd1325"/></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="shopgate"><file name="logo.png" hash="b7139047ecc90b15a5710ab0fe77fc81"/><file name="logo_big.png" hash="b98bfcf09766589506a1cca24ca47972"/><file name="logo_small.png" hash="7abf7f774c592eb582c2856e027af798"/><file name="oauth_connect.js" hash="8e5c77d9ad1354f826445f03c91008f4"/><file name="shopgate_admin.css" hash="0fbc07171267b9fb5dba7004a0858f66"/><file name="target.js" hash="80484a4dae515f708c97545d9959673a"/></dir></dir></dir></dir></target><target name="magelib"><dir name="Shopgate"><dir name="assets"><file name="index.php" hash="bfc5021f1ee9b67f78a0fc9fdab6c558"/><file name="js_header.html" hash="7ff2c12f8b7c23542f3ff49b451720a8"/><file name="link_tag.html" hash="f7c53599b55d442fd49f970bd41eb2a4"/><file name="mobile_header.html" hash="17616650e160eaccd24e25729396c5a9"/></dir><file name="changelog.txt" hash="cdfbe89f000dd60468469b298f7d3169"/><dir name="classes"><file name="apis.php" hash="8d89fdce7a3eeca342a5165bb9a2530b"/><file name="configuration.php" hash="264d43767346d16fd8c1fcfdcbec0ca2"/><file name="core.php" hash="572602b7dd81c1850a9f2319d6c045ab"/><file name="customers.php" hash="24c9dbbcafe379c224fcce4b02d58ad2"/><file name="external_orders.php" hash="7239071113b5decc70ec9672bf6fc3fe"/><dir name="helper"><file name="DataStructure.php" hash="ece9e9f855756777f543d090f5ecc710"/><file name="Pricing.php" hash="fd4c74999abc3bfa05fd74994a2ce78f"/><file name="String.php" hash="10c9396b2975bf0bde86f171932c3074"/><file name="index.php" hash="bfc5021f1ee9b67f78a0fc9fdab6c558"/><dir name="redirect"><file name="KeywordsManager.php" hash="6cf7278e7aed1a072c9b94fd99e585a5"/><file name="KeywordsManagerInterface.php" hash="32cda83161084b4f5904eeb5f50a6547"/><file name="LinkBuilder.php" hash="8d6c7225dc90fde0c62c65e24e618bd8"/><file name="LinkBuilderInterface.php" hash="a755af7b57fda9b9ff1564a0059529d1"/><file name="MobileRedirect.php" hash="63f2775caac9a2d6004c7908d9be8611"/><file name="MobileRedirectInterface.php" hash="80b8da18c8bf498461c2b8e183bce326"/><file name="Redirector.php" hash="1a06dc19980c8a51ae0cdbed4d04322d"/><file name="RedirectorInterface.php" hash="9a11e4e85b6005029458a035e4295935"/><file name="SettingsManager.php" hash="d1b1722715688da2a095fba8c607f45c"/><file name="SettingsManagerInterface.php" hash="ae16aa5ea4df7f0def80711f8cc14f70"/><file name="TagsGenerator.php" hash="de6e73da61a282d24226065671d67d6b"/><file name="TagsGeneratorInterface.php" hash="1a5c500631331a4ae970d2a442e5d7e2"/><file name="TemplateParser.php" hash="f251fa72c5f2e15557ae2476d104d9d9"/><file name="TemplateParserInterface.php" hash="d6897cd9e5622d1991bb7aab678e37f8"/></dir></dir><file name="index.php" hash="bfc5021f1ee9b67f78a0fc9fdab6c558"/><file name="items.php" hash="107f9bc5fcc0c0dbfe568a3b8235107c"/><dir name="models"><file name="Abstract.php" hash="a32633283eb403a55a166bbad70b3e2f"/><file name="AbstractExport.php" hash="f265f9e906208e1799994d117582be20"/><file name="XmlEmptyObject.php" hash="d6cfdae3bdd858d4f10fcebdb542f533"/><file name="XmlResultObject.php" hash="340804eb0f2ba6bcb6b05311b8bb1f11"/><dir name="catalog"><file name="Attribute.php" hash="28d8f3bc6c416661d1eaa77726ba7009"/><file name="AttributeGroup.php" hash="0270086ec8006ee8231c6b0baa8d6034"/><file name="Category.php" hash="beba58d2796cf7b4ca08ce68de65415b"/><file name="CategoryPath.php" hash="475869aef74c567c8569ee9953210faa"/><file name="Identifier.php" hash="d9a3b16d1fcdec641ca2b0fd77fbd625"/><file name="Input.php" hash="77df45fd89aec19565a5fae7178205bb"/><file name="Manufacturer.php" hash="e45f534f5f6acad118be24ffc63a0460"/><file name="Option.php" hash="fd95fe72bff985ae0b2861da115e2468"/><file name="Price.php" hash="3cb25372ae58bd0c71b342f9ef2dca73"/><file name="Product.php" hash="7e7c49e10b379eae5d0141efe2c91305"/><file name="Property.php" hash="5967f0403a606a27ea4fec71a8402327"/><file name="Relation.php" hash="263cde539af500af911baec4e354079e"/><file name="Review.php" hash="72c94cb1f2a54bafffdb5672d87ecd4d"/><file name="Shipping.php" hash="1fe425496bd9720dc18bd076e56aca9e"/><file name="Stock.php" hash="4e645877e778ec8d02ae98262bfa9663"/><file name="Tag.php" hash="39e7b845ab157d2f707707576e868d64"/><file name="TierPrice.php" hash="9dd757c9c3d193944a5727fbe5cf4704"/><file name="Validation.php" hash="0be71640c1df60ab809347194ec66457"/><file name="Visibility.php" hash="d60c6b8ec486da4afdc46a00d65ad172"/><file name="index.php" hash="bfc5021f1ee9b67f78a0fc9fdab6c558"/></dir><file name="index.php" hash="bfc5021f1ee9b67f78a0fc9fdab6c558"/><dir name="media"><file name="Attachment.php" hash="c074ef3426c2506350cbf5ff0133c89d"/><file name="Image.php" hash="c9319f2a82811239313e328eaf7e2094"/><file name="index.php" hash="bfc5021f1ee9b67f78a0fc9fdab6c558"/></dir><dir name="redirect"><file name="DeeplinkSuffix.php" hash="e6aebbb49db1b3b1d0bbb3a5f8e52927"/><file name="DeeplinkSuffixValue.php" hash="809684ff8f7d588d39060f5469e2c3b0"/><file name="DeeplinkSuffixValueDisabled.php" hash="83ff30aeeaf40c070f71b29b7f2bbbd8"/><file name="DeeplinkSuffixValueUnset.php" hash="1275996c7d012acfa3fbd6cbe43b08b3"/><file name="HtmlTag.php" hash="e5494a280dd090e3869445431e6c8c2a"/><file name="HtmlTagAttribute.php" hash="368c63b7c3043f7ae0bee107527152de"/><file name="HtmlTagVariable.php" hash="1484f93ec0e69b3f94313e4cac849e0f"/></dir></dir><file name="orders.php" hash="fc81f6fb02ccfd65df7b9cc4ba01b046"/><file name="redirect.php" hash="5b0c5d5d7115bb0ddc9ab96e6120ad7b"/></dir><dir name="config"><file name="index.php" hash="bfc5021f1ee9b67f78a0fc9fdab6c558"/></dir><file name="index.php" hash="de19abc78063ea9a4112964c79946f1c"/><file name="shopgate.php" hash="248033be19931f7eccdc40d12e59d1bf"/><file name="shopgate_license.txt" hash="21fbb2f00b832416916b27c5e3f5d6d1"/><dir name="temp"><dir name="cache"><file name="index.php" hash="7573387748996e2dd9e02a237056f158"/></dir><file name="index.php" hash="7573387748996e2dd9e02a237056f158"/><dir name="logs"><file name="index.php" hash="7573387748996e2dd9e02a237056f158"/></dir></dir><dir name="tests"><dir name="classes"><dir name="helper"><dir name="redirect"><file name="TemplateParserTest.php" hash="aa7aea33f78f0fda58437c83421d2f31"/></dir></dir></dir></dir><dir name="vendors"><file name="2d_is.php" hash="087decaca87ee85d548d8caaa43f1212"/><file name="BSD_license.txt" hash="2df4dd93533ca2c19f6f2d601bc3e0d5"/><file name="JSON.php" hash="c8398aeb5c3c71aeb1813389d9a030af"/><file name="index.php" hash="bfc5021f1ee9b67f78a0fc9fdab6c558"/></dir><file name=".htaccess" hash="34479bc8d9df775c38a980ecaf6f3f4b"/></dir></target><target name="mage"><dir name="app"><dir name="design"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="shopgate.xml" hash="608ba89093ef89e1c182cd6085dbf3b1"/></dir><dir name="template"><dir name="shopgate"><file name="mobile_website.phtml" hash="229cbefd12ea77676f8af9c7159528ea"/><dir name="payment"><file name="mobile_payment.phtml" hash="1e18979028fb13e99af7c595c75a5d27"/><file name="shopgate.phtml" hash="1e18979028fb13e99af7c595c75a5d27"/></dir></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="shopgate.xml" hash="8bab300fb25a48cd2c8119ae1942ed54"/></dir><dir name="template"><dir name="shopgate"><dir name="oauth"><dir name="config"><file name="connector.phtml" hash="478c309bdde7834bf20a48b65a4699fb"/></dir><dir name="connect"><file name="info.phtml" hash="4f75dc4311616081873a7d416b96c1c2"/><file name="overlay.phtml" hash="2a17d5b6ff8023568437b194f8a9d482"/></dir><file name="connect.phtml" hash="6956aa22eedf549c4565304b4e4a4ab9"/><file name="data.phtml" hash="09b4c5d83863f104db7a018510cdb315"/><file name="disconnect.phtml" hash="2858cebe9004c9fb5764f79faee46f87"/><file name="manage.phtml" hash="1f99255efbce4dbdc1ee781820d455b8"/></dir><dir name="payment"><file name="mobile_payment.phtml" hash="2892e0dd200db6c0ffa5fa83f87d838c"/><file name="shopgate.phtml" hash="5457030290f8aa08c2711a8bd27c3dee"/></dir></dir></dir></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>
|