cancel
Showing results for 
Search instead for 
Did you mean: 

authorize.net arb subscription start date error

According to the documentation the subscription start date has to be in this format:  YYYY-MM-DD.

 
So in subscribe.php I have a hidden field in the form to collect the current date as a start date.  It looks like this:  <input type="hidden" id="startDate" value="<?php echo date('Y-m-d'); ?>" />
 
I know it works because I can change type="hidden" to type="text" and it outputs correctly:  2012-12-02
 
In susbscriptionCreate.php I have the following variable:
 
$startDate = $_POST["startDate"];
 
and below:
 
$content =
 
I have the following:
       
      "<startDate>" . $startDate . "</startDate>".
 
 
This is all from sample code from authorize.net with only minor changes.
 
The error I get is:
 
Response Code: Error 
Response Reason Code: E00003
Response Text: The 'AnetApi/xml/v1/schema/AnetApiSchema.xsd:startDate' element is invalid - The value '' is invalid according to its datatype 'http://www.w3.org/2001/XMLSchema:date' - The string '' is not a valid XsdDateTime value.
 
If you notice the red portion of the Response Text you'll see that it looks like the date is not being submitted at all.  As far as I can tell after going over everything numerous times I don't have any typos or missing quotes.
 
Thank you much for any direction you can give!
 
Mike
mmcaliff01
Member
1 ACCEPTED SOLUTION

Accepted Solutions

You forgot the name attribute for your input:

 

<input type="hidden" id="startDate" name="startDate" value="<?php echo date('Y-m-d'); ?>" />


-------------------------------------------------------------------------------------------------------------------------------------------
John Conde :: Certified Authorize.Net Developer (Brainyminds) :: Official Authorize.Net Blogger

NEW! Handling Authorize.Net's Webhooks with PHP

Integrate Every Authorize.Net JSON API with One PHP Class (Sample code included)

Tutorials for integrating Authorize.Net with PHP: AIM, ARB, CIM, Silent Post
All About Authorize.Net's Silent Post

View solution in original post

stymiee
Expert
Expert
2 REPLIES 2

You forgot the name attribute for your input:

 

<input type="hidden" id="startDate" name="startDate" value="<?php echo date('Y-m-d'); ?>" />


-------------------------------------------------------------------------------------------------------------------------------------------
John Conde :: Certified Authorize.Net Developer (Brainyminds) :: Official Authorize.Net Blogger

NEW! Handling Authorize.Net's Webhooks with PHP

Integrate Every Authorize.Net JSON API with One PHP Class (Sample code included)

Tutorials for integrating Authorize.Net with PHP: AIM, ARB, CIM, Silent Post
All About Authorize.Net's Silent Post
stymiee
Expert
Expert

Thank you!!!  That was it.