diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index 46103fa..f240aec 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -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 @@ -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 diff --git a/README.md b/README.md index a1466fa..ac13fa9 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/modules/qenta/checkoutseamless/autoloader.php b/modules/qenta/checkoutseamless/autoloader.php index 2a89643..401ca0d 100644 --- a/modules/qenta/checkoutseamless/autoloader.php +++ b/modules/qenta/checkoutseamless/autoloader.php @@ -1,11 +1,12 @@ $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'); @@ -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('

' . $confString . '

' . $comment . '

'); $Mail->setAltBody($confString . "\n\n" . $comment); @@ -114,4 +116,4 @@ public function submit() $oSmarty->assign("sSuccessMessage", 'SUCCESS'); } } -} \ No newline at end of file +} diff --git a/modules/qenta/checkoutseamless/controllers/qentacheckoutseamlessorder.php b/modules/qenta/checkoutseamless/controllers/qentacheckoutseamlessorder.php index c11ea75..72baae2 100644 --- a/modules/qenta/checkoutseamless/controllers/qentacheckoutseamlessorder.php +++ b/modules/qenta/checkoutseamless/controllers/qentacheckoutseamlessorder.php @@ -1,23 +1,24 @@ serialize(oxRegistry::getSession()->getBasket()), 'OXORDERID' => $oOrder->getId() ); @@ -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(); @@ -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); } @@ -148,7 +146,8 @@ public function qentaIframeBreakout() $sRedirectUrl = json_encode($sRedirectUrl); /** @var oxUtils $utils */ $utils = oxRegistry::get('oxUtils'); - $utils->showMessageAndExit(<<showMessageAndExit( + << @@ -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.'); @@ -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); } @@ -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(); @@ -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(); diff --git a/modules/qenta/checkoutseamless/controllers/qentacheckoutseamlesspayment.php b/modules/qenta/checkoutseamless/controllers/qentacheckoutseamlesspayment.php index 666c1e5..f69113c 100644 --- a/modules/qenta/checkoutseamless/controllers/qentacheckoutseamlesspayment.php +++ b/modules/qenta/checkoutseamless/controllers/qentacheckoutseamlesspayment.php @@ -1,11 +1,12 @@ _initQentaDatastorage(); + setcookie("sid", $_COOKIE['sid'], time() + 60, "/" . '; samesite=' . "None", $_SESSION['host'], true, false); + return $sReturn; } @@ -50,8 +53,8 @@ public function validatePayment() { $parentResult = parent::validatePayment(); - $aValues = Array(); - $sPaymentId = (string )oxRegistry::getConfig()->getRequestParameter('paymentid'); + $aValues = array(); + $sPaymentId = (string)oxRegistry::getConfig()->getRequestParameter('paymentid'); $sPaymenttype = qentaCheckoutSeamlessUtils::getInstance()->convertPaymenttype($sPaymentId); $config = qentaCheckoutSeamlessConfig::getInstance(); $oUser = $this->getUser(); @@ -84,9 +87,13 @@ public function validatePayment() if ($this->showQcsTrustedShopsCheckbox($sPaymentId)) { if (!oxRegistry::getConfig()->getRequestParameter('payolutionTerms')) { - oxRegistry::getSession()->setVariable('qcs_payerrortext', - $oLang->translateString('QENTA_CHECKOUT_SEAMLESS_CONFIRM_PAYOLUTION_TERMS', - $oLang->getBaseLanguage())); + oxRegistry::getSession()->setVariable( + 'qcs_payerrortext', + $oLang->translateString( + 'QENTA_CHECKOUT_SEAMLESS_CONFIRM_PAYOLUTION_TERMS', + $oLang->getBaseLanguage() + ) + ); $oSmarty = oxRegistry::get("oxUtilsView")->getSmarty(); $oSmarty->assign("aErrors", array('payolutionTerms' => 1)); @@ -106,9 +113,13 @@ public function validatePayment() $iBirthdayMonth = oxRegistry::getConfig()->getRequestParameter($sPaymentId . '_iBirthdayMonth'); if (empty($iBirthdayYear) || empty($iBirthdayDay) || empty($iBirthdayMonth)) { - oxRegistry::getSession()->setVariable('qcs_payerrortext', - $oLang->translateString('QENTA_CHECKOUT_SEAMLESS_PLEASE_FILL_IN_DOB', - $oLang->getBaseLanguage())); + oxRegistry::getSession()->setVariable( + 'qcs_payerrortext', + $oLang->translateString( + 'QENTA_CHECKOUT_SEAMLESS_PLEASE_FILL_IN_DOB', + $oLang->getBaseLanguage() + ) + ); return; } @@ -118,26 +129,36 @@ public function validatePayment() oxRegistry::getSession()->setVariable('qcs_dobData', $dateData); if (is_array($dateData)) { - $oUser->oxuser__oxbirthdate = new oxField($oUser->convertBirthday($dateData), - oxField::T_RAW); + $oUser->oxuser__oxbirthdate = new oxField( + $oUser->convertBirthday($dateData), + oxField::T_RAW + ); $oUser->save(); } } //validate paymethod if (!$this->qcsValidateCustomerAge($oUser, 18)) { - oxRegistry::getSession()->setVariable('qcs_payerrortext', - sprintf($oLang->translateString('QENTA_CHECKOUT_SEAMLESS_DOB_TOO_YOUNG', - $oLang->getBaseLanguage()), 18)); + oxRegistry::getSession()->setVariable( + 'qcs_payerrortext', + sprintf($oLang->translateString( + 'QENTA_CHECKOUT_SEAMLESS_DOB_TOO_YOUNG', + $oLang->getBaseLanguage() + ), 18) + ); return; } if ($this->showQcsInstallmentTrustedShopsCheckbox($sPaymentId)) { if (!oxRegistry::getConfig()->getRequestParameter('payolutionTerms')) { - oxRegistry::getSession()->setVariable('qcs_payerrortext', - $oLang->translateString('QENTA_CHECKOUT_SEAMLESS_CONFIRM_PAYOLUTION_TERMS', - $oLang->getBaseLanguage())); + oxRegistry::getSession()->setVariable( + 'qcs_payerrortext', + $oLang->translateString( + 'QENTA_CHECKOUT_SEAMLESS_CONFIRM_PAYOLUTION_TERMS', + $oLang->getBaseLanguage() + ) + ); $oSmarty = oxRegistry::get("oxUtilsView")->getSmarty(); $oSmarty->assign("aErrors", array('payolutionTerms' => 1)); @@ -186,7 +207,6 @@ protected function _initQentaDatastorage() return; } - } public function getQentaStorageJsUrl() @@ -289,25 +309,25 @@ public function datastorageReturn() { $sFallbackResponse = oxRegistry::getConfig()->getRequestParameter('response'); echo ' - - - - - - -'; + + + + + + + '; exit(); } @@ -340,7 +360,7 @@ public function getQentaCheckoutSeamlessFinancialInstitutions($sPaymentID) $financialInstitutions = array(); try { - $_client = new WirecardCEE_QMore_BackendClient(Array( + $_client = new WirecardCEE_QMore_BackendClient(array( 'CUSTOMER_ID' => $config->getCustomerId(), 'SHOP_ID' => $config->getShopId(), 'LANGUAGE' => $oLang->getLanguageAbbr(), @@ -354,10 +374,14 @@ public function getQentaCheckoutSeamlessFinancialInstitutions($sPaymentID) $financialInstitutions[$institution["id"]] = $institution["name"]; } - $this->getSession()->setVariable('qentaCheckoutSeamlessTrustPayFinancialInstitutions', - $financialInstitutions); - $this->getSession()->setVariable('qentaCheckoutSeamlessTrustPayFinancialInstitutionsLastModified', - time()); + $this->getSession()->setVariable( + 'qentaCheckoutSeamlessTrustPayFinancialInstitutions', + $financialInstitutions + ); + $this->getSession()->setVariable( + 'qentaCheckoutSeamlessTrustPayFinancialInstitutionsLastModified', + time() + ); } catch (Exception $e) { $financialInstitutions = array(); $this->getSession()->deleteVariable('qentaCheckoutSeamlessTrustPayFinancialInstitutions'); @@ -367,7 +391,7 @@ public function getQentaCheckoutSeamlessFinancialInstitutions($sPaymentID) return $financialInstitutions; } else { - return Array(); + return array(); } } @@ -422,7 +446,8 @@ public function qcsValidateAddresses($oUser, $oOrder) //if delivery Address is not set it's the same as billing $oDelAddress = $oOrder->getDelAddressInfo(); if ($oDelAddress) { - if ($oDelAddress->oxaddress__oxcompany->value != $oUser->oxuser__oxcompany->value || + if ( + $oDelAddress->oxaddress__oxcompany->value != $oUser->oxuser__oxcompany->value || $oDelAddress->oxaddress__oxfname->value != $oUser->oxuser__oxfname->value || $oDelAddress->oxaddress__oxlname->value != $oUser->oxuser__oxlname->value || $oDelAddress->oxaddress__oxstreet->value != $oUser->oxuser__oxstreet->value || @@ -449,7 +474,7 @@ public function qcsValidateAddresses($oUser, $oOrder) * @param Array $aAllowedCurrencies * @return boolean */ - public function qcsValidateCurrency($oBasket, $aAllowedCurrencies = Array('EUR')) + public function qcsValidateCurrency($oBasket, $aAllowedCurrencies = array('EUR')) { $currency = $oBasket->getBasketCurrency(); if (!in_array($currency->name, $aAllowedCurrencies)) { @@ -607,60 +632,66 @@ function showQcsTrustedShopsCheckbox($sPaymentId) } } - function showQcsInstallmentTrustedShopsCheckbox($sPaymentId) - { - $config = qentaCheckoutSeamlessConfig::getInstance(); + function showQcsInstallmentTrustedShopsCheckbox($sPaymentId) + { + $config = qentaCheckoutSeamlessConfig::getInstance(); - if ($config->getInstallmentProvider() == 'PAYOLUTION') { - return $config->getInstallmentTrustedShopsCheckbox(); - } - return false; - } + if ($config->getInstallmentProvider() == 'PAYOLUTION') { + return $config->getInstallmentTrustedShopsCheckbox(); + } + return false; + } function getQcsInvoicePayolutionTerms() { $oLang = oxRegistry::get('oxLang'); $config = qentaCheckoutSeamlessConfig::getInstance(); - return sprintf($oLang->translateString('QENTA_CHECKOUT_SEAMLESS_PAYOLUTION_TERMS', - $oLang->getBaseLanguage()), - 'https://payment.payolution.com/payolution-payment/infoport/dataprivacyconsent?mId=' . $config->getInvoicePayolutionMId()); + return sprintf( + $oLang->translateString( + 'QENTA_CHECKOUT_SEAMLESS_PAYOLUTION_TERMS', + $oLang->getBaseLanguage() + ), + 'https://payment.payolution.com/payolution-payment/infoport/dataprivacyconsent?mId=' . $config->getInvoicePayolutionMId() + ); } - function getQcsInstallmentPayolutionTerms() - { - $oLang = oxRegistry::get('oxLang'); - $config = qentaCheckoutSeamlessConfig::getInstance(); - - return sprintf($oLang->translateString('QENTA_CHECKOUT_SEAMLESS_PAYOLUTION_TERMS', - $oLang->getBaseLanguage()), - 'https://payment.payolution.com/payolution-payment/infoport/dataprivacyconsent?mId=' . $config->getInstallmentPayolutionMId()); - } - - function getQcsRatePayConsumerDeviceId() - { - $config = qentaCheckoutSeamlessConfig::getInstance(); - - if(isset($_SESSION['qcs-consumerDeviceId'])) { - $consumerDeviceId = $_SESSION['qcs-consumerDeviceId']; - } else { - $timestamp = microtime(); - $customerId = $config->getCustomerId(); - $consumerDeviceId = md5($customerId . "_" . $timestamp); - $_SESSION['qcs-consumerDeviceId'] = $consumerDeviceId; - } - - if($config->getInvoiceProvider() == 'RATEPAY' || $config->getInstallmentProvider() == 'RATEPAY') - { - $ratepay = ''; - $ratepay .= ''; - $ratepay .= ''; - $ratepay .= ''; + function getQcsInstallmentPayolutionTerms() + { + $oLang = oxRegistry::get('oxLang'); + $config = qentaCheckoutSeamlessConfig::getInstance(); - return $ratepay; + return sprintf( + $oLang->translateString( + 'QENTA_CHECKOUT_SEAMLESS_PAYOLUTION_TERMS', + $oLang->getBaseLanguage() + ), + 'https://payment.payolution.com/payolution-payment/infoport/dataprivacyconsent?mId=' . $config->getInstallmentPayolutionMId() + ); + } + + function getQcsRatePayConsumerDeviceId() + { + $config = qentaCheckoutSeamlessConfig::getInstance(); + + if (isset($_SESSION['qcs-consumerDeviceId'])) { + $consumerDeviceId = $_SESSION['qcs-consumerDeviceId']; + } else { + $timestamp = microtime(); + $customerId = $config->getCustomerId(); + $consumerDeviceId = md5($customerId . "_" . $timestamp); + $_SESSION['qcs-consumerDeviceId'] = $consumerDeviceId; } - } + if ($config->getInvoiceProvider() == 'RATEPAY' || $config->getInstallmentProvider() == 'RATEPAY') { + $ratepay = ''; + $ratepay .= ''; + $ratepay .= ''; + $ratepay .= ''; + + return $ratepay; + } + } /** * @return mixed diff --git a/modules/qenta/checkoutseamless/controllers/qentacheckoutseamlessthankyou.php b/modules/qenta/checkoutseamless/controllers/qentacheckoutseamlessthankyou.php index 10c0a8e..1e0c87b 100644 --- a/modules/qenta/checkoutseamless/controllers/qentacheckoutseamlessthankyou.php +++ b/modules/qenta/checkoutseamless/controllers/qentacheckoutseamlessthankyou.php @@ -1,15 +1,16 @@ _oOrder->oxorder__oxtransstatus == 'PENDING'; } - } diff --git a/modules/qenta/checkoutseamless/core/qentacheckoutseamlessconfig.php b/modules/qenta/checkoutseamless/core/qentacheckoutseamlessconfig.php index 54be9eb..07aabd2 100644 --- a/modules/qenta/checkoutseamless/core/qentacheckoutseamlessconfig.php +++ b/modules/qenta/checkoutseamless/core/qentacheckoutseamlessconfig.php @@ -1,14 +1,15 @@ _getConfig()->getConfigParam('sDeleteFailedOrCanceledOrders'); } @@ -199,7 +201,7 @@ public function getSendShippingData() public function getSendBillingData() { - return $this->_getConfig()->getConfigParam('bSendAdditionalCustomerBilling'); + return $this->_getConfig()->getConfigParam('bSendAdditionalCustomerBilling'); } public function getInvoiceProvider() @@ -207,20 +209,20 @@ public function getInvoiceProvider() return $this->_getConfig()->getConfigParam('sInvoiceProvider'); } - public function getInstallmentProvider() - { - return $this->_getConfig()->getConfigParam('sInstallmentProvider'); - } + public function getInstallmentProvider() + { + return $this->_getConfig()->getConfigParam('sInstallmentProvider'); + } public function getInstallmentPayolutionMId() { return $this->_getConfig()->getConfigParam('sInstallmentPayolutionMId'); } - public function getInvoicePayolutionMId() - { - return $this->_getConfig()->getConfigParam('sInvoicePayolutionMId'); - } + public function getInvoicePayolutionMId() + { + return $this->_getConfig()->getConfigParam('sInvoicePayolutionMId'); + } public function getInstallmentTrustedShopsCheckbox() { @@ -252,10 +254,10 @@ public function getInvoiceAllowDifferingAddresses() return $this->_getConfig()->getConfigParam('bInvoiceAllowDifferingAddresses'); } - public function getInstallmentAllowDifferingAddresses() - { - return $this->_getConfig()->getConfigParam('bInstallmentAllowDifferingAddresses'); - } + public function getInstallmentAllowDifferingAddresses() + { + return $this->_getConfig()->getConfigParam('bInstallmentAllowDifferingAddresses'); + } public function getFinancialInstitutionsLastModifiedTimer() { diff --git a/modules/qenta/checkoutseamless/core/qentacheckoutseamlessoxviewconfig.php b/modules/qenta/checkoutseamless/core/qentacheckoutseamlessoxviewconfig.php index e103c64..4d7bdbd 100644 --- a/modules/qenta/checkoutseamless/core/qentacheckoutseamlessoxviewconfig.php +++ b/modules/qenta/checkoutseamless/core/qentacheckoutseamlessoxviewconfig.php @@ -1,11 +1,12 @@ _oQentaCheckoutSeamlesConfig; } - - } diff --git a/modules/qenta/checkoutseamless/metadata.php b/modules/qenta/checkoutseamless/metadata.php index 08ea167..f7c0b3c 100644 --- a/modules/qenta/checkoutseamless/metadata.php +++ b/modules/qenta/checkoutseamless/metadata.php @@ -18,7 +18,7 @@ */ $aModule = array( 'id' => 'qentacheckoutseamless', - 'title' => 'QMORE Checkout Seamless', + 'title' => 'QENTA Checkout Seamless', 'description' => array( 'de' => 'Modul zur Bezahlung mit QENTA Checkout Seamless.

Support und Vertrieb:
Support
Sales
', 'en' => 'Module for payment using QENTA Checkout Seamless.

Support and sales information
support
sales
', diff --git a/modules/qenta/checkoutseamless/models/qentacheckoutseamlessfrontend.php b/modules/qenta/checkoutseamless/models/qentacheckoutseamlessfrontend.php index b8c8039..652c640 100644 --- a/modules/qenta/checkoutseamless/models/qentacheckoutseamlessfrontend.php +++ b/modules/qenta/checkoutseamless/models/qentacheckoutseamlessfrontend.php @@ -1,11 +1,12 @@ _client = new WirecardCEE_QMore_FrontendClient(Array( + $this->_client = new WirecardCEE_QMore_FrontendClient(array( 'CUSTOMER_ID' => $config->getCustomerId(), 'SHOP_ID' => $config->getShopId(), 'LANGUAGE' => $oLang->getLanguageAbbr(), @@ -35,7 +36,8 @@ public function __construct() 'OXID ' . $config->getOxConfig()->getEdition(), $config->getOxConfig()->getVersion() . ' Revision: ' . $config->getOxConfig()->getRevision(), $config->getModuleId(), - $config->getPluginVersion()); + $config->getPluginVersion() + ); $this->_client->setPluginVersion($pluginVersion); @@ -48,8 +50,10 @@ public function __construct() /** @var oxUtilsUrl $util */ $util = oxRegistry::get("oxUtilsUrl"); - $this->_client->setConfirmUrl($util->cleanUrlParams($sHomeUrl . 'cl=order&fnc=qentaConfirm&stoken=' . '&' . oxRegistry::getSession()->sid(true) . '&rtoken=' . $sRtoken, - '&')); + $this->_client->setConfirmUrl($util->cleanUrlParams( + $sHomeUrl . 'cl=order&fnc=qentaConfirm&stoken=' . '&' . oxRegistry::getSession()->sid(true) . '&rtoken=' . $sRtoken, + '&' + )); $this->_client->setSuccessUrl($util->cleanUrlParams($sHomeUrl . 'cl=order&fnc=qentaSuccess', '&')); $this->_client->setPendingUrl($util->cleanUrlParams($sHomeUrl . 'cl=order&fnc=qentaPending', '&')); $this->_client->setCancelUrl($util->cleanUrlParams($sHomeUrl . 'cl=order&fnc=qentaCancel', '&')); @@ -63,16 +67,18 @@ public function __construct() $this->_client->setAutoDeposit($config->getAutoDeposit()); $this->_client->setConfirmMail($config->getConfirmMail()); $this->_client->createConsumerMerchantCrmId($oOrder->getFieldData('oxbillemail')); - if(isset($_SESSION['qcs-consumerDeviceId'])){ - $this->_client->consumerDeviceId = $_SESSION['qcs-consumerDeviceId']; - unset($_SESSION['qcs-consumerDeviceId']); - } + if (isset($_SESSION['qcs-consumerDeviceId'])) { + $this->_client->consumerDeviceId = $_SESSION['qcs-consumerDeviceId']; + unset($_SESSION['qcs-consumerDeviceId']); + } } public function initiate() { - $this->_client->setStorageReference(oxRegistry::getSession()->getId(), - qentaCheckoutSeamlessDataStorage::getInstance()->getStorageId()); + $this->_client->setStorageReference( + oxRegistry::getSession()->getId(), + qentaCheckoutSeamlessDataStorage::getInstance()->getStorageId() + ); return $this->_client->initiate(); } @@ -133,49 +139,51 @@ public function setConsumerData(oxOrder $oOrder, $paymentType) if ($config->getSendBillingData() || in_array($paymentType, array('INVOICE_B2B', 'INVOICE_B2C', 'INSTALLMENT'))) { - $consumerData->setEmail( $oOrder->getFieldData( 'oxbillemail' ) ); - $oUser = $oOrder->getOrderUser(); - $oUser->oxuser__oxustid->value; - - if ( ! empty( $oUser->oxuser__oxustid->value ) ) { - $consumerData->setCompanyVatId( $oUser->oxuser__oxustid->value ); - } - - if ( ! empty( $oUser->oxuser__oxcompany->value ) ) { - $consumerData->setCompanyName( $oUser->oxuser__oxcompany->value ); - } + $consumerData->setEmail($oOrder->getFieldData('oxbillemail')); + $oUser = $oOrder->getOrderUser(); + $oUser->oxuser__oxustid->value; + if (!empty($oUser->oxuser__oxustid->value)) { + $consumerData->setCompanyVatId($oUser->oxuser__oxustid->value); + } - // processing birth date which came from output as array - $consumerBirthDate = is_array( $oUser->oxuser__oxbirthdate->value ) ? $oUser->convertBirthday( $oUser->oxuser__oxbirthdate->value ) : $oUser->oxuser__oxbirthdate->value; + if (!empty($oUser->oxuser__oxcompany->value)) { + $consumerData->setCompanyName($oUser->oxuser__oxcompany->value); + } - if ( $consumerBirthDate != '0000-00-00' ) { - $consumerData->setBirthDate( new DateTime( $consumerBirthDate ) ); - } - // billing Address - $billingAddressObj = new WirecardCEE_Stdlib_ConsumerData_Address( WirecardCEE_Stdlib_ConsumerData_Address::TYPE_BILLING ); - $billingAddressObj->setFirstname( $oOrder->getFieldData( 'oxbillfname' ) ); - $billingAddressObj->setLastname( $oOrder->getFieldData( 'oxbilllname' ) ); - $billingAddressObj->setAddress1( $oOrder->getFieldData( 'oxbillstreet' ) ); - $billingAddressObj->setAddress2( $oOrder->getFieldData( 'oxbillstreetnr' ) ); - $billingAddressObj->setCity( $oOrder->getFieldData( 'oxbillcity' ) ); + // processing birth date which came from output as array + $consumerBirthDate = is_array($oUser->oxuser__oxbirthdate->value) ? $oUser->convertBirthday($oUser->oxuser__oxbirthdate->value) : $oUser->oxuser__oxbirthdate->value; - $sBillingCountryId = $oOrder->getFieldData( 'oxbillcountryid' ); - $oDB = oxDb::GetDB(); - $sBillingCountry = $oDB->getOne( "select oxisoalpha2 from oxcountry where oxid = '$sBillingCountryId'" ); + if ($consumerBirthDate != '0000-00-00') { + $consumerData->setBirthDate(new DateTime($consumerBirthDate)); + } - $billingAddressObj->setCountry( $sBillingCountry ); - $billingAddressObj->setState( $oOrder->getFieldData( 'oxbillstateid' ) ); - $billingAddressObj->setZipCode( $oOrder->getFieldData( 'oxbillzip' ) ); - $billingAddressObj->setFax( $oOrder->getFieldData( 'oxbillfax' ) ); - $billingAddressObj->setPhone( $oOrder->getFieldData( 'oxbillfon' ) ); - $consumerData->addAddressInformation( $billingAddressObj ); + // billing Address + $billingAddressObj = new WirecardCEE_Stdlib_ConsumerData_Address(WirecardCEE_Stdlib_ConsumerData_Address::TYPE_BILLING); + $billingAddressObj->setFirstname($oOrder->getFieldData('oxbillfname')); + $billingAddressObj->setLastname($oOrder->getFieldData('oxbilllname')); + $billingAddressObj->setAddress1($oOrder->getFieldData('oxbillstreet')); + $billingAddressObj->setAddress2($oOrder->getFieldData('oxbillstreetnr')); + $billingAddressObj->setCity($oOrder->getFieldData('oxbillcity')); + + $sBillingCountryId = $oOrder->getFieldData('oxbillcountryid'); + $oDB = oxDb::GetDB(); + $sBillingCountry = $oDB->getOne("select oxisoalpha2 from oxcountry where oxid = '$sBillingCountryId'"); + + $billingAddressObj->setCountry($sBillingCountry); + $billingAddressObj->setState($oOrder->getFieldData('oxbillstateid')); + $billingAddressObj->setZipCode($oOrder->getFieldData('oxbillzip')); + $billingAddressObj->setFax($oOrder->getFieldData('oxbillfax')); + $billingAddressObj->setPhone($oOrder->getFieldData('oxbillfon')); + $consumerData->addAddressInformation($billingAddressObj); } - // shipping address - if ($config->getSendShippingData() - || (in_array($paymentType, array('INVOICE_B2B', 'INVOICE_B2C')) && $config->getInvoiceProvider() != 'PAYOLUTION') - || ($paymentType == 'INSTALLMENT' && $config->getInstallmentProvider() != 'PAYOLUTION')) { + // shipping address + if ( + $config->getSendShippingData() + || (in_array($paymentType, array('INVOICE_B2B', 'INVOICE_B2C')) && $config->getInvoiceProvider() != 'PAYOLUTION') + || ($paymentType == 'INSTALLMENT' && $config->getInstallmentProvider() != 'PAYOLUTION') + ) { $shippingAddressObj = new WirecardCEE_Stdlib_ConsumerData_Address(WirecardCEE_Stdlib_ConsumerData_Address::TYPE_SHIPPING); $oShippingData = $oOrder->getDelAddressInfo(); @@ -224,101 +232,106 @@ public function setConsumerData(oxOrder $oOrder, $paymentType) /** - * Set Wirecard Basket Data to Frontend Client + * Set QENTA Basket Data to Frontend Client * * @param oxOrder $oOrder * * @return qentaCheckoutSeamlessFrontend */ - public function setBasket(oxOrder $oOrder, $paymentType) - { - /** @var qentaCheckoutSeamlessConfig $config */ - $config = qentaCheckoutSeamlessConfig::getInstance(); - - if ($config->getSendAdditionalBasketData() - || ((in_array($paymentType, array('INVOICE_B2B', 'INVOICE_B2C')) - && $config->getInvoiceProvider() != 'PAYOLUTION') - || ($paymentType == 'INSTALLMENT' && $config->getInstallmentProvider() != 'PAYOLUTION')) - ) { - $oOrderArticles = $oOrder->getOrderArticles(); - $oLang = oxRegistry::get('oxLang'); - $iLangId = $oLang->getBaseLanguage(); - - $basketItemsCount = 0; - $basket = new WirecardCEE_Stdlib_Basket(); - - foreach ($oOrderArticles as $oOrderArticle) { - $netPrice = number_format($oOrderArticle->oxorderarticles__oxnprice->rawValue, 2); - $netTax = number_format($oOrderArticle->oxorderarticles__oxbprice->rawValue - $oOrderArticle->oxorderarticles__oxnprice->rawValue, - 2); - $amount = $oOrderArticle->oxorderarticles__oxamount->rawValue; - $item = new WirecardCEE_Stdlib_Basket_Item($oOrderArticle->oxorderarticles__oxartnum->rawValue); - - $item->setUnitGrossAmount(number_format($oOrderArticle->oxorderarticles__oxbprice->rawValue, 2, '.', '')) - ->setUnitNetAmount(number_format($netPrice, 2, '.', '')) - ->setUnitTaxAmount(number_format($netTax, 2, '.', '')) - ->setUnitTaxRate(number_format($oOrderArticle->oxarticles__oxvat->rawValue, 3, '.', '')) - ->setDescription(strip_tags($oOrderArticle->oxarticles__oxshortdesc->rawValue)) - ->setName($oOrderArticle->oxarticles__oxtitle->rawValue); - - if (strlen($oOrderArticle->oxorderarticles__oxurlimg->rawValue)) { - $item->setImageUrl($oOrderArticle->oxorderarticles__oxurlimg->rawValue); - } - - $basket->addItem($item, $amount); - } - //add possible additional costs as articles to basket - $aAdditionalCosts = array( - 'shipping cost' => array( - 'description' => $oLang->translateString('SHIPPING_COST', $iLangId), - 'vat' => $oOrder->oxorder__oxdelvat->rawValue, - 'price' => $oOrder->oxorder__oxdelcost->rawValue - ), - 'paymethod cost' => array( - 'description' => $oLang->translateString('SURCHARGE', - $iLangId) . ' ' . $oLang->translateString('PAYMENT_METHOD', $iLangId), - 'vat' => $oOrder->oxorder__oxpayvat->rawValue, - 'price' => $oOrder->oxorder__oxpaycost->rawValue - ), - 'wrapping cost' => array( - 'description' => $oLang->translateString('GIFT_WRAPPING', $iLangId), - 'vat' => $oOrder->oxorder__oxwrapvat->rawValue, - 'price' => $oOrder->oxorder__oxwrapcost->rawValue - ), - 'gift card cost' => array( - 'description' => $oLang->translateString('GREETING_CARD', $iLangId), - 'vat' => $oOrder->oxorder__oxgiftcardvat->rawValue, - 'price' => $oOrder->oxorder__oxgiftcardcost->rawValue - ), - 'discount' => array( - 'description' => $oLang->translateString('DISCOUNT', $iLangId), - 'vat' => 0, - 'price' => $oOrder->oxorder__oxdiscount->rawValue * -1 - ), - ); - - foreach ($aAdditionalCosts as $type => $data) { - if ($data['price'] != 0) { - $basketItemsCount++; - $netTaxAdditional = number_format($data['price'] * ($data['vat'] / 100), 2); - $netPriceAdditional = number_format($data['price'] - $netTaxAdditional, 2); - $item = new WirecardCEE_Stdlib_Basket_Item($type); - - $item->setUnitGrossAmount(number_format($data['price'], 2, '.', '')) - ->setUnitNetAmount(number_format($netPriceAdditional, 2, '.', '')) - ->setUnitTaxAmount(number_format($netTaxAdditional, 2, '.', '')) - ->setUnitTaxRate(number_format($data['vat'], 3, '.', '')) - ->setDescription(strip_tags($data['description'])) - ->setName(strip_tags($data['description'])); - - $basket->addItem($item, 1); - } - } - $this->_client->setBasket($basket); - } - - return $this; - } + public function setBasket(oxOrder $oOrder, $paymentType) + { + /** @var qentaCheckoutSeamlessConfig $config */ + $config = qentaCheckoutSeamlessConfig::getInstance(); + + if ( + $config->getSendAdditionalBasketData() + || ((in_array($paymentType, array('INVOICE_B2B', 'INVOICE_B2C')) + && $config->getInvoiceProvider() != 'PAYOLUTION') + || ($paymentType == 'INSTALLMENT' && $config->getInstallmentProvider() != 'PAYOLUTION')) + ) { + $oOrderArticles = $oOrder->getOrderArticles(); + $oLang = oxRegistry::get('oxLang'); + $iLangId = $oLang->getBaseLanguage(); + + $basketItemsCount = 0; + $basket = new WirecardCEE_Stdlib_Basket(); + + foreach ($oOrderArticles as $oOrderArticle) { + $netPrice = number_format($oOrderArticle->oxorderarticles__oxnprice->rawValue, 2); + $netTax = number_format( + $oOrderArticle->oxorderarticles__oxbprice->rawValue - $oOrderArticle->oxorderarticles__oxnprice->rawValue, + 2 + ); + $amount = $oOrderArticle->oxorderarticles__oxamount->rawValue; + $item = new WirecardCEE_Stdlib_Basket_Item($oOrderArticle->oxorderarticles__oxartnum->rawValue); + + $item->setUnitGrossAmount(number_format($oOrderArticle->oxorderarticles__oxbprice->rawValue, 2, '.', '')) + ->setUnitNetAmount(number_format($netPrice, 2, '.', '')) + ->setUnitTaxAmount(number_format($netTax, 2, '.', '')) + ->setUnitTaxRate(number_format($oOrderArticle->oxarticles__oxvat->rawValue, 3, '.', '')) + ->setDescription(strip_tags($oOrderArticle->oxarticles__oxshortdesc->rawValue)) + ->setName($oOrderArticle->oxarticles__oxtitle->rawValue); + + if (strlen($oOrderArticle->oxorderarticles__oxurlimg->rawValue)) { + $item->setImageUrl($oOrderArticle->oxorderarticles__oxurlimg->rawValue); + } + + $basket->addItem($item, $amount); + } + //add possible additional costs as articles to basket + $aAdditionalCosts = array( + 'shipping cost' => array( + 'description' => $oLang->translateString('SHIPPING_COST', $iLangId), + 'vat' => $oOrder->oxorder__oxdelvat->rawValue, + 'price' => $oOrder->oxorder__oxdelcost->rawValue + ), + 'paymethod cost' => array( + 'description' => $oLang->translateString( + 'SURCHARGE', + $iLangId + ) . ' ' . $oLang->translateString('PAYMENT_METHOD', $iLangId), + 'vat' => $oOrder->oxorder__oxpayvat->rawValue, + 'price' => $oOrder->oxorder__oxpaycost->rawValue + ), + 'wrapping cost' => array( + 'description' => $oLang->translateString('GIFT_WRAPPING', $iLangId), + 'vat' => $oOrder->oxorder__oxwrapvat->rawValue, + 'price' => $oOrder->oxorder__oxwrapcost->rawValue + ), + 'gift card cost' => array( + 'description' => $oLang->translateString('GREETING_CARD', $iLangId), + 'vat' => $oOrder->oxorder__oxgiftcardvat->rawValue, + 'price' => $oOrder->oxorder__oxgiftcardcost->rawValue + ), + 'discount' => array( + 'description' => $oLang->translateString('DISCOUNT', $iLangId), + 'vat' => 0, + 'price' => $oOrder->oxorder__oxdiscount->rawValue * -1 + ), + ); + + foreach ($aAdditionalCosts as $type => $data) { + if ($data['price'] != 0) { + $basketItemsCount++; + $netTaxAdditional = number_format($data['price'] * ($data['vat'] / 100), 2); + $netPriceAdditional = number_format($data['price'] - $netTaxAdditional, 2); + $item = new WirecardCEE_Stdlib_Basket_Item($type); + + $item->setUnitGrossAmount(number_format($data['price'], 2, '.', '')) + ->setUnitNetAmount(number_format($netPriceAdditional, 2, '.', '')) + ->setUnitTaxAmount(number_format($netTaxAdditional, 2, '.', '')) + ->setUnitTaxRate(number_format($data['vat'], 3, '.', '')) + ->setDescription(strip_tags($data['description'])) + ->setName(strip_tags($data['description'])); + + $basket->addItem($item, 1); + } + } + $this->_client->setBasket($basket); + } + + return $this; + } /** * @return qentaCheckoutSeamlessFrontend @@ -347,8 +360,11 @@ private function _getCustomerStatement($paymenttype) } elseif (strlen($orderReference) > $customerStatementLength) { $customerStatementString = substr($orderReference, -$customerStatementLength); } elseif (strlen($customerStatementString) > $customerStatementLength) { - $customerStatementString = substr($oConfig->getShopName(), 0, - $customerStatementLength - 14) . ' id:' . $orderReference; + $customerStatementString = substr( + $oConfig->getShopName(), + 0, + $customerStatementLength - 14 + ) . ' id:' . $orderReference; } return $customerStatementString; diff --git a/modules/qenta/checkoutseamless/models/qentacheckoutseamlessoxbasket.php b/modules/qenta/checkoutseamless/models/qentacheckoutseamlessoxbasket.php index 98d9e87..a9f2f50 100644 --- a/modules/qenta/checkoutseamless/models/qentacheckoutseamlessoxbasket.php +++ b/modules/qenta/checkoutseamless/models/qentacheckoutseamlessoxbasket.php @@ -1,16 +1,17 @@ 'Bitte stimmen Sie den Bedingungen von payolution zu.', 'QENTA_CHECKOUT_SEAMLESS_PAYOLUTION_TERMS' => 'Mit der Übermittlung jener Daten an payolution, die für die Abwicklung von Zahlungen mit Kauf auf Rechnung und die Identitäts- und Bonitätsprüfung erforderlich sind, bin ich einverstanden. Meine Einwilligung kann ich jederzeit mit Wirkung für die Zukunft widerrufen.', 'QENTA_CHECKOUT_SEAMLESS_VAT_ID_MISSING' => 'USt-IdNr. nicht ausgefüllt.', + 'ORDER_OVERVIEW_QENTA_CHECKOUT_SEAMLESS_PROVIDERREFERENCENUMBER' => 'Referenznummer des Anbieters', + 'ORDER_OVERVIEW_QENTA_CHECKOUT_SEAMLESS_PROVIDERCONTRACTNUMBER' => 'Vertragsnummer des Anbieters' ); diff --git a/modules/qenta/checkoutseamless/translations/en/qentacheckoutseamless_lang.php b/modules/qenta/checkoutseamless/translations/en/qentacheckoutseamless_lang.php index 0a06b8e..9b63414 100644 --- a/modules/qenta/checkoutseamless/translations/en/qentacheckoutseamless_lang.php +++ b/modules/qenta/checkoutseamless/translations/en/qentacheckoutseamless_lang.php @@ -1,11 +1,12 @@ 'Please agree to payolution terms.', 'QENTA_CHECKOUT_SEAMLESS_PAYOLUTION_TERMS' => 'I agree that the data which are necessary for the liquidation of invoice payments and which are used to complete the identity and credit check are transmitted to payolution. My consent can be revoked at any time with future effect.', 'QENTA_CHECKOUT_SEAMLESS_VAT_ID_MISSING' => 'VAT number is missing.', + 'ORDER_OVERVIEW_QENTA_CHECKOUT_SEAMLESS_PROVIDERREFERENCENUMBER' => 'Provider reference number', + 'ORDER_OVERVIEW_QENTA_CHECKOUT_SEAMLESS_PROVIDERCONTRACTNUMBER' => 'Provider contract number' ); diff --git a/modules/qenta/checkoutseamless/vendor/WirecardCEE/QMore/BackendClient.php b/modules/qenta/checkoutseamless/vendor/WirecardCEE/QMore/BackendClient.php index 469d921..39db84f 100644 --- a/modules/qenta/checkoutseamless/vendor/WirecardCEE/QMore/BackendClient.php +++ b/modules/qenta/checkoutseamless/vendor/WirecardCEE/QMore/BackendClient.php @@ -1,35 +1,14 @@ oUserConfig object that we created from config array - $sCustomerId = isset( $this->oUserConfig->CUSTOMER_ID ) ? trim($this->oUserConfig->CUSTOMER_ID) : null; - $sShopId = isset( $this->oUserConfig->SHOP_ID ) ? trim($this->oUserConfig->SHOP_ID) : null; - $sLanguage = isset( $this->oUserConfig->LANGUAGE ) ? trim($this->oUserConfig->LANGUAGE) : null; - $sSecret = isset( $this->oUserConfig->SECRET ) ? trim($this->oUserConfig->SECRET) : null; - $sPassword = isset( $this->oUserConfig->PASSWORD ) ? trim($this->oUserConfig->PASSWORD) : null; + $sCustomerId = isset($this->oUserConfig->CUSTOMER_ID) ? trim($this->oUserConfig->CUSTOMER_ID) : null; + $sShopId = isset($this->oUserConfig->SHOP_ID) ? trim($this->oUserConfig->SHOP_ID) : null; + $sLanguage = isset($this->oUserConfig->LANGUAGE) ? trim($this->oUserConfig->LANGUAGE) : null; + $sSecret = isset($this->oUserConfig->SECRET) ? trim($this->oUserConfig->SECRET) : null; + $sPassword = isset($this->oUserConfig->PASSWORD) ? trim($this->oUserConfig->PASSWORD) : null; // If not throw the InvalidArgumentException exception! - if (empty( $sCustomerId ) || is_null($sCustomerId)) { - throw new WirecardCEE_QMore_Exception_InvalidArgumentException(sprintf('CUSTOMER_ID passed to %s is invalid.', - __METHOD__)); + if (empty($sCustomerId) || is_null($sCustomerId)) { + throw new WirecardCEE_QMore_Exception_InvalidArgumentException(sprintf( + 'CUSTOMER_ID passed to %s is invalid.', + __METHOD__ + )); } - if (empty( $sLanguage ) || is_null($sLanguage)) { - throw new WirecardCEE_QMore_Exception_InvalidArgumentException(sprintf('LANGUAGE passed to %s is invalid.', - __METHOD__)); + if (empty($sLanguage) || is_null($sLanguage)) { + throw new WirecardCEE_QMore_Exception_InvalidArgumentException(sprintf( + 'LANGUAGE passed to %s is invalid.', + __METHOD__ + )); } - if (empty( $sSecret ) || is_null($sSecret)) { - throw new WirecardCEE_QMore_Exception_InvalidArgumentException(sprintf('SECRET passed to %s is invalid.', - __METHOD__)); + if (empty($sSecret) || is_null($sSecret)) { + throw new WirecardCEE_QMore_Exception_InvalidArgumentException(sprintf( + 'SECRET passed to %s is invalid.', + __METHOD__ + )); } - if (empty( $sPassword ) || is_null($sPassword)) { - throw new WirecardCEE_QMore_Exception_InvalidArgumentException(sprintf('PASSWORD passed to %s is invalid.', - __METHOD__)); + if (empty($sPassword) || is_null($sPassword)) { + throw new WirecardCEE_QMore_Exception_InvalidArgumentException(sprintf( + 'PASSWORD passed to %s is invalid.', + __METHOD__ + )); } // everything ok! let's set the fields @@ -312,7 +299,7 @@ public function getFinancialInstitutions($paymentType, $bankCountry = null, $tra $this->_requestData[self::COMMAND] = self::$COMMAND_GET_FINANCIAL_INSTITUTIONS; $this->_setField(self::PAYMENTTYPE, $paymentType); - $order = Array( + $order = array( self::CUSTOMER_ID, self::SHOP_ID, self::PASSWORD, @@ -342,7 +329,7 @@ public function getFinancialInstitutions($paymentType, $bankCountry = null, $tra * @throws WirecardCEE_Stdlib_Client_Exception_InvalidResponseException * @return WirecardCEE_QMore_Response_Backend_Refund */ - public function refund($iOrderNumber, $iAmount, $sCurrency, $basket=null) + public function refund($iOrderNumber, $iAmount, $sCurrency, $basket = null) { $this->_requestData[self::COMMAND] = self::$COMMAND_REFUND; @@ -351,7 +338,7 @@ public function refund($iOrderNumber, $iAmount, $sCurrency, $basket=null) $this->_setField(self::CURRENCY, strtoupper($sCurrency)); $this->_setBasket($basket); - $this->_fingerprintOrder->setOrder(Array( + $this->_fingerprintOrder->setOrder(array( self::CUSTOMER_ID, self::SHOP_ID, self::PASSWORD, @@ -379,7 +366,7 @@ public function refundReversal($iOrderNumber, $iCreditNumber) $this->_setField(self::ORDER_NUMBER, $iOrderNumber); $this->_setField(self::CREDIT_NUMBER, $iCreditNumber); - $this->_fingerprintOrder->setOrder(Array( + $this->_fingerprintOrder->setOrder(array( self::CUSTOMER_ID, self::SHOP_ID, self::PASSWORD, @@ -422,7 +409,7 @@ public function recurPayment( $this->_setField(self::ORDER_DESCRIPTION, $sOrderDescription); - $this->_fingerprintOrder->setOrder(Array( + $this->_fingerprintOrder->setOrder(array( self::CUSTOMER_ID, self::SHOP_ID, self::PASSWORD, @@ -452,7 +439,7 @@ public function getOrderDetails($iOrderNumber) $this->_requestData[self::COMMAND] = self::$COMMAND_GET_ORDER_DETAILS; $this->_setField(self::ORDER_NUMBER, $iOrderNumber); - $this->_fingerprintOrder->setOrder(Array( + $this->_fingerprintOrder->setOrder(array( self::CUSTOMER_ID, self::SHOP_ID, self::PASSWORD, @@ -475,7 +462,7 @@ public function approveReversal($iOrderNumber) $this->_requestData[self::COMMAND] = self::$COMMAND_APPROVE_REVERSAL; $this->_setField(self::ORDER_NUMBER, $iOrderNumber); - $this->_fingerprintOrder->setOrder(Array( + $this->_fingerprintOrder->setOrder(array( self::CUSTOMER_ID, self::SHOP_ID, self::PASSWORD, @@ -493,7 +480,7 @@ public function approveReversal($iOrderNumber) * @throws WirecardCEE_Stdlib_Client_Exception_InvalidResponseException * @return WirecardCEE_QMore_Response_Backend_Deposit */ - public function deposit($iOrderNumber, $iAmount, $sCurrency, $basket=null) + public function deposit($iOrderNumber, $iAmount, $sCurrency, $basket = null) { $this->_requestData[self::COMMAND] = self::$COMMAND_DEPOSIT; @@ -502,7 +489,7 @@ public function deposit($iOrderNumber, $iAmount, $sCurrency, $basket=null) $this->_setField(self::CURRENCY, strtoupper($sCurrency)); $this->_setBasket($basket); - $this->_fingerprintOrder->setOrder(Array( + $this->_fingerprintOrder->setOrder(array( self::CUSTOMER_ID, self::SHOP_ID, self::PASSWORD, @@ -530,7 +517,7 @@ public function depositReversal($iOrderNumber, $iPaymentNumber) $this->_setField(self::ORDER_NUMBER, $iOrderNumber); $this->_setField(self::PAYMENT_NUMBER, $iPaymentNumber); - $this->_fingerprintOrder->setOrder(Array( + $this->_fingerprintOrder->setOrder(array( self::CUSTOMER_ID, self::SHOP_ID, self::PASSWORD, @@ -616,4 +603,4 @@ protected function _getUserAgent() { return "{$this->oClientConfig->MODULE_NAME};{$this->oClientConfig->MODULE_VERSION}"; } -} \ No newline at end of file +}