Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
2
Reply
How to make a payment gateway from square.com in my c# mvc p
Braja Lal Mahanty
Oct 22 2016 10:08 AM
300
Reply
I want to add payment gateway from square.com in my c# mvc project. I already tried lots of things from google but unable to find proper solution.
Here is my controller code I already tried
public ActionResult Squre()
{
_transactionApi = new TransactionApi();
var client = new RestSharp.RestClient();
var request = new RestSharp.RestRequest("https://connect.squareup.com/v1/me/payments", RestSharp.Method.GET);
request.RequestFormat = RestSharp.DataFormat.Json;
request.AddHeader("Authorization", "Bearer sq0atp-zHuWWPD4ds9J6YoVlEoYZg");
setHeaders(request);
var Response = client.Execute(request);
HttpWebResponse response = null;
string responseMessage = null;
response = (HttpWebResponse)request.GetResponse();
if (response.StatusCode == HttpStatusCode.OK)
{
using (Stream stream = response.GetResponseStream())
{
using (StreamReader reader = new StreamReader(stream))
{
responseMessage = reader.ReadToEnd();
}
}
}
return View();
}
namespaces i have used mentioned below here
using System.Runtime.Serialization.Json;
using Square.Connect.Api;
using Square.Connect.Model
I want to make a payment gateway from square in my site. i need full tutorial for this can anyone help me please. What should i do??
Which things i have to modified in my code. Can anyone modify my code please or please give me the proper code
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
2
)
Next Recommended Forum
Encrypt string and save in DB
User should be able to add remove update using mvc4 /5