How do I create an HTML form to allow the user to change their iTransact (itransact.com) subscription settings?
Eg: 1) Opt out of automatic subscription renewal:
- the form needs to change the ‘recur_reps’ value to 0
Eg: 2) Change their subscription type:
- the form needs to change the values of ‘recur_total’ and ‘recur_desc’
(ie: what is the URL to post the form to and what form fields do I need to post to it?)
According to an iTransact support technician there is no way to create an HTML form to allow the user to change their iTransact (itransact.com) subscription settings. However, there is an XML API that allows this to be done.
Since the code to send an XML request to iTransact’s XML API is not simple and intuitive, I decided to post a working sample program to Stack Overflow since it might be useful as a reference to others, especially since their is no example like it in the iTransact.com documentation.
The following sample program sends a request to get the details of an existing transaction.
Note: Requests to update/cancel an existing recurring subscription would have a similar format but would use the “recurUpdate” command instead of the “recurDetails” command (for full details of all possible commands see: http://www.itransact.com/downloads/PCDeveloperGuide.pdf)