mirror of
https://wiilab.wiimart.org/wiimart/WiiSOAP
synced 2025-09-05 13:01:01 +02:00
Properly handle ListPurchaseHistory
This commit is contained in:
parent
479edf4534
commit
58f9612429
27
ecs.go
27
ecs.go
@ -167,20 +167,27 @@ func purchaseTitle(e *Envelope) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func listPurchaseHistory(e *Envelope) {
|
func listPurchaseHistory(e *Envelope) {
|
||||||
|
// TODO(SketchMaster2001) Query database for transactions
|
||||||
e.AddCustomType([]Transactions{
|
e.AddCustomType([]Transactions{
|
||||||
{
|
{
|
||||||
TransactionId: "00000000",
|
TransactionId: "00000000",
|
||||||
Date: e.Timestamp(),
|
// Is timestamp in milliseconds, placeholder one is Wed Oct 19 2022 18:02:46
|
||||||
Type: string(SERVICE),
|
Date: "1666202566218",
|
||||||
TotalPaid: 0,
|
Type: "PURCHGAME",
|
||||||
Currency: "POINTS",
|
TotalPaid: 0,
|
||||||
ItemId: 0,
|
Currency: "POINTS",
|
||||||
TitleId: "000100014843494A",
|
ItemId: 0,
|
||||||
ItemPricing: []Limits{
|
ItemPricing: Prices{
|
||||||
LimitStruct(DR),
|
ItemId: 0,
|
||||||
|
Price: Price{
|
||||||
|
Amount: 0,
|
||||||
|
Currency: "POINTS",
|
||||||
|
},
|
||||||
|
Limits: LimitStruct(PR),
|
||||||
|
LicenseKind: PERMANENT,
|
||||||
},
|
},
|
||||||
ReferenceId: "01234567890123456789012345678912",
|
TitleId: "000101006843494A",
|
||||||
ReferenceValue: 1,
|
ReferenceId: "01234567890123456789012345678912",
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
17
structure.go
17
structure.go
@ -110,15 +110,14 @@ type Limits struct {
|
|||||||
|
|
||||||
// Transactions represents a common XML structure.
|
// Transactions represents a common XML structure.
|
||||||
type Transactions struct {
|
type Transactions struct {
|
||||||
XMLName xml.Name `xml:"Transactions"`
|
XMLName xml.Name `xml:"Transactions"`
|
||||||
TransactionId string `xml:"TransactionId"`
|
TransactionId string `xml:"TransactionId"`
|
||||||
Date string `xml:"Date"`
|
Date string `xml:"Date"`
|
||||||
Type string `xml:"Type"`
|
Type string `xml:"Type"`
|
||||||
TotalPaid int `xml:"TotalPaid"`
|
TotalPaid int `xml:"TotalPaid"`
|
||||||
Currency string `xml:"Currency"`
|
Currency string `xml:"Currency"`
|
||||||
ItemId int `xml:"ItemId"`
|
ItemId int `xml:"ItemId"`
|
||||||
// TODO: Is this correct? getComplex is called and then limits are queried
|
ItemPricing Prices `xml:"ItemPricing"`
|
||||||
ItemPricing []Limits `xml:"ItemPricing"`
|
|
||||||
TitleId string `xml:"TitleId,omitempty"`
|
TitleId string `xml:"TitleId,omitempty"`
|
||||||
ItemCode int `xml:"ItemCode,omitempty"`
|
ItemCode int `xml:"ItemCode,omitempty"`
|
||||||
ReferenceId string `xml:"ReferenceId,omitempty"`
|
ReferenceId string `xml:"ReferenceId,omitempty"`
|
||||||
|
Loading…
x
Reference in New Issue
Block a user