One really nice feature of Dynamic Registration is it’s ability to utilize the Authorize.net ARB payment gateway. But it doesn’t only stop there! Most module will only allow you to create the subscription and the rest is up to you to handle directly through Authorize.net. DataSprings has given you the power to cancel (and soon Upgrade/downgrade) the clients subscription all from within Dynamic Registration! Below we will outline the steps you will need to take in order to accomplish this on your own website and we will cover some of the pitfalls along the way.
First things first, you will need to setup an instance of Dynamic Registration as illustrated in this blog posting
http://www.datasprings.com/news/blog/postid/50/dynamic-registration-authorizenet-arb-billing
After your module is setup, you can proceed with setting up a second instance of Dynamic Registration or you may add options to your existing registration form. In this blog we will be showing how to do it with two instances working together. Make sure all of your registration fields are being mapped to a core profile property. This will ensure when we need them, we’ll have them. Next step we need to take before we get started on our second form is create a profile field to record the users Subscription ID. So go into the User/Profile section of your portal and add a text field as shown below:
Now we need to go back to our first form (where users initially register and subscribe) and add a completion event. This event will be used to record the users subscription ID returned by the ARB API to a profile field. Do so as shown below:
What this does is grab the subscription ID returned by Authorize.net and stores it to our profile field. you will need to change the PropertyDefinitionID to the id of the property you created in your own portal.
Once you have the ID changed out go ahead and save this and try a registration. If successful you should now see a subscription id number in your profile field. If you do congratulations! If you don’t…go back and trace your steps, you probably just missed something.
Now…FINALLY, we’re on to creating our second form. In this form we will copy many of the same fields as the first. The fields you will need to create are listed below:
- Hidden Fields:
- AuthARB_BillToFirstName
- DNN Core Field: FirstName
- AuthARB_BillToLastName
- PGateway
- Default Value: AuthARB
- DNN Core Field: PGateway
- AuthARB_UserLoginName
- Default Value: [YOUR SPECIAL CODE]
- AuthARB_TransactionKey
- Default Value: [YOUR SPECIAL CODE]
- AuthARB_SubscriptionOccurrences
- AuthARB_SubscriptionID
- DNN Core Field: AuthARB_SubscriptionID
- AuthARB_Type
- AuthARB_SubscriptionAmount
- AuthARB_Email
- UserName
- Password
- Password2
Map the last 4 fields to the DNN Core Integration section of your Dynamic Registration. Lastly setup the Authorize.Net Gateway options under Module Configuration as shown below:
&x_description=[DESCRIPTION FOR YOUR SERVICE HERE]&x_first_name=$(AuthARB_BillToFirstName)&x_last_name=$(AuthARB_BillToLastName)&x_email=$(Email)&x_currency_code=USD&x_amount=$(AuthARB_SubscriptionAmount)&x_subscription_id=$(AuthARB_SubscriptionID)
Save that and you are done! Try it by cancelling your existing registration. You can setup your completion events by sending out emails, moving to different roles, etc. now. Let us know if you have any questions.