-
Notifications
You must be signed in to change notification settings - Fork 0
/
response.go
39 lines (33 loc) · 1022 Bytes
/
response.go
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
32
33
34
35
36
37
38
39
package sveawebpay
type responseBody struct {
Message string `xml:"message"`
}
type response struct {
StatusCode int `xml:"statuscode"`
}
type preparedPaymentResponse struct {
PreparedPayment PreparedPayment `xml:"preparedpayment"`
response
}
type paymentResponse struct {
Transaction Transaction `xml:"transaction"`
response
}
type cardTransaction struct {
CardType string `xml:"cardtype"`
MaskedCardNo string `xml:"maskedcardno"`
ExpiryMonth string `xml:"expirymonth"`
ExpiryYear string `xml:"expiryyear"`
AuthCode string `xml:"authcode"`
}
//Transaction represents a transaction receieved in the response message from the svea api
type Transaction struct {
PaymentMethod string `xml:"paymentmethod"`
CustomerRefNo string `xml:"customerrefno"`
Amount int64 `xml:"amount"`
Currency string `xml:"currency"`
SubscriptionID int `xml:"subscriptionid"`
SubscriptionType string `xml:"subscriptiontype"`
ID string `xml:"id,attr"`
cardTransaction
}