Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

question about payments

Rocketman Raymaker
Registered User
Join date: 4 Feb 2007
Posts: 530
05-27-2007 02:57
hi there, well i have almost finished a game i have been working on but want to improve the security of the payment system. There are 2 main things i feel i need to accomplish to do this, you may suggest more i may not have thought of.

firstly, i need to include a mechanism that makes sure the right amount is paid and if it isnt then refunds then refunds the player their money(if an underpayment) or refunds the difference(if an overpayment). I currently have the object so that you can only pay the amount it costs to play, but from my own experience playing games i know that occasionally the default pay message will show up instead and you could play for less then the actual price .
secondly, i need to include a mechanism that will not let the game work unless the owner has accepted permissions. I want it so the the gamed cant be paid unless the owner has accepted permissions. This is probably easy to implement, but i am not sure how.


If anyone has any tips or short script examples that would be great, also is there anything else i need to consider to make sure both players and owners of the game cant get ripped off?

Thank you so much for any ideas or advice you have to offer
_____________________
"Proud member of the anti-ginko busy body committee"
Newgate Ludd
Out of Chesse Error
Join date: 8 Apr 2005
Posts: 2,103
05-27-2007 05:50
One way to ensure that perrmissions have been granted is to only switch to the active state when the owner grants them.

You've pretty much described what you need for the money event, just translate it to script!

CODE

// Customer has paid us for a game
money(key id, integer amt)
{
if (amt >= iCost)
{
// customer has given us at least enough money
amt -= iCost;
StartGame(id);
}
else
{
llSay(0,"Sorry you didnt pay enough!");
}

if (amt > 0) // give back change
{
llGiveMoney(id, amt);
}
}
_____________________
I'm back......