#Thamila

1 messages · Page 1 of 1 (latest)

autumn vineBOT
wild dove
#

Hi! Let me help you with this.

latent fern
#

yes

#

please

wild dove
#

Where do you get the token from?

latent fern
#

in fact that i have a costumer side that i get all my information (token appel pay as a string )

#

and then i juste push all this information so my server

#

where i do the job a have a token appelpay as string i want to know if there is a function that i can do a payementt

wild dove
#

So do you get the token from Apple Pay API? Not from Stripe, right?

latent fern
#

yes that's it

#

when i use this token like this

#

var options_token = new ChargeCreateOptions
{
Amount = (long)(request.Amount * 100),
Currency = "eur",

                    Source =  request.PaymentToken,
             };
                 

             var services = new Stripe.ChargeService();
                Stripe.Charge pResult = services.Create(options_token);
#

Invalid string: {"version"...e83bedc" }; must be at most 500 characters

#

and when i tray to create a new token with what i get from appelpay they tel me that they cant get the card information so they cant do the payement

wild dove
#

How do you create a new token with Apple Pay token?

latent fern
#

i dont know that's what a wont to know

#

i do this

#

Stripe.TokenCreateOptions token = new Stripe.TokenCreateOptions();

                 token.Card = request.PaymentToken;
wild dove
#

You need to convert Apple Pay token to Stripe token. You can do it like this:

#

You can use this undocumented parameter in Tokens API

curl -u sk_xxx: https://api.stripe.com/v1/tokens \
  -d pk_token=ApplePayPaymentToken.paymentData (decoded as JSON) \
  -d pk_token_instrument_name=ApplePayPaymentToken.paymentMethod.displayName  \
  -d pk_token_payment_network=ApplePayPaymentToken.paymentMethod.network \
  -d pk_token_transaction_id=ApplePayPaymentToken.transactionIdentifier
latent fern
#

where can i add this ?

wild dove
#

You can make this request on your server, using the Apple Pay token, before you use the Charges API.

latent fern
#

is there a documentation about this or where can i have an exemple please ?

wild dove
latent fern
#

yes but a dont use js i juste use c# that why i cant do it whith a request button

#

then how can i excute curl in c#?

wild dove
latent fern
#

is there a problem if my appelpay token is a string ?

#

because i have not ApplePayPaymentToken.paymentMethod.displayName all this proprities because it a string so i have to get my TokenAppelPay as a token from the front to my server right?

#

string does not contain a difinish for aymentMethod.displayName

twilit sluice
#

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

#

give me a moment or two

latent fern
#

hi, thank you

#

so i get a token from appelpay that i have to convert so i do this

#

Stripe.TokenCreateOptions token = new Stripe.TokenCreateOptions();
token.AddExtraParam("pk_token", ApplePayPaymentToken.paymentData );
token.AddExtraParam("pk_token_instrument_name", ApplePayPaymentToken.paymentMethod.displayName );
token.AddExtraParam("pk_token_payment_network", ApplePayPaymentToken.paymentMethod.network );
token.AddExtraParam("pk_token_transaction_id", ApplePayPaymentToken.transactionIdentifier );

#

but my AppelPayementToken is a string .. it doesn't have a payementData or other proprities

twilit sluice
#

would you mind sharing the response you receive from the Apple Tokenization process?

latent fern
#

in fact i juste do a payement with an appel pay and taht give me a token that i named ApplePayPaymentToken and push it to my server so your colleague told me that i have to convert this ApplePayPaymentToken to a strip token and that what am doing here just the type of my ApplePayPaymentToken as a string so i can have the proprities

twilit sluice
#

would you mind sharing the response body of that token?

#

oh wait, how are you integrating with Apple Pay? are you using Stripe's Payment Request Button?

latent fern
#

because i do not use the front

#

i just use the server to do this the front give just an ApplePayPaymentToken as a string

#

and in my sever i do the payement

#

that why i have to convert the ApplePayPaymentToken to an strip token

twilit sluice
#

would you mind explaining how are you integrating with Apple Pay?

latent fern
#

i have an application that when we click to button payement they propose to enter our card or doing a payement with appel pay so when we do that payement with appelpay it giving me a token as a string

#

and i sow in appel documenattion

#

that strip Decrypt the Payment Data with react.js and strip.js

#

but we can also decrypt the payement data in server

#

is there any function strip that i can use to do this?

twilit sluice
#

so once you decrypt the data in your backend you would have an Object with the different params that we described earlier

latent fern
#

yes that's it

twilit sluice
#

are you able to decrypt the token now?

latent fern
#

not yet

#

i will see how can i do this from appelPay documentation

twilit sluice
#

let me know if you need any more help