Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
@hash-table unfortunately this is for Java and also for Swift
I could convert that JavaScript code, but it is not worth the trouble unless there is no solution for it unless I convert it to JSON -
@kurtr that's what I'm doing right now, but thought there is a better way. But my concern is I need to add multiple "If/else" to reach what I want, while if it is a "getByName("")" I think would be faster or at least easier to maintain than many ifs
-
@hash-table That's what I'm thinking of, I don't understand why they'd return such format for a long result, if I split it to lines, it takes 65 lines, think it is easier to handle when in JSON
-
kurtr127557y@gitpush If you can't find a built in function it's better to just cook up your own and wrap it in a small library. Shame man you've been fighting mastercard for a while now! Looking at your excerpts it's safe to say the dev who wrote that "API"-cough might have a teeny meth problem.
-
@hash-table I've been noticing that lol hope I don't have to work with it again ...
-
@kurtr The problem with Mastercard is they have either a REST API or an NVP API (Name value pair)
I've been trying to integrate with the REST API to end up after a month knowing that client requested the NVP approach and the provider didn't tell us that until last week -.-
What I even don't understand is, I have set Content-Type as JSON in-hope they'd see it and return in the same format, but I guess no. I have no clue why they are returning it like that. Unless I'm missing something in their docs -
kurtr127557y@gitpush Sadly I haven't done an integration directly with someone like mastercard in around 6 years but honestly thats a fucked up way to return data - especially for a payment provider.
-
@kurtr true, though they were kind enough to include a dot for example: sourceOfFunds.Type
instead of
sourceOfFundsType -
@GodHatesMe I was hoping for another because that response is huge for a URL if I split it into lines it takes 65, but I'll give it a go and hope it doesn't crash
-
@GodHatesMe take your time my friend I was just joking about the clean desktop thing 😅😀
Related Rants
!rant && isSorry = true
this aint StackOverFlow but I need a tiny help here, I'm receiving data result from an API that is formatted as x-www-form-urlencoded, do I add a valid url at the beginning and use URI parser in Android or is there some other solution for it?
Sample of the result I'm receiving:
repositoryId=TEST&response.gatewayCode=BASIC_VERIFICATION_SUCCESSFUL&result=SUCCESS&sourceOfFunds.provided.card.brand=MASTERCARD
undefined
???
??
welp
?
????