스마트폰 결제 모듈 추가
This commit is contained in:
192
mobile/shop/kcp/KCPComLibrary.php
Normal file
192
mobile/shop/kcp/KCPComLibrary.php
Normal file
@ -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 PayService( $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;
|
||||
}
|
||||
}
|
||||
142
mobile/shop/kcp/KCPPaymentService.wsdl
Normal file
142
mobile/shop/kcp/KCPPaymentService.wsdl
Normal file
@ -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://devpggw.kcp.co.kr:8100/services/KCPPaymentService"/>
|
||||
</wsdl:port>
|
||||
<wsdl:port name="PayServiceHttpSoap12Endpoint" binding="ns:PayServiceSoap12Binding">
|
||||
<soap12:address location="https://devpggw.kcp.co.kr:8100/services/KCPPaymentService"/>
|
||||
</wsdl:port>
|
||||
<wsdl:port name="PayServiceHttpEndpoint" binding="ns:PayServiceHttpBinding">
|
||||
<http:address location="https://devpggw.kcp.co.kr:8100/services/KCPPaymentService"/>
|
||||
</wsdl:port>
|
||||
</wsdl:service>
|
||||
</wsdl:definitions>
|
||||
112
mobile/shop/kcp/approval_key.js
Normal file
112
mobile/shop/kcp/approval_key.js
Normal file
@ -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 )
|
||||
{
|
||||
}
|
||||
}
|
||||
BIN
mobile/shop/kcp/bin/pp_cli
Executable file
BIN
mobile/shop/kcp/bin/pp_cli
Executable file
Binary file not shown.
135
mobile/shop/kcp/cancel.php
Normal file
135
mobile/shop/kcp/cancel.php
Normal file
@ -0,0 +1,135 @@
|
||||
<?
|
||||
/* ============================================================================== */
|
||||
/* = PAGE : 취소 요청 PAGE = */
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
/* = 아래의 ※ 주의 ※ 부분을 꼭 참고하시여 연동을 진행하시기 바랍니다. = */
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
/* = 연동시 오류가 발생하는 경우 아래의 주소로 접속하셔서 확인하시기 바랍니다.= */
|
||||
/* = 접속 주소 : http://testpay.kcp.co.kr/pgsample/FAQ/search_error.jsp = */
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
/* = Copyright (c) 2010.02 KCP Inc. All Rights Reserverd. = */
|
||||
/* ============================================================================== */
|
||||
?>
|
||||
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" >
|
||||
<head>
|
||||
<title>*** KCP [AX-HUB Version] ***</title>
|
||||
<link href="css/sample.css" rel="stylesheet" type="text/css">
|
||||
|
||||
<script type="text/javascript">
|
||||
// 취소 버튼을 눌렀을 때 호출
|
||||
function jsf__go_cancel( form )
|
||||
{
|
||||
var RetVal = false ;
|
||||
if ( form.tno.value.length < 14 )
|
||||
{
|
||||
alert( "KCP 거래 번호를 입력하세요" );
|
||||
form.tno.focus();
|
||||
form.tno.select();
|
||||
}
|
||||
else
|
||||
{
|
||||
openwin = window.open( "proc_win.html", "proc_win", "width=449, height=209, top=300, left=300" );
|
||||
RetVal = true ;
|
||||
}
|
||||
return RetVal ;
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div align="center">
|
||||
<?
|
||||
/* ============================================================================== */
|
||||
/* = 1. 취소 요청 정보 입력 폼(cancel_info) = */
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
/* = 취소 요청에 필요한 정보를 설정합니다. = */
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
?>
|
||||
<form name="cancel_info" method="post" action="pp_ax_hub.php">
|
||||
|
||||
<table width="589" cellspacing="0" cellpadding="0">
|
||||
<tr style="height:14px"><td style="background-image:url('./img/boxtop589.gif')"></td></tr>
|
||||
<tr>
|
||||
<td style="background-image:url('./img/boxbg589.gif')" align="center">
|
||||
|
||||
<!-- 상단 테이블 Start -->
|
||||
<table width="551" cellspacing="0" cellpadding="16">
|
||||
<tr style="height:17px">
|
||||
<td style="background-image:url('./img/ttbg551.gif');border:0px" class="white">
|
||||
<span class="bold big">[취소요청]</span> 이 페이지는 결제건에 대해 취소를 요청하는 샘플(예시) 페이지입니다.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="background-image:url('./img/boxbg551.gif') ;">
|
||||
<p class="align_left">소스 수정시 소스 안에 <span class="red bold">※ 주의 ※</span>표시가 포함된 문장은
|
||||
가맹점의 상황에 맞게 적절히 수정 적용하시기 바랍니다.</p>
|
||||
<p class="align_left">이 페이지는 결제된 건에 대한 취소를 요청하는 페이지 입니다.</p>
|
||||
<p class="align_left">
|
||||
결제가 승인되면 결과값으로 KCP 거래번호(tno)값을 받으실 수 있습니다..<br/>
|
||||
가맹점에서는 이 KCP 거래번호(tno)값으로 취소요청을 하실 수 있습니다.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="height:11px"><td style="background:url('./img/boxbtm551.gif') no-repeat;"></td></tr>
|
||||
</table>
|
||||
<!-- 상단 테이블 End -->
|
||||
|
||||
<!-- 취소 요청 정보 입력 테이블 Start -->
|
||||
<table width="527" cellspacing="0" cellpadding="0" class="margin_top_20">
|
||||
<tr><td colspan="2" class="title">취소 요청 정보</td></tr>
|
||||
<!-- 요청 구분 : 취소 -->
|
||||
<tr>
|
||||
<td class="sub_title1">요청 구분</td>
|
||||
<td class="sub_content1 bold">취소 요청</td>
|
||||
</tr>
|
||||
<!-- Input : 결제된 건의 거래번호(14 byte) 입력 -->
|
||||
<tr>
|
||||
<td class="sub_title1">KCP 거래번호</td>
|
||||
<td class="sub_input1"><input type="text" name="tno" value="" class="frminput" size="20" maxlength="14"/></td>
|
||||
</tr>
|
||||
<!-- Input : 변경 사유(mod_desc) 입력 -->
|
||||
<tr>
|
||||
<td class="sub_title1">변경 사유</td>
|
||||
<td class="sub_input1"><input type="text" name="mod_desc" value="" class="frminput" size="30" maxlength="50"/></td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- 취소 요청 정보 입력 테이블 End -->
|
||||
|
||||
<!-- 요청 버튼 테이블 Start -->
|
||||
<table width="527" cellspacing="0" cellpadding="0" class="margin_top_20">
|
||||
<!-- 취소 요청/처음으로 이미지 버튼 -->
|
||||
<tr>
|
||||
<td colspan="2" align="center">
|
||||
<input type="image" src="./img/btn_cancel.gif" onclick="return jsf__go_cancel(this.form);" width="108" height="37" alt="취소를 요청합니다" /></a>
|
||||
<a href="index.html"><img src="./img/btn_home.gif" width="108" height="37" alt="처음으로 이동합니다" /></a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- 요청 버튼 테이블 End -->
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td><img src="./img/boxbtm589.gif" alt="Copyright(c) KCP Inc. All rights reserved."/></td></tr>
|
||||
</table>
|
||||
|
||||
<?
|
||||
/* ============================================================================== */
|
||||
/* = 1-1. 취소 요청 필수 정보 설정 = */
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
/* = ※ 필수 - 반드시 필요한 정보입니다. = */
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
?>
|
||||
<input type="hidden" name="req_tx" value="mod" />
|
||||
<input type="hidden" name="mod_type" value="STSC" />
|
||||
<?
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
/* = 1. 취소 요청 필수 정보 설정 End = */
|
||||
/* ============================================================================== */
|
||||
?>
|
||||
</form>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
56
mobile/shop/kcp/order_approval.php
Normal file
56
mobile/shop/kcp/order_approval.php
Normal file
@ -0,0 +1,56 @@
|
||||
<?php
|
||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
header("Cache-Control: no-store");
|
||||
header("Pragma: no-cache");
|
||||
|
||||
include "../settle_kcp.inc.php";
|
||||
require "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 모듈 설치 필요)" );
|
||||
}
|
||||
?>
|
||||
319
mobile/shop/kcp/order_approval_form.php
Normal file
319
mobile/shop/kcp/order_approval_form.php
Normal file
@ -0,0 +1,319 @@
|
||||
<?
|
||||
/* ============================================================================== */
|
||||
/* = 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 "../settle_kcp.inc.php"; // 환경설정 파일 include
|
||||
?>
|
||||
<?
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
/* = 환경 설정 파일 Include END = */
|
||||
/* ============================================================================== */
|
||||
?>
|
||||
<?
|
||||
/* kcp와 통신후 kcp 서버에서 전송되는 결제 요청 정보*/
|
||||
$req_tx = $_POST[ "req_tx" ]; // 요청 종류
|
||||
$res_cd = $_POST[ "res_cd" ]; // 응답 코드
|
||||
$tran_cd = $_POST[ "tran_cd" ]; // 트랜잭션 코드
|
||||
$ordr_idxx = $_POST[ "ordr_idxx" ]; // 쇼핑몰 주문번호
|
||||
$good_name = $_POST[ "good_name" ]; // 상품명
|
||||
$good_mny = $_POST[ "good_mny" ]; // 결제 총금액
|
||||
$buyr_name = $_POST[ "buyr_name" ]; // 주문자명
|
||||
$buyr_tel1 = $_POST[ "buyr_tel1" ]; // 주문자 전화번호
|
||||
$buyr_tel2 = $_POST[ "buyr_tel2" ]; // 주문자 핸드폰 번호
|
||||
$buyr_mail = $_POST[ "buyr_mail" ]; // 주문자 E-mail 주소
|
||||
$use_pay_method = $_POST[ "use_pay_method" ]; // 결제 방법
|
||||
$enc_info = $_POST[ "enc_info" ]; // 암호화 정보
|
||||
$enc_data = $_POST[ "enc_data" ]; // 암호화 데이터
|
||||
$rcvr_name = $_POST[ "rcvr_name" ]; // 수취인 이름
|
||||
$rcvr_tel1 = $_POST[ "rcvr_tel1" ]; // 수취인 전화번호
|
||||
$rcvr_tel2 = $_POST[ "rcvr_tel2" ]; // 수취인 휴대폰번호
|
||||
$rcvr_mail = $_POST[ "rcvr_mail" ]; // 수취인 E-Mail
|
||||
$rcvr_zipx = $_POST[ "rcvr_zipx" ]; // 수취인 우편번호
|
||||
$rcvr_add1 = $_POST[ "rcvr_add1" ]; // 수취인 주소
|
||||
$rcvr_add2 = $_POST[ "rcvr_add2" ]; // 수취인 상세주소
|
||||
|
||||
/* 주문폼에서 전송되는 정보 */
|
||||
$ipgm_date = $_POST[ "ipgm_date" ]; // 입금마감일
|
||||
$settle_method = $_POST[ "settle_method" ]; // 결제방법
|
||||
$good_info = $_POST[ "good_info" ]; // 에스크로 상품정보
|
||||
$bask_cntx = $_POST[ "bask_cntx" ]; // 장바구니 상품수
|
||||
$tablet_size = $_POST[ "tablet_size" ]; // 모바일기기 화면비율
|
||||
|
||||
/*
|
||||
* 기타 파라메터 추가 부분 - Start -
|
||||
*/
|
||||
$param_opt_1 = $_POST[ "param_opt_1" ]; // 기타 파라메터 추가 부분
|
||||
$param_opt_2 = $_POST[ "param_opt_2" ]; // 기타 파라메터 추가 부분
|
||||
$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);
|
||||
}
|
||||
|
||||
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;
|
||||
default:
|
||||
$pay_method = '';
|
||||
$ActionResult = '';
|
||||
break;
|
||||
}
|
||||
?>
|
||||
<!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; user-scalable=<?=$tablet_size?>; initial-scale=<?=$tablet_size?>; maximum-scale=<?=$tablet_size?>; minimum-scale=<?=$tablet_size?>">
|
||||
|
||||
<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="./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";
|
||||
v_frm.action = PayUrl;
|
||||
|
||||
if(v_frm.Ret_URL.value == "")
|
||||
{
|
||||
/* Ret_URL값은 현 페이지의 URL 입니다. */
|
||||
alert("연동시 Ret_URL을 반드시 설정하셔야 됩니다.");
|
||||
return false;
|
||||
}
|
||||
|
||||
v_frm.submit();
|
||||
}
|
||||
|
||||
|
||||
/* kcp 통신을 통해 받은 암호화 정보 체크 후 결제 요청*/
|
||||
function chk_pay()
|
||||
{
|
||||
/*kcp 결제서버에서 가맹점 주문페이지로 폼값을 보내기위한 설정(변경불가)*/
|
||||
|
||||
var sm_form = document.sm_form;
|
||||
|
||||
if (sm_form.res_cd.value == "3001" )
|
||||
{
|
||||
alert("사용자가 취소하였습니다.");
|
||||
window.close();
|
||||
return false;
|
||||
}
|
||||
else if (sm_form.res_cd.value == "3000" )
|
||||
{
|
||||
alert("30만원 이상 결제 할수 없습니다.");
|
||||
window.close();
|
||||
return false;
|
||||
}
|
||||
|
||||
if (sm_form.enc_data.value != "" && sm_form.enc_info.value != "" && sm_form.tran_cd.value !="" )
|
||||
{
|
||||
var of = window.opener.document.pay_form;
|
||||
|
||||
of.req_tx.value = "<?=$req_tx?>";
|
||||
of.res_cd.value = "<?=$res_cd?>";
|
||||
of.tran_cd.value = "<?=$tran_cd?>";
|
||||
of.ordr_idxx.value = "<?=$ordr_idxx?>";
|
||||
of.good_mny.value = "<?=$good_mny?>";
|
||||
of.good_name.value = "<?=$good_name?>";
|
||||
of.buyr_name.value = "<?=$buyr_name?>";
|
||||
of.buyr_tel1.value = "<?=$buyr_tel1?>";
|
||||
of.buyr_tel2.value = "<?=$buyr_tel2?>";
|
||||
of.buyr_mail.value = "<?=$buyr_mail?>";
|
||||
of.enc_info.value = "<?=$enc_info?>";
|
||||
of.enc_data.value = "<?=$enc_data?>";
|
||||
of.use_pay_method = "<?=$use_pay_method?>";
|
||||
of.rcvr_name.value = "<?=$rcvr_name?>";
|
||||
of.rcvr_tel1.value = "<?=$rcvr_tel1?>";
|
||||
of.rcvr_tel2.value = "<?=$rcvr_tel2?>";
|
||||
of.rcvr_mail.value = "<?=$rcvr_mail?>";
|
||||
of.rcvr_zipx.value = "<?=$rcvr_zipx?>";
|
||||
of.rcvr_add1.value = "<?=$rcvr_add1?>";
|
||||
of.rcvr_add2.value = "<?=$rcvr_add2?>";
|
||||
of.param_opt_1.value = "<?=$param_opt_1?>";
|
||||
of.param_opt_2.value = "<?=$param_opt_2?>";
|
||||
of.param_opt_3.value = "<?=$param_opt_3?>";
|
||||
|
||||
var od = window.opener.document;
|
||||
od.getElementById("show_req_btn").style.display = "none";
|
||||
od.getElementById("show_progress").style.display = "inline";
|
||||
od.getElementById("show_pay_btn").style.display = "inline";
|
||||
|
||||
window.close();
|
||||
} else {
|
||||
kcp_AJAX();
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body onload="chk_pay();">
|
||||
|
||||
<div id="content">
|
||||
|
||||
<form name="sm_form" method="POST" accept-charset="euc-kr">
|
||||
|
||||
<input type="hidden" name='good_name' value='<?=$good_name?>'>
|
||||
<input type="hidden" name='good_mny' value='<?=$good_mny?>' >
|
||||
<input type="hidden" name='buyr_name' value="<?=$buyr_name?>">
|
||||
<input type="hidden" name='buyr_tel1' value='<?=$buyr_tel1?>'>
|
||||
<input type="hidden" name='buyr_tel2' value='<?=$buyr_tel2?>'>
|
||||
<input type="hidden" name='buyr_mail' value='<?=$buyr_mail?>'>
|
||||
<input type="hidden" name='ipgm_date' value='<?=$ipgm_date?>'>
|
||||
|
||||
<!-- 필수 사항 -->
|
||||
|
||||
<!-- 요청 구분 -->
|
||||
<input type='hidden' name='req_tx' value='pay'>
|
||||
<!-- 사이트 코드 -->
|
||||
<input type="hidden" name='site_cd' value="<?=$g_conf_site_cd?>">
|
||||
<!-- 사이트 키 -->
|
||||
<input type='hidden' name='site_key' value='<?=$g_conf_site_key?>'>
|
||||
<!-- 사이트 이름 -->
|
||||
<input type="hidden" name='shop_name' value="<?=$g_conf_site_name?>">
|
||||
<!-- 결제수단-->
|
||||
<input type="hidden" name='pay_method' value="<?=$pay_method?>">
|
||||
<!-- 주문번호 -->
|
||||
<input type="hidden" name='ordr_idxx' value="<?=$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="http://chicpro.chin.so/kcp_smart/kcp/order_approval_form.php">
|
||||
<!-- 인증시 필요한 파라미터(변경불가)-->
|
||||
<input type='hidden' name='ActionResult' value='<?=$ActionResult?>'>
|
||||
<!-- 에스크로 사용유무 에스크로 사용 업체(가상계좌만 해당)는 Y로 세팅 해주시기 바랍니다.-->
|
||||
<input type="hidden" name='escw_used' value='Y'>
|
||||
<!-- 에스크로 결제처리모드 -->
|
||||
<input type="hidden" name='pay_mod' value='O'>
|
||||
<!-- 수취인이름 -->
|
||||
<input type='hidden' name='rcvr_name' value='<?=$rcvr_name?>'>
|
||||
<!-- 수취인 연락처 -->
|
||||
<input type='hidden' name='rcvr_tel1' value='<?=$rcvr_tel1?>'>
|
||||
<!-- 수취인 휴대폰 번호 -->
|
||||
<input type='hidden' name='rcvr_tel2' value='<?=$rcvr_tel2?>'>
|
||||
<!-- 수취인 E-MAIL -->
|
||||
<input type='hidden' name='rcvr_add1' value='<?=$rcvr_add1?>'>
|
||||
<!-- 수취인 우편번호 -->
|
||||
<input type='hidden' name='rcvr_add2' value='<?=$rcvr_add2?>'>
|
||||
<!-- 수취인 주소 -->
|
||||
<input type='hidden' name='rcvr_mail' value='<?=$rcvr_mail?>'>
|
||||
<!-- 수취인 상세 주소 -->
|
||||
<input type='hidden' name='rcvr_zipx' value='<?=$rcvr_zipx?>'>
|
||||
<!-- 장바구니 상품 개수 -->
|
||||
<input type='hidden' name='bask_cntx' value="<?=$bask_cntx?>">
|
||||
<!-- 장바구니 정보(상단 스크립트 참조) -->
|
||||
<input type='hidden' name='good_info' value="<?=$good_info?>">
|
||||
<!-- 배송소요기간 -->
|
||||
<input type="hidden" name='deli_term' value='03'>
|
||||
<!-- 기타 파라메터 추가 부분 - Start - -->
|
||||
<input type="hidden" name='param_opt_1' value="<?=$param_opt_1?>"/>
|
||||
<input type="hidden" name='param_opt_2' value="<?=$param_opt_2?>"/>
|
||||
<input type="hidden" name='param_opt_3' value="<?=$param_opt_3?>"/>
|
||||
<!-- 기타 파라메터 추가 부분 - End - -->
|
||||
<!-- 화면 크기조정 부분 - Start - -->
|
||||
<input type="hidden" name='tablet_size' value="<?=$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="res_cd" value="<?=$res_cd?>"> <!-- 결과 코드 -->
|
||||
<input type="hidden" name="tran_cd" value="<?=$tran_cd?>"> <!-- 트랜잭션 코드 -->
|
||||
<input type="hidden" name="enc_info" value="<?=$enc_info?>"> <!-- 암호화 정보 -->
|
||||
<input type="hidden" name="enc_data" value="<?=$enc_data?>"> <!-- 암호화 데이터 -->
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<!-- 스마트폰에서 KCP 결제창을 레이어 형태로 구현-->
|
||||
<div id="layer_receipt" style="position:absolute; left:1px; top:1px; width:310;height:400; z-index:1; display:none;">
|
||||
<table width="310" border="-" cellspacing="0" cellpadding="0" style="text-align:center">
|
||||
<tr>
|
||||
<td>
|
||||
<iframe name="frm_receipt" frameborder="0" border="0" width="310" height="400" scrolling="auto"></iframe>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
424
mobile/shop/kcp/pp_ax_hub.php
Normal file
424
mobile/shop/kcp/pp_ax_hub.php
Normal file
@ -0,0 +1,424 @@
|
||||
<?
|
||||
/* ============================================================================== */
|
||||
/* = 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 "../settle_kcp.inc.php"; // 환경설정 파일 include
|
||||
require "pp_ax_hub_lib.php"; // library [수정불가]
|
||||
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
/* = 환경 설정 파일 Include END = */
|
||||
/* ============================================================================== */
|
||||
?>
|
||||
|
||||
<?
|
||||
/* ============================================================================== */
|
||||
/* = 01. 지불 요청 정보 설정 = */
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
$req_tx = $_POST[ "req_tx" ]; // 요청 종류
|
||||
$tran_cd = $_POST[ "tran_cd" ]; // 처리 종류
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
$cust_ip = getenv( "REMOTE_ADDR" ); // 요청 IP
|
||||
$ordr_idxx = $_POST[ "ordr_idxx" ]; // 쇼핑몰 주문번호
|
||||
$good_name = addslashes($_POST[ "good_name" ]); // 상품명
|
||||
$good_mny = $_POST[ "good_mny" ]; // 결제 총금액
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
$res_cd = ""; // 응답코드
|
||||
$res_msg = ""; // 응답메시지
|
||||
$tno = $_POST[ "tno" ]; // KCP 거래 고유 번호
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
$buyr_name = addslashes($_POST[ "buyr_name" ]); // 주문자명
|
||||
$buyr_tel1 = $_POST[ "buyr_tel1" ]; // 주문자 전화번호
|
||||
$buyr_tel2 = $_POST[ "buyr_tel2" ]; // 주문자 핸드폰 번호
|
||||
$buyr_mail = $_POST[ "buyr_mail" ]; // 주문자 E-mail 주소
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
$mod_type = $_POST[ "mod_type" ]; // 변경TYPE VALUE 승인취소시 필요
|
||||
$mod_desc = $_POST[ "mod_desc" ]; // 변경사유
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
$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 = $_POST[ "cash_yn" ]; // 현금영수증 등록 여부
|
||||
$cash_authno = ""; // 현금 영수증 승인 번호
|
||||
$cash_tr_code = $_POST[ "cash_tr_code" ]; // 현금 영수증 발행 구분
|
||||
$cash_id_info = $_POST[ "cash_id_info" ]; // 현금 영수증 등록 번호
|
||||
/* ============================================================================== */
|
||||
|
||||
/* ============================================================================== */
|
||||
/* = 02. 인스턴스 생성 및 초기화 = */
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
/* = 결제에 필요한 인스턴스를 생성하고 초기화 합니다. = */
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
$c_PayPlus = new C_PP_CLI;
|
||||
|
||||
$c_PayPlus->mf_clear();
|
||||
/* ------------------------------------------------------------------------------ */
|
||||
/* = 02. 인스턴스 생성 및 초기화 END = */
|
||||
/* ============================================================================== */
|
||||
|
||||
|
||||
/* ============================================================================== */
|
||||
/* = 03. 처리 요청 정보 설정 = */
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
/* = 03-1. 승인 요청 = */
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
if ( $req_tx == "pay" )
|
||||
{
|
||||
$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 ); // 응답 전문 처리
|
||||
|
||||
$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값이 설정되지 않았습니다.";
|
||||
}
|
||||
|
||||
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
/* = 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" ); // 할부 개월 수
|
||||
}
|
||||
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
/* = 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" ); // 현금 영수증 승인 번호
|
||||
|
||||
}
|
||||
}
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
/* = 05. 승인 결과 처리 END = */
|
||||
/* ============================================================================== */
|
||||
|
||||
/* ============================================================================== */
|
||||
/* = 06. 승인 및 실패 결과 DB처리 = */
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
/* = 결과를 업체 자체적으로 DB처리 작업하시는 부분입니다. = */
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
|
||||
if ( $req_tx == "pay" )
|
||||
{
|
||||
if( $res_cd == "0000" )
|
||||
{
|
||||
// 06-1-1. 신용카드
|
||||
if ( $use_pay_method == "100000000000" )
|
||||
{
|
||||
}
|
||||
// 06-1-2. 계좌이체
|
||||
if ( $use_pay_method == "010000000000" )
|
||||
{
|
||||
}
|
||||
// 06-1-3. 가상계좌
|
||||
if ( $use_pay_method == "001000000000" )
|
||||
{
|
||||
}
|
||||
// 06-1-4. 포인트
|
||||
if ( $use_pay_method == "000100000000" )
|
||||
{
|
||||
}
|
||||
// 06-1-5. 휴대폰
|
||||
if ( $use_pay_method == "000010000000" )
|
||||
{
|
||||
}
|
||||
// 06-1-6. 상품권
|
||||
if ( $use_pay_method == "000000001000" )
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
/* = 06. 승인 및 실패 결과 DB처리 = */
|
||||
/* ============================================================================== */
|
||||
else if ( $req_cd != "0000" )
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
/* ============================================================================== */
|
||||
/* = 07. 승인 결과 DB처리 실패시 : 자동취소 = */
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
/* = 승인 결과를 DB 작업 하는 과정에서 정상적으로 승인된 건에 대해 = */
|
||||
/* = DB 작업을 실패하여 DB update 가 완료되지 않은 경우, 자동으로 = */
|
||||
/* = 승인 취소 요청을 하는 프로세스가 구성되어 있습니다. = */
|
||||
/* = = */
|
||||
/* = DB 작업이 실패 한 경우, bSucc 라는 변수(String)의 값을 "false" = */
|
||||
/* = 로 설정해 주시기 바랍니다. (DB 작업 성공의 경우에는 "false" 이외의 = */
|
||||
/* = 값을 설정하시면 됩니다.) = */
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
|
||||
$bSucc = ""; // 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", "결과 처리 오류 - 자동 취소" ); // 변경 사유
|
||||
|
||||
$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"]
|
||||
/* ============================================================================== */
|
||||
|
||||
|
||||
/* ============================================================================== */
|
||||
/* = 08. 폼 구성 및 결과페이지 호출 = */
|
||||
/* ============================================================================== */
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
<title>스마트폰 웹 결제창</title>
|
||||
<script type="text/javascript">
|
||||
function goResult()
|
||||
{
|
||||
document.pay_info.submit()
|
||||
}
|
||||
|
||||
// 결제 중 새로고침 방지 샘플 스크립트 (중복결제 방지)
|
||||
function noRefresh()
|
||||
{
|
||||
/* CTRL + N키 막음. */
|
||||
if ((event.keyCode == 78) && (event.ctrlKey == true))
|
||||
{
|
||||
event.keyCode = 0;
|
||||
return false;
|
||||
}
|
||||
/* F5 번키 막음. */
|
||||
if(event.keyCode == 116)
|
||||
{
|
||||
event.keyCode = 0;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
document.onkeydown = noRefresh ;
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body onload="goResult()">
|
||||
<form name="pay_info" method="post" action="./result.php">
|
||||
<input type="hidden" name="site_cd" value="<?=$g_conf_site_cd ?>"> <!-- 사이트코드 -->
|
||||
<input type="hidden" name="req_tx" value="<?=$req_tx ?>"> <!-- 요청 구분 -->
|
||||
<input type="hidden" name="use_pay_method" value="<?=$use_pay_method ?>"> <!-- 사용한 결제 수단 -->
|
||||
<input type="hidden" name="bSucc" value="<?=$bSucc ?>"> <!-- 쇼핑몰 DB 처리 성공 여부 -->
|
||||
|
||||
<input type="hidden" name="res_cd" value="<?=$res_cd ?>"> <!-- 결과 코드 -->
|
||||
<input type="hidden" name="res_msg" value="<?=$res_msg ?>"> <!-- 결과 메세지 -->
|
||||
<input type="hidden" name="ordr_idxx" value="<?=$ordr_idxx ?>"> <!-- 주문번호 -->
|
||||
<input type="hidden" name="tno" value="<?=$tno ?>"> <!-- KCP 거래번호 -->
|
||||
<input type="hidden" name="good_mny" value="<?=$good_mny ?>"> <!-- 결제금액 -->
|
||||
<input type="hidden" name="good_name" value="<?=$good_name ?>"> <!-- 상품명 -->
|
||||
<input type="hidden" name="buyr_name" value="<?=$buyr_name ?>"> <!-- 주문자명 -->
|
||||
<input type="hidden" name="buyr_tel1" value="<?=$buyr_tel1 ?>"> <!-- 주문자 전화번호 -->
|
||||
<input type="hidden" name="buyr_tel2" value="<?=$buyr_tel2 ?>"> <!-- 주문자 휴대폰번호 -->
|
||||
<input type="hidden" name="buyr_mail" value="<?=$buyr_mail ?>"> <!-- 주문자 E-mail -->
|
||||
|
||||
<input type="hidden" name="card_cd" value="<?=$card_cd ?>"> <!-- 카드코드 -->
|
||||
<input type="hidden" name="card_name" value="<?=$card_name ?>"> <!-- 카드명 -->
|
||||
<input type="hidden" name="app_time" value="<?=$app_time ?>"> <!-- 승인시간 -->
|
||||
<input type="hidden" name="app_no" value="<?=$app_no ?>"> <!-- 승인번호 -->
|
||||
<input type="hidden" name="quota" value="<?=$quota ?>"> <!-- 할부개월 -->
|
||||
<input type="hidden" name="noinf" value="<?=$noinf ?>"> <!-- 무이자여부 -->
|
||||
|
||||
<input type="hidden" name="bank_name" value="<?=$bank_name ?>"> <!-- 은행명 -->
|
||||
<input type="hidden" name="bank_code" value="<?=$bank_code ?>"> <!-- 은행코드 -->
|
||||
|
||||
<input type="hidden" name="bankname" value="<?=$bankname ?>"> <!-- 입금할 은행 -->
|
||||
<input type="hidden" name="depositor" value="<?=$depositor ?>"> <!-- 입금할 계좌 예금주 -->
|
||||
<input type="hidden" name="account" value="<?=$account ?>"> <!-- 입금할 계좌 번호 -->
|
||||
|
||||
<input type="hidden" name="pnt_issue" value="<?=$pnt_issue ?>"> <!-- 포인트 서비스사 -->
|
||||
<input type="hidden" name="pnt_app_time" value="<?=$pnt_app_time ?>"> <!-- 승인시간 -->
|
||||
<input type="hidden" name="pnt_app_no" value="<?=$pnt_app_no ?>"> <!-- 승인번호 -->
|
||||
<input type="hidden" name="pnt_amount" value="<?=$pnt_amount ?>"> <!-- 적립금액 or 사용금액 -->
|
||||
<input type="hidden" name="add_pnt" value="<?=$add_pnt ?>"> <!-- 발생 포인트 -->
|
||||
<input type="hidden" name="use_pnt" value="<?=$use_pnt ?>"> <!-- 사용가능 포인트 -->
|
||||
<input type="hidden" name="rsv_pnt" value="<?=$rsv_pnt ?>"> <!-- 적립 포인트 -->
|
||||
|
||||
<input type="hidden" name="commid" value="<?=$commid ?>"> <!-- 통신사 코드 -->
|
||||
<input type="hidden" name="mobile_no" value="<?=$mobile_no ?>"> <!-- 휴대폰 번호 -->
|
||||
|
||||
<input type="hidden" name="tk_van_code" value="<?=$tk_van_code ?>"> <!-- 발급사 코드 -->
|
||||
<input type="hidden" name="tk_app_time" value="<?=$tk_app_time ?>"> <!-- 승인 시간 -->
|
||||
<input type="hidden" name="tk_app_no" value="<?=$tk_app_no ?>"> <!-- 승인 번호 -->
|
||||
|
||||
<input type="hidden" name="cash_yn" value="<?=$cash_yn ?>"> <!-- 현금영수증 등록 여부 -->
|
||||
<input type="hidden" name="cash_authno" value="<?=$cash_authno ?>"> <!-- 현금 영수증 승인 번호 -->
|
||||
<input type="hidden" name="cash_tr_code" value="<?=$cash_tr_code ?>"> <!-- 현금 영수증 발행 구분 -->
|
||||
<input type="hidden" name="cash_id_info" value="<?=$cash_id_info ?>"> <!-- 현금 영수증 등록 번호 -->
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
260
mobile/shop/kcp/pp_ax_hub_lib.php
Normal file
260
mobile/shop/kcp/pp_ax_hub_lib.php
Normal file
@ -0,0 +1,260 @@
|
||||
<?
|
||||
/* ============================================================================== */
|
||||
/* = PAGE : 라이브버리 PAGE = */
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
/* = Copyright (c) 2010.02 KCP Inc. All Rights Reserverd. = */
|
||||
/* ============================================================================== */
|
||||
|
||||
/* ============================================================================== */
|
||||
/* = 지불 연동 CLASS = */
|
||||
/* ============================================================================== */
|
||||
class C_PP_CLI
|
||||
{
|
||||
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 )
|
||||
{
|
||||
$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
|
||||
{
|
||||
$res_data = $this->mf_exec( $home_dir . "/bin/pp_cli",
|
||||
"-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_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 $this->m_res_data[ $name ];
|
||||
}
|
||||
|
||||
function mf_get_payx_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 );
|
||||
|
||||
while ( list(,$i) = each($arg) )
|
||||
{
|
||||
$exec_cmd .= " " . escapeshellarg( $i );
|
||||
}
|
||||
|
||||
$rt = exec( $exec_cmd );
|
||||
|
||||
return $rt;
|
||||
}
|
||||
}
|
||||
?>
|
||||
145
mobile/shop/kcp/real_KCPPaymentService.wsdl
Normal file
145
mobile/shop/kcp/real_KCPPaymentService.wsdl
Normal file
@ -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>
|
||||
433
mobile/shop/kcp/result.php
Normal file
433
mobile/shop/kcp/result.php
Normal file
@ -0,0 +1,433 @@
|
||||
<?
|
||||
/* ============================================================================== */
|
||||
/* = PAGE : 결과 처리 PAGE = */
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
/* = pp_ax_hub.php 파일에서 처리된 결과값을 출력하는 페이지입니다. = */
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
/* = 연동시 오류가 발생하는 경우 아래의 주소로 접속하셔서 확인하시기 바랍니다.= */
|
||||
/* = 접속 주소 : http://testpay.kcp.co.kr/pgsample/FAQ/search_error.jsp = */
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
/* = Copyright (c) 2010.05 KCP Inc. All Rights Reserved. = */
|
||||
/* ============================================================================== */
|
||||
?>
|
||||
<?
|
||||
/* ============================================================================== */
|
||||
/* = 지불 결과 = */
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
$site_cd = $_POST[ "site_cd" ]; // 사이트코드
|
||||
$req_tx = $_POST[ "req_tx" ]; // 요청 구분(승인/취소)
|
||||
$use_pay_method = $_POST[ "use_pay_method" ]; // 사용 결제 수단
|
||||
$bSucc = $_POST[ "bSucc" ]; // 업체 DB 정상처리 완료 여부
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
$res_cd = $_POST[ "res_cd" ]; // 결과코드
|
||||
$res_msg = iconv("euc-kr", "utf-8", $_POST[ "res_msg" ]); // 결과메시지
|
||||
$res_msg_bsucc = "";
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
$ordr_idxx = $_POST[ "ordr_idxx" ]; // 주문번호
|
||||
$tno = $_POST[ "tno" ]; // KCP 거래번호
|
||||
$good_mny = $_POST[ "good_mny" ]; // 결제금액
|
||||
$good_name = $_POST[ "good_name" ]; // 상품명
|
||||
$buyr_name = $_POST[ "buyr_name" ]; // 구매자명
|
||||
$buyr_tel1 = $_POST[ "buyr_tel1" ]; // 구매자 전화번호
|
||||
$buyr_tel2 = $_POST[ "buyr_tel2" ]; // 구매자 휴대폰번호
|
||||
$buyr_mail = $_POST[ "buyr_mail" ]; // 구매자 E-Mail
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
// 공통
|
||||
$pnt_issue = $_POST[ "pnt_issue" ]; // 포인트 서비스사
|
||||
$app_time = $_POST[ "app_time" ]; // 승인시간 (공통)
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
// 신용카드
|
||||
$card_cd = $_POST[ "card_cd" ]; // 카드코드
|
||||
$card_name = $_POST[ "card_name" ]; // 카드명
|
||||
$noinf = $_POST[ "noinf" ]; // 무이자 여부
|
||||
$quota = $_POST[ "quota" ]; // 할부개월
|
||||
$app_no = $_POST[ "app_no" ]; // 승인번호
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
// 계좌이체
|
||||
$bank_name = $_POST[ "bank_name" ]; // 은행명
|
||||
$bank_code = $_POST[ "bank_code" ]; // 은행코드
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
// 가상계좌
|
||||
$bankname = $_POST[ "bankname" ]; // 입금할 은행
|
||||
$depositor = $_POST[ "depositor" ]; // 입금할 계좌 예금주
|
||||
$account = $_POST[ "account" ]; // 입금할 계좌 번호
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
// 포인트
|
||||
$pt_idno = $_POST[ "pt_idno" ]; // 결제 및 인증 아이디
|
||||
$add_pnt = $_POST[ "add_pnt" ]; // 발생 포인트
|
||||
$use_pnt = $_POST[ "use_pnt" ]; // 사용가능 포인트
|
||||
$rsv_pnt = $_POST[ "rsv_pnt" ]; // 총 누적 포인트
|
||||
$pnt_app_time = $_POST[ "pnt_app_time" ]; // 승인시간
|
||||
$pnt_app_no = $_POST[ "pnt_app_no" ]; // 승인번호
|
||||
$pnt_amount = $_POST[ "pnt_amount" ]; // 적립금액 or 사용금액
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
//상품권
|
||||
$tk_van_code = $_POST[ "tk_van_code" ]; // 발급사 코드
|
||||
$tk_app_no = $_POST[ "tk_app_no" ]; // 승인 번호
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
//휴대폰
|
||||
$commid = $_POST[ "commid" ]; // 통신사 코드
|
||||
$mobile_no = $_POST[ "mobile_no" ]; // 휴대폰 번호
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
// 현금영수증
|
||||
$cash_yn = $_POST[ "cash_yn" ]; //현금영수증 등록 여부
|
||||
$cash_authno = $_POST[ "cash_authno" ]; //현금영수증 승인 번호
|
||||
$cash_tr_code = $_POST[ "cash_tr_code" ]; //현금영수증 발행 구분
|
||||
$cash_id_info = $_POST[ "cash_id_info" ]; //현금영수증 등록 번호
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
|
||||
$req_tx_name = "";
|
||||
|
||||
if( $req_tx == "pay" )
|
||||
{
|
||||
$req_tx_name = "지불";
|
||||
}
|
||||
else if( $req_tx == "mod" )
|
||||
{
|
||||
$req_tx_name = "매입/취소";
|
||||
}
|
||||
|
||||
/* ============================================================================== */
|
||||
/* = 가맹점 측 DB 처리 실패시 상세 결과 메시지 설정 = */
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
|
||||
if($req_tx == "pay")
|
||||
{
|
||||
//업체 DB 처리 실패
|
||||
if($bSucc == "false")
|
||||
{
|
||||
if ($res_cd == "0000")
|
||||
{
|
||||
$res_msg_bsucc = "결제는 정상적으로 이루어졌지만 업체에서 결제 결과를 처리하는 중 오류가 발생하여 시스템에서 자동으로 취소 요청을 하였습니다. <br> 업체로 문의하여 확인하시기 바랍니다.";
|
||||
}
|
||||
else
|
||||
{
|
||||
$res_msg_bsucc = "결제는 정상적으로 이루어졌지만 업체에서 결제 결과를 처리하는 중 오류가 발생하여 시스템에서 자동으로 취소 요청을 하였으나, <br> <b>취소가 실패 되었습니다.</b><br> 업체로 문의하여 확인하시기 바랍니다.";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
/* = 가맹점 측 DB 처리 실패시 상세 결과 메시지 설정 끝 = */
|
||||
/* ============================================================================== */
|
||||
?>
|
||||
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
|
||||
<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">
|
||||
<link href="css/sample.css" rel="stylesheet" type="text/css">
|
||||
<script type="text/javascript">
|
||||
/* 신용카드 영수증 연동 스크립트 */
|
||||
function receiptView(tno)
|
||||
{
|
||||
receiptWin = "https://admin.kcp.co.kr/Modules/Sale/Card/ADSA_CARD_BILL_Receipt.jsp?c_trade_no=" + tno;
|
||||
window.open(receiptWin , "" , "width=420, height=670");
|
||||
}
|
||||
|
||||
/* 현금영수증 연동 스크립트 */
|
||||
function receiptView2( site_cd, order_id, bill_yn, auth_no )
|
||||
{
|
||||
receiptWin2 = "https://admin.kcp.co.kr/Modules/Service/Cash/Cash_Bill_Common_View.jsp";
|
||||
receiptWin2 += "?";
|
||||
receiptWin2 += "term_id=PGNW" + site_cd + "&";
|
||||
receiptWin2 += "orderid=" + order_id + "&";
|
||||
receiptWin2 += "bill_yn=" + bill_yn + "&";
|
||||
receiptWin2 += "authno=" + auth_no ;
|
||||
|
||||
window.open(receiptWin2 , "" , "width=360, height=645");
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div align="center">
|
||||
<table width="589" cellspacing="0" cellpadding="0">
|
||||
<tr style="height:14px"><td style="background-image:url('./img/boxtop589.gif')"></td></tr>
|
||||
<tr>
|
||||
<td style="background-image:url('./img/boxbg589.gif') " align="center">
|
||||
<table width="551" cellspacing="0" cellpadding="16">
|
||||
<tr style="height:17px">
|
||||
<td style="background-image:url('./img/ttbg551.gif');border:0px " class="white">
|
||||
<span class="bold big">[결과출력]</span> 이 페이지는 결제 결과를 출력하는 샘플(예시) 페이지입니다.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="background-image:url('./img/boxbg551.gif');" >
|
||||
결제 결과를 출력하는 페이지 입니다.<br/>
|
||||
요청이 정상적으로 처리된 경우 결과코드(res_cd)값이 0000으로 표시됩니다.
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="height:11px"><td style="background:url('./img/boxbtm551.gif') no-repeat;"></td></tr>
|
||||
</table>
|
||||
|
||||
|
||||
<?
|
||||
/* ============================================================================== */
|
||||
/* = 결제 결과 코드 및 메시지 출력(결과페이지에 반드시 출력해주시기 바랍니다.)= */
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
/* = 결제 정상 : res_cd값이 0000으로 설정됩니다. = */
|
||||
/* = 결제 실패 : res_cd값이 0000이외의 값으로 설정됩니다. = */
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
?>
|
||||
<table width="85%" align="center" border="0" cellpadding="0" cellspacing="1" class="margin_top_20">
|
||||
<tr><td colspan="2" class="title">처리 결과(<?=$req_tx_name?>)</td></tr>
|
||||
<!-- 결과 코드 -->
|
||||
<tr><td class="sub_title1">결과코드</td><td class="sub_content1"><?=$res_cd?></td></tr>
|
||||
<!-- 결과 메시지 -->
|
||||
<tr><td class="sub_title1">결과 메세지</td><td class="sub_content1"><?=$res_msg?></td></tr>
|
||||
<?
|
||||
// 처리 페이지(pp_cli_hub.jsp)에서 가맹점 DB처리 작업이 실패한 경우 상세메시지를 출력합니다.
|
||||
if( !$res_msg_bsucc == "")
|
||||
{
|
||||
?>
|
||||
<tr><td class="sub_title1">결과 상세 메세지</td><td><?=$res_msg_bsucc?></td></tr>
|
||||
<?
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
|
||||
<?
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
/* = 결제 결과 코드 및 메시지 출력 끝 = */
|
||||
/* ============================================================================== */
|
||||
|
||||
/* ============================================================================== */
|
||||
/* = 01. 결제 결과 출력 = */
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
if ( $req_tx == "pay" ) // 거래 구분 : 승인
|
||||
{
|
||||
/* ============================================================================== */
|
||||
/* = 01-1. 업체 DB 처리 정상 (bSucc값이 false가 아닌 경우) = */
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
if ( $bSucc != "false" ) // 업체 DB 처리 정상
|
||||
{
|
||||
/* ============================================================================== */
|
||||
/* = 01-1-1. 정상 결제시 결제 결과 출력 (res_cd값이 0000인 경우) = */
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
if ( $res_cd == "0000" ) // 정상 승인
|
||||
{
|
||||
?>
|
||||
<table width="85%" align="center" border="0" cellpadding="0" cellspacing="1" class="margin_top_10">
|
||||
<tr><td colspan="2" class="title">주 문 정 보</td></tr>
|
||||
<!-- 주문번호 -->
|
||||
<tr><td class="sub_title1">주문번호</td><td class="sub_content1"><?=$ordr_idxx?></td></tr>
|
||||
<!-- KCP 거래번호 -->
|
||||
<tr><td class="sub_title1">KCP 거래번호</td><td class="sub_content1"><?=$tno?></td></tr>
|
||||
<!-- 결제금액 -->
|
||||
<tr><td class="sub_title1">결제금액</td><td class="sub_content1"><?=$good_mny?>원</td></tr>
|
||||
<!-- 상품명(good_name) -->
|
||||
<tr><td class="sub_title1">상품명</td><td class="sub_content1"><?=$good_name?></td></tr>
|
||||
<!-- 주문자명 -->
|
||||
<tr><td class="sub_title1">주문자명</td><td class="sub_content1"><?=$buyr_name?></td></tr>
|
||||
<!-- 주문자 전화번호 -->
|
||||
<tr><td class="sub_title1">주문자 전화번호</td><td class="sub_content1"><?=$buyr_tel1?></td></tr>
|
||||
<!-- 주문자 휴대폰번호 -->
|
||||
<tr><td class="sub_title1">주문자 휴대폰번호</td><td class="sub_content1"><?=$buyr_tel2?></td></tr>
|
||||
<!-- 주문자 E-mail -->
|
||||
<tr><td class="sub_title1">주문자 E-mail</td><td class="sub_content1"><?=$buyr_mail?></td></tr>
|
||||
</table>
|
||||
|
||||
<?
|
||||
/* ============================================================================== */
|
||||
/* = 신용카드 결제결과 출력 = */
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
if ( $use_pay_method == "100000000000" ) // 신용카드
|
||||
{
|
||||
?>
|
||||
<table width="85%" align="center" cellpadding="0" cellspacing="0" class="margin_top_10">
|
||||
<tr><td colspan="2" class="title">신용카드 정보</td></tr>
|
||||
<!-- 결제수단 : 신용카드 -->
|
||||
<tr><td class="sub_title1">결제수단</td><td class="sub_content1">신용카드</td></tr>
|
||||
<!-- 결제 카드 -->
|
||||
<tr><td class="sub_title1">결제카드</td><td class="sub_content1"><?=$card_cd?> / <?=$card_name?></td></tr>
|
||||
<!-- 승인시간 -->
|
||||
<tr><td class="sub_title1">승인시간</td><td class="sub_content1"><?=$app_time?></td></tr>
|
||||
<!-- 승인번호 -->
|
||||
<tr><td class="sub_title1">승인번호</td><td class="sub_content1"><?=$app_no?></td></tr>
|
||||
<!-- 할부개월 -->
|
||||
<tr><td class="sub_title1">할부개월</td><td class="sub_content1"><?=$quota?></td></tr>
|
||||
<!-- 무이자여부 -->
|
||||
<tr><td class="sub_title1">무이자여부</td><td class="sub_content1"><?=$noinf?></td></tr>
|
||||
|
||||
<?
|
||||
/* ============================================================================== */
|
||||
/* = 신용카드 영수증 출력 = */
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
/* 실제 거래건에 대해서 영수증을 출력 할 수 있습니다. = */
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
?>
|
||||
<tr>
|
||||
<td class="sub_title1">영수증 확인</td>
|
||||
<td class="sub_content1"><a href="javascript:receiptView('<?=$tno?>')"><img src="./img/btn_receipt.gif" alt="영수증을 확인합니다." />
|
||||
</td>
|
||||
<tr><td colspan="2">※ 영수증 확인은 실제결제의 경우에만 가능합니다.</td></tr>
|
||||
<tr class="line2"><td colspan="2" bgcolor="#bbcbdb"></td></tr>
|
||||
</table>
|
||||
<?
|
||||
}
|
||||
/* ============================================================================== */
|
||||
/* = 계좌이체 결제 결과 출력 = */
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
else if ( $use_pay_method == "010000000000" ) // 계좌이체
|
||||
{
|
||||
?>
|
||||
<table width="85%" align="center" cellpadding="0" cellspacing="0" class="margin_top_10">
|
||||
<tr><td colspan="2" class="title">계좌이체 정보</td></tr>
|
||||
<!-- 결제수단 : 계좌이체 -->
|
||||
<tr><td class="sub_title1">결제수단</td><td class="sub_content1">계좌이체</td></tr>
|
||||
<!-- 이체 은행 -->
|
||||
<tr><td class="sub_title1">이체 은행</td><td class="sub_content1"><?=$bank_name?></td></tr>
|
||||
<!-- 이체 은행코드 -->
|
||||
<tr><td class="sub_title1">이체 은행코드</td><td class="sub_content1"><?=$bank_code?></td></tr>
|
||||
<!-- 승인 시간 -->
|
||||
<tr><td class="sub_title1">승인 시간</td><td class="sub_content1"><?=$app_time?></td></tr>
|
||||
|
||||
</table>
|
||||
<?
|
||||
}
|
||||
/* ============================================================================== */
|
||||
/* = 가상계좌 결제 결과 출력 = */
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
else if ( $use_pay_method == "001000000000" ) // 가상계좌
|
||||
{
|
||||
?>
|
||||
<table width="85%" align="center" cellpadding="0" cellspacing="0" class="margin_top_10">
|
||||
<tr><td colspan="2" class="title">가상계좌 정보</td></tr>
|
||||
<!-- 결제수단 : 가상계좌 -->
|
||||
<tr><td class="sub_title1">결제수단</td><td class="sub_content1">가상계좌</td></tr>
|
||||
<!-- 입금할 은행 -->
|
||||
<tr><td class="sub_title1">입금할 은행</td><td class="sub_content1"><?=$bankname?></td></tr>
|
||||
<!-- 입금할 계좌 예금주 -->
|
||||
<tr><td class="sub_title1">입금할 계좌 예금주</td><td class="sub_content1"><?=$depositor?></td></tr>
|
||||
<!-- 입금할 계좌 번호 -->
|
||||
<tr><td class="sub_title1">입금할 계좌 번호</td><td class="sub_content1"><?=$account?></td></tr>
|
||||
|
||||
</table>
|
||||
<?
|
||||
}
|
||||
/* ============================================================================== */
|
||||
/* = 포인트 결제 결과 출력 = */
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
else if ( $use_pay_method == "000100000000" ) // 포인트
|
||||
{
|
||||
?>
|
||||
<table width="85%" align="center" cellpadding="0" cellspacing="0" class="margin_top_10">
|
||||
<tr><td colspan="2" class="title">포인트 정보</td></tr>
|
||||
<!-- 결제수단 : 포인트 -->
|
||||
<tr><td class="sub_title1">결제수단</td><td class="sub_content1">포인트</td></tr>
|
||||
<!-- 포인트사 -->
|
||||
<tr><td class="sub_title1">포인트사</td><td class="sub_content1"><?=$pnt_issue?></td></tr>
|
||||
<!-- 결제 및 인증 아이디 -->
|
||||
<tr><td class="sub_title1">결제 및 인증 아이디</td><td class="sub_content1"><?=$pt_idno?></td></tr>
|
||||
<!-- 포인트 승인시간 -->
|
||||
<tr><td class="sub_title1">포인트 승인시간</td><td class="sub_content1"><?=$pnt_app_time?></td></tr>
|
||||
<!-- 포인트 승인번호 -->
|
||||
<tr><td class="sub_title1">포인트 승인번호</td><td class="sub_content1"><?=$pnt_app_no?></td></tr>
|
||||
<!-- 적립금액 or 사용금액 -->
|
||||
<tr><td class="sub_title1">적립금액 or 사용금액</td><td class="sub_content1"><?=$pnt_amount?></td></tr>
|
||||
<!-- 발생 포인트 -->
|
||||
<tr><td class="sub_title1">발생 포인트</td><td class="sub_content1"><?=$add_pnt?></td></tr>
|
||||
<!-- 사용가능 포인트 -->
|
||||
<tr><td class="sub_title1">사용가능 포인트</td><td class="sub_content1"><?=$use_pnt?></td></tr>
|
||||
<!-- 적립 포인트 -->
|
||||
<tr><td class="sub_title1">총 누적 포인트</td><td class="sub_content1"><?=$rsv_pnt?></td></tr>
|
||||
|
||||
</table>
|
||||
<?
|
||||
}
|
||||
/* ============================================================================== */
|
||||
/* = 휴대폰 결제 결과 출력 = */
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
else if ( $use_pay_method == "000010000000" ) // 휴대폰
|
||||
{
|
||||
?>
|
||||
<table width="85%" align="center" cellpadding="0" cellspacing="0" class="margin_top_10">
|
||||
<tr><td colspan="2" class="title">휴대폰 정보</td></tr>
|
||||
<!-- 결제수단 : 휴대폰 -->
|
||||
<tr><td class="sub_title1">결제수단</td><td class="sub_content1">휴대폰</td></tr>
|
||||
<!-- 승인시간 -->
|
||||
<tr><td class="sub_title1">승인시간</td><td class="sub_content1"><?=$app_time?></td></tr>
|
||||
<!-- 통신사코드 -->
|
||||
<tr><td class="sub_title1">통신사코드</td><td class="sub_content1"><?=$commid?></td></tr>
|
||||
<!-- 휴대폰번호 -->
|
||||
<tr><td class="sub_title1">휴대폰번호</td><td class="sub_content1"><?=$mobile_no?></td></tr>
|
||||
</table>
|
||||
<?
|
||||
}
|
||||
/* ============================================================================== */
|
||||
/* = 상품권 결제 결과 출력 = */
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
else if ( $use_pay_method == "000000001000" ) // 상품권
|
||||
{
|
||||
?>
|
||||
<table width="85%" align="center" cellpadding="0" cellspacing="0" class="margin_top_10">
|
||||
<tr><td colspan="2" class="title">상품권 정보</td></tr>
|
||||
<!-- 결제수단 : 상품권 -->
|
||||
<tr><td class="sub_title1">결제수단</td><td class="sub_content1">상품권</td></tr>
|
||||
<!-- 발급사코드 -->
|
||||
<tr><td class="sub_title1">발급사코드</td><td class="sub_content1"><?=$tk_van_code?></td></tr>
|
||||
<!-- 승인시간 -->
|
||||
<tr><td class="sub_title1">승인시간</td><td class="sub_content1"><?=$app_time?></td></tr>
|
||||
<!-- 승인번호 -->
|
||||
<tr><td class="sub_title1">승인번호</td><td class="sub_content1"><?=$tk_app_no?></td></tr>
|
||||
</table>
|
||||
<?
|
||||
}
|
||||
/* ============================================================================== */
|
||||
/* = 현금영수증 정보 출력 = */
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
if ( $cash_yn != "" )
|
||||
{
|
||||
?>
|
||||
<!-- 현금영수증 정보 출력-->
|
||||
<table width="85%" cellpadding="0" cellspacing="0" class="margin_top_20">
|
||||
<tr><td colspan="2" class="title">현금영수증 정보</td></tr>
|
||||
<tr><td class="sub_title1">현금영수증 등록여부</td><td class="sub_content1"><?=$cash_yn?></td></tr>
|
||||
<?
|
||||
// 현금영수증이 등록된 경우 승인번호 값이 존재
|
||||
if ($cash_authno != "")
|
||||
{
|
||||
?>
|
||||
<tr><td class="sub_title1">현금영수증 승인번호</td><td class="sub_content1"><?=$cash_authno?></td></tr>
|
||||
<tr>
|
||||
<td class="sub_title1">영수증 확인</td>
|
||||
<td class="sub_content1"><a href="javascript:receiptView2('<?=$site_cd?>','<?=$ordr_idxx?>', '<?=$cash_yn?>', '<?=$cash_authno?>')"><img src="./img/btn_receipt.gif" alt="현금영수증을 확인합니다." />
|
||||
</td>
|
||||
<tr><td colspan="2">※ 영수증 확인은 실제결제의 경우에만 가능합니다.</td></tr>
|
||||
<tr class="line2"><td colspan="2" bgcolor="#bbcbdb"></td></tr>
|
||||
<?
|
||||
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
<?
|
||||
}
|
||||
}
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
/* = 01-1-1. 정상 결제시 결제 결과 출력 END = */
|
||||
/* ============================================================================== */
|
||||
}
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
/* = 01-1. 업체 DB 처리 정상 END = */
|
||||
/* ============================================================================== */
|
||||
}
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
/* = 01. 결제 결과 출력 END = */
|
||||
/* ============================================================================== */
|
||||
?>
|
||||
<table width="85%" align="center" class="margin_top_10">
|
||||
<tr><td style="text-align:center"><a href="../index.html"><img src="./img/btn_home.gif" width="108" height="37" alt="처음으로 이동합니다" /></a></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td><img src="./img/boxbtm589.gif" alt="Copyright(c) KCP Inc. All rights reserved."/></td></tr>
|
||||
</table>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user