So after wrapping my mind around a problem I've had for a lot of time, I've come to ask here to maybe get some clearance. I am currently working on a bot that requires me calling methods outside of steam, and it initially seemed to be working. However, after some time, it has started to quite randomly return error 2 (GenericFailure), and sometimes it does not. The only thing I can think off was Steam logging the account out and requiring a relogin (it buys from steam store, which I know to sometimes require a relogin). However, making the account relogin did not seem to solve the problem, and I still occasionally get GenericFailure returned. So my question is: What can be this error be caused by? I have found that the wrong request method might be causing it, but I do have the correct method, so that will not be the case. What else? I know this might be a gray area, but if anyone has any idea, that would be great. Although this question is very general, I will supply the code which it fails on in case that could give you a clue about what is wrong:
request.post("https://store.steampowered.com/checkout/inittransaction/", {
form: {
gidShoppingCart: shoppingCart,
gidReplayOfTransID: -1,
PaymentMethod: "steamaccount",
abortPendingTransactions: 0,
bHasCardInfo: 0,
CardNumber: "",
CardExpirationYear: "",
CardExpirationMonth: "",
FirstName: "",
LastName: "",
Address: "",
AddressTwo: "",
Country: "",
City: "",
State: "",
PostalCode: "",
Phone: "",
ShippingFirstName: "",
ShippingLastName: "",
ShippingAddress: "",
ShippingAddressTwo: "",
ShippingCountry: "",
ShippingCity: "",
ShippingState: "",
ShippingPostalCode: "",
ShippingPhone: "",
bIsGift: 1,
GifteeAccountID: accountid,
GifteeEmail: "",
GifteeName: "Client",
GiftMessage: files.getConfig().message,
Sentiment: "Best%20Wishes",
Signature: files.getConfig().signee,
ScheduledSendOnDate: 0,
BankAccount: "",
BankCode: "",
BankIBAN: "",
BankBIC: "",
TPBankID: "",
bSaveBillingAddress: 0,
gidPaymentID: "",
bUseRemainingSteamAccount: 1,
bPreAuthOnly: 0,
sessionid: bots[bot].sessionid,
snr: snr
},
json: true
}
The body which is returned looks like so:
{ success: 2, purchaseresultdetail: 0, paymentmethod: 0, palpaltoken: null, transid: null }