Posts: 2
Registered: ‎11-04-2020

responseHandler not callback

We are using AcceptUI.js impement payment function.     Everyting  working fine for more than 2 years.  But recently some users feedback after enterning credit card number information the  payment popup form display loading forever.  We added logs found  responseHandler() never callback in their case.  I  want to know  in what's case this would be happen and how to fix it.  Hope someone could help me out,  it's really frustrate,  since seems the issues happend in accept.js it self, we can not do anymore actions,  the callback not execute  so do not know what's error get.


Following is  code we are using:


   <input type="hidden" name="dataValue" id="dataValue" />
						        <input type="hidden" name="dataDescriptor" id="dataDescriptor" />
						            class="AcceptUI btnPlaceOrder btnPlaceOrderAuthorize btn-pcusa"
									value="Payment | Place Order"									
						                width: 100%;
						                padding: 8px 20px;
						                font-weight: normal;
						                margin-bottom: 10px;
						                font-size: 16pt;
						            data-billingAddressOptions='{"show":true, "required":false}' 
						            data-apiLoginID="<%=creditCardApiLoginID %>" 
									data-clientKey="<%=creditCardClientKey %>"
						            data-acceptUIFormBtnTxt="Place Order" 
						            data-acceptUIFormHeaderTxt="Card Information" 
 <script type="text/javascript">
                          // payment
                          function responseHandler(response) {
                              pageViewController.postOrderEvent("Authorize responseHandler call back: " + JSON.stringify(response));
                              if (response.messages.resultCode === "Error") {
                                  var i = 0;
                                  var error = 'Checkout Credicard Pay Error:';
                                  while (i < response.messages.message.length) {
                                          response.messages.message[i].code + ": " +
                                      if (error != '') {
                                          error += "\n";
                                      error += response.messages.message[i].text;
                                      i = i + 1;
                                  setTimeout(alert(error), 1000);

                                  pageViewController.postOrderEvent("Authorize callback error");
                              } else {
                                  pageViewController.postOrderEvent("Authorize callback success");

                          function paymentFormUpdate(response) {
                              var opaqueData = response.opaqueData;
                              document.getElementById("dataDescriptor").value = opaqueData.dataDescriptor;
                              document.getElementById("dataValue").value = opaqueData.dataValue;
                              pageViewController.postOrderEvent("Authorize callback success start  creditCardProcess");
Posts: 2
Registered: ‎11-04-2020

Re: responseHandler not callback

BTW the UI stuck at "Loading" popup dialog for ever,  user has tried many times with refersh page, but still can not solve it.


Posts: 1
Registered: ‎11-04-2020

Re: responseHandler not callback

am always confused about the difference between these two. If the chunk below was the app, how would a unit test look like? And an integration test? MyCCPay


def add(a, b):
    return a + b

def mult(a, b):
    return a * b

if __name__ == "__main__":
    mult(10, add(2, 5))