$cust_ip = getenv('REMOTE_ADDR'); $rem_mny = (int) $od['od_receipt_price'] - (int) $od['od_refund_price']; $mod_mny = (int) $tax_mny; $mod_free_mny = (int) $free_mny; $mod_type = 'RN07'; if ($od['od_settle_case'] == '계좌이체') { $mod_type = 'STPA'; } if ($od['od_tax_flag']) { $mod_mny = $tax_mny + $free_mny; } $c_PayPlus = new C_PAYPLUS_CLI_T(); $c_PayPlus->mf_clear(); if ($req_tx == "mod") { $tran_cd = "00200000"; $c_PayPlus->mf_set_modx_data("tno", $tno); // KCP 원거래 거래번호 $c_PayPlus->mf_set_modx_data("mod_type", $mod_type); // 원거래 변경 요청 종류 $c_PayPlus->mf_set_modx_data("mod_ip", $cust_ip); // 변경 요청자 IP $c_PayPlus->mf_set_modx_data("mod_desc", $mod_desc); // 변경 사유 $c_PayPlus->mf_set_modx_data("rem_mny", strval($rem_mny)); // 취소 가능 잔액 $c_PayPlus->mf_set_modx_data("mod_mny", strval($mod_mny)); // 취소 요청 금액 if ($od['od_tax_flag']) { $mod_tax_mny = round((int) $tax_mny / 1.1); $mod_vat_mny = (int) $tax_mny - $mod_tax_mny; $c_PayPlus->mf_set_modx_data("tax_flag", "TG03");
$corp_data_set .= $c_PayPlus->mf_set_data_us("corp_owner_nm", $corp_owner_nm); $corp_data_set .= $c_PayPlus->mf_set_data_us("corp_addr", $corp_addr); $corp_data_set .= $c_PayPlus->mf_set_data_us("corp_telno", $corp_telno); } $c_PayPlus->mf_set_ordr_data("rcpt_data", $rcpt_data_set); $c_PayPlus->mf_set_ordr_data("corp_data", $corp_data_set); } else { if ($req_tx == "mod") { if ($mod_type == "STSQ") { $tx_cd = "07030000"; // 조회 요청 } else { $tx_cd = "07020000"; // 취소 요청 } $c_PayPlus->mf_set_modx_data("mod_type", $mod_type); // 원거래 변경 요청 종류 $c_PayPlus->mf_set_modx_data("mod_value", $mod_value); $c_PayPlus->mf_set_modx_data("mod_gubn", $mod_gubn); $c_PayPlus->mf_set_modx_data("trad_time", $trad_time); if ($mod_type == "STPC") { $c_PayPlus->mf_set_modx_data("mod_mny", $mod_mny); $c_PayPlus->mf_set_modx_data("rem_mny", $rem_mny); } } } /* ============================================================================== */ /* ============================================================================== */ /* = 03-3. 실행 = */ /* ------------------------------------------------------------------------------ */ if (strlen($tx_cd) > 0) {