s
Contact Login Register
h M

Cancelling Subscriptions Using Authorize.net ARB and Dynamic Registration

Author: Chad Nash/Tuesday, July 3, 2012/Categories: In The Flow

Rate this article:
No rating

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:

User Accounts

 

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:

 

Create   Manage Your Account

 

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:
    1. AuthARB_BillToFirstName
      • DNN Core Field: FirstName
    2. AuthARB_BillToLastName
      • DNN Core Field: LastName
    3. PGateway
      • Default Value: AuthARB
      • DNN Core Field: PGateway
    4. AuthARB_UserLoginName
      • Default Value: [YOUR SPECIAL CODE]
    5. AuthARB_TransactionKey
      • Default Value: [YOUR SPECIAL CODE]
    6. AuthARB_SubscriptionOccurrences
      • Default Value: 9999
    7. AuthARB_SubscriptionID
      • DNN Core Field: AuthARB_SubscriptionID
    8. AuthARB_Type
      • Default Value: Cancel
    9. AuthARB_SubscriptionAmount
      • Default Value: 0.00
    10. AuthARB_Email
    11. UserName
    12. Password
    13. 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.

Number of views (177580)/Comments (-)

Tags:
blog comments powered by Disqus

Enter your email below AND grab your spot in our big giveaway!

The winner will receive the entire Data Springs Collection 7.0 - Designed to get your website up and running like a DNN superhero (spandex not included).

Subscribe