Reply
Member
Posts: 2
Registered: ‎12-02-2012
Accepted Solution

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

Accepted Solutions
Solution
Accepted by topic author mmcaliff01
‎08-21-2015 01:58 AM
Posts: 1,476
Topics: 33
Kudos: 37
Solutions: 126
Registered: ‎09-14-2009

Re: authorize.net arb subscription start date error

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


All Replies
Solution
Accepted by topic author mmcaliff01
‎08-21-2015 01:58 AM
Posts: 1,476
Topics: 33
Kudos: 37
Solutions: 126
Registered: ‎09-14-2009

Re: authorize.net arb subscription start date error

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
Highlighted
Member
Posts: 2
Registered: ‎12-02-2012

Re: authorize.net arb subscription start date error

Thank you!!!  That was it.