Hello Everyone,
I am trying to configure Jbilling realtime mediation of video events (cdrs). I am trying to figure out validatepurchase() but it's not returning any balance. I have created a prepaid customer (order type prepaid), added some balance in it. Now when I use rate order by calling updatecurrentorder(), balance is reducing but when I call validatepurchase() it returns 0. will appreciate your help & support.
==> logs/jbilling.log <==
2010-07-15 23:47:34,583 DEBUG [com.sapienter.jbilling.server.pluggableTask.admin.PluggableTaskManager] total classes = 1
2010-07-15 23:47:34,583 DEBUG [com.sapienter.jbilling.server.pluggableTask.admin.PluggableTaskManager] Applying task com.sapienter.jbilling.server.item.tasks.RulesPricingTask2
2010-07-15 23:47:34,583 DEBUG [com.sapienter.jbilling.server.util.DTOFactory] getting the user 50
2010-07-15 23:47:34,606 DEBUG [com.sapienter.jbilling.server.util.PreferenceBL] Now looking for preference 43 ent 1 table entity
2010-07-15 23:47:34,637 DEBUG [com.sapienter.jbilling.server.user.ContactBL] ContactDTO: getting custom fields
2010-07-15 23:47:34,639 DEBUG [com.sapienter.jbilling.server.user.ContactBL] Returning dto with 0 fields
2010-07-15 23:47:34,639 DEBUG [com.sapienter.jbilling.server.item.tasks.RulesPricingTask2] in memory context=PricingResult:itemId=201 userId=50 currencyId=12 price=null pricing fields result id=0 id=-9223372036854775803 done=false
2010-07-15 23:47:34,639 DEBUG [com.sapienter.jbilling.server.item.tasks.RulesPricingTask2] in memory context=UserDTO{id=50, userName='ALIF'}
2010-07-15 23:47:34,639 DEBUG [com.sapienter.jbilling.server.item.tasks.RulesPricingTask2] in memory context= id 600 organizationName ALIF address1 I-10/3 address2 null city lastName Rasheed firstName Atif initial null title null phoneCountryCode null phoneAreaCode 301 phoneNumber 5500958 faxCountryCode null faxAreaCode null faxNumber null email atifrasheed@gmail.com createDate 2010-06-30 12:11:18.0 deleted 0 include 1 userId null contactMap = null null versionNum 0{}
2010-07-15 23:47:34,649 DEBUG [com.sapienter.jbilling.server.item.tasks.PricingResult] Setting price. Result fields id 0 item 201 price 10
2010-07-15 23:47:34,650 DEBUG [com.sapienter.jbilling.server.user.UserBL] validating purchase items:[ItemDTO: id=201] amounts [10] customer CustomerDTO{id=400, baseUser.userId=50, baseUser.userName=ALIF, dynamicBalance = 98900, credit limit = 0}
2010-07-15 23:47:34,653 DEBUG [com.sapienter.jbilling.server.pluggableTask.admin.PluggableTaskManager] total classes = 0
Does not return balance
validatePurchase is not supposed to return balance. It may return a quantity if the user is authorized = true, then the quantity is the number of units, the user may be able to purchase of the given Item against their current balance.
-Vikas
Developer
jBilling.com
balance returned is always 0 and success true
no matter what I do the api call to validatePurchase() always returns true in authorized + success, and a quantity of 0.
is there a known issue, or a 'catch' regarding this?
i've bought all manuals (extension + integration + telco) and I still can't work this out - yet it is absolutely critical, in order to be able to do real-time mediation.
Giorgos Saslis
Cytech Ltd. - Mobile Marketing Software
http://www.cytech.gr/