Posts: 17
Registered: ‎10-03-2013

Re: Sandbox Accept.js seems to be down

There's 3 things I'd like to see after the service is restored:


1) What happened? There was some event yesterday which caused the service to stop working. If there was an update there should be better notification and smoke testing to ensure us consumers aren't affected as well as reliable rollback procedures (A/B swtich, etc.).


2) Add better monitoring so excessive downtime can be avoided. Also add a service dashboard (e.g. for greater transparency.


3) Make sure that the JS 'responseHandler' callback function is called from Accept.dispatchData when ANY error happens so it can be notified there was a problem. For example in our application we are displaying a busy indicator until the call returns, which it never does because it eats the exception, so our application appears stuck in a loop.


We also have a critical hot fix that is delayed due to this.



Posts: 321
Topics: 5
Kudos: 37
Blog Posts: 5
Ideas: 0
Solutions: 26
Registered: ‎11-09-2011

Re: Sandbox Accept.js seems to be down

The issue has been resolved, and HTTP OPTIONS calls should return the appropriate CORS headers. We apologize for the inconvenience.

"Move fast and break things," out. "Move carefully and fix what you break," in.
Posts: 4
Registered: ‎10-12-2016

Re: Sandbox Accept.js seems to be down

Our issue wasn't "accept.js" per se. It was generally that the sandbox was timing out for us suddenly. It is now working for us.

Posts: 1
Registered: ‎10-14-2016

RE: Problem in Accept.js library

[ Edited ]

We have simply added in oue page and hit sendPaymentDataToAnet function. We have cheked if this function working or not with alert message and its working. After that we have set creditdata and authdata in secureData variable and also checked securedata variable with alert and all values set in this variable. But when it comes to execute function Accept.dispatchData(secureData, 'responseHandler'), it will give us above error i.e Uncaught TypeError: window[c] is not a function in

We haven't yet find this issue to be fixed.

Please fix this issue.


Posts: 17
Registered: ‎10-03-2013

Re: RE: Problem in Accept.js library



There is NOT a problem right now. It sounds like a programming error on your side. I would still like answers to the 3 issues I raised however

Posts: 17
Registered: ‎10-03-2013

Re: RE: Problem in Accept.js library

@lovey Here's a fully functional test you can use to verify it works. All you need to do is update the apiKey/publicKey (marked TODO in the code). This MUST be served from an HTTPS server to work (e.g. I used Node.js). Visit the page and hit Pay button and you will get a nonce displayed in alert and console.


<!DOCTYPE html>
<html lang="en">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>Payment Screen using Accept.js POC</title>
<script src="jquery.min.js"></script>
<script src=""></script>

<div class="">

<label for="cardNumber">Card Number</label>
<input id="cardNumber" value="370000000000002"/>

<label for="securityCode">CVV/CVD</label>
<input id="securityCode" value="900"/>

<legend>Card Expiration</legend>
<input id="expirationMonth" value="08" />
<label for="expirationMonth">Month</label>
<input id="expirationYear" value="2022"/>
<label for="expirationYear">Year</label>


<button type="submit" onclick="sendPaymentDataToAnet()">Pay</button>


'use strict';

var config = {
apiLoginID: 'TODO',
clientKey: 'TODO'

function sendPaymentDataToAnet() {
var secureData = {}, authData = {}, cardData = {};

cardData.cardNumber = document.getElementById('cardNumber').value;
cardData.cardCode = document.getElementById('securityCode').value;
cardData.month = document.getElementById('expirationMonth').value;
cardData.year = document.getElementById('expirationYear').value;
secureData.cardData = cardData;

authData.clientKey = config.clientKey;
authData.apiLoginID = config.apiLoginID;
secureData.authData = authData;

Accept.dispatchData(secureData, 'responseHandler');

function responseHandler(response) {
if (response.messages.resultCode === 'Error') {
for (var i = 0; i < response.messages.message.length; i++) {
console.log(response.messages.message[i].code + ':' + response.messages.message[i].text);
} else {

function useOpaqueData(responseData) {
// This is where you would set the data descriptor & data value to be posted back to your server




Posts: 17
Registered: ‎10-03-2013

Re: Sandbox Accept.js seems to be down

I just stumbled upon this:


However it is not accurate as there no mention of this outage.

Posts: 5
Registered: ‎07-01-2019

Re: RE: Problem in Accept.js library

Can you please comment out how responsehandler can be defined on ReactJS application

 <form id="paymentForm" method="POST" action="">
          <input type="hidden" name="dataValue" id="dataValue" />
          <input type="hidden" name="dataDescriptor" id="dataDescriptor" />
          <InputDiv id="proceed">
              data-billingAddressOptions='{"show":true, "required":false}'
              data-acceptUIFormBtnTxt="Pay now"
              data-acceptUIFormHeaderTxt="Card Information"
              data-paymentOptions='{"showCreditCard": true, "showBankAccount": true}'
              data-responseHandler={(response) => {
handleSendPaymentInformationToAuthorizeNet = (response) => {
    console.log('response is', response);