示例#1
0
    // 결과 메시지
    /* $res_en_msg = $c_PayPlus->mf_get_res_data( "res_en_msg" );  // 결과 영문 메세지 */
} else {
    $c_PayPlus->m_res_cd = "9562";
    $c_PayPlus->m_res_msg = "연동 오류|Payplus Plugin이 설치되지 않았거나 tran_cd값이 설정되지 않았습니다.";
}
if ($res_cd != '0000') {
    $res_msg = iconv("euc-kr", "utf-8", $res_msg);
    alert("{$res_cd} : {$res_msg}");
}
/* ============================================================================== */
/* =       취소 결과 처리                                                       = */
/* = -------------------------------------------------------------------------- = */
if ($req_tx == "mod") {
    if ($res_cd == "0000") {
        $tno = $c_PayPlus->mf_get_res_data("tno");
        // KCP 거래 고유 번호
        $amount = $c_PayPlus->mf_get_res_data("amount");
        // 원 거래금액
        $mod_mny = $c_PayPlus->mf_get_res_data("panc_mod_mny");
        // 취소요청된 금액
        $rem_mny = $c_PayPlus->mf_get_res_data("panc_rem_mny");
        // 취소요청후 잔액
        // 환불금액기록
        $sql = " update {$g5['g5_shop_order_table']}\n                    set od_refund_price = od_refund_price + '{$mod_mny}',\n                        od_shop_memo = concat(od_shop_memo, \"{$mod_memo}\")\n                    where od_id = '{$od['od_id']}'\n                      and od_tno = '{$tno}' ";
        sql_query($sql);
        // 미수금 등의 정보 업데이트
        $info = get_order_info($od_id);
        $sql = " update {$g5['g5_shop_order_table']}\n                    set od_misu     = '{$info['od_misu']}',\n                        od_tax_mny  = '{$info['od_tax_mny']}',\n                        od_vat_mny  = '{$info['od_vat_mny']}',\n                        od_free_mny = '{$info['od_free_mny']}'\n                    where od_id = '{$od_id}' ";
        sql_query($sql);
    } else {
示例#2
0
    $c_PayPlus->mf_do_tx("", $g_conf_home_dir, $g_conf_site_id, $g_conf_site_key, $tx_cd, "", $g_conf_pa_url, $g_conf_pa_port, "payplus_cli_slib", $ordr_idxx, $cust_ip, $g_conf_log_level, "", $g_conf_tx_mode, $g_conf_key_dir, $g_conf_log_dir);
} else {
    $c_PayPlus->m_res_cd = "9562";
    $c_PayPlus->m_res_msg = "연동 오류";
}
$res_cd = $c_PayPlus->m_res_cd;
// 결과 코드
$res_msg = $c_PayPlus->m_res_msg;
// 결과 메시지
/* ============================================================================== */
/* ============================================================================== */
/* =   04. 승인 결과 처리                                                       = */
/* = -------------------------------------------------------------------------- = */
if ($req_tx == "pay") {
    if ($res_cd == "0000") {
        $cash_no = $c_PayPlus->mf_get_res_data("cash_no");
        // 현금영수증 거래번호
        $receipt_no = $c_PayPlus->mf_get_res_data("receipt_no");
        // 현금영수증 승인번호
        $app_time = $c_PayPlus->mf_get_res_data("app_time");
        // 승인시간(YYYYMMDDhhmmss)
        $reg_stat = $c_PayPlus->mf_get_res_data("reg_stat");
        // 등록 상태 코드
        $reg_desc = $c_PayPlus->mf_get_res_data("reg_desc");
        // 등록 상태 설명
        /* = -------------------------------------------------------------------------- = */
        /* =   04-1. 승인 결과를 업체 자체적으로 DB 처리 작업하시는 부분입니다.         = */
        /* = -------------------------------------------------------------------------- = */
        /* =         승인 결과를 DB 작업 하는 과정에서 정상적으로 승인된 건에 대해      = */
        /* =         DB 작업을 실패하여 DB update 가 완료되지 않은 경우, 자동으로       = */
        /* =         승인 취소 요청을 하는 프로세스가 구성되어 있습니다.                = */