cancel
Showing results for 
Search instead for 
Did you mean: 

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" />
						        <input 
						            type="button" 
						            class="AcceptUI btnPlaceOrder btnPlaceOrderAuthorize btn-pcusa"
									value="Payment | Place Order"									
						            style="
						                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" 
						            data-responseHandler="responseHandler"
                                />
 <script type="text/javascript">
                          //Authorize.net 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) {
                                      console.log(
                                          response.messages.message[i].code + ": " +
                                          response.messages.message[i].text
                                      );
                                      if (error != '') {
                                          error += "\n";
                                      }
                                      error += response.messages.message[i].text;
                                      i = i + 1;
                                  }
                                  jsErrorHandler.postErrorToServer(error);
                                  setTimeout(alert(error), 1000);

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

                          function paymentFormUpdate(response) {
                              var opaqueData = response.opaqueData;
                              document.getElementById("dataDescriptor").value = opaqueData.dataDescriptor;
                              document.getElementById("dataValue").value = opaqueData.dataValue;
                              //document.getElementById("aspnetForm").submit();
                              pageViewController.postOrderEvent("Authorize callback success start  creditCardProcess");
                              pageViewController.creditCardProcess(response);
                          }
                      </script>
tomwangsl
Member
4 REPLIES 4

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

 

tomwangsl
Member

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))

 

Lennie
Member
 
i could not able to call my update method from the bolt responsehandler.please helpme on this issue.angular6:error.js.1673 error
securitasepay
Member
i could not able to call my update method from the bolt responsehandler.please helpme on this issue.angular6:error.js.1673 error