Harness Racing Timer–for Android

7. January 2012 16:43

A few days ago I released my first app in the Android market.  It’s an application for timing harness horse races (using the average kilometer method). Also includes a converter to and from mile times. (optional using fractions of a mile)

 

The initial version is aimed primarily for the Swedish racing with more countries to follow. If you want your language translation included please email devlolapps@gmail.com.

 

Currently available languages:

English: Harness Racing Timer

Svenska: Travtidtagaren

Norsk: Trav Timer

 

Get your copy for free in the Android Market:

60_avail_market_logo14

  RacingTimer-Logo9

coco_chip_vinner_111010_hanold_thumb

ASP.NET providers for MongoDB

21. September 2011 00:40

A little while back I started to get interested in NoSQL and have been eyeballing some MongoDB and RavenDB information. No real coding, just some snippets here and there and watching webinar presentations etc to see what other people are doing and what capabilities and limitations there are. It’s a somewhat different animal than the relational concept (which I am no master of, I know the basics and that’s it)

 

I looked around for a ASP.NET membership provider for Mongo and didn’t find one. But I was surprised today when one popped up. Available at Github and NuGet package


MongoDB.Web is a collection of ASP.NET providers (caching, membership, profiles, roles, session state, web events) for MongoDB.”

 

I fired up fresh local Mongo, created a new empty ASP.NET Web application, replaced the provider sections of the Web.Config with provider sections from the example… and presto, it seems to work. Registering users, changing passwords etc. I am not sure if it is 100% implemented yet but as far as I can tell it works.

 

Cool stuff if you quickly want get up and running with a membership based ASP.NET site on top of MongoDB!

DotNetNuke and the Paypal sandbox

30. August 2011 18:15

I had a really late night session (although 8am technically is morning and not still “night”, lol) testing out the native PayPal subscription feature in the DotNetNuke CMS platform. I’ve been looking to learn how this subscription service would be implemented and at a first glance there would be some major obstacles:

 

  1. This feature is so poorly documented it’s unbelievable.
  2. On forums and blogs. when people ask about this feature they usually get the reply to go with a 3rd party module. This could probably be a result of 1) above.
  3. Given the two points above, does the native subscription feature even work, and is it ready for “prime time”?
  4. How do you actually test a feature like this. As this is my first time working with any type of payment gateway whatsoever, I was clueless about this.

 

Well, readers.. it turns out that despite points 1 and 2 above, the answer to 3 is “Yes! It does work!”. And the answer to 4 is that PayPal offers a sandboxed environment with fake seller accounts, fake buyer accounts and “playmoney” for you to test your solution. It even has a fake mail inbox where you can see the different type of confirmation and notification emails that the various transactions might produce. Great stuff!

 

This rather long post with lots of screenshots and is divided into sections:

DNS setup

PayPal setup

DNN Setup

- Pages

- Site Settings

- Security Role Setup

- User subscribing

- User cancelling subscription

- Creating a subscription shortcut

 

Let’s get to it!

 

DNS setup

Essential for the PayPal feature to work is that your development site is accessible from the internet. In my case I setup a DNS CNAME (dnntest.devlol.com) record to point to my development host. Also port forwarding in my router to allow traffic into my IIS. This is beyond the scope of this post so you figure it out.

 

 

PayPal setup

So what you need to first is to head over to the PayPal

developer siteand create an account there and log in. Then you create at least two Test Accounts. I choose to use their preconfigured types and made two accounts, one of the standard type “Buyer” and one of the type “Seller”. Both test accounts complete with mockup credit cards and bank info. The Buyer account I started of with a small amount of money already (fake) deposited.

 

Click on the screenshot to the right to see how these accounts are setup.

  paypal_sandbox_testaccounts

DotNetNuke setup

Pages

Next, it’s time to head on over to your DNN site and log in as Admin. The first I did was to set up two pages called Success and Cancel. These will act as the URLs to which PayPal returns the user after having made a transaction at their site. For my purposes I created a Subscribe page at the top menu level and the two child pages under this one leaving me with the following structure:

 

http://dnntest.devlol.com/Subscribe.aspx

-- http://dnntest.devlol.com/Subscribe/Success.aspx

-- http://dnntest.devlol.com/Subscribe/Cancel.aspx

 

Site Settings

Then I went into the “Admin / Site Settings / Advanced Settings” and entered the currency to use with PayPal. For Processor UserId I entered the fake email address which the PayPal sandbox created for my Seller account. Password can be left empty (AFAIK). For Return URL enter the address to the Success page and Cancel URL is set to the address of the Cancel page. Then you check the Use Sandbox option and save your settings. Screenshot below illustrates my setup.

 

paypal_dnn_settings

 

 

BUG WARNING AND WORKAROUND!!

I found that the sandbox would never work despite selecting the Use Sandbox setting. After some debugging I found that the two aspx pages that use the feature had the same bug. I have reported this as a bug but as of now it is not yet Resolved. See http://support.dotnetnuke.com/issue/ViewIssue.aspx?ID=17681&PROJID=2 for details.

 

For now make the workaround by editing the pages,

\admin\Sales\PayPalSubscription.aspx.cs  (line 88)
\admin\Sales\PayPalIPN.aspx.cs (line 138)

 

In each file change the line

  1. // Sandbox mode
  2.  if (settings.ContainsKey("paypalsandbox") && !String.IsNullOrEmpty(settings["paypalsandbox"]) && settings["paypalsandbox"] == "true")

to

  1. // Sandbox mode
  2. if (settings.ContainsKey("paypalsandbox") && !String.IsNullOrEmpty(settings["paypalsandbox"]) && settings["paypalsandbox"] == "True")

so that the comparison is on “True” with capital T.

 

I used DNN 6.0.1 source distribution and this section of the blog post will be removed when this issue is resolved.

 

Security Role Setup

Next we need to configure a Role for our paying subscribers. I named this Monthly subscribers and opted to have this as a Public role, so that users can opt-in by themselves from the “Manage Services” tab of the “Edit Profile” page. The Auto assign option should for obvious reasons not be used as we do not wish the users to automatically belong to this Role after self registration.

paypal_dnn_security_roles

 

For my testing purposes I set 5 GBP per month and a 1 GBP one day trial period.

paypal_dnn_security_roles_advanced

 

User subscribing

So now we are ready to test the subscribing procedure. Using an existing or newly created (regular user) account go to the “Manage profile / Manage services” page. There your “monthly subscriber” role should be visible with a Subscribe link. It also displays the billing details for both trial and reoccurring payment.

 

paypal_dnn_manage_services

 

When the user clicks on Subscribe Monthly subscriber he/she will be taken to the (sandbox) PayPal login page. In our case we will log in using the fake Buyer email that was created for our test account. Then we complete and approve the transaction.

 

paypal_dnn_paypal_sandbox_login

Note that is says “Test Site” to indicate that we are using the sandbox. Also the browser URL is https://www.sandbox.paypal.com/xxxxxx

 

Here is the thing! I see many people complain that in their testing the transaction is completed, the Seller test account receives money from the Buyer test account. But when returning to the DNN the user has not been added to the appropriate Role. I do not experience this per se, but one issue I had is that I have to either, as the Buyer, manually Accept the payment or have configured my PayPal profile to automatically do so. Before I have done this.. the PayPal IPN (Instant Payment Notification) service will call the page http://dnntest.devlol.com/Admin/Sales/PayPalIPN.aspx in the background to let your site know about the transaction. But if the Seller hasn’t accepted the payment manually or automatically the IPN will post your site a message about the transaction status being Pending. Not until the IPN message indicates status is Completed the RoleController.UpdateUserRole() function will be called and the user should now belong to the new Role. I do not know if this is the problem the forum people are having but perhaps it is!

 

When the user clicks the “Return” button on the PayPal site he/she is returned to the Success page we defined earlier in out Site Settings.

 

If we as Admin examine the test user we should se that he/she should be added to the Monthly subscriber role as below. The expiry date in this case is set to the end of the trial period.

 

paypal_dnn_examine_user_role_added

 

And in the subscribed User’s control panel the subscription is also visible.

 

paypal_dnn_selfexamine_user_role_added

 

Nice huh!!!

 

If we login to our sandbox account and examine the Buyer and Seller accounts we can see that some money have been transferred.

 

paypal_sandbox_testaccounts_after_payment

 

 

User subscription cancellation

In the unlikely event that our User is unsatisfied with our service, and he/she wants to end the subscription this can be done from the Manage Services page and the Unsubscribe link. This will again take the User to the PayPal site and there the Recurring Payment can be cancelled from his “My pre-approved payments” settings.. Of course the Seller can also cancel the Recurring Payment from his side. When a cancellation is performed, the PayPal IPN will again call our http://dnntest.devlol.com/Admin/Sales/PayPalIPN.aspx page to notify our site.

 

ISSUE: When a user has cancelled the subscription and then renews, it seems to back into Trial mode and only £1 GBP is transferred from Buyer to Seller. I need to do some more testing for this to see if I did something wrong or if there is a bug. In any case I’m sure this can be worked around by creating separate Trial and “full subscriber” Roles. Side effect of this would be that the User isn’t automatically upped to the regular fee when the Trial is over and has to Subscribe to a new Role.

 

Creating a shortcut subscription link

I do not know if the following is a “supported” feature or if it just works by accident. But you can create a HTML link anywhere on the site. First you need to find the id of the Role which the subscription is for. I did this by simply looking it up in the dnn_Roles table in our database. You can also look at the Security Roles page Under Admin and examine the Manage Users link for the role, which will contain the correct number.

Example  xxxxxx/RoleId/4/mid/373/Default.aspx In this case the RoleId for Monthly subscriber is 4. So I simply create a link to http://dnntest.devlol.com/Admin/Sales/PayPalSubscription.aspx?roleId=4 and when this link is clicked the User is taken immediately to the PayPal site!

It’s a hit!

19. August 2011 11:51

 

I don’t want to brag (well I kind of do actually) but MarketMatcher has so far been a huge success! People are loving it and I must say it’s probably the best piece of coding I’ve created when it comes to functionality and originality.

 

In terms of functionality it saves a lot of time every day for a lot of people. It also gives indications to the users about opportunities that they might not have found without the tool. And hopefully helps them to become even more successful traders.

 

In terms of originality it beats my old “leader” which was a Java applet banner for the old Boxman shopping site which sold CD’s and DVD’s. In the applet music charts were displayed in a scrollable fashion and with a click of the mouse, songs and albums could be added to the users shopping cart on the Boxman site, ready for purchase. These days that’s not something that one would raise eyebrows over.. but back then (circa 1999) it was a cool thing. It even got a prize in the Resumé'sWebbtoppen” which was (and probably is) THE monthly competition award amongst the Swedish web bureaus and advertising agencies.

mm_ss

 

Back in the day it was not as hard to come up with original stuff. But now a lot more stuff already has been invented so it feels really good in 2011 to create something that renders in the following user testimonial:

"MarketMatcher is a wonderful piece of kit. So simple yet so effective. It's incredible that after all these years nobody has ever thought about doing this."

 

 

Well… now someone did Smile

 

The first version of MarketMatcher only covers upcoming football matches until kickoff. Together with Darren of bettingsystemnotes.com and Adam of tradingfootball.eu I am now in the planning stages of the next version which, amongst some minor additions and fixes, will include inplay alerts for trading strategies on ongoing matches. Hopefully this will help the traders to even more opportunities to make money.

MarketMatcher is live

10. August 2011 12:17

Just in time for the new football season we launched MarketMatcher over at Bettingsystemnotes.com. It opened up about a week ago but it was during the weekend it got it’s real “opening” during the regular season cards.

 

Turned out to be a very appreciated app that the traders seem to love. According to the weblogs they keep coming back again and again. Have a look at the introduction video that Darren of Bet72 made:

 

Upgrade

27. July 2011 17:39

So I updated the BlogEngine software to latest version 2.5.0.6. Everything seemed to be working at first. Until I started to change some settings and ran into the ever so present write permission thingie.

 

Update: all fixed. Even solved some problems with saving some settings that I had in the old version. Seems that email settings for Contact NEVER worked. Ah well, I don’t think too many of you tried to email me anyway. The ones trying to sell cheap Viagra knockoffs seem to have my address anyway!

 

Update2: I also re-enabled to comments after tinkering with Akismet spam filter. Let’s see how it goes.

Testdriving DNN 6

27. July 2011 15:32

I'm testdriving the newly released DotNetNuke 6 community edition. I have used the version 5 for a live project in the past but felt the UI a little dated and sluggish.

 

Version 6 is a complete rewrite. It is now based on C# (old one was VB.Net) and the host/admin UI is improved. It's kinda AJAX-ish and performs a lot better. Looks better too!

 

Since I don't really consider graphic design as one of my strengths I don't like skinning. It's tedious work and CSS is useful but at the same time retarded. I usually go with a Artisteer created template. I do not know yet how DNN 6 and Artisteer 3 work together. But there is only one way to find out. Make a skin and try it out!

Timesaving new web app for finding trades on Betfair

21. July 2011 22:08

I've been busy lately working on a new powerful version of the BFind tool. This time it's a web version that will includesome powerful built in strategies provided by The Nugget Crew over at www.tradingfootball.eu . Check www.bettingsystemnotes.com out for this coming attraction.

I pay for the web hosting

21. July 2011 22:05

So I might aswell write something.

 

"Something"

Comments spam

14. January 2011 20:49

I had no idea blog post comment smam was such a huge thing. I'm gonna have to do something about this as the built in spam protection seems to fail..