#tuanpham-payments

1 messages · Page 1 of 1 (latest)

gilded estuary
#

after that it depends exactly how you're using Connect and where you want the information to be stored.

dawn abyss
#

hmm, I have a question. I'm doing like I create a payment method for the platform account and save this info . After that, when my customer wants to use this card, I take it from data and create a new payment method with this stripe account id . Is this good way to achieve what I wonder ?

gilded estuary
#

sure, that's normal and a common thing to do

dawn abyss
#

Is it alright if I call function initStripe 1 time in 1 component A to confirmPayment and other time in component B to create paymentMethod ?

gilded estuary
#

I'm not sure that works, that's one of the problems with cloning

#

it can be complicated or impossible to make it work in some of our libraries like React since it requires you to use two different 'instances' of the Stripe client, one for the platform and one for the connected account. I haven't tested this recently so I don't remember if it can work for react-stripe-js or not

dawn abyss
#

Hmm, I think I will try your recommendation first. Any way to custom your CardField style ? I want set it display:flex and flex-direction: column but it does not work

gilded estuary
#

or are you using React Native?

dawn abyss
#

yup

#

but I'm not familiar with it

gilded estuary
#

I don't really know what the flex styles would do, but maybe we don't support them. It might help to share the exact code you used(you said you tried and it didn't work) and maybe we'll have an idea

dawn abyss
#

okay

#

<CardField
postalCodeEnabled={true}
placeholders={{
number: "4242 4242 4242 4242",
}}
cardStyle={{}}
// style={styles.cardField}
style={{
width: "100%",
height: 200,
marginVertical: 30,
display: "flex",
flexDirection: "column",

        }}
        onCardChange={(cardDetails) => {
          console.log("cardDetails", cardDetails);
        }}
        onFocus={(focusedField) => {
          console.log("focusField", focusedField);
        }}
      />
#

I'm trying to make the cardfield style is the same as your CardForm

#

because I want to reuse my payment method

gilded estuary
#

try adding the flex types to the component one level above, maybe

dawn abyss
#

<View
style={{
paddingHorizontal: 20,
display: "flex",
flexDirection: "column",
}}
>
<CardField
postalCodeEnabled={true}
placeholders={{
number: "4242 4242 4242 4242",
}}
cardStyle={{}}
// style={styles.cardField}
style={{
width: "100%",
height: 200,
marginVertical: 30,
display: "flex",
flexDirection: "column",
}}
onCardChange={(cardDetails) => {
console.log("cardDetails", cardDetails);
}}
onFocus={(focusedField) => {
console.log("focusField", focusedField);
}}
/>

    </View>
#

above it is View, and it does not work.

#

I'm sorry for this styling code error but I do not understand it indeed.

buoyant schooner
#

👋 taking over for my colleague. Let me catch up.

dawn abyss
#

yup

#

Is there any way to catch card number in CardField or CardForm ?

buoyant schooner
#

do you mean to style it?

#

what are you trying to achieve in terms of styling? could you do a visual mockup just so I could visualize what you're trying to achieve?

dawn abyss
#

yup

buoyant schooner
#

In that case you could use separate elements

dawn abyss
#

can you give me this doc ?

buoyant schooner
#

yes just a sec I'm trying to look them up

dawn abyss
#

yup

buoyant schooner
#

this is the best I could find

dawn abyss
#

nice

#

lemme try it