Getting Started
To use the plug-in signup widget you need to include required Javascript libraries and CSS files. Once those have been included, you can show the signup form by simply including the following markup on any of your webpages or within your HTML5 based mobile application. A full html example is available here.
<div class="acc-signup" tenantid="MyCompany" offercode="MY_SUBSCRIPTION_OFFER" token="…WidgetKey…">
Required Attributes
The required attributes for the plug-in signup widget div element are:
Attribute | Description |
---|---|
class | Must be set to “acc-signup” |
tenantid | The name of your company within the Accumulus system |
offercode | The offer code must be set to the subscription offer code for which the signup is for. It can be obtained via the administrative interface under “Product->Subscription Offers” |
token | This must be set to the widget key which can be obtained via the administrative interface under “Settings->Integration->API” or the signup token obtained via the API |
Optional Attributes
The optional attributes for the plug-in signup widget div element are:
Attribute | Description | Default Value |
---|---|---|
cancelUrl | Specifies the PayPal cancellation Url. Used only when PayPal signup is enabled. | |
collectCustomer | Indicates if the customer account information should be collected. | false |
collectPassword | Indicates if the customer password should be collected. | false |
confirmUrl | Specifies the PayPal confirmation Url. Used only when PayPal signup is enabled. | |
customer | Specifies a javascript function which returns a customer object. If specified, values on the form, such as the customer name, are pre-filled. For example, if the attribute is defined as customer=”getCustomer()”, then information from the following Javascript function would be used to populate the specified customer values:
function getCustomer() { var customer = Accumulus.Customer.create(); customer.Name = “Allen Kender”; customer.EmailAddress = ‘allen.kender@fabrico.com‘; customer.PostalCode = “97296”; customer.AddressLine1 = “123 Main Street”; customer.City = “Portland”; customer.StateProvince = “OR”; customer.CountryCode = “USA”; return customer; } |
|
defaultPaymentMethod | Specifies which payment method is the default payment method. Possible values include ‘creditCard’, ‘bankAccount’, and ‘billingAgreement’ for PayPal | creditCard |
descriptionHTML | Specifies a description of the offer for which the signup dialog is presented. | |
onCalculateSignupFees | Event handler called with the results of the calculate signup fees response. | |
onSignup | Event handler called with the results of the signup response. | |
onValidatePromotion | Event handler called with the results of the apply promotion response. | |
showAccountBanner | Indicates if the account banner should be displayed. | true |
showBankAccount | Indicates if bank account (ACH) is a valid payment method. Note: To use it, a merchant account of type bank account must be configured in Accumulus. | false |
showBillingAddress | Indicates if a full billing address should be collected. | false |
showBillingAgreement | Indicates if PayPal billing agreement is a valid payment method. Note: To use it, a merchant account of PayPal must be configured in Accumulus. | false |
showCreditCard | Indicates if Credit Card is a valid payment method. Note: To use it, a merchant account of type credit card must be configured in Accumulus. | true |
showCustomerAddress | Indicates if a full customer address should be collected. | true |
showHeader | Indicates if the signup title should be displayed. | false |
showPrice | Indicates if the price section should be displayed. | false |
showPromotion | Indicates if the promotion input should be shown. | false |
showSSLBanner | Indicates if the SSL banner should be shown. | true |
showTCCheckbox | Indicates if the terms and conditions checkbox should be shown. | true |
subscription | Specifies a javascript function which returns a subscription object. If specified, the subscription values are submitted along with the customer and payment information upon signup. For example, if the attribute is defined as subscription=”getSubscription()”, then information from the following Javascript function would be used to populate the specified subscription:
function getSubscription(){ var offerCode = ‘MY_OFFFER_CODE’; var subscription = Accumulus.Subscription.create(offerCode); // create subscription item to set provisioning information (optional) var item = subscription.createItem(); item.subscriptionItemID = ‘123’; item.productCode = ‘MY_SUBSCRIPTION_PRODUCT_CODE’; var field = item.createField(); field.code = ‘MY_CUSTOM_FIELD_CODE’; field.value = ‘234’; return subscription; } |
|
termsAndConditionsHTML | Specifies the terms and conditions text. |