#Christophe
1 messages ยท Page 1 of 1 (latest)
Hello ๐ give me a moment to look into it ๐
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
Cordova plugin for integrating Apple Pay and Google Pay in modern cordova apps. Latest version: 1.1.6, last published: 4 months ago. Start using cordova-plugin-apple-pay-google-pay-with-environment in your project by running npm i cordova-plugin-apple-pay-google-pay-with-environment. There are no other projects in the npm registry using cordov...
when you say EC_V1 token, does it look like pk_token_xxx along with some more pk_xxx objects?
Hmm don't think our API supports EC_V1 tokens in any way
let me ask a colleague
yes please
can you share the first few characters of the client_secret?
where can I find it ?
in the snippet that you shared above
"client_secret": "************************************************************",
can you share the first 5-10 characters
I can give you the id pi_3LhsFPC8bq8se5Rc1NROrXZ1
client secret is not visible in the dashboard
okay gotcha
Do you need anything else ?
Here is a discussion about this
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);
That will give me stripe token right ?
yes
and then how do I use this Stripe Token to confirm payment ?
you can either set it as payment_method_data.card when creating a payment intent or convert it to a PaymentMethod https://stripe.com/docs/api/payment_methods/create#create_payment_method-card
OK thank you I will try this way.
NP! Thanks again for your patience. ๐ good luck
Thankyou