#Christophe

1 messages ยท Page 1 of 1 (latest)

balmy berryBOT
rare flume
#

Hello ๐Ÿ‘‹ give me a moment to look into it ๐Ÿ™‚

void blaze
#

I use the cordova plugin https://www.npmjs.com/package/cordova-plugin-apple-pay-google-pay-with-environment to get the EC_V1 successfully but don't understand what to do next

rare flume
#

when you say EC_V1 token, does it look like pk_token_xxx along with some more pk_xxx objects?

void blaze
#

Look like

rare flume
#

Hmm don't think our API supports EC_V1 tokens in any way
let me ask a colleague

void blaze
#

yes please

rare flume
#

can you share the first few characters of the client_secret?

void blaze
#

where can I find it ?

rare flume
#

in the snippet that you shared above

"client_secret": "************************************************************",
can you share the first 5-10 characters

void blaze
#

I can give you the id pi_3LhsFPC8bq8se5Rc1NROrXZ1

#

client secret is not visible in the dashboard

rare flume
#

okay gotcha

void blaze
#

Do you need anything else ?

#

Here is a discussion about this

rare flume
#

Okay so there's a way to use this EC_V1 token and exchange it for a stripe token

You'd want to call the tokens API endpoint somewhat like this

curl -u sk_test_123: https://api.stripe.com/v1/tokens
-d pk_token=<PKPaymentToken.paymentData decoded as JSON>
-d pk_token_instrument_name=<PKPaymentToken.paymentInstrumentName>
-d pk_token_payment_network=<PKPaymentToken.paymentNetwork>
-d pk_token_transaction_id=<PKPaymentToken.transactionIdentifier>

#

For example,

> Map<String, Object> card = new HashMap<>();
> card.put("pk_token", "\"data\": \"V4Ua.... \"version\": \"EC_v1\"}");//a string of the paymentData JSON object 
> card.put("pk_token_instrument_name", "MasterCard 1471");//paymentMethod.displayName
> card.put("pk_token_payment_network", "MasterCard");//paymentMethod.network
> card.put("pk_token_transaction_id", "38A74D639B946C2B4D2CE65CC463BDB5EF6046A40BECD505C5E21B4A1F654C5D"); //transactionIdentifier
> Map<String, Object> params = new HashMap<>();
> params.put("card", card);
> Token token = Token.create(params);
void blaze
#

That will give me stripe token right ?

rare flume
#

yes

void blaze
#

and then how do I use this Stripe Token to confirm payment ?

rare flume
void blaze
#

OK thank you I will try this way.

rare flume
#

NP! Thanks again for your patience. ๐Ÿ™‚ good luck

void blaze
#

Thankyou