first commit 2
This commit is contained in:
@@ -0,0 +1,192 @@
|
||||
<?php
|
||||
/* ============================================================================== */
|
||||
/* = PAGE : 라이브버리 PAGE = */
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
/* = Copyright (c) 2010.02 KCP Co., Ltd. All Rights Reserved. = */
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
/* + 이 모듈에 대한 수정을 금합니다. + */
|
||||
/* ============================================================================== */
|
||||
|
||||
/* ============================================================================== */
|
||||
/* + SOAP 연동 CALSS + */
|
||||
/* ============================================================================== */
|
||||
|
||||
class ApproveReq
|
||||
{
|
||||
public $accessCredentialType; // AccessCredentialType
|
||||
public $baseRequestType; // BaseRequestType
|
||||
public $escrow; // boolean
|
||||
public $orderID; // string
|
||||
public $paymentAmount; // string
|
||||
public $paymentMethod; // string
|
||||
public $productName; // string
|
||||
public $returnUrl; // string
|
||||
public $siteCode; // string
|
||||
}
|
||||
|
||||
class ApproveRes
|
||||
{
|
||||
public $approvalKey; // string
|
||||
public $baseResponseType; // BaseResponseType
|
||||
public $payUrl; // string
|
||||
}
|
||||
|
||||
class approve
|
||||
{
|
||||
public $req; // ApproveReq
|
||||
}
|
||||
|
||||
class approveResponse
|
||||
{
|
||||
public $return; // ApproveRes
|
||||
}
|
||||
|
||||
class AccessCredentialType
|
||||
{
|
||||
public $accessLicense; // string
|
||||
public $signature; // string
|
||||
public $timestamp; // string
|
||||
}
|
||||
|
||||
class BaseRequestType
|
||||
{
|
||||
public $detailLevel; // string
|
||||
public $requestApp; // string
|
||||
public $requestID; // string
|
||||
public $userAgent; // string
|
||||
public $version; // string
|
||||
}
|
||||
|
||||
class BaseResponseType
|
||||
{
|
||||
public $detailLevel; // string
|
||||
public $error; // ErrorType
|
||||
public $messageID; // string
|
||||
public $release; // string
|
||||
public $requestID; // string
|
||||
public $responseType; // string
|
||||
public $timestamp; // string
|
||||
public $version; // string
|
||||
public $warningList; // ErrorType
|
||||
}
|
||||
|
||||
class ErrorType
|
||||
{
|
||||
public $code; // string
|
||||
public $detail; // string
|
||||
public $message; // string
|
||||
}
|
||||
|
||||
class PayService extends SoapClient
|
||||
{
|
||||
private static $classmap = array(
|
||||
'ApproveReq' => 'ApproveReq',
|
||||
'ApproveRes' => 'ApproveRes',
|
||||
'approve' => 'approve',
|
||||
'approveResponse' => 'approveResponse',
|
||||
'AccessCredentialType' => 'AccessCredentialType',
|
||||
'BaseRequestType' => 'BaseRequestType',
|
||||
'BaseResponseType' => 'BaseResponseType',
|
||||
'ErrorType' => 'ErrorType',
|
||||
);
|
||||
|
||||
var $chatsetType;
|
||||
var $accessCredentialType;
|
||||
var $baseRequestType;
|
||||
var $approveReq;
|
||||
var $approveResponse;
|
||||
var $resCD;
|
||||
var $resMsg;
|
||||
|
||||
|
||||
public function __construct( $wsdl = "", $options = array() )
|
||||
{
|
||||
foreach( self::$classmap as $key => $value )
|
||||
{
|
||||
if ( !isset( $options[ 'classmap' ][ $key ] ) )
|
||||
{
|
||||
$options[ 'classmap' ][ $key ] = $value;
|
||||
}
|
||||
}
|
||||
|
||||
parent::__construct( $wsdl, $options );
|
||||
|
||||
$accessCredentialType = null;
|
||||
$baseRequestType = null;
|
||||
$approveReq = null;
|
||||
$resCD = "95XX";
|
||||
$resMsg = "연동 오류";
|
||||
}
|
||||
|
||||
public function setCharSet( $charsetType )
|
||||
{
|
||||
$this->chatsetType = $charsetType;
|
||||
}
|
||||
|
||||
public function setAccessCredentialType( $accessLicense,
|
||||
$signature,
|
||||
$timestamp )
|
||||
{
|
||||
$this->accessCredentialType = new AccessCredentialType();
|
||||
|
||||
$this->accessCredentialType->accessLicense = $accessLicense;
|
||||
$this->accessCredentialType->signature = $signature;
|
||||
$this->accessCredentialType->timestamp = $timestamp;
|
||||
}
|
||||
|
||||
public function setBaseRequestType( $detailLevel,
|
||||
$requestApp,
|
||||
$requestID,
|
||||
$userAgent,
|
||||
$version )
|
||||
{
|
||||
$this->baseRequestType = new BaseRequestType();
|
||||
|
||||
$this->baseRequestType->detailLevel = $detailLevel;
|
||||
$this->baseRequestType->requestApp = $requestApp;
|
||||
$this->baseRequestType->requestID = $requestID;
|
||||
$this->baseRequestType->userAgent = $userAgent;
|
||||
$this->baseRequestType->version = $version;
|
||||
}
|
||||
|
||||
public function setApproveReq( $escrow,
|
||||
$orderID,
|
||||
$paymentAmount,
|
||||
$paymentMethod,
|
||||
$productName,
|
||||
$returnUrl,
|
||||
$siteCode )
|
||||
{
|
||||
$this->approveReq = new ApproveReq();
|
||||
|
||||
$productName_utf8 = ( $this->chatsetType == "euc-kr" ) ? iconv( "EUC-KR", "UTF-8", $productName ) : $productName;
|
||||
|
||||
$this->approveReq->accessCredentialType = $this->accessCredentialType;
|
||||
$this->approveReq->baseRequestType = $this->baseRequestType;
|
||||
$this->approveReq->escrow = $escrow;
|
||||
$this->approveReq->orderID = $orderID;
|
||||
$this->approveReq->paymentAmount = $paymentAmount;
|
||||
$this->approveReq->paymentMethod = $paymentMethod;
|
||||
$this->approveReq->productName = $productName_utf8;
|
||||
$this->approveReq->returnUrl = $returnUrl;
|
||||
$this->approveReq->siteCode = $siteCode;
|
||||
}
|
||||
|
||||
public function approve()
|
||||
{
|
||||
$approve = new approve();
|
||||
|
||||
$approve->req = $this->approveReq;
|
||||
|
||||
$this->approveResponse = $this->__soapCall( "approve", array( $approve ),
|
||||
array( 'uri' => 'http://webservice.act.webpay.service.kcp.kr',
|
||||
'soapaction' => ''
|
||||
)
|
||||
);
|
||||
|
||||
$this->resCD = $this->approveResponse->return->baseResponseType->error->code;
|
||||
$this->resMsg = $this->approveResponse->return->baseResponseType->error->message;
|
||||
|
||||
return $this->approveResponse->return;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,142 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:ns1="http://org.apache.axis2/xsd" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:ax21="http://payment.domain.webpay.service.kcp.kr/xsd" xmlns:ns="http://webservice.act.webpay.service.kcp.kr" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:ax22="http://domain.webpay.service.kcp.kr/xsd" targetNamespace="http://webservice.act.webpay.service.kcp.kr">
|
||||
<wsdl:types>
|
||||
<xs:schema xmlns:ax23="http://domain.webpay.service.kcp.kr/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://payment.domain.webpay.service.kcp.kr/xsd">
|
||||
<xs:import namespace="http://domain.webpay.service.kcp.kr/xsd"/>
|
||||
<xs:complexType name="ApproveReq">
|
||||
<xs:sequence>
|
||||
<xs:element minOccurs="0" name="accessCredentialType" nillable="true" type="ax22:AccessCredentialType"/>
|
||||
<xs:element minOccurs="0" name="baseRequestType" nillable="true" type="ax22:BaseRequestType"/>
|
||||
<xs:element minOccurs="0" name="escrow" type="xs:boolean"/>
|
||||
<xs:element minOccurs="0" name="orderID" nillable="true" type="xs:string"/>
|
||||
<xs:element minOccurs="0" name="paymentAmount" nillable="true" type="xs:string"/>
|
||||
<xs:element minOccurs="0" name="paymentMethod" nillable="true" type="xs:string"/>
|
||||
<xs:element minOccurs="0" name="productName" nillable="true" type="xs:string"/>
|
||||
<xs:element minOccurs="0" name="returnUrl" nillable="true" type="xs:string"/>
|
||||
<xs:element minOccurs="0" name="siteCode" nillable="true" type="xs:string"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
<xs:complexType name="ApproveRes">
|
||||
<xs:sequence>
|
||||
<xs:element minOccurs="0" name="approvalKey" nillable="true" type="xs:string"/>
|
||||
<xs:element minOccurs="0" name="baseResponseType" nillable="true" type="ax22:BaseResponseType"/>
|
||||
<xs:element minOccurs="0" name="payUrl" nillable="true" type="xs:string"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:schema>
|
||||
<xs:schema xmlns:ax24="http://payment.domain.webpay.service.kcp.kr/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://webservice.act.webpay.service.kcp.kr">
|
||||
<xs:import namespace="http://payment.domain.webpay.service.kcp.kr/xsd"/>
|
||||
<xs:element name="approve">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element minOccurs="0" name="req" nillable="true" type="ax24:ApproveReq"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="approveResponse">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element minOccurs="0" name="return" nillable="true" type="ax24:ApproveRes"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:schema>
|
||||
<xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://domain.webpay.service.kcp.kr/xsd">
|
||||
<xs:complexType name="AccessCredentialType">
|
||||
<xs:sequence>
|
||||
<xs:element minOccurs="0" name="accessLicense" nillable="true" type="xs:string"/>
|
||||
<xs:element minOccurs="0" name="signature" nillable="true" type="xs:string"/>
|
||||
<xs:element minOccurs="0" name="timestamp" nillable="true" type="xs:string"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
<xs:complexType name="BaseRequestType">
|
||||
<xs:sequence>
|
||||
<xs:element minOccurs="0" name="detailLevel" nillable="true" type="xs:string"/>
|
||||
<xs:element minOccurs="0" name="requestApp" nillable="true" type="xs:string"/>
|
||||
<xs:element minOccurs="0" name="requestID" nillable="true" type="xs:string"/>
|
||||
<xs:element minOccurs="0" name="userAgent" nillable="true" type="xs:string"/>
|
||||
<xs:element minOccurs="0" name="version" nillable="true" type="xs:string"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
<xs:complexType name="BaseResponseType">
|
||||
<xs:sequence>
|
||||
<xs:element minOccurs="0" name="detailLevel" nillable="true" type="xs:string"/>
|
||||
<xs:element minOccurs="0" name="error" nillable="true" type="ax22:ErrorType"/>
|
||||
<xs:element minOccurs="0" name="messageID" nillable="true" type="xs:string"/>
|
||||
<xs:element minOccurs="0" name="release" nillable="true" type="xs:string"/>
|
||||
<xs:element minOccurs="0" name="requestID" nillable="true" type="xs:string"/>
|
||||
<xs:element minOccurs="0" name="responseType" nillable="true" type="xs:string"/>
|
||||
<xs:element minOccurs="0" name="timestamp" nillable="true" type="xs:string"/>
|
||||
<xs:element minOccurs="0" name="version" nillable="true" type="xs:string"/>
|
||||
<xs:element maxOccurs="unbounded" minOccurs="0" name="warningList" nillable="true" type="ax22:ErrorType"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
<xs:complexType name="ErrorType">
|
||||
<xs:sequence>
|
||||
<xs:element minOccurs="0" name="code" nillable="true" type="xs:string"/>
|
||||
<xs:element minOccurs="0" name="detail" nillable="true" type="xs:string"/>
|
||||
<xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:schema>
|
||||
</wsdl:types>
|
||||
<wsdl:message name="approveRequest">
|
||||
<wsdl:part name="parameters" element="ns:approve"/>
|
||||
</wsdl:message>
|
||||
<wsdl:message name="approveResponse">
|
||||
<wsdl:part name="parameters" element="ns:approveResponse"/>
|
||||
</wsdl:message>
|
||||
<wsdl:portType name="PayServicePortType">
|
||||
<wsdl:operation name="approve">
|
||||
<wsdl:input message="ns:approveRequest" wsaw:Action="urn:approve"/>
|
||||
<wsdl:output message="ns:approveResponse" wsaw:Action="urn:approveResponse"/>
|
||||
</wsdl:operation>
|
||||
</wsdl:portType>
|
||||
<wsdl:binding name="PayServiceSoap11Binding" type="ns:PayServicePortType">
|
||||
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
|
||||
<wsdl:operation name="approve">
|
||||
<soap:operation soapAction="urn:approve" style="document"/>
|
||||
<wsdl:input>
|
||||
<soap:body use="literal"/>
|
||||
</wsdl:input>
|
||||
<wsdl:output>
|
||||
<soap:body use="literal"/>
|
||||
</wsdl:output>
|
||||
</wsdl:operation>
|
||||
</wsdl:binding>
|
||||
<wsdl:binding name="PayServiceSoap12Binding" type="ns:PayServicePortType">
|
||||
<soap12:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
|
||||
<wsdl:operation name="approve">
|
||||
<soap12:operation soapAction="urn:approve" style="document"/>
|
||||
<wsdl:input>
|
||||
<soap12:body use="literal"/>
|
||||
</wsdl:input>
|
||||
<wsdl:output>
|
||||
<soap12:body use="literal"/>
|
||||
</wsdl:output>
|
||||
</wsdl:operation>
|
||||
</wsdl:binding>
|
||||
<wsdl:binding name="PayServiceHttpBinding" type="ns:PayServicePortType">
|
||||
<http:binding verb="POST"/>
|
||||
<wsdl:operation name="approve">
|
||||
<http:operation location="PayService/approve"/>
|
||||
<wsdl:input>
|
||||
<mime:content type="text/xml" part="approve"/>
|
||||
</wsdl:input>
|
||||
<wsdl:output>
|
||||
<mime:content type="text/xml" part="approve"/>
|
||||
</wsdl:output>
|
||||
</wsdl:operation>
|
||||
</wsdl:binding>
|
||||
<wsdl:service name="PayService">
|
||||
<wsdl:port name="PayServiceHttpSoap11Endpoint" binding="ns:PayServiceSoap11Binding">
|
||||
<soap:address location="https://testsmpay.kcp.co.kr/services/KCPPaymentService"/>
|
||||
</wsdl:port>
|
||||
<wsdl:port name="PayServiceHttpSoap12Endpoint" binding="ns:PayServiceSoap12Binding">
|
||||
<soap12:address location="https://testsmpay.kcp.co.kr/services/KCPPaymentService"/>
|
||||
</wsdl:port>
|
||||
<wsdl:port name="PayServiceHttpEndpoint" binding="ns:PayServiceHttpBinding">
|
||||
<http:address location="https://testsmpay.kcp.co.kr/services/KCPPaymentService"/>
|
||||
</wsdl:port>
|
||||
</wsdl:service>
|
||||
</wsdl:definitions>
|
||||
@@ -0,0 +1,6 @@
|
||||
<?php
|
||||
include_once('../../../common.php');
|
||||
|
||||
if (!defined('G5_USE_SHOP') || !G5_USE_SHOP)
|
||||
die('<p>쇼핑몰 설치 후 이용해 주십시오.</p>');
|
||||
define('_SHOP_', true);
|
||||
@@ -0,0 +1,112 @@
|
||||
var isIE = false;
|
||||
var req01_AJAX;
|
||||
var READY_STATE_UNINITIALIZED = 0;
|
||||
var READY_STATE_LOADING = 1;
|
||||
var READY_STATE_LOADED = 2;
|
||||
var READY_STATE_INTERACTIVE = 3;
|
||||
var READY_STATE_COMPLETE = 4;
|
||||
var PayUrl ="";
|
||||
|
||||
|
||||
function displayElement( targetObj, targetText, targetColor )
|
||||
{
|
||||
if ( targetObj.childNodes.length > 0 )
|
||||
{
|
||||
targetObj.replaceChild( document.createTextNode( targetText ), targetObj.childNodes[ 0 ] );
|
||||
} else
|
||||
{
|
||||
targetObj.appendChild( document.createTextNode( targetText ) );
|
||||
}
|
||||
targetObj.style.color = targetColor;
|
||||
}
|
||||
|
||||
function clearElement( targetObj )
|
||||
{
|
||||
for ( i = ( targetObj.childNodes.length - 1 ); i >= 0; i-- )
|
||||
{
|
||||
targetObj.removeChild( targetObj.childNodes[ i ] );
|
||||
}
|
||||
}
|
||||
|
||||
function initRequest()
|
||||
{
|
||||
if ( window.XMLHttpRequest )
|
||||
{
|
||||
return new XMLHttpRequest();
|
||||
} else if ( window.ActiveXObject )
|
||||
{
|
||||
isIE = true;
|
||||
return new ActiveXObject( "Microsoft.XMLHTTP" );
|
||||
}
|
||||
}
|
||||
|
||||
function sendRequest( url )
|
||||
{
|
||||
req01_AJAX = null;
|
||||
req01_AJAX = initRequest();
|
||||
|
||||
if ( req01_AJAX )
|
||||
{
|
||||
req01_AJAX.onreadystatechange = process_AJAX;
|
||||
req01_AJAX.open( "POST", url, true );
|
||||
req01_AJAX.send( null );
|
||||
}
|
||||
}
|
||||
|
||||
function kcp_AJAX()
|
||||
{
|
||||
var url = "./order_approval.php";
|
||||
var form = document.sm_form;
|
||||
var params = "?site_cd=" + form.site_cd.value
|
||||
+ "&ordr_idxx=" + form.ordr_idxx.value
|
||||
+ "&good_mny=" + form.good_mny.value
|
||||
+ "&pay_method=" + form.pay_method.value
|
||||
+ "&escw_used=" + form.escw_used.value
|
||||
+ "&good_name=" + form.good_name.value
|
||||
+ "&Ret_URL=" + form.Ret_URL.value;
|
||||
sendRequest( url + params );
|
||||
}
|
||||
|
||||
function process_AJAX()
|
||||
{
|
||||
if ( req01_AJAX.readyState == READY_STATE_COMPLETE )
|
||||
{
|
||||
if ( req01_AJAX.status == 200 )
|
||||
{
|
||||
var result = null;
|
||||
|
||||
if ( req01_AJAX.responseText != null )
|
||||
{
|
||||
var txt = req01_AJAX.responseText.split(",");
|
||||
|
||||
if( txt[0].replace(/^\s*/,'').replace(/\s*$/,'') == '0000' )
|
||||
{
|
||||
document.getElementById("approval").value = txt[1].replace(/^\s*/,'').replace(/\s*$/,'');
|
||||
PayUrl = txt[2].replace(/^\s*/,'').replace(/\s*$/,'');
|
||||
//alert("성공적으로 거래가 등록 되었습니다.");
|
||||
call_pay_form();
|
||||
}
|
||||
else
|
||||
{
|
||||
alert("실패 되었습니다.[" + txt[3].replace(/^\s*/,'').replace(/\s*$/,'') + "]");
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
alert( req01_AJAX.responseText );
|
||||
}
|
||||
}
|
||||
else if ( req01_AJAX.readyState == READY_STATE_UNINITIALIZED )
|
||||
{
|
||||
}
|
||||
else if ( req01_AJAX.readyState == READY_STATE_LOADING )
|
||||
{
|
||||
}
|
||||
else if ( req01_AJAX.readyState == READY_STATE_LOADED )
|
||||
{
|
||||
}
|
||||
else if ( req01_AJAX.readyState == READY_STATE_INTERACTIVE )
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,108 @@
|
||||
<?php
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
|
||||
// 타 PG 사용시 NHN KCP 네이버페이 사용이 설정되어 있는지 체크, 그렇지 않다면 return;
|
||||
if( !(function_exists('is_use_easypay') && is_use_easypay('global_nhnkcp')) ){
|
||||
return;
|
||||
}
|
||||
|
||||
$param_opt_1 = isset($_REQUEST['param_opt_1']) ? clean_xss_tags($_REQUEST['param_opt_1'], 1, 1) : '';
|
||||
$param_opt_2 = isset($_REQUEST['param_opt_2']) ? clean_xss_tags($_REQUEST['param_opt_2'], 1, 1) : '';
|
||||
$param_opt_3 = isset($_REQUEST['param_opt_3']) ? clean_xss_tags($_REQUEST['param_opt_3'], 1, 1) : '';
|
||||
?>
|
||||
|
||||
<!-- 거래등록 하는 kcp 서버와 통신을 위한 스크립트-->
|
||||
<script src="<?php echo G5_MSHOP_URL; ?>/kcp/approval_key.js"></script>
|
||||
|
||||
<form name="nhnkcp_pay_form" method="POST" action="<?php echo G5_MSHOP_URL; ?>/kcp/order_approval_form.php">
|
||||
<input type="hidden" name="good_name" value="<?php echo $goods; ?>">
|
||||
<input type="hidden" name="good_mny" value="<?php echo $tot_price ?>" >
|
||||
<input type="hidden" name="buyr_name" value="">
|
||||
<input type="hidden" name="buyr_tel1" value="">
|
||||
<input type="hidden" name="buyr_tel2" value="">
|
||||
<input type="hidden" name="buyr_mail" value="">
|
||||
<input type="hidden" name="settle_method" value="">
|
||||
<input type="hidden" name="nhnkcp_pay_case" value="">
|
||||
<input type="hidden" name="payco_direct" value=""> <!-- PAYCO 결제창 호출 -->
|
||||
<input type="hidden" name="naverpay_direct" value="A" > <!-- NAVERPAY 결제창 호출 -->
|
||||
<?php if(isset($default['de_easy_pay_services']) && in_array('used_nhnkcp_naverpay_point', explode(',', $default['de_easy_pay_services'])) ){ // 네이버페이 포인트 결제 옵션 ?>
|
||||
<input type="hidden" name="naverpay_point_direct" value="Y"> <!-- 네이버페이 포인트 결제를 하려면 naverpay_point_direct 를 Y -->
|
||||
<?php } ?>
|
||||
<input type="hidden" name="kakaopay_direct" value="A" > <!-- KAKAOPAY 결제창 호출 -->
|
||||
<input type="hidden" name="applepay_direct" value="A" > <!-- APPLEPAY 결제창 호출 -->
|
||||
<!-- 주문번호 -->
|
||||
<input type="hidden" name="ordr_idxx" value="<?php echo $od_id; ?>">
|
||||
<!-- 인증수단(영문 소문자) * 반드시 대소문자 구분 -->
|
||||
<input type="hidden" name="ActionResult" value="CARD">
|
||||
<!-- 결제등록 키 -->
|
||||
<input type="hidden" name="approval_key" id="approval">
|
||||
<!-- 수취인이름 -->
|
||||
<input type="hidden" name="rcvr_name" value="">
|
||||
<!-- 수취인 연락처 -->
|
||||
<input type="hidden" name="rcvr_tel1" value="">
|
||||
<!-- 수취인 휴대폰 번호 -->
|
||||
<input type="hidden" name="rcvr_tel2" value="">
|
||||
<!-- 수취인 E-MAIL -->
|
||||
<input type="hidden" name="rcvr_add1" value="">
|
||||
<!-- 수취인 우편번호 -->
|
||||
<input type="hidden" name="rcvr_add2" value="">
|
||||
<!-- 수취인 주소 -->
|
||||
<input type="hidden" name="rcvr_mail" value="">
|
||||
<!-- 수취인 상세 주소 -->
|
||||
<input type="hidden" name="rcvr_zipx" value="">
|
||||
<!-- 장바구니 상품 개수 -->
|
||||
<input type="hidden" name="bask_cntx" value="<?php echo (int)$goods_count + 1; ?>">
|
||||
<!-- 장바구니 정보(상단 스크립트 참조) -->
|
||||
<input type="hidden" name="good_info" value="<?php echo $good_info; ?>">
|
||||
<!-- 배송소요기간 -->
|
||||
<input type="hidden" name="deli_term" value="03">
|
||||
<!-- 기타 파라메터 추가 부분 - Start - -->
|
||||
<input type="hidden" name="param_opt_1" value="<?php echo get_text($param_opt_1); ?>"/>
|
||||
<input type="hidden" name="param_opt_2" value="<?php echo get_text($param_opt_2); ?>"/>
|
||||
<input type="hidden" name="param_opt_3" value="<?php echo get_text($param_opt_3); ?>"/>
|
||||
<input type="hidden" name="disp_tax_yn" value="N">
|
||||
<!-- 기타 파라메터 추가 부분 - End - -->
|
||||
<!-- 화면 크기조정 부분 - Start - -->
|
||||
<input type="hidden" name="tablet_size" value="<?php echo $tablet_size; ?>"/>
|
||||
<!-- 화면 크기조정 부분 - End - -->
|
||||
<!--
|
||||
사용 카드 설정
|
||||
<input type="hidden" name='used_card' value="CClg:ccDI">
|
||||
/* 무이자 옵션
|
||||
※ 설정할부 (가맹점 관리자 페이지에 설정 된 무이자 설정을 따른다) - "" 로 설정
|
||||
※ 일반할부 (KCP 이벤트 이외에 설정 된 모든 무이자 설정을 무시한다) - "N" 로 설정
|
||||
※ 무이자 할부 (가맹점 관리자 페이지에 설정 된 무이자 이벤트 중 원하는 무이자 설정을 세팅한다) - "Y" 로 설정
|
||||
<input type="hidden" name="kcp_noint" value=""/> */
|
||||
|
||||
/* 무이자 설정
|
||||
※ 주의 1 : 할부는 결제금액이 50,000 원 이상일 경우에만 가능
|
||||
※ 주의 2 : 무이자 설정값은 무이자 옵션이 Y일 경우에만 결제 창에 적용
|
||||
예) 전 카드 2,3,6개월 무이자(국민,비씨,엘지,삼성,신한,현대,롯데,외환) : ALL-02:03:04
|
||||
BC 2,3,6개월, 국민 3,6개월, 삼성 6,9개월 무이자 : CCBC-02:03:06,CCKM-03:06,CCSS-03:06:04
|
||||
<input type="hidden" name="kcp_noint_quota" value="CCBC-02:03:06,CCKM-03:06,CCSS-03:06:09"/> */
|
||||
-->
|
||||
<input type="hidden" name="kcp_noint" value="<?php echo ($default['de_card_noint_use'] ? '' : 'N'); ?>">
|
||||
<?php
|
||||
if($default['de_tax_flag_use']) {
|
||||
/* KCP는 과세상품과 비과세상품을 동시에 판매하는 업체들의 결제관리에 대한 편의성을 제공해드리고자,
|
||||
복합과세 전용 사이트코드를 지원해 드리며 총 금액에 대해 복합과세 처리가 가능하도록 제공하고 있습니다
|
||||
|
||||
복합과세 전용 사이트 코드로 계약하신 가맹점에만 해당이 됩니다
|
||||
|
||||
상품별이 아니라 금액으로 구분하여 요청하셔야 합니다
|
||||
|
||||
총결제 금액은 과세금액 + 부과세 + 비과세금액의 합과 같아야 합니다.
|
||||
(good_mny = comm_tax_mny + comm_vat_mny + comm_free_mny)
|
||||
|
||||
복합과세는 order_approval_form.php 파일의 의해 적용됨
|
||||
아래 필드는 order_approval_form.php 파일로 전송하는 것
|
||||
*/
|
||||
?>
|
||||
<input type="hidden" name="tax_flag" value="TG03"> <!-- 변경불가 -->
|
||||
<input type="hidden" name="comm_tax_mny" value="<?php echo $comm_tax_mny; ?>"> <!-- 과세금액 -->
|
||||
<input type="hidden" name="comm_vat_mny" value="<?php echo $comm_vat_mny; ?>"> <!-- 부가세 -->
|
||||
<input type="hidden" name="comm_free_mny" value="<?php echo $comm_free_mny; ?>"> <!-- 비과세 금액 -->
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</form>
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
?>
|
||||
|
||||
<input type="hidden" name="req_tx" value=""> <!-- 요청 구분 -->
|
||||
<input type="hidden" name="res_cd" value=""> <!-- 결과 코드 -->
|
||||
<input type="hidden" name="tran_cd" value=""> <!-- 트랜잭션 코드 -->
|
||||
<input type="hidden" name="ordr_idxx" value=""> <!-- 주문번호 -->
|
||||
<input type="hidden" name="good_mny" value=""> <!-- 결제금액 -->
|
||||
<input type="hidden" name="good_name" value=""> <!-- 상품명 -->
|
||||
<input type="hidden" name="buyr_name" value=""> <!-- 주문자명 -->
|
||||
<input type="hidden" name="buyr_tel1" value=""> <!-- 주문자 전화번호 -->
|
||||
<input type="hidden" name="buyr_tel2" value=""> <!-- 주문자 휴대폰번호 -->
|
||||
<input type="hidden" name="buyr_mail" value=""> <!-- 주문자 E-mail -->
|
||||
<input type="hidden" name="enc_info" value=""> <!-- 암호화 정보 -->
|
||||
<input type="hidden" name="enc_data" value=""> <!-- 암호화 데이터 -->
|
||||
<input type="hidden" name="use_pay_method" value=""> <!-- 요청된 결제 수단 -->
|
||||
<input type="hidden" name="rcvr_name" value=""> <!-- 수취인 이름 -->
|
||||
<input type="hidden" name="rcvr_tel1" value=""> <!-- 수취인 전화번호 -->
|
||||
<input type="hidden" name="rcvr_tel2" value=""> <!-- 수취인 휴대폰번호 -->
|
||||
<input type="hidden" name="rcvr_mail" value=""> <!-- 수취인 E-Mail -->
|
||||
<input type="hidden" name="rcvr_zipx" value=""> <!-- 수취인 우편번호 -->
|
||||
<input type="hidden" name="rcvr_add1" value=""> <!-- 수취인 주소 -->
|
||||
<input type="hidden" name="rcvr_add2" value=""> <!-- 수취인 상세 주소 -->
|
||||
<input type="hidden" name="param_opt_1" value="">
|
||||
<input type="hidden" name="param_opt_2" value="">
|
||||
<input type="hidden" name="param_opt_3" value="">
|
||||
<input type="hidden" name="disp_tax_yn" value="N">
|
||||
<input type="hidden" name="nhnkcp_pay_case" value="">
|
||||
<?php if($default['de_tax_flag_use']) { ?>
|
||||
<input type="hidden" name="tax_flag" value="TG03"> <!-- 변경불가 -->
|
||||
<input type="hidden" name="comm_tax_mny" value="<?php echo $comm_tax_mny; ?>"> <!-- 과세금액 -->
|
||||
<input type="hidden" name="comm_vat_mny" value="<?php echo $comm_vat_mny; ?>"> <!-- 부가세 -->
|
||||
<input type="hidden" name="comm_free_mny" value="<?php echo $comm_free_mny; ?>"> <!-- 비과세 금액 -->
|
||||
<?php }
|
||||
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
|
||||
// 타 PG 사용시 NHN KCP 네이버페이 사용이 설정되어 있는지 체크, 그렇지 않다면 return;
|
||||
if( !(function_exists('is_use_easypay') && is_use_easypay('global_nhnkcp')) ){
|
||||
return;
|
||||
}
|
||||
|
||||
include_once(G5_MSHOP_PATH.'/settle_kcp.inc.php');
|
||||
@@ -0,0 +1,83 @@
|
||||
<?php
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
|
||||
// 타 PG 사용시 NHN KCP 네이버페이 사용이 설정되어 있는지 체크, 그렇지 않다면 return;
|
||||
if( !(function_exists('is_use_easypay') && is_use_easypay('global_nhnkcp')) ){
|
||||
return;
|
||||
}
|
||||
?>
|
||||
<script>
|
||||
jQuery(function($){
|
||||
$( document ).ready(function() {
|
||||
var pf = document.forderform;
|
||||
|
||||
// NHN_KCP를 통한 네이버페이가 실행됨
|
||||
$(pf).on("form_sumbit_order_nhnkcp_naverpay", nhnkcp_naverpay_form_submit);
|
||||
|
||||
function nhnkcp_naverpay_form_submit(){
|
||||
var $form = $(this),
|
||||
pf = $form[0],
|
||||
nhnkcp_pay_form = document.nhnkcp_pay_form,
|
||||
nhnkcp_settle_case = jQuery("input[name='od_settle_case']:checked").attr("data-pay"),
|
||||
od_settle_case = jQuery("input[name='od_settle_case']:checked").val();
|
||||
|
||||
if( nhnkcp_settle_case == "naverpay" ){
|
||||
if(typeof nhnkcp_pay_form.naverpay_direct !== "undefined") nhnkcp_pay_form.naverpay_direct.value = "Y";
|
||||
}
|
||||
|
||||
if( ! jQuery("form[name='sm_form']").length ){
|
||||
alert("해당 폼이 존재 하지 않는 결제오류입니다.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (document.sm_form.good_mny.value < 1000) {
|
||||
<?php // 간편결제수단은 신용카드처럼 취급하며 금액은 1000원 이상이므로, 1000원 이상이 아니면 PG사에서 승인하지 않는다. ?>
|
||||
alert("간편결제는 1000원 이상 결제가 가능합니다.");
|
||||
return false;
|
||||
}
|
||||
|
||||
nhnkcp_pay_form.good_mny.value = document.sm_form.good_mny.value;
|
||||
nhnkcp_pay_form.good_info.value = "<?php echo $good_info; ?>";
|
||||
nhnkcp_pay_form.settle_method.value = od_settle_case;
|
||||
nhnkcp_pay_form.nhnkcp_pay_case.value = nhnkcp_settle_case;
|
||||
|
||||
if(typeof pf.nhnkcp_pay_case !== "undefined") pf.nhnkcp_pay_case.value = nhnkcp_settle_case;
|
||||
|
||||
nhnkcp_pay_form.buyr_name.value = pf.od_name.value;
|
||||
nhnkcp_pay_form.buyr_mail.value = pf.od_email.value;
|
||||
nhnkcp_pay_form.buyr_tel1.value = pf.od_tel.value;
|
||||
nhnkcp_pay_form.buyr_tel2.value = pf.od_hp.value;
|
||||
nhnkcp_pay_form.rcvr_name.value = pf.od_b_name.value;
|
||||
nhnkcp_pay_form.rcvr_tel1.value = pf.od_b_tel.value;
|
||||
nhnkcp_pay_form.rcvr_tel2.value = pf.od_b_hp.value;
|
||||
nhnkcp_pay_form.rcvr_mail.value = pf.od_email.value;
|
||||
nhnkcp_pay_form.rcvr_zipx.value = pf.od_b_zip.value;
|
||||
nhnkcp_pay_form.rcvr_add1.value = pf.od_b_addr1.value;
|
||||
nhnkcp_pay_form.rcvr_add2.value = pf.od_b_addr2.value;
|
||||
|
||||
// 주문 정보 임시저장
|
||||
var order_data = $(pf).serialize();
|
||||
var save_result = "";
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
data: order_data,
|
||||
url: g5_url+"/shop/ajax.orderdatasave.php",
|
||||
cache: false,
|
||||
async: false,
|
||||
success: function(data) {
|
||||
save_result = data;
|
||||
}
|
||||
});
|
||||
|
||||
if(save_result) {
|
||||
alert(save_result);
|
||||
return false;
|
||||
}
|
||||
|
||||
nhnkcp_pay_form.submit();
|
||||
|
||||
return false;
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@@ -0,0 +1,53 @@
|
||||
<?php
|
||||
include_once('./_common.php');
|
||||
|
||||
include_once(G5_MSHOP_PATH.'/settle_kcp.inc.php');
|
||||
require_once(G5_MSHOP_PATH.'/kcp/KCPComLibrary.php'); // library [수정불가]
|
||||
|
||||
?>
|
||||
<?php
|
||||
// 쇼핑몰 페이지에 맞는 문자셋을 지정해 주세요.
|
||||
$charSetType = 'utf-8'; // UTF-8인 경우 "utf-8"로 설정
|
||||
|
||||
$siteCode = $_GET[ 'site_cd' ];
|
||||
$orderID = $_GET[ 'ordr_idxx' ];
|
||||
$paymentMethod = $_GET[ 'pay_method' ];
|
||||
$escrow = ( $_GET[ 'escw_used' ] == 'Y' ) ? true : false;
|
||||
$productName = $_GET[ 'good_name' ];
|
||||
|
||||
// 아래 두값은 POST된 값을 사용하지 않고 서버에 SESSION에 저장된 값을 사용하여야 함.
|
||||
$paymentAmount = $_GET[ 'good_mny' ]; // 결제 금액
|
||||
$returnUrl = $_GET[ 'Ret_URL' ];
|
||||
|
||||
// Access Credential 설정
|
||||
$accessLicense = '';
|
||||
$signature = '';
|
||||
$timestamp = '';
|
||||
|
||||
// Base Request Type 설정
|
||||
$detailLevel = '0';
|
||||
$requestApp = 'WEB';
|
||||
$requestID = $orderID;
|
||||
$userAgent = $_SERVER['HTTP_USER_AGENT'];
|
||||
$version = '0.1';
|
||||
|
||||
try
|
||||
{
|
||||
$payService = new PayService( $g_wsdl );
|
||||
|
||||
$payService->setCharSet( $charSetType );
|
||||
|
||||
$payService->setAccessCredentialType( $accessLicense, $signature, $timestamp );
|
||||
$payService->setBaseRequestType( $detailLevel, $requestApp, $requestID, $userAgent, $version );
|
||||
$payService->setApproveReq( $escrow, $orderID, $paymentAmount, $paymentMethod, $productName, $returnUrl, $siteCode );
|
||||
|
||||
$approveRes = $payService->approve();
|
||||
|
||||
printf( "%s,%s,%s,%s", $payService->resCD, $approveRes->approvalKey,
|
||||
$approveRes->payUrl, $payService->resMsg );
|
||||
|
||||
}
|
||||
catch (SoapFault $ex )
|
||||
{
|
||||
printf( "%s,%s,%s,%s", "95XX", "", "", "연동 오류 (PHP SOAP 모듈 설치 필요)" );
|
||||
}
|
||||
@@ -0,0 +1,413 @@
|
||||
<?php
|
||||
include_once('./_common.php');
|
||||
|
||||
@header('Cache-Control: no-cache, no-store, must-revalidate'); // HTTP 1.1.
|
||||
@header('Pragma: no-cache'); // HTTP 1.0.
|
||||
@header('Expires: 0'); // Proxies.
|
||||
|
||||
/* ============================================================================== */
|
||||
/* = PAGE : 결제 요청 PAGE = */
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
/* = 이 페이지는 주문 페이지를 통해서 결제자가 결제 요청을 하는 페이지 = */
|
||||
/* = 입니다. 아래의 ※ 필수, ※ 옵션 부분과 매뉴얼을 참조하셔서 연동을 = */
|
||||
/* = 진행하여 주시기 바랍니다. = */
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
/* = 연동시 오류가 발생하는 경우 아래의 주소로 접속하셔서 확인하시기 바랍니다.= */
|
||||
/* = 접속 주소 : http://testpay.kcp.co.kr/pgsample/FAQ/search_error.jsp = */
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
/* = Copyright (c) 2010.05 KCP Inc. All Rights Reserved. = */
|
||||
/* ============================================================================== */
|
||||
|
||||
/* ============================================================================== */
|
||||
/* = 환경 설정 파일 Include = */
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
/* = ※ 필수 = */
|
||||
/* = 테스트 및 실결제 연동시 site_conf_inc.php파일을 수정하시기 바랍니다. = */
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
|
||||
include_once(G5_MSHOP_PATH.'/settle_kcp.inc.php'); // 환경설정 파일 include
|
||||
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
/* = 환경 설정 파일 Include END = */
|
||||
/* ============================================================================== */
|
||||
|
||||
/* kcp와 통신후 kcp 서버에서 전송되는 결제 요청 정보*/
|
||||
$req_tx = isset($_POST["req_tx"]) ? $_POST["req_tx"] : ''; // 요청 종류
|
||||
$res_cd = isset($_POST["res_cd"]) ? $_POST["res_cd"] : ''; // 응답 코드
|
||||
$tran_cd = isset($_POST["tran_cd"]) ? $_POST["tran_cd"] : ''; // 트랜잭션 코드
|
||||
$ordr_idxx = isset($_POST["ordr_idxx"]) ? $_POST["ordr_idxx"] : ''; // 쇼핑몰 주문번호
|
||||
$good_name = isset($_POST["good_name"]) ? $_POST["good_name"] : ''; // 상품명
|
||||
$good_mny = isset($_POST["good_mny"]) ? $_POST["good_mny"] : ''; // 결제 총금액
|
||||
$buyr_name = isset($_POST["buyr_name"]) ? $_POST["buyr_name"] : ''; // 주문자명
|
||||
$buyr_tel1 = isset($_POST["buyr_tel1"]) ? $_POST["buyr_tel1"] : ''; // 주문자 전화번호
|
||||
$buyr_tel2 = isset($_POST["buyr_tel2"]) ? $_POST["buyr_tel2"] : ''; // 주문자 핸드폰 번호
|
||||
$buyr_mail = isset($_POST["buyr_mail"]) ? $_POST["buyr_mail"] : ''; // 주문자 E-mail 주소
|
||||
$use_pay_method = isset($_POST["use_pay_method"]) ? $_POST["use_pay_method"] : ''; // 결제 방법
|
||||
$enc_info = isset($_POST["enc_info"]) ? $_POST["enc_info"] : ''; // 암호화 정보
|
||||
$enc_data = isset($_POST["enc_data"]) ? $_POST["enc_data"] : ''; // 암호화 데이터
|
||||
$rcvr_name = isset($_POST["rcvr_name"]) ? $_POST["rcvr_name"] : ''; // 수취인 이름
|
||||
$rcvr_tel1 = isset($_POST["rcvr_tel1"]) ? $_POST["rcvr_tel1"] : ''; // 수취인 전화번호
|
||||
$rcvr_tel2 = isset($_POST["rcvr_tel2"]) ? $_POST["rcvr_tel2"] : ''; // 수취인 휴대폰번호
|
||||
$rcvr_mail = isset($_POST["rcvr_mail"]) ? $_POST["rcvr_mail"] : ''; // 수취인 E-Mail
|
||||
$rcvr_zipx = isset($_POST["rcvr_zipx"]) ? $_POST["rcvr_zipx"] : ''; // 수취인 우편번호
|
||||
$rcvr_add1 = isset($_POST["rcvr_add1"]) ? $_POST["rcvr_add1"] : ''; // 수취인 주소
|
||||
$rcvr_add2 = isset($_POST["rcvr_add2"]) ? $_POST["rcvr_add2"] : ''; // 수취인 상세주소
|
||||
|
||||
/* 주문폼에서 전송되는 정보 */
|
||||
$ipgm_date = isset($_POST['ipgm_date']) ? $_POST['ipgm_date'] : ''; // 입금마감일
|
||||
$settle_method = isset($_POST["settle_method"]) ? $_POST["settle_method"] : ''; // 결제방법
|
||||
$good_info = isset($_POST["good_info"]) ? $_POST["good_info"] : ''; // 에스크로 상품정보
|
||||
$bask_cntx = isset($_POST["bask_cntx"]) ? $_POST["bask_cntx"] : ''; // 장바구니 상품수
|
||||
$tablet_size = isset($_POST["tablet_size"]) ? $_POST["tablet_size"] : ''; // 모바일기기 화면비율
|
||||
|
||||
$comm_tax_mny = isset($_POST["comm_tax_mny"]) ? $_POST["comm_tax_mny"] : ''; // 과세금액
|
||||
$comm_vat_mny = isset($_POST["comm_vat_mny"]) ? $_POST["comm_vat_mny"] : ''; // 부가세
|
||||
$comm_free_mny = isset($_POST["comm_free_mny"]) ? $_POST["comm_free_mny"] : ''; // 비과세금액
|
||||
|
||||
$payco_direct = isset($_POST["payco_direct"]) ? $_POST["payco_direct"] : ''; // PAYCO 결제창 호출
|
||||
$naverpay_direct = isset($_POST["naverpay_direct"]) ? $_POST["naverpay_direct"] : ''; // NAVERPAY 결제창 호출
|
||||
$kakaopay_direct = isset($_POST["kakaopay_direct"]) ? $_POST["kakaopay_direct"] : ''; // KAKAOPAY 결제창 호출
|
||||
$applepay_direct = isset($_POST["applepay_direct"]) ? $_POST["applepay_direct"] : ''; // APPLEPAY 결제창 호출
|
||||
|
||||
/*
|
||||
* 기타 파라메터 추가 부분 - Start -
|
||||
*/
|
||||
$param_opt_1 = isset($_POST["param_opt_1"]) ? $_POST["param_opt_1"] : ''; // 기타 파라메터 추가 부분
|
||||
$param_opt_2 = isset($_POST["param_opt_2"]) ? $_POST["param_opt_2"] : ''; // 기타 파라메터 추가 부분
|
||||
$param_opt_3 = isset($_POST["param_opt_3"]) ? $_POST["param_opt_3"] : ''; // 기타 파라메터 추가 부분
|
||||
/*
|
||||
* 기타 파라메터 추가 부분 - End -
|
||||
*/
|
||||
|
||||
/* kcp 데이터 캐릭터셋 변환 */
|
||||
if($res_cd != '') {
|
||||
$good_name = iconv('euc-kr', 'utf-8', $good_name);
|
||||
$buyr_name = iconv('euc-kr', 'utf-8', $buyr_name);
|
||||
$rcvr_name = iconv('euc-kr', 'utf-8', $rcvr_name);
|
||||
$rcvr_add1 = iconv('euc-kr', 'utf-8', $rcvr_add1);
|
||||
$rcvr_add2 = iconv('euc-kr', 'utf-8', $rcvr_add2);
|
||||
}
|
||||
|
||||
// 에스크로 변수 ( 간편결제의 경우 N 으로 변경 )
|
||||
$escw_used = 'Y';
|
||||
|
||||
switch($settle_method)
|
||||
{
|
||||
case '신용카드':
|
||||
$pay_method = 'CARD';
|
||||
$ActionResult = 'card';
|
||||
break;
|
||||
case '계좌이체':
|
||||
$pay_method = 'BANK';
|
||||
$ActionResult = 'acnt';
|
||||
break;
|
||||
case '휴대폰':
|
||||
$pay_method = 'MOBX';
|
||||
$ActionResult = 'mobx';
|
||||
break;
|
||||
case '가상계좌':
|
||||
$pay_method = 'VCNT';
|
||||
$ActionResult = 'vcnt';
|
||||
break;
|
||||
case '간편결제':
|
||||
$pay_method = 'CARD';
|
||||
$ActionResult = 'card';
|
||||
$escw_used = 'N';
|
||||
break;
|
||||
default:
|
||||
$pay_method = '';
|
||||
$ActionResult = '';
|
||||
break;
|
||||
}
|
||||
|
||||
if(get_session('ss_personalpay_id') && get_session('ss_personalpay_hash')) {
|
||||
$js_return_url = G5_SHOP_URL.'/personalpayform.php?pp_id='.get_session('ss_personalpay_id');
|
||||
} else {
|
||||
$js_return_url = G5_SHOP_URL.'/orderform.php';
|
||||
if(get_session('ss_direct'))
|
||||
$js_return_url .= '?sw_direct=1';
|
||||
}
|
||||
?>
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="ko" xml:lang="ko">
|
||||
<head>
|
||||
<title>스마트폰 웹 결제창</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta http-equiv="Cache-Control" content="No-Cache">
|
||||
<meta http-equiv="Pragma" content="No-Cache">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=0,maximum-scale=10">
|
||||
<meta name="HandheldFriendly" content="true">
|
||||
<meta name="format-detection" content="telephone=no">
|
||||
|
||||
<style type="text/css">
|
||||
.LINE { background-color:#afc3ff }
|
||||
.HEAD { font-family:"굴림","굴림체"; font-size:9pt; color:#065491; background-color:#eff5ff; text-align:left; padding:3px; }
|
||||
.TEXT { font-family:"굴림","굴림체"; font-size:9pt; color:#000000; background-color:#FFFFFF; text-align:left; padding:3px; }
|
||||
B { font-family:"굴림","굴림체"; font-size:13pt; color:#065491;}
|
||||
INPUT { font-family:"굴림","굴림체"; font-size:9pt; }
|
||||
SELECT{font-size:9pt;}
|
||||
.COMMENT { font-family:"굴림","굴림체"; font-size:9pt; line-height:160% }
|
||||
</style>
|
||||
<!-- 거래등록 하는 kcp 서버와 통신을 위한 스크립트-->
|
||||
<script src="<?php echo G5_MSHOP_URL; ?>/kcp/approval_key.js"></script>
|
||||
|
||||
|
||||
<script language="javascript">
|
||||
/* kcp web 결제창 호출 (변경불가)*/
|
||||
function call_pay_form()
|
||||
{
|
||||
|
||||
var v_frm = document.sm_form;
|
||||
|
||||
layer_cont_obj = document.getElementById("content");
|
||||
layer_receipt_obj = document.getElementById("layer_receipt");
|
||||
|
||||
layer_cont_obj.style.display = "none";
|
||||
layer_receipt_obj.style.display = "block";
|
||||
|
||||
v_frm.target = "frm_receipt";
|
||||
|
||||
// IOS 환경의 경우 iframe에서 네이버페이와 애플페이의 cors 문제가 일어나므로 iframe으로 열지 않는다.
|
||||
var isIOS = /iPad|iPhone|iPod/.test(navigator.platform) || (navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1);
|
||||
|
||||
if (isIOS) {
|
||||
v_frm.target = "";
|
||||
}
|
||||
|
||||
// 네이버페이 또는 애플페이의 경우 반드시 페이지전환 방식이어야 하며, 그 외에는 iframe 방식으로 한다.
|
||||
if((typeof v_frm.naverpay_direct !== "undefined" && v_frm.naverpay_direct.value == "Y") || (typeof v_frm.applepay_direct !== "undefined" && v_frm.applepay_direct.value == "Y")) {
|
||||
v_frm.target = "";
|
||||
}
|
||||
|
||||
v_frm.action = PayUrl;
|
||||
|
||||
if(v_frm.Ret_URL.value == "")
|
||||
{
|
||||
/* Ret_URL값은 현 페이지의 URL 입니다. */
|
||||
alert("연동시 Ret_URL을 반드시 설정하셔야 됩니다.");
|
||||
document.location.href = "<?php echo $js_return_url; ?>";
|
||||
return false;
|
||||
}
|
||||
|
||||
v_frm.submit();
|
||||
}
|
||||
|
||||
|
||||
/* kcp 통신을 통해 받은 암호화 정보 체크 후 결제 요청*/
|
||||
function chk_pay()
|
||||
{
|
||||
/*kcp 결제서버에서 가맹점 주문페이지로 폼값을 보내기위한 설정(변경불가)*/
|
||||
self.name = "tar_opener";
|
||||
|
||||
var sm_form = document.sm_form;
|
||||
|
||||
if (sm_form.res_cd.value == "3001" )
|
||||
{
|
||||
alert("사용자가 취소하였습니다.");
|
||||
document.location.href = "<?php echo $js_return_url; ?>";
|
||||
return false;
|
||||
}
|
||||
else if (sm_form.res_cd.value == "3000" )
|
||||
{
|
||||
alert("30만원 이상 결제 할수 없습니다.");
|
||||
document.location.href = "<?php echo $js_return_url; ?>";
|
||||
return false;
|
||||
}
|
||||
|
||||
if (sm_form.enc_data.value != "" && sm_form.enc_info.value != "" && sm_form.tran_cd.value !="" )
|
||||
{
|
||||
document.getElementById("pay_fail").style.display = "none";
|
||||
document.getElementById("show_progress").style.display = "block";
|
||||
setTimeout( function() {
|
||||
document.forderform.submit();
|
||||
}, 300);
|
||||
} else {
|
||||
kcp_AJAX();
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body onload="chk_pay();">
|
||||
|
||||
<div id="content">
|
||||
|
||||
<?php
|
||||
if($enc_data != '' && $enc_info != '' && $tran_cd != '') {
|
||||
// 제외할 필드
|
||||
$exclude = array('req_tx', 'res_cd', 'tran_cd', 'ordr_idxx', 'good_mny', 'good_name', 'buyr_name', 'buyr_tel1', 'buyr_tel2', 'buyr_mail', 'enc_info', 'enc_data', 'use_pay_method', 'rcvr_name', 'rcvr_tel1', 'rcvr_tel2', 'rcvr_mail', 'rcvr_zipx', 'rcvr_add1', 'rcvr_add2', 'param_opt_1', 'param_opt_2', 'param_opt_3');
|
||||
|
||||
$sql = " select * from {$g5['g5_shop_order_data_table']} where od_id = '$ordr_idxx' ";
|
||||
$row = sql_fetch($sql);
|
||||
|
||||
$data = isset($row['dt_data']) ? unserialize(base64_decode($row['dt_data'])) : array();
|
||||
|
||||
if(isset($data['pp_id']) && $data['pp_id']) {
|
||||
$order_action_url = G5_HTTPS_MSHOP_URL.'/personalpayformupdate.php';
|
||||
} else {
|
||||
$order_action_url = G5_HTTPS_MSHOP_URL.'/orderformupdate.php';
|
||||
}
|
||||
|
||||
echo '<form name="forderform" method="post" action="'.$order_action_url.'" autocomplete="off">'.PHP_EOL;
|
||||
|
||||
echo make_order_field($data, $exclude);
|
||||
|
||||
foreach($_POST as $key=>$value) {
|
||||
echo '<input type="hidden" name="'.$key.'" value="'.$value.'">'.PHP_EOL;
|
||||
}
|
||||
|
||||
echo '</form>'.PHP_EOL;
|
||||
}
|
||||
?>
|
||||
|
||||
<form name="sm_form" method="POST" accept-charset="euc-kr">
|
||||
|
||||
<input type="hidden" name="good_name" value="<?php echo $good_name; ?>">
|
||||
<input type="hidden" name="good_mny" value="<?php echo $good_mny; ?>" >
|
||||
<input type="hidden" name='buyr_name' value="<?php echo $buyr_name; ?>">
|
||||
<input type="hidden" name="buyr_tel1" value="<?php echo $buyr_tel1; ?>">
|
||||
<input type="hidden" name="buyr_tel2" value="<?php echo $buyr_tel2; ?>">
|
||||
<input type="hidden" name="buyr_mail" value="<?php echo $buyr_mail; ?>">
|
||||
<?php
|
||||
// 가상계좌 입금 마감일을 설정하려면 아래 주석을 풀어서 사용해 주세요.
|
||||
//$ipgm_date = date("Ymd", (G5_SERVER_TIME + 86400 * 5));
|
||||
//echo '<input type="hidden" name="ipgm_date" value="'.$ipgm_date.'">';
|
||||
?>
|
||||
|
||||
<?php if($payco_direct){ ?>
|
||||
<input type="hidden" name="payco_direct" value="<?php echo get_text($payco_direct); ?>"> <!-- PAYCO 결제창 호출 -->
|
||||
<?php } ?>
|
||||
<?php if($naverpay_direct){ ?>
|
||||
<input type="hidden" name="naverpay_direct" value="<?php echo get_text($naverpay_direct); ?>"> <!-- 네이버페이 결제창 호출 -->
|
||||
<?php if(isset($default['de_easy_pay_services']) && in_array('used_nhnkcp_naverpay_point', explode(',', $default['de_easy_pay_services'])) ){ // 네이버페이 포인트 결제 옵션 ?>
|
||||
<input type="hidden" name="naverpay_point_direct" value="Y"> <!-- 네이버페이 포인트 결제를 하려면 naverpay_point_direct 를 Y -->
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
<?php if($applepay_direct === "Y"){ ?>
|
||||
<input type="hidden" name="applepay_direct" value="<?php echo get_text($applepay_direct); ?>"> <!-- 애플페이 결제창 호출 -->
|
||||
<?php } ?>
|
||||
<?php if($kakaopay_direct){ ?>
|
||||
<input type="hidden" name="kakaopay_direct" value="<?php echo get_text($kakaopay_direct); ?>"> <!-- 카카오페이 결제창 호출 -->
|
||||
<?php } ?>
|
||||
<!-- 필수 사항 -->
|
||||
|
||||
<!-- 요청 구분 -->
|
||||
<input type="hidden" name="req_tx" value="pay">
|
||||
<!-- 사이트 코드 -->
|
||||
<input type="hidden" name="site_cd" value="<?php echo $g_conf_site_cd; ?>">
|
||||
<!-- 사이트 이름 -->
|
||||
<input type="hidden" name="shop_name" value="<?php echo $g_conf_site_name; ?>">
|
||||
<!-- 결제수단-->
|
||||
<input type="hidden" name="pay_method" value="<?php echo $pay_method; ?>">
|
||||
<!-- 주문번호 -->
|
||||
<input type="hidden" name="ordr_idxx" value="<?php echo $ordr_idxx; ?>">
|
||||
<!-- 최대 할부개월수 -->
|
||||
<input type="hidden" name="quotaopt" value="12">
|
||||
<!-- 통화 코드 -->
|
||||
<input type="hidden" name="currency" value="410">
|
||||
<!-- 결제등록 키 -->
|
||||
<input type="hidden" name="approval_key" id="approval">
|
||||
<!-- 리턴 URL (kcp와 통신후 결제를 요청할 수 있는 암호화 데이터를 전송 받을 가맹점의 주문페이지 URL) -->
|
||||
<!-- 반드시 가맹점 주문페이지의 URL을 입력 해주시기 바랍니다. -->
|
||||
<input type="hidden" name="Ret_URL" value="<?php echo G5_MSHOP_URL; ?>/kcp/order_approval_form.php">
|
||||
<!-- 인증시 필요한 파라미터(변경불가)-->
|
||||
<input type="hidden" name="ActionResult" value="<?php echo $ActionResult; ?>">
|
||||
<!-- 에스크로 사용유무 에스크로 사용 업체(가상계좌만 해당)는 Y로 세팅 해주시기 바랍니다.-->
|
||||
<input type="hidden" name="escw_used" value="<?php echo $escw_used; ?>">
|
||||
<!-- 에스크로 결제처리모드 -->
|
||||
<input type="hidden" name="pay_mod" value="<?php echo ($default['de_escrow_use']?'O':'N'); ?>">
|
||||
<!-- 수취인이름 -->
|
||||
<input type="hidden" name="rcvr_name" value="<?php echo $rcvr_name; ?>">
|
||||
<!-- 수취인 연락처 -->
|
||||
<input type="hidden" name="rcvr_tel1" value="<?php echo $rcvr_tel1; ?>">
|
||||
<!-- 수취인 휴대폰 번호 -->
|
||||
<input type="hidden" name="rcvr_tel2" value="<?php echo $rcvr_tel2; ?>">
|
||||
<!-- 수취인 E-MAIL -->
|
||||
<input type="hidden" name="rcvr_add1" value="<?php echo $rcvr_add1; ?>">
|
||||
<!-- 수취인 우편번호 -->
|
||||
<input type="hidden" name="rcvr_add2" value="<?php echo $rcvr_add2; ?>">
|
||||
<!-- 수취인 주소 -->
|
||||
<input type="hidden" name="rcvr_mail" value="<?php echo $rcvr_mail; ?>">
|
||||
<!-- 수취인 상세 주소 -->
|
||||
<input type="hidden" name="rcvr_zipx" value="<?php echo $rcvr_zipx; ?>">
|
||||
<!-- 장바구니 상품 개수 -->
|
||||
<input type="hidden" name="bask_cntx" value="<?php echo $bask_cntx; ?>">
|
||||
<!-- 장바구니 정보(상단 스크립트 참조) -->
|
||||
<input type="hidden" name="good_info" value="<?php echo $good_info; ?>">
|
||||
<!-- 배송소요기간 -->
|
||||
<input type="hidden" name="deli_term" value="03">
|
||||
<!-- 기타 파라메터 추가 부분 - Start - -->
|
||||
<input type="hidden" name="param_opt_1" value="<?php echo get_text($param_opt_1); ?>"/>
|
||||
<input type="hidden" name="param_opt_2" value="<?php echo get_text($param_opt_2); ?>"/>
|
||||
<input type="hidden" name="param_opt_3" value="<?php echo get_text($param_opt_3); ?>"/>
|
||||
<input type="hidden" name="disp_tax_yn" value="N">
|
||||
<!-- 기타 파라메터 추가 부분 - End - -->
|
||||
<!-- 화면 크기조정 부분 - Start - -->
|
||||
<input type="hidden" name="tablet_size" value="<?php echo $tablet_size; ?>"/>
|
||||
<!-- 화면 크기조정 부분 - End - -->
|
||||
<!--
|
||||
사용 카드 설정
|
||||
<input type="hidden" name="used_card" value="CClg:ccDI">
|
||||
/* 무이자 옵션
|
||||
※ 설정할부 (가맹점 관리자 페이지에 설정 된 무이자 설정을 따른다) - "" 로 설정
|
||||
※ 일반할부 (KCP 이벤트 이외에 설정 된 모든 무이자 설정을 무시한다) - "N" 로 설정
|
||||
※ 무이자 할부 (가맹점 관리자 페이지에 설정 된 무이자 이벤트 중 원하는 무이자 설정을 세팅한다) - "Y" 로 설정
|
||||
<input type="hidden" name="kcp_noint" value=""/> */
|
||||
|
||||
/* 무이자 설정
|
||||
※ 주의 1 : 할부는 결제금액이 50,000 원 이상일 경우에만 가능
|
||||
※ 주의 2 : 무이자 설정값은 무이자 옵션이 Y일 경우에만 결제 창에 적용
|
||||
예) 전 카드 2,3,6개월 무이자(국민,비씨,엘지,삼성,신한,현대,롯데,외환) : ALL-02:03:04
|
||||
BC 2,3,6개월, 국민 3,6개월, 삼성 6,9개월 무이자 : CCBC-02:03:06,CCKM-03:06,CCSS-03:06:04
|
||||
<input type="hidden" name="kcp_noint_quota" value="CCBC-02:03:06,CCKM-03:06,CCSS-03:06:09"/> */
|
||||
-->
|
||||
<input type="hidden" name="kcp_noint" value="<?php echo ($default['de_card_noint_use'] ? '' : 'N'); ?>">
|
||||
|
||||
<?php
|
||||
if($default['de_tax_flag_use']) {
|
||||
/* KCP는 과세상품과 비과세상품을 동시에 판매하는 업체들의 결제관리에 대한 편의성을 제공해드리고자,
|
||||
복합과세 전용 사이트코드를 지원해 드리며 총 금액에 대해 복합과세 처리가 가능하도록 제공하고 있습니다
|
||||
|
||||
복합과세 전용 사이트 코드로 계약하신 가맹점에만 해당이 됩니다
|
||||
|
||||
상품별이 아니라 금액으로 구분하여 요청하셔야 합니다
|
||||
|
||||
총결제 금액은 과세금액 + 부과세 + 비과세금액의 합과 같아야 합니다.
|
||||
(good_mny = comm_tax_mny + comm_vat_mny + comm_free_mny) */
|
||||
?>
|
||||
<input type="hidden" name="tax_flag" value="TG03"> <!-- 변경불가 -->
|
||||
<input type="hidden" name="comm_tax_mny" value="<?php echo $comm_tax_mny; ?>"> <!-- 과세금액 -->
|
||||
<input type="hidden" name="comm_vat_mny" value="<?php echo $comm_vat_mny; ?>"> <!-- 부가세 -->
|
||||
<input type="hidden" name="comm_free_mny" value="<?php echo $comm_free_mny; ?>"> <!-- 비과세 금액 -->
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
<input type="hidden" name="res_cd" value="<?php echo $res_cd; ?>"> <!-- 결과 코드 -->
|
||||
<input type="hidden" name="tran_cd" value="<?php echo $tran_cd; ?>"> <!-- 트랜잭션 코드 -->
|
||||
<input type="hidden" name="enc_info" value="<?php echo $enc_info; ?>"> <!-- 암호화 정보 -->
|
||||
<input type="hidden" name="enc_data" value="<?php echo $enc_data; ?>"> <!-- 암호화 데이터 -->
|
||||
</form>
|
||||
|
||||
<div id="pay_fail">
|
||||
<p>결제가 실패한 경우 아래 돌아가기 버튼을 클릭해주세요.</p>
|
||||
<a href="<?php echo $js_return_url; ?>">돌아가기</a>
|
||||
</div>
|
||||
<div id="show_progress" style="display:none;">
|
||||
<span style="display:block; text-align:center;margin-top:120px"><img src="<?php echo G5_MOBILE_URL; ?>/shop/img/loading.gif" alt="" ></span>
|
||||
<span style="display:block; text-align:center;margin-top:10px; font-size:14px">주문완료 중입니다. 잠시만 기다려 주십시오.</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 스마트폰에서 KCP 결제창을 레이어 형태로 구현-->
|
||||
<div id="layer_receipt" style="position:absolute; left:1px; top:1px; width:100%;height:100%; z-index:1; display:none;">
|
||||
<table width="100%" height="100%" border="-" cellspacing="0" cellpadding="0" style="text-align:center">
|
||||
<tr height="100%" width="100%">
|
||||
<td>
|
||||
<iframe name="frm_receipt" frameborder="0" border="0" width="100%" height="100%" scrolling="auto"></iframe>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,103 @@
|
||||
<?php
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
|
||||
// 무통장 입금만 사용할 때는 아래 코드 실행되지 않음 ( 카카오페이 또는 삼성페이도 사용 안하면 )
|
||||
if(!($default['de_iche_use'] || $default['de_vbank_use'] || $default['de_hp_use'] || $default['de_card_use'] || $default['de_samsung_pay_use'] || $is_kakaopay_use ))
|
||||
return;
|
||||
|
||||
$param_opt_1 = isset($_REQUEST['param_opt_1']) ? clean_xss_tags($_REQUEST['param_opt_1'], 1, 1) : '';
|
||||
$param_opt_2 = isset($_REQUEST['param_opt_2']) ? clean_xss_tags($_REQUEST['param_opt_2'], 1, 1) : '';
|
||||
$param_opt_3 = isset($_REQUEST['param_opt_3']) ? clean_xss_tags($_REQUEST['param_opt_3'], 1, 1) : '';
|
||||
?>
|
||||
|
||||
<!-- 거래등록 하는 kcp 서버와 통신을 위한 스크립트-->
|
||||
<script src="<?php echo G5_MSHOP_URL; ?>/kcp/approval_key.js"></script>
|
||||
|
||||
<form name="sm_form" method="POST" action="<?php echo G5_MSHOP_URL; ?>/kcp/order_approval_form.php">
|
||||
<input type="hidden" name="good_name" value="<?php echo $goods; ?>">
|
||||
<input type="hidden" name="good_mny" value="<?php echo $tot_price ?>" >
|
||||
<input type="hidden" name="buyr_name" value="">
|
||||
<input type="hidden" name="buyr_tel1" value="">
|
||||
<input type="hidden" name="buyr_tel2" value="">
|
||||
<input type="hidden" name="buyr_mail" value="">
|
||||
<input type="hidden" name="settle_method" value="">
|
||||
<input type="hidden" name="payco_direct" value=""> <!-- PAYCO 결제창 호출 -->
|
||||
<input type="hidden" name="naverpay_direct" value="A" > <!-- NAVERPAY 결제창 호출 -->
|
||||
<input type="hidden" name="kakaopay_direct" value="A" > <!-- KAKAOPAY 결제창 호출 -->
|
||||
<input type="hidden" name="applepay_direct" value="A" > <!-- APPLEPAY 결제창 호출 -->
|
||||
<!-- 주문번호 -->
|
||||
<input type="hidden" name="ordr_idxx" value="<?php echo $od_id; ?>">
|
||||
<!-- 인증수단(영문 소문자) * 반드시 대소문자 구분 -->
|
||||
<input type="hidden" name="ActionResult" value="">
|
||||
<!-- 결제등록 키 -->
|
||||
<input type="hidden" name="approval_key" id="approval">
|
||||
<!-- 수취인이름 -->
|
||||
<input type="hidden" name="rcvr_name" value="">
|
||||
<!-- 수취인 연락처 -->
|
||||
<input type="hidden" name="rcvr_tel1" value="">
|
||||
<!-- 수취인 휴대폰 번호 -->
|
||||
<input type="hidden" name="rcvr_tel2" value="">
|
||||
<!-- 수취인 E-MAIL -->
|
||||
<input type="hidden" name="rcvr_add1" value="">
|
||||
<!-- 수취인 우편번호 -->
|
||||
<input type="hidden" name="rcvr_add2" value="">
|
||||
<!-- 수취인 주소 -->
|
||||
<input type="hidden" name="rcvr_mail" value="">
|
||||
<!-- 수취인 상세 주소 -->
|
||||
<input type="hidden" name="rcvr_zipx" value="">
|
||||
<!-- 장바구니 상품 개수 -->
|
||||
<input type="hidden" name="bask_cntx" value="<?php echo (int)$goods_count + 1; ?>">
|
||||
<!-- 장바구니 정보(상단 스크립트 참조) -->
|
||||
<input type="hidden" name="good_info" value="<?php echo $good_info; ?>">
|
||||
<!-- 배송소요기간 -->
|
||||
<input type="hidden" name="deli_term" value="03">
|
||||
<!-- 기타 파라메터 추가 부분 - Start - -->
|
||||
<input type="hidden" name="param_opt_1" value="<?php echo get_text($param_opt_1); ?>"/>
|
||||
<input type="hidden" name="param_opt_2" value="<?php echo get_text($param_opt_2); ?>"/>
|
||||
<input type="hidden" name="param_opt_3" value="<?php echo get_text($param_opt_3); ?>"/>
|
||||
<input type="hidden" name="disp_tax_yn" value="N">
|
||||
<!-- 기타 파라메터 추가 부분 - End - -->
|
||||
<!-- 화면 크기조정 부분 - Start - -->
|
||||
<input type="hidden" name="tablet_size" value="<?php echo $tablet_size; ?>"/>
|
||||
<!-- 화면 크기조정 부분 - End - -->
|
||||
<!--
|
||||
사용 카드 설정
|
||||
<input type="hidden" name='used_card' value="CClg:ccDI">
|
||||
/* 무이자 옵션
|
||||
※ 설정할부 (가맹점 관리자 페이지에 설정 된 무이자 설정을 따른다) - "" 로 설정
|
||||
※ 일반할부 (KCP 이벤트 이외에 설정 된 모든 무이자 설정을 무시한다) - "N" 로 설정
|
||||
※ 무이자 할부 (가맹점 관리자 페이지에 설정 된 무이자 이벤트 중 원하는 무이자 설정을 세팅한다) - "Y" 로 설정
|
||||
<input type="hidden" name="kcp_noint" value=""/> */
|
||||
|
||||
/* 무이자 설정
|
||||
※ 주의 1 : 할부는 결제금액이 50,000 원 이상일 경우에만 가능
|
||||
※ 주의 2 : 무이자 설정값은 무이자 옵션이 Y일 경우에만 결제 창에 적용
|
||||
예) 전 카드 2,3,6개월 무이자(국민,비씨,엘지,삼성,신한,현대,롯데,외환) : ALL-02:03:04
|
||||
BC 2,3,6개월, 국민 3,6개월, 삼성 6,9개월 무이자 : CCBC-02:03:06,CCKM-03:06,CCSS-03:06:04
|
||||
<input type="hidden" name="kcp_noint_quota" value="CCBC-02:03:06,CCKM-03:06,CCSS-03:06:09"/> */
|
||||
-->
|
||||
<input type="hidden" name="kcp_noint" value="<?php echo ($default['de_card_noint_use'] ? '' : 'N'); ?>">
|
||||
<?php
|
||||
if($default['de_tax_flag_use']) {
|
||||
/* KCP는 과세상품과 비과세상품을 동시에 판매하는 업체들의 결제관리에 대한 편의성을 제공해드리고자,
|
||||
복합과세 전용 사이트코드를 지원해 드리며 총 금액에 대해 복합과세 처리가 가능하도록 제공하고 있습니다
|
||||
|
||||
복합과세 전용 사이트 코드로 계약하신 가맹점에만 해당이 됩니다
|
||||
|
||||
상품별이 아니라 금액으로 구분하여 요청하셔야 합니다
|
||||
|
||||
총결제 금액은 과세금액 + 부과세 + 비과세금액의 합과 같아야 합니다.
|
||||
(good_mny = comm_tax_mny + comm_vat_mny + comm_free_mny)
|
||||
|
||||
복합과세는 order_approval_form.php 파일의 의해 적용됨
|
||||
아래 필드는 order_approval_form.php 파일로 전송하는 것
|
||||
*/
|
||||
?>
|
||||
<input type="hidden" name="tax_flag" value="TG03"> <!-- 변경불가 -->
|
||||
<input type="hidden" name="comm_tax_mny" value="<?php echo $comm_tax_mny; ?>"> <!-- 과세금액 -->
|
||||
<input type="hidden" name="comm_vat_mny" value="<?php echo $comm_vat_mny; ?>"> <!-- 부가세 -->
|
||||
<input type="hidden" name="comm_free_mny" value="<?php echo $comm_free_mny; ?>"> <!-- 비과세 금액 -->
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</form>
|
||||
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
?>
|
||||
|
||||
<input type="hidden" name="req_tx" value=""> <!-- 요청 구분 -->
|
||||
<input type="hidden" name="res_cd" value=""> <!-- 결과 코드 -->
|
||||
<input type="hidden" name="tran_cd" value=""> <!-- 트랜잭션 코드 -->
|
||||
<input type="hidden" name="ordr_idxx" value=""> <!-- 주문번호 -->
|
||||
<input type="hidden" name="good_mny" value=""> <!-- 결제금액 -->
|
||||
<input type="hidden" name="good_name" value=""> <!-- 상품명 -->
|
||||
<input type="hidden" name="buyr_name" value=""> <!-- 주문자명 -->
|
||||
<input type="hidden" name="buyr_tel1" value=""> <!-- 주문자 전화번호 -->
|
||||
<input type="hidden" name="buyr_tel2" value=""> <!-- 주문자 휴대폰번호 -->
|
||||
<input type="hidden" name="buyr_mail" value=""> <!-- 주문자 E-mail -->
|
||||
<input type="hidden" name="enc_info" value=""> <!-- 암호화 정보 -->
|
||||
<input type="hidden" name="enc_data" value=""> <!-- 암호화 데이터 -->
|
||||
<input type="hidden" name="use_pay_method" value=""> <!-- 요청된 결제 수단 -->
|
||||
<input type="hidden" name="rcvr_name" value=""> <!-- 수취인 이름 -->
|
||||
<input type="hidden" name="rcvr_tel1" value=""> <!-- 수취인 전화번호 -->
|
||||
<input type="hidden" name="rcvr_tel2" value=""> <!-- 수취인 휴대폰번호 -->
|
||||
<input type="hidden" name="rcvr_mail" value=""> <!-- 수취인 E-Mail -->
|
||||
<input type="hidden" name="rcvr_zipx" value=""> <!-- 수취인 우편번호 -->
|
||||
<input type="hidden" name="rcvr_add1" value=""> <!-- 수취인 주소 -->
|
||||
<input type="hidden" name="rcvr_add2" value=""> <!-- 수취인 상세 주소 -->
|
||||
<input type="hidden" name="param_opt_1" value="">
|
||||
<input type="hidden" name="param_opt_2" value="">
|
||||
<input type="hidden" name="param_opt_3" value="">
|
||||
<input type="hidden" name="disp_tax_yn" value="N">
|
||||
<?php if($default['de_tax_flag_use']) { ?>
|
||||
<input type="hidden" name="tax_flag" value="TG03"> <!-- 변경불가 -->
|
||||
<input type="hidden" name="comm_tax_mny" value="<?php echo $comm_tax_mny; ?>"> <!-- 과세금액 -->
|
||||
<input type="hidden" name="comm_vat_mny" value="<?php echo $comm_vat_mny; ?>"> <!-- 부가세 -->
|
||||
<input type="hidden" name="comm_free_mny" value="<?php echo $comm_free_mny; ?>"> <!-- 비과세 금액 -->
|
||||
<?php } ?>
|
||||
|
||||
<div id="display_pay_button" class="btn_confirm">
|
||||
<span id="show_req_btn"><input type="button" name="submitChecked" onClick="pay_approval();" value="결제등록요청" class="btn_submit"></span>
|
||||
<span id="show_pay_btn" style="display:none;"><input type="button" onClick="forderform_check();" value="주문하기" class="btn_submit"></span>
|
||||
<a href="<?php echo G5_SHOP_URL; ?>" class="btn_cancel">취소</a>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
// 무통장 입금만 사용할 때는 주문하기 버튼 보이게
|
||||
if(!($default['de_iche_use'] || $default['de_vbank_use'] || $default['de_hp_use'] || $default['de_card_use'])) {
|
||||
?>
|
||||
<script>
|
||||
document.getElementById("show_req_btn").style.display = "none";
|
||||
document.getElementById("show_pay_btn").style.display = "";
|
||||
</script>
|
||||
<?php }
|
||||
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
?>
|
||||
|
||||
<section id="sod_frm_escrow">
|
||||
<h2>에스크로 안내</h2>
|
||||
<form name="escrow_foot" method="post" action="http://admin.kcp.co.kr/Modules/escrow/kcp_pop.jsp">
|
||||
<input type="hidden" name="site_cd" value="<?php echo $default['de_kcp_mid']; ?>">
|
||||
<table border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td align='center'><img src="<?php echo G5_SHOP_URL; ?>/img/marks_escrow/escrow_foot.gif" width="290" height="92" border="0" usemap="#Map"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style='line-height:150%;'>
|
||||
<br>
|
||||
<strong>에스크로(escrow) 제도란?</strong>
|
||||
<br>상거래 시에, 판매자와 구매자의 사이에 신뢰할 수 있는 중립적인 제삼자(여기서는 <a href='http://kcp.co.kr' target='_blank'>KCP</a>)가 중개하여
|
||||
금전 또는 물품을 거래를 하도록 하는 것, 또는 그러한 서비스를 말한다. 거래의 안전성을 확보하기 위해 이용된다.
|
||||
(2006.4.1 전자상거래 소비자보호법에 따른 의무 시행)
|
||||
<br><br>
|
||||
현금 거래에만 해당(에스크로 결제를 선택했을 경우에만 해당)되며,
|
||||
신용카드로 구매하는 거래, 배송이 필요하지 않은 재화 등을 구매하는 거래(컨텐츠 등)에는 해당되지 않는다.
|
||||
<br>
|
||||
<br>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<map name="Map" id="Map">
|
||||
<area shape="rect" coords="5,62,74,83" href="javascript:escrow_foot_check()" alt="가입사실확인">
|
||||
</map>
|
||||
</form>
|
||||
</section>
|
||||
|
||||
<script>
|
||||
function escrow_foot_check()
|
||||
{
|
||||
var status = "width=500 height=450 menubar=no,scrollbars=no,resizable=no,status=no";
|
||||
var obj = window.open('', 'escrow_foot_pop', status);
|
||||
|
||||
document.escrow_foot.method = "post";
|
||||
document.escrow_foot.target = "escrow_foot_pop";
|
||||
document.escrow_foot.action = "http://admin.kcp.co.kr/Modules/escrow/kcp_pop.jsp";
|
||||
|
||||
document.escrow_foot.submit();
|
||||
}
|
||||
</script>
|
||||
|
||||
<!-- <?php if ($default['de_card_use'] || $default['de_iche_use']) { echo "결제대행사 : KCP"; } ?> -->
|
||||
@@ -0,0 +1,303 @@
|
||||
<?php
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
/* ============================================================================== */
|
||||
/* = PAGE : 지불 요청 및 결과 처리 PAGE = */
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
/* = 연동시 오류가 발생하는 경우 아래의 주소로 접속하셔서 확인하시기 바랍니다.= */
|
||||
/* = 접속 주소 : http://testpay.kcp.co.kr/pgsample/FAQ/search_error.jsp = */
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
/* = Copyright (c) 2010.05 KCP Inc. All Rights Reserved. = */
|
||||
/* ============================================================================== */
|
||||
|
||||
/* ============================================================================== */
|
||||
/* = 환경 설정 파일 Include = */
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
/* = ※ 필수 = */
|
||||
/* = 테스트 및 실결제 연동시 site_conf_inc.php파일을 수정하시기 바랍니다. = */
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
|
||||
include_once(G5_MSHOP_PATH.'/settle_kcp.inc.php'); // 환경설정 파일 include
|
||||
require "pp_ax_hub_lib.php"; // library [수정불가]
|
||||
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
/* = 환경 설정 파일 Include END = */
|
||||
/* ============================================================================== */
|
||||
|
||||
/* ============================================================================== */
|
||||
/* = 01. 지불 요청 정보 설정 = */
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
$req_tx = isset($_POST["req_tx"]) ? $_POST["req_tx"] : ''; // 요청 종류
|
||||
$tran_cd = isset($_POST["tran_cd"]) ? preg_replace('/[^0-9A-Za-z_\-\.]/i', '', $_POST["tran_cd"]) : ''; // 처리 종류
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
$cust_ip = getenv( "REMOTE_ADDR" ); // 요청 IP
|
||||
$ordr_idxx = isset($_POST["ordr_idxx"]) ? preg_replace('/[^0-9A-Za-z_\-\.]/i', '', $_POST["ordr_idxx"]) : ''; // 쇼핑몰 주문번호
|
||||
$good_name = isset($_POST["good_name"]) ? addslashes($_POST["good_name"]) : ''; // 상품명
|
||||
$good_mny = isset($_POST["good_mny"]) ? $_POST["good_mny"] : ''; // 결제 총금액
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
$res_cd = ""; // 응답코드
|
||||
$res_msg = ""; // 응답메시지
|
||||
$tno = isset($_POST["tno"]) ? $_POST["tno"] : ''; // KCP 거래 고유 번호
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
$buyr_name = isset($_POST["buyr_name"]) ? addslashes($_POST["buyr_name"]) : ''; // 주문자명
|
||||
$buyr_tel1 = isset($_POST["buyr_tel1"]) ? $_POST["buyr_tel1"] : ''; // 주문자 전화번호
|
||||
$buyr_tel2 = isset($_POST["buyr_tel2"]) ? $_POST["buyr_tel2"] : ''; // 주문자 핸드폰 번호
|
||||
$buyr_mail = isset($_POST["buyr_mail"]) ? $_POST["buyr_mail"] : ''; // 주문자 E-mail 주소
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
$mod_type = isset($_POST["mod_type"]) ? $_POST["mod_type"] : ''; // 변경TYPE VALUE 승인취소시 필요
|
||||
$mod_desc = isset($_POST["mod_desc"]) ? $_POST["mod_desc"] : ''; // 변경사유
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
$use_pay_method = isset($_POST["use_pay_method"]) ? $_POST["use_pay_method"] : ''; // 결제 방법
|
||||
$bSucc = ""; // 업체 DB 처리 성공 여부
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
$app_time = ""; // 승인시간 (모든 결제 수단 공통)
|
||||
$amount = ""; // KCP 실제 거래 금액
|
||||
$total_amount = 0; // 복합결제시 총 거래금액
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
$card_cd = ""; // 신용카드 코드
|
||||
$card_name = ""; // 신용카드 명
|
||||
$app_no = ""; // 신용카드 승인번호
|
||||
$noinf = ""; // 신용카드 무이자 여부
|
||||
$quota = ""; // 신용카드 할부개월
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
$bank_name = ""; // 은행명
|
||||
$bank_code = ""; // 은행코드
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
$bankname = ""; // 입금할 은행명
|
||||
$depositor = ""; // 입금할 계좌 예금주 성명
|
||||
$account = ""; // 입금할 계좌 번호
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
$pnt_issue = ""; // 결제 포인트사 코드
|
||||
$pt_idno = ""; // 결제 및 인증 아이디
|
||||
$pnt_amount = ""; // 적립금액 or 사용금액
|
||||
$pnt_app_time = ""; // 승인시간
|
||||
$pnt_app_no = ""; // 승인번호
|
||||
$add_pnt = ""; // 발생 포인트
|
||||
$use_pnt = ""; // 사용가능 포인트
|
||||
$rsv_pnt = ""; // 적립 포인트
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
$commid = ""; // 통신사 코드
|
||||
$mobile_no = ""; // 휴대폰 번호
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
$tk_van_code = ""; // 발급사 코드
|
||||
$tk_app_no = ""; // 상품권 승인 번호
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
$cash_yn = isset($_POST["cash_yn"]) ? $_POST["cash_yn"] : ''; // 현금영수증 등록 여부
|
||||
$cash_authno = ""; // 현금 영수증 승인 번호
|
||||
$cash_tr_code = isset($_POST["cash_tr_code"]) ? $_POST["cash_tr_code"] : ''; // 현금 영수증 발행 구분
|
||||
$cash_id_info = isset($_POST["cash_id_info"]) ? $_POST["cash_id_info"] : ''; // 현금 영수증 등록 번호
|
||||
/* ============================================================================== */
|
||||
|
||||
/* ============================================================================== */
|
||||
/* = 02. 인스턴스 생성 및 초기화 = */
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
/* = 결제에 필요한 인스턴스를 생성하고 초기화 합니다. = */
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
$c_PayPlus = new C_PP_CLI_T;
|
||||
|
||||
$c_PayPlus->mf_clear();
|
||||
/* ------------------------------------------------------------------------------ */
|
||||
/* = 02. 인스턴스 생성 및 초기화 END = */
|
||||
/* ============================================================================== */
|
||||
|
||||
|
||||
/* ============================================================================== */
|
||||
/* = 03. 처리 요청 정보 설정 = */
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
/* = 03-1. 승인 요청 = */
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
if ( $req_tx == "pay" )
|
||||
{
|
||||
/* 1004원은 실제로 업체에서 결제하셔야 될 원 금액을 넣어주셔야 합니다. 결제금액 유효성 검증 */
|
||||
$c_PayPlus->mf_set_ordr_data( "ordr_mony", $good_mny );
|
||||
|
||||
$kcp_pay_type = ''; // 결제수단 검증 파라미터 pay_type (신용카드 : PACA, 계좌이체 : PABK, 가상계좌 : PAVC, 휴대폰 : PAMC)
|
||||
|
||||
if ($use_pay_method == "100000000000" && (in_array($od_settle_case, array('신용카드', '간편결제')))) { // 신용카드
|
||||
$kcp_pay_type = 'PACA';
|
||||
} else if ($use_pay_method == "010000000000" && $od_settle_case === '계좌이체') { // 계좌이체
|
||||
$kcp_pay_type = 'PABK';
|
||||
} else if ($use_pay_method == "001000000000" && $od_settle_case === '가상계좌') { // 가상계좌
|
||||
$kcp_pay_type = 'PAVC';
|
||||
} else if ($use_pay_method == "000010000000" && $od_settle_case === '휴대폰') { // 휴대폰
|
||||
$kcp_pay_type = 'PAMC';
|
||||
}
|
||||
|
||||
$c_PayPlus->mf_set_ordr_data( "pay_type", $kcp_pay_type );
|
||||
$c_PayPlus->mf_set_ordr_data( "ordr_no", $ordr_idxx );
|
||||
|
||||
$post_enc_data = isset($_POST["enc_data"]) ? $_POST["enc_data"] : '';
|
||||
$post_enc_info = isset($_POST["enc_info"]) ? $_POST["enc_info"] : '';
|
||||
|
||||
$c_PayPlus->mf_set_encx_data( $post_enc_data, $post_enc_info );
|
||||
}
|
||||
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
/* = 03-2. 취소/매입 요청 = */
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
else 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 ); // 변경 사유
|
||||
}
|
||||
/* ------------------------------------------------------------------------------ */
|
||||
/* = 03. 처리 요청 정보 설정 END = */
|
||||
/* ============================================================================== */
|
||||
|
||||
|
||||
|
||||
/* ============================================================================== */
|
||||
/* = 04. 실행 = */
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
if ( $tran_cd != "" )
|
||||
{
|
||||
$c_PayPlus->mf_do_tx( $trace_no, $g_conf_home_dir, $g_conf_site_cd, $g_conf_site_key, $tran_cd, "",
|
||||
$g_conf_gw_url, $g_conf_gw_port, "payplus_cli_slib", $ordr_idxx,
|
||||
$cust_ip, $g_conf_log_level, 0, 0, $g_conf_key_dir, $g_conf_log_dir ); // 응답 전문 처리
|
||||
|
||||
$res_cd = $c_PayPlus->m_res_cd; // 결과 코드
|
||||
$res_msg = $c_PayPlus->m_res_msg; // 결과 메시지
|
||||
}
|
||||
else
|
||||
{
|
||||
$c_PayPlus->m_res_cd = "9562";
|
||||
$c_PayPlus->m_res_msg = "연동 오류|tran_cd값이 설정되지 않았습니다.";
|
||||
}
|
||||
|
||||
if ($res_cd != '0000')
|
||||
{
|
||||
$res_msg = iconv("euc-kr", "utf-8", $res_msg);
|
||||
|
||||
/*
|
||||
echo "<script>
|
||||
var openwin = window.open( './kcp/proc_win.php', 'proc_win', '' );
|
||||
openwin.close();
|
||||
</script>";
|
||||
*/
|
||||
if(isset($_POST['pp_id']) && $_POST['pp_id']) {
|
||||
$page_return_url = G5_SHOP_URL.'/personalpayform.php?pp_id='.get_session('ss_personalpay_id');
|
||||
} else {
|
||||
$page_return_url = G5_SHOP_URL.'/orderform.php';
|
||||
if(get_session('ss_direct'))
|
||||
$page_return_url .= '?sw_direct=1';
|
||||
}
|
||||
|
||||
alert("$res_cd : $res_msg", $page_return_url);
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
/* = 04. 실행 END = */
|
||||
/* ============================================================================== */
|
||||
|
||||
|
||||
/* ============================================================================== */
|
||||
/* = 05. 승인 결과 값 추출 = */
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
if ( $req_tx == "pay" )
|
||||
{
|
||||
if( $res_cd == "0000" )
|
||||
{
|
||||
$tno = $c_PayPlus->mf_get_res_data( "tno" ); // KCP 거래 고유 번호
|
||||
$amount = $c_PayPlus->mf_get_res_data( "amount" ); // KCP 실제 거래 금액
|
||||
$pnt_issue = $c_PayPlus->mf_get_res_data( "pnt_issue" ); // 결제 포인트사 코드
|
||||
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
/* = 05-1. 신용카드 승인 결과 처리 = */
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
if ( $use_pay_method == "100000000000" )
|
||||
{
|
||||
$card_cd = $c_PayPlus->mf_get_res_data( "card_cd" ); // 카드사 코드
|
||||
$card_name = $c_PayPlus->mf_get_res_data( "card_name" ); // 카드 종류
|
||||
$app_time = $c_PayPlus->mf_get_res_data( "app_time" ); // 승인 시간
|
||||
$app_no = $c_PayPlus->mf_get_res_data( "app_no" ); // 승인 번호
|
||||
$noinf = $c_PayPlus->mf_get_res_data( "noinf" ); // 무이자 여부 ( 'Y' : 무이자 )
|
||||
$quota = $c_PayPlus->mf_get_res_data( "quota" ); // 할부 개월 수
|
||||
$od_other_pay_type = $c_PayPlus->mf_get_res_data( "card_other_pay_type" ); // 간편결제유형
|
||||
|
||||
$kcp_pay_method = $c_PayPlus->mf_get_res_data( "pay_method" ); // 카카오페이 결제수단
|
||||
// 카드 코드는 PACA, 카카오머니 코드는 PAKM
|
||||
|
||||
if( $kcp_pay_method == "PAKM" ){ // 카카오머니
|
||||
$card_mny = $kakaomny_mny = $c_PayPlus->mf_get_res_data( "kakaomny_mny" );
|
||||
$app_time = $app_kakaomny_time = $c_PayPlus->mf_get_res_data( "app_kakaomny_time" );
|
||||
$od_other_pay_type = 'NHNKCP_KAKAOMONEY';
|
||||
}
|
||||
}
|
||||
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
/* = 05-2. 계좌이체 승인 결과 처리 = */
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
if ( $use_pay_method == "010000000000" )
|
||||
{
|
||||
$app_time = $c_PayPlus->mf_get_res_data( "app_time" ); // 승인시간
|
||||
$bank_name = $c_PayPlus->mf_get_res_data( "bank_name" ); // 은행명
|
||||
$bank_code = $c_PayPlus->mf_get_res_data( "bank_code" ); // 은행코드
|
||||
}
|
||||
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
/* = 05-3. 가상계좌 승인 결과 처리 = */
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
if ( $use_pay_method == "001000000000" )
|
||||
{
|
||||
$bankname = $c_PayPlus->mf_get_res_data( "bankname" ); // 입금할 은행 이름
|
||||
$depositor = $c_PayPlus->mf_get_res_data( "depositor" ); // 입금할 계좌 예금주
|
||||
$account = $c_PayPlus->mf_get_res_data( "account" ); // 입금할 계좌 번호
|
||||
}
|
||||
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
/* = 05-4. 포인트 승인 결과 처리 = */
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
if ( $use_pay_method == "000100000000" )
|
||||
{
|
||||
$pt_idno = $c_PayPlus->mf_get_res_data( "pt_idno" ); // 결제 및 인증 아이디
|
||||
$pnt_amount = $c_PayPlus->mf_get_res_data( "pnt_amount" ); // 적립금액 or 사용금액
|
||||
$pnt_app_time = $c_PayPlus->mf_get_res_data( "pnt_app_time" ); // 승인시간
|
||||
$pnt_app_no = $c_PayPlus->mf_get_res_data( "pnt_app_no" ); // 승인번호
|
||||
$add_pnt = $c_PayPlus->mf_get_res_data( "add_pnt" ); // 발생 포인트
|
||||
$use_pnt = $c_PayPlus->mf_get_res_data( "use_pnt" ); // 사용가능 포인트
|
||||
$rsv_pnt = $c_PayPlus->mf_get_res_data( "rsv_pnt" ); // 적립 포인트
|
||||
}
|
||||
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
/* = 05-5. 휴대폰 승인 결과 처리 = */
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
if ( $use_pay_method == "000010000000" )
|
||||
{
|
||||
$app_time = $c_PayPlus->mf_get_res_data( "hp_app_time" ); // 승인 시간
|
||||
$commid = $c_PayPlus->mf_get_res_data( "commid" ); // 통신사 코드
|
||||
$mobile_no = $c_PayPlus->mf_get_res_data( "mobile_no" ); // 휴대폰 번호
|
||||
}
|
||||
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
/* = 05-6. 상품권 승인 결과 처리 = */
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
if ( $use_pay_method == "000000001000" )
|
||||
{
|
||||
$app_time = $c_PayPlus->mf_get_res_data( "tk_app_time" ); // 승인 시간
|
||||
$tk_van_code = $c_PayPlus->mf_get_res_data( "tk_van_code" ); // 발급사 코드
|
||||
$tk_app_no = $c_PayPlus->mf_get_res_data( "tk_app_no" ); // 승인 번호
|
||||
}
|
||||
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
/* = 05-7. 현금영수증 결과 처리 = */
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
$cash_authno = $c_PayPlus->mf_get_res_data( "cash_authno" ); // 현금 영수증 승인 번호
|
||||
$cash_authno = $c_PayPlus->mf_get_res_data( "cash_authno" ); // 현금 영수증 승인 번호
|
||||
$cash_tr_code = $c_PayPlus->mf_get_res_data( "cash_tr_code" ); // 현금영수증 등록구분
|
||||
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
/* = 05-8. 에스크로 여부 결과 처리 = */
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
$escw_yn = $c_PayPlus->mf_get_res_data( "escw_yn" ); // 에스크로 여부
|
||||
}
|
||||
}
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
/* = 05. 승인 결과 처리 END = */
|
||||
/* ============================================================================== */;
|
||||
@@ -0,0 +1,53 @@
|
||||
<?php
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
|
||||
// locale ko_KR.euc-kr 로 설정
|
||||
setlocale(LC_CTYPE, 'ko_KR.euc-kr');
|
||||
|
||||
/* ============================================================================== */
|
||||
/* = 07. 승인 결과 DB처리 실패시 : 자동취소 = */
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
/* = 승인 결과를 DB 작업 하는 과정에서 정상적으로 승인된 건에 대해 = */
|
||||
/* = DB 작업을 실패하여 DB update 가 완료되지 않은 경우, 자동으로 = */
|
||||
/* = 승인 취소 요청을 하는 프로세스가 구성되어 있습니다. = */
|
||||
/* = = */
|
||||
/* = DB 작업이 실패 한 경우, bSucc 라는 변수(String)의 값을 "false" = */
|
||||
/* = 로 설정해 주시기 바랍니다. (DB 작업 성공의 경우에는 "false" 이외의 = */
|
||||
/* = 값을 설정하시면 됩니다.) = */
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
|
||||
$bSucc = "false"; // DB 작업 실패 또는 금액 불일치의 경우 "false" 로 세팅
|
||||
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
/* = 07-1. DB 작업 실패일 경우 자동 승인 취소 = */
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
if ( $req_tx == "pay" )
|
||||
{
|
||||
if( $res_cd == "0000" )
|
||||
{
|
||||
if ( $bSucc == "false" )
|
||||
{
|
||||
$c_PayPlus->mf_clear();
|
||||
|
||||
$tran_cd = "00200000";
|
||||
|
||||
$c_PayPlus->mf_set_modx_data( "tno", $tno ); // KCP 원거래 거래번호
|
||||
$c_PayPlus->mf_set_modx_data( "mod_type", "STSC" ); // 원거래 변경 요청 종류
|
||||
$c_PayPlus->mf_set_modx_data( "mod_ip", $cust_ip ); // 변경 요청자 IP
|
||||
$c_PayPlus->mf_set_modx_data( "mod_desc", $cancel_msg ); // 변경 사유
|
||||
|
||||
$c_PayPlus->mf_do_tx( "", $g_conf_home_dir, $g_conf_site_cd,
|
||||
$g_conf_site_key, $tran_cd, "",
|
||||
$g_conf_gw_url, $g_conf_gw_port, "payplus_cli_slib",
|
||||
$ordr_idxx, $cust_ip, $g_conf_log_level,
|
||||
0, 0 );
|
||||
|
||||
$res_cd = $c_PayPlus->m_res_cd;
|
||||
$res_msg = $c_PayPlus->m_res_msg;
|
||||
}
|
||||
}
|
||||
} // End of [res_cd = "0000"]
|
||||
/* ============================================================================== */
|
||||
|
||||
// locale 설정 초기화
|
||||
setlocale(LC_CTYPE, '');
|
||||
@@ -0,0 +1,296 @@
|
||||
<?php
|
||||
/* ============================================================================== */
|
||||
/* = PAGE : 라이브버리 PAGE = */
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
/* = Copyright (c) 2010.02 KCP Inc. All Rights Reserverd. = */
|
||||
/* ============================================================================== */
|
||||
|
||||
/* ============================================================================== */
|
||||
/* = 지불 연동 CLASS = */
|
||||
/* ============================================================================== */
|
||||
class C_PP_CLI_T
|
||||
{
|
||||
var $m_payx_common;
|
||||
var $m_payx_card;
|
||||
var $m_ordr_data;
|
||||
var $m_rcvr_data;
|
||||
var $m_escw_data;
|
||||
var $m_modx_data;
|
||||
var $m_encx_data;
|
||||
var $m_encx_info;
|
||||
|
||||
/* -------------------------------------------------------------------- */
|
||||
/* - 처리 결과 값 - */
|
||||
/* -------------------------------------------------------------------- */
|
||||
var $m_res_data;
|
||||
var $m_res_cd;
|
||||
var $m_res_msg;
|
||||
|
||||
/* -------------------------------------------------------------------- */
|
||||
/* - 생성자 - */
|
||||
/* -------------------------------------------------------------------- */
|
||||
function C_PP_CLI()
|
||||
{
|
||||
$this->m_payx_common = "";
|
||||
$this->m_payx_card = "";
|
||||
$this->m_ordr_data = "";
|
||||
$this->m_rcvr_data = "";
|
||||
$this->m_escw_data = "";
|
||||
$this->m_modx_data = "";
|
||||
$this->m_encx_data = "";
|
||||
$this->m_encx_info = "";
|
||||
}
|
||||
|
||||
function mf_init( $mode )
|
||||
{
|
||||
if ( $mode == "1" )
|
||||
{
|
||||
if ( !extension_loaded( 'pp_cli_dl_php' ) )
|
||||
{
|
||||
dl( "pp_cli_dl_php.so" );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function mf_clear()
|
||||
{
|
||||
$this->m_payx_common = "";
|
||||
$this->m_payx_card = "";
|
||||
$this->m_ordr_data = "";
|
||||
$this->m_rcvr_data = "";
|
||||
$this->m_escw_data = "";
|
||||
$this->m_modx_data = "";
|
||||
$this->m_encx_data = "";
|
||||
$this->m_encx_info = "";
|
||||
}
|
||||
|
||||
function mf_gen_trace_no( $site_cd, $ip, $mode )
|
||||
{
|
||||
if ( $mode == "1" )
|
||||
{
|
||||
$trace_no = lfPP_CLI_DL__gen_trace_no( $site_cd, $ip );
|
||||
}
|
||||
else
|
||||
{
|
||||
$trace_no = "";
|
||||
}
|
||||
|
||||
return $trace_no;
|
||||
}
|
||||
|
||||
/* -------------------------------------------------------------------- */
|
||||
/* - FUNC : ENC DATA 정보 설정 함수 - */
|
||||
/* -------------------------------------------------------------------- */
|
||||
function mf_set_payx_common_data( $name, $val )
|
||||
{
|
||||
if ( $val != "" )
|
||||
{
|
||||
$this->m_payx_common .= ( $name . '=' . $val . chr( 31 ) );
|
||||
}
|
||||
}
|
||||
|
||||
function mf_set_payx_card_data( $name, $val )
|
||||
{
|
||||
if ( $val != "" )
|
||||
{
|
||||
$this->m_payx_card .= ( $name . '=' . $val . chr( 31 ) );
|
||||
}
|
||||
}
|
||||
|
||||
function mf_set_ordr_data( $name, $val )
|
||||
{
|
||||
if ( $val != "" )
|
||||
{
|
||||
$this->m_ordr_data .= ( $name . '=' . $val . chr( 31 ) );
|
||||
}
|
||||
}
|
||||
|
||||
function mf_set_rcvr_data( $name, $val )
|
||||
{
|
||||
if ( $val != "" )
|
||||
{
|
||||
$this->m_rcvr_data .= ( $name . '=' . $val . chr( 31 ) );
|
||||
}
|
||||
}
|
||||
|
||||
function mf_set_escw_data( $name, $val )
|
||||
{
|
||||
if ( $val != "" )
|
||||
{
|
||||
$this->m_escw_data .= ( $name . '=' . $val . chr( 29 ) );
|
||||
}
|
||||
}
|
||||
|
||||
function mf_set_modx_data( $name, $val )
|
||||
{
|
||||
if ( $val != "" )
|
||||
{
|
||||
$this->m_modx_data .= ( $name . '=' . $val . chr( 31 ) );
|
||||
}
|
||||
}
|
||||
|
||||
function mf_set_encx_data( $encx_data, $encx_info )
|
||||
{
|
||||
$this->m_encx_data = $encx_data;
|
||||
$this->m_encx_info = $encx_info;
|
||||
}
|
||||
|
||||
/* -------------------------------------------------------------------- */
|
||||
/* - FUNC : 지불 처리 함수 - */
|
||||
/* -------------------------------------------------------------------- */
|
||||
function mf_do_tx( $trace_no, $home_dir, $site_cd,
|
||||
$site_key, $tx_cd, $pub_key_str,
|
||||
$pa_url, $pa_port, $user_agent,
|
||||
$ordr_idxx, $cust_ip,
|
||||
$log_level, $opt, $mode,
|
||||
$key_dir, $log_dir)
|
||||
{
|
||||
$payx_data = $this->mf_get_payx_data();
|
||||
|
||||
$ordr_data = $this->mf_get_data( "ordr_data", $this->m_ordr_data );
|
||||
$rcvr_data = $this->mf_get_data( "rcvr_data", $this->m_rcvr_data );
|
||||
$escw_data = $this->mf_get_data( "escw_data", $this->m_escw_data );
|
||||
$modx_data = $this->mf_get_data( "mod_data", $this->m_modx_data );
|
||||
|
||||
if ( $mode == "1" )
|
||||
{
|
||||
$res_data = lfPP_CLI_DL__do_tx_2( $trace_no, $home_dir, $site_cd,
|
||||
$site_key, $tx_cd, $pub_key_str,
|
||||
$pa_url, $pa_port, $user_agent,
|
||||
$ordr_idxx,
|
||||
$payx_data, $ordr_data,
|
||||
$rcvr_data, $escw_data,
|
||||
$modx_data,
|
||||
$this->m_encx_data, $this->m_encx_info,
|
||||
$log_level, $opt );
|
||||
}
|
||||
else
|
||||
{
|
||||
if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN')
|
||||
{
|
||||
$bin_exe = $home_dir.'/bin/pp_cli_exe ';
|
||||
|
||||
$res_data = $this->mf_exec($bin_exe . "\"".
|
||||
"site_cd=" . $site_cd . "," .
|
||||
"site_key=" . $site_key . "," .
|
||||
"tx_cd=" . $tx_cd . "," .
|
||||
"pa_url=" . $pa_url . "," .
|
||||
"pa_port=" . $pa_port . "," .
|
||||
"ordr_idxx=" . $ordr_idxx . "," .
|
||||
"enc_data=" . $this->m_encx_data . "," .
|
||||
"enc_info=" . $this->m_encx_info . "," .
|
||||
"trace_no=" . $trace_no . "," .
|
||||
"cust_ip=" . $cust_ip . "," .
|
||||
"key_path=" . $key_dir . "," .
|
||||
"log_path=" . $log_dir . "," .
|
||||
"log_level=" . $log_level . "," .
|
||||
"plan_data=" . $payx_data .
|
||||
$ordr_data .
|
||||
$rcvr_data .
|
||||
$escw_data .
|
||||
$modx_data .
|
||||
"\"") ;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(PHP_INT_MAX == 2147483647) // 32-bit
|
||||
$bin_exe = $home_dir.'/bin/pp_cli';
|
||||
else
|
||||
$bin_exe = $home_dir.'/bin/pp_cli_x64';
|
||||
|
||||
$res_data = $this->mf_exec( $bin_exe,
|
||||
"-h",
|
||||
"home=" . $home_dir . "," .
|
||||
"site_cd=" . $site_cd . "," .
|
||||
"site_key=" . $site_key . "," .
|
||||
"tx_cd=" . $tx_cd . "," .
|
||||
"pa_url=" . $pa_url . "," .
|
||||
"pa_port=" . $pa_port . "," .
|
||||
"ordr_idxx=" . $ordr_idxx . "," .
|
||||
"payx_data=" . $payx_data . "," .
|
||||
"ordr_data=" . $ordr_data . "," .
|
||||
"rcvr_data=" . $rcvr_data . "," .
|
||||
"escw_data=" . $escw_data . "," .
|
||||
"modx_data=" . $modx_data . "," .
|
||||
"enc_data=" . $this->m_encx_data . "," .
|
||||
"enc_info=" . $this->m_encx_info . "," .
|
||||
"trace_no=" . $trace_no . "," .
|
||||
"cust_ip=" . $cust_ip . "," .
|
||||
"log_path=" . $log_dir . "," .
|
||||
"log_level=" . $log_level . "," .
|
||||
"opt=" . $opt . "" );
|
||||
}
|
||||
|
||||
if ( $res_data == "" )
|
||||
{
|
||||
$res_data = "res_cd=9502" . chr( 31 ) . "res_msg=연동 모듈 호출 오류";
|
||||
}
|
||||
}
|
||||
|
||||
parse_str( str_replace( chr( 31 ), "&", $res_data ), $this->m_res_data );
|
||||
|
||||
$this->m_res_cd = $this->m_res_data[ "res_cd" ];
|
||||
$this->m_res_msg = $this->m_res_data[ "res_msg" ];
|
||||
}
|
||||
|
||||
/* -------------------------------------------------------------------- */
|
||||
/* - FUNC : 처리 결과 값을 리턴하는 함수 - */
|
||||
/* -------------------------------------------------------------------- */
|
||||
function mf_get_res_data( $name )
|
||||
{
|
||||
return isset($this->m_res_data[$name]) ? $this->m_res_data[$name] : '';
|
||||
}
|
||||
|
||||
function mf_get_payx_data()
|
||||
{
|
||||
$my_data = '';
|
||||
if ( $this->m_payx_common != "" || $this->m_payx_card != "" )
|
||||
{
|
||||
$my_data = "payx_data=";
|
||||
}
|
||||
|
||||
if ( $this->m_payx_common != "" )
|
||||
{
|
||||
$my_data .= "common=" . $this->m_payx_common . chr( 30 );
|
||||
}
|
||||
|
||||
if ( $this->m_payx_card != "" )
|
||||
{
|
||||
$my_data .= ( "card=" . $this->m_payx_card . chr( 30 ) );
|
||||
}
|
||||
|
||||
return $my_data;
|
||||
}
|
||||
|
||||
function mf_get_data( $data_name, $data )
|
||||
{
|
||||
if ( $data != "" )
|
||||
{
|
||||
$my_data = $data_name . "=" . $data;
|
||||
}
|
||||
else
|
||||
{
|
||||
$my_data = "";
|
||||
}
|
||||
|
||||
return $my_data;
|
||||
}
|
||||
|
||||
function mf_exec()
|
||||
{
|
||||
$arg = func_get_args();
|
||||
|
||||
if ( is_array( $arg[0] ) ) $arg = $arg[0];
|
||||
|
||||
$exec_cmd = array_shift( $arg );
|
||||
|
||||
foreach($arg as $i)
|
||||
{
|
||||
$exec_cmd .= " " . escapeshellarg( $i );
|
||||
}
|
||||
|
||||
$rt = exec( $exec_cmd );
|
||||
|
||||
return $rt;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,145 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:ns1="http://org.apache.axis2/xsd" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:ax21="http://payment.domain.webpay.service.kcp.kr/xsd" xmlns:ns="http://webservice.act.webpay.service.kcp.kr" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:ax22="http://domain.webpay.service.kcp.kr/xsd" targetNamespace="http://webservice.act.webpay.service.kcp.kr">
|
||||
<wsdl:documentation>
|
||||
KCP Payment Service
|
||||
</wsdl:documentation>
|
||||
<wsdl:types>
|
||||
<xs:schema xmlns:ax23="http://domain.webpay.service.kcp.kr/xsd" targetNamespace="http://payment.domain.webpay.service.kcp.kr/xsd" attributeFormDefault="qualified" elementFormDefault="qualified">
|
||||
<xs:import namespace="http://domain.webpay.service.kcp.kr/xsd"/>
|
||||
<xs:complexType name="ApproveReq">
|
||||
<xs:sequence>
|
||||
<xs:element name="accessCredentialType" minOccurs="0" type="ax22:AccessCredentialType" nillable="true"/>
|
||||
<xs:element name="baseRequestType" minOccurs="0" type="ax22:BaseRequestType" nillable="true"/>
|
||||
<xs:element name="escrow" minOccurs="0" type="xs:boolean"/>
|
||||
<xs:element name="orderID" minOccurs="0" type="xs:string" nillable="true"/>
|
||||
<xs:element name="paymentAmount" minOccurs="0" type="xs:string" nillable="true"/>
|
||||
<xs:element name="paymentMethod" minOccurs="0" type="xs:string" nillable="true"/>
|
||||
<xs:element name="productName" minOccurs="0" type="xs:string" nillable="true"/>
|
||||
<xs:element name="returnUrl" minOccurs="0" type="xs:string" nillable="true"/>
|
||||
<xs:element name="siteCode" minOccurs="0" type="xs:string" nillable="true"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
<xs:complexType name="ApproveRes">
|
||||
<xs:sequence>
|
||||
<xs:element name="approvalKey" minOccurs="0" type="xs:string" nillable="true"/>
|
||||
<xs:element name="baseResponseType" minOccurs="0" type="ax22:BaseResponseType" nillable="true"/>
|
||||
<xs:element name="payUrl" minOccurs="0" type="xs:string" nillable="true"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:schema>
|
||||
<xs:schema xmlns:ax24="http://payment.domain.webpay.service.kcp.kr/xsd" targetNamespace="http://webservice.act.webpay.service.kcp.kr" attributeFormDefault="qualified" elementFormDefault="qualified">
|
||||
<xs:import namespace="http://payment.domain.webpay.service.kcp.kr/xsd"/>
|
||||
<xs:element name="approve">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="req" minOccurs="0" type="ax24:ApproveReq" nillable="true"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="approveResponse">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="return" minOccurs="0" type="ax24:ApproveRes" nillable="true"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:schema>
|
||||
<xs:schema targetNamespace="http://domain.webpay.service.kcp.kr/xsd" attributeFormDefault="qualified" elementFormDefault="qualified">
|
||||
<xs:complexType name="AccessCredentialType">
|
||||
<xs:sequence>
|
||||
<xs:element name="accessLicense" minOccurs="0" type="xs:string" nillable="true"/>
|
||||
<xs:element name="signature" minOccurs="0" type="xs:string" nillable="true"/>
|
||||
<xs:element name="timestamp" minOccurs="0" type="xs:string" nillable="true"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
<xs:complexType name="BaseRequestType">
|
||||
<xs:sequence>
|
||||
<xs:element name="detailLevel" minOccurs="0" type="xs:string" nillable="true"/>
|
||||
<xs:element name="requestApp" minOccurs="0" type="xs:string" nillable="true"/>
|
||||
<xs:element name="requestID" minOccurs="0" type="xs:string" nillable="true"/>
|
||||
<xs:element name="userAgent" minOccurs="0" type="xs:string" nillable="true"/>
|
||||
<xs:element name="version" minOccurs="0" type="xs:string" nillable="true"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
<xs:complexType name="BaseResponseType">
|
||||
<xs:sequence>
|
||||
<xs:element name="detailLevel" minOccurs="0" type="xs:string" nillable="true"/>
|
||||
<xs:element name="error" minOccurs="0" type="ax22:ErrorType" nillable="true"/>
|
||||
<xs:element name="messageID" minOccurs="0" type="xs:string" nillable="true"/>
|
||||
<xs:element name="release" minOccurs="0" type="xs:string" nillable="true"/>
|
||||
<xs:element name="requestID" minOccurs="0" type="xs:string" nillable="true"/>
|
||||
<xs:element name="responseType" minOccurs="0" type="xs:string" nillable="true"/>
|
||||
<xs:element name="timestamp" minOccurs="0" type="xs:string" nillable="true"/>
|
||||
<xs:element name="version" minOccurs="0" type="xs:string" nillable="true"/>
|
||||
<xs:element name="warningList" maxOccurs="unbounded" minOccurs="0" type="ax22:ErrorType" nillable="true"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
<xs:complexType name="ErrorType">
|
||||
<xs:sequence>
|
||||
<xs:element name="code" minOccurs="0" type="xs:string" nillable="true"/>
|
||||
<xs:element name="detail" minOccurs="0" type="xs:string" nillable="true"/>
|
||||
<xs:element name="message" minOccurs="0" type="xs:string" nillable="true"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:schema>
|
||||
</wsdl:types>
|
||||
<wsdl:message name="approveRequest">
|
||||
<wsdl:part name="parameters" element="ns:approve"/>
|
||||
</wsdl:message>
|
||||
<wsdl:message name="approveResponse">
|
||||
<wsdl:part name="parameters" element="ns:approveResponse"/>
|
||||
</wsdl:message>
|
||||
<wsdl:portType name="KCPPaymentServicePortType">
|
||||
<wsdl:operation name="approve">
|
||||
<wsdl:input message="ns:approveRequest" wsaw:Action="urn:approve"/>
|
||||
<wsdl:output message="ns:approveResponse" wsaw:Action="urn:approveResponse"/>
|
||||
</wsdl:operation>
|
||||
</wsdl:portType>
|
||||
<wsdl:binding name="KCPPaymentServiceSoap11Binding" type="ns:KCPPaymentServicePortType">
|
||||
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
|
||||
<wsdl:operation name="approve">
|
||||
<soap:operation soapAction="urn:approve" style="document"/>
|
||||
<wsdl:input>
|
||||
<soap:body use="literal"/>
|
||||
</wsdl:input>
|
||||
<wsdl:output>
|
||||
<soap:body use="literal"/>
|
||||
</wsdl:output>
|
||||
</wsdl:operation>
|
||||
</wsdl:binding>
|
||||
<wsdl:binding name="KCPPaymentServiceSoap12Binding" type="ns:KCPPaymentServicePortType">
|
||||
<soap12:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
|
||||
<wsdl:operation name="approve">
|
||||
<soap12:operation soapAction="urn:approve" style="document"/>
|
||||
<wsdl:input>
|
||||
<soap12:body use="literal"/>
|
||||
</wsdl:input>
|
||||
<wsdl:output>
|
||||
<soap12:body use="literal"/>
|
||||
</wsdl:output>
|
||||
</wsdl:operation>
|
||||
</wsdl:binding>
|
||||
<wsdl:binding name="KCPPaymentServiceHttpBinding" type="ns:KCPPaymentServicePortType">
|
||||
<http:binding verb="POST"/>
|
||||
<wsdl:operation name="approve">
|
||||
<http:operation location="KCPPaymentService/approve"/>
|
||||
<wsdl:input>
|
||||
<mime:content type="text/xml" part="approve"/>
|
||||
</wsdl:input>
|
||||
<wsdl:output>
|
||||
<mime:content type="text/xml" part="approve"/>
|
||||
</wsdl:output>
|
||||
</wsdl:operation>
|
||||
</wsdl:binding>
|
||||
<wsdl:service name="KCPPaymentService">
|
||||
<wsdl:port name="KCPPaymentServiceHttpSoap11Endpoint" binding="ns:KCPPaymentServiceSoap11Binding">
|
||||
<soap:address location="https://smpay.kcp.co.kr/services/KCPPaymentService.KCPPaymentServiceHttpSoap11Endpoint/"/>
|
||||
</wsdl:port>
|
||||
<wsdl:port name="KCPPaymentServiceHttpSoap12Endpoint" binding="ns:KCPPaymentServiceSoap12Binding">
|
||||
<soap12:address location="https://smpay.kcp.co.kr/services/KCPPaymentService.KCPPaymentServiceHttpSoap12Endpoint/"/>
|
||||
</wsdl:port>
|
||||
<wsdl:port name="KCPPaymentServiceHttpEndpoint" binding="ns:KCPPaymentServiceHttpBinding">
|
||||
<http:address location="https://smpay.kcp.co.kr/services/KCPPaymentService.KCPPaymentServiceHttpEndpoint/"/>
|
||||
</wsdl:port>
|
||||
</wsdl:service>
|
||||
</wsdl:definitions>
|
||||
Reference in New Issue
Block a user