Changeset 1958225
- Timestamp:
- 10/17/2018 06:17:37 PM (7 years ago)
- Location:
- ing-psp/trunk
- Files:
-
- 7 edited
-
CHANGELOG.md (modified) (1 diff)
-
README.md (modified) (1 diff)
-
classes/class-wc-ingpsp-afterpay.php (modified) (1 diff)
-
classes/class-wc-ingpsp-helper.php (modified) (1 diff)
-
ing-php/vendor/beberlei/assert/lib/Assert/Assertion.php (modified) (1 diff)
-
ingpsp.php (modified) (2 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
ing-psp/trunk/CHANGELOG.md
r1951028 r1958225 1 1 # Changelog WooCommerce 2 3 ** 1.3.5 ** 4 * Use dropdowns for DOB 2 5 3 6 ** 1.3.4 ** -
ing-psp/trunk/README.md
r1951028 r1958225 15 15 16 16 ## Version number 17 Version 1.3. 417 Version 1.3.5 18 18 19 19 ## Pre-requisites to install the plug-ins -
ing-psp/trunk/classes/class-wc-ingpsp-afterpay.php
r1951028 r1958225 107 107 )); 108 108 109 woocommerce_form_field('dob', array( 110 'type' => 'text', 111 'class' => array('input-text'), 112 'label' => __('Date of birth:', WC_Ingpsp_Helper::DOMAIN), 113 'description' => __('Birth date format: DD - MM - YYYY, eg: 31-12-1980', WC_Ingpsp_Helper::DOMAIN), 114 'required' => true 115 )); 109 ?> 110 <select class="dob_select dob_day" name="<?php echo esc_attr( $this->id ); ?>_date_of_birth_day"> 111 <option value=""> 112 <?php esc_html_e( 'Dag', 'afterpay' ); ?> 113 </option> 114 <?php 115 $day = 1; 116 while ( $day <= 31 ) { 117 $day_pad = str_pad( $day, 2, '0', STR_PAD_LEFT ); 118 echo '<option value="' . esc_attr( $day_pad ) . '">' . esc_html( $day_pad ) . '</option>'; 119 $day++; 120 } 121 ?> 122 </select> 123 <select class="dob_select dob_month" name="<?php echo esc_attr( $this->id ); ?>_date_of_birth_month"> 124 <option value=""> 125 <?php esc_html_e( 'Maand', 'afterpay' ); ?> 126 </option> 127 <option value="01"><?php esc_html_e( 'Jan', 'afterpay' ); ?></option> 128 <option value="02"><?php esc_html_e( 'Feb', 'afterpay' ); ?></option> 129 <option value="03"><?php esc_html_e( 'Mar', 'afterpay' ); ?></option> 130 <option value="04"><?php esc_html_e( 'Apr', 'afterpay' ); ?></option> 131 <option value="05"><?php esc_html_e( 'May', 'afterpay' ); ?></option> 132 <option value="06"><?php esc_html_e( 'Jun', 'afterpay' ); ?></option> 133 <option value="07"><?php esc_html_e( 'Jul', 'afterpay' ); ?></option> 134 <option value="08"><?php esc_html_e( 'Aug', 'afterpay' ); ?></option> 135 <option value="09"><?php esc_html_e( 'Sep', 'afterpay' ); ?></option> 136 <option value="10"><?php esc_html_e( 'Oct', 'afterpay' ); ?></option> 137 <option value="11"><?php esc_html_e( 'Nov', 'afterpay' ); ?></option> 138 <option value="12"><?php esc_html_e( 'Dec', 'afterpay' ); ?></option> 139 </select> 140 <select class="dob_select dob_year" name="<?php echo esc_attr( $this->id ); ?>_date_of_birth_year"> 141 <option value=""> 142 <?php esc_html_e( 'Jaar', 'afterpay' ); ?> 143 </option> 144 <?php 145 // Select current date and deduct 18 years because of the date limit of using AfterPay. 146 $year = date( 'Y' ) - 18; 147 // Select the oldest year (current year minus 100 years). 148 $lowestyear = $year - 82; 149 while ( $year >= $lowestyear ) { 150 echo '<option value="' . esc_attr( $year ) . '">' . esc_html( $year ) . '</option>'; 151 $year--; 152 } 153 ?> 154 </select> 155 <?php 116 156 117 157 woocommerce_form_field('toc', array( -
ing-psp/trunk/classes/class-wc-ingpsp-helper.php
r1951028 r1958225 104 104 } 105 105 106 $ birthdate = static::getCustomPaymentField('dob');107 if ($birthdate !== null) {108 $birthdate_parts = explode('-', $birthdate);109 $birthdate = implode('-', [$birthdate_parts[2], $birthdate_parts[1], $birthdate_parts[0]]); 110 }106 $ingpsp_afterpay_date_of_birth_day = static::getCustomPaymentField('ingpsp_afterpay_date_of_birth_day'); 107 $ingpsp_afterpay_date_of_birth_month = static::getCustomPaymentField('ingpsp_afterpay_date_of_birth_month'); 108 $ingpsp_afterpay_date_of_birth_year = static::getCustomPaymentField('ingpsp_afterpay_date_of_birth_year'); 109 110 $birthdate = implode('-', [$ingpsp_afterpay_date_of_birth_year, $ingpsp_afterpay_date_of_birth_month, $ingpsp_afterpay_date_of_birth_day]); 111 111 112 112 return \GingerPayments\Payment\Common\ArrayFunctions::withoutNullValues([ -
ing-psp/trunk/ing-php/vendor/beberlei/assert/lib/Assert/Assertion.php
r1951028 r1958225 2191 2191 public static function date($value, $format, $message = null, $propertyPath = null) 2192 2192 { 2193 if (strlen($value) != 10) { 2194 throw static::createException($value, 'Gelieve geboortedatum in te vullen', static::INVALID_DATE, $propertyPath, array('format' => $format)); 2195 } 2193 2196 static::string($value, $message, $propertyPath); 2194 2197 static::string($format, $message, $propertyPath); -
ing-psp/trunk/ingpsp.php
r1951028 r1958225 5 5 * Plugin URI: https://www.ing.nl/ 6 6 * Description: ING WooCommerce plugin for ING Kassa Compleet and ING ePay markets. 7 * Version: 1.3. 47 * Version: 1.3.5 8 8 * Author: Ginger Payments 9 9 * Author URI: https://www.gingerpayments.com/ … … 20 20 * Define ING PSP plugin version 21 21 */ 22 define('INGPSP_PLUGIN_VERSION', 'WooCommerce v1.3. 4');22 define('INGPSP_PLUGIN_VERSION', 'WooCommerce v1.3.5'); 23 23 24 24 add_action('plugins_loaded', 'woocommerce_ingpsp_init', 0); -
ing-psp/trunk/readme.txt
r1951028 r1958225 5 5 Requires at least: 4.0 6 6 Tested up to: 4.9.6 7 Stable tag: 1.3. 47 Stable tag: 1.3.5 8 8 License: The MIT License (MIT) 9 9 License URI: https://opensource.org/licenses/MIT … … 104 104 == Changelog == 105 105 106 = 1.3.5 = 107 * Use dropdowns for DOB 108 106 109 = 1.3.4 = 107 110 * Handle AfterPay testing. Correct calculation of line item totals. Support different billing address.
Note: See TracChangeset
for help on using the changeset viewer.