-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpayment_data_three_ds_request.go
executable file
·69 lines (59 loc) · 1.55 KB
/
payment_data_three_ds_request.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
package processout
import (
"bytes"
"encoding/json"
"io"
"net/http"
"net/url"
"strings"
"time"
"gopkg.in/processout.v5/errors"
)
// PaymentDataThreeDSRequest represents the PaymentDataThreeDSRequest API object
type PaymentDataThreeDSRequest struct {
// AcsURL is the uRL of the ACS
AcsURL *string `json:"acs_url,omitempty"`
// Pareq is the pAReq used during the 3DS authentication
Pareq *string `json:"pareq,omitempty"`
// Md is the mD used during the 3DS authentication
Md *string `json:"md,omitempty"`
// TermURL is the uRL of the 3DS term
TermURL *string `json:"term_url,omitempty"`
client *ProcessOut
}
// SetClient sets the client for the PaymentDataThreeDSRequest object and its
// children
func (s *PaymentDataThreeDSRequest) SetClient(c *ProcessOut) *PaymentDataThreeDSRequest {
if s == nil {
return s
}
s.client = c
return s
}
// Prefil prefills the object with data provided in the parameter
func (s *PaymentDataThreeDSRequest) Prefill(c *PaymentDataThreeDSRequest) *PaymentDataThreeDSRequest {
if c == nil {
return s
}
s.AcsURL = c.AcsURL
s.Pareq = c.Pareq
s.Md = c.Md
s.TermURL = c.TermURL
return s
}
// dummyPaymentDataThreeDSRequest is a dummy function that's only
// here because some files need specific packages and some don't.
// It's easier to include it for every file. In case you couldn't
// tell, everything is generated.
func dummyPaymentDataThreeDSRequest() {
type dummy struct {
a bytes.Buffer
b json.RawMessage
c http.File
d strings.Reader
e time.Time
f url.URL
g io.Reader
}
errors.New(nil, "", "")
}