<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Split exp date, and join them in Integration and Testing</title>
    <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Split-exp-date-and-join-them/m-p/17514#M9781</link>
    <description>&lt;P&gt;TJPrides solution should work. Alternatively, I created a variable in my verification script that runs after the form is submitted. The $ signs are used for jQuery.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN style="color: blue;"&gt;var&lt;/SPAN&gt;&amp;nbsp;cc_exp_date&amp;nbsp;=&amp;nbsp;$(&lt;SPAN style="color: maroon;"&gt;'#cc-exp_month'&lt;/SPAN&gt;).val() + "/" +&amp;nbsp;$(&lt;SPAN style="color: maroon;"&gt;'#cc-exp_year'&lt;/SPAN&gt;).val();&lt;/PRE&gt;</description>
    <pubDate>Fri, 30 Sep 2011 18:46:23 GMT</pubDate>
    <dc:creator>jdallen88</dc:creator>
    <dc:date>2011-09-30T18:46:23Z</dc:date>
    <item>
      <title>Split exp date, and join them</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Split-exp-date-and-join-them/m-p/17450#M9752</link>
      <description>&lt;P&gt;The form I've developed asks for an expiration date MONTH and YEAR as separate input values, since people can have trouble entering the format expected by Authorize.net.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm coding in PHP and using the suggested three files used in the DPM developer's guide: checkout_form.php, response_relay.php, and receipt_page.php&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do I take these input values (MM and YY) and combine them (MM/YY) before sending them to ANet for authentication? And at what point do I do that?&lt;/P&gt;</description>
      <pubDate>Wed, 28 Sep 2011 21:43:29 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Split-exp-date-and-join-them/m-p/17450#M9752</guid>
      <dc:creator>ggeiger</dc:creator>
      <dc:date>2011-09-28T21:43:29Z</dc:date>
    </item>
    <item>
      <title>Re: Split exp date, and join them</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Split-exp-date-and-join-them/m-p/17456#M9754</link>
      <description>&lt;P&gt;That's a good question. The AIM interface uses (for April 2017) 0417, the ARB interface uses 2017-04, and the default test value for DPM indicates 04/17. All of those -might- work, but if I had to guess, I'd say use that last one. In answer to your question - you could hack the form and have a hidden field called x_card_num that gets filled onSubmit() for the form, or you could have a pulldown that gives all possible year / month possibilities for the next 15 years or so. Neither option is really optimal, however. You could also just make it a text field (like in the sample form) and include a note saying to fill it out in MM/YY format. If you put in a maxlength of 5 characters, most people will take the hint. Sadly, you can't just layer in an extra form and combine the values yourself before auto-submitting to Authorize.net, because that would require collecting credit card data on your server and void all the advantages of using DPM in the first place.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To be honest, I don't know why there isn't obvious support for month / year fields.&lt;/P&gt;</description>
      <pubDate>Thu, 29 Sep 2011 05:22:56 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Split-exp-date-and-join-them/m-p/17456#M9754</guid>
      <dc:creator>TJPride</dc:creator>
      <dc:date>2011-09-29T05:22:56Z</dc:date>
    </item>
    <item>
      <title>Re: Split exp date, and join them</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Split-exp-date-and-join-them/m-p/17466#M9758</link>
      <description>&lt;P&gt;I like the onSubmit idea, though I don't know how to write that into the form.&lt;/P&gt;&lt;P&gt;If my form HTML is the following:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;lt;input type="text" name="exp_month" maxlength="2" /&amp;gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;lt;input type="text" name="exp_year"&amp;nbsp;&lt;FONT face="courier new,courier"&gt;maxlength="2"&lt;/FONT&gt;﻿ /&amp;gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;lt;input type="submit" value="GO" /&amp;gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do I write the onSubmit to combine the fields to be MM/YY?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Sep 2011 17:11:59 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Split-exp-date-and-join-them/m-p/17466#M9758</guid>
      <dc:creator>ggeiger</dc:creator>
      <dc:date>2011-09-29T17:11:59Z</dc:date>
    </item>
    <item>
      <title>Re: Split exp date, and join them</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Split-exp-date-and-join-them/m-p/17486#M9767</link>
      <description>&lt;P&gt;Include a hidden field called x_exp_date, then try putting this in your form tag (untested, but it should theoretically work):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;onSubmit="this.x_exp_date.value = this.exp_month.value + '/' + this.exp_year.value;"&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 30 Sep 2011 08:48:49 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Split-exp-date-and-join-them/m-p/17486#M9767</guid>
      <dc:creator>TJPride</dc:creator>
      <dc:date>2011-09-30T08:48:49Z</dc:date>
    </item>
    <item>
      <title>Re: Split exp date, and join them</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Split-exp-date-and-join-them/m-p/17514#M9781</link>
      <description>&lt;P&gt;TJPrides solution should work. Alternatively, I created a variable in my verification script that runs after the form is submitted. The $ signs are used for jQuery.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN style="color: blue;"&gt;var&lt;/SPAN&gt;&amp;nbsp;cc_exp_date&amp;nbsp;=&amp;nbsp;$(&lt;SPAN style="color: maroon;"&gt;'#cc-exp_month'&lt;/SPAN&gt;).val() + "/" +&amp;nbsp;$(&lt;SPAN style="color: maroon;"&gt;'#cc-exp_year'&lt;/SPAN&gt;).val();&lt;/PRE&gt;</description>
      <pubDate>Fri, 30 Sep 2011 18:46:23 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Split-exp-date-and-join-them/m-p/17514#M9781</guid>
      <dc:creator>jdallen88</dc:creator>
      <dc:date>2011-09-30T18:46:23Z</dc:date>
    </item>
    <item>
      <title>Re: Split exp date, and join them</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Split-exp-date-and-join-them/m-p/17532#M9789</link>
      <description>&lt;P&gt;Make sure that you also clear the entry fields for month and year after you have combined them into the correct value.&amp;nbsp; Otherwise, Authorize.Net will treat them as merchant defined fields and echo them back to you in the transaction results.&amp;nbsp; This could have potential PCI implications, since it means you would be recieving the expiration date to your server.&lt;/P&gt;</description>
      <pubDate>Fri, 30 Sep 2011 22:23:08 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Split-exp-date-and-join-them/m-p/17532#M9789</guid>
      <dc:creator>Trevor</dc:creator>
      <dc:date>2011-09-30T22:23:08Z</dc:date>
    </item>
    <item>
      <title>Re: Split exp date, and join them</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Split-exp-date-and-join-them/m-p/17630#M9838</link>
      <description>&lt;P&gt;Thanks, all!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I used TJPride's idea of adding the onSubmit script to the form tag. For anyone following along, my working form looks like this (as added to the AuthorizeNetDPM.php). Please excuse the escaping quotes all over the place!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $form = "&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;form method=\"post\" action=\"$post_url\" id=\"paymentForm\" onSubmit=\"this.x_exp_date.value = this.exp_month.value + '/' + this.exp_year.value;\"&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; $hidden_fields&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;&amp;lt;input type=\"text\" name=\"x_card_num\" /&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;input type=\"text\" name=\"exp_month\" /&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;&amp;lt;input type=\"text\" name=\"exp_year\" /&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;&amp;lt;input type=\"submit\" name=\"submit\" value=\"Pay with Credit Card\" /&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;input type=\"hidden\" name=\"x_exp_date\" /&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/form&amp;gt;";&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return $form;﻿&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Oct 2011 18:02:23 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Split-exp-date-and-join-them/m-p/17630#M9838</guid>
      <dc:creator>ggeiger</dc:creator>
      <dc:date>2011-10-03T18:02:23Z</dc:date>
    </item>
    <item>
      <title>Re: Split exp date, and join them</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Split-exp-date-and-join-them/m-p/17654#M9850</link>
      <description>&lt;P&gt;If as Trevor noted, you need to clear the month and year fields as well, then the Javascript should instead read like:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;onSubmit="this.x_exp_date.value = this.exp_month.value + '/' + this.exp_year.value; this.exp_month.value﻿ = null; this.exp_year.value﻿ = null;"&lt;/PRE&gt;</description>
      <pubDate>Tue, 04 Oct 2011 03:09:30 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Split-exp-date-and-join-them/m-p/17654#M9850</guid>
      <dc:creator>TJPride</dc:creator>
      <dc:date>2011-10-04T03:09:30Z</dc:date>
    </item>
  </channel>
</rss>

