Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Accepted currencies" hardcoded? Seems to be dynamic based on Country. #104

Open
harisibrahimkv opened this issue Apr 9, 2018 · 1 comment

Comments

@harisibrahimkv
Copy link
Contributor

I tried passing in currency as MMK and it threw:

Warning: Failed prop type: Invalid prop `currency` of value `MMK` supplied to `ReactStripeCheckout`, expected one of

 ["AED","AFN","ALL","AMD","ANG","AOA","ARS","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BIF","BMD","BND","BOB","BRL","BSD","BWP","BZD","CAD","CDF","CHF","CLP","CNY","COP","CRC","CVE","CZK","DJF","DKK","DOP","DZD","EEK","EGP","ETB","EUR","FJD","FKP","GBP","GEL","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","ISK","JMD","JPY","KES","KGS","KHR","KMF","KRW","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LTL","LVL","MAD","MDL","MGA","MKD","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","NGN","NIO","NOK","NPR","NZD","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SEK","SGD","SHP","SLL","SOS","SRD","STD","SVC","SZL","THB","TJS","TOP","TRY","TTD","TWD","TZS","UAH","UGX","USD","UYU","UZS","VND","VUV","WST","XAF","XCD","XOF","XPF","YER","ZAR","ZMW"].

MMK seems to be supported as per https://stripe.com/docs/currencies.

However, according to https://stripe.com/docs/api?lang=python#country_spec_object, the supported currencies seems to be country dependant.

supported_payment_currencies: Currencies that can be accepted in the specified country (for payments).

So the question is:

Should we update this hardcoded list with all the accepted currencies (hence including MMK as well) or is there a way to make this dynamic based on the stripeKey="my_PUBLISHABLE_stripekey" prop that is being passed in?

@harisibrahimkv
Copy link
Contributor Author

Here is a PR updating the list: #105.

Please verify. I've provided the steps I did to get the new list as well. I might have overlooked something.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant