Everytime I'm going to this view I'm getting this error in fetching the list of customer from the sandbox ap. I'm using PaysimpleSDK https://github.com/PaySimple/PaySimpleSDK/wiki/Customer-Service
My error
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: PaySimpleSdk.Exceptions.PaySimpleEndpointException: Endpoint Error: MethodNotAllowed:
var customers = await customerService.GetCustomersAsync(CustomerSort.FirstName);
here is my controller
public async Task<ActionResult> Trial()
{
string username = "myusername";
string apiKey = "apikey";
string baseUrl = "https://sandbox-api.paysimple.com/v4/customer";
var settings = new PaySimpleSettings( apiKey, username, baseUrl );
var customerService = new CustomerService(settings);
var customers = await customerService.GetCustomersAsync();
return View(customers.ToString());
}
my view (I can't copy the whole view code,because it have a table)
@model IEnumerable<PaySimpleSdk.Customers.Customer>
@{
ViewBag.Title = "Index";
}
@Html.DisplayNameFor(model => model.FirstName)
@foreach (var item in Model)
@Html.DisplayFor(modelItem => item.FirstName)