#jannat-elements
1 messages · Page 1 of 1 (latest)
I have no front end to send that details from front end to backend.
why don't you have a frontend?
having a frontend is a crucial part of a Stripe integration
having card details means you are in huge PCI compliance burden and that is not the right way to integrate for almost any user
Is there any other solution. because I can't use frontend.
but why can't you?
like a frontend and a backend are crucial components of a Stripe integration
you need both
Because I build an automate bot.
but you have to collect card details from somewhere
where will those card details come from?
and what is the context of the automated bot? like what does it do? how does it collect card details?
through bot I get my client customers card details from the website and than I need to pass it to the payment intent method.
hrough bot I get my client customers card details from the website
that is the frontend here
THAT part needs to use Stripe Elements to collect card details
so you do have a frontend, or a frontend does exist in your integration somewhere
the card details need to be collected using Stripe's UI like Stripe Elements
I want to share my project with you. can we discuss that details on call?
no sorry
I can only talk here on this thread
but I think we have clear path forward
you have a frontend
that needs to integrate Stripe.js + Stripe Elements to collect card details
iI am getting the card details by using selenium driver from website there is no UI at my end.
what is the use-case here
what are you building
I don't understand a real use-case where you cannot have any customer facing UI
i need to recharge from my customers while using stripe api. how i do?
i hav card details and passing to stripe api but i stuck
i implemented the script in .net core but i didn't get any response from api's
i need to recharge from my customers while using stripe api. how i do?
if you have a card already, it should be a PaymentMethod in your Stripe API
i.e. if you take my 4242 card first and create a PaymentMethod from it, you get a PaymentMethod like pm_123
now any time you need to "recharge" me, you need to re-use pm_123 that is already in your Stripe API.
you DO NOT need to re-create a PaymentMethod from my 4242 card if you already have it as a PaymentMethod like pm_123
so I think there is a fundamental misunderstanding here and your approach is incorrect
i implemented the script in .net core but i didn't get any response from api's
can be many reasons but I think let's address that later
first thing is to address the earlier issue, with misunderstanding
explain the flow of api how it works? from where i understand the process of stripe?
in first step i take card details, let me know what will be the next step?
which api i used to get response and id something like that?
what is your scenario first?
You charge customer up front, then charge them n days later?
i spend two weeks in implementation but i didn't get any response
one time payment from customer card
well that means there is an issue with your integration but like I said, let's keep that aside for now and address the first question
you have two options
1/ (easy) integrate Checkout https://stripe.com/docs/payments/accept-a-payment
2/ (advanced) integrate Elements and PaymentIntents: https://stripe.com/docs/payments/accept-a-payment?platform=web&ui=elements
pls read through those guides thoroughly
they cover end to end what Stripe components you need to use
if you have sample of script in .net core please share with me
what I linked has .net snippets
but also, Stripe is a developer intensive integration so you might need to pair with a ..net expert on how you need to set up your code (I'm not a .net expert and I cannot help you write code, that is something you and your team have to do)
you have to reach out to your own professional network, or find services online like UpWork, sorry I do not know of any .net experts and cannot refer experts in general
but the questions you have on development, they cannot be answered in the scope of this developer chat. I can answer questions about Stripe's API but can't coach on how to build an integration end to end
// This example sets up an endpoint using the ASP.NET MVC framework.
// Watch this video to get started: https://youtu.be/2-mMOB8MhmE.
using System.Collections.Generic;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Options;
using Stripe;
using Stripe.Checkout;
namespace server.Controllers
{
public class PaymentsController : Controller
{
public PaymentsController()
{
StripeConfiguration.ApiKey = "sk_test_51K8OXMAVozOM2Z9pkZluibU00nhJXp0UBOQCjFQcWbpeMmRA3ENWFNutWOXIDx7gNMIq9151d23j8upOOuWpn4hv00cnbO112V"
}
[HttpPost("create-checkout-session")]
public ActionResult CreateCheckoutSession()
{
var options = new SessionCreateOptions
{
LineItems = new List<SessionLineItemOptions>
{
new SessionLineItemOptions
{
PriceData = new SessionLineItemPriceDataOptions
{
UnitAmount = 2000,
Currency = "usd",
ProductData = new SessionLineItemPriceDataProductDataOptions
{
Name = "T-shirt",
},
},
Quantity = 1,
},
},
Mode = "payment",
SuccessUrl = "http://localhost:4242/success.html",
CancelUrl = "http://localhost:4242/cancel.html",
};
var service = new SessionService();
Session session = service.Create(options);
Response.Headers.Add("Location", session.Url);
return new StatusCodeResult(303);
}
}
}
i this api buyinh t shirt and checkout methond implimented , but my scenario is different i need to pass card details to api and need to recharge that'sit simple