#mani535-customer

1 messages ยท Page 1 of 1 (latest)

tall pier
#

Hi! Let me paste your screenshots here:

#

Can you give me some context on what you are trying to achieve?

gleaming fulcrum
#

in payment gateway its showing default country as UNITEdKINGDOM

#

we want that to be MALTA

tall pier
#

Can you share some object IDs for me to check this? Maybe a PaymentIntent ID?

tall pier
#

@gleaming fulcrum this thread is now open

gleaming fulcrum
#

in above screenshot i selected save card , but if i do payment again its not showing saved card , how do i fix it pls

#

@tall pier

tall pier
#

Can you clarify how you are implement Stripe? Is this a native mobile application? What are you using to collect payment information?

gleaming fulcrum
#

yes its native android app

#

as @opaque mountain said here we use paymentsheet

tall pier
#

Got it. So when you tick the box "save the card", you where expecting that the next time you open the payment sheet the form would be pre-filled?

gleaming fulcrum
#

yes pls

kind jungle
#

it doesn't get prefilled into the inputs as such, you see a list of saved cards instead

gleaming fulcrum
#

but i am not seeing list of saved cards either

#

i shared screenshot above

#

@kind jungle

kind jungle
#

can you share the frontend code? Ae you using an ephemeral key?

gleaming fulcrum
#

pls dont archieve the thread , let me get the code

kind jungle
#

ok well first

#

do you know what I mean by 'ephemeral key'? Like you're familiar what I'm referring to? @gleaming fulcrum

gleaming fulcrum
#

i am asking my dev for the same

kind jungle
#

can your dev ask here instead? Aren't you the dev?

#

this is a channel for developers to ask questions directly, it's less effective to do a back-and-forth like this.

gleaming fulcrum
#

ok 5 mins

#

unfortunately dev seems to be busy , can you keep this thread open pls so he will reply here soon

kind jungle
#

we'll keep it open for a while but this is not for 1-on-1 support over time, we have mutliple people on my team, so no guarantees

gleaming fulcrum
#

sure if its closed i will ask to unarchieve

kind jungle
#

I know you will, yes

#

but make sure when you do we can talk directly to a developer who is building the integration and help them in real time

gleaming fulcrum
#

ok

thorny galeBOT
#

This thread has been archived. If you need help with anything else please ask in #dev-help or contact Stripe Support: https://support.stripe.com/contact

weak chasm
#

Hello @gleaming fulcrum

#

What's your question?

gleaming fulcrum
#

Hi

#

I am Developer

#

the country should come as Malta automatically

#

how can i do that

weak chasm
#

What framework are you using?

gleaming fulcrum
#

Codeigniter 3 php

weak chasm
#

So you are using the stripe php library?

gleaming fulcrum
#

Yes

weak chasm
#

What is that front-end written in?

gleaming fulcrum
#

Front end kotlin

#

For creating the customer i used this code

$customer = \stripe\Customer::create(array(
'name' => $name,
'email' => $email,
'address' => [
'line1' => 'Valletta',
'postal_code' => 'VLT 1011',
'city' => 'Valletta',
'state' => 'Valletta',
'country' => 'MT'
]
));

#

@weak chasm are you checking ?

weak chasm
#

Sorry I have many threads

#

Will get to you in a moment

#

Ok can you share the front-end code here?

gleaming fulcrum
#

we used but This code is not supporting

#

payment gateway SDK which we are using

implementation 'com.stripe:stripe-android:20.1.0'
#

@weak chasm pls check above error

#

are you there we are waiting

#

@weak chasm pls check

last blade
#

hey there, just stepping in for duchess

gleaming fulcrum
#

thanks @last blade pls check above error

#

can you help to Keep MT country as default for payment page

last blade
#

What are you trying to do here? I don't think i understand. Also, it's preferable to share actual lines of code as text, rather than images.

gleaming fulcrum
#

here by default Malta country should be selected

#

here instead of United kingdom we want Malta to come by default

#

@last blade which code you need pls ? front end or backend?

#

@last blade Am i clear pls?

#

front end

#

MT

#

country needed

#

@last blade i unserstand you are handling multiple threads , your reply would be much appriciated pls

last blade
#

Yes please be patient, I'm trying to review

gleaming fulcrum
#

Okay

last blade
gleaming fulcrum
#

$customer = \stripe\Customer::create(array(
'name' => $name,
'email' => $email,
'address' => [
'line1' => 'Valletta',
'postal_code' => 'VLT 1011',
'city' => 'Valletta',
'state' => 'Valletta',
'country' => 'MT'
]
));

#

we used the same suggested code in the document

#

Every thing working well
The below 2 things are required

  1. Country must be Selected by default Malta (MT)
  2. Saved Cards functionality not working
#

@last blade

last blade
#

Yes I understand -- I'm looking into it

gleaming fulcrum
#

ok

last blade
#

OK still trying to confirm, but it looks like thats immutable and the docs are misleading. Instead, you should be able to pass the default into the PaymentSheet.Configuration(...):

PaymentSheet.Configuration(
  ... // other config
  defaultBillingDetails =  
    PaymentSheet.BillingDetails.Builder().country("MT").build()
)
#

Can you try that

gleaming fulcrum
#

Ok

#

let me try that quickly pls

#

meanwhile can you check why saved cards list isnt coming pls

#

the above code is Not supporting

#

@last blade

#

pls check

#

Its giving unresolved reference error @last blade

#

@last blade once check the highlighted error

last blade
#

OK can you try other similar permutations if country() isn't quite right? What is available instead?

last blade
gleaming fulcrum
#

only these are available

#

the tick box save card should save cards and give a list of cards next time but its not working like that for us

#

Once i pay through with card, then next onwards my card should save and display for next transaction

last blade
#

Ah yes you need an address builder:

defaultBillingDetails = PaymentSheet.BillingDetails.
                    Builder().address(
                    PaymentSheet.Address.Builder().country("MT").build())
                    .build()
gleaming fulcrum
#

Once i pay through with card, then next onwards my card should save and display for next transaction : but its not happenning like that

#

@last blade

last blade
#

Can you please stop @ tagging me - I see you have responded

gleaming fulcrum
#

ok

last blade
#

thank you

gleaming fulcrum
#

this is a showstopper for our app delaying the launch , hope u understand

gleaming fulcrum
#

not getting Malta as default

#

this the code we return

last blade
#

That is the expected way to set this -- are you sure the app was updated? You can try pre-filling something else to check.

gleaming fulcrum
#

yes it doesnt work , we can continue this on monday pls

#

have a nice weekend !

last blade
#

oh, ok, you too!

#

This approach is expected to do what you ask, so it's worth reviewing carefully which part is not working

gleaming fulcrum
#

and meanwhile can you check why saved card list isnt being show by stripe in next payment each time pls

last blade
#

Can you share an example payment method/customer id where you're not seeing this?

#

You need to ensure the PM is saved with future usage specified

gleaming fulcrum
#

but i was told that skype stores the card details and gives list of cards as list

#

i tried with revolut card

#

visa

timber kettle
#

Hi ๐Ÿ‘‹ I'm stepping in for @last blade

#

Can you share a request ID for one of the Payment Intents you use to collect this information?

gleaming fulcrum
#

pi_3KrGkdATgVyy3rKC1gDDygxG

timber kettle
#

Thank you

#

This is a long thread, can you summarize what you want to accomplish with this?

gleaming fulcrum
#

so we have 2 issues

#
  1. once we use save card in stripe payment page , its not giving list of saved cards when making payment 2nd time 2.We couldnt select Malta as default country in payment page
timber kettle
#

Okay so you aren't setting setup_future_usage on the PI when you create it so it won't be available for use later

gleaming fulcrum
#

do we have a specific documentation for this one pls

timber kettle
#

For the 2nd question what do you mean by payment page? We usually set country using the IP address of the request

gleaming fulcrum
#

haa there you go

timber kettle
gleaming fulcrum
#

thats the issue then

#

Malta is a island country and stripe is categorizing it as United kingdom

timber kettle
#

I'm not sure if Malta has a VPN service you could route through

gleaming fulcrum
#

even though we are passing default billing address as MT , its still displaying it as United Kingdom as default country

timber kettle
gleaming fulcrum
#

from above conversation we already shared screenshots of code

#

can u check pls

#

even after giving MT as default , still we are getting United Kingdom ๐Ÿ˜ฆ

timber kettle
#

Where is the request coming from? What country is the testing being done in?

gleaming fulcrum
#

i am located in Malta

#

in the screenshot its showing United kingdom instead of Malta

timber kettle
#

Hmmmm...that is very odd. I reviewed some of your code examples and I did not see where the address is set.

gleaming fulcrum
#

paymentsheet.address u mean ?

gleaming fulcrum
timber kettle
#

What device is this being tested on?

gleaming fulcrum
#

Xiaomi 11

gleaming fulcrum
opaque mountain
#

๐Ÿ‘‹ stepping in here. Give me a moment to catch up

#

I believe you mentioned you are on 20.1.0?

#

Can you update?

gleaming fulcrum
#

i clearly mentioned it to the other agent

#

๐Ÿ˜ฆ

#

you are a life saver

#

will check it tomorrow

opaque mountain
gleaming fulcrum
#

hm on session then

#

so in mobile app , does stripe show delete card option too by default ?

opaque mountain
#

No, you would need to build that yourself.

gleaming fulcrum
#

amazing ! next time if i have issue i ll wait for you ๐Ÿ™‚

#

thanks , nice weekend

#

will test these on monday and if i face any issue will let you know

opaque mountain
#

Yep we'll be here, feel free to come back if we can help further!

#

Have a great weekend!

tall valve
#

Hi @gleaming fulcrum how can I help?

gleaming fulcrum
#

@tall valve i tried updating to 20.2.0 but still country which is prepopulating is UK for me instead of Malta

#

bismark Advised me that default billing address issue is fixed in 20.2.0

tall valve
#

@gleaming fulcrum it's a long thread, can you tell me the goal that you want to achieve?

gleaming fulcrum
#

So we are trying to show Malta as default billing country in patment page , but its showing United Kingdom all the time ๐Ÿ˜ฆ

tall valve
#

OK, can you send me one of the payment intent IDs?

gleaming fulcrum
#

pi_3KrGkdATgVyy3rKC1gDDygxG

#

this one ?

tall valve
#

Thanks, let me take a look

gleaming fulcrum
#

but pls check bismark's message above he said that this issue is fixed in last commit

tall valve
gleaming fulcrum
#

its tried last week though but it didnt work ๐Ÿ˜ฎ

tall valve
#

Did you integrate version 20.2.1 (aka the latest version) ?

gleaming fulcrum
#

yes

tall valve
#

Can you try clear the project and create a fresh build?

#

I'm also trying the same in my Android Studio.

#

It works for me

#
paymentSheet.presentWithPaymentIntent(
                                    clientSecret,
                                    PaymentSheet.Configuration(
                                        merchantDisplayName = merchantName,
                                        customer = customerConfig,
                                        googlePay = googlePayConfig,
                                        // Set `allowsDelayedPaymentMethods` to true if your
                                        // business can handle payment methods that complete payment
                                        // after a delay, like SEPA Debit and Sofort.
                                        //allowsDelayedPaymentMethods = true,
                                        defaultBillingDetails = PaymentSheet.BillingDetails.Builder()
                                            .address(PaymentSheet.Address.Builder()
                                                .country("MT").build()).build()
                                    )
                                )
                            }```
#

I had the same problem in with older version of SDK, and the problem is resolved after updating to the latest version.

gleaming fulcrum
#

ok let me try

#

and meanwhile i want to save card for using in future along with a delete option , Can you give me an example code pls really apprciate your help

#

and stripe should allow us giving small rewards for you guy's ๐Ÿ™‚

tall valve
#

save card for using in future along with a delete option -> you want to save or delete?

gleaming fulcrum
#

both , we are ticking save card inside payment sheet but its not saving

tall valve
#

Did you pass a ephemeralKeySecret to the CustomerConfiguration ?

gleaming fulcrum
#

can you point me to an example since this is my first time with stripe

tall valve
#

I'd suggest you to go through this doc, you need to use the Customer and Customer Ephemeral Key if you want to save the cards

gleaming fulcrum
#

but we dont need to use setup_future_USAGE ?

tall valve
#

You need that as well

gleaming fulcrum
#

ok will try and let you know