-
Notifications
You must be signed in to change notification settings - Fork 0
/
responses.go
154 lines (142 loc) · 7.1 KB
/
responses.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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
package models
// Error response
type BkashError struct {
ErrorCode string `json:"errorCode,omitempty"`
ErrorMessage string `json:"errorMessage,omitempty"`
}
// Grant/Refresh Token Response
type TokenResponse struct {
ExpiresIn int `json:"expires_in,omitempty"`
IdToken string `json:"id_token,omitempty"`
RefreshToken string `json:"refresh_token,omitempty"`
TokenType string `json:"token_type,omitempty"`
StatusCode string `json:"statusCode,omitempty"`
StatusMessage string `json:"statusMessage,omitempty"`
}
type CreateAgreementValidationResponse struct {
PaymentID string `json:"paymentID,omitempty"`
Status string `json:"status,omitempty"`
}
// Create Agreement Response
type CreateAgreementResponse struct {
PaymentID string `json:"paymentID,omitempty"`
BkashURL string `json:"bkashURL,omitempty"`
CallbackURL string `json:"callbackURL,omitempty"`
SuccessCallbackURL string `json:"successCallbackURL,omitempty"`
FailureCallbackURL string `json:"failureCallbackURL,omitempty"`
CancelledCallbackURL string `json:"cancelledCallbackURL,omitempty"`
StatusCode string `json:"statusCode,omitempty"`
StatusMessage string `json:"statusMessage,omitempty"`
}
// Execute Agreement Response
type ExecuteAgreementResponse struct {
PaymentID string `json:"paymentID,omitempty"`
AgreementID string `json:"agreementID,omitempty"`
CustomerMsisdn string `json:"customerMsisdn,omitempty"`
PayerReference string `json:"payerReference,omitempty"`
AgreementExecuteTime string `json:"agreementExecuteTime,omitempty"`
AgreementStatus string `json:"agreementStatus,omitempty"`
StatusCode string `json:"statusCode,omitempty"`
StatusMessage string `json:"statusMessage,omitempty"`
}
// Query Agreement Response
type QueryAgreementResponse struct {
PaymentID string `json:"paymentID,omitempty"`
AgreementID string `json:"agreementID,omitempty"`
PayerReference string `json:"payerReference,omitempty"`
CustomerMsisdn string `json:"customerMsisdn,omitempty"`
AgreementCreateTime string `json:"agreementCreateTime,omitempty"`
AgreementExecuteTime string `json:"agreementExecuteTime,omitempty"`
AgreementVoidTime string `json:"agreementVoidTime,omitempty"`
AgreementStatus string `json:"agreementStatus,omitempty"`
StatusCode string `json:"statusCode,omitempty"`
StatusMessage string `json:"statusMessage,omitempty"`
}
// Cancel Agreement Response
type CancelAgreementResponse struct {
PaymentID string `json:"paymentID,omitempty"`
AgreementID string `json:"agreementID,omitempty"`
PayerReference string `json:"payerReference,omitempty"`
AgreementVoidTime string `json:"agreementVoidTime,omitempty"`
AgreementStatus string `json:"agreementStatus,omitempty"`
StatusCode string `json:"statusCode,omitempty"`
StatusMessage string `json:"statusMessage,omitempty"`
}
// Create Payment Response
type CreatePaymentResponse struct {
PaymentID string `json:"paymentID,omitempty"`
AgreementID string `json:"agreementID,omitempty"`
PaymentCreateTime string `json:"paymentCreateTime,omitempty"`
TransactionStatus string `json:"transactionStatus,omitempty"`
Amount string `json:"amount,omitempty"`
Currency string `json:"currency,omitempty"`
Intent string `json:"intent,omitempty"`
MerchantInvoiceNumber string `json:"merchantInvoiceNumber,omitempty"`
BkashURL string `json:"bkashURL,omitempty"`
CallbackURL string `json:"callbackURL,omitempty"`
SuccessCallbackURL string `json:"successCallbackURL,omitempty"`
FailureCallbackURL string `json:"failureCallbackURL,omitempty"`
CancelledCallbackURL string `json:"cancelledCallbackURL,omitempty"`
StatusCode string `json:"statusCode,omitempty"`
StatusMessage string `json:"statusMessage,omitempty"`
}
// Execute Payment Response
type ExecutePaymentResponse struct {
PaymentID string `json:"paymentID,omitempty"`
AgreementID string `json:"agreementID,omitempty"`
CustomerMsisdn string `json:"customerMsisdn,omitempty"`
PayerReference string `json:"payerReference,omitempty"`
AgreementExecuteTime string `json:"agreementExecuteTime,omitempty"`
AgreementStatus string `json:"agreementStatus,omitempty"`
PaymentExecuteTime string `json:"paymentExecuteTime,omitempty"`
TrxID string `json:"trxID,omitempty"`
TransactionStatus string `json:"transaction_status,omitempty"`
Amount string `json:"amount,omitempty"`
Currency string `json:"currency,omitempty"`
Intent string `json:"intent,omitempty"`
MerchantInvoiceNumber string `json:"merchantInvoiceNumber,omitempty"`
StatusCode string `json:"statusCode,omitempty"`
StatusMessage string `json:"statusMessage,omitempty"`
}
// Query Payment Response
type QueryPaymentResponse struct {
PaymentID string `json:"paymentID,omitempty"`
Mode string `json:"mode,omitempty"`
PayerReference string `json:"payerReference,omitempty"`
PaymentCreateTime string `json:"paymentCreateTime,omitempty"`
PaymentExecuteTime string `json:"paymentExecuteTime,omitempty"`
TrxID string `json:"trxID,omitempty"`
TransactionStatus string `json:"transaction_status,omitempty"`
Amount string `json:"amount,omitempty"`
Currency string `json:"currency,omitempty"`
Intent string `json:"intent,omitempty"`
MerchantInvoiceNumber string `json:"merchantInvoiceNumber,omitempty"`
UserVerificationStatus string `json:"userVerificationStatus,omitempty"`
StatusCode string `json:"statusCode,omitempty"`
StatusMessage string `json:"statusMessage,omitempty"`
}
// Search Transaction Response
type SearchTransactionResponse struct {
Amount string `json:"amount,omitempty"`
CompletedTime string `json:"completed_time,omitempty"`
Currency string `json:"currency,omitempty"`
CustomerMsisdn string `json:"customerMsisdn,omitempty"`
InitiationTime string `json:"initiationTime,omitempty"`
OrganizationShortCode string `json:"organizationShortCode,omitempty"`
TransactionReference string `json:"transactionReference,omitempty"`
TransactionStatus string `json:"transactionStatus,omitempty"`
TransactionType string `json:"transactionType,omitempty"`
StatusCode string `json:"statusCode,omitempty"`
StatusMessage string `json:"statusMessage,omitempty"`
TrxID string `json:"trxID,omitempty"`
}
// Refund Transaction/Status Response
type RefundResponse struct {
CompletedTime string `json:"completedTime,omitempty"`
TransactionStatus string `json:"transactionStatus,omitempty"`
OriginalTrxID string `json:"originalTrxID,omitempty"`
RefundTrxID string `json:"refundTrxID,omitempty"`
Amount string `json:"amount,omitempty"`
Currency string `json:"currency,omitempty"`
Charge string `json:"charge,omitempty"`
}