#mani535-customer
1 messages ยท Page 1 of 1 (latest)
Hi! Let me paste your screenshots here:
Can you give me some context on what you are trying to achieve?
in payment gateway its showing default country as UNITEdKINGDOM
we want that to be MALTA
Can you share some object IDs for me to check this? Maybe a PaymentIntent ID?
@gleaming fulcrum this thread is now open
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
Can you clarify how you are implement Stripe? Is this a native mobile application? What are you using to collect payment information?
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?
yes pls
it doesn't get prefilled into the inputs as such, you see a list of saved cards instead
but i am not seeing list of saved cards either
i shared screenshot above
@kind jungle
can you share the frontend code? Ae you using an ephemeral key?
pls dont archieve the thread , let me get the code
ok well first
do you know what I mean by 'ephemeral key'? Like you're familiar what I'm referring to? @gleaming fulcrum
i am asking my dev for the same
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.
ok 5 mins
unfortunately dev seems to be busy , can you keep this thread open pls so he will reply here soon
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
sure if its closed i will ask to unarchieve
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
ok
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
Find help and support for Stripe. Our support center provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
Hi
I am Developer
the country should come as Malta automatically
how can i do that
What framework are you using?
Codeigniter 3 php
So you are using the stripe php library?
Yes
What is that front-end written in?
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 ?
Sorry I have many threads
Will get to you in a moment
Ok can you share the front-end code here?
But I think you're looking to do something like this: https://stackoverflow.com/questions/69520688/is-it-possible-to-set-by-default-country-to-stripe-payment-sheet
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
hey there, just stepping in for duchess
thanks @last blade pls check above error
can you help to Keep MT country as default for payment page
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.
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
Yes please be patient, I'm trying to review
Okay
Just to make sure I'm looking at the right thing, you're trying to do this, correct?
https://stripe.com/docs/payments/accept-a-payment?platform=android&ui=payment-sheet#default-billing-details
$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
- Country must be Selected by default Malta (MT)
- Saved Cards functionality not working
@last blade
Yes I understand -- I'm looking into it
ok
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
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
OK can you try other similar permutations if country() isn't quite right? What is available instead?
meanwhile can you check why saved cards list isnt coming pls
What do you mean?
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
Ah yes you need an address builder:
defaultBillingDetails = PaymentSheet.BillingDetails.
Builder().address(
PaymentSheet.Address.Builder().country("MT").build())
.build()
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
Can you please stop @ tagging me - I see you have responded
ok
thank you
this is a showstopper for our app delaying the launch , hope u understand
still same its giving US as default country
not getting Malta as default
this the code we return
That is the expected way to set this -- are you sure the app was updated? You can try pre-filling something else to check.
oh, ok, you too!
This approach is expected to do what you ask, so it's worth reviewing carefully which part is not working
and meanwhile can you check why saved card list isnt being show by stripe in next payment each time pls
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
but i was told that skype stores the card details and gives list of cards as list
i tried with revolut card
visa
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?
pi_3KrGkdATgVyy3rKC1gDDygxG
Thank you
This is a long thread, can you summarize what you want to accomplish with this?
so we have 2 issues
- 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
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
do we have a specific documentation for this one pls
For the 2nd question what do you mean by payment page? We usually set country using the IP address of the request
haa there you go
For Q1, here are the docs specific to saving payment method details for future use during a payment:
https://stripe.com/docs/payments/save-during-payment?platform=android&ui=payment-sheet
thats the issue then
Malta is a island country and stripe is categorizing it as United kingdom
I'm not sure if Malta has a VPN service you could route through
even though we are passing default billing address as MT , its still displaying it as United Kingdom as default country
I'm not sure about that. We do specifically mention it as a country we support here: https://stripe.com/global
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 ๐ฆ
Where is the request coming from? What country is the testing being done in?
i am located in Malta
in the screenshot its showing United kingdom instead of Malta
Hmmmm...that is very odd. I reviewed some of your code examples and I did not see where the address is set.
paymentsheet.address u mean ?
@timber kettle its defined clearly country = MT
What device is this being tested on?
Xiaomi 11
We want to give user the option to delete card details if they want to , what value should we assign to setup_future_usage pls ? on_session or off_session? @opaque mountain Can you answer this too pls
๐ stepping in here. Give me a moment to catch up
So it looks like this was actually a bug that was fixed in 20.2.0: https://github.com/stripe/stripe-android/blob/master/CHANGELOG.md#2020---2022-04-25
I believe you mentioned you are on 20.1.0?
Can you update?
i clearly mentioned it to the other agent
๐ฆ
you are a life saver
will check it tomorrow
The value for on_session or off_session doesn't affect deleting cards at all. That just indicates whether you are going to charge the card later on when the customer is on-session or off-session.
hm on session then
so in mobile app , does stripe show delete card option too by default ?
No, you would need to build that yourself.
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
Yep we'll be here, feel free to come back if we can help further!
Have a great weekend!
Hi @gleaming fulcrum how can I help?
@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
@gleaming fulcrum it's a long thread, can you tell me the goal that you want to achieve?
So we are trying to show Malta as default billing country in patment page , but its showing United Kingdom all the time ๐ฆ
OK, can you send me one of the payment intent IDs?
Thanks, let me take a look
but pls check bismark's message above he said that this issue is fixed in last commit
Can you try 20.2.1 ? This issue is fixed in this version according to https://github.com/stripe/stripe-android/issues/4845
its tried last week though but it didnt work ๐ฎ
Did you integrate version 20.2.1 (aka the latest version) ?
yes
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.
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 ๐
save card for using in future along with a delete option -> you want to save or delete?
both , we are ticking save card inside payment sheet but its not saving
Did you pass a ephemeralKeySecret to the CustomerConfiguration ?
can you point me to an example since this is my first time with stripe
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
but we dont need to use setup_future_USAGE ?
You need that as well
ok will try and let you know