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