PHP & MySQL

php + jquery ajax + json

관리자 | 2014.03.04 15:30 | 조회 5723

html 단

 

    function requestAjax() {
         document.getElementById("checkPhone").hidden=true; // 핸드폰 번호를 입력하였는지 확인
         $.ajax({
         type: "POST",
         dataType: "json",
         async: true,
         timeout: 70000,
         data:({
                phoneInput : document.getElementById("phoneInput").value,
                merchants_id : document.getElementById("merchants_id").value,
                cop_id : document.getElementById("cop_id").value,
                cop_nm : document.getElementById("cop_nm").value,
                goods_nm : document.getElementById("goods_nm").value,
                amount : document.getElementById("amount").value,
                CHC_AUTH_TYPE_CD : document.getElementById("CHC_AUTH_TYPE_CD").value,
                NETCAN_SUBJECT_ID : 0
               }),

         url: "payment_result.php",
         error: function(data){
              requestAjaxError("연결실패1");
         },
         beforeSend: function(){
              requestAjaxWaiting();
         },
         success: function(data){
              requestAjaxResult(data);
         }
         });
    }

 

 

 

action 날라가는 php 단

처리후..

 

$buyer_phone = $_POST['phoneInput'];

 echo json_encode(array(   
      "resp_cd"=>"6000",
                        "resp_msg"=>"결과응답을 받지 못했습니다. 잠시 후 다시 시도해 주세요.",
                        "ext_tx_number"=>$ext_tx_number,
                        "amount"=>$amount_pay
                      )); 

 

 

 

 

결제연동 한부분 발췌했음..   색깔부분만 중요하게 보면됨

twitter facebook me2day 요즘
38개(1/2페이지)
PHP & MySQL
번호 제목 글쓴이 조회 날짜
38 [PHP] 파파고 API 관리자 2174 2021.01.29 16:33
37 [AWS] 아마존 개인화 amazon personalize-dg 첨부파일 관리자 2254 2020.01.22 19:33
36 [PHP] 소녀나라 구인공고 사진 관리자 3685 2018.04.17 12:54
35 [MYSQL] 게시판 페이징(?) 속도 향상 [1] 관리자 11716 2014.08.13 02:18
34 [MYSQL] 페이징 쿼리, 페이징 기법 관리자 22170 2014.08.13 01:48
33 [MYSQL] 이메일 필터 정규식 관리자 8161 2014.07.25 11:32
32 [PHP] Zen HTML Selectors 관리자 5983 2014.03.12 17:16
31 [PHP] zen coding~! 젠코딩 Zen HTML Elements 관리자 8212 2014.03.12 17:16
30 [PHP] 에디트 플러스 zen coding CSS 관리자 7655 2014.03.12 17:16
>> [PHP] php + jquery ajax + json 관리자 5724 2014.03.04 15:30
28 [PHP] php 엑셀 파일 생성시 한글깨짐 관리자 8842 2014.02.21 16:31
27 [PHP] 날씨 API, 기상청 날씨 파싱 관리자 10981 2014.01.22 15:32
26 [PHP] 도로명주소 관리자 5819 2014.01.09 11:39
25 [MYSQL] MYSQL EXPLAIN 관리자 6225 2013.10.28 12:10
24 [PHP] PHP, AJAX, JSON 리턴 관리자 7476 2013.10.18 17:49
23 [MYSQL] mysql성능 향상 첨부파일 관리자 4516 2013.10.07 12:52
22 [MYSQL] mysql 최적화 관리자 5251 2013.10.07 12:35
21 [PHP] PHP 변수 초기화 및 조건부 할당 관리자 6560 2013.09.25 00:57
20 [PHP] 킴스큐 썸네일 사이즈 변경 관리자 4894 2013.07.16 14:14
19 [PHP] 간단하게 만드는 캐싱 사진 관리자 5727 2013.05.21 14:11
많이 본 글
댓글 많은 글

Warning: Unknown: write failed: Disk quota exceeded (122) in Unknown on line 0

Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (./_tmp/session) in Unknown on line 0