Created
January 22, 2018 13:28
-
-
Save mertkahyaoglu/74baba4494c4136baf6880d06e5481e2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type Request interface { | |
toPkiString() string | |
} | |
func prepareResponse(request Request, methodType string, endpoint string, options Options) string { | |
pkiString := request.toPkiString() | |
requestJson, _ := json.Marshal(request) | |
requestJson = string(requestJson) | |
response := connect(methodType, endpoint, options, requestJson, pkiString) | |
return response | |
} | |
func (approval Disapproval) Create(request CreateDisapprovalRequest, options Options) string { | |
response := prepareResponse(request, "POST", "/payment/iyzipos/item/disapprove", options) | |
return response | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment