#LarryCO-cardelement

1 messages ยท Page 1 of 1 (latest)

steep furnace
#

Hello! What error are you getting?

#

@wanton shard make sure to reply here and not in the main channel ๐Ÿ™‚

#

Also, I"m guessing the issue is with this line:
payment_method: {card: splitElements}
you'll want to do this instead:
payment_method: {card: cardNumber}

wanton shard
#

how will it get cardExpiry and CardCvc?

steep furnace
#

We have the logic in place to be able to pull it - as long as you pass in one of the split elements, we'll be able to get all the info we need

wanton shard
#

Okay, I will give that a try

#

looks like it is going to work.... I am a developer that just picked this up and have been learning on the fly... I received error

#

Your card was declined. Your request was in live mode, but used a known test card.

#

I will change my session to the test mode and try again.

steep furnace
#

๐Ÿ‘

wanton shard
#

Thanks

#

One other question if I may... can I add in billing zip code?

#

Is it necessary?

steep furnace
#

It's not 100% necessary, but it's a good thing to collect to help with conversion

#

With split element you'd need to collect the postal code through your own input and pass that along to stripe

wanton shard
#

Okay, I am collecting... How do I pass it along?

steep furnace
#

You'd pass that information in your call to stripe.confirmCardPayment by populating payment_method.billing_details.address.postal_code. You can see the API reference (https://stripe.com/docs/js/payment_intents/confirm_card_payment) shows an example of how they're setting payment_method.billing_details.name so you can modify that to pass in postal_code instead

wanton shard
#

Thank you. I will look into it... Thanks again for your assistance.