#Thamila
1 messages · Page 1 of 1 (latest)
Hi! Let me help you with this.
Where do you get the token from?
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
So do you get the token from Apple Pay API? Not from Stripe, right?
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
How do you create a new token with Apple Pay token?
i dont know that's what a wont to know
i do this
Stripe.TokenCreateOptions token = new Stripe.TokenCreateOptions();
token.Card = request.PaymentToken;
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
where can i add this ?
You can make this request on your server, using the Apple Pay token, before you use the Charges API.
is there a documentation about this or where can i have an exemple please ?
We don't have documentation for this.
For simpler implementation you can use Payment Request Button which is documented: https://stripe.com/docs/stripe-js/elements/payment-request-button
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#?
Here's an example of how to use Token API for C#/.NET: https://stripe.com/docs/api/tokens/create_card?lang=dotnet
You will need to provide the undocumented parameters I mentioned above (pk_token, pk_token_instrument_name, pk_token_payment_network, pk_token_transaction_id), here's docs how to do that: https://github.com/stripe/stripe-dotnet#how-to-use-undocumented-parameters-and-properties
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
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
would you mind sharing the response you receive from the Apple Tokenization process?
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
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?
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
would you mind explaining how are you integrating with Apple Pay?
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?
yes it's better to do it like this
so once you decrypt the data in your backend you would have an Object with the different params that we described earlier
yes that's it
are you able to decrypt the token now?
let me know if you need any more help