#sean-tcrepo_best-practices

1 messages ยท Page 1 of 1 (latest)

eager cragBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

๐Ÿ”— This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1509187127043428513

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

autumn sequoia
#

Hello! Do you have a request ID for creating the token so I can inspect the error? Also, can you clarify what you mean by "built-in Store payment mechanisms"?

velvet forge
#

Lemme see if I can generate the 1st.

For the 2nd... maybe it was a miscommunication with the other Developer... I posted in the Avalonia Telegram that I was suprised that I got the "don't send raw credit card data" error when running Stripe.TokenService.Create() becausen I assumed it would create the token locally. Part of his response was "I doubt you're going to strip away the app store's payment processing and their cut with Stripe, so you should probably forget about that. That's a good way to get banned.".

I'm new to mobile app development and store integration and so I'm still learning what is required/allowed... His comment made it seem like if I built a Stripe interface in my application that I would "bypass" payment systems controlled by Android/Apple and "get in trouble" for doing so... but maybe that's nonsense...

autumn sequoia
velvet forge
#

OK here we go: req_HrZDOqJPG4EUVl

#

Thanks for the link

autumn sequoia
#

You're welcome! Let me take a look...

#

The guide you linked is a great starting point for accepting payments with Stripe on mobile! It doesn't mention token creation so I'm curious what use case you ran into that required tokens?

velvet forge
#

I thought Stripe.TokenService.Create() would run 100% locally

#

I wanted to create a flow that was entirely in C# in my App... I don't think your guides actually mention C# and so I was working with what I could. That is not the guide I followed when I originally developed (but is what I was looking at recently to try to learn more)...

My current flow sends a token to an AWS Lambda which in turn sends it to Stripe... Having tested with "tok_visa" everything worked but trying to use "real" (fake test) data it's failing this way. Making me think my whole approach isn't ideal...

#

I'm thinking I might want to flex to an embedded Stripe webpage type solution?

#

I suppose I'm looking for advice on either

  1. How to create a token locally in C#
  2. Best Practices for using stripe with a mobile app written in C#
autumn sequoia
#

Looking at the failed request, I see you're trying to send Stripe raw card data which requires approval for a special API. You can read more about this here:

However, this is not needed in most cases! I'd recommend starting here: https://docs.stripe.com/payments/accept-a-payment?payment-ui=mobile&platform=react-native&lang=dotnet

This walks you through how to use Stripe's Payment Sheet to securely collect payment method details and create a Payment Intent to represent the charge. You can choose iOS, Android, or React Native and select .NET which is a C# framework when viewing server-side code snippets in our guides.

velvet forge
#

Thanks. I found that page but perhaps should read it more thoroughly. The thing is my CLIENT is written in C# and so I'm not sure a guide like that actually does the trick (the Guide, optionally, uses .NET on the Server Side). In effect I use Avalonia (C#) in place of React Native to write Client Code. React Native is a whole different language than my Client App is written in...

autumn sequoia
velvet forge
#

Ok thanks. Thanks for pointing out that WebView doesn't support Apple Pay, etc. That's good to know going in.

Would both "Checkout" and "Elements" work in this cse or just "Checkout"?

I'll also review PCI compliance requirements.

autumn sequoia
#

You're welcome! If you're redirecting to a web browser, you can use either Checkout or Elements depending on how custom you want the integration:

  • A Stripe-hosted Checkout page involves no client-side code
  • An embedded Checkout page allows you to use Stripe Checkout within your own website
  • Elements gives you full control but involves the most code
velvet forge
#

Ok thanks. Sounds like redirecting to an external (not WebView) web browser is the way to go and, as you say, a Stripe-hosted Checkout is the least amount of work.

autumn sequoia
#

I agree ๐Ÿ™‚ and if you decide you're PCI compliant, then you can request sccess to our raw card data API by reaching out to support: https://support.stripe.com/contact

velvet forge
#

Ok thanks for your time!