I'm using Solidus Stripe (with the old Frontend) f...
# support
c
I'm using Solidus Stripe (with the old Frontend) for a store in Japanese and English (currency is 'JPY', Stripe is set to 'JP', no v3 intents/elements). For a payment of ¥5100, the amount that is sent to Stripe it is taking off two digits, e.g. only charging ¥51. I'm not sure how to proceed. Maybe something related to this? https://github.com/solidusio/solidus_stripe/blob/master/app/models/spree/payment_method/stripe_credit_card.rb#L30 https://stripe.com/docs/api/payment_intents/object#payment_intent_object-amount
PayPal is also weird (https://github.com/solidusio/solidus_paypal_commerce_platform). I set its config api variables in the spree initializer, but the method doesn't show up, just the button to connect with PayPal--and when I go through that set of screens, the payment method still doesn't show up in the available methods.
Ah I found it. This will be a bug for any country with a currency that doesn't have decimal places, right? https://github.com/solidusio/solidus_stripe/blob/master/app/models/solidus_stripe/create_intents_payment_service.rb#L56 see: https://docs.adyen.com/development-resources/currency-codes I've never opened an issue on github before, is this something I should do on github? I can fork and fix the bug myself, but I'm not really sure of an efficient way to do it. Are country codes stored in Solidus anywhere? If so, maybe it may be worth adding an integer column for decimal places? Ah, I also see that ActiveMerchant doesn't support Japan for Stripe or PayPal payment gateways, https://github.com/activemerchant/active_merchant ...Hmm, so I guess I've got to write my own thing, regardless...
n
good find! anyone can open an issue on GitHub - you can also volunteer to work on it. Don't worry about your solution not being "the best", you'll get feedback on your PR
countries are stored in
Spree::Country
but yeah, weird that Stripe in ActiveMerchant won’t support Japan 🤔
c
Thanks! I've got some other...uhh...rescuing I need to take care of first, heh. So when that's finished I'll work on my first, PR 🙂. Yeah, it seems very strange...Perhaps it's soft-supported, but no one is using or testing it, so it's declared not supported? The API supports it, I mean, I used the same Stripe account on an WooCommerce project before moving to Solidus (way more fun, heh).
👍 1
Ok, after quite a bit of doing, I've come up with this: https://github.com/solidusio/solidus_stripe/pull/139
👍 1