Skip to content

Commit

Permalink
Merge pull request #4 from wirecard/consumerMerchantCrmId
Browse files Browse the repository at this point in the history
#3 Add consumerMerchantCrmId
  • Loading branch information
jakubpolomsky authored Nov 28, 2016
2 parents 1850f5e + 8e057f1 commit 924dca3
Show file tree
Hide file tree
Showing 92 changed files with 7,383 additions and 2,930 deletions.
2 changes: 1 addition & 1 deletion catalog/controller/extension/payment/wirecard.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class ControllerExtensionPaymentWirecard extends Controller
{
protected $data = array();

private $pluginVersion = '1.3.0';
private $pluginVersion = '1.4.0';

private $prefix = 'wirecard';

Expand Down
9 changes: 7 additions & 2 deletions catalog/model/extension/payment/wirecard.php
Original file line number Diff line number Diff line change
Expand Up @@ -214,14 +214,18 @@ public function send_request($prefix, $paymentType, $order, $birthday, $plugin_v
{
$fields = $this->get_config($prefix);
try {
$language_info = $order['language_code'];
//languagecode is like 'en-gb' but should be 'en'
$language_info = explode('-', $order['language_code']);
if (strpos($language_info, '-') !== false) {
$language_info = explode('-', $language_info);
$language_info = $language_info[0];
}

$client = new WirecardCEE_QPay_FrontendClient(array(
'CUSTOMER_ID' => $fields['customerId'],
'SHOP_ID' => $fields['shopId'],
'SECRET' => $fields['secret'],
'LANGUAGE' => $language_info[0]
'LANGUAGE' => $language_info
));

// consumer data (IP and User agent) are mandatory!
Expand Down Expand Up @@ -259,6 +263,7 @@ public function send_request($prefix, $paymentType, $order, $birthday, $plugin_v
->setServiceUrl($fields['serviceUrl'])
->setImageUrl($fields['imageURL'])
->setConsumerData($consumerData)
->createConsumerMerchantCrmId($order['email'])
->setDisplayText($fields['displayText'])
->setCustomerStatement($this->get_customer_statement($order))
->setDuplicateRequestCheck(false)
Expand Down
65 changes: 44 additions & 21 deletions system/library/wirecard/WirecardCEE/QPay/Config/client.config.php
Original file line number Diff line number Diff line change
@@ -1,24 +1,47 @@
<?php
/*
* Die vorliegende Software ist Eigentum von Wirecard CEE und daher vertraulich
* zu behandeln. Jegliche Weitergabe an dritte, in welcher Form auch immer, ist
* unzulaessig.
*
* Software & Service Copyright (C) by
* Wirecard Central Eastern Europe GmbH,
* FB-Nr: FN 195599 x, http://www.wirecard.at
*/
/**
* Shop System Plugins - Terms of Use
*
* The plugins offered are provided free of charge by Wirecard Central Eastern Europe GmbH
* (abbreviated to Wirecard CEE) and are explicitly not part of the Wirecard CEE range of
* products and services.
*
* They have been tested and approved for full functionality in the standard configuration
* (status on delivery) of the corresponding shop system. They are under General Public
* License Version 2 (GPLv2) and can be used, developed and passed on to third parties under
* the same terms.
*
* However, Wirecard CEE does not provide any guarantee or accept any liability for any errors
* occurring when used in an enhanced, customized shop system configuration.
*
* Operation in an enhanced, customized configuration is at your own risk and requires a
* comprehensive test phase by the user of the plugin.
*
* Customers use the plugins at their own risk. Wirecard CEE does not guarantee their full
* functionality neither does Wirecard CEE assume liability for any disadvantages related to
* the use of the plugins. Additionally, Wirecard CEE does not guarantee the full functionality
* for customized shop systems or installed plugins of other vendors of plugins within the same
* shop system.
*
* Customers are responsible for testing the plugin's functionality before starting productive
* operation.
*
* By installing the plugin into the shop system the customer agrees to these terms of use.
* Please do not use the plugin if you do not agree to these terms of use!
*/


return Array(
'FRONTEND_URL' => 'https://checkout.wirecard.com/page/init-server.php',
'TOOLKIT_URL' => 'https://checkout.wirecard.com/page/toolkit.php',
'MODULE_NAME' => 'WirecardCEE_Checkout_Page',
'MODULE_VERSION' => '3.0.0',
'DEPENDENCIES' => Array(
'FRAMEWORK_NAME' => 'Zend_Framework',
'FRAMEWORK_VERSION' => Array(
'MINIMUM' => '1.11.10',
'CURRENT' => Zend_Version::VERSION
),
'FRONTEND_URL' => 'https://checkout.wirecard.com/page/init-server.php',
'TOOLKIT_URL' => 'https://checkout.wirecard.com/page/toolkit.php',
'MODULE_NAME' => 'WirecardCEE_QPay',
'MODULE_VERSION' => '3.3.0',
'DEPENDENCIES' => Array(
'FRAMEWORK_NAME' => 'Zend_Framework',
'FRAMEWORK_VERSION' => Array(
'MINIMUM' => '1.11.10',
'CURRENT' => Zend_Version::VERSION
),
'USE_DEBUG' => FALSE
);
),
'USE_DEBUG' => false
);
55 changes: 38 additions & 17 deletions system/library/wirecard/WirecardCEE/QPay/Config/user.config.php
Original file line number Diff line number Diff line change
@@ -1,26 +1,47 @@
<?php
/*
* Die vorliegende Software ist Eigentum von Wirecard CEE und daher vertraulich
* zu behandeln. Jegliche Weitergabe an dritte, in welcher Form auch immer, ist
* unzulaessig.
*
* Software & Service Copyright (C) by
* Wirecard Central Eastern Europe GmbH,
* FB-Nr: FN 195599 x, http://www.wirecard.at
*/
/**
* Shop System Plugins - Terms of Use
*
* The plugins offered are provided free of charge by Wirecard Central Eastern Europe GmbH
* (abbreviated to Wirecard CEE) and are explicitly not part of the Wirecard CEE range of
* products and services.
*
* They have been tested and approved for full functionality in the standard configuration
* (status on delivery) of the corresponding shop system. They are under General Public
* License Version 2 (GPLv2) and can be used, developed and passed on to third parties under
* the same terms.
*
* However, Wirecard CEE does not provide any guarantee or accept any liability for any errors
* occurring when used in an enhanced, customized shop system configuration.
*
* Operation in an enhanced, customized configuration is at your own risk and requires a
* comprehensive test phase by the user of the plugin.
*
* Customers use the plugins at their own risk. Wirecard CEE does not guarantee their full
* functionality neither does Wirecard CEE assume liability for any disadvantages related to
* the use of the plugins. Additionally, Wirecard CEE does not guarantee the full functionality
* for customized shop systems or installed plugins of other vendors of plugins within the same
* shop system.
*
* Customers are responsible for testing the plugin's functionality before starting productive
* operation.
*
* By installing the plugin into the shop system the customer agrees to these terms of use.
* Please do not use the plugin if you do not agree to these terms of use!
*/


/**
* Configuration array
*
* Please input your details
*/
return Array(
'WirecardCEEQPayConfig' => Array(
'CUSTOMER_ID' => 'D200001',
'SHOP_ID' => '',
'SECRET' => 'B8AKTPWBRMNBV455FG6M2DANE99WU2',
'SERVICE_URL' => 'https://checkout.wirecard.com/page/init.php',
'LANGUAGE' => 'en',
'TOOLKIT_PASSWORD' => 'jcv45z'
)
'WirecardCEEQPayConfig' => Array(
'CUSTOMER_ID' => 'D200001',
'SHOP_ID' => '',
'SECRET' => 'B8AKTPWBRMNBV455FG6M2DANE99WU2',
'LANGUAGE' => 'en',
'TOOLKIT_PASSWORD' => 'jcv45z'
)
);
48 changes: 36 additions & 12 deletions system/library/wirecard/WirecardCEE/QPay/Error.php
Original file line number Diff line number Diff line change
@@ -1,27 +1,51 @@
<?php
/*
* Die vorliegende Software ist Eigentum von Wirecard CEE und daher vertraulich
* zu behandeln. Jegliche Weitergabe an dritte, in welcher Form auch immer, ist
* unzulaessig.
*
* Software & Service Copyright (C) by
* Wirecard Central Eastern Europe GmbH,
* FB-Nr: FN 195599 x, http://www.wirecard.at
*/
/**
* Shop System Plugins - Terms of Use
*
* The plugins offered are provided free of charge by Wirecard Central Eastern Europe GmbH
* (abbreviated to Wirecard CEE) and are explicitly not part of the Wirecard CEE range of
* products and services.
*
* They have been tested and approved for full functionality in the standard configuration
* (status on delivery) of the corresponding shop system. They are under General Public
* License Version 2 (GPLv2) and can be used, developed and passed on to third parties under
* the same terms.
*
* However, Wirecard CEE does not provide any guarantee or accept any liability for any errors
* occurring when used in an enhanced, customized shop system configuration.
*
* Operation in an enhanced, customized configuration is at your own risk and requires a
* comprehensive test phase by the user of the plugin.
*
* Customers use the plugins at their own risk. Wirecard CEE does not guarantee their full
* functionality neither does Wirecard CEE assume liability for any disadvantages related to
* the use of the plugins. Additionally, Wirecard CEE does not guarantee the full functionality
* for customized shop systems or installed plugins of other vendors of plugins within the same
* shop system.
*
* Customers are responsible for testing the plugin's functionality before starting productive
* operation.
*
* By installing the plugin into the shop system the customer agrees to these terms of use.
* Please do not use the plugin if you do not agree to these terms of use!
*/


/**
* @name WirecardCEE_QPay_Error
* @category WirecardCEE
* @package WirecardCEE_QPay
* @version 3.0.0
*/
class WirecardCEE_QPay_Error extends WirecardCEE_Stdlib_Error {
class WirecardCEE_QPay_Error extends WirecardCEE_Stdlib_Error
{

/**
* WirecardCEE_QPay_Error contructor
*
* @param string $message
*/
public function __construct($message) {
public function __construct($message)
{
$this->setMessage($message);
}
}
Original file line number Diff line number Diff line change
@@ -1,18 +1,42 @@
<?php
/*
* Die vorliegende Software ist Eigentum von Wirecard CEE und daher vertraulich
* zu behandeln. Jegliche Weitergabe an dritte, in welcher Form auch immer, ist
* unzulaessig.
*
* Software & Service Copyright (C) by
* Wirecard Central Eastern Europe GmbH,
* FB-Nr: FN 195599 x, http://www.wirecard.at
*/
/**
* Shop System Plugins - Terms of Use
*
* The plugins offered are provided free of charge by Wirecard Central Eastern Europe GmbH
* (abbreviated to Wirecard CEE) and are explicitly not part of the Wirecard CEE range of
* products and services.
*
* They have been tested and approved for full functionality in the standard configuration
* (status on delivery) of the corresponding shop system. They are under General Public
* License Version 2 (GPLv2) and can be used, developed and passed on to third parties under
* the same terms.
*
* However, Wirecard CEE does not provide any guarantee or accept any liability for any errors
* occurring when used in an enhanced, customized shop system configuration.
*
* Operation in an enhanced, customized configuration is at your own risk and requires a
* comprehensive test phase by the user of the plugin.
*
* Customers use the plugins at their own risk. Wirecard CEE does not guarantee their full
* functionality neither does Wirecard CEE assume liability for any disadvantages related to
* the use of the plugins. Additionally, Wirecard CEE does not guarantee the full functionality
* for customized shop systems or installed plugins of other vendors of plugins within the same
* shop system.
*
* Customers are responsible for testing the plugin's functionality before starting productive
* operation.
*
* By installing the plugin into the shop system the customer agrees to these terms of use.
* Please do not use the plugin if you do not agree to these terms of use!
*/


/**
* @name WirecardCEE_QPay_Exception_BadMethodCallException
* @category WirecardCEE
* @package WirecardCEE_QPay
* @subpackage Exception
* @version 3.0.0
*/
class WirecardCEE_QPay_Exception_BadMethodCallException extends BadMethodCallException implements WirecardCEE_QPay_Exception_ExceptionInterface {}
class WirecardCEE_QPay_Exception_BadMethodCallException extends BadMethodCallException implements WirecardCEE_QPay_Exception_ExceptionInterface
{
}
Original file line number Diff line number Diff line change
@@ -1,18 +1,42 @@
<?php
/*
* Die vorliegende Software ist Eigentum von Wirecard CEE und daher vertraulich
* zu behandeln. Jegliche Weitergabe an dritte, in welcher Form auch immer, ist
* unzulaessig.
*
* Software & Service Copyright (C) by
* Wirecard Central Eastern Europe GmbH,
* FB-Nr: FN 195599 x, http://www.wirecard.at
*/
/**
* Shop System Plugins - Terms of Use
*
* The plugins offered are provided free of charge by Wirecard Central Eastern Europe GmbH
* (abbreviated to Wirecard CEE) and are explicitly not part of the Wirecard CEE range of
* products and services.
*
* They have been tested and approved for full functionality in the standard configuration
* (status on delivery) of the corresponding shop system. They are under General Public
* License Version 2 (GPLv2) and can be used, developed and passed on to third parties under
* the same terms.
*
* However, Wirecard CEE does not provide any guarantee or accept any liability for any errors
* occurring when used in an enhanced, customized shop system configuration.
*
* Operation in an enhanced, customized configuration is at your own risk and requires a
* comprehensive test phase by the user of the plugin.
*
* Customers use the plugins at their own risk. Wirecard CEE does not guarantee their full
* functionality neither does Wirecard CEE assume liability for any disadvantages related to
* the use of the plugins. Additionally, Wirecard CEE does not guarantee the full functionality
* for customized shop systems or installed plugins of other vendors of plugins within the same
* shop system.
*
* Customers are responsible for testing the plugin's functionality before starting productive
* operation.
*
* By installing the plugin into the shop system the customer agrees to these terms of use.
* Please do not use the plugin if you do not agree to these terms of use!
*/


/**
* @name WirecardCEE_QPay_Exception_ExceptionInterface
* @category WirecardCEE
* @package WirecardCEE_QPay
* @subpackage Exception
* @version 3.0.0
*/
interface WirecardCEE_QPay_Exception_ExceptionInterface {}
interface WirecardCEE_QPay_Exception_ExceptionInterface
{
}
Loading

0 comments on commit 924dca3

Please sign in to comment.