Automattic / woocommerce-payments

Accept payments via credit card. Manage transactions within WordPress.
https://wordpress.org/plugins/woocommerce-payments/
Other
174 stars 69 forks source link

Limit WCPay to merchants in supported countries only #694

Closed allendav closed 3 years ago

allendav commented 4 years ago

@thenbrent @bmccotter - looks like we check the currency but overlooked checking the country for the store - we should fix this, right?

If so, what we do about Puerto Rico? It would appear we are supporting it already as a result of this oversight.

3005814-zd

https://github.com/Automattic/woocommerce-payments/blob/5926ec62a950409015ef2264dfbac3cec2fe67d3/includes/class-wc-payment-gateway-wcpay.php#L216

props @DanReyLop

DanReyLop commented 4 years ago

If so, what we do about Puerto Rico? It would appear we are supporting it already as a result of this oversight.

What's wrong with that? Puerto Rico is part of the US.

thenbrent commented 4 years ago

I'm not too worried about checking the store's chosen country at that stage, because we've got a restriction on Stripe's side to only onboard Express accounts for US merchants already.

allendav commented 4 years ago

@DanReyLop wrote:

What's wrong with that? Puerto Rico is part of the US.

Nothing! If we are supporting it I would want us to continue to do so, that is all.

DanReyLop commented 4 years ago

Nothing! If we are supporting it I would want us to continue to do so, that is all.

Great :)

Let's keep this issue open though, ideally we shouldn't let any merchant in an unsupported region start the Stripe KYC. That's just a bad user experience. As @dechov found out, Stripe only supports Puerto Rico, not any of the other US territories. So we shouldn't go by currency only.

timmyc commented 4 years ago

Dropping in with a ➕ on this - I'd really like for us to be able to call out to a method in WCPay from wc-admin to determine easily if we should be featuring WCPay based upon country support. As I mentioned in Slack - we are just now getting things rolling to have WooCommerce Payments installed on all new ecom plan sites on WordPress.com. The way the Atomic "plumbing" works for this is to just add the plugin to an array for either Install/Activate - which works great, but then can lead to some interesting logic in wc-admin to determine if we should still be actively promoting WCPay for a given store.

We are already starting to sprinkle in some country code specific checks into wc-admin for this, and I fear that will create more work/things to check and update as WCPay expands to other locales.

thenbrent commented 4 years ago

Related: we saw a number of issues recently in the Stripe extension when it was changed to use the store's country to determine the store's ability to use a payment method. Some businesses have a legal entity in the US, while their store operates in a different jurisdiction.

vbelolapotkov commented 3 years ago

Related discussion: p1614781403172900-slack-CGGCLBN58

kalessil commented 3 years ago

@thenbrent, since we have enabled more countries, can we close this ticket?

jrodger commented 3 years ago

I don't think we can close it, but a new issue description and title would be a good idea. This one confuses me every time I open it.

The launch in more countries doesn't change the issue we're trying to fix here, there are still cases where we want to detect whether a store is in a supported country or not (it's just that this isn't limited to the US now). To be honest, I'm not sure we've completely figured out how we want to do that yet either.

kalessil commented 3 years ago

@jrodger : I see, updated the title.

Leaving more details:

LevinMedia commented 3 years ago

This is going to function as a double-check to keep people from getting frustrated when they get into the KYC and wonder why their country isn't supported.

If we notice they're in an unsupported country - we'd display this modal:

Screen Shot 2021-06-14 at 11 05 10 AM

The primary action is cancel, however the merchant can still continue because there's the edge case where they're simply using a computer from an unsupported location, but they're still based in one of the available countries.

kalessil commented 3 years ago

We also might want to pick up #2105 as it sounds related to this one.