#eze-rn-token

1 messages · Page 1 of 1 (latest)

candid adder
#

Hey!

fallen root
#

yes, but no log generated

#

i try now:

#

const token = await createToken({
type: 'Card',
number: '4242424242424242',
expMonth: 7,
expYear: 2023,
cvc: '314',
});

#

like as your example (in Stripe Docs)

candid adder
#

And what was the outcome?

fallen root
#

LOG {"error": {"code": "Failed", "declineCode": null, "localizedMessage": "Card details not complete", "message": "Card details not complete", "stripeErrorCode": null, "type": null}}

#

I try this from yesterday without results. I tried adding various parameters like as country, zip, name, card brand, 'Credit'...

candid adder
#

You can't just pass raw PAN data like that, you need to use a Elements component like CardField

fallen root
#

ok, I will try with createCardTokenParams. But I can't use Element because the layout is different.

#

or use Element is mandatory?

candid adder
#

Do you have the PCI compliance to be handling raw PAN data without Elements?

fallen root
#

not, does this mean that we need to have PCI compliance to not use Element?

halcyon mortar
#

well not really since I think its' ok as long as the token creation happens on the mobile app the customer is using.

#

either way, just use one of the CardElements from the SDK for the customer-facing input really. I don't know if the ReactNative library exposes a way to create a token with raw PANs, seems like it doesn't as you've found, since nobody really needs to do that.