Skip to content

Commit

Permalink
Merge pull request #23 from qenta-cee/dev
Browse files Browse the repository at this point in the history
Typo fix and comments
  • Loading branch information
jakubpolomsky authored Jul 7, 2021
2 parents e1c5baf + 9f88a24 commit b136199
Show file tree
Hide file tree
Showing 16 changed files with 404 additions and 362 deletions.
25 changes: 10 additions & 15 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,19 @@ appearance, race, religion, or sexual identity and orientation.

Examples of behavior that contributes to creating a positive environment include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a professional setting
- The use of sexualized language or imagery and unwelcome sexual attention or advances
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or electronic address, without explicit permission
- Other conduct which could reasonably be considered inappropriate in a professional setting

## Our Responsibilities

Expand All @@ -39,11 +39,6 @@ that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

## Scope

This Code Of Conduct applies to all open source projects published by
Wirecard AG, including the issue tracker of those projects.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
Expand Down
13 changes: 8 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,22 @@
[![OXID eSales Community Edition 4.10.8](https://img.shields.io/badge/OXID_CE-v4.10.8-green.svg)](http://www.oxid-esales.com/)
[![PHP v5.6](https://img.shields.io/badge/php-v5.6-yellow.svg)](http://www.php.net)

----
Qenta Checkout Seamless plugin for OXID.
---

QENTA Checkout Seamless plugin for OXID.

Our [Online Guides](https://guides.qenta.com/) provide further information on payment methods and additional features. Please observe our [terms of use](https://guides.qenta.com/shop_plugins:info#terms_of_use) regarding plugins.

## Installation
Our [Online Guides](https://guides.qenta.com/shop_plugins:oxid_qcs:start "Installation details") also provide technical documentation, installation and configuration instructions for the plugin.

Our [Online Guides](https://guides.qenta.com/shop_plugins:oxid_qcs:start 'Installation details') also provide technical documentation, installation and configuration instructions for the plugin.

## Qenta Checkout Seamless
Qenta Checkout Page is designed to meet the ambitious demands of merchants offering a wide range of payment methods while at the same time fulfilling PCI DSS compliance.

Qenta Checkout Page offers:
QENTA Checkout Page is designed to meet the ambitious demands of merchants offering a wide range of payment methods while at the same time fulfilling PCI DSS compliance.

QENTA Checkout Page offers:

- National and international payment methods: credit cards, debit cards, online banking payments, mobile payment solutions and other alternative payment methods.
- One interface for all payment methods.
- Intuitive user interface in more than 25 languages and 120 currencies.
Expand Down
3 changes: 2 additions & 1 deletion modules/qenta/checkoutseamless/autoloader.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
<?php

/**
* Shop System Plugins
* - Terms of use can be found under
* https://guides.qenta.com/shop_plugins:info
* - License can be found under:
* https://github.com/qenta-cee/oxid-qcs/blob/master/LICENSE
*/
*/

ini_set('include_path', ini_get('include_path') . PATH_SEPARATOR . dirname(__FILE__) . '/vendor');

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<?php

/**
* Shop System Plugins
* - Terms of use can be found under
* https://guides.qenta.com/shop_plugins:info
* - License can be found under:
* https://github.com/qenta-cee/oxid-qcs/blob/master/LICENSE
*/

*/

class qentacheckoutseamlessSubmitConfig extends oxAdminView
{
Expand Down Expand Up @@ -65,7 +65,7 @@ public function getModuleConfig()
include('../modules/' . $aModules['qentacheckoutseamless'] . '/metadata.php');

foreach ($aModule['settings'] as $k => $aParams) {
if ($aParams['name'] !== 'sWcpSecret') {
if ($aParams['name'] !== 'sQcpSecret') {
$params[$aParams['name']] = $oConfig->getConfigParam($aParams['name']);
} else {
$params[$aParams['name']] = str_pad('', strlen($oConfig->getConfigParam($aParams['name'])), 'X');
Expand Down Expand Up @@ -100,8 +100,10 @@ public function submit()
}

$Mail = oxRegistry::get('oxemail');
$Mail->setFrom(oxRegistry::getConfig()->getActiveShop()->oxshops__oxowneremail->rawValue,
oxRegistry::getConfig()->getActiveShop()->oxshops__oxname->rawValue);
$Mail->setFrom(
oxRegistry::getConfig()->getActiveShop()->oxshops__oxowneremail->rawValue,
oxRegistry::getConfig()->getActiveShop()->oxshops__oxname->rawValue
);
$Mail->setRecipient($recipient);
$Mail->setBody('<p>' . $confString . '</p><p>' . $comment . '</p>');
$Mail->setAltBody($confString . "\n\n" . $comment);
Expand All @@ -114,4 +116,4 @@ public function submit()
$oSmarty->assign("sSuccessMessage", 'SUCCESS');
}
}
}
}
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
<?php

/**
* Shop System Plugins
* - Terms of use can be found under
* https://guides.qenta.com/shop_plugins:info
* - License can be found under:
* https://github.com/qenta-cee/oxid-qcs/blob/master/LICENSE
*/
*/

require_once getShopBasePath() . 'modules/qenta/checkoutseamless/autoloader.php';

/**
* Order class wrapper for Wirecard Checkout seamless
* Order class wrapper for QENTA Checkout seamless
*
* @see order
*/
class qentaCheckoutSeamlessOrder extends qentaCheckoutSeamlessOrder_parent
{
/**
* Checks if order payment is a Wirecard payment and redirect
* Checks if order payment is a QENTA payment and redirect
*
* @param int $iSuccess order state
*
Expand All @@ -38,7 +39,7 @@ protected function _getNextStep($iSuccess)

/** @var qentaCheckoutSeamlessOrderDbGateway $oDbOrder */
$oDbOrder = oxNew('qentaCheckoutSeamlessOrderDbGateway');
$aOrderData = Array(
$aOrderData = array(
'BASKET' => serialize(oxRegistry::getSession()->getBasket()),
'OXORDERID' => $oOrder->getId()
);
Expand All @@ -64,15 +65,14 @@ protected function _getNextStep($iSuccess)
$oResponse = $frontend->initiate();

if ($oResponse->hasFailed()) {
$aFormattedErrors = Array();
foreach ($oResponse->getErrors() AS $error) {
$aFormattedErrors = array();
foreach ($oResponse->getErrors() as $error) {
$aFormattedErrors[] = $error->getConsumerMessage();
}

if($config->getDeleteFailedOrCanceledOrders()) {
if ($config->getDeleteFailedOrCanceledOrders()) {
$oOrder->delete();
}
else {
} else {
$oOrder->cancelOrder();
$oOrder->oxorder__oxtransstatus = new oxField('FAILED');
$oOrder->save();
Expand All @@ -90,14 +90,12 @@ protected function _getNextStep($iSuccess)
} else {
$utils->redirect($oResponse->getRedirectUrl());
}

} catch (Exception $e) {
oxRegistry::getSession()->setVariable('payerror', -1);
oxRegistry::getSession()->setVariable('payerrortext', $e->getMessage());
qentaCheckoutSeamlessUtils::getInstance()->log(__METHOD__ . ':ERROR:' . $e->getMessage());
$utils->redirect($redirectErrorUrl);
}

} else {
return parent::_getNextStep($iSuccess);
}
Expand Down Expand Up @@ -148,7 +146,8 @@ public function qentaIframeBreakout()
$sRedirectUrl = json_encode($sRedirectUrl);
/** @var oxUtils $utils */
$utils = oxRegistry::get('oxUtils');
$utils->showMessageAndExit(<<<EOT
$utils->showMessageAndExit(
<<<EOT
<!DOCTYPE>
<html>
<head>
Expand Down Expand Up @@ -199,7 +198,7 @@ public function qentaConfirm()
return;
}

if(in_array($oOrder->oxorder__oxtransstatus, array('PAID'))) {
if (in_array($oOrder->oxorder__oxtransstatus, array('PAID'))) {
qentaCheckoutSeamlessUtils::getInstance()->log(__METHOD__ . ':ORDER: can\'t update order state, since it is already in a final state: ' . $oOrder->oxorder__oxtransstatus);
print WirecardCEE_QMore_ReturnFactory::generateConfirmResponseString('Can\'t update order state, since it is already in a final state.');

Expand Down Expand Up @@ -278,7 +277,7 @@ public function qentaConfirm()
$sClass = "qentaCheckoutSeamlessBasket";
$oBasket = unserialize(preg_replace('/^O:\d+:"[^"]++"/', 'O:' . strlen($sClass) . ':"' . $sClass . '"', $aOrderData['BASKET']));

if($sendEmail) {
if ($sendEmail) {
$oOrder->sendQentaCheckoutSeamlessOrderByEmail($oBasket, $oOxUserPayment);
}

Expand All @@ -290,10 +289,9 @@ public function qentaConfirm()

$oDbOrder->delete($aOrderData['OXID']);

if($config->getDeleteFailedOrCanceledOrders()) {
if ($config->getDeleteFailedOrCanceledOrders()) {
$oOrder->delete();
}
else {
} else {
$oOrder->cancelOrder();
$oOrder->oxorder__oxtransstatus = new oxField('CANCELED');
$oOrder->save();
Expand All @@ -302,14 +300,15 @@ public function qentaConfirm()

case WirecardCEE_QMore_ReturnFactory::STATE_FAILURE:
/** @var $return WirecardCEE_QMore_Return_Failure */
qentaCheckoutSeamlessUtils::getInstance()->log(__METHOD__ . ':FAILURE:' . print_r($return->getErrors(),
true));
qentaCheckoutSeamlessUtils::getInstance()->log(__METHOD__ . ':FAILURE:' . print_r(
$return->getErrors(),
true
));

$oDbOrder->delete($aOrderData['OXID']);
if($config->getDeleteFailedOrCanceledOrders()) {
if ($config->getDeleteFailedOrCanceledOrders()) {
$oOrder->delete();
}
else {
} else {
$oOrder->cancelOrder();
$oOrder->oxorder__oxtransstatus = new oxField('CANCELED');
$oOrder->save();
Expand Down
Loading

0 comments on commit b136199

Please sign in to comment.