xendit / xendit-sdk-ios-src

MIT License
7 stars 11 forks source link

Adding var for response as dictionary #35

Open faizbaraja opened 3 years ago

faizbaraja commented 3 years ago

Hi,

I am using xendit sdk for our app payment gateway.

We need to send the original response to our Backend for log. Seems i don't find it in the sdk. So i tried to add it by my self.

this is what i did..

open class XENDITCCTOKEN, XenditAuthenticatedToken and XenditAuthentication
create var to store response as dictionary open var allResponseFields: [String : Any]?

assign the the value for the var "allResponseFields" in each constructor in the class

XENDITCCTOKEN

convenience init?(response: [String : Any])
self.allResponseFields = response

convenience init?(authenticatedToken: XenditAuthenticatedToken)
self.allResponseFields = authenticatedToken.allResponseFields

convenience init?(tokenId: String, authentication: XenditAuthentication)
self.allResponseFields = authentication.allResponseFields

convenience init(token: XenditCCToken, should3DS: Bool?)
self.allResponseFields = token.allResponseFields

XenditAuthenticatedToken

convenience init?(response: [String : Any])
self.allResponseFields = response

XenditAuthentication

convenience init?(response: [String : Any])
self.allResponseFields = response

can you include the dictionary value for the response in your sdk ?

thank you