#anstev

1 messages · Page 1 of 1 (latest)

tepid pagodaBOT
remote sparrow
#

Hi there one moment

#

Unfortunately that doesn't look like it's possible

#

And then go through the options you can pass

honest breach
#

Thanks nonetheless, appreciate it

remote sparrow
#

No problem

honest breach
#

Can it be preset if I know it beforehand?

honest breach
#

Saw that. Tried it as follows:

const { error } = await initPaymentSheet({
customerId: customer,
customerEphemeralKeySecret: ephemeralKey,
paymentIntentClientSecret: clientSecret,
merchantDisplayName: merchantDisplayName,
appearance: customAppearance,
defaultBillingDetails: {
name: cartData.billing_first_name+" "+cartData.billing_last_name,
email: cartData.email,
address: {
city: cartData.bill_address_city,
country: cartData.bill_address_country,
line1: cartData.bill_address_address1,
line2: cartData.bill_address_address2,
postalCode: cartData.bill_address_postal_code,
state: cartData.bill_address_province
}
}
});

#

the billing adress country and zip in the payment sheet were not set accordingly after initialization

remote sparrow
#

Everything else was preset though?

honest breach
#

This is what the sheet rendered as

remote sparrow
#

And you logged all the cartData prior to initializing the payment sheet to verify that data isn't null

honest breach
#

the data is not null, correct. It might be a string mismatch issue, (e.x. abbreviation vs non-abbreviation). I'm going to log the address object right now.

#

{"city": "Mississauga", "country": "Canada", "line1": "2392 Street Avenue", "line2": null, "postalCode": "123 456", "state": "ON"}

remote sparrow
#

Hm i'm not sure off-hand if that would affect things. Try manually passing in data to the initPaymentSheet function. And try "CA" for the country instead

honest breach
#

that did it! guess you guys want the abbreviated country.

#

appreciate the help

remote sparrow
#

Cool cool