title: Passing Credit Card Information via AJAX
body: <p>I am wondering if this is a secure way to process credit card information. The site uses PHP and  IS using an SSL Certifacate, but instead of submitting a form and getting $_POST variables. I want to try to use JQUERY AJAX and communicate with the user if their information was approved or not. But I am worried about if this method is secure. And example of my code is below.</p>
  
  <pre><code>$.ajax({
      type: "POST",
      url: "ajax_process_credit_card.php", 
      data: { cardnumber : cardnumber , cardexpmonth : cardexpmonth, cardexpyear: cardexpyear, chargetotal: chargetotal, ordertype: ordertype  },
          success: function(msg){  
  
      $("#status").ajaxComplete(function(event, request, settings){   
  
       if(msg == 'APPROVED'){
  
            complete_registration();
       }
       else // ERROR?
       {
       var error_message= msg;
  
         $('#error_message').html(error_message);
  
       }  
  
       });  
  
       }  
  
        });  
  </code></pre>
  
  <p>Would this be ok?</p>