Showing results for 
Search instead for 
Did you mean: 

Showreceipt set to false makes the Pay button stuck showing"processing"

I am trying to integrate by embedding the iframe . The communicator page sends response to the events. When I click on the Pay button, the button is stuck showing "processing.." This happens when the showreceipt is set to "false", but when I set it to true, the payment is processed and shows the receipt page.

After clicking Pay button I want it to be forwarded back to our site to display custom receipt after payment processing that is the reason for setting showreceipt to "false". 

Does somebody have any thoughts or suggestions for this issue?


Post your code and I may be able to help you.
All Star




public class HomeController : Controller
IHostingEnvironment _env;
IConfiguration _config;
public HomeController(IHostingEnvironment env, IConfiguration config)
_env = env;
_config = config;

public IActionResult Index()
customerAddressType BillTo = new customerAddressType
address = "120 Sceneic Drive",
city = "Twinsburg ",
state = "OH",
zip = "14326",
firstName = "Sam",
lastName = "Donald",
country = "USA",
phoneNumber = "4454546589",

int CreditCardTransactionID = 121212;
decimal Amount = 100;
int OrderID = 1234567;
string IPAddress = "";
int CustomerID = 5129999;
transactionTypeEnum transtype = transactionTypeEnum.authCaptureTransaction;

merchantAuthenticationType mat = new merchantAuthenticationType
name = _config.GetValue<string>("Authorize.Net:TransactionKey"),
ItemElementName = ItemChoiceType.transactionKey,
Item = _config.GetValue<string>("Authorize.Net:Password"),

string CancelURL;
string ReturnURL;
string URL;
string CommunicatorURL;
string PaymentPageURL;
string ShowReceipt = "false";

string HostURL = _config.GetValue<string>("RootURL");

switch ((_env.EnvironmentName ?? "").Trim().ToUpper())
string NGrokPath = $"{HostURL}/Home";
CommunicatorURL = $"{NGrokPath}/Communicator";
CancelURL = $"{NGrokPath}/Cancel";
ReturnURL = $"{NGrokPath}/Returning";
PaymentPageURL = $"{NGrokPath}/";
URL = $"{NGrokPath}";
case "STAGING":
CommunicatorURL = $"{HostURL}/Home/Communicator";
CancelURL = $"{HostURL}/Home/Cancel";
ReturnURL = $"{HostURL}/Home/Returning";
PaymentPageURL = $"{HostURL}/";
ShowReceipt = "true";
return Error();

HostedPayment hp = new HostedPayment(mat, AuthorizeNet.Environment.SANDBOX);
HostedToken ht = hp.AttemptTransaction(CreditCardTransactionID, Amount, OrderID, IPAddress, CustomerID, null, false, transtype, BillTo, ReturnURL, CancelURL, CommunicatorURL, PaymentPageURL, ShowReceipt);
return View(ht);
public IActionResult Cancel()
return Content("Cancelled");

public IActionResult Returning()
return Content("Done!");
public IActionResult Communicator()
return View();
public IActionResult Empty1()
return View();

public IActionResult WebHook()
string s = "";
using (StreamReader reader = new StreamReader(Request.Body, Encoding.UTF8))
s = reader.ReadToEnd();
System.Diagnostics.Debug.WriteLine("##### " + s);
return Ok();

[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
public IActionResult Error()
return View(new ErrorViewModel { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier });




I used the suggestion in this link for now as a workaround. Also I want the json result to be pushed to webhook, if you could share any thoughts about that that would be helpful.






What happens when you click the cancel button? And can you print out what is being output as the Host URL?

 @Renaissance Sorry for the delay in responding. The Cancel button works, If I give CancelUrl it redirects to that Url. I use ngrok tunnel for testing as I cannot use the local host. The issue now is pushing the json data to our server for validation. Not sure how to do that in MVC.




Did you ever work this out? I am now having the same issue on an integration I am working on. Very odd.

Tied the issue back to my communicator not working properly.