JackAppDev / flutter_iap

Flutter iap plugin
MIT License
100 stars 15 forks source link

Exception if I provide it with multiple productIds #28

Closed lukepighetti closed 6 years ago

lukepighetti commented 6 years ago

List<String> productIds = ["nine_unlocks", "ninety_nine_unlocks"];

screen shot 2018-07-27 at 1 35 37 pm

List<String> productIds = ["nine_unlocks"]

screen shot 2018-07-27 at 1 37 54 pm
JackAppDev commented 6 years ago

Looks like this was caused by https://github.com/JackAppDev/flutter_iap/commit/7685a12116c857981d27f6a297174876ced4a6e0

lukepighetti commented 6 years ago

What should I do about it?

Also, I am on iOS.

JackAppDev commented 6 years ago

A small PR would be helpful. Check the logic that is used when making the json response.

miyoyo commented 6 years ago

29 Submitted

JackAppDev commented 6 years ago

Thanks @miyoyo - @lukepighetti check to see if all is good now

miyoyo commented 6 years ago

I might expect it to fail however, the order of the "if" might add a comma on the beginning, awaiting on @lukepighetti 's results

EDIT: I failed to read the code right, it works.

JackAppDev commented 6 years ago

@miyoyo could you refactor it to deal with an array so that we can just set result to be something like elements.joined(separator: ",")

miyoyo commented 6 years ago

I'm sorry, I don't know swift, I just happened to stumble upon that error :/