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.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
venus najadPosted Nov 13, 2023, 6:19 PM
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
Mahesh ChandPosted Nov 13, 2023, 2:55 PM
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!