I am working on a Drupal website that sell photos. I am trying to implement a credit system to the site that allow the users to deposit money as credit to the website and then use the credit to buy the photos in the website. Right now, I am using Drupal Commerce and Userpoints modules to replicate the functionality. However, I have encountered a few obstacles. There are two main tasks you need to solved in this product.
1. Convert userpoints to use decimal
By default, userpoints module only supports integer (no decimal). Since the website is going to use credit-based system, it will be weird that the credit/point transactions or balance cannot display cents. In fact, there is an existing thread discussion about this feature. Please study the thread at http://drupal.org/node/1165256. Displaying in decimal shall be a new feature for version userpoints 7.x-2.0 but there is no release date yet and I can’t afford to wait any longer. I want to have this feature in 7.x-1.0.
2. Buy userpoints using Drupal Commerce
After completing the first task, I want to let the user be able to buy userpoints using Drupal Commerce. Again there is an existing issue discussing about this issue, please study the thread at http://drupal.org/node/1270290. It is something similar that I want but that it does not have a seemless workflow; the site admin has to predefined the credit in product type first with a specific amount, only then the user can buy the points going though “Add to Cart” process. This process is not what I am looking for because the workflow is not streamline and the user cannot buy a flexible amount of points.
Therefore, the features that I want for this task are:
a) Allow users to enter a custom amount of userpoints they want to buy in a textfield and then proceed to “Checkout” immediately, skipping the “Shopping Cart” Page.
b) The amount entered in the textfield needs to work with decimal as well. The userpoints will be treated the same as the currency value. For example, if the user purchases 19.90 points with $19.90, then $19.90 credit will be added to his/her account balance in the website.