Implement client-side free trial provisioning
pwolanin - October 20, 2009 - 01:03
| Project: | Acquia Network Connector |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | task |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs work |
Description
Acquia Network will expose an xml-rpc API to get a free trial subscription. We want to use this via the local admin UI.
APi is still in progress, but essentially the same as the free trial subscription form on acquia.com - need to send data:
$values['subscription_name']
$values['primary_email']
$values['billing_first_name']
$values['billing_last_name']
$values['billing_company']
$values['billing_phone']
$values['billing_country_acquia']
$values['accept_terms_checkbox']Though we may omit some if there is an existing subscription, in which case we must get the user password and send a hmac based on it to validate their identity.

#1
First pass - only works to provision a subscription if the e-mail address does not belong to an existing user.
#2
Here's patch that also allow the user to auth to an existing account. Note that the workflow here is crap - should be a multi-step form, but good enough to test the API.
#3
oops - was logging the plain-text password.
#4
Make it work for new accounts - need non-empty hash string (dummy) to pass authentication
#5