mirror of
https://wiilab.wiimart.org/wiimart/WiiSOAP
synced 2025-09-03 20:11:14 +02:00
Attempt something
I honestly forget what I was doing, but it's pending and I'll change it later anyway
This commit is contained in:
parent
bd48515bf9
commit
ca3eabab27
24
ecs.go
24
ecs.go
@ -108,15 +108,21 @@ func purchaseTitle(e *Envelope) {
|
||||
}
|
||||
|
||||
func listPurchaseHistory(e *Envelope) {
|
||||
e.AddCustomType(Transactions{
|
||||
TransactionId: "12345678",
|
||||
Date: e.Timestamp(),
|
||||
Type: "SERVICE",
|
||||
TotalPaid: "7",
|
||||
Currency: "POINTS",
|
||||
ItemId: "17",
|
||||
ItemPricing: "7",
|
||||
Limits: LimitStruct(DR),
|
||||
e.AddCustomType([]Transactions{
|
||||
{
|
||||
TransactionId: "12345678",
|
||||
Date: e.Timestamp(),
|
||||
Type: "SERVICE",
|
||||
TotalPaid: "7",
|
||||
Currency: "POINTS",
|
||||
ItemId: "000100014843494A",
|
||||
TitleId: "000100014843494A",
|
||||
ItemPricing: []Limits{
|
||||
LimitStruct(DR),
|
||||
},
|
||||
ReferenceId: 1,
|
||||
ReferenceValue: 19224,
|
||||
},
|
||||
})
|
||||
|
||||
e.AddKVNode("ListResultTotalSize", "1")
|
||||
|
10
structure.go
10
structure.go
@ -133,8 +133,8 @@ func LimitStruct(kind LimitKinds) Limits {
|
||||
// Limits represents a common XML structure for transaction information.
|
||||
type Limits struct {
|
||||
XMLName xml.Name `xml:"Limits"`
|
||||
Limits LimitKinds `xml:"Limits"`
|
||||
LimitKind string `xml:"LimitKind"`
|
||||
Limits LimitKinds `xml:"Limits,omitempty"`
|
||||
LimitKind string `xml:"LimitKind,omitempty"`
|
||||
}
|
||||
|
||||
// Transactions represents a common XML structure.
|
||||
@ -146,12 +146,12 @@ type Transactions struct {
|
||||
TotalPaid string `xml:"TotalPaid"`
|
||||
Currency string `xml:"Currency"`
|
||||
ItemId string `xml:"ItemId"`
|
||||
ItemPricing string `xml:"ItemPricing"`
|
||||
Limits Limits `xml:"Limits"`
|
||||
// TODO: Is this correct? getComplex is called and then limits are queried
|
||||
ItemPricing []Limits `xml:"ItemPricing"`
|
||||
TitleId string `xml:"TitleId,omitempty"`
|
||||
ItemCode int `xml:"ItemCode,omitempty"`
|
||||
ReferenceId int `xml:"ReferenceId,omitempty"`
|
||||
ReferenceValue string `xml:"ReferenceValue,omitempty"`
|
||||
ReferenceValue int `xml:"ReferenceValue,omitempty"`
|
||||
}
|
||||
|
||||
// Tickets represents the format to inform a console of available titles for its consumption.
|
||||
|
Loading…
x
Reference in New Issue
Block a user