Passing through money
|
|
Zeb Wyler
Registered User
Join date: 17 Mar 2007
Posts: 3
|
05-09-2007 07:27
I'm currently working on a project that would allow users to put some sort of terminal on their property. Anyone would be able to pay the terminal, and the money will be forwarded to my account, and a balance is updated on an external http server.
The script will do a llGiveMoney to me, with the exact amount that the user paid. So basically, user 1 pays the terminal that is property of user2, and user2 automatically pays me the same amount. After the transaction, user2 will have the same amount of money as before the transaction.
There's only one thing bothering me, since objects can't pay other objects, I have no way to automatically tell if the payment was indeed forwarded to my account (since llGiveMoney does not return a usefull value).
As I will be offering services to the users who pay a terminal, I need to be sure I get the money.
For this, I would like to know the chances of a payment not going through. The only reason a payment should not succeed, is when the owner of the terminal does not have enough money. Since the payment is started in the money event, and the exact amount of money that was received is payed, I would think there should always be enough money in the account. The only way for this to not be the case, is that if another script were to use the money between the receiving of the funds, and the call to llGiveMoney.
The alternative would be that I were to place all terminals myself, thus me being the owner of the terminal, but this would give me a lot more work, and would really be a bottleneck getting the project in the air.
Anyone got any comments on this way of working? Is it safe enough to assume the money won't go anywhere in the split second between receiving and passing on? Any other ideas are welcome as well.
|
|
Kenn Nilsson
AeonVox
Join date: 24 May 2005
Posts: 897
|
05-09-2007 07:57
The "Pay" action is rather reliable.
Your transaction history will show all money transfers to you--even through llGiveMoney...though the problem will be that it's always Owner 2 giving you the money, not the actual people who pay the terminal.
In my opinion, persons are going to be pretty annoyed if they have a terminal that constantly spams them "So and so paid you L$20" and "You paid so and so L$20". People don't like going through those type of dialog boxes when none of the money transferred is being left with them.
PERSONALLY, I'd go ahead and just own all the terminals myself.
_____________________
--AeonVox--Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms chasing ghosts, eating magic pills, and listening to repetitive, addictive, electronic music.
|
|
Winter Ventura
Eclectic Randomness
Join date: 18 Jul 2006
Posts: 2,579
|
05-09-2007 08:05
yeah, that way people can feel safe depositing in your atm's, when they verify it is owned by you. (check out an SLX atm, and read the help files)
_____________________
 ● Inworld Store: http://slurl.eclectic-randomness.com ● Website: http://www.eclectic-randomness.com ● Twitter: @WinterVentura
|
|
Adrian Zobel
Registered User
Join date: 4 Jan 2006
Posts: 49
|
05-09-2007 08:25
Even if you can trust the money won't go anywhere in that split second, I'm not sure that the money will arrive in the account fast enough. If the request to give out money is received before the central database has updated the terminal-owner's balance and forward the new balance to the simulator, the give-money event could fail. It's very easy to imagine a situation with a half-second or full-second of lag, and your script sending you the money after waiting less than a second. This is *exactly* the kind of thing that LL will never guarantee about LSL, it might be fine most of the time but there's never any guarantee.
Another thing to consider: if people are allowed to set our their own terminals, some of them might deed the terminal to a group.
|
|
Newgate Ludd
Out of Chesse Error
Join date: 8 Apr 2005
Posts: 2,103
|
05-09-2007 08:38
From: Zeb Wyler I'm currently working on a project that would allow users to put some sort of terminal on their property. Anyone would be able to pay the terminal, and the money will be forwarded to my account, and a balance is updated on an external http server.
The script will do a llGiveMoney to me, with the exact amount that the user paid. So basically, user 1 pays the terminal that is property of user2, and user2 automatically pays me the same amount. After the transaction, user2 will have the same amount of money as before the transaction.
There's only one thing bothering me, since objects can't pay other objects, I have no way to automatically tell if the payment was indeed forwarded to my account (since llGiveMoney does not return a usefull value).
As I will be offering services to the users who pay a terminal, I need to be sure I get the money.
For this, I would like to know the chances of a payment not going through. The only reason a payment should not succeed, is when the owner of the terminal does not have enough money. Since the payment is started in the money event, and the exact amount of money that was received is payed, I would think there should always be enough money in the account. The only way for this to not be the case, is that if another script were to use the money between the receiving of the funds, and the call to llGiveMoney.
The alternative would be that I were to place all terminals myself, thus me being the owner of the terminal, but this would give me a lot more work, and would really be a bottleneck getting the project in the air.
Anyone got any comments on this way of working? Is it safe enough to assume the money won't go anywhere in the split second between receiving and passing on? Any other ideas are welcome as well. The other possibility is that the owner did not grant DEBIT permissions when the object was set out. In that case the money would go immedaitely into their account and stay there. If the object IM's or emails you when a transaction occurs then you can reconcile the transfers, i.e. if you receive a payment made message but find no corresponding payment you will know, albeit after the fact, that an error of some form occurred.
_____________________
I'm back......
|
|
Zeb Wyler
Registered User
Join date: 17 Mar 2007
Posts: 3
|
05-09-2007 09:09
Thanks everyone for your reactions.
@Kenn Nilsson: although the payment will show up in the transaction history, it would be a manual process of checking that. Also, if I were to write some program (not within SL) to verify the trasaction, this would probably lead to considderable delays, since it always limps behind half an hour of so (and people hate to wait once they have paid for something).
@Winter Ventura: owning the terminal myself would indeed be an extra verification for the user, but I'll just have to considder the pro's against the cons.
@Adrian Zobel: I 'assume' the money event will not fire until after the money has arrived in the account. Otherwise one could never be sure he got the money, since the transaction could still fail after the money event was fired. You do have a good point with regards to group-deeded objects. I think this is something I can check for is LSL, and take appropriate actions (like disable the terminal).
@Newgate Ludd: I already made it so that the terminal will not be activated when DEBIT permissions are not given. The default state does not have a money event (thus cannot accept payments), and once permissions are granted it moves into a different state. If for some reason DEBIT permissions are revoked (not sure if it's even possible), the object re-enters the nopay state.
|
|
Talarus Luan
Ancient Archaean Dragon
Join date: 18 Mar 2006
Posts: 4,831
|
05-09-2007 10:50
You've pretty much got the right of it all.
Unfortunately, there is no way to absolutely guarantee that llGiveMoney succeeded, especially in the case you describe.
However, what I would do is this: set up an external website with a reporting script. When one of your kiosks is paid, immediately pay yourself from it, and use llHTTPRequest to record the transaction. At the end of some regular period, reconcile the reported income with your SL transaction history for each owner. If you find any discrepancies, resolve them by contacting the affected owner(s).
Of course, I shouldn't have to point out that there is an inherent distrust by many people (myself included) to giving ANY object I don't have full perms to (and have thoroughly examined for money trojans) DEBIT permissions.
Sometimes, trust has to go both ways.
|