flutter_stripe icon indicating copy to clipboard operation
flutter_stripe copied to clipboard

Option of Removing Country in CardFormField or Disable Selection or List Alteration

Open doshikh opened this issue 4 years ago • 7 comments

I want to restrict country list or hide Country drop down same as enablePostalCode: false , option from CardFormField

But there is no option in plugin for that Problem : When ever user changed country postcode field appear again If it's there please let me know

I am using version 1.3.0 of flutter_stripe in my flutter project

Please refer screenshots for check.

Screenshot 2022-03-11 at 5 41 56 PM Screenshot 2022-03-11 at 5 42 40 PM

doshikh avatar Mar 11 '22 12:03 doshikh

We need to wait when Stripe fixes country behavior in their sdk. See: https://github.com/stripe/stripe-react-native/issues/695. and https://github.com/stripe/stripe-react-native/issues/577

remonh87 avatar Mar 14 '22 19:03 remonh87

same problem here..

memishood avatar Oct 25 '22 12:10 memishood

@remonh87 it seems they now allow for the country to be overridden on Android: https://github.com/stripe/stripe-react-native/pull/974

jamesdixon avatar Mar 06 '23 17:03 jamesdixon

@jamesdixon


 if (initSheet.error) return Alert.alert(initSheet.error.message);
    const presentSheet = await stripe.presentPaymentSheet({
      clientSecret,
    });

how you set the default country?

komailabbas12 avatar Mar 13 '23 18:03 komailabbas12

@jamesdixon you can add the countryside to the card form on Android it is still not implemented for iOS.

@komailabbas12 this ticket is related to the card form and not the payment sheet. The payment sheet uses the phones locale but you can change it by providing billingDetails

remonh87 avatar Mar 13 '23 18:03 remonh87

@remonh87

const initSheet = await stripe.initPaymentSheet({
     paymentIntentClientSecret: clientSecret,
     merchantDisplayName: paymentDetails?.senderUser?.fullname,
     defaultBillingDetails:{
       address :{
       country: 'GB'
       }}
    
   });

this works on android side Thank you

komailabbas12 avatar Mar 13 '23 18:03 komailabbas12

Is there an option to restrict the country list to USA and Canada from stripe dashboard ?

udayakr avatar Aug 29 '23 05:08 udayakr

Default countries is supplied the option to disable is duplicate of #320 so will close this is one now

remonh87 avatar Apr 14 '24 14:04 remonh87