#.pecivko

1 messages ยท Page 1 of 1 (latest)

clear ermineBOT
dusk spoke
rugged oar
#

0.28.0

dusk spoke
#

As the defaultBillingDetails?: BillingDetails parameter?

rugged oar
#

const { error } = await initPaymentSheet({ paymentIntentClientSecret: clientSecret, merchantDisplayName: "", defaultBillingDetails: { name: firstName + " " + lastName, phone: phoneNumber, address: { country: "SK", city: address.city, postalCode: address.zipCode, }, }, applePay: { merchantCountryCode: "SK", }, googlePay: { merchantCountryCode: "SK", }, });

#

this is what i am doing

dusk spoke
#

If you already have these details could you just prevent address collection?

rugged oar
#

An import error now occured :
Unable to resolve "@stripe/stripe-react-native/lib/typescript/src/types/PaymentSheet"
when i try to import the CollectionMode and AdrressCollectionMode

#

I will get back when i fix it

dusk spoke
#

Interesting ๐Ÿง

rugged oar
#

Seems strange to me when i am normally using types for the same file

dusk spoke
rugged oar
#

I am using expo btw, i forgot to mention it in the begining ๐Ÿ˜„

dusk spoke
#

Oh wait. those enums don't exist in PaymentSheet for v0.28.0

clear ermineBOT
rugged oar
#

i mean when i go to my node_modules and i track down the file it is there so i do not really understand

dusk spoke
rugged oar
#

So should i just update my npm package and try again ?

dusk spoke
#

Try upgrading your "@stripe/stripe-react-native": "^0.35.0", in package.json

rugged oar
#

The error still persists

arctic void
#

๐Ÿ‘‹ Stepping in for my teammate. What error persists exactly? Is it the import error or something else?

rugged oar
#

Yes, its the import error when i try to call initPaymentSheet, and configurate the biligin collection billingDetailsCollectionConfiguration: { phone: CollectionMode.NEVER, address: AddressCollectionMode.NEVER, name: CollectionMode.NEVER, }, I get an import error Unable to resolve "@stripe/stripe-react-native/lib/typescript/src/types/PaymentSheet"

#

My problem is that i want to prefill billing address so that apple pay does not ask the user to sumbit the address in order to use apple pay. I have tried setting the defaultBillingDetails but it does not do the trick

#

So your teamate suggested i try to set data colection to NEVER and the import error appeared

arctic void
#

Got it. I'm not a React Native expert so will try to help as best as I can. Instead of using NEVER, can you go back to trying to pass SK and address.zipCode for defaultBillingDetails ?

#

I'm suggesting that as comments in the library mention the following:
/** PaymentSheet pre-populates the billing fields that are displayed in the Payment Sheet (only country and postal code, as of this version) with the values provided. */

rugged oar
#

The error persists

#

I have to go for today, thank you for your help so far i will probably contact you again tommorow

arctic void
#

Sorry we couldn't get to the bottom of this today!