question

girish avatar image
girish asked bryanvargas answered

Hosted Checkout Payment in Sandbox hasn't worked getting error : Not Acceptable

I implemented the following code and it worked properly in Sandbox but now it is not working and getting not acceptable error. I checked on the production account which works perfectly. So please let me know the exact reason why getting this error for the sandbox account.

Here is the implemented code :

string CloverUrl = string.Empty, baseUrl = string.Empty;

if (System.Configuration.ConfigurationManager.AppSettings["CloverUrl"] != null)

CloverUrl = System.Configuration.ConfigurationManager.AppSettings["CloverUrl"];

baseUrl = Request.Url.Scheme + "://" + Request.Url.Authority + Request.ApplicationPath;

CloverRoot cloverParemeters = new CloverRoot();

cloverParemeters.customer = new Customer

{

firstName = "Girish",

lastName = "Kolte"

};

cloverParemeters.redirectUrls = new RedirectUrls

{

success = baseUrl + "CloverSucess.aspx?code=" + Common.Encrypt(id.ToString()) + "&id=" + Common.Encrypt(GuidId.ToString()),

failure = baseUrl + "CloverFailed.aspx?code=" + Common.Encrypt(id.ToString())

};

cloverParemeters.shoppingCart = new ShoppingCart

{

lineItems = new List<LineItem>

{

new LineItem {

price = Math.Round(Convert.ToDouble(amt * 100),2),

name= "Total Payment",

unitQty = Convert.ToDouble(1)

}

},

total = Math.Round((objInvoice.SubTotal + objInvoice.SaleTaxAmount),2),

subtotal = Math.Round(objInvoice.SubTotal,2),

totalTaxAmount = Math.Round(objInvoice.SaleTaxAmount,2)

};


var json = new System.Web.Script.Serialization.JavaScriptSerializer();

string jsonData = json.Serialize(cloverParemeters);


var client = new RestClient(CloverUrl + "/invoicingcheckoutservice/v1/checkouts");

var request = new RestRequest(Method.POST);

request.AddHeader("accept", "application/json");

request.AddHeader("X-Clover-Merchant-Id", mId);

request.AddHeader("content-type", "application/json");

request.AddHeader("authorization", "Bearer " + APIToken);

request.AddParameter("application/json", jsonData, RestSharp.ParameterType.RequestBody);

IRestResponse response = client.Execute(request);


CloverData data = JsonConvert.DeserializeObject<CloverData>(response.Content.ToString());

if (response.StatusCode == HttpStatusCode.OK)

{

}


this above code getting the error now for the sandbox. please provide a feasible solution as soon as possible it is a little bit urgent.

Thanks

clover developer communitySandbox
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

jtg763 avatar image
jtg763 answered

I have the same issue, this has been going on for over 1 year plus, Clover doesn't care about sandbox. And they especially don't care to report sandbox outages, nor do they answer questions about it.


Please reference my profile and questions as proof of this.

Screenshot of my unanswered posts for the past year:

1698260044744.png


1698260044744.png (185.4 KiB)
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

bryanvargas avatar image
bryanvargas answered jdusa commented

This was resolved last night please try again

1 comment
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

jdusa avatar image jdusa commented ·
This has not been resolved and it seems to be a recurring problem. There are multiple questions within the last 48 hours that reference this ongoing issue.
0 Likes 0 ·
craigreilly avatar image
craigreilly answered

I keep getting this today:

Payment not successful, please try again.


10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

jacobnarayan avatar image
jacobnarayan answered jimmybriggs commented

I keep getting:

error: {

code: 'card_declined',

message: 'System Error, please retry',

charge: 'V4D021YEE1EYP',

declineCode: 'issuer_declined'

}

my code hasn't changed at all and was working a few days ago. This is happening for all cards in sandbox environment that I've tried

1 comment
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

jimmybriggs avatar image jimmybriggs commented ·
We are getting the same issue.
0 Likes 0 ·
bryanvargas avatar image
bryanvargas answered

This issue has been resolved, please try again today

10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Welcome to the
Clover Developer Community