flagflag  

ObjectBuy

  • You cannot open a new topic into this forum
  • Guests cannot post into this forum

なし ObjectBuy

msg# 1
Previous post - Next post | Parent - Children.1 .2 | Posted on 2013/4/20 19:43
unethika  Just popping in   Posts: 3
ObjectBuy中、オブジェクトは、転送にお金の前に来る。
During ObjectBuy, object comes before money transfer.

お金のトランザクションが失敗した場合、オブジェクトはとにかく転送される。
If a money transaction fails, the object is transferred anyway.

これはなぜ起こるのでしょうか?
Why does this happen?

お金のトランザクションの後にオブジェクトを転送することはできますか?
Is it possible to transfer the object after the transaction of money?
Votes:46 Average:4.35

なし Re: ObjectBuy

msg# 1.1
Previous post - Next post | Parent - No child | Posted on 2013/4/20 22:40 | Last modified
iseki  Home away from home   Posts: 1581
Hi unethika,

Thank you for Japanese text. It is very intelligible.

When processing of an object is failed, system should be rollback. Was not rollback performed?
This is a very difficult problem.

Surely, in our code, after sending an object, money is transacted.

UUID receiverId = sceneObj.OwnerID;
if (mod.BuyObject(remoteClient, categoryID, localID, saleType, salePrice))                     // Object is transferred
{
    ulong regionHandle = sceneObj.RegionHandle;
    TransferMoney(remoteClient.AgentId, receiverId, salePrice,                                 // Pay Money
                (int)TransactionType.PayObject, sceneObj.UUID, regionHandle, "Object Buy");
}

It is possible that after money was transacted, sending an object.
In this case, it may be happen that user paid money but object is not sent.

Do you think which is better?
Votes:47 Average:4.47

なし Re: ObjectBuy

msg# 1.2
Previous post - Next post | Parent - Children.1 | Posted on 2013/4/21 7:52
unethika  Just popping in   Posts: 3
事前にお金を転送する最も安全な方法です。
It is the most secure way to transfer money in advance.

その場合には、DTL機能の処理が妥当である。
In that case, the processing of DTL function is reasonable.

https://github.com/unethika/Mod-DTL_NSL-MoneyServer

これは、オブジェクトの所有者の権利を有します。
It reserves the right of the owner of the object.

障害が発生した場合、当事者は手動でオブジェクトを転送することができるであろう。
If a failure occurs, the parties will be able to transfer objects manually.
Votes:56 Average:5.18

なし Re: ObjectBuy

msg# 1.2.1
Previous post - Next post | Parent - No child | Posted on 2013/4/22 18:01
iseki  Home away from home   Posts: 1581
Hi unethika,

I see.
Thank you for your comment.

I am going to correct it at next version.
Thanks.


--- MoneyModule.cs-     2013-04-22 17:56:50.000000000 +0900
+++ MoneyModule.cs      2013-04-22 17:58:44.000000000 +0900
@@ -690,12 +690,21 @@
                                        {
                                                UUID receiverId = sceneObj.OwnerID;
                                                ulong regionHandle = sceneObj.RegionHandle;
+                                               bool ret = TransferMoney(remoteClient.AgentId, receiverId, salePrice, 
+                                                                                                       (int)TransactionType.PayObject, sceneObj.UUID, regionHandle, "Object Buy");
+                                               if (ret)
+                                               {
+                                                       mod.BuyObject(remoteClient, categoryID, localID, saleType, salePrice);
+                                               }
+
+                                               /*
                                                if (mod.BuyObject(remoteClient, categoryID, localID, saleType, salePrice))
                                                {
                                                        ulong regionHandle = sceneObj.RegionHandle;
                                                        TransferMoney(remoteClient.AgentId, receiverId, salePrice,
                                                                                        (int)TransactionType.PayObject, sceneObj.UUID, regionHandle, "Object Buy");
                                                }
+                                               */
                                        }
                                }
                                else
Votes:55 Average:5.64

  Advanced search


Site Search

Login

Username:

Password:


Lost Password?
Register now!!

Sub Menu

mini Calendar

Last MonthMay 2024Next Month
Su Mo Tu We Th Fr Sa
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
Today

Who's Online

89 user(s) are online (5 user(s) are browsing Forum)

Members: 0
Guests: 89

more...

Access Counter

Today : 1184011840118401184011840
Yesterday : 7722772277227722
Total : 2344332123443321234433212344332123443321234433212344332123443321
Powered by XOOPS Cube 2.1© 2001-2006 XOOPS Cube Project
Design by XoopsDesign.com