Reputation: 167
I'm passing expiry parameters with a form 'select' option. Works in all browsers except for IE7 and IE8. Below is the form snippit and received array from the card processor logs. Notice an extra '0' is passed for each option.
<div class="form-row expiry">
<label>Card Expiration (ex. 01/2015)</label>
<select class="card-expiry-month required" type="text">
<option value="">Month</option>
<option value="01">01 January</option>
<option value="02">02 February</option>
<option value="03">03 March</option>
<option value="04">04 April</option>
<option value="05">05 May</option>
<option value="06">06 June</option>
<option value="07">07 July</option>
<option value="08">08 August</option>
<option value="09">09 September</option>
<option value="10">10 October</option>
<option value="11">11 November</option>
<option value="12">12 December</option>
<select/>
<select class="card-expiry-year required" type="text">
<option value="">Year</option>
<option value="2012">2012</option>
<option value="2013">2013</option>
<option value="2014">2014</option>
<option value="2015">2015</option>
<option value="2016">2016</option>
<option value="2017">2017</option>
<option value="2018">2018</option>
<select/>
</div>
Here is the unsuccessful log from the card processor.
"request_id": "1333070804570",
"card": {
"number": "************4242",
"exp_year": {
"0": "2014"
},
"exp_month": {
"0": "2"
},
"cvc": "***"
}
A successful log from the same form in chrome.
"card": {
"cvc": "***",
"number": "*******************0002",
"exp_month": "02",
"exp_year": "2013"
},
"request_id": "1333070383437"
}
Upvotes: 0
Views: 283
Reputation: 2782
Not sure why type="text" is used on a select element. You have some nesting issues as well, the empty <select/>
element should be the end tag: </select>
.
Upvotes: 2