diff --git a/includes/modules/payment/wirecard_checkout_page.php b/includes/modules/payment/wirecard_checkout_page.php index 42f91d4..87e427a 100644 --- a/includes/modules/payment/wirecard_checkout_page.php +++ b/includes/modules/payment/wirecard_checkout_page.php @@ -36,7 +36,7 @@ define('MODULE_PAYMENT_WIRECARD_CHECKOUT_PAGE_IFRAME', 'ext/modules/payment/wirecard/checkout_page_iframe.php'); define('MODULE_PAYMENT_WIRECARD_CHECKOUT_PAGE_SUCCESS', 'ext/modules/payment/wirecard/checkout_page_success.php'); -define('MODULE_PAYMENT_WIRECARD_CHECKOUT_PAGE_PLUGINVERSION', '1.6.0'); +define('MODULE_PAYMENT_WIRECARD_CHECKOUT_PAGE_PLUGINVERSION', '1.6.1'); define('MODULE_PAYMENT_WIRECARD_CHECKOUT_PAGE_TRANSACTION_TABLE', 'wirecard_checkout_page_transaction'); define('MODULE_PAYMENT_WIRECARD_CHECKOUT_PAGE_WINDOW_NAME', 'wirecardCheckoutPageIFrame'); @@ -51,7 +51,7 @@ class wirecard_checkout_page /** * constructor */ - function wirecard_checkout_page() + function __construct() { global $order, $language; @@ -146,6 +146,23 @@ function javascript_validation() */ function selection() { + if (tep_session_is_registered('customer_id')) + { + $consumerID = $_SESSION['customer_id']; + } + if( ! isset( $_SESSION['wcp-consumerDeviceId'] ) ) { + $timestamp = microtime(); + $consumerDeviceId = md5( $consumerID . "_" . $timestamp ); + $_SESSION['wcp-consumerDeviceId'] = $consumerDeviceId; + } else { + $consumerDeviceId = $_SESSION['wcp-consumerDeviceId']; + } + $ratepay = ''; + $ratepay .= ''; + $ratepay .= ''; + $ratepay .= ''; + echo $ratepay; + if ( count($this->_payments->get_enabled_paymenttypes()) ) { return array( 'id' => $this->code, @@ -198,7 +215,7 @@ function checkBirthday(){ var year = birthdate.getFullYear(); var today = new Date(); var limit = new Date((today.getFullYear() - minAge), today.getMonth(), today.getDate()); - if (birthdate < limit) { + if (birthdate <= limit) { $(\'#wcp-birthday\').val(birthdate); $(\'#wcp-no-valid-birthday\').hide(); $(\'#tdb5\').attr(\'disabled\', false); @@ -328,6 +345,11 @@ function process_button() 'displayText' => MODULE_PAYMENT_WIRECARD_CHECKOUT_PAGE_DISPLAY_TEXT, 'consumerMerchantCrmId' => md5($order->customer['email_address'])); + if( isset( $_SESSION['wcp-consumerDeviceId'] ) ) { + $postData['consumerDeviceId'] = $_SESSION['wcp-consumerDeviceId']; + unset( $_SESSION['wcp-consumerDeviceId'] ); + } + if ( MODULE_PAYMENT_WIRECARD_CHECKOUT_PAGE_DEPOSIT == 'True' ) { $postData['autoDeposit'] = true; }