Ventero/FRESteamWorks

orderid incorrect for MicroTxnAuthorizationResponse

Kelsonk opened this issue · 2 comments

Hi, I'm trying to handle micro transactions using the following example code.

if (e.req_type == SteamConstants.RESPONSE_OnMicroTxnAuthorizationResponse)
{
var microTxnResult:MicroTxnAuthorizationResponse;
while ((microTxnResult = _steam.microTxnResult()) != null)
{
if (microTxnResult.authorized)
{
handleSuccessfulOrder(microTxnResult.orderID);
}
}
}

Unfortunately, the orderID for every MicroTxnAuthorizationResponse is wrong. It seems to concatenate up to the first dash every time.

For instance, one order id would be '06faf616-17ca-47a2-bbda-50b3648fced3', and when trying to access it from the response, it show '06faf616'.

Another example: "80913992-f346-4e1f-b8ba-04b70ce2c220" turns into '80913992'.

I can't figure out a way around this except to perhaps ignore the order id from the response, and simply pull all orders from a user from the database and try to verify them. I really need this to be fixed, thank you!

From the Steamworks documentation:

Order ID - A unique 64-bit number that you assign for this purchase. This number is your key to the transaction. It is used to reference the transaction within the Steam system.

So the order ID needs to be a 64-bit number (i.e. an integer between 0 and 18446744073709551615) - the fact that 06faf616 comes back at all is more or less pure coincidence.

Does that answer your question?

Yes, I'm dumb and didn't even remember I was setting the orderID, thank you for your response.