국민클럽비투비 API문서(문의 : km1262@nate.com)

데이터 설정부분

$recipient_name = "테스트";
$recipient_tel = "";
$recipient_hp = "010-0000-0000";
$recipient_zip = "00000";
$recipient_addr1 = "기본주소";
$recipient_addr2 = "상세주소";
$recipient_addr3 = "";
$recipient_addr_jibeon = "";
$recipient_memo = "";
$working_name = "";
$working_tel = "";
$order_number = "주문번호";
$order_etc01 = "";
$order_etc02 = "";
$order_etc03 = "";
$order_etc04 = "";
$order_etc05 = "";
$item = array(
    array('it_serial' => "상품고유코드", 'qty' => '1')
);
$data = array(
    'recipient_name' => $recipient_name,
    'recipient_tel' => $recipient_tel,
    'recipient_hp' => $recipient_hp,
    'recipient_zip' => $recipient_zip,
    'recipient_addr1' => $recipient_addr1,
    'recipient_addr2' => $recipient_addr2,
    'recipient_addr3' => $recipient_addr3,
    'recipient_addr_jibeon' => $recipient_addr_jibeon,
    'recipient_memo' => $recipient_memo,
    'working_name' => $working_name,
    'working_tel' => $working_tel,
    'order_number' => $order_number,
    'order_etc01' => $order_etc01,
    'order_etc02' => $order_etc02,
    'order_etc03' => $order_etc03,
    'order_etc04' => $order_etc04,
    'order_etc05' => $order_etc05,
    'item' => $item
);
$response = apiCall("http://api.kmclubb2b.com/Order/add", json_encode(array('id' => 조회아이디, 'order' => $data)));

$data

function apiCall($url, $data){
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_POST, true);
    curl_setopt($ch, CURLOPT_POSTFIELDS, array('data' => $data));
    curl_setopt($ch, CURLOPT_HEADER, false);
    $result = curl_exec($ch);
    curl_close($ch);
    return $result;
}