hello everyone, i need a proper video link/link for payment with visa, debit or credit card in c# asp net. kind regards
Loading
hello everyone, i need a proper video link/link for payment with visa, debit or credit card in c# asp net. kind regards
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Mahesh ChandRank #1 · 393.3K reputationPosted Nov 13, 2023, 9:55 AM EST
You can integrate with payment gateway APIs such as Stripe or PayPal to provide credit card and debit card payments. You have to create an account with these payment gateways. If you're building this project for a company, the company has to first sign up with these payment gateways and provide you the key and API access details. We are using Stripe and PayPal on C# Corner. Stripe provides better rates (last we checked).
Here are the steps required to implement a payment gateway (ChatGPT):
Here are couple of blogs/tutorials on this site:
Implement Stripe Payment Gateway In ASP.NET MVC
https://www.c-sharpcorner.com/Blogs/implement-stripe-payment-gateway-in-asp-net-mvc
Credit Card Payment In ASP.NET using Stripe
https://www.c-sharpcorner.com/blogs/credit-card-payment-in-asp-net-using-stripecom1
Cheers!
venus najadRank #2,456 · 573 reputationPosted Nov 13, 2023, 1:19 PM EST
helloo mahesh van thanks for your respond...
i have actualy codes for credit card payment and i havent any company.... in the program, it needs three strings like secret, data and merchant key and i do not know how should i bring these info. do you know, what they are? are they info to my account? i dont know, people pay to who? i need those information... i add the codes as follow and i hope you can help me out, if not, then i go through your steps...
private string CreateToken(string message, string secret)
{
secret = secret ?? "";
var encoding = new System.Text.ASCIIEncoding();
byte[] keyByte = encoding.GetBytes(secret);
byte[] messageByte = encoding.GetBytes(message);
using (var vmessiah = new HMACSHA256(keyByte))
{
byte[] venusmessage = vmessiah.ComputeHash(messageByte);
return Convert.ToBase64String(venusmessage);
}
}
protected void btnPayNow_Click(object sender, EventArgs e)
{
string secret = ""; //i dont know what is it? how should i find in my account?
string data = ""; //i dont know what is it? how should i find in my account?
string merchantkey = ""; //i dont know what is it? how should i find in my account?
SortedDictionary formParams = new SortedDictionary();
formParams.Add("AppId", merchantkey);
formParams.Add("Email", txtEmail.Text);
formParams.Add("The Name on the Card", txtName.Text);
formParams.Add("expiration Date", txtexpiration.Text);
formParams.Add("CCV", txtccv.Text);
formParams.Add("returnUrl", "http://localhost:64353/CallBack.aspx");
foreach (var kvp in formParams)
data = data + kvp.Key + kvp.Value;
string signature = CreateToken(data, secret);
lblresult.Text = signature;
........
}
i appreciate your respond, kind regards